Файл: index.php
Строк: 144
<?
#####################################
## Автор: PITBULL ## ## Сайт: http://profiwm.ru # ## ICQ : 1600416 # #
#####################################
require'config.php';
echo'<div class="verx"><img src="style/images/logo.png" alt="*"/></div>';
$title= 'Привет'.$user['user'].'';
$align=$set['alignpr'];
aut();
head();
who_add(0,'enter'); // Занисываем Кто онлайн...
//require'sys/calendar.php';
echo menu.'<img src="im/menu.gif" alt="*"/><b>Ваше меню:</b>'.div;
if ($user['level']>4)echo gb. '<img src="img/adm.png" alt="*"/> <a href="admin/">Админская</a><br />'.div;
echo gb. '<img src="img/enter.png" alt="*"/> <a href="my/index">Личный кабинет</a><br/>'.div;
echo gb. '<img src="img/close.png" alt="*"/><b> <a href="exit">Выход</a></b>'.div;
echo menu.'<img src="im/ob.png" alt="*"/><b>Объявления:</b>'.div;
$ga = DB::run()->queryFetch("Select * from lib order by time desc LIMIT 1");
if(empty($gs)){}else{
echo '<div class="text">Последнея статья: ';
echo '<a href="/gazeta/index?mod=stat&id='.$ga['id'].'">'.$ga['name'].'</a> ('.($ga['time']).')</div>';}
$r = DB::run()->query ("Select * from objavs order by time desc LIMIT 4");
$post_k=$start+1;
while($ob =$r->fetch()){
echo gb.'<img src="/im/open.png" alt="*"/><a href="objavs?mod=read&did='.$ob['id'].'">'.$ob['name'].'</a> <spam class="num">'.times($ob['time']).'</spam>'.div;}
if ($user['level'] > 8) echo '<div class="text"><img src="im/menu.gif" alt="*"/><a href="objavs?mod=add">Добавить объявление</a></div>';
echo menu.'<img src="im/raz.png" alt="*"/><b>Разделы сайта:</b>'.div;
$news = DB::run()->queryFetch ("Select * from news order by time desc LIMIT 1");
echo gb. '<img src="img/news.png" alt="*"/> <a href="news">Новости</a><spam class="num">'.times($news['time']).'</spam><br/>'.div;
switch($mod){
default:
DB::run()->querySingle("select count(*) as num from news");
$r = DB::run()->query ("Select * from news order by time desc LIMIT 1");
while($a = $r->fetch()){
echo '<div class="text"><img src="img/news.gif"> Новость: <spam class="num">'.times($a['time']).'</spam><br/>';
echo text($a[msg]);
echo '<br/><b>Автор: </b>'.nik($a[user_id]).'';
echo '<br /><a href="news?mod=komm&new='.$a[id].'">Комментарии</a>
('.DB::run()->querySingle("select count(*) as num from newskom where new = ?",array($a['id'])).')</div>';
}
}
echo '<div class="links"><img src="im/1.png" alt="*"/> <a href="forum/index"><b>Форум</b></a><spam class="num">
<a href="forum/new_t"><span style="color:#ff0000">'.DB::run()->querySingle("SELECT COUNT(*) FROM `forum_t`;").'</span></a> /
<a href="forum/new_p"><span style="color:#ff0000">'.DB::run()->querySingle("SELECT COUNT(*) FROM `forum_msg`;").'</span></a></spam></br>';
if($user['level']<5){
$r = DB::run()->query ("Select * from forum_t where level=? order by time desc LIMIT 3",array(0));
}else {$r = DB::run()->query ("Select * from forum_t order by time desc LIMIT 3");}
while($a = $r->fetch()){
echo ' <img src="/im/tem.gif" alt="*"/> <a href="forum/tema_'.$a['id'].'_end">'.$a['name'].' </a></br>';}
echo'</div>';
echo ' <div class="gb"><img src="im/top.png" alt="*"/> <a href="gazeta">Газета Сайта</a><spam class="num">('.$db->sql_fetchfield($db->sql_query("select count(*) as num from lib"),0).')
</spam></div>';
###########################################################################################################################
$arx=DB::run() -> querySingle("SELECT count(*) FROM `dow_files`;");
echo '<div class="gb"><img src="im/2.png" alt="*"/> <a href="down">Архив файлов</a><spam class="num">('.$arx.')</spam></div>
<div class="gb"><img src="im/3.png" alt="*"/> <a href="usscript">Скрипты пользователей</a><spam class="num">('.$db->sql_fetchfield($db->sql_query("select count(*) as num from us_files"),0).')</spam></div>
<div class="gb"><img src="im/4.png" alt="*"/> <a href="fo">Обменник файлов</a><spam class="num">('.$db->sql_fetchfield($db->sql_query("select count(*) as num from fo_files"),0).')</spam></div>
<div class="gb"><img src="im/6.png" alt="*"/> <a href="guest">Гостевая книга</a><spam class="num">('.$db->sql_fetchfield($db->sql_query("select count(*) as num from books"),0).')</spam></div>
<div class="gb"><img src="im/7.png" alt="*"/> <a href="groups">Группы</a><spam class="num">('.$db->sql_fetchfield($db->sql_query("select count(*) as num from groups"),0).')</spam></div>
<div class="gb"><img src="im/8.png" alt="*"/> <a href="codes">Куски PHP кода</a><spam class="num">('.$db->sql_fetchfield($db->sql_query("select count(*) as num from codes"),0).')</spam></div>
<div class="gb"><img src="im/9.png" alt="*"/> <a href="wm">Информация Wap-мастеру</a><spam class="num">('.$db->sql_fetchfield($db->sql_query("select count(*) as num from wm_info"),0).')</spam></div>
<div class="gb"><img src="im/10.gif" alt="*"/> <a href="servis">Сервисы/Справочники</a><spam class="num">21</spam></div>
<div class="gb"><img src="im/yyy.png" alt="*"/> <a href="ycheb">Учебники</a></div>
<div class="gb"><img src="im/11.png" alt="*"/> <a href="mafia">Игра мафия</a></div>
<div class="gb"><img src="im/12.png" alt="*"/> <a href="voise/index.php">Голосования</a><spam class="num">('.mysql_result(mysql_query("select count(*) as num from voice"),0).')</spam></div>';
echo menu.'<font color=ffffff><img src="im/dop.gif" alt="*"/><b>Доп. Инфо:</b></font>'.div;
$newtoday=$db->sql_fetchfield($db->sql_query("SELECT count(*) from users WHERE date = '".date("d-m-Y")."'"),0);
echo gb. '<img src="im/13.gif" alt="*"/> <a href="faq?mod=newtoday">Новеньких</a><spam class="num">('.$newtoday.')</spam>'.div;
$konkurs = $db->sql_fetchfield($db->sql_query("select count(*) as num from konkurs"),0);
if($konkurs>0)echo gb. '<img src="im/14.png" alt="*"/> <a href="konkurs">Конкурсы</a>('.$konkurs.')<br/>'.div;
echo gb. '<img src="im/15.png" alt="*"/> <a href="who">Кто онлайн?</a><spam class="num">('.$db->sql_fetchfield($db->sql_query('SELECT COUNT(*) FROM `who`'),0).')</span>'.div;
$vn=$db->sql_fetchfield($db->sql_query ("select count(*) as num from users WHERE visit>'".date("Y.m.d.")."'"),0);
echo gb. '<img src="im/online1.png" alt="*"/> <a href="faq?mod=last">Сайт посетили</a><spam class="num">('.$vn.')</spam>'.div;
echo gb. '<img src="img/top.png" alt="*"/> <a href="faq">Статистика сайта</a><br/>'.div;
echo gb. '<img src="im/dok.png" alt="*"/> <a href="board">Доска почета</a><br/>'.div;
foot();
?>