File size: 6.3Kb
<?
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Content-Type:text/html; charset=UTF-8");
$ver="xhtml";
$inv = intval($inv);
if(!empty($inv))
$inv_url = '&inv='.$inv;
$ref=rand(10000,1000000);
require("inc.php");
$link = connect_db();
$setting = @mysql_query ("Select * from setting where klu4='1'");
$set = mysql_fetch_array ($setting);
for ($n = 0; $n <= 23; $n++){
$room = "room".$n;
$tm = time()-300;
$r = @mysql_query ("Select id from $room WHERE id > '".$tm."' and who !='Пиздатый бот' and who !='Система' and who !='Умница' and who !='Афоризм-Бот' and who !='4at-Bot' and who !='Мафиози' and who !='Шутник' and who !='Системный бот' group by usid order by id desc");
$asnum = mysql_affected_rows();
@$kol = $kol + $asnum;
}
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\">";
echo "<head><link rel=\"stylesheet\" type=\"text/css\" href=\"css/css.css\"/>";
echo "<title>Wap-Чат</title>";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/></head><body>";
echo "<div align=\"center\" mode=\"wrap\">";
echo "<div class='d3'>";
include_once "welcome.dat";
echo"</div><br/><br/>";
echo "<img src = \"logo.gif\"/><br>";
$chl = "человек";
if ((($kol%10==2)||($kol%10==3)||($kol%10==4))&&($kol/10)!=1)$chl = "человека";
echo "<div class = 'd1'>В чате: <a href=\"online.php?ver=".$ver.$inv_url."\">".$kol."</a> ".$chl."<br/></div><br/>";
$tttimedf = time();
$fpsdf = $tttimedf-300;
$rdf = mysql_query("SELECT count(`id`) FROM `users` WHERE lastdate>='" . intval($fpsdf) . "';");
$cdf = mysql_fetch_row($rdf);
$count = $cdf[0];
$chl = "человек";
if ((($count%10==2)||($count%10==3)||($count%10==4))&&($count/10)!=1)$chl = "человека";
echo "<small>На форуме: $count $chl</small><br/><br/>";
if ($ver=="xhtml") echo "<form method=\"POST\" action=\"in.php?ref=$ref&ver=".$ver."\" name=\"auth\">\n";
echo "Ваш ник/ID:<br/>\n";
echo "<input name=\"us\" maxlength=\"20\" title=\"nick\"/><br/>\n";
echo "<small>Транслитировать:<a href=\"trunhelp.php?ver=$ver&url=$url\">(?)</a></small><br/>\n";
echo "<select name=\"trun\">\n";
echo "<option value=\"0\">Нет</option>\n";
echo "<option value=\"1\">Да</option>\n";
echo "</select><br/>\n";
echo "Пароль:<br/>\n";
echo "<input type=\"password\" name=\"ps\" maxlength=\"20\" title=\"password\"/><br/>\n";
echo "Войти в:<br/>";
echo "<select name=\"rm\">";
$q = @mysql_query("select * from rooms where vid='1' and rm<=13;");
echo "<option value=\"enter\">Прихожая</option>";
while ($dbdata = @mysql_fetch_array($q)) {
$val1=$dbdata["name"];
$rm=$dbdata["rm"];
$vid=$dbdata["vid"];
$room="room".$rm;
$tm = time()-300;
if ($rm==10)$res = @mysql_query ("Select who,hid,pwd,usid from $room WHERE id > '".$tm."' group by who order by id desc;");
else $res = @mysql_query ("Select who,hid,usid from $room WHERE id > '".$tm."' group by who order by id desc;");
echo " ".mysql_error()." ";
$kol = mysql_affected_rows();
$siz[$rm] = $kol;
echo "<option value=\"".$rm."\">".$val1."($siz[$rm])</option>";
}
echo "</select><br/>";
if ($ver=="xtml"){
echo "<anchor title=\"go\">Войти<go href=\"in.php?ref=$ref&ver=".$ver."\" method=\"post\">";
echo "<postfield name=\"us\" value=\"$(us)\"/>";
echo "<postfield name=\"ps\" value=\"$(ps)\"/>";
echo "<postfield name=\"trun\" value=\"$(trun)\"/>\n";
echo "<postfield name=\"rm\" value=\"$(rm)\"/>\n";
echo "</go></anchor>";
}else if ($ver=="xhtml"){
echo "<input type=\"Image\" src=\"but.gif\" value=\"Войти\"/></form>";
}
echo "<div class='d1'>[<a href=\"reg.php?mod=reghelp&ver=".$ver.$inv_url."\"><b>Регистрация</b></a>]<br/>";
echo "[<a href=\"ustav.php?ver=$ver&url=$url\">Правила чата</a>]<br/>";
echo "[<a href=\"adminam.php?ver=$ver&url=$url\">Админам сайтов</a>]</div>";
echo "</small>";
$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 '<small><u>Чат существует дней: '.$dayd.'</u></small><br/>';
echo "<br/><fieldset><small>Регистраций: ".$num[0]."</small><br/>\n";
$curdate=date("d-m-Y");
$newtoday=mysql_fetch_array(mysql_query("SELECT COUNT(id) from users WHERE date = '".$curdate."'"));
if ($newtoday[0]>0){
echo "<small>Новичков: ".$newtoday[0]."</small><br/>\n";
}else{echo "<small>Новичков: 0</small><br/>\n";}
$q = mysql_query("SELECT COUNT(id) from users where banned='1';");
$row=mysql_fetch_row($q);
$banned=$row[0];
if ($banned>0){
echo "<small>Забанено ников: ".$banned."</small><br/>\n";
}else{echo "<small>Забанено ников: 0</small><br/>\n";}
echo "<small>Парней: ".$usersm[0]."</small><br/>\n";
echo "<small>Девушек: ".$usersj[0]."</small><br/>\n";
echo "</fieldset>";
echo "</small>\n";
if($set["link1"]!="") echo "<small><a href=\"http://".$set["link1"]."?ver=".$ver.$inv_url."\">".$set["link1_name"]."</a></small><br/>\n";
if($set["link2"]!="") echo "<small><a href=\"http://".$set["link2"]."?ver=".$ver.$inv_url."\">".$set["link2_name"]."</a></small><br/>\n";
if($set["link3"]!="") echo "<small><a href=\"http://".$set["link3"]."?ver=".$ver.$inv_url."\">".$set["link3_name"]."</a></small><br/>\n";
$Contents = ob_get_contents();
$gzib_file = strlen($Contents);
if ($support_deflate) {
$gzib_file_out = strlen(gzdeflate($Contents,9));
} else{
if($support_gzip){
$gzib_file_out = strlen(gzencode($Contents,9));
} else {
if($support_x_gzip){
$gzib_file_out = strlen(gzcompress($Contents,9));
}else {
$gzib_file_out = strlen($Contents);
}}}
$gzib_pro=round(100-(100/($gzib_file/$gzib_file_out)),1);
if($gzib_pro > 0 && $gzib_pro < 100){
echo '<br/><small>Cжатие: '.$gzib_pro.'% </small>';}
echo"<br/><a href=\"http://$url\">$url</a><div class='d2'>";
echo"<small>Выбор версии:<br/>";
echo "WML\n|\n";
echo "XHTML<br/>";
echo "© $url<br/>";
echo "</small></div>\n";
echo "</div></body></html>";
mysql_close ($link);
?>