Размер файла: 3.83Kb
<?php
$bes=mysql_num_rows(mysql_query("SELECT `id` FROM `guestbook`"));
$besn=mysql_num_rows(mysql_query("SELECT `id` FROM `guestbook` WHERE `time` > '".(time()-84400)."'"));
$mnen=mysql_num_rows(mysql_query("SELECT `id` FROM `mnen`"));
$mnenn=mysql_num_rows(mysql_query("SELECT `id` FROM `mnen` WHERE `time` > '".(time()-84400)."'"));
$chat=mysql_num_rows(mysql_query("SELECT `id` FROM `chat`"));
$chatn=mysql_num_rows(mysql_query("SELECT `id` FROM `chat` WHERE `time` > '".(time()-84400)."'"));
$news=mysql_num_rows(mysql_query("SELECT `id` FROM `news`"));
$newsn=mysql_num_rows(mysql_query("SELECT `id` FROM `news` WHERE `time` > '".(time()-84400)."'"));
$vote=mysql_num_rows(mysql_query("SELECT `id` FROM `user_vote`"));
$voten=mysql_num_rows(mysql_query("SELECT `id` FROM `user_vote` WHERE `time` > '".(time()-84400)."'"));
$fo=mysql_num_rows(mysql_query("SELECT `id` FROM `forum`"));
$fon=mysql_num_rows(mysql_query("SELECT `id` FROM `forum` WHERE `time` > '".(time()-84400)."'"));
$k=mysql_num_rows(mysql_query("SELECT `id` FROM `forum_komm`"));
$kn=mysql_num_rows(mysql_query("SELECT `id` FROM `forum_komm` WHERE `time` > '".(time()-84400)."'"));
$ofo=mysql_num_rows(mysql_query("SELECT `id` FROM `obmen`"));
$ofon=mysql_num_rows(mysql_query("SELECT `id` FROM `obmen` WHERE `time` > '".(time()-84400)."'"));
$ok=mysql_num_rows(mysql_query("SELECT `id` FROM `obmen_komm`"));
$okn=mysql_num_rows(mysql_query("SELECT `id` FROM `obmen_komm` WHERE `time` > '".(time()-84400)."'"));
$us=mysql_num_rows(mysql_query("SELECT `id` FROM `user`"));
$usn=mysql_num_rows(mysql_query("SELECT `id` FROM `user` WHERE `reg` > '".(time()-84400)."'"));
$uso=mysql_num_rows(mysql_query("SELECT `id` FROM `user` WHERE `click` > '".(time()-600)."'"));
$admin=mysql_num_rows(mysql_query("SELECT `id` FROM `user` WHERE `admin` = '1'"));
$moder=mysql_num_rows(mysql_query("SELECT `id` FROM `user` WHERE `moder` = '1'"));
if (!$user)echo '<div class="user">
<img src="icon/next.png"> <a href="/aut.php">Вход</a>
<br>
<img src="icon/next.png"> <a href="/reg.php">Регистрация</a>';
echo '</div>
<div class="r">Основное</div>
<div class="p0">';
if ($user)echo '<img src="icon/kab.png"> <a href="/kab.php">Кабинет</a>
<br>';
echo '<img src="icon/news.png"> <a href="/news.php">Новости</a> ('.$news.') <font color="red">+'.$newsn.'</font>
<br>
<img src="icon/users.png"> <a href="/users.php">Пользователи</a> ('.$us.') <font color="red">+'.$usn.'</font>
<br>
<img src="icon/personal.png"> <a href="/admins.php">Администрация</a> ('.$admin.'/'.$moder.')
<br>
<img src="icon/online.png"> <a href="/online.php">Кто онлайн?</a> ('.$uso.')
</div>
<div class="r">Общение</div>
<div class="p0">
<img src="icon/guestbook.png"> <a href="/guestbook.php">Беседка</a> ('.$bes.') <font color="red">+'.$besn.'</font>
<br>
<img src="icon/mnen.png"> <a href="/mnen.php">Мнения</a> ('.$mnen.') <font color="red">+'.$mnenn.'</font>
<br>
<img src="icon/vote.png"> <a href="/vote.php">Опросы</a> ('.$vote.') <font color="red">+'.$voten.'</font>
<br>
<img src="icon/forum.png"> <a href="/forum.php">Форум</a> ('.$fo.'/'.$k.') <font color="red">+'.$fon.'</font> <font color="blue">+'.$kn.'</font>
<br>
<img src="icon/down.png"> <a href="/obmen.php">Обменник</a> ('.$ofo.'/'.$ok.') <font color="red">+'.$ofon.'</font> <font color="blue">+'.$okn.'</font>
<br>
<img src="icon/chat.png"> <a href="/chat.php">Чат</a> ('.$chat.') <font color="red">+'.$chatn.'</font>
<br>
<img src="icon/information.gif"> <a href="/info.php">Инфо</a>
</div>
<div class="r">Прочее</div>
<div class="pm">
<img src="icon/mail.png"> <a href="/admail.php">Написать админу</a>';
if ($user)echo '<br><img src="icon/exit.png"> <a href="/exit.php">Выйти с ника</a>';
echo '</div></div>';
?>