Файл: index.php
Строк: 291
<?
include_once 'sys/inc/start.php';
include_once 'sys/inc/compress.php';
include_once 'sys/inc/sess.php';
include_once 'sys/inc/home.php';
include_once 'sys/inc/settings.php';
include_once 'sys/inc/db_connect.php';
include_once 'sys/inc/ipua.php';
include_once 'sys/inc/fnc.php';
include_once 'sys/inc/user.php';
include_once 'sys/inc/icons.php';//Иконки главного меню
include_once 'sys/inc/thead.php';
title();
err();
if (!$set['web']){
echo '<a class="razd" href="/user/liders/">Лидеры Lafes <span style="float:right;"><img src="/style/icons/vse.png"></span></a>';
$k_lider = mysql_result(mysql_query("SELECT COUNT(*) FROM `liders` WHERE `time` > '$time'"),0);
$liderSql = mysql_query("SELECT * FROM `liders` WHERE `time` > '$time' ORDER BY rand() LIMIT 5");
echo '<div style="margin-bottom:5px;background: #fdfdfd;" class="mess">';
if ($k_lider > 0) {
while ($liders = mysql_fetch_array($liderSql)) {
$lider = get_user($liders['id_user']);
echo '<a href="/id'.$lider['id'].'">'. avatar($lider['id']). '</a>';
}
}
echo '</div>';
//Главное меню
$n_n = mysql_result(mysql_query("SELECT COUNT(*) FROM `news` WHERE `time` > '" . $ftime . "'",$db), 0);
if ($n_n == 0)$n_n = NULL;
else $n_n = '+' . $n_n;
echo '<a class="link" href="/news/"><span class="ico"><i class="fas fa-rss"></i></span> Новости <font color="red">' . $n_n . '</font> <span class="c">'; include 'news/count.php'; echo '</span></a>';
//Вывод последней новости
include_once 'sys/inc/news_main.php';
$k_n = mysql_result(mysql_query("SELECT COUNT(*) FROM `mini_chat` WHERE `time` > '" . $ftime . "'",$db), 0);
if ($k_n == 0)$k_n = NULL;
else $k_n = '+' . $k_n;
echo '<a class="link" href="/mini_chat/"><span class="ico"><i class="fas fa-comment-alt"></i></span> Мини чат <font color="red">' . $k_n . '</font> <span class="c">'; include 'mini_chat/count.php'; echo '</span></a>';
//Вывод последнего сообщения из чата
if (isset($_GET['on_mini_chat']))
$_SESSION['mini_chat'] = null;
if (isset($user) && mysql_result(mysql_query("SELECT COUNT(*) FROM `mini_chat`"), 0) > 0 && $_SERVER['PHP_SELF'] != '/mini_chat/index.php' && !isset($_SESSION['mini_chat']))
{
if (isset($_GET['mini_chat']))
{
$_SESSION['mini_chat'] = true;
header('Location: /index2.php');
exit;
}
$s_post = mysql_fetch_assoc(mysql_query("SELECT * FROM `mini_chat` WHERE time ORDER by id DESC limit 1"));
echo '<div class="mess">';
echo '<div style="margin-left: 20px; margin-bottom: 0; height: 0; width: 0; border-color: transparent transparent #cddae7; border-style: solid; border-width: 0 0 10px 10px;"></div>';
echo '<table style="color: #577582; background-color: #cddae7; -o-border-radius: 3px; border-radius: 3px; -moz-border-radius: 3px; margin: 0 3px 3px; padding: 9px;">';
echo '<td width="3%" style="vertical-align: top;">';
if (isset($user) && $user['id']!=$s_post['id_user'] && $s_post['id_user']!=5)
echo '<a href="/mini_chat/?response=' . $s_post['id_user'] . '">';
echo ''. avatar($s_post['id_user']) .'</a></td><td>'. group($s_post['id_user']) . user::nick($s_post['id_user']) .medal($s_post['id_user']) .online($s_post['id_user']);
echo '<span style="float: right; font-size: .7em;">' . vremja($s_post['time']) . '</span><br>';
echo output_text($s_post['msg']);
echo '</td></table>';
echo '</div>';
}
else if (isset($user) && mysql_result(mysql_query("SELECT COUNT(*) FROM `mini_chat`"), 0) > 0 && $_SERVER['PHP_SELF'] != '/mini_chat/index.php' )
{
}
if (isset($_GET['on_mini_chat']))
$_SESSION['mini_chat'] = null;
if (!isset($user) && mysql_result(mysql_query("SELECT COUNT(*) FROM `mini_chat`"), 0) > 0 && $_SERVER['PHP_SELF'] != '/mini_chat/index.php' && !isset($_SESSION['mini_chat']))
{
if (isset($_GET['mini_chat']))
{
$_SESSION['mini_chat'] = true;
header('Location: /index2.php');
exit;
}
$s_post = mysql_fetch_assoc(mysql_query("SELECT * FROM `mini_chat` WHERE time ORDER by id DESC limit 1"));
echo '<div class="mess">';
echo '<div style="margin-left: 20px; margin-bottom: 0; height: 0; width: 0; border-color: transparent transparent #cddae7; border-style: solid; border-width: 0 0 10px 10px;"></div>';
echo '<table style="color: #577582; background-color: #cddae7; -o-border-radius: 3px; border-radius: 3px; -moz-border-radius: 3px; margin: 0 3px 3px; padding: 9px;">';
echo '<td width="3%" style="vertical-align: top;">';
if (isset($user) && $user['id']!=$s_post['id_user'] && $s_post['id_user']!=5)
echo '<a href="/mini_chat/?response=' . $s_post['id_user'] . '">';
echo ''. avatar($s_post['id_user']) .'</a></td><td>'. group($s_post['id_user']) . user::nick($s_post['id_user']) .medal($s_post['id_user']) .online($s_post['id_user']);
echo '<span style="float: right; font-size: .7em;">' . vremja($s_post['time']) . '</span><br>';
echo output_text($s_post['msg']);
echo '</td></table>';
echo '</div>';
}
else if (isset($user) && mysql_result(mysql_query("SELECT COUNT(*) FROM `mini_chat`"), 0) > 0 && $_SERVER['PHP_SELF'] != '/mini_chat/index.php' )
{
}
//Конец вывода
$f_t = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_t` WHERE `time` > '" . $ftime . "'",$db), 0);
if ($f_t == 0)$f_t = NULL;
else $f_t = '+' . $f_t;
//
$f_p = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_p` WHERE `time` > '" . $ftime . "'",$db), 0);
if ($f_p == 0)$f_p = NULL;
else $f_p = '+' . $f_p;
echo '<a class="link" href="/forum"><span class="ico"><i class="fab fa-hotjar"></i></span> Форум <font color="red">' . $f_t . ' ' . $f_p . '</font> <span class="c">'; include 'forum/count.php'; echo '</span></a>';
$f_n = mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery_foto` WHERE `time` > '" . $ftime . "'",$db), 0);
if ($f_n == 0)$f_n = NULL;
else $f_n = '+' . $f_n;
echo '<a class="link" href="/foto/"><span class="ico"><i class="fas fa-camera"></i></span> Альбомы <font color="red">' . $f_n . '</font> <span class="c">'; include 'foto/count.php'; echo '</span></a>';
$b_n = mysql_result(mysql_query("SELECT COUNT(*) FROM `notes` WHERE `time` > '" . $ftime . "'",$db), 0);
if ($b_n == 0)$b_n = NULL;
else $b_n = '+' . $b_n;
echo '<a class="link" href="/plugins/notes/"><span class="ico"><i class="fas fa-address-book"></i></span> Блоги <font color="red">' . $b_n . '</font> <span class="c">'; include 'plugins/notes/count.php'; echo '</span></a>';
$o_n = mysql_result(mysql_query("SELECT COUNT(*) FROM `obmennik_files` WHERE `time` > '" . $ftime . "'",$db), 0);
if ($o_n == 0)$o_n = NULL;
else $o_n = '+' . $o_n;
echo '<a class="link" href="/obmen/"><span class="ico"><i class="fas fa-folder-open"></i></span> Обменик <font color="red">' . $o_n . '</font> '; echo '<span class="c">'; include 'obmen/count.php'; echo '</span></a>';
echo '<a class="link" href="/mp3/"><span class="ico"><i class="fas fa-music"></i></span> Музыка</a>';
echo '<a class="link" href="/games/"><span class="ico"><i class="fas fa-gamepad"></i></span> Мини игры <span class="c">2</span></a>';
$us_new = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` where `date_reg` > '$ftime' ",$db), 0);
if ($us_new > 0) $us_new = '+' . $us_new . ''; else $us_new = null;
echo '<a class="link" href="/people.php"><span class="ico"><i class="fas fa-users"></i></span> Обитатели <font color="red">' . $us_new . '</font> <span class="c">'; include 'user/count.php'; echo '</span></a>';
echo '<a class="link" href="/user/love/"><span class="ico"><i class="fas fa-heart"></i></span> Знакомства <span class="c">'; include 'user/love/count.php'; echo '</span></a>';
echo '<a class="link" href="/info/"><span class="ico"><i class="fas fa-info-circle"></i></span> Информация</a>';
/*
echo '<a style="margin-top:5px;" class="razd" href="/forum/">Активные обсуждения <span style="float:right;"><img src="/style/icons/vse.png"></span></a>';
include_once 'sys/inc/forum_new.php';
echo '<a style="margin-top:5px;" class="razd" href="/plugins/notes/">Новые блоги <span style="float:right;"><img src="/style/icons/vse.png"></span></a>';
include_once 'sys/inc/main_notes.php';
*/
include 'dng.php';
}
else
{
// главная web темы
include_once 'style/themes/' . $set['set_them'] . '/index.php';
}
include_once 'sys/inc/tfoot.php';