Ой блеать,не то дал
____
<?
requireconfig.php;
$align=$set[alignpr];
$title=Прихожая-.date(\"H:i\", $time);
aut();
head();
who_add(0,\'enter\'); // Занисываем Кто онлайн...
require\'sys/calendar.php\';
if(isset($_GET[\'intim\']))unset($_SESSION[\'inps\']);
if ($user[\'level\']>6)echo \'<a href=\"admin/\">Админка</a><br/><br />\';
echo \'<div class=\"menu\">\';
echo \'<small><center>[ <img src=\"../icon/kab.png\" alt=\"*\"/> <a href=\"cabinet/index\">Каб</a>][ <img src=\"../icon/faq.png\" alt=\"*\"/><a href=\"faq\"> FaQ</a>]</center></small>\';
echo \'</div>\';
echo \'<div class=\"links\"><center>\';
echo \'\'.date(\"Время H:i\"
.\'</div></center>\';
$resu = $db->sql_fetchrow($db->sql_query (\"SELECT * FROM `vnim`\"
);
echo \'<div class=\"menu\">\';
if($resu[\'time\']>=time()){
echo \' Мастер дня \'.nik($resu[\'id_user\']).\'<br/>\';
}else{
echo \' Мастеров нет!<br/>\';
}
echo \'» <a href=\"vnim\">Как сюда попасть?</font></a> \';
echo \'</div>\';
echo \'<div class=\"h\">\';
echo \'<center><img src=\"../icon/onl.png\" alt=\"*\"/> <a href=\"who\">Онлайн</a> [\'.$db->sql_fetchfield($db->sql_query(\'SELECT COUNT(*) FROM `who`\'),0).\'] \';
echo \'<font color=\"black\">\';
echo \'</center>\';
echo \'</font>\';
echo \'</div>\';
$idnews=$db->sql_fetchfield($db->sql_query(\"SELECT MAX(id) FROM news\"
);
$news=$db->sql_fetchfield($db->sql_query(\"SELECT name FROM news where id = \'\".$idnews[0].\"\'\"
);
if (empty($user[\'min\']))$user[\'min\']=1;
$max=$user[\'min\'];
$k_post=$db->sql_fetchfield($db->sql_query(\"select count(*) as num from news\"
,0);
$k_page=k_page($k_post,$max);
$page=page($k_page);
$start=$max*$page-$max;
$r = $db->sql_query(\"Select * from news order by time desc LIMIT $start, $max\"
;
while($a = mysql_fetch_array ($r)){
echo \'<img src=\"/icon/rss.png\" alt=\"*\"/> <a href=\"news\">Новости </a>(\'.times($a[\'time\']).\')<br/>\';
echo \'\'.text($a[msg]).\'\';
if($inf[sex]==1)$sex=\'<u>Разместила</u>\';
else $sex = \'<u>Разместил\';
echo \'<br/>\'.$sex.\':</u> <b>\'.nik($a[user_id]).\'</b>\';
echo \'<br/><a href=\"news?mod=komm&new=\'.$a[id].\'\">Комментарии</a> (\'.$db->sql_fetchfield($db->sql_query(\"select count(*) as num from newskom where new = \'\".$a[id].\"\'\"
,0).\')<br/>\';
}
$otkl = mysql_fetch_array(mysql_query(\"SELECT * FROM `setting`\"
);
if ($otkl[\'chat\'] == 0) {
echo\'<img src=\"/icon/chat.png\" alt=\"*\"/> <a href=\"chat\"><b> Чатик</b></a> (\'.$db->sql_fetchfield($db->sql_query(\'SELECT COUNT(*) FROM `who` WHERE `room` = \"room\"\'),0).\')<br/>\';
} else {
echo \'Чат отключен<br/>\';
}
echo \'<img src=\"icon/lk.png\" alt=\"*\"/> <a href =\"\'.$user[\'id\'].\'\">Моя страница</a><a href= \"my/profile\" >|Настр</a><br/>\';
$p_all = mysql_result(mysql_query(\"SELECT COUNT(*) FROM users WHERE photo != \'\' ORDER BY vote_photo DESC\"
, 0);
$konkurs = $db->sql_fetchfield($db->sql_query(\"select count(*) as num from konkurs\"
,0);
if($konkurs>0)echo \'<img src=\"icon/gazeta.png\" alt=\"*\"/> <a href=\"konkurs\">Конкурсы</a>(\'.$konkurs.\')<br/>\';
$akcyi = $db->sql_fetchfield($db->sql_query(\"select count(*) as num from akcyi\"
,0);
if($akcyi>0)echo \'<img src=\"icon/gazeta.png\" alt=\"*\"/> <a href=\"akcyi\">Акции</a>(\'.$akcyi.\')<br/>\';
$vstr = $db->sql_fetchfield($db->sql_query(\"select count(*) as num from vstr\"
,0);
if($vstr>0)echo \'<img src=\"icon/gazeta.png\" alt=\"*\"/> <a href=\"vstr\">Встречи</a>(\'.$vstr.\')<br/>\';
echo \'<img src=\"icon/gazeta.png\" alt=\"*\"/> <a href=\"objavs\">Объявления</a>(\'.$db->sql_fetchfield($db->sql_query(\"select count(*) as num from objavs\"
,0).\')<br/>\';
echo \'<img src=\"icon/forum.png\" alt=\"*\"/> <a href=\"forum/index\"><b>Форум</b></a> (<a href=\"forum/new_t\">\'.$db->sql_fetchfield($db->sql_query(\"SELECT COUNT(*) FROM `forum_t`;\"
, 0).\'</a>/<a href=\"forum/new_p\">\'.$db->sql_fetchfield($db->sql_query(\"SELECT COUNT(*) FROM `forum_msg`;\"
, 0).\'</a><br/>\';
if($user[\'level\']<5){
$r = DB::run()->query (\"Select * from forum_t where level=? order by time desc LIMIT 6\",array(0));
}else {$r = DB::run()->query (\"Select * from forum_t order by time desc LIMIT 6\"
;}
while($a = $r->fetch()){
echo \'<div class=\"gb\"> <img src=\"/im/tem.gif\" alt=\"*\"/> <a href=\"forum/tema_\'.$a[\'id\'].\'_end\">\'.$a[\'name\'].\' </a></br></div>\';}
echo\'</div></div>\';
echo \'<img src=\"icon/obmen.png\" alt=\"*\"/> <a href=\"fo\">Обменник файлов</a>(\'.$db->sql_fetchfield($db->sql_query(\"select count(*) as num from fo_files\"
,0).\')<br/>\';
echo \'<img src=\"icon/user.png\" alt=\"*\"/> <a href=\"groups\">Группы</a>(\'.$db->sql_fetchfield($db->sql_query(\"select count(*) as num from groups\"
,0).\')<br/>\';
echo \' <img src=\"icon/serw.png\" alt=\"*\"/><a href=\"diaries\">Дневники</a>(\'.$db->sql_fetchfield($db->sql_query(\"select count(*) as num from diaries\"
,0).\')<br/>\';
echo gb.\'<b><img src=./icon/uiti.png alt=*/> <a href=\"exit\">Выход</a></b>\'.div;
foot();
?>