Файл: backUP/index.php
Строк: 159
<?php
//-----Создаем титл страницы-----//
$title = 'Помощь новичкам';
//-----Подключаем функции-----//
require_once ('system/function.php');
//-----Подключаем вверх-----//
require_once ('system/header.php');
//-----Выводим логотип----//
if(!isset($user))header('Location: /login.php');
echo '<div class="logo"><a href="'.$HOME.'"><img src="'.$HOME.'/design/gradient/logo.png" alt="'.$HOME.'" title="'.$HOME.'" /></a></div>';
if(!$user['id']) {
echo '<div class="menu"><img src="'.$HOME.'/design/gradient/lol.png" alt="*" /> Меню гостя:</div>
<div class="menudiv">
<a href="'.$HOME.'/login.php" class="k_menu"><img width="10" height="10" src="'.$HOME.'/images/auth.png" alt="*" title="Авторизация" /> Авторизация
</div></a>
<div class="menudiv">
<a href="'.$HOME.'/registr.php" class="k_menu"><img width="10" height="10" src="'.$HOME.'/images/reg.png" alt="*" title="Регистрация" /> Регистрация
</div></a>';
} else {
$len = mysql_result(mysql_query("SELECT COUNT(id) FROM `lenta` WHERE `komy` = '".$user['id']."' and `readlen` = '0'"),0);
$mes = mysql_result(mysql_query("SELECT COUNT(id) FROM `message` WHERE `komy` = '".$user['id']."' and `readlen` = '0'"),0);
}
echo '<div class="tnav"><div align="center"><a href="'.$HOME.'/user/cab.php"><img src="images/panel/10.png"><a href="'.$HOME.'/mes"><img src="images/panel/5.png"><font color="red"><b> ('.$mes.') </b></font></a><a href="'.$HOME.'/lenta.php"><img src="images/panel/3.png"> <font color="red"><b>('.$len.')</b></font></a><a href="'.$HOME.'/exit.php"><img src="images/panel/12.png"></div></a></div>';
echo '<div class="menu"><img src="'.$HOME.'/design/gradient/lol.png" alt="*" /> Реклама</div>';
echo "<div class='podmenu'>";
echo "<a href='http://strongcms.ru'><img src='/rekl.png' alt='' class='icon'/> Основано на StrongCms<br />";
echo "<a href='http://obschays.ru'><img src='/rekl.png' alt='' class='icon'/> Социальная Сеть</div>";
//-----Выводим новости-----//
$count_news = mysql_result(mysql_query('select count(`id`) from `news`'),0);
echo '<div class="menu"><img src="'.$HOME.'/design/gradient/lol.png" alt="Новости" title="Новости" /><a href="'.$HOME.'/news/"> Новости</a> <div class="count">('.$count_news.')</div></div>';
echo '<div class="divnews">';
$sql = mysql_query("SELECT * FROM `news` ORDER BY `id` DESC LIMIT 1");
while($sql1 = mysql_fetch_assoc($sql))
{
echo ''.smile(bb($sql1['text'])).'<br />
<img src="'.$HOME.'/images/rek.png" alt="*" /> Автор: '.nick($sql1['avtor']).'<br />
<img src="'.$HOME.'/images/rek.png" alt="*" /> <a href="/news/comment'.$sql1['id'].'">Комментарии:</a> ('.mysql_result(mysql_query('select count(`id`) from `news_com` where `news` = "'.$sql1['id'].'"'),0).')';
}
echo '</div></div>';
//-----Выводим форум-----//
$t_f = mysql_result(mysql_query('select count(`id`) from `forum_tema`'),0);
echo '<div class="menu"><img src="'.$HOME.'/design/gradient/lol.png" alt="*" /> <a href="'.$HOME.'/forum/"> Форум</a> <div class="count">('.$t_f.' <font color="red"><b>+'.mysql_result(mysql_query('select count(`id`) from `forum_tema` where `time` > "'.(time()-((60*60)*24)).'"'),0).'</b></font> | '.mysql_result(mysql_query('select count(`id`) from `forum_post`'),0).' <font color="green"><b>+'.mysql_result(mysql_query('select count(`id`) from `forum_post` where `time` > "'.(time()-((60*60)*24)).'"'),0).'</b></font> )</div></div>';
if($t_f == 0) {
echo '<div class="podmenu"><center><b>Форум пока пуст!</b></center></div>';
}
$forum = mysql_query("SELECT * FROM `forum_tema` ORDER BY `up` DESC LIMIT 5");
while($a = mysql_fetch_assoc($forum))
{
if($a['status'] == 0) {
$icon = 'tem'; } else { $icon = 'close';
}
echo '<table cols="2" width="100%" cellpadding="0" cellspacing="0" style="font-size:14px;"><tr>
<td class="menudiv" width="95%"><a href="/forum/tema'.$a['id'].'" class="k_menu"><img src="/images/'.$icon.'.png" alt="*" /> '.$a['name'].' <div class="count">('.mysql_result(mysql_query('select count(`id`) from `forum_post` WHERE `tema` = "'.$a['id'].'"'),0).')</div></a></td>
</a></td>
</tr></table>';
}
echo '<div class="menu"><a href="'.$HOME.'/down/"><img src="'.$HOME.'/design/gradient/lol.png" alt="*" title="Загрузки" /> Загрузки <div class="count"><font color="red">('.mysql_result(mysql_query("SELECT COUNT(id) FROM `load_file`"),0).')</a></font> <font color="green">+'.mysql_result(mysql_query("SELECT COUNT(*) FROM `load_file`WHERE `time` > '".(time()-86400)."' "),0).'</font></div></div>';
############################################
$l_f = mysql_result(mysql_query('select count(`id`) from `load_file`'),0);
if($l_f >= 1)
{
$load_r = mysql_query("SELECT * FROM `load_file` WHERE `id_dir` ORDER BY `time` DESC LIMIT 3");
while($load = mysql_fetch_assoc($load_r))
{
$text = ''.nl2br(smile(bb($load['about']))).'';
$text_array = explode(" ", $text);
$text_num = array_slice($text_array, 0, 5);
$text_good = implode(" ", $text_num);
if (count($text_array) > 5) {
$text_good .= '...';
}
echo '<div class="menudiv"><a href="'.$HOME.'/down/file'.$load['id'].'" class="k_menu"><img src="'.$HOME.'/images/load/'.$load['format'].'.png" > '.$load['name'].' </a></div><div class="podmenu"> '.$text_good.'<br> Добавил: '.nick($load['avtor']).' ('.vremja($load['time']).')</div>';
}
}else{
echo '<div class="podmenu"><center><b>Файлов пока нет!</b></center></div>';
}
//-----Выводим меню сайта-----//
echo '<div class="menu"><img src="'.$HOME.'/design/gradient/lol.png" alt="*" /> Меню сайта:</div>
<div class="menudiv"><a href="'.$HOME.'/php_lsn/" class="k_menu"><img width="16" height="16" src="'.$HOME.'/images/lib.png" alt="*" title="Учебник" /> Учебник по PHP <div class="count">(11)</div></div></a>
<div class="menudiv"><a href="'.$HOME.'/wminfo.php/" class="k_menu"><img width="16" height="16" src="'.$HOME.'/images/lib.png" alt="*" title="Справочник" /> WM справочник <div class="count">(7)</div></div></a>
<div class="menudiv"><a href="'.$HOME.'/lib/" class="k_menu"><img width="16" height="16" src="'.$HOME.'/images/lib.png" alt="*" title="Библиотека" /> Библиотека <div class="count">('.mysql_result(mysql_query("SELECT COUNT(id) FROM `lib_stat`"),0).')</div></div></a>
<div class="menudiv"><a href="'.$HOME.'/blog/" class="k_menu"><img width="16" height="16" src="'.$HOME.'/images/lib.png" alt="*" title="Блоги" /> Блоги <div class="count">('.mysql_result(mysql_query("SELECT COUNT(id) FROM `blog_stat`"),0).')</div></div></a>
<div class="menudiv"><a href="'.$HOME.'/guest" class="k_menu"><img width="16" height="16" src="'.$HOME.'/images/lib.png" alt="Чат" title="Общий чат" /> Общий чат <div class="count">('.mysql_result(mysql_query("SELECT COUNT(id) FROM `guest`"),0).')</div></div></a>';
//-----Подключаем низ-----//
require_once ('system/footer.php');
?>