Файл: region_clean/statistik.php
Строк: 887
<?
#######################################
## Mod By KoT (borispol) [76-75-072] ##
#######################################
require_once "start.php";
require_once "sid.php";
header("Cache-Control: no-cache");
if ($ver == "wml") header ("Content-type:text/vnd.wap.wml; charset=utf-8");
else header("Content-Type:text/html; charset=UTF-8");
require_once "inc.php";
$link = connect_db();
list($row, $id, $ps, $fsize1, $fsize2) = check_login($link);
require_once "version.php";
$m0 = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM room0"));
$m1 = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM room1"));
$m2 = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM room2"));
$m3 = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM room3"));
$m4 = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM room4"));
$m5 = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM room5"));
$m6 = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM room6"));
$m7 = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM room7"));
$m8 = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM room8"));
$m9 = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM room9"));
$m10 = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM room10"));
$m11 = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM room11"));
$m12 = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM room12"));
$m13 = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM room13"));
$m14 = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM room14"));
$m15 = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM room15"));
$m16 = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM room16"));
$m17 = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM room17"));
$m18 = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM room18"));
$m19 = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM room19"));
$m20 = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM room20"));
$m21 = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM room21"));
$m22 = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM room22"));
$summa = $m0[0]+$m1[0]+$m2[0]+$m3[0]+$m4[0]+$m5[0]+$m6[0]+$m7[0]+$m8[0]+$m9[0]+$m10[0]+$m11[0]+$m12[0]+$m13[0]+$m14[0]+$m15[0]+$m16[0]+$m17[0]+$m18[0]+$m19[0]+$m20[0]+$m21[0]+$m22[0];
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo '<wml>';
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>";
}
if (isset($_GET['s']) && !ctype_digit($_GET['s'])) { header('Location: index.php?isset=403'); }
$mod = isset($_GET['mod']) ? $_GET['mod'] : NULL;
switch($mod) {
case '10zag':
if ($ver == "wml") {
echo "<card id="statistik" title="Отгадчики">n
<p align="left">n";
} else {
echo "<title>Отгадчики</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">Любители загадок</div>';
echo '--------<br/>';
$resu = mysql_query ("Select user,credits2 from users order by credits2 desc limit 0,10;");
$i = 1;
while ($a2 = mysql_fetch_assoc($resu))
{
echo ($i++).") ".col_n($a2['user'])." <b>(".$a2["credits2"]."</b>) отгадок<br/>n";
}
break;
case '10ym':
if ($ver == "wml") {
echo "<card id="statistik" title="Самые умные">n
<p align="left">n";
} else {
echo "<title>Самые умные</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">Самые умные</div>
--------<br/>';
$resu = mysql_query ("Select user,credits,id from users order by credits desc limit 0,10;");
$i = 1;
while ($a2 = mysql_fetch_assoc($resu))
{
echo ($i++).") <a href='info.php?$ses&nk=".$a2["id"]."&ref=$ref'> ".col_n($a2["user"])."</a> <b>(".$a2["credits"].")</b> ответов<br/>n";
}
break;
case 'galery':
if ($ver == "wml") {
echo "<card id="statistik" title="Самые красивые">n
<p align="left">n";
} else {
echo "<title>Самые красивые</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">Самые красивые чатовцы</div>
--------<br/>';
$resu = mysql_query ("Select id,user,votefoto,img from users where img!='' order by votefoto desc limit 0,10;");
$i = 1;
while ($a2 = mysql_fetch_assoc($resu))
{
echo ($i++).") ".col_n($a2["user"])."<a href="userfoto.php?usid=".$a2['id']."&$ses&ref=$ref"><img src="scr.php?photos/".$a2['img']."" alt="фото"/></a><b>(".$a2['votefoto']."</b>) голосов<br/>";
}
break;
case '10az':
if ($ver == "wml") {
echo "<card id="statistik" title="Самые азартные">n
<p align="left">n";
} else {
echo "<title>Самые азартные</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">Самые азартные</div>
--------<br/>';
$resu = mysql_query ("Select user,gposts,id from users order by gposts desc limit 0,10;");
$i = 1;
while ($a2 = mysql_fetch_assoc($resu))
{
echo ($i++).") <a href='info.php?$ses&nk=".$a2["id"]."&ref=$ref'> ".col_n($a2["user"])."</a> <b>(".$a2["gposts"].")</b> кредитов<br/>n";
}
break;
case '10bog':
if ($ver == "wml") {
echo "<card id="statistik" title="Самые богатые">n
<p align="left">n";
} else {
echo "<title>Самые богатые</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">Самые богатые</div>
--------<br/>';
$resu = mysql_query ("Select user,money,id from users order by money desc limit 0,10;");
$i = 1;
while ($a2 = mysql_fetch_assoc($resu))
{
echo ($i++).") <a href='info.php?$ses&nk=".$a2["id"]."&ref=$ref'> ".col_n($a2["user"])."</a> <b>(".$a2["money"].")</b> рублей<br/>n";
}
break;
case '10post':
if ($ver == "wml") {
echo "<card id="statistik" title="Самые разговорчивые">n
<p align="left">n";
} else {
echo "<title>Самые разговорчивые</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">Самые разговорчивые</div>
--------<br/>';
$r = mysql_query ("SELECT user,posts,id FROM users WHERE id!='1' and id!='2' and id!='3' and id!='4' and id!='5' and id!='6' and id!='7' and id!='8' and id!='9' ORDER BY posts desc LIMIT 0,10;");
$i = 1;
while ($a = mysql_fetch_assoc($r))
{
echo ($i++).") <a href='info.php?$ses&nk=".$a["id"]."&ref=$ref'> ".col_n($a["user"])."</a> <b>(".$a["posts"].")</b> постов<br/>n";
}
break;
case '10avt':
if ($ver == "wml") {
echo "<card id="statistik" title="Местные авторитеты">n
<p align="left">n";
} else {
echo "<title>Местные авторитеты</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">Местные авторитеты</div>
--------<br/>';
$resu = mysql_query ("Select * from users order by avtoritet desc limit 0,10;");
$i = 1;
while ($a2 = mysql_fetch_assoc($resu))
{
echo ($i++).") <a href='info.php?$ses&nk=".$a2["id"]."&ref=$ref'> ".col_n($a2["user"])."</a> <b>(+".$a2["avtoritet"].")</b><br/>n";
}
break;
case '10maf':
if ($ver == "wml") {
echo "<card id="statistik" title="Криминальные авторитеты">n
<p align="left">n";
} else {
echo "<title>Криминальные авторитеты</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">Криминальные авторитеты</div>
--------<br/>';
$r2 = mysql_query ("SELECT user,mafcredits,id FROM users ORDER BY mafcredits desc LIMIT 0,10;");
$i = 1;
while ($a3 = mysql_fetch_assoc($r2))
{
echo ($i++).") <a href='info.php?$ses&nk=".$a3["id"]."&ref=$ref'> ".col_n($a3["user"])."</a> <b>(".$a3["mafcredits"].")</b> м-кредов<br/>n";
}
break;
case 'newtoday':
if ($ver == "wml") {
echo "<card id="statistik" title="Новички сегодня">n
<p align="left">n";
} else {
echo "<title>Новички сегодня</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
$curdate = date("d-m-Y");
$r = mysql_query("SELECT id,user FROM users WHERE date = '".$curdate."'");
echo '<div class="c4">Новички сегодня</div>
--------<br/>';
if (mysql_affected_rows() == 0) {
echo 'Сегодня нет новичков<br/>';
} else {
$a = mysql_fetch_array($r);
$i = 0;
while ($a !== false) {
$i++;
$nk = $a[0];
$nick = $a[1];
echo "$i) <a href="info.php?$ses&nk=$nk&ref=$ref">".col_n($nick)."</a><br/>n";
$a = mysql_fetch_array($r);
}
}
break;
case 'fullignor':
if ($ver == "wml") {
echo "<card id="statistik" title="Полный игнор">
<p align="left">n";
} else {
echo "<title>Полный игнор</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
$r = mysql_query("SELECT id,user FROM users WHERE inv = '2'");
echo '<div class="c4">Высшая мера наказания. Их не видит никто в чате.</div>
--------<br/>';
if (mysql_affected_rows() == 0) {
echo 'Список Полного игнора пуст.<br/>';
} else {
$a = mysql_fetch_array($r);
$i = 0;
while ($a !== false) {
$i++;
$nk = $a[0];
$nick = $a[1];
echo "$i) <a href="info.php?$ses&nk=$nk&ref=$ref">".col_n($nick)."</a><br/>n";
$a = mysql_fetch_array($r);
}
}
break;
case 'birthday':
if ($ver == "wml") {
echo "<card id="statistik" title="Именинники">n
<p align="left">n";
} else {
echo "<title>Именинники</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
$d = date("d-m-");
$y = date("Y");
$select = mysql_query("Select id,user,birth from users where birth LIKE '%$d%'");
echo '<div class="c4">Имениннники сегодня</div>
--------<br/>';
if (mysql_affected_rows() == 0) {
echo 'Сегодня нет именинников<br/>';
} else {
$i = 1;
while ($inf = mysql_fetch_assoc($select)) {
$us = $inf['user'];
$usid = $inf['id'];
$birth = $inf['birth'];
$d1 = substr($birth,0,2);
$m1 = substr($birth,4,2);
$y1 = substr($birth,6,4);
if ($y > $y1) $age = $y-$y1; else $age = "(Не известно)";
if ((!$age) or ($age == 0) or ($age == "") or ($age > $y)) $age = "(Не известно)"; else $age = "(лет <b>".$age."</b> )n";
echo ($i++).") <a href="info.php?$ses&nk=$usid&ref=$ref">".$us."</a> ".$age."<br/>n";
}
}
break;
case 'admins':
if ($ver == "wml") {
echo "<card id="statistik" title="Админы">n
<p align="left">n";
} else {
echo "<title>Админы</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">Всеми любимые Админы</div>
--------<br/>';
$r = mysql_query("SELECT id,user FROM users WHERE level = '7'");
if (mysql_affected_rows() == 0) {
echo 'Админов нет!<br/>';
} else {
$a = mysql_fetch_array($r);
while ($a !== false) {
$nk = $a['id'];
$nick = $a['user'];
echo "<a href="info.php?$ses&nk=$nk&ref=$ref">".col_n($nick)."</a><br/>n";
$a = mysql_fetch_array($r);
}
}
break;
case 'sysadmin':
if ($ver == "wml") {
echo "<card id="statistik" title="Ст.Админы">n
<p align="left">n";
} else {
echo "<title>Ст. Админы</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">Всеми любимые Ст.Админы</div>
--------<br/>';
$r = mysql_query("SELECT id,user FROM users WHERE (level='8') and (id!='10')");
$a = mysql_fetch_array($r);
while ($a !== false) {
$nk = $a['id'];
$nick = $a['user'];
echo "<a href="info.php?$ses&nk=$nk&ref=$ref">".col_n($nick)."</a><br/>n";
$a = mysql_fetch_array($r);
}
break;
case 'smoders':
if ($ver == "wml") {
echo "<card id="statistik" title="Модераторы">n
<p align="left">n";
} else {
echo "<title>Модераторы</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">Модераторы</div>
--------<br/>';
$r = mysql_query("SELECT id,user FROM users WHERE level = '6'");
if (mysql_affected_rows() == 0) {
echo 'Вакансия свободна<br/>';
} else {
$a = mysql_fetch_array($r);
while ($a !== false) {
$nk = $a['id'];
$nick = $a['user'];
echo "<a href="info.php?$ses&nk=$nk&ref=$ref">".col_n($nick)."</a><br/>n";
$a = mysql_fetch_array($r);
}
}
break;
case 'moders':
if ($ver == "wml") {
echo "<card id="statistik" title="Киллеры">n
<p align="left">n";
} else {
echo "<title>Киллеры</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">Киллеры</div>
--------<br/>';
$r = mysql_query("SELECT id,user FROM users WHERE level = '5'");
if (mysql_affected_rows() == 0) {
echo 'Вакансия свободна<br/>';
} else {
$a = mysql_fetch_array($r);
while ($a !== false) {
$nk = $a['id'];
$nick = $a['user'];
echo "<a href="info.php?$ses&nk=$nk&ref=$ref">".col_n($nick)."</a><br/>n";
$a = mysql_fetch_array($r);
}
}
break;
case 'vips':
if ($ver == "wml") {
echo "<card id="statistik" title="V.I.P.-ы">n
<p align="left">n";
} else {
echo "<title>V.I.P.-ы</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">V.I.P.-ы</div>
--------<br/>';
$r = mysql_query("SELECT id,user FROM users WHERE level = '4'");
if (mysql_affected_rows() == 0) {
echo 'Вакансия свободна<br/>';
} else {
$a = mysql_fetch_array($r);
while ($a !== false) {
$nk = $a['id'];
$nick = $a['user'];
echo "<a href="info.php?$ses&nk=$nk&ref=$ref">".col_n($nick)."</a><br/>n";
$a = mysql_fetch_array($r);
}
}
break;
case 'referal';
if ($ver == "wml") {
echo "<card id="statistik" title="Парни чата">n
<p align="left">n";
} else {
echo "<title>Парни чата</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">Наши лидеры</div>
--------<br/>';
$spisok = mysql_query("SELECT `id` FROM `users`");
while($spis = mysql_fetch_assoc($spisok)) {
$r4 = mysql_query ("select count(id) as num from users WHERE invite = '".intval($spis['id'])."' ORDER BY `invite` LIMIT 10");
$a4 = mysql_fetch_array($r4);
$golos = $a4['num'];
$refer = $spis['invite'];
$us = $spis['user'];
if ($golos > 0) {
echo col_n($us) . ' <b>(' . $golos . ')</b> рефералов<br/>';
}
}
break;
case 'm':
if ($ver == "wml") {
echo "<card id="statistik" title="Парни чата">n
<p align="left">n";
} else {
echo "<title>Парни чата</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">Парни чата</div>
--------<br/>';
$userm = mysql_query("select count(id) as num from users where sex ='М' and level<'4' and id!='1' and id!='2' and id!='3' and id!='4' and id!='5' and id!='6' and id!='7' and id!='8' and id!='9';");
$usm = mysql_fetch_array($userm);
$num = $usm['num'];
if (!isset($s)) $s = 0;
$mx = round(($num/10)+0.45);
if ($s > $mx) $s = $mx;
if ($s == 0) $s = 1;
$ot = (($s - 1) * 10) + 1;
$do = $s * 10;
if ($do > $num) $do = $num;
$o = $ot - 1;
$n = $ot;
if ($do == 0) $n = $o;
echo "Показывает $n-$do из $num<br/>n";
echo '--------<br/>';
$o = intval($o);
$do = intval($do);
$r = mysql_query ("select id,user from users where sex ='М' and level<'4' and id!='1' and id!='2' and id!='3' and id!='4' and id!='5' and id!='6' and id!='7' and id!='8' and id!='9' order by posts desc limit $o,$do");
for ($i = $ot; $i <= $do; $i++) {
$arr = mysql_fetch_array($r);
$login = $arr['user'];
$usid = $arr['id'];
echo ($i).") <a href="info.php?$ses&nk=$usid&ref=$ref">".col_n($login)."</a><br/>";
}
$next = $s + 1;
$prev = $s - 1;
if ($num > $do) {
$ot = (($next - 1) * 10) + 1;
$do = $next * 10;
if ($do > $num) $do = $num;
echo '--------<br/>';
echo "<a href="statistik.php?mod=m&$ses&s=$next&ref=$ref">>>$ot-$do>></a><br/>n";
}
if ($s > 1) {
$ot = (($prev - 1) * 10) + 1;
$do = $prev * 10;
echo "<a href="statistik.php?mod=m&$ses&s=$prev&ref=$ref"><<$ot-$do<<</a><br/>n";
}
break;
case 'svadba':
if ($ver == "wml") {
echo "<card id="statistik" title="Брачные пары чата">n
<p align="left">n";
} else {
echo "<title>Брачные пары чата</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">Брачные пары чата</div>
--------<br/>';
$userm = mysql_query ("select count(id) as num from users where sex ='М' and id!='1' and id!='2' and id!='3' and id!='4' and id!='5' and id!='6' and id!='7' and id!='8' and id!='9' and para!=''");
$usm = mysql_fetch_array($userm);
$num = $usm["num"];
if (!isset($s)) $s = 0;
$mx = round(($num/10)+0.45);
if ($s > $mx) $s = $mx;
if ($s == 0) $s = 1;
$ot = (($s - 1) * 10) + 1;
$do = $s * 10;
if ($do > $num) $do = $num;
$o = $ot - 1;
$n = $ot;
if ($do == 0) $n = $o;
echo "Показывает $n-$do из $num<br/>n";
echo '--------<br/>';
$o = intval($o);
$do = intval($do);
$r = mysql_query ("select id,user,para from users where sex ='М' and para!='' and id!='1' and id!='2' and id!='3' and id!='4' and id!='5' and id!='6' and id!='7' and id!='8' and id!='9' and para!='' order by posts desc limit $o,$do");
for ($i = $ot; $i <= $do; $i++) {
$arr = mysql_fetch_array($r);
$login = $arr['user'];
$usid = $arr['id'];
$para = $arr['para'];
$rx = mysql_query ("select id,user from users where para!='' and id='".mysql_real_escape_string($para)."' order by posts desc limit $o,$do");
$arrx = mysql_fetch_array($rx);
$loginx = $arrx['user'];
$usidx = $arrx['id'];
echo ($i).") <a href="info.php?$ses&nk=$usid&ref=$ref">".col_n($login)."</a> + <a href="info.php?$ses&nk=$usidx&ref=$ref">".col_n($loginx)."</a><br/>";
}
$next = $s + 1;
$prev = $s - 1;
if ($num > $do) {
$ot = (($next - 1) * 10) + 1;
$do = $next * 10;
if ($do > $num) $do = $num;
echo '--------<br/>';
echo "<a href="statistik.php?mod=svadba&$ses&s=$next&ref=$ref">>>$ot-$do>></a><br/>n";
}
if ($s > 1) {
$ot = (($prev - 1) * 10) + 1;
$do = $prev * 10;
echo "<a href="statistik.php?mod=svadba&$ses&s=$prev&ref=$ref"><<$ot-$do<<</a><br/>n";
}
break;
case 'alluser':
if ($ver == "wml") {
echo "<card id="statistik" title="Все юзеры чата">n
<p align="left">n";
} else {
echo "<title>Все юзеры чата</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">Все юзеры чата</div>
--------<br/>';
$userm = mysql_query ("select count(id) as num from users where id!='1' and id!='2' and id!='3' and id!='4' and id!='5' and id!='6' and id!='7' and id!='8' and id!='9';");
$usm = mysql_fetch_array($userm);
$num = $usm["num"];
if (!isset($s)) $s = 0;
$mx = round(($num/10)+0.45);
if ($s > $mx) $s = $mx;
if ($s == 0) $s = 1;
$ot = (($s - 1) * 10) + 1;
$do = $s * 10;
if ($do > $num) $do = $num;
$o = $ot - 1;
$n = $ot;
if ($do == 0) $n = $o;
echo "Показывает $n-$do из $num<br/>n";
echo '--------<br/>';
$o = intval($o);
$do = intval($do);
$r = mysql_query ("select id,user,sex from users where id!='1' and id!='2' and id!='3' and id!='4' and id!='5' and id!='6' and id!='7' and id!='8' and id!='9' order by posts desc limit $o,$do");
for ($i = $ot; $i <= $do; $i++) {
$arr = mysql_fetch_array($r);
$login = $arr['user'];
$usid = $arr['id'];
$sex = $arr['sex'];
echo ($i).") <a href="info.php?$ses&nk=$usid&ref=$ref">".col_n($login)."</a> [$sex]<br/>";
}
$next = $s + 1;
$prev = $s - 1;
if ($num > $do) {
$ot = (($next - 1) * 10) + 1;
$do = $next * 10;
if ($do > $num) $do = $num;
echo '--------<br/>';
echo "<a href="statistik.php?mod=alluser&$ses&s=$next&ref=$ref">>>$ot-$do>></a><br/>n";
}
if ($s>1) {
$ot = (($prev - 1) * 10) + 1;
$do = $prev * 10;
echo "<a href="statistik.php?mod=alluser&$ses&s=$prev&ref=$ref"><<$ot-$do<<</a><br/>n";
}
break;
case 'pochet':
if ($ver == "wml") {
echo "<card id="statistik" title="Доска почета">n
<p align="left">n";
} else {
echo "<title>Доска почета</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">Доска почета</div>
--------<br/>';
$r = mysql_query ("select max(`posts`) FROM `users` where sex ='М'");
$arr = mysql_fetch_array($r);
$posts = $arr[0];
$rx = mysql_query ("select id,user from users where posts ='".intval($posts)."'");
$arrx = mysql_fetch_array($rx);
$idx = $arrx[0];
$userx = $arrx[1];
echo "Самый разговорчивый: <a href="info.php?$ses&nk=$idx&ref=$ref"><b>".col_n($userx)."</b></a> ($posts постов)";
$r = mysql_query ("select max(`gposts`) FROM `users` where sex ='М';");
$arr = mysql_fetch_array($r);
$posts = $arr[0];
$rx = mysql_query ("select id,user from users where gposts ='".intval($posts)."'");
$arrx = mysql_fetch_array($rx);
$idx = $arrx[0];
$userx = $arrx[1];
echo "<br/>Самый богатый кредитами: <a href="info.php?$ses&nk=$idx&ref=$ref"><b>".col_n($userx)."</b></a> ($posts кредитов)";
$r = mysql_query ("select max(`credits`) FROM `users` where sex ='М';");
$arr = mysql_fetch_array($r);
$posts = $arr[0];
$rx = mysql_query ("select id,user from users where credits ='".intval($posts)."'");
$arrx = mysql_fetch_array($rx);
$idx = $arrx[0];
$userx = $arrx[1];
echo "<br/>Самый умный: <a href="info.php?$ses&nk=$idx&ref=$ref"><b>".col_n($userx)."</b></a> ($posts ответов)";
$r = mysql_query ("select max(`mafcredits`) FROM `users` where sex ='М'");
$arr = mysql_fetch_array($r);
$posts = $arr[0];
$rx = mysql_query ("select id,user from users where mafcredits ='".intval($posts)."'");
$arrx = mysql_fetch_array($rx);
$idx = $arrx[0];
$userx = $arrx[1];
echo "<br/>Главый мафиози: <a href="info.php?$ses&nk=$idx&ref=$ref"><b>".col_n($userx)."</b></a> ($posts очков)";
$r = mysql_query ("select max(`votefoto`) FROM `users` where sex ='М';");
$arr = mysql_fetch_array($r);
$posts = $arr[0];
$rx = mysql_query ("select id,user from users where votefoto ='".intval($posts)."'");
$arrx = mysql_fetch_array($rx);
$idx = $arrx[0];
$userx = $arrx[1];
echo "<br/>Самый фотогиничный: <a href="info.php?$ses&nk=$idx&ref=$ref"><b>".col_n($userx)."</b></a> ($posts голосов)";
////
$r = mysql_query ("select max(`posts`) FROM `users` where sex ='Ж'");
$arr = mysql_fetch_array($r);
$posts = $arr[0];
$rx = mysql_query ("select id,user from users where posts ='".intval($posts)."' and sex ='Ж'");
$arrx = mysql_fetch_array($rx);
$idx = $arrx[0];
$userx = $arrx[1];
echo "<br/>-----------<br/>Самая разговорчивая: <a href="info.php?$ses&nk=$idx&ref=$ref"><b>".col_n($userx)."</b></a> ($posts постов)";
$r = mysql_query ("select max(`gposts`) FROM `users` where sex ='Ж'");
$arr = mysql_fetch_array($r);
$posts = $arr[0];
$rx = mysql_query ("select id,user from users where gposts ='".intval($posts)."' and sex ='Ж'");
$arrx = mysql_fetch_array($rx);
$idx = $arrx[0];
$userx = $arrx[1];
echo "<br/>Самая богатая кредитами: <a href="info.php?$ses&nk=$idx&ref=$ref"><b>".col_n($userx)."</b></a> ($posts кредитов)";
$r = mysql_query ("select max(`credits`) FROM `users` where sex ='Ж'");
$arr = mysql_fetch_array($r);
$posts = $arr[0];
$rx = mysql_query ("select id,user from users where credits ='".intval($posts)."' and sex ='Ж'");
$arrx = mysql_fetch_array($rx);
$idx = $arrx[0];
$userx = $arrx[1];
echo "<br/>Самая умная: <a href="info.php?$ses&nk=$idx&ref=$ref"><b>".col_n($userx)."</b></a> ($posts ответов)";
$r = mysql_query ("select max(`mafcredits`) FROM `users` where sex ='Ж'");
$arr = mysql_fetch_array($r);
$posts = $arr[0];
$rx = mysql_query ("select id,user from users where mafcredits ='".intval($posts)."' and sex ='Ж'");
$arrx = mysql_fetch_array($rx);
$idx = $arrx[0];
$userx = $arrx[1];
echo "<br/>Главная мафиози: <a href="info.php?$ses&nk=$idx&ref=$ref"><b>".col_n($userx)."</b></a> ($posts очков)";
$r = mysql_query ("select max(`votefoto`) FROM `users` where sex ='Ж'");
$arr = mysql_fetch_array($r);
$posts = $arr[0];
$rx = mysql_query ("select id,user from users where votefoto ='".intval($posts)."' and sex ='Ж'");
$arrx = mysql_fetch_array($rx);
$idx = $arrx[0];
$userx = $arrx[1];
echo "<br/>Самая фотогиничная: <a href="info.php?$ses&nk=$idx&ref=$ref"><b>".col_n($userx)."</b></a> ($posts голосов)<br/>";
break;
case 'listkon':
if ($ver == "wml") {
echo "<card id="statistik" title="Список конкурсоведов">n
<p align="left">n";
} else {
echo "<title>Список конкурсоведов</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">Список конкурсоведов</div>
--------<br/>';
$file = file("konkurs/adminlist.dat");
$total = count($file);
if (empty($_GET['start'])) $start = 0;
else $start = intval($_GET['start']);
if ($total < $start + 10) { $end = $total; }
else { $end = $start + 10; }
for ($fm = $start; $fm < $end; $fm++) {
$file = file("konkurs/adminlist.dat");
$file = array_reverse($file);
$dt = explode("|",$file[$fm]);
$num = $total - $fm - 1;
if ($fm >= 0) {
$r = mysql_query ("select id,user from users where id='$dt[0]'");
$arr = mysql_fetch_array($r);
$login = $arr['user'];
$usid = $arr['id'];
$lev = $arr['level'];
echo "<b><a href='info.php?$ses&nk=$usid&ref=$ref'> ".col_n($login)." </a></b>";
echo '<br/>';
}
}
if ($total < 1) {
echo '<br/>Админов пока нет!<br/>';
}
echo '<br/>';
if ($start != 0) {
echo '<a href="statistik.php?mod=listkon&start='.($start - 10).'&'.$ses.'&ref='.$ref.'"><-Назад</a> ';
} else {
echo'<-Назад ';
}
echo '|';
if ($total > $start + 10) {
echo ' <a href="statistik.php?mod=listkon&start='.($start + 10).'&'.$ses.'&ref='.$ref.'">Далее-></a>';
} else {
echo ' Далее->';
}
$ba = ceil($total/10);
$ba2 = $ba*10-10;
echo '<br/><br/>Страницы:';
$asd2 = $start+(10*4);
if ($asd < $total and $asd > 0) {
echo ' <a href="statistik.php?mod=listkon&start=0&'.$ses.'&ref='.$ref.'">1</a> ... ';
}
for($i = $asd; $i < $asd2;)
{
if ($i < $total and $i >= 0) {
$ii = floor(1+$i/10);
if ($start == $i) {
echo ' <b>'.$ii.'</b>';
}
else {
echo ' <a href="statistik.php?mod=listkon&start='.$i.'&'.$ses.'&ref='.$ref.'">'.$ii.'</a>';
} }
$i = $i + 10;
}
if ($asd2 < $total) {
echo ' ... <a href="statistik.php?mod=listkon&start='.$ba2.'&'.$ses.'&ref='.$ref.'">'.$ba.'</a>';
}
echo '<br/><br/>Всего конкурсоведов: '.$total.' <br/>';
break;
case 'listel':
if ($ver == "wml") {
echo "<card id="statistik" title="Участники выборной комиссии">n
<p align="left">n";
} else {
echo "<title>Список участников выборной комиссии</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">Список УВК</div>
--------<br/>';
$file = file("elections/adminlist.dat");
$total = count($file);
if (empty($_GET['start'])) $start = 0;
else $start = intval($_GET['start']);
if ($total < $start + 10) { $end = $total; }
else { $end = $start + 10; }
for ($fm = $start; $fm < $end; $fm++) {
$file = file("elections/adminlist.dat");
$file = array_reverse($file);
$dt = explode("|",$file[$fm]);
$num = $total - $fm - 1;
if ($fm >= 0) {
$r = mysql_query ("select id,user from users where id='$dt[0]'");
$arr = mysql_fetch_array($r);
$login = $arr['user'];
$usid = $arr['id'];
$lev = $arr['level'];
echo "<b><a href='info.php?$ses&nk=$usid&ref=$ref'> ".col_n($login)." </a></b>";
echo '<br/>';
}
}
if ($total < 1) {
echo '<br/>Админов пока нет!<br/>';
}
echo '<br/>';
if ($start != 0) {
echo '<a href="statistik.php?mod=listel&start='.($start - 10).'&'.$ses.'&ref='.$ref.'"><-Назад </a> ';
} else {
echo '<-Назад ';
}
echo '|';
if ($total > $start + 10) {
echo ' <a href="statistik.php?mod=listel&start='.($start + 10).'&'.$ses.'&ref='.$ref.'">Далее-></a>';
} else {
echo ' Далее->';
}
$ba = ceil($total/10);
$ba2 = $ba*10-10;
echo '<br/><br/>Страницы:';
$asd2 = $start+(10*4);
if ($asd < $total and $asd > 0) {
echo ' <a href="statistik.php?mod=listel&start=0&'.$ses.'&ref='.$ref.'">1</a> ... ';
}
for($i = $asd; $i < $asd2;)
{
if ($i < $total and $i >= 0) {
$ii = floor(1+$i/10);
if ($start == $i) {
echo ' <b>'.$ii.'</b>';
}
else {
echo ' <a href="statistik.php?mod=listel&start='.$i.'&'.$ses.'&ref='.$ref.'">'.$ii.'</a>';
} }
$i = $i + 10;
}
if ($asd2 < $total) {
echo ' ... <a href="statistik.php?mod=listel&start='.$ba2.'&'.$ses.'&ref='.$ref.'">'.$ba.'</a>';
}
echo '<br/><br/>Всего УВК: '.$total.' <br/>';
break;
case 'listjur':
if ($ver == "wml") {
echo "<card id="statistik" title="Журналисты чата">n
<p align="left">n";
} else {
echo "<title>Журналисты чата</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">Список журналистов</div>
--------<br/>';
$file = file("journal/journalist.dat");
$total = count($file);
if (empty($_GET['start'])) $start = 0;
else $start = intval($_GET['start']);
if ($total < $start + 10) { $end = $total;
}
else
{
$end = $start + 10; }
for ($fm = $start; $fm < $end; $fm++) {
$file = file("journal/journalist.dat");
$file = array_reverse($file);
$dt = explode("|",$file[$fm]);
$num = $total - $fm - 1;
if ($fm >= 0) {
$r = mysql_query ("select id,user from users where id='$dt[0]'");
$arr = mysql_fetch_array($r);
$login = $arr['user'];
$usid = $arr['id'];
$lev = $arr['level'];
echo "<b><a href='info.php?$ses&nk=$usid&ref=$ref'> ".col_n($login)." </a></b>";
echo '<br/>';
}
}
if ($total < 1) {
echo '<br/>Журналистов пока нет!<br/>';
}
echo '<br/>';
if ($start != 0) {
echo '<a href="statistik.php?mod=listel&start='.($start - 10).'&'.$ses.'&ref='.$ref.'"><-Назад </a> ';
} else {
echo '<-Назад ';
}
echo '|';
if ($total > $start + 10) {
echo ' <a href="statistik.php?mod=listel&start='.($start + 10).'&'.$ses.'&ref='.$ref.'">Далее-></a>';
} else{
echo' Далее->';
}
$ba = ceil($total/10);
$ba2 = $ba*10-10;
echo '<br/><br/>Страницы:';
$asd2 = $start+(10*4);
if ($asd < $total and $asd > 0) {
echo ' <a href="statistik.php?mod=listel&start=0&'.$ses.'&ref='.$ref.'">1</a> ... ';
}
for($i = $asd; $i < $asd2;)
{
if ($i < $total and $i >= 0) {
$ii = floor(1+$i/10);
if ($start == $i) {
echo ' <b>'.$ii.'</b>';
}
else {
echo ' <a href="statistik.php?mod=listel&start='.$i.'&'.$ses.'&ref='.$ref.'">'.$ii.'</a>';
} }
$i = $i + 10;
}
if ($asd2 < $total) {
echo ' ... <a href="statistik.php?mod=listel&start='.$ba2.'&'.$ses.'&ref='.$ref.'">'.$ba.'</a>';
}
echo '<br/><br/>Всего журналистов: '.$total.' <br/>';
break;
case 'listed':
if ($ver=="wml") {
echo "<card id="statistik" title="Редакторы журнала чата">n
<p align="left">n";
} else {
echo "<title>Список редакторов журнала чата</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">Список редакторов журнала</div>
--------<br/>';
$file = file("journal/editors.dat");
$total = count($file);
if (empty($_GET['start'])) $start = 0;
else $start = intval($_GET['start']);
if ($total < $start + 10) { $end = $total;
}
else
{
$end = $start + 10; }
for ($fm = $start; $fm < $end; $fm++) {
$file = file("journal/editors.dat");
$file = array_reverse($file);
$dt = explode("|",$file[$fm]);
$num = $total - $fm - 1;
if ($fm >= 0) {
$r = mysql_query ("select id,user from users where id='$dt[0]'");
$arr = mysql_fetch_array($r);
$login = $arr['user'];
$usid = $arr['id'];
$lev = $arr['level'];
echo "<b><a href='info.php?$ses&nk=$usid&ref=$ref'> ".col_n($login)." </a></b>";
echo '<br/>';
}
}
if ($total < 1) {
echo '<br/>Редакторов пока нет!<br/>';
}
echo '<br/>';
if ($start != 0) {
echo '<a href="statistik.php?mod=listel&start='.($start - 10).'&'.$ses.'&ref='.$ref.'"><-Назад </a> ';
} else {
echo '<-Назад ';
}
echo '|';
if ($total > $start + 10) {
echo ' <a href="statistik.php?mod=listel&start='.($start + 10).'&'.$ses.'&ref='.$ref.'">Далее-></a>';
} else {
echo ' Далее->';
}
$ba = ceil($total/10);
$ba2 = $ba*10-10;
echo '<br/><br/>Страницы:';
$asd2 = $start+(10*4);
if ($asd < $total and $asd > 0) {
echo ' <a href="statistik.php?mod=listel&start=0&'.$ses.'&ref='.$ref.'">1</a> ... ';
}
for($i = $asd; $i < $asd2;)
{
if ($i < $total and $i >= 0) {
$ii = floor(1+$i/10);
if ($start == $i) {
echo ' <b>'.$ii.'</b>';
}
else {
echo ' <a href="statistik.php?mod=listel&start='.$i.'&'.$ses.'&ref='.$ref.'">'.$ii.'</a>';
} }
$i = $i + 10;
}
if ($asd2 < $total) {
echo ' ... <a href="statistik.php?mod=listel&start='.$ba2.'&'.$ses.'&ref='.$ref.'">'.$ba.'</a>';
}
echo '<br/><br/>Всего редакторов журнала: '.$total.' <br/>';
break;
case 'nepochet':
if ($ver == "wml") {
echo "<card id="statistik" title="Доска позора">n
<p align="left">n";
} else {
echo "<title>Доска позора</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">Доска позора</div>
--------<br/>';
$r = mysql_query ("select min(`posts`) FROM `users` where sex='М' and posts!='0'");
$arr = mysql_fetch_array($r);
$posts = $arr[0];
$rx = mysql_query ("select id,user from users where posts='".intval($posts)."' and posts!='0'");
$arrx = mysql_fetch_array($rx);
$idx = $arrx[0];
$userx = $arrx[1];
echo "Самый неразговорчивый: <a href="info.php?$ses&nk=$idx&ref=$ref"><b>".col_n($userx)."</b></a> ($posts постов)";
$r = mysql_query ("select min(`gposts`) FROM `users` where sex='М' and gposts!='0'");
$arr = mysql_fetch_array($r);
$posts = $arr[0];
$rx = mysql_query ("select id,user from users where gposts='$posts' and gposts!='0';");
$arrx = mysql_fetch_array($rx);
$idx = $arrx[0];
$userx = $arrx[1];
echo "<br/>Самый небогатый кредитами: <a href="info.php?$ses&nk=$idx&ref=$ref"><b>".col_n($userx)."</b></a> ($posts кредитов)";
$r = mysql_query ("select min(`mafcredits`) FROM `users` where sex='М' and mafcredits!='0'");
$arr = mysql_fetch_array($r);
$posts = $arr[0];
$rx = mysql_query ("select id,user from users where mafcredits='".intval($posts)."' and mafcredits!='0'");
$arrx = mysql_fetch_array($rx);
$idx = $arrx[0];
$userx = $arrx[1];
echo "<br/>Самый неактивный мафиози: <a href="info.php?$ses&nk=$idx&ref=$ref"><b>".col_n($userx)."</b></a> ($posts очков)";
$r = mysql_query ("select min(`posts`) FROM `users` where sex='Ж' and posts!='0'");
$arr = mysql_fetch_array($r);
$posts = $arr[0];
$rx = mysql_query ("select id,user from users where posts='".intval($posts)."' and sex='Ж' and posts!='0'");
$arrx = mysql_fetch_array($rx);
$idx = $arrx[0];
$userx = $arrx[1];
echo "<br/>-----------<br/>Самая неразговорчивая: <a href="info.php?$ses&nk=$idx&ref=$ref"><b>".col_n($userx)."</b></a> ($posts постов)";
$r = mysql_query ("select min(`gposts`) FROM `users` where sex='Ж' and gposts!='0'");
$arr = mysql_fetch_array($r);
$posts = $arr[0];
$rx = mysql_query ("select id,user from users where gposts='".intval($posts)."' and sex='Ж' and gposts!='0'");
$arrx = mysql_fetch_array($rx);
$idx = $arrx[0];
$userx = $arrx[1];
echo "<br/>Самая небогатая кредитами: <a href="info.php?$ses&nk=$idx&ref=$ref"><b>".col_n($userx)."</b></a> ($posts кредитов)";
$r = mysql_query ("select min(`mafcredits`) FROM `users` where sex='Ж' and mafcredits!='0'");
$arr = mysql_fetch_array($r);
$posts = $arr[0];
$rx = mysql_query ("select id,user from users where mafcredits='".intval($posts)."' and sex='Ж' and mafcredits!='0'");
$arrx = mysql_fetch_array($rx);
$idx = $arrx[0];
$userx = $arrx[1];
echo "<br/>Самая неактивная мафиози: <a href="info.php?$ses&nk=$idx&ref=$ref"><b>".col_n($userx)."</b></a> ($posts очков)<br/>";
break;
case 'photo':
if ($ver == "wml") {
echo "<card id="statistik" title="Чатлане с фото">n
<p align="left">n";
} else {
echo "<title>Чатлане с фото</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">Чатлане с фото</div>
--------<br/>';
$userm = mysql_query("select count(id) as num from users where img!=''");
$usm = mysql_fetch_array($userm);
$num = $usm["num"];
if (!isset($s)) $s = 0;
$mx = round(($num/10)+0.45);
if ($s > $mx) $s = $mx;
if ($s == 0) $s = 1;
$ot = (($s - 1) * 10) + 1;
$do = $s * 10;
if ($do > $num) $do = $num;
$o = $ot - 1;
$n = $ot;
if ($do == 0) $n = $o;
echo "Показывает $n-$do из $num<br/>n";
echo '--------<br/>';
$o = intval($o);
$do = intval($do);
$r = mysql_query ("select id,user from users where img!='' order by posts desc limit $o,$do");
for ($i = $ot; $i <= $do; $i++) {
$arr = mysql_fetch_array($r);
$login = $arr['user'];
$usid = $arr['id'];
echo ($i).") <a href="userfoto.php?$ses&usid=$usid&ref=$ref">".col_n($login)."</a><br/>";
}
$next = $s + 1;
$prev = $s - 1;
if ($num > $do) {
$ot = (($next - 1) * 10) + 1;
$do = $next * 10;
if ($do > $num) $do = $num;
echo '--------<br/>';
echo "<a href="statistik.php?mod=photo&$ses&s=$next&ref=$ref">>>$ot-$do>></a><br/>n";
}
if ($s > 1) {
$ot = (($prev - 1) * 10) + 1;
$do = $prev * 10;
echo "<a href="statistik.php?mod=photo&$ses&s=$prev&ref=$ref"><<$ot-$do<<</a><br/>n";
}
break;
case 'zh':
if ($ver == "wml") {
echo "<card id="statistik" title="Девушки чата">n
<p align="left">n";
} else {
echo "<title>Девушки чата</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
}
echo $fsize1;
echo '<div class="c4">Девушки чата</div>
--------<br/>';
$userm = mysql_query ("select count(id) as num from users where sex ='Ж' and level<'4' and id!='1' and id!='2' and id!='3' and id!='4' and id!='5' and id!='6' and id!='7' and id!='8' and id!='9';");
$usm = mysql_fetch_array($userm);
$num = $usm["num"];
if (!isset($s)) $s = 0;
$mx = round(($num/10)+0.45);
if ($s > $mx) $s = $mx;
if ($s == 0) $s = 1;
$ot = (($s - 1) * 10) + 1;
$do = $s * 10;
if ($do > $num) $do = $num;
$o = $ot - 1;
$n = $ot;
if ($do == 0) $n = $o;
echo "Показывает $n-$do из $num<br/>n";
echo '--------<br/>';
$o = intval($o);
$do = intval($do);
$r = mysql_query ("select id,user from users where sex ='Ж' and level<'4' and id!='1' and id!='2' and id!='3' and id!='4' and id!='5' and id!='6' and id!='7' and id!='8' and id!='9' order by posts desc limit $o,$do");
for ($i = $ot; $i <= $do; $i++) {
$arr = mysql_fetch_array($r);
$login = $arr['user'];
$usid = $arr['id'];
echo ($i).") <a href="info.php?$ses&nk=$usid&ref=$ref">".col_n($login)."</a><br/>";
}
$next = $s + 1;
$prev = $s - 1;
if ($num > $do) {
$ot = (($next - 1) * 10) + 1;
$do = $next * 10;
if ($do > $num) $do = $num;
echo '--------<br/>';
echo "<a href="statistik.php?mod=zh&$ses&s=$next&ref=$ref">>>$ot-$do>></a><br/>n";
}
if ($s > 1) {
$ot = (($prev-1)*10)+1;
$do = $prev*10;
echo "<a href="statistik.php?mod=zh&$ses&s=$prev&ref=$ref"><<$ot-$do<<</a><br/>n";
}
break;
default:
if ($ver == "wml") {
echo "<card id="statistik" title="Статистика чата">n
<p align="center">n";
} else {
echo "<title>Статистика чата</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="center">";
}
echo $fsize1;
echo '<div class = "c4"><b>Статистика чата</b></div><br/>
--------<br/>';
$users = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM users where id!='1' and id!='2' and id!='3' and id!='4' and id!='5' and id!='6' and id!='7' and id!='8' and id!='9'"));
$usersm = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM users where sex='М' and id!='1' and id!='2' and id!='3' and id!='4' and id!='5' and id!='6' and id!='7' and id!='8' and id!='9'"));
$usersj = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM users where sex='Ж' and id!='1' and id!='2' and id!='3' and id!='4' and id!='5' and id!='6' and id!='7' and id!='8' and id!='9'"));
$ph = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM users where img!=''"));
echo "Всего юзеров: <a href="statistik.php?$ses&mod=alluser&ref=$ref"><b>".$users[0]."</b></a><br/>n
С фотками: <a href="statistik.php?$ses&mod=photo&ref=$ref"><b>".$ph[0]."</b></a><br/>n
Парней: <a href="statistik.php?$ses&mod=m&ref=$ref"><b>".$usersm[0]."</b></a><br/>n
Девушек: <a href="statistik.php?$ses&mod=zh&ref=$ref"><b>".$usersj[0]."</b></a><br/>n";
$svadb = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM users where para!=''"));
$kolsv = $svadb[0] / 2;
echo "Брачных пар: <a href="statistik.php?$ses&mod=svadba&ref=$ref"><b>".$kolsv."</b></a><br/>";
$svadb = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM sertificat;"));
$kolsv = $svadb[0];
echo "Брачных сертификатов: <a href="sertificat.php?$ses&ref=$ref"><b>".$kolsv."</b></a>";
echo '<br/>--------<br/>';
$curdate = date("d-m-Y");
$newtoday = mysql_fetch_array(mysql_query("SELECT COUNT(id) from users WHERE date = '".$curdate."'"));
echo "Новенькие сегодня: <a href="statistik.php?$ses&mod=newtoday&ref=$ref"><b>".$newtoday[0]."</b></a><br/>n";
$d = date("d-m-");
$birth = mysql_fetch_array(mysql_query ("Select count(id) from users where birth LIKE '%$d%'"));
echo "Именинники сегодня: <a href="statistik.php?$ses&mod=birthday&ref=$ref"><b>".$birth[0]."</b></a><br/>n";
if ($row["level"] > 6) {
$fullignor = mysql_fetch_array(mysql_query ("Select count(id) from users where inv = '2'"));
echo "Полный Игнор: <a href="statistik.php?$ses&mod=fullignor&ref=$ref"><b>".$fullignor[0]."</b></a><br/>n";
}
echo '--------<br/>';
$sadmins = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM users where (level='8') and (id!=10)"));
echo "Ст.Админoв: <a href="statistik.php?$ses&mod=sysadmin&ref=$ref"><b>".$sadmins[0]."</b></a><br/>n";
$admins = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM users where level='7'"));
echo "Админов: <a href="statistik.php?$ses&mod=admins&ref=$ref"><b>".$admins[0]."</b></a><br/>n";
$smods = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM users where level='6' "));
echo "Модераторов: <a href="statistik.php?$ses&mod=smoders&ref=$ref"><b>".$smods[0]."</b></a><br/>n";
$mods = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM users where level='5' "));
echo "Киллеров: <a href="statistik.php?$ses&mod=moders&ref=$ref"><b>".$mods[0]."</b></a><br/>n";
$vips = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM users where level='4' "));
echo "V.I.P.-ов: <a href="statistik.php?$ses&mod=vips&ref=$ref"><b>".$vips[0]."</b></a><br/>n";
$filexxx = file("konkurs/adminlist.dat");
$cont = count($filexxx);
echo "Конкурсоведов: <a href="statistik.php?$ses&mod=listkon&ref=$ref"><b>".$cont."</b></a><br/>n";
$filexxx = file("elections/adminlist.dat");
$cont = count($filexxx);
echo "Выборная комиссия: <a href="statistik.php?$ses&mod=listel&ref=$ref"><b>".$cont."</b></a><br/>n";
$filexxx = file("journal/editors.dat");
$cont = count($filexxx);
echo "Редакторов журнала: <a href="statistik.php?$ses&mod=listed&ref=$ref"><b>".$cont."</b></a><br/>n";
$filexxx = file("journal/journalist.dat");
$cont = count($filexxx);
echo "Журналистов: <a href="statistik.php?$ses&mod=listjur&ref=$ref"><b>".$cont."</b></a><br/>n";
echo '--------<br/>';
echo "<a href="statistik.php?$ses&mod=pochet&ref=$ref">Доска почета</a><br/>n
<a href="statistik.php?$ses&mod=nepochet&ref=$ref">Доска позора</a><br/>n
<a href="statistik.php?$ses&mod=10post&ref=$ref">Самые болтливые чатовцы</a><br/>n
<a href="statistik.php?$ses&mod=galery&ref=$ref">Самые фотогиничные чатовцы</a><br/>n
<a href="statistik.php?$ses&mod=10az&ref=$ref">Самые азартные чатовцы</a><br/>n
<a href="statistik.php?$ses&mod=10bog&ref=$ref">Самые богатые чатовцы</a><br/>n
<a href="statistik.php?$ses&mod=10ym&ref=$ref">Самые умные чатовцы</a><br/>n
<a href="statistik.php?$ses&mod=10zag&ref=$ref">Любители загадок</a><br/>n
<a href="statistik.php?$ses&mod=10avt&ref=$ref">Местные авторитеты</a><br/>n
<a href="statistik.php?$ses&mod=referal&ref=$ref">Им особая благодарность</a><br/>n
<a href="statistik.php?$ses&mod=10maf&ref=$ref">Элита преступного мира</a><br/>n";
echo '--------<br/>';
$num = mysql_fetch_array(mysql_query("select count(id) as num from users"));
$usersm = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM users where sex='М'"));
$usersj = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM users where sex='Ж'"));
$dayc = time();
$dayn = strtotime(chat_date);
$dayd = round(($dayc-$dayn)/86400);
echo 'Чат существует дней: <b>' . $dayd . '</b><br/>';
echo 'Сообщений в базе: <b>' . $summa . '</b><br/>';
$letters = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM zapiski "));
echo 'Записок в базе: <b>' . $letters[0] . '</b><br/>';
$vopros = mysql_fetch_array(mysql_query("SELECT COUNT(number) FROM bots "));
echo 'Вопросов в базе: <b>' . $vopros[0] . '</b><br/>';
$zagadka = mysql_fetch_array(mysql_query("SELECT COUNT(number) FROM botg "));
echo 'Загадок в базе: <b>' . $zagadka[0] . '</b><br/>';
$anekdots = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM anekdot "));
$result = mysql_query("SELECT count(`id`) FROM `journal` WHERE `type`='a';");
$cntData = mysql_fetch_row($result);
$count_users = $cntData[0];
$dates = date("d.m.y");
$resultx = mysql_query("SELECT count(`id`) FROM `journal` WHERE `new_date`='".$dates."';");
$cntDatax = mysql_fetch_row($resultx);
$count_usersx = $cntDatax[0];
echo 'Статей в журнале: <b>' . $count_users . '</b><br/>
Статей сегодня: <b>' . $count_usersx . '</b><br/>';
echo 'Анекдотов в базе: <b>' . $anekdots[0] . '</b><br/>';
$shutki = mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM shutki"));
echo 'Шуток в базе: <b>' . $shutki[0] . '</b><br/>';
break;
}
echo '--------<br/>';
if ((isset($rm)) and ($rm != "") and (!isset($pwd))) {
echo "<div class = 'd1'><a href="chat.php?$ses&rm=$rm&ref=$ref">В чат</a></div>n";
} else {
if ($mod) echo "<div class = 'd1'><a href="statistik.php?$ses&ref=$ref">Статистика</a></div>n";
}
echo "<div class = 'd1'><a href="enter.php?$ses&ref=$ref">Прихожая</a></div>n";
echo $fsize2;
include_once "foot.php";
?>