|
<?php
/*
---------------------------------------—
Author - EnSX and AciS
Бесплатный WAP движок: Strongcms
Контакты:
Офф.сайт StrongCMS.Ru
EnSX - https://vk.com/id172519423
AciS - https://vk.com/by_acis
Файл: index.php
-------------------------------------------
*/
//-----Создаем титл страницы-----//
$title = 'Всё для Wap/Web мастера!';
//-----Подключаем функции-----//
require_once ('system/function.php');
//-----Подключаем вверх-----//
require_once ('system/header.php');
//-----Выводим логотип----//
//-----Выводим новости-----//
$count_news = mysql_result(mysql_query('select count(`id`) from `news`'),0);
if($user['news']!=$count_news)
{
echo '<div class="menu">
<a href="'.$HOME.'/news/">Новости</a> ('.$count_news.')
</div><div class="news">';
$sql = mysql_query("SELECT * FROM `news` ORDER BY `id` DESC LIMIT 1");
while($sql1 = mysql_fetch_assoc($sql))
{
echo ''.smile(bb($sql1['text'])).'
Добавил: '.nick($sql1['avtor']).'
<a href="/news/comment'.$sql1['id'].'">Комментарии:</a> ('.mysql_result(mysql_query('select count(`id`) from `news_com` where `news` = "'.$sql1['id'].'"'),0).')';
if($user['id']) {
echo '
<a href="?news='.$sql1['id'].'">Скрыть новость</a>';}
if(isset($_GET['news']))
{
$news= trim(intval($_GET['news']));
mysql_query("UPDATE `users` SET `news` = '".$news."' WHERE `id` = '".$user['id']."'");
header('Location: '.$HOME.'');
}
}
}else{
echo '<div class="menu">
<a href="'.$HOME.'/news/">Новости</a> ('.$count_news.')</div>';}
echo '</div></div>';
//-----Выводим меню сайта-----//
echo '<div class="menu">Меню сайта:</div>';
echo '<div class="menudiv"><a href="'.$HOME.'/guest" class="k_menu"><img src="/images/gostt.png" alt="Гостевая" title="Гостевая" /> Гостевая ('.mysql_result(mysql_query("SELECT COUNT(id) FROM `guest`"),0).')</div></a>
<div class="menudiv"><a href="'.$HOME.'/chat/" class="k_menu"><img src="/images/chats.png" alt="*" title="Чат" /> Чат ('.mysql_result(mysql_query("SELECT COUNT(id) FROM `chat_post`"),0).')</div></a>
<div class="menudiv"><a href="'.$HOME.'/blog/" class="k_menu"><img src="/images/blogs.png" alt="*" title="Блоги" /> Блоги ('.mysql_result(mysql_query("SELECT COUNT(id) FROM `blog_stat`"),0).')</div></a>
<div class="menudiv"><a href="'.$HOME.'/user.php" class="k_menu"><img src="/images/users.png" alt="Пользователи" title="Пользователи" /> Пользователи ('.mysql_result(mysql_query("SELECT COUNT(*) FROM `users`"),0).')</a></div>';
//-----Выводим форум-----//
$t_f = mysql_result(mysql_query('select count(`id`) from `forum_tema`'),0);
echo '<div class="menu"><a href="'.$HOME.'/forum/"> Форум</a> ('.$t_f.' / '.mysql_result(mysql_query('select count(`id`) from `forum_post`'),0).')(<font color="red"><b>+'.mysql_result(mysql_query('select count(`id`) from `forum_tema` where `time` > "'.(time()-((60*60)*24)).'"'),0).'</b></font> / <font color="green"><b>+'.mysql_result(mysql_query('select count(`id`) from `forum_post` where `time` > "'.(time()-((60*60)*24)).'"'),0).'</b></font>)</div>';
//последние темы форума
require_once ('system/new_tem.php');
//выводим файлы
echo '<div class="title">';
echo '<a href="'.$HOME.'/down/"> Загрузки ('.mysql_result(mysql_query("SELECT COUNT(id) FROM `load_file`"),0).' <span style="color: #61b565"><b>+ '.mysql_result(mysql_query('select count(`id`) FROM `load_file` WHERE `time` > "'.(time()-((60*60)*24)).'"'),0).' </b></span></a>)';
echo '</div>';
$file = mysql_result(mysql_query('select count(`id`) from `load_file`'),0);
if($file >= 1)
{
$file_t = mysql_query("SELECT * FROM `load_file` ORDER BY `time` DESC LIMIT 3");
while($load = mysql_fetch_assoc($file_t))
{
echo '<div class="menudiv">';
echo '<a class="k_menu" href="'.$HOME.'/down/file'.$load['id'].'"><img src="'.$HOME.'/images/load/'.$load['format'].'.png" alt="*" /> '.$load['name'].' </a>';
echo '</div>';
}
}
else{
echo '<div class="podmenu"><center><b>Нет файлов</b></center></div>';
}
//-----Подключаем низ-----//
require_once ('system/footer.php');
?>