Файл: modules/users/index.php
Строк: 710
<?php
/* DCMS Special
* Дата последнего редактирования 14.12.2015
* Модифицировал densnet
*/
foreach (array('start', 'compress', 'sess', 'settings', 'db_connect', 'ipua', 'fnc', 'user') as $inc) {
require_once H . "sys/inc/{$inc}.php";
}
$set['title'] = 'Сейчас на сайте';
require_once H . 'sys/inc/thead.php';
$sort = 'id';
$por = 'DESC';
if (isset($_GET['ASC'])) {
$por = 'ASC';
} #прямой порядок
if (isset($_GET['DESC'])) {
$por = 'DESC';
} #обратный порядок
$act_money = null;
$act_activity = null;
$act_rating = null;
$act_sex = null;
$act_id = null;
switch (@$_GET['sort']) {
case 'money':
$sql_sort = '`user`.`money`';
$sort = 'money'; #монеты
$act_money = ' active';
break;
case 'activity':
$sql_sort = '`user`.`activity`';
$sort = 'activity'; #активность
$act_activity = ' active';
break;
case 'rating':
$sql_sort = '`user`.`rating`';
$sort = 'rating'; #рейтинг
$act_rating = ' active';
break;
case 'sex':
$sql_sort = '`user`.`sex`';
$sort = 'sex'; #пол
$act_sex = ' active';
break;
case 'id':
$sql_sort = '`user`.`id`';
$sort = 'id'; #пол
$act_id = ' active';
break;
default:
$sql_sort = '`user`.`id`';
$sort = 'id'; #ID
$act_id = ' active';
break;
}
$act = (isset($_GET['act'])) ? htmlspecialchars($_GET['act']) : null;
switch ($act) {
default:
#Навигация
echo "<ol class='breadcrumb'>";
echo "<li><a href='/'><span class='fa fa-home fa-fw'></span></a></li>";
echo "<li class='active'>Пользователи</li>";
echo "</ol>";
?>
<div class="list-group-item">
<ul class="nav nav-tabs" style="margin-bottom: -8px;">
<li class="nav-item">
<a class="nav-link active">Все</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=online">Онлайн</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=guest">Гости</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=todey">Сегодня</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=other">Прочее</a>
</li>
</ul>
</div>
<?php
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `user`"), 0);
$k_page = k_page($k_post, $set['p_str']);
$page = page($k_page);
$start = $set['p_str'] * $page - $set['p_str'];
echo "<div class='list-group-item'>";
echo "<ul class='nav nav-pills'>";
echo "<li class='nav-item'><a class='nav-link $act_id' href='/?users&sort=id&DESC&page=$page'>ID</a></li>";
echo "<li class='nav-item'><a class='nav-link $act_money' href='/?users&sort=money&DESC&page=$page'>Монеты</a></li>";
echo "<li class='nav-item'><a class='nav-link $act_activity' href='/?users&sort=activity&DESC&page=$page'>Активность</a></li>";
echo "<li class='nav-item'><a class='nav-link $act_rating' href='/?users&sort=rating&DESC&page=$page'>Репутация</a></li>";
echo "<li class='nav-item'><a class='nav-link $act_sex' href='/?users&sort=sex&DESC&page=$page'>Пол</a></li>";
echo "</ul></div>";
if ($k_post == 0) {
echo "<div class='list-group-item'>";
echo "<span class='fa fa-info-circle fa-fw'></span> Нет результатов";
echo "</div>";
}
$q = mysql_query("SELECT `user`.`id` FROM `user` LEFT JOIN `user_group` ON `user`.`group_access` = `user_group`.`id` ORDER BY $sql_sort $por LIMIT $start, $set[p_str]");
while ($ank = mysql_fetch_assoc($q)) {
$ank = get_user($ank['id']);
echo "<table class='list-group-item'><tr><td class='icon14'>";
avatar($ank['id'], '48', 'border-radius: 2px;');
echo "</td><td class='null'>";
if (isset($user) && $user['id'] != $ank['id']) {
echo "<span style='float:right;' id='hides'>";
echo "<a class='nav-link' href='/user/mail/messageList.php?contact=$ank[id]' title='Отправить сообщение' data-toggle='tooltip' data-placement='left'><span class='fa fa-envelope fa-lg'></span></a> ";
echo "</span>";
} else {
if (isset($user)) {
echo "<span style='float:right;'>Это Вы</span>";
}
}
user($ank['id']);
echo "<br />";
if ($sort == 'rating') {
echo "Рейтинг: $ank[rating]<br />";
}
if ($sort == 'level') {
if ($ank['group_access'] > 1) {
echo "$ank[group_name]<br />";
}
} else {
}
if ($sort == 'money') {
echo "Монеты: $ank[money]<br />";
}
if ($sort == 'activity') {
echo "Активность: $ank[activity]<br />";
}
if ($sort == 'sex') {
echo "Пол: " . (($ank['sex'] == 1) ? 'Мужской' : 'Женский') . "<br />";
}
if ($sort == 'id') {
echo "ID: $ank[id]<br />";
}
echo "</td></tr></table>";
}
#Вывод страниц
if ($k_page > 1) {
echo "<div class='list-group-item'>";
str("/?users&sort=$sort&$por&", $k_page, $page);
echo "</div>";
}
break;
case 'online':
#Навигация
echo "<ol class='breadcrumb'>";
echo "<li><a href='/'><span class='fa fa-home fa-fw'></span></a></li>";
echo "<li class='active'>Онлайн пользователи</li>";
echo "</ol>";
?>
<div class="list-group-item">
<ul class="nav nav-tabs" style="margin-bottom: -8px;">
<li class="nav-item">
<a class="nav-link" href="/?users">Все</a>
</li>
<li class="nav-item">
<a class="nav-link active">Онлайн</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=guest">Гости</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=todey">Сегодня</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=other">Прочее</a>
</li>
</ul>
</div>
<?php
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `date_last` > '" . (time() - 600) . "'"), 0);
$k_page = k_page($k_post, $set['p_str']);
$page = page($k_page);
$start = $set['p_str'] * $page - $set['p_str'];
echo "<div class='list-group-item'>";
echo "<ul class='nav nav-pills'>";
echo "<li class='nav-item'><a class='nav-link $act_id' href='/?users&act=online&sort=id&DESC&page=$page'>ID</a></li>";
echo "<li class='nav-item'><a class='nav-link $act_money' href='/?users&act=online&sort=money&DESC&page=$page'>Монеты</a></li>";
echo "<li class='nav-item'><a class='nav-link $act_activity' href='/?users&act=online&sort=activity&DESC&page=$page'>Активность</a></li>";
echo "<li class='nav-item'><a class='nav-link $act_rating' href='/?users&act=online&sort=rating&DESC&page=$page'>Репутация</a></li>";
echo "<li class='nav-item'><a class='nav-link $act_sex' href='/?users&act=online&sort=sex&DESC&page=$page'>Пол</a></li>";
echo "</ul></div>";
$q = mysql_query("SELECT `id` FROM `user` WHERE `date_last` > '" . (time() - 600) . "' ORDER BY $sql_sort $por LIMIT $start, $set[p_str]");
if ($k_post == 0) {
echo "<div class='list-group-item'>";
echo "<span class='fa fa-info-circle fa-fw'></span> Нет результатов";
echo "</div>";
}
while ($ank = mysql_fetch_assoc($q)) {
$ank = get_user($ank['id']);
echo "<table class='list-group-item'><tr><td class='icon14'>";
avatar($ank['id'], '48', 'border-radius: 2px;');
echo "</td><td class='null'>";
if (isset($user) && $user['id'] != $ank['id']) {
echo "<span style='float:right;' id='hides'>";
echo "<a class='nav-link' href='/user/mail/messageList.php?contact=$ank[id]' title='Отправить сообщение' data-toggle='tooltip' data-placement='left'><span class='fa fa-envelope fa-lg'></span></a> ";
echo "</span>";
} else {
echo "<span style = 'float:right' id = 'hides'>Это Вы</span>";
}
user($ank['id']);
echo "<br />";
if ($sort == 'rating') {
echo "Рейтинг: $ank[rating]<br />";
}
if ($sort == 'money') {
echo "Монеты: $ank[money]<br />";
}
if ($sort == 'activity') {
if ($ank['activity'] != NULL) {
echo "Активность: $ank[activity]<br />";
} else {
echo "Активность: 0<br />";
}
}
if ($sort == 'level') {
if ($ank['group_access'] > 1) {
echo "$ank[group_name]<br />";
} else {
echo "Пользователь<br />";
}
}
if ($sort == 'sex') {
echo "Пол: " . (($ank['sex'] == 1) ? 'Мужской' : 'Женский') . "<br />";
}
if ($sort == 'id') {
echo "ID: $ank[id]<br />";
}
echo "</td></tr></table>";
}
#Вывод страниц
if ($k_page > 1) {
echo "<div class='list-group-item'>";
str("/?users&sort=$sort&$por&", $k_page, $page);
echo "</div>";
}
break;
case 'guest':
#Навигация
echo "<ol class='breadcrumb'>";
echo "<li><a href='/'><span class='fa fa-home fa-fw'></span></a></li>";
echo "<li class='active'>Гости на сайте</li>";
echo "</ol>";
?>
<div class="list-group-item">
<ul class="nav nav-tabs" style="margin-bottom: -8px;">
<li class="nav-item">
<a class="nav-link" href="/?users">Все</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=online">Онлайн</a>
</li>
<li class="nav-item">
<a class="nav-link active">Гости</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=todey">Сегодня</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=other">Прочее</a>
</li>
</ul>
</div>
<?php
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `guests` WHERE `date_last` > '" . (time() - 600) . "' AND `pereh` > '0'"), 0);
$k_page = k_page($k_post, $set['p_str']);
$page = page($k_page);
$start = $set['p_str'] * $page - $set['p_str'];
$q = mysql_query("SELECT * FROM `guests` WHERE `date_last` > '" . (time() - 600) . "' AND `pereh` > '0' ORDER BY `date_aut` DESC LIMIT $start, $set[p_str]");
if ($k_post == 0) {
echo "<div class='list-group-item'>";
echo "<span class='fa fa-info-circle fa-fw'></span> Нет результатов";
echo "</div>";
}
while ($guest = mysql_fetch_assoc($q)) {
echo "<div class='list-group-item'>";
echo "Гость<br/>";
echo "Посл. посещение: " . date::times($guest['date_last']) . "<br />";
echo "Переходов: $guest[pereh]<br />";
if ($guest['ua'] != NULL) {
echo "UA: $guest[ua]<br />";
}
if (isset($user) && ($user['level'] > 0)) {
if (access('guest_show_ip') && $guest['ip'] != 0) {
echo "IP: " . long2ip($guest['ip']) . "<br />";
}
if (access('guest_show_ip') && opsos($guest['ip'])) {
echo "Пров: " . opsos($guest['ip']) . "<br />";
}
if (otkuda($guest['url'])) {
echo "URL: <a href = '$guest[url]'>" . otkuda($guest['url']) . "</a><br />";
}
}
echo "</div>";
}
if ($k_page > 1) {
echo "<div class='list-group-item'>";
str("?", $k_page, $page);
echo "</div>";
}
break;
case 'todey':
#Навигация
echo "<ol class='breadcrumb'>";
echo "<li><a href='/'><span class='fa fa-home fa-fw'></span></a></li>";
echo "<li class='active'>Сегодня заходили</li>";
echo "</ol>";
?>
<div class="list-group-item">
<ul class="nav nav-tabs" style="margin-bottom: -8px;">
<li class="nav-item">
<a class="nav-link" href="/?users">Все</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=online">Онлайн</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=guest">Гости</a>
</li>
<li class="nav-item">
<a class="nav-link active">Сегодня</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=other">Прочее</a>
</li>
</ul>
</div>
<?php
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `user`"), 0);
$k_page = k_page($k_post, $set['p_str']);
$page = page($k_page);
$start = $set['p_str'] * $page - $set['p_str'];
if ($k_post == 0) {
echo "<div class='list-group-item'>";
echo "<span class='fa fa-info-circle fa-fw'></span> Нет результатов";
echo "</div>";
}
$q = mysql_query("SELECT `id` FROM `user` WHERE `date_last` > '" . TIME_TODAY . "' ORDER BY $sql_sort $por LIMIT $start, $set[p_str]");
while ($ank = mysql_fetch_assoc($q)) {
$ank = get_user($ank['id']);
echo "<table class='list-group-item'><tr><td class='icon14'>";
avatar($ank['id'], '48', 'border-radius: 2px;');
echo "</td><td class = 'null'>";
if (isset($user) && $user['id'] != $ank['id']) {
echo "<span style='float:right;' id='hides'>";
echo "<a class='nav-link' href='/user/mail/messageList.php?contact=$ank[id]' title='Отправить сообщение' data-toggle='tooltip' data-placement='left'><span class='fa fa-envelope fa-lg'></span></a> ";
echo "</span>";
} else {
if (isset($user)) {
echo "<span style='float:right;'>Это Вы</span>";
}
}
user($ank['id']);
echo "<br />";
if ($sort == 'rating') {
echo "Рейтинг: $ank[rating]<br />";
}
if ($sort == 'level') {
if ($ank['group_access'] > 1) {
echo "$ank[group_name]<br />";
}
} else {
}
if ($sort == 'money') {
echo "Монеты: $ank[money]<br />";
}
if ($sort == 'activity') {
echo "Активность: $ank[activity]<br />";
}
if ($sort == 'sex') {
echo "Пол: " . (($ank['sex'] == 1) ? 'Мужской' : 'Женский') . "<br />";
}
if ($sort == 'id') {
echo "ID: $ank[id]<br />";
}
echo "</td></tr></table>";
}
#Вывод страниц
if ($k_page > 1) {
echo "<div class='list-group-item'>";
str("/?users&sort=$sort&$por&", $k_page, $page);
echo "</div>";
}
break;
case 'other':
#Навигация
echo "<ol class='breadcrumb'>";
echo "<li><a href='/'><i class='fa fa-home fa-fw'></i></a></li>";
echo "<li class='active'>Прочее</li>";
echo "</ol>";
?>
<div class="list-group-item">
<ul class="nav nav-tabs" style="margin-bottom: -8px;">
<li class="nav-item">
<a class="nav-link" href="/?users">Все</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=online">Онлайн</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=guest">Гости</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=todey">Сегодня</a>
</li>
<li class="nav-item">
<a class="nav-link active">Прочее</a>
</li>
</ul>
</div>
<?php
$users = "<span class='label label-info'>" . mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `date_reg` > '" . ($time - 86400) . "'"), 0) . "</span>";
$man = "<span class='label label-info'>" . mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `sex` = '1'"), 0) . "</span>";
$woman = "<span class='label label-info'>" . mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `sex` = '0'"), 0) . "</span>";
$ban = "<span class='label label-info'>" . mysql_result(mysql_query("SELECT COUNT(*) FROM `ban` WHERE `time` > '$time'"), 0) . "</span>";
$admin = "<span class='label label-info'>" . mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `group_access` > '1'"), 0) . "</span>";
$currD = date("d", time());
$currm = date("m", time());
$dr = "<span class='label label-info'>" . mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `ank_d_r` = '$currD' and `ank_m_r` = '$currm'", $db), 0) . "</span>";
echo "<a class='list-group-item' href='/?users'><i class='fa fa-certificate fa-fw'></i> Новые пользователи $users</a>n";
echo "<a class='list-group-item' href='/?users&act=man'><i class='fa fa-mars fa-fw'></i> Парни $man</a>n";
echo "<a class='list-group-item' href='/?users&act=woman'><i class='fa fa-venus fa-fw'></i> Девушки $woman</a>n";
echo "<a class='list-group-item' href='/?users&act=dr'><i class='fa fa-birthday-cake fa-fw'></i> Именинники $dr</a>n";
echo "<a class='list-group-item' href='/?users&act=ban'><i class='fa fa-gavel fa-fw'></i> Нарушители $ban</a>n";
echo "<a class='list-group-item' href='/?users&act=admin'><i class='fa fa-shield fa-fw'></i> Администрация $admin</a>n";
break;
case 'ban':
#Навигация
echo "<ol class='breadcrumb'>";
echo "<li><a href='/'><i class='fa fa-home fa-fw'></i></a></li>";
echo "<li class='active'>Прочее</li>";
echo "</ol>";
?>
<div class="list-group-item">
<ul class="nav nav-tabs" style="margin-bottom: -8px;">
<li class="nav-item">
<a class="nav-link" href="/?users">Все</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=online">Онлайн</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=guest">Гости</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=todey">Сегодня</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="/?users&act=other">Прочее</a>
</li>
</ul>
</div>
<?php
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `ban` WHERE `time` > '$time'"), 0);
$k_page = k_page($k_post, $set['p_str']);
$page = page($k_page);
$start = $set['p_str'] * $page - $set['p_str'];
if ($k_post == 0) {
echo "<div class='list-group-item'>";
echo "<i class='fa fa-info-circle fa-fw'></i> Нет результатов";
echo "</div>";
}
$q = mysql_query("SELECT * FROM `ban` WHERE `time` > '$time' ORDER BY `id` DESC LIMIT $start, $set[p_str]");
while ($ban = mysql_fetch_array($q)) {
$ank = get_user($ban['id_user']);
echo "<table class='list-group-item'><tr><td class='icon14'>";
avatar($ank['id'], '48', 'border-radius: 2px;');
echo "</td><td class = 'null'>";
user($ank['id']);
echo "<br />";
$user_ban = get_user($ban['id_ban']);
echo "<small>Осталось " . date::time($ban['time']) . ":</small><br />n";
echo "<small>" . toOutput($ban['prich']) . "</small>n($user_ban[nick])<br />n";
echo "</td></tr></table>";
}
if ($k_page > 1) {
echo "<div class='list-group-item'>";
str("/?users&act=ban&sort=$sort&$por&", $k_page, $page);
echo "</div>";
}
break;
case 'admin':
#Навигация
echo "<ol class='breadcrumb'>";
echo "<li><a href='/'><i class='fa fa-home fa-fw'></i></a></li>";
echo "<li class='active'>Прочее</li>";
echo "</ol>";
?>
<div class="list-group-item">
<ul class="nav nav-tabs" style="margin-bottom: -8px;">
<li class="nav-item">
<a class="nav-link" href="/?users">Все</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=online">Онлайн</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=guest">Гости</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=todey">Сегодня</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="/?users&act=other">Прочее</a>
</li>
</ul>
</div>
<?php
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `group_access` > '1'"), 0);
$k_page = k_page($k_post, $set['p_str']);
$page = page($k_page);
$start = $set['p_str'] * $page - $set['p_str'];
echo "<div class='list-group-item'>";
echo "<ul class='nav nav-pills'>";
echo "<li class='nav-item'><a class='nav-link active' href='/?users&act=admin'>Администрация</a></li>";
echo "</ul></div>";
if ($k_post == 0) {
echo "<div class='list-group-item'>";
echo "<i class='fa fa-info-circle fa-fw'></i> Нет результатов";
echo "</div>";
}
$q = mysql_query("SELECT `id` FROM `user` WHERE `group_access` > '1' ORDER BY `group_access` DESC LIMIT $start, $set[p_str]");
while ($adm = mysql_fetch_array($q)) {
$ank = get_user($adm['id']);
echo "<table class='list-group-item'><tr><td class='icon14'>";
avatar($ank['id'], '48', 'border-radius: 2px;');
echo "</td><td class = 'null'>";
if (isset($user) && $user['id'] != $ank['id']) {
echo "<span style='float:right;' id='hides'>";
echo "<a class='nav-link' href='/user/mail/messageList.php?contact=$ank[id]' title='Отправить сообщение' data-toggle='tooltip' data-placement='left'><span class='fa fa-envelope fa-lg'></span></a> ";
echo "</span>";
} else {
if (isset($user)) {
echo "<span style='float:right;'>Это Вы</span>";
}
}
user($ank['id']);
echo "<br />";
echo "<b>$ank[group_name]</b><br />n";
echo "Посл. посещение: " . date::time($ank['date_last']);
echo "</td></tr></table>";
}
if ($k_page > 1) {
echo "<div class='list-group-item'>";
str("/?users&act=admin&sort=$sort&$por&", $k_page, $page);
echo "</div>";
}
break;
case 'dr':
#Навигация
echo "<ol class='breadcrumb'>";
echo "<li><a href='/'><i class='fa fa-home fa-fw'></i></a></li>";
echo "<li class='active'>Прочее</li>";
echo "</ol>";
?>
<div class="list-group-item">
<ul class="nav nav-tabs" style="margin-bottom: -8px;">
<li class="nav-item">
<a class="nav-link" href="/?users">Все</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=online">Онлайн</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=guest">Гости</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=todey">Сегодня</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="/?users&act=other">Прочее</a>
</li>
</ul>
</div>
<?php
$currD = date("d", time());
$currm = date("m", time());
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `ank_d_r` = '$currD' and `ank_m_r` = '$currm'", $db), 0);
$k_page = k_page($k_post, $set['p_str']);
$page = page($k_page);
$start = $set['p_str'] * $page - $set['p_str'];
echo "<div class='list-group-item'>";
echo "<ul class='nav nav-pills'>";
echo "<li class='nav-item'><a class='nav-link active' href='/?users&act=dr'>Сегодня</a></li>";
echo "</ul></div>";
echo "<div class='list-group-item'>";
echo "<img src='/style/icons/dr.png' style='margin-top: -7px;margin-left: -7px;'/>";
echo "</div>";
if ($k_post == 0) {
echo "<div class='list-group-item' style='margin-top: -8px;'>";
echo "<i class='fa fa-info-circle fa-fw'></i> Нет результатов";
echo "</div>";
}
$q = mysql_query("SELECT * FROM `user` WHERE `ank_d_r` = '$currD' and `ank_m_r` = '$currm' LIMIT $start, $set[p_str]");
while ($ank = mysql_fetch_array($q)) {
echo "<table class='list-group-item' style='margin-top: -8px;'><tr><td class='icon14'>";
avatar($ank['id'], '48', 'border-radius: 2px;');
echo "</td><td class = 'null'>";
if (isset($user) && $user['id'] != $ank['id']) {
echo "<span style='float:right;' id='hides'>";
echo "<a class='nav-link' href='/user/mail/messageList.php?contact=$ank[id]' title='Отправить сообщение' data-toggle='tooltip' data-placement='left'><span class='fa fa-envelope fa-lg'></span></a> ";
echo "</span>";
} else {
if (isset($user)) {
echo "<span style='float:right;'>Это Вы</span>";
}
}
user($ank['id']);
echo "<br />";
if ($ank['ank_d_r'] != NULL && $ank['ank_m_r'] != NULL && $ank['ank_g_r'] != NULL) {
$ank['ank_age'] = date("Y") - $ank['ank_g_r'];
if (date("n") < $ank['ank_m_r']) {
$ank['ank_age'] = $ank['ank_age'] - 1;
} elseif (date("n") == $ank['ank_m_r'] && date("j") < $ank['ank_d_r']) {
$ank['ank_age'] = $ank['ank_age'] - 1;
}
echo " " . sklon_text($ank['ank_age'], array('год', 'года', 'лет')) . ",n";
}
if ($ank['ank_city'] != NULL) {
echo " $ank[ank_city]n";
}
if ($ank['country'] != NULL) {
echo country($ank['id']);
}
echo "</td></tr></table>";
}
if ($k_page > 1) {
echo "<div class='list-group-item'>";
str("/?users&act=dr&sort=$sort&$por&", $k_page, $page);
echo "</div>";
}
break;
case 'man':
#Навигация
echo "<ol class='breadcrumb'>";
echo "<li><a href='/'><i class='fa fa-home fa-fw'></i></a></li>";
echo "<li class='active'>Прочее</li>";
echo "</ol>";
?>
<div class="list-group-item">
<ul class="nav nav-tabs" style="margin-bottom: -8px;">
<li class="nav-item">
<a class="nav-link" href="/?users">Все</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=online">Онлайн</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=guest">Гости</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=todey">Сегодня</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="/?users&act=other">Прочее</a>
</li>
</ul>
</div>
<?php
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `sex` = '1'"), 0);
$k_page = k_page($k_post, $set['p_str']);
$page = page($k_page);
$start = $set['p_str'] * $page - $set['p_str'];
echo "<div class='list-group-item'>";
echo "<ul class='nav nav-pills'>";
echo "<li class='nav-item'><a class='nav-link active' href='/?users&act=man'>Парни</a></li>";
echo "<li class='nav-item'><a class='nav-link' href='/?users&act=woman'>Девушки</a></li>";
echo "</ul></div>";
if ($k_post == 0) {
echo "<div class='list-group-item'>";
echo "<i class='fa fa-info-circle fa-fw'></i> Нет результатов";
echo "</div>";
}
$q = mysql_query("SELECT * FROM `user` WHERE `sex` = '1' LIMIT $start, $set[p_str]");
while ($ank = mysql_fetch_array($q)) {
echo "<table class='list-group-item'><tr><td class='icon14'>";
avatar($ank['id'], '48', 'border-radius: 2px;');
echo "</td><td class = 'null'>";
if (isset($user) && $user['id'] != $ank['id']) {
echo "<span style='float:right;' id='hides'>";
echo "<a class='nav-link' href='/user/mail/messageList.php?contact=$ank[id]' title='Отправить сообщение' data-toggle='tooltip' data-placement='left'><span class='fa fa-envelope fa-lg'></span></a> ";
echo "</span>";
} else {
if (isset($user)) {
echo "<span style='float:right;'>Это Вы</span>";
}
}
user($ank['id']);
echo "<br />";
if ($ank['ank_d_r'] != NULL && $ank['ank_m_r'] != NULL && $ank['ank_g_r'] != NULL) {
$ank['ank_age'] = date("Y") - $ank['ank_g_r'];
if (date("n") < $ank['ank_m_r']) {
$ank['ank_age'] = $ank['ank_age'] - 1;
} elseif (date("n") == $ank['ank_m_r'] && date("j") < $ank['ank_d_r']) {
$ank['ank_age'] = $ank['ank_age'] - 1;
}
echo " " . sklon_text($ank['ank_age'], array('год', 'года', 'лет')) . ",n";
}
if ($ank['ank_city'] != NULL) {
echo " $ank[ank_city]n";
}
if ($ank['country'] != NULL) {
echo country($ank['id']);
}
echo "</td></tr></table>";
}
if ($k_page > 1) {
echo "<div class='list-group-item'>";
str("/?users&act=man&sort=$sort&$por&", $k_page, $page);
echo "</div>";
}
break;
case 'woman':
#Навигация
echo "<ol class='breadcrumb'>";
echo "<li><a href='/'><i class='fa fa-home fa-fw'></i></a></li>";
echo "<li class='active'>Прочее</li>";
echo "</ol>";
?>
<div class="list-group-item">
<ul class="nav nav-tabs" style="margin-bottom: -8px;">
<li class="nav-item">
<a class="nav-link" href="/?users">Все</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=online">Онлайн</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=guest">Гости</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/?users&act=todey">Сегодня</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="/?users&act=other">Прочее</a>
</li>
</ul>
</div>
<?php
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `sex` = '0'"), 0);
$k_page = k_page($k_post, $set['p_str']);
$page = page($k_page);
$start = $set['p_str'] * $page - $set['p_str'];
echo "<div class='list-group-item'>";
echo "<ul class='nav nav-pills'>";
echo "<li class='nav-item'><a class='nav-link' href='/?users&act=man'>Парни</a></li>";
echo "<li class='nav-item'><a class='nav-link active' href='/?users&act=woman'>Девушки</a></li>";
echo "</ul></div>";
if ($k_post == 0) {
echo "<div class='list-group-item'>";
echo "<i class='fa fa-info-circle fa-fw'></i> Нет результатов";
echo "</div>";
}
$q = mysql_query("SELECT * FROM `user` WHERE `sex` = '0' LIMIT $start, $set[p_str]");
while ($ank = mysql_fetch_array($q)) {
echo "<table class='list-group-item'><tr><td class='icon14'>";
avatar($ank['id'], '48', 'border-radius: 2px;');
echo "</td><td class = 'null'>";
if (isset($user) && $user['id'] != $ank['id']) {
echo "<span style='float:right;' id='hides'>";
echo "<a class='nav-link' href='/user/mail/messageList.php?contact=$ank[id]' title='Отправить сообщение' data-toggle='tooltip' data-placement='left'><span class='fa fa-envelope fa-lg'></span></a> ";
echo "</span>";
} else {
if (isset($user)) {
echo "<span style='float:right;'>Это Вы</span>";
}
}
user($ank['id']);
echo "<br />";
if ($ank['ank_d_r'] != NULL && $ank['ank_m_r'] != NULL && $ank['ank_g_r'] != NULL) {
$ank['ank_age'] = date("Y") - $ank['ank_g_r'];
if (date("n") < $ank['ank_m_r']) {
$ank['ank_age'] = $ank['ank_age'] - 1;
} elseif (date("n") == $ank['ank_m_r'] && date("j") < $ank['ank_d_r']) {
$ank['ank_age'] = $ank['ank_age'] - 1;
}
echo " " . sklon_text($ank['ank_age'], array('год', 'года', 'лет')) . ",n";
}
if ($ank['ank_city'] != NULL) {
echo " $ank[ank_city]n";
}
if ($ank['country'] != NULL) {
echo country($ank['id']);
}
echo "</td></tr></table>";
}
if ($k_page > 1) {
echo "<div class='list-group-item'>";
str("/?users&act=man&sort=$sort&$por&", $k_page, $page);
echo "</div>";
}
break;
}
require_once H . 'sys/inc/tfoot.php';