Файл: index.php
Строк: 105
<?php
$title = 'Мы платим за ваши посты и темы. ';
require_once ('system/function.php');
require_once ('system/header.php');
## Выводим новости
$count_news = mysql_result(mysql_query('select count(`id`) from `news`'),0);
if(!empty($user['news']) != $count_news)
{
echo '<div class="menu">';
echo '<a href="'.$HOME.'/news/">Новости</a> ('.$count_news.')';
echo '</div>';
echo '<div class="news">';
$sql = mysql_query("SELECT * FROM `news` ORDER BY `id` DESC LIMIT 1");
while($sql1 = mysql_fetch_assoc($sql))
{
echo '<div class="new">';
echo ''.nl2br(smile(bb($sql1['text']))).'<br />
Добавил: '.nick($sql1['avtor']).'<br />
<a href="/news/comment'.$sql1['id'].'">Комментарии:</a> ('.mysql_result(mysql_query('select count(`id`) from `news_com` where `news` = "'.$sql1['id'].'"'),0).')';
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>';
## Выводим правила
$count_rul = mysql_result(mysql_query('select count(`id`) from `rul`'),0);
echo '<div class="menudiv"><a href="'.$HOME.'/rulles" class="k_menu"><img src="/images/ank/del_i.png" alt="RULLES" title="RULLES" / height="20"> Правила портала ('.$count_rul.') </a></div>';
echo '<div class="menudiv"><a href="'.$HOME.'/ruletka.php" class="k_menu"><img src="/images/ank/del_i.png" alt="Рулетка" title="Рулетка" / height="20"> Игра рулетка </a></div>';
##Выводим форум
$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/"> Форум OkMob.Ru</a> ('.$t_f.' / '.$p_f.')(<font color="red"><b>+'.$ntf.'</b></font> / <font color="#61b565"><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');
}
##последние темы форума
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');
}
##Выводим меню сайта
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.'/guest" class="k_menu"><img src="/images/gostt.png" alt="Гостевая" title="Гостевая" / height="20"> Гостевая ('.mysql_result(mysql_query("SELECT COUNT(id) FROM `guest`"),0).')</a></div>
<div class="menudiv"><a href="'.$HOME.'/chat/" class="k_menu"><img src="/images/chats.png" alt="*" title="Чат" / height="20"> Чат ('.mysql_result(mysql_query("SELECT COUNT(id) FROM `chat_post`"),0).')</div></a>
<div class="menudiv"><a href="'.$HOME.'/user/doska.php/" class="k_menu"><img src="/images/doska.png" alt="*" title="Доска Позора" / height="20"> Доска Позора ('.mysql_result(mysql_query("SELECT COUNT(*) FROM `ked_list`"),0).')</a></div>
<div class="menudiv"><a href="'.$HOME.'/administration.php" class="k_menu"><img src="/images/admins.png" alt="Администрация" title="Администрация" / height="20"> Администрация
('.mysql_result(mysql_query("SELECT COUNT(*) FROM `users` where `level` >= '1'"),0).')</a></div>
<div class="menudiv"><a href="'.$HOME.'/user.php" class="k_menu"><img src="/images/users.png" alt="Пользователи" title="Пользователи" / height="20"> Пользователи ('.mysql_result(mysql_query("SELECT COUNT(*) FROM `users`"),0).')</a></div>
';
##Подключаем низ
require_once ('system/footer.php');
?>