Файл: backup/index.php
Строк: 151
<?php
require_once'core/start.php';
$title = 'Элитный форум';
require_once(root.'core/header.php');
if($NewYear = NewYear()) echo $NewYear;
echo '<div class="wizart"><img src="files/logo/'.$set['ava'].'"
alt="Ваш логотип"></div>';
func::head_menu_index();
/* Вывод рекламы */
$random = core::$dbs->query("SELECT * FROM `rekl` WHERE `index` != ? ORDER BY RAND() DESC LIMIT 3",array(0));
if($random->rowCount() != 0){
echo '<div class="main">';
echo '<div style="float:right;"><img src="icons/rekl.png" alt="*"/></div>';
while($r = $random->fetch()){
echo '<a href="http://'.$r['link'].'">'.$r['name'].'</a><br/>';
}
echo '</div>';
}
/* Запись гостей */
if(empty($_COOKIE['cookie_id'])){
if(core::$dbs->querySingle("SELECT COUNT(ip) FROM session WHERE id_session = ?",array(session_id()))==0){
core::$dbs->query("INSERT INTO session SET ip = ?, ua = ?, id_session = ?, date = ?",array($ip,$ua,session_id(),time()));
} else {
core::$dbs->query("UPDATE session SET ip = ?, ua = ?, date = ? WHERE id_session = ?",array($ip,$ua,time(),session_id));
}
core::$dbs->query("DELETE FROM session WHERE date < ?",array(time()-300));
}
$us = core::$dbs->queryFetch("SELECT id FROM `users` ORDER BY `data_reg` DESC LIMIT 1");
echo '<div class="nav"><img src="icons/nav.png" alt=""> <b>Новичок</b>: '.func::nick($us['id']).'</div><div
class="nav"> <img src="icons/nav.png" alt=""> <a
href="/pages/minichat.php">Гостевая</a><span class="count">'.core::$dbs->querySingle("SELECT count(id) FROM `chat`").'/<font color="red">
+'.core::$dbs->querySingle("SELECT count(id) FROM `chat` where `time` > ?",array(time()-84600)).'</font></count></div>';
$new_files = core::$dbs->querySingle("SELECT COUNT(id) from `down` where `time` > ? and `type` = ?",array(time()-84600,1));
echo '<div class="main"><img src="icons/nav.png" alt=""> <a href="/down">Обменник файлов</a> <span class="count">('.core::$dbs->querySingle("SELECT COUNT(id) from `down` where `type` = ?",array(1)).''.(!empty($new_files) ? '<font color="red">+'.$new_files.'</font>':'').')</span></div>';
echo '<div
class="raz"><img src="icons/nav.png" alt=""> <a href="/info">Новости:</a></div>';
$info = core::$dbs->query("SELECT * FROM `info` ORDER BY `time` DESC LIMIT ".$set['num_news']."");
if($info->rowCount()==0){
func::error('Новостей пока нет...');
}
while($inf = $info->fetch()){
echo '<div class="main"><a
href="/info/view/'.$inf['id'].'">
<b>'.func::out($inf['name']).'</b></a> ('.func::times($inf['time']).')</div>';
}
echo '<div
class="raz"><img src="icons/nav.png" alt=""> СЕЙЧАС
АКТУАЛЬНО:</div>';
$forum = core::$dbs->query("SELECT * FROM `forum_theme` ORDER BY `last` DESC LIMIT 10");
while($for = $forum->fetch()){
if($for['type'] == 0){
$type = '<img src="icons/them.png" alt=""/>';
}elseif($for['type'] == 1){
$type = '<img src="icons/them_closed.png" alt=""/>';
}
echo '<div class="main"><a
href="/plugin/topic/'.$for['id'].'">'.$type.'
<b>'.func::out($for['name']).'</b></a><span class="count">('.core::$dbs->querySingle("SELECT COUNT(id) FROM `forum_msg` WHERE `id_t` = ?",array($for['id'])).')</span></div>';
}
echo '<div
class="nav"><a href="all_themes.php"><img
src="icons/nav.png"
alt=""> Всего тем: '.core::$dbs->querySingle("SELECT COUNT(id) from `forum_theme`").'</a> <a
href="all_posts.php"><img src="icons/nav.png" alt=""> Всего
постов: '.core::$dbs->querySingle("SELECT COUNT(id) from `forum_msg`").'</a></div>';
echo '<div class="raz"><img src="icons/nav.png" alt="">
МЕНЮ:</div>';
if(isset($user['id'])){
echo '<a class="l1"
href="/plugin/addthem.php"><img src="icons/nav.png" alt=""> Создать тему</a>';
}
echo '<a class="l1"
href="list_forums.php"><img src="icons/nav.png" alt="">
Список форумов </a><a class="l1"
href="pages/users.php?do=mod"><img
src="icons/nav.png"
alt=""> Модераторы</a>';
if($user['level']>=1){
echo '<a class="l1"
href="admin"><img src="icons/nav.png" alt=""> <b>Админка</b></a>';}
echo '<table style="width:100%" cellspacing="0"
cellpadding="0"><form method="post"
action="/pages/search.php?">
<input type="text" name="msg"
maxlength="64" value="" style="width:55%;">
<input type="submit" value="Поиск"
style="width:35%;"></form></table>';
echo '<div class="nav"><b>Облако тегов</b>: ';
$info = core::$dbs->query("SELECT * FROM `forum_theme` ORDER BY RAND() DESC LIMIT 5");
while($inf = $info->fetch()){
$record = explode(",", $inf['text']);
$num = count($record);
if(!isset($s))$s=1;
$max = round(($num/40)+0.5);
for($i=0;$i<$max;$i++){
$z++;
$adr = $record[$i];
if($z>0)$zp = ', ';
else
$zp = '';
echo '<a href="/pages/search.php?msg='.$adr.'">'.$adr.'</a>'.$zp;
}
}
echo '</div>';
echo '<div class="raz"><img src="icons/nav.png" alt="">
Реклама:</div>';
echo '<a href="http://сайт.ру"><p style="color: green;">Ccылка</p></a>';
func::footer_menu_index();
require_once(root.'core/footer.php');
?>