Файл: index.php
Строк: 113
<?php
/*
#Бесплатный WAP движок StrongCMS
#Официальный сайт поддержки: http://strongcms.ru
*/
# Заголовок>Функции>Шапка
$title = 'Главная';
require_once ('system/function.php');
require_once ('system/header.php');
if($user['level'] >= 1)
{
$t_f1 = mysql_result(mysql_query('select count(`id`) from `admforum_tema`'),0);
$p_f1 = mysql_result(mysql_query('select count(`id`) from `admforum_post`'),0);
$ntf1 = mysql_result(mysql_query('select count(`id`) from `admforum_tema` where `time` > "'.(time()-((60*60)*24)).'"'),0);
$npf1 = mysql_result(mysql_query('select count(`id`) from `admforum_post` where `time` > "'.(time()-((60*60)*24)).'"'),0);
echo '<div class="menu">';
echo '<a href="'.$HOME.'/admforum/"> Админ Форум ('.$t_f1.'/'.$p_f1.')(<font color="red"><b>+'.$ntf1.'</b></font> / <font color="green"><b>+'.$npf1.'</b></font>)</a>';
echo '</div>';
##последние темы форума
if (!isset($user['id'])){
require_once ('system/admforum.php');
}else{
if ($user['new_tem']== 0)
require_once ('system/admforum.php');
}
}
##Выводим форум
$t_f = mysql_result(mysql_query('select count(`id`) from `forum_tema`'),0);
$p_f = mysql_result(mysql_query('select count(`id`) from `forum_post`'),0);
$ntf = mysql_result(mysql_query('select count(`id`) from `forum_tema` where `time` > "'.(time()-((60*60)*24)).'"'),0);
$npf = mysql_result(mysql_query('select count(`id`) from `forum_post` where `time` > "'.(time()-((60*60)*24)).'"'),0);
echo '<div class="menu">';
echo '<a href="'.$HOME.'/forum/"> Форум</a> ('.$t_f.'/'.$p_f.')(<font color="red"><b>+'.$ntf.'</b></font> / <font color="green"><b>+'.$npf.'</b></font>)';
echo '</div>';
##последние темы форума
if (!isset($user['id'])){
require_once ('system/new_tem.php');
}else{
if ($user['new_tem']== 0)
require_once ('system/new_tem.php');
}
##Выводим файлы
$df = mysql_result(mysql_query("SELECT COUNT(id) FROM `load_file`"),0);
$ndf = mysql_result(mysql_query('select count(`id`) FROM `load_file` WHERE `time` > "'.(time()-((60*60)*24)).'"'),0);
echo '<div class="menu">';
echo '<a href="'.$HOME.'/down/"> Загрузки ('.$df.' <span style="color: #61b565"><b>+ '.$ndf.'</b></span></a>)';
echo '</div>';
##последние файлы
if (!isset($user['id'])){
require_once ('system/new_files.php');
}else{
if ($user['new_files']== 0)
require_once ('system/new_files.php');
}
$df1 = mysql_result(mysql_query("SELECT COUNT(id) FROM `cod_stat`"),0);
$ndf1 = mysql_result(mysql_query('select count(`id`) FROM `cod_stat` WHERE `time` > "'.(time()-((60*60)*24)).'"'),0);
echo '<div class="menu">';
echo '<a href="'.$HOME.'/cod/"> Полезные коды ('.$df1.' <span style="color: #61b565"><b>+ '.$ndf1.'</b></span></a>)';
echo '</div>';
##последние коды
if (!isset($user['id'])){
require_once ('system/new_cod.php');
}else{
if ($user['new_files']== 0)
require_once ('system/new_cod.php');
}
$time=time()-864000;
$con=mysql_num_rows(mysql_query("SELECT * FROM `shop_goods`"));
$cnm=mysql_num_rows(mysql_query("SELECT * FROM `shop_goods` WHERE `time`>".$time.""));
echo '<div class="menu"><a href="/m">Магазин</a> ('.$con.' <font color="red">+ '.$cnm.'</font>)</div>';
require_once ('m/new_goods.php');
##Выводим меню сайта
echo '<div class="menu">Меню сайта:</div>';
$nf = mysql_result(mysql_query('select count(`id`) from `photo_files` where `time` > "'.(time()-((60*60)*24)).'"'),0);
echo '
<div class="menudiv"><a href="'.$HOME.'/news" class="k_menu"><img src="/design/icons/45.png" alt="*"> Новости сайта ('.mysql_result(mysql_query("SELECT COUNT(id) FROM `news`"),0).')</div></a>
<div class="menudiv"><a href="'.$HOME.'/guest" class="k_menu"><img src="/design/icons/45.png" alt="*"> Гостевая ('.mysql_result(mysql_query("SELECT COUNT(id) FROM `guest`"),0).')</div></a>
<div class="menudiv"><a href="'.$HOME.'/birga/" class="k_menu"><img src="/design/icons/45.png" alt="*"> Биржа труда ('.mysql_result(mysql_query("SELECT COUNT(id) FROM `birga`"),0).')</div></a>
<div class="menudiv"><a href="'.$HOME.'/user/doska.php" class="k_menu"><img src="/design/icons/45.png" alt="*"> Доска позора ('.mysql_result(mysql_query("SELECT COUNT(id) FROM `ked_list`"),0).')</div></a>
<div class="menudiv"><a href="'.$HOME.'/user/pochet.php" class="k_menu"><img src="/design/icons/45.png" alt="*"> Доска почетных ('.mysql_result(mysql_query("SELECT COUNT(id) FROM `pochet`"),0).')</div></a>
<div class="menudiv"><a href="'.$HOME.'/static/" class="k_menu"><img src="/design/icons/45.png" alt="*"> Статистика </a></div>';
##Подключаем низ
require_once ('system/footer.php');
?>