Вход Регистрация
Файл: index.php
Строк: 124
<?
if(!isset($ver)) $ver="wml";
header("Cache-Control: no-store, no-cache, must-revalidate");   
if (
$ver=="wml"header ("Content-type:text/vnd.wap.wml; charset=utf-8");
else if (
$ver=="xhtml"header("Content-Type:text/html; charset=UTF-8");
else 
header ("Content-type:text/vnd.wap.wml; charset=utf-8");
$ref=rand(10000,1000000);         
require(
"inc.php");
$link connect_db();

$setting = @mysql_query ("Select * from setting where klu4='1'");
$set mysql_fetch_array ($setting);

if ((
$ver=="wml")||($ver=="xhtml")){
for (
$n 0$n <= 22$n++){
$room "room".$n;   
$tm time()-300;
$r = @mysql_query ("Select id from $room WHERE id > '".$tm."' group by usid order by id desc");
$asnum mysql_affected_rows();
@
$kol $kol $asnum;
}

if (
$ver=="wml"){
echo 
"<?xml version="1.0" encoding="UTF-8"?>n";
echo 
"<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd">n";
echo "<wml>n";
echo 
"<head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>n";
echo 
"<card id="index" title="бодрый 4ат">n";
echo 
"<p align="center" mode="wrap">n";
}else if (
$ver=="xhtml"){
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>бодрый 4ат</title>";
echo 
"<meta http-equiv="Content-Type" content="text/htmlcharset=utf-8"/></head><body>";
echo 
"<div align="center" mode="wrap">";
}
echo 
"<small>n";
echo 
"bodr_4at By XPYCT v 1.1 BETA<br/>";
echo 
"Добро пожаловать!<br/>";
echo 
$divide;
echo 
"</small>n";
if (
$ver=="xhtml") echo "<form method="POST" action="enter.php?ver=$ver&amp;ref=$ref" name="auth">n";
echo 
"Ваш ID (или ник):<br/>n";
echo 
"<input name="us" maxlength="20" title="nick"/><br/>n";
echo 
"<small>Транслитировать:</small>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 
"<small>";
if (
$ver=="wml"){
echo 
"<anchor title="go">Войти!<go href="enter.php?ver=$ver&amp;ref=$ref" method="post">";
echo 
"<postfield name="us" value="$(us)"/>";
echo 
"<postfield name="ps" value="$(ps)"/>";
echo 
"<postfield name="trun" value="$(trun)"/>n";
echo 
"</go></anchor><br/>";  
}else if (
$ver=="xhtml"){
echo 
"<input type="submit" value="Войти!" name="enter"><br/>";
}
echo 
$divide;
echo 
"<a href="ustav.php?ver=$ver">Устав городка</a><br/>";
echo 
"<a href="reg.php?ver=$ver&amp;mod=reghelp">Регистрация</a><br/>";
echo 
"<a href="lost_pass.php?ver=$ver">Забыли пароль?</a><br/>";
echo 
$divide;
$chl "человек";
if (((
$kol%10==2)||($kol%10==3)||($kol%10==4))&&($kol/10)!=1)$chl "человека";
echo 
"В 4ате: <a href="online.php?ver=$ver"><b>".$kol."</b></a> ".$chl."<br/>";
echo 
"</small>";
$num mysql_fetch_array(mysql_query("select count(id) as num from users where id>9"));
$usersm=mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM users where sex='М' and id>9"));
$usersj=mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM users where sex='Ж' and id>9"));
echo 
"<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."'"));
echo 
"<small>Сегодня: ".$newtoday[0]."</small><br/>n";
$curd=date("d")-1;
$curm=date("m");
$curY=date("Y");
$v "$curd-$curm-$curY";
$newv=mysql_fetch_array(mysql_query("SELECT COUNT(id) from users WHERE date = '".$v."'"));
if(
$curd!="0")echo "<small>Вчера: ".$newv[0]."</small><br/>n";
######
$m=($usersm[0]*100)/$num[0];
$j=($usersj[0]*100)/$num[0];
######
echo "<small>M: ".round($m)."%</small><br/>n";
echo 
"<small>Ж: ".round($j)."%</small><br/>n";
echo 
"<small>n";
echo 
$divide;
echo 
"&#169; <a href="http://chat.bodr.net">chat.bodr.net</a><br/>";
echo "</small>n";
echo 
"<small>n";
echo 
$divide;
echo 
"[<a href="index.php?ver=wml">WML</a>|";
echo 
"<a href="index.php?ver=xhtml">HTML</a>]<br/>";
echo 
"&#169; 2009 By XPYCT<br/>";
echo 
"</small>n";
if (
$ver=="wml")echo "</p></card></wml>";
else if (
$ver=="xhtml") echo "</div></body></html>";
mysql_close ($link);
}
?>
Онлайн: 0
Реклама