View file index.php

File size: 4.29Kb
<?php
$title='Главная';
require"system/config.php";
require"system/func.php";
require"system/head.php"; 
require"system/error.php";




$act=prov($_GET['act']);
echo'';

//СЧЕТЧИКИ

$newthems=mysql_num_rows(mysql_query("select * from forum_themes where pervoe like '".date('d.m.Y')."%'"));
$newmes=mysql_num_rows(mysql_query("select * from forum_messages where fmdater like '".date('d.m.Y')."%'"))
;
$news=mysql_fetch_array(mysql_query("select * from news where id_group='0' order by id_news desc limit 1"));
if(empty($news['dater'])){
$news['dater']='Нет новостей';}
$obmennik=mysql_result(mysql_query("SELECT COUNT(*) FROM `obmen_files`"),0);
$clocp=time()-86400*3; 
$downs=mysql_result(mysql_query("SELECT COUNT(*) FROM `down_files` WHERE `typer`='file'"),0);
$newobm=mysql_result(mysql_query("SELECT COUNT(*) FROM `obmen_files` WHERE `kogda`>'$clocp'"),0);
if($newobm==0){$newobm='';}else{$newobm='/<a href="obmen/new.php"><font color="red">+'.$newobm.'</a></font>';}
$newscr=mysql_result(mysql_query("SELECT COUNT(*) FROM `down_files` WHERE `typer`='file' AND `dobav`>'$clocp'"),0);
if($newscr==0){$newscr='';}else{$newscr='/<a href="downs/new.php"><font color="red">+'.$newscr.'</a></font>';}
$cougue=mysql_result(mysql_query("SELECT COUNT(*) FROM `guest`"),0);
$newgues=mysql_result(mysql_query("SELECT COUNT(*) FROM `guest` WHERE `time`>'".(time()-86400)."'"),0);
if($newgues!=0){$newgue='/<font color="red">+'.$newgues.'</font>';}else{echo'';}
$couadc=mysql_result(mysql_query("SELECT COUNT(*) FROM `admchat`"),0);
$newadc=mysql_result(mysql_query("SELECT COUNT(*) FROM `admchat` WHERE `time`>'".(time()-86400)."'"),0);
if($newadc!=0){$newadc='/<font color="red">+'.$newadc.'</font>';}else{echo'';}
$coublog=mysql_result(mysql_query("SELECT COUNT(*) FROM `blog`"),0);
$newb=mysql_result(mysql_query("SELECT COUNT(*) FROM `blog` WHERE `time`>'$clocp'"),0);
if($newb==0){$newblog='';}else{$newblog='/<font color="red">+'.$newb.'</font>';}
$coulib=mysql_result(mysql_query("SELECT COUNT(*) FROM `library` WHERE `stat`='0'"),0);
$newlib=mysql_result(mysql_query("SELECT COUNT(*) FROM `library` WHERE `time`>'$clocp' AND `stat`='0'"),0);
if($newlib==0){$newlib='';}else{$newlib='/<a href="library/?act=new"><font color="red">+'.$newlib.'</font></a>';}
$fthemes=mysql_result(mysql_query("SELECT COUNT(*) FROM forum_themes`"),0);
$fmessages=mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_messages`"),0);
$allphotf=mysql_result(mysql_query("SELECT COUNT(*) FROM `photos` WHERE `type`='file'"),0);
$allphotc=mysql_result(mysql_query("SELECT COUNT(*) FROM `photos` WHERE `type`='cat'"),0);
$cougrg=mysql_result(mysql_query("SELECT COUNT(*) FROM `groups`"),0);
$cougru=mysql_result(mysql_query("SELECT COUNT(*) FROM `groups_user`"),0);
$couchats=mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `gdeon` LIKE '/chat/%' AND `online`>'".(time()-120)."'"),0);
$coustol=mysql_result(mysql_query("SELECT COUNT(*) FROM `stol` ORDER BY `id_z`"),0);
$newstol=mysql_result(mysql_query("SELECT COUNT(*) FROM `stol` WHERE `time`>'".(time()-86400)."'"),0);

$lastthem=mysql_fetch_array(mysql_query("select * from forum_themes order by updater desc limit 1"));


if($news['dater']==date('d.m.Y')){$news['dater']='Сегодня';}
echo'<a href="/pages/news.php">Новости</a> ['.$news['dater'].']<br>';
if(!empty($news['timer']) and $news['timer']>time()){
$koments=mysql_num_rows(mysql_query("select * from koments where type='news' and id_kogo='".$news['id_news']."'"));
echo vizual($news['ntext']).'<br>';
echo'<a href="/pages/koments.php?id_wm='.$news['id_news'].'&amp;type=news">Комментарии</a> ['.$koments.']<br>';}

echo'<div class="i">Меню пользователя</div>';

if($vhod==1){if($adm_pr==2 or $adm_pr==3 or $adm_pr==4){echo'<img src="/design/default/act.gif" alt="-"> 
<a href="/mpanel/control.php">Админ-панель</a><br>';}}else{echo'<img src="/design/default/act.gif" alt="-"> <a href="/pages/enter.php"> 
Вход</a><br><img src="design/default/act.gif" alt="-"><a href="/pages/reg.php">Регистрация</a><br>
<img src="'.$dirsite.'/design/default/act.gif" alt=""> <a href="/lostpass.php?">Забыли пароль?</a>
';} 


if($vhod==1){echo'<img src="design/default/act.gif" alt="-">  <a href="/pages/menu.php">Мое меню</a><br>



';
}



require"system/glav.php";

require"system/footr.php";
?>