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