File size: 1.39Kb
<?php
$title = 'Главная';
require_once 'system/fun.php';
require_once 'system/head.php';
echo '<div class="title"><a href="/news">Новости портала</a></div>';
$news = mysql_query("SELECT * FROM `news` ORDER BY `id` DESC LIMIT 1");
while($a = mysql_fetch_assoc($news))
{
echo '<div class="menu">';
echo ''.smi(bb_code($a['text'])).'</div>
<div class="menu">Автор : '.nick($a['id_user']).' <span class="count2"> ['.times($a['time']).']</span></div>';
}
require_once 'system/forum_tem.php';
require_once 'system/zc_file.php';
if($user['level'] >= 2) {
echo '<div class="title">Админ функции</div>';
echo '<div class="menu"><img src="/style/img/podme.png"> <a href="/panel/">Админка</a></div>';
}
$user = mysql_result(mysql_query('select count(`id`) from `users`'),0);
$guest = mysql_result(mysql_query('select count(`id`) from `guest`'),0);
echo '<div class="title">Меню</div>';
echo '<div class="menu"><img src="/style/img/podme.png"> <a href="/guest">Гостевая ('.$guest.')</a></div>';
echo '<div class="menu"><img src="/style/img/podme.png"> <a href="/user/on">На сайте ('.mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `viz` > '".(time()-3600)."'"),0).')</a></div>';
echo '<div class="menu"><img src="/style/img/podme.png"> <a href="/user">Пользователи ('.$user.')</a></div>';
require_once 'system/foot.php';
?>