Файл: minichat_by_KoT/minichat_by_KoT/menu.php
Строк: 42
<?php
##########################################
# ~ Разработка отдельных модулей ~~~~~~~ #
# ~ и написание скриптов на php (c)KoT ~ #
# ~ ICQ: 7675072 ~~~~~~~~~~~~~~~~~~~~~~~ #
# ~ Site: 4atlove.ru ~~~~~~~~~~~~~~~~~~~ #
# ~ E-mail: notefree@bk.ru ~~~~~~~~~~~~~ #
##########################################
require 'sid.php';
header("Cache-Control: no-cache");
header('Content-Type:text/html; charset=UTF-8');
require 'config.php';
$link = connect_db();
list($row, $id, $ps) = check_login($link);
include 'head.php';
echo $div1 . '<b>Меню чатика</b>' . $div5 . $div3;
include 'calendar.php';
whorm(0, 'menu');
if ($row['level'] == 2) {
echo '<a href="admin.php?'.$ref.'"><b>A_Panel</b></a><hr/>';
}
$f_them = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_topic`"), 0);
$f_mes = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_message`"), 0);
echo '<a href="onl.php?'.$ref.'">Кто где?</a> ['.mysql_num_rows(mysql_query("SELECT `id` FROM `users` WHERE `onl` + '100' > '$time'")).']<br/>
<a href="forum.php?'.$ref.'">Форум</a> [' . $f_them . '/' . $f_mes . ']<br/>';
echo $div5;
$news = mysql_query("SELECT `id`,`title` FROM `news` ORDER BY `date` DESC");
if (mysql_num_rows($news) != 0)
{
echo $div3;
while ($view_n = mysql_fetch_assoc($news)) {
$uid = $view_n['id'];
$tit = $view_n['title'];
echo '<a href="news.php?uid='.$uid.'"><font color="#FF0000">'.$tit.'</font></a><br/>';
}
echo $div5;
}
echo $div3 . '<small>• Комнаты:</small><br/>';
$rooms = mysql_query("SELECT * FROM `rooms` ORDER BY `pos` ASC");
if (mysql_num_rows($rooms) != 0)
{
while($room = mysql_fetch_assoc($rooms))
{
echo '<a href="room.php?rm='.$room['rm'].'">'.$room['name'].'</a>
['.mysql_num_rows(mysql_query("SELECT `user` FROM `users` WHERE `room` = '".(int)$room['rm']."' AND `onl` + 100 > '$time' ORDER BY `onl` DESC")).']<br/>';
}
} else {
echo $bad.'Комнат нету...'.$div5.'<br/>';
}
$photos = mysql_result(mysql_query("SELECT count(*) FROM `users` WHERE `img`!=''"), 0);
$letters = mysql_result(mysql_query("SELECT count(*) FROM `letters` WHERE `idwho`='$row[id]' AND `read`='0'"), 0);
$sup = mysql_result(mysql_query("SELECT count(*) FROM `support`"), 0);
echo $div5 . $div3 . '
• <a href="my.php?'.$ref.'"><b>Личный кабинет</b></a><br/>
• <a href="privat.php?'.$ref.'">Приват</a> [' . ($letters) . ']<br/>
• <a href="gallery.php?'.$ref.'">Галерея</a> [' . ($photos) . ']<br/>
• <a href="stats.php?'.$ref.'">Статистика</a><br/>
• <a href="support.php?'.$ref.'"><b>Поддержка</b></a> [' . ($sup) . ']<br/>
' . $div5 . $div3 . '
• <a href="logout.php?"><b>Выход из ника</b></a>' . $div5;
include 'foot.php';
?>