Файл: region_clean/index.php
Строк: 156
<?php
#######################################
## Mod By KoT (borispol) [76-75-072] ##
#######################################
require_once 'start.php';
require_once 'sid.php';
header("Cache-Control: no-store, no-cache, must-revalidate");
$ver = empty($ver) || ($ver != 'wml' && !file_exists('css/css.css')) ? 'xhtml' : $ver;
if ($ver == "wml") header ("Content-type:text/vnd.wap.wml; charset=utf-8");
else header("Content-Type:text/html; charset=UTF-8");
if (!empty($inv)) {
$inv = (int)$_GET['inv'];
$inv_url = '&inv='.$inv;
}
$ref = mt_rand(10000,1000000);
require_once "inc.php";
$link = connect_db();
$setting = mysql_query ("Select * from setting where klu4='1'");
$set = mysql_fetch_array ($setting);
require_once "version.php";
if (($ver == "wml") or ($ver == "xhtml")) {
if ($ver == "wml")
{
echo '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd">
<wml>
<head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>
<card id="index" title="Уютный-Чат=)">
<p align="center" mode="wrap">';
}
elseif ($ver == "xhtml")
{
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"/>
<title>Уютный-Чат=)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="center" mode="wrap">';
}
if (isset($isset) == "403") {
echo '<div align="center"><font color="#FF0000"><b>ERROR 403<br>Недопустимый запрос</b></font><br></div>';
}
include_once "welcome.dat";
if ($fotogav == 1) {
$resu = mysql_query ("Select * from users where img!='' order by votefoto desc limit 1;");
$a2 = mysql_fetch_array($resu);
echo "<br/><b>".$a2['user']."</b><br/><img src="scr2.php?photos/".$a2['img']."" alt="фото"/>";
}
elseif ($fotogav == 2)
{
$result = mysql_query ("Select * from users where img!='' order by rand() limit 1;");
$rand = mysql_num_rows($result);
if ($rand > 0) {
$xx = mysql_result($result,0,"id");
$xx0 = mysql_result($result,0,"user");
$xx1 = mysql_result($result,0,"img");
$zz = $xx1;
echo "<br/><b>".$xx0."</b><br/><img src="scr2.php?photos/".$xx1."" alt="$xx0"/><br/>";
}
}
else
{
echo '<br/><img src="icon/logo.png" alt="logo"/><br/>';
}
echo '<a href="view.php?ver='.$ver.'">Что такое 4atlove.ru?</a><br/>';
if ($ver == "xhtml") echo '<form method="POST" action="enter.php?ver='.$ver.'&ref='.$ref.'" name="auth">';
echo '<br/><b>Ник или ID:</b><br/>
<input name="us" class="text" maxlength="20" value="" title="nick"/><br/>
Транслит:<a href="trunhelp.php?ver='.$ver.$inv_url.'">(?)</a><input type="checkbox" name="trun" value="1"/><br/>
<br/><b>Пароль:</b><br/>
<input type="password" name="ps" class="text" maxlength="20" value="" title="password"/><br/>';
if ($ver == "wml") {
echo '[<anchor title="go">Вход<go href="enter.php?ver='.$ver.'&ref='.$ref.'" method="post">
<postfield name="us" value="$(us)"/>
<postfield name="ps" value="$(ps)"/>
<postfield name="trun" value="$(trun)"/>
</go></anchor>]<br/>';
}
else if ($ver == "xhtml")
{
echo '<input type="Image" src="icon/but.gif" value="Войти"/></form>';
}
echo $divide;
for ($n = 0; $n <= 23; $n++) {
$room = "room" . $n;
$tm = time() - 100;
$r = mysql_query ("Select usid,id from $room WHERE id > '".$tm."' and usid != '1' and usid != '2' and usid != '3' and usid != '4' and usid != '5' and usid != '6' and usid != '7' and usid != '8' and usid != '9' and usid != '11' group by usid order by id desc");
$asnum = mysql_affected_rows();
@$kol = $kol + $asnum;
}
$pr_count = mysql_query("SELECT * FROM users WHERE onl> '".$tm ."' AND room='holl' group by user order by onl desc;");
$asnumspr = mysql_affected_rows();
@$kolpr = $kolpr + $asnumspr;
$tm = time() - 100;
$r = mysql_query ("Select usid,who from room23 WHERE id > '".$tm."' and usid != '1' and usid != '2' and usid != '3' and usid != '4' and usid != '5' and usid != '6' and usid != '7' and usid != '8' and usid != '9' and usid != '11' group by who order by id desc;");
$asnum3 = mysql_affected_rows();
@$kols = $kol + $kolp + $kolpr + $asnum3;
$chl = "человек";
if ((($kols%10 == 2) or ($kols%10 == 3) or ($kols%10 == 4)) and ($kols/10) != 1) $chl = "человека";
echo 'Онлайн: <b>' . $kols . '</b> ' . $chl . '<br/>---<br/>';
echo '<a href="part.php?ver='.$ver.'">Наши партнеры</a><br/>
<a href="reg.php?mod=reghelp&ver='.$ver.$inv_url.'">Регистрация</a><br/>';
echo $divide;
$num = mysql_fetch_array(mysql_query("select count(id) as num from users"));
echo '<small>Регистраций: ' . $num[0] . '</small><br/>';
$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/>';
}
else
{
echo '<small>Сегодня: 0</small><br />';
}
$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 and $gzib_pro < 100) {
echo '<br/><small>Cжатие: ' . $gzib_pro . '% </small>';
}
echo '<br/><div class = "d1"><b>:: ' . $url . ' ::</b></div>';
if ($ver == "xhtml") echo '<div class = "d2"><a href = "index.php?ver=wml">[WML</a>|xHTML]</div>';
elseif ($ver == "wml") echo '[WML|<a href = "index.php?ver=xhtml">xHTML</a>]';
if ($ver == "xhtml") echo '</div></body></html>';
else if ($ver == "wml") echo '</p></card></wml>';
mysql_close ($link);
}
?>