<?
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("inc.php");
$link = connect_db();
list($row, $id, $ps, $fsize1, $fsize2) = check_login($link);
require("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>\n";
}else{
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
if($row["skin"]=="0"){echo "<head><link rel=\"stylesheet\" type=\"text/css\" href=\"css/css.css\"/>";}if($row["skin"]=="1"){echo "<head><link rel=\"stylesheet\" type=\"text/css\" href=\"css/css1.css\"/>";}if($row["skin"]=="2"){echo "<head><link rel=\"stylesheet\" type=\"text/css\" href=\"css/css2.css\"/>";}if($row["skin"]=="3"){echo "<head><link rel=\"stylesheet\" type=\"text/css\" href=\"css/css3.css\"/>";}
}
switch($mod) {
case '10ym':
if ($ver=="wml"){
echo "<card id=\"statistik\" title=\"Самые умные\">\n";
echo "<p align=\"center\">\n";
}else{
echo "<title>Самые умные</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "<b>Самые умные</b><br/>\n";
echo $divide;
$resu = @mysql_query ("Select user,credits,credits,id from users order by credits desc limit 0,10;");
$i = 1;
while ($a2 = mysql_fetch_array($resu))
{
echo ($i++).") <a href='info.php?$ses&nk=".$a2["id"]."&ref=$ref'> ".$a2["user"]."</a> (".$a2["credits"]." ответов)<br/>\n";
}
break;
case 'galery':
if ($ver=="wml"){
echo "<card id=\"statistik\" title=\"Самые красивые\">\n";
echo "<p align=\"center\">\n";
}else{
echo "<title>Самые красивые</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "<b>Самые красивые чатовцы</b><br/>\n";
echo $divide;
$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_array($resu))
{
echo ($i++).") ".$a2["user"]."<a href=\"userfoto.php?usid=".$a2['id']."&$ses&ref=$ref\"><img src=\"scr.php?photos/".$a2['img']."\" alt=\"фото\"/></a>(".$a2['votefoto']." голосов)<br/>";
}
break;
case '10az':
if ($ver=="wml"){
echo "<card id=\"statistik\" title=\"Самые азартные\">\n";
echo "<p align=\"center\">\n";
}else{
echo "<title>Самые азартные</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "<b>Самые азартные</b><br/>\n";
echo $divide;
$resu = @mysql_query ("Select user,gposts,id from users order by gposts desc limit 0,10;");
$i = 1;
while ($a2 = mysql_fetch_array($resu))
{
echo ($i++).") <a href='info.php?$ses&nk=".$a2["id"]."&ref=$ref'> ".$a2["user"]."</a> (".$a2["gposts"]." постов)<br/>\n";
}
break;
case '10post':
if ($ver=="wml"){
echo "<card id=\"statistik\" title=\"Самые разговорчивые\">\n";
echo "<p align=\"center\">\n";
}else{
echo "<title>Самые разговорчивые</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "<b>Самые разговорчивые</b><br/>\n";
echo $divide;
$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_array($r))
{
echo ($i++).") <a href='info.php?$ses&nk=".$a["id"]."&ref=$ref'> ".$a["user"]."</a> - ".$a["posts"]."<br/>\n";
}
break;
case '10maf':
if ($ver=="wml"){
echo "<card id=\"statistik\" title=\"Криминальные авторитеты\">\n";
echo "<p align=\"center\">\n";
}else{
echo "<title>Криминальные авторитеты</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "<b>Криминальные авторитеты</b><br/>\n";
echo $divide;
$r2 = @mysql_query ("SELECT user,mafcredits,id FROM users ORDER BY mafcredits desc LIMIT 0,10;");
$i = 1;
while ($a3 = mysql_fetch_array($r2))
{
echo ($i++).") <a href='info.php?$ses&nk=".$a3["id"]."&ref=$ref'> ".$a3["user"]."</a> - ".$a3["mafcredits"]."<br/>\n";
}
break;
case 'newtoday':
if ($ver=="wml"){
echo "<card id=\"statistik\" title=\"Новички сегодня\">\n";
echo "<p align=\"center\">\n";
}else{
echo "<title>Новички сегодня</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
$curdate=date("d-m-Y");
$r = mysql_query("SELECT id,user FROM users WHERE date = '".$curdate."'");
echo "<b>Новички сегодня</b><br/>\n";
echo $divide;
if (mysql_affected_rows() == 0) {
echo "Сегодня нет новичков<br/>\n";
} 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\">$nick</a><br/>\n";
$a = mysql_fetch_array($r);
}
}
break;
case 'fullignor':
if ($ver=="wml"){
echo "<card id=\"statistik\" title=\"Полный игнор\">\n";
echo "<p align=\"center\">\n";
}else{
echo "<title>Полный игнор</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
$r = mysql_query("SELECT id,user FROM users WHERE inv = '2'");
echo "ВЫСШАЯ МЕРА НАКАЗАНИЯ. Их не видет никто в чате.<br/>\n";
echo $divide;
if (mysql_affected_rows() == 0) {
echo "Список Полного игнора пуст.<br/>\n";
} 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\">$nick</a><br/>\n";
$a = mysql_fetch_array($r);
}
}
break;
case 'birthday':
if ($ver=="wml"){
echo "<card id=\"statistik\" title=\"Именинники\">\n";
echo "<p align=\"center\">\n";
}else{
echo "<title>Именинники</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
$d=date("d-m-");
$y=date("Y");
$select = mysql_query ("Select id,user,birth from users where birth LIKE '%$d%'");
echo "<b>Имениннники сегодня</b><br/>\n";
echo $divide;
if (mysql_affected_rows() == 0) {
echo "Сегодня нет именинников<br/>\n";
} else {
$i = 1;
while ($inf = @mysql_fetch_array ($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)||($age==0)||($age=="")||($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 'banned':
if ($ver=="wml"){
echo "<card id=\"statistik\" title=\"Забаненные\">\n";
echo "<p align=\"center\">\n";
}else{
echo "<title>Забаненные</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "<b>Забаненные IP</b><br/>\n";
echo $divide;
$file = file("log/ban.dat");
$total = count($file);
if (empty($_GET['start'])) $start = 0;
else $start = $_GET['start'];
if ($total < $start + 10){ $end = $total; }
else {$end = $start + 10; }
for ($i = $start; $i < $end; $i++){
$file = file("log/ban.dat");
$file = array_reverse($file);
$data = explode("|",$file[$i]);
$i2=round($i+1);
$num=$total-$i-1;
echo $i2.'. '.$data[1].' ('.$data[2].')<hr/>';}
if($total<1){echo'<br/><b>CПИСОК ЧИСТ</b><br/><br/>';}
if ($start != 0) {echo '<a href="statistik.php?'.$ses.'&go=banned&start='.($start - 10).''.$takep.'"><-Назад </a> ';}else{echo'<-Назад ';}
echo'|';
if ($total > $start + 10) {echo ' <a href="statistik.php?'.$ses.'&go=banned&start='.($start + 10).''.$takep.'">Далее-></a>';}else{echo' Далее->';}
break;
case 'admins':
if ($ver=="wml"){
echo "<card id=\"statistik\" title=\"Админы\">\n";
echo "<p align=\"center\">\n";
}else{
echo "<title>Админы</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "<b>Всеми любимые Админы</b><br/>\n";
echo $divide;
$r = mysql_query("SELECT id,user FROM users WHERE level = '7'");
if (mysql_affected_rows() == 0) {
echo "Админов нет (:<br/>\n";
} 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\">".$nick."</a><br/>\n";
$a = mysql_fetch_array($r);
}
}
break;
case 'sysadmin':
if ($ver=="wml"){
echo "<card id=\"statistik\" title=\"Супер Админы\">\n";
echo "<p align=\"center\">\n";
}else{
echo "<title>Супер Админы</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "<b>Всеми любимые Супер Админы</b><br/>\n";
echo $divide;
$r = mysql_query("SELECT id,user FROM users WHERE (level='8')&&(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\">".$nick."</a><br/>\n";
$a = mysql_fetch_array($r);
}
break;
case 'smoders':
if ($ver=="wml"){
echo "<card id=\"statistik\" title=\"Старшие модеры\">\n";
echo "<p align=\"center\">\n";
}else{
echo "<title>Старшие модеры</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "<b>Старшие Модеры</b><br/>\n";
echo $divide;
$r = mysql_query("SELECT id,user FROM users WHERE level = '6'");
if (mysql_affected_rows() == 0) {
echo "Вакансия свободна<br/>\n";
} 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\">".$nick."</a><br/>\n";
$a = mysql_fetch_array($r);
}
}
break;
case 'moders':
if ($ver=="wml"){
echo "<card id=\"statistik\" title=\"Киллеры\">\n";
echo "<p align=\"center\">\n";
}else{
echo "<title>Киллеры</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "<b>Киллеры</b><br/>\n";
echo $divide;
$r = mysql_query("SELECT id,user FROM users WHERE level = '5'");
if (mysql_affected_rows() == 0) {
echo "Вакансия свободна<br/>\n";
} 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\">".$nick."</a><br/>\n";
$a = mysql_fetch_array($r);
}
}
break;
case 'vips':
if ($ver=="wml"){
echo "<card id=\"statistik\" title=\"V.I.P.-ы\">\n";
echo "<p align=\"center\">\n";
}else{
echo "<title>V.I.P.-ы</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "<b>V.I.P.-ы</b><br/>\n";
echo $divide;
$r = mysql_query("SELECT id,user FROM users WHERE level = '4'");
if (mysql_affected_rows() == 0) {
echo "Вакансия свободна<br/>\n";
} 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\">".$nick."</a><br/>\n";
$a = mysql_fetch_array($r);
}
}
break;
case 'm':
if ($ver=="wml"){
echo "<card id=\"statistik\" title=\"Парни чата!\">\n";
echo "<p align=\"center\">\n";
}else{
echo "<title>Парни чата!</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "<b>Парни чата!</b><br/>";
echo $divide;
$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 $divide;
$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\">".$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 $divide;
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";
echo "<p align=\"center\">\n";
}else{
echo "<title>Брачные пары чата!</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "<b>Брачные пары чата!</b><br/>";
echo $divide;
$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 $divide;
$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='$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\">".$login."</a> + <a href=\"info.php?$ses&nk=$usidx&ref=$ref\">".$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 $divide;
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";
echo "<p align=\"center\">\n";
}else{
echo "<title>Все юзеры чата!</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "<b>Все юзеры чата!</b><br/>";
echo $divide;
$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 $divide;
$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\">".$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 $divide;
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";
echo "<p align=\"center\">\n";
}else{
echo "<title>Доска почета!</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "<b>Доска почета!</b><br/>";
echo $divide;
$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 ='$posts';");
$arrx = mysql_fetch_array($rx);
$idx=$arrx[0];
$userx=$arrx[1];
echo"Самый разговорчивый: <a href=\"info.php?$ses&nk=$idx&ref=$ref\"><b>$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 ='$posts';");
$arrx = mysql_fetch_array($rx);
$idx=$arrx[0];
$userx=$arrx[1];
echo"<br/>Самый богатый кредитами: <a href=\"info.php?$ses&nk=$idx&ref=$ref\"><b>$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 ='$posts';");
$arrx = mysql_fetch_array($rx);
$idx=$arrx[0];
$userx=$arrx[1];
echo"<br/>Самый умный: <a href=\"info.php?$ses&nk=$idx&ref=$ref\"><b>$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 ='$posts';");
$arrx = mysql_fetch_array($rx);
$idx=$arrx[0];
$userx=$arrx[1];
echo"<br/>Главый мафиози: <a href=\"info.php?$ses&nk=$idx&ref=$ref\"><b>$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 ='$posts';");
$arrx = mysql_fetch_array($rx);
$idx=$arrx[0];
$userx=$arrx[1];
echo"<br/>Самый фотогиничный: <a href=\"info.php?$ses&nk=$idx&ref=$ref\"><b>$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 ='$posts' and sex ='Ж';");
$arrx = mysql_fetch_array($rx);
$idx=$arrx[0];
$userx=$arrx[1];
echo"<hr/>Самая разговорчивая: <a href=\"info.php?$ses&nk=$idx&ref=$ref\"><b>$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 ='$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>$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 ='$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>$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 ='$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>$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 ='$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>$userx</b></a> ($posts голосов)";
break;
case 'listkon':
if ($ver=="wml"){
echo "<card id=\"statistik\" title=\"Список конкурсоведов!\">\n";
echo "<p align=\"center\">\n";
}else{
echo "<title>Список конкурсоведов</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "<b>Список конкурсоведов</b>";
echo $divide;
$file = file("konkurs/adminlist.dat");
$total = count($file);
if (empty($_GET['start'])) $start = 0;
else $start = $_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'> $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 && $asd>0){echo ' <a href="statistik.php?mod=listkon&start=0&'.$ses.'&ref='.$ref.'">1</a> ... ';}
for($i=$asd; $i<$asd2;)
{
if($i<$total && $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";
echo "<p align=\"center\">\n";
}else{
echo "<title>Список участников выборной комиссии</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "<b>Список УВК</b>";
echo $divide;
$file = file("elections/adminlist.dat");
$total = count($file);
if (empty($_GET['start'])) $start = 0;
else $start = $_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'> $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 && $asd>0){echo ' <a href="statistik.php?mod=listel&start=0&'.$ses.'&ref='.$ref.'">1</a> ... ';}
for($i=$asd; $i<$asd2;)
{
if($i<$total && $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";
echo "<p align=\"center\">\n";
}else{
echo "<title>Журналисты чата</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "<b>Список журналистов</b>";
echo $divide;
$file = file("journal/journalist.dat");
$total = count($file);
if (empty($_GET['start'])) $start = 0;
else $start = $_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'> $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 && $asd>0){echo ' <a href="statistik.php?mod=listel&start=0&'.$ses.'&ref='.$ref.'">1</a> ... ';}
for($i=$asd; $i<$asd2;)
{
if($i<$total && $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";
echo "<p align=\"center\">\n";
}else{
echo "<title>Список редакторов журнала чата</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "<b>Список редакторов журнала</b>";
echo $divide;
$file = file("journal/editors.dat");
$total = count($file);
if (empty($_GET['start'])) $start = 0;
else $start = $_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'> $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 && $asd>0){echo ' <a href="statistik.php?mod=listel&start=0&'.$ses.'&ref='.$ref.'">1</a> ... ';}
for($i=$asd; $i<$asd2;)
{
if($i<$total && $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";
echo "<p align=\"center\">\n";
}else{
echo "<title>Доска позора :)</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "<b>Доска позора :)</b><br/>";
echo $divide;
$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 ='$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>$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>$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 ='$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>$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 ='$posts' and sex ='Ж' and posts!='0';");
$arrx = mysql_fetch_array($rx);
$idx=$arrx[0];
$userx=$arrx[1];
echo"<hr/>Самая неразговорчивая: <a href=\"info.php?$ses&nk=$idx&ref=$ref\"><b>$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 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>$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 ='$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>$userx</b></a> ($posts очков)";
break;
case 'photo':
if ($ver=="wml"){
echo "<card id=\"statistik\" title=\"Чатлане с фото!\">\n";
echo "<p align=\"center\">\n";
}else{
echo "<title>Чатлане с фото!</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "<b>Чатлане с фото!</b><br/>";
echo $divide;
$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 $divide;
$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\">".$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 $divide;
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";
echo "<p align=\"center\">\n";
}else{
echo "<title>Девушки чата!</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "<b>Девушки чата!</b><br/>";
echo $divide;
$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 $divide;
$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\">".$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 $divide;
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";
echo "<p align=\"center\">\n";
}else{
echo "<title>Статистика чата!</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\">";
}
echo $fsize1;
echo "<b>Статистика чата</b><br/>\n";
echo $divide;
$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";
echo "С фотками: <a href=\"statistik.php?$ses&mod=photo&ref=$ref\">".$ph[0]."</a><br/>\n";
echo "Парней: <a href=\"statistik.php?$ses&mod=m&ref=$ref\">".$usersm[0]."</a><br/>\n";
echo "Девушек: <a href=\"statistik.php?$ses&mod=zh&ref=$ref\">".$usersj[0]."</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\">$kolsv</a><br/>";
$svadb=mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM sertificat;"));
$kolsv = $svadb[0];
echo"Брачных сертификатов: <a href=\"sertificat.php?$ses&ref=$ref\">$kolsv</a>";
echo $divide;
$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\">".$newtoday[0]."</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\">".$birth[0]."</a><br/>\n";
if ($row["level"]>6){
$file = file("log/ban.dat");
$total = count($file);
echo "Забанненные IP+SOFT: <a href=\"statistik.php?$ses&mod=banned&ref=$ref\">".$total."</a><br/>\n";
$fullignor = mysql_fetch_array(mysql_query ("Select count(id) from users where inv = '2'"));
echo "Полный Игнор: <a href=\"statistik.php?$ses&mod=fullignor&ref=$ref\">".$fullignor[0]."</a><br/>\n";
}
echo $divide;
$sadmins=mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM users where (level='8')&&(id!=10)"));
echo "Супер-Админoв: <a href=\"statistik.php?$ses&mod=sysadmin&ref=$ref\">".$sadmins[0]."</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\">".$admins[0]."</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\">".$smods[0]."</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\">".$mods[0]."</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\">".$vips[0]."</a><br/>\n";
$filexxx=file("konkurs/adminlist.dat");
$cont=count($filexxx);
echo "Конкурсоведов: <a href=\"statistik.php?$ses&mod=listkon&ref=$ref\">".$cont."</a><br/>\n";
$filexxx=file("elections/adminlist.dat");
$cont=count($filexxx);
echo "Выборная комиссия: <a href=\"statistik.php?$ses&mod=listel&ref=$ref\">".$cont."</a><br/>\n";
$filexxx=file("journal/editors.dat");
$cont=count($filexxx);
echo "Редакторов журнала: <a href=\"statistik.php?$ses&mod=listed&ref=$ref\">".$cont."</a><br/>\n";
$filexxx=file("journal/journalist.dat");
$cont=count($filexxx);
echo "Журналистов: <a href=\"statistik.php?$ses&mod=listjur&ref=$ref\">".$cont."</a><br/>\n";
echo $divide;
echo "<a href=\"statistik.php?$ses&mod=pochet&ref=$ref\">Доска почета</a><br/>\n";
echo "<a href=\"statistik.php?$ses&mod=nepochet&ref=$ref\">Доска позора :)</a><br/>\n";
echo "<a href=\"statistik.php?$ses&mod=10post&ref=$ref\">Самые болтливые чатовцы</a><br/>\n";
echo "<a href=\"statistik.php?$ses&mod=galery&ref=$ref\">Самые фотогиничные чатовцы</a><br/>\n";
echo "<a href=\"statistik.php?$ses&mod=10az&ref=$ref\">Самые азартные чатовцы</a><br/>\n";
echo "<a href=\"statistik.php?$ses&mod=10ym&ref=$ref\">Самые умные чатовцы</a><br/>\n";
echo "<a href=\"statistik.php?$ses&mod=10maf&ref=$ref\">Элита преступного мира</a><br/>\n";
echo $divide;
echo "Сообщений в базе: <b>".$summa."</b><br/>\n";
$letters=mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM zapiski "));
echo "Записок в базе: <b>".$letters[0]."</b><br/>\n";
$vopros=mysql_fetch_array(mysql_query("SELECT COUNT(number) FROM bots "));
echo "Вопросов в базе: <b>".$vopros[0]."</b><br/>\n";
$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/>\n";
echo "Статей сегодня: <b>".$count_usersx."</b><br/>\n";
echo "Анекдотов в базе: <b>".$anekdots[0]."</b><br/>\n";
$shutki=mysql_fetch_array(mysql_query("SELECT COUNT(klu4) FROM shutki "));
echo "Шуток в базе: <b>".$shutki[0]."</b><br/>\n";
break;
}
echo $divide;
if ((isset($rm))&&($rm!="")&&(!isset($pwd))){
echo "<a href=\"chat.php?$ses&rm=$rm&ref=$ref\">В чат</a><br/>\n";
}else{
if($mod) echo "<a href=\"statistik.php?$ses&ref=$ref\">Статистика</a><br/>\n";
}
echo "<a href=\"enter.php?$ses&ref=$ref\">Прихожая</a><br/>\n";
echo $fsize2;
include_once"foot2.php";
?>