Размер файла: 1.93Kb
<?php
// by mides, wmclub.mobi
require_once 'system/sys.php';
require_once 'system/header.php';
switch ($_GET['act']) {
default:
if ($u['id']) {
tp('Добро пожаловать, '.$u['login']);
} else {
tp('Добро пожаловать, Гость');
}
$news_r = mysql_query("SELECT * FROM `news` ORDER BY `time` DESC LIMIT 1");
$news = mysql_fetch_assoc($news_r);
if ($news['id']) {
echo '<b>'.$news['title'].'</b>: '.date('d.m.y', $news['time']).'<br />';
mb_internal_encoding('UTF-8');
echo bb(mb_substr($news['text'], 0, 50)).'...<br />
<a href="news.php">подробнее</a>';
}
echo '</div>';
tp('Общение');
$f_topics = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `forum_topics`"), 0);
$f_msg = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `forum_msg`"), 0);
$book = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `book`"), 0);
echo '<a href="forum.php">Форум</a> ('.$f_topics.'/'.$f_msg.')<br />';
echo '<a href="book.php">Гостевая книга</a> ('.$book.')<br />';
echo '</div>';
tp('Полезное');
$loads = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `loads_files`"), 0);
echo '<a href="loads.php">Загруз-центр</a> ('.$loads.')<br />';
echo '<a href="info.php">Информация, FAQ</a><br />';
echo '</div>';
tp('Другое');
$ad_r = mysql_query("SELECT * FROM `ad` WHERE `type` = 2 ORDER BY `id`");
while ($ad = mysql_fetch_assoc($ad_r)) {
echo '<a href="'.$ad['link'].'">'.$ad['name'].'</a><br />';
}
$online = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `online`"), 0);
echo '<a href="http://1da.su">Wap-хостинг 1da.su</a><br />';
echo '</div><div class="navigation">© <a href="http://wmclub.mobi">by coolcms</a><br /><a href="online.php">Онлайн ('.$online.')</a></div>';
break;
}
require_once 'system/tail.php';
?>