View file shcms/index.php

File size: 3.54Kb
<?
/*
=============================================
Движок: SHCMS Engine
=============================================
Название файла: Главная страница
=============================================
Official website: http://shcms.ru
=============================================
*/
$new_news1 = mysql_query("SELECT * FROM `uncos` ORDER BY `id` DESC LIMIT 1");
$new_news = mysql_fetch_array($new_news1);

$system_un= mysql_result(mysql_query("SELECT COUNT(*) FROM `uncos` WHERE `time` > '".(time()-86400)."'"), 0);

if($system_un)
{
$mysql_count = mysql_result(mysql_query("SELECT COUNT(*) FROM uncos_comment WHERE id_uncos=".$new_news['id'].""),0);
if($new_news == null)
{}
else
{
echo '<div class="upper">'.$new_news['title'].'</div>';
echo '<div class="lower">'.$new_news['text'].'<span style="float:right;"><a href="'.DIR_SHCMS.'change_view.php?id='.$new_news['user'].'">'.$new_news['author'].'</a></span> <hr/> <a href="/uncos/comments.php?id='.$new_news['id'].'">Комментарии</a> ('.$mysql_count.')</div>';
}
}
$system_forum_them = mysql_result(mysql_query("SELECT COUNT(*) FROM forum_them"),0);//Темы в форуме
$system_forum_mess = mysql_result(mysql_query("SELECT COUNT(*) FROM forum_mess"),0);//Сообщений в форуме
$system_obmen = mysql_result(mysql_query("SELECT COUNT(*) FROM download_file"),0);//Файлов на обменнике
$system1=mysql_result(mysql_query("SELECT COUNT(*) FROM `uncos`"), 0);
$system_un_new= mysql_result(mysql_query("SELECT COUNT(*) FROM `uncos` WHERE `time` > '".(time()-86400)."'"), 0);
if ($system_un_new==0)$system_un_new=0; else $system_un_new='+'.$system_un_new;$system = "$system1 / $system_un_new";
$system_chat1=mysql_result(mysql_query("SELECT COUNT(*) FROM `shouts`"), 0);
$system_chat_new= mysql_result(mysql_query("SELECT COUNT(*) FROM `shouts` WHERE `time` > '".(time()-86400)."'"), 0);
if ($system_chat_new==0)$system_chat_new=0; else $system_chat_new='+'.$system_chat_new;$system_chat = "$system_chat1 / $system_chat_new";

include_once '../system/inc/basic_settings.php';
if($brodilka=="wap")
{
echo '<div class="user_foot">Главная</div>';
echo '<div class="posts"><img src="template/icon/news.png"/> <a href="/uncos/"> Новости</a> ('.$system.')</div>';
echo '<div class="user_foot">Общение</div>';
echo '<div class="posts"><img src="template/icon/chat.png"/> <a href="/shouts/"> Мини-чат</a> ('.$system_chat.')</div>';
echo "<div class='posts'><img src='template/icon/forum.png'/>  <a href='/forum/'> Форум</a> (".$system_forum_them."/". $system_forum_mess.") </div>";
echo '<div class="user_foot">Другое</div>';
echo '<div class="posts"><img src="template/icon/obmen.png"/> <a href="/download/">Загрузки</a> ('.$system_obmen.')</div>';
}
elseif($brodilka == "web")
{
//echo '<div class="user_foot">Главная</div>';
echo '<div class="posts_gl"><img src="template/icon/news.png"/> <a href="/uncos/"> Новости</a> ('.$system.')</div>';
//echo '<div class="user_foot">Общение</div>';
echo '<div class="posts_gl"><img src="template/icon/chat.png"/> <a href="/shouts/"> Мини-чат</a> ('.$system_chat.')</div>';
echo "<div class='posts_gl'><img src='template/icon/forum.png'/>  <a href='/forum/'> Форум</a> (<a href='/forum/new.themes.php'>$system_forum_them</a>/ <a href='/forum/new.posts.php'>$system_forum_mess</a>) </div>";
//echo '<div class="user_foot">Другое</div>';
echo '<div class="posts_gl"><img src="template/icon/obmen.png"/> <a href="/download/">Загрузки</a> ('.$system_obmen.')</div>';
}




?>