View file ch/index.php

File size: 3.28Kb
<?
list($msec,$sec)=explode(chr(32),microtime());$HeadTime=$sec+$msec;
header("Cache-Control: no-cache");
header("Content-type:text/vnd.wap.wml");   
$ref=rand(10000,1000000);         
require("inc.php");
$link = @mysql_pconnect ($MySQL_Hostname, $MySQL_Username, $MySQL_Password)
                or die ("<wml>
<card id=\"error\" title=\"error...\">
<do type=\"prev\" label=\"Back\"><prev/></do><p align=\"center\">Can not connect to MySQL<br/>".mysql_error()."</p>
</card>
</wml>");
     @mysql_select_db($MySQLDatabasename) or die ("<wml>
<card id=\"error\" title=\"error...\">
<do type=\"prev\" label=\"Back\"><prev/></do><p align=\"center\">error select the database...<br/>".mysql_error()."</p>
</card>
</wml>"); 
for ($n = 0; $n <= 10; $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-1;
}
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=\"&#x427;&#x430;&#x442;\">\n";
echo "<p align=\"center\" mode=\"wrap\">\n";
echo "<small>&#x414;&#x43E;&#x431;&#x440;&#x43E; &#x43F;&#x43E;&#x436;&#x430;&#x43B;&#x43E;&#x432;&#x430;&#x442;&#x44C;!</small><br/>";
echo '<img src="chat.gif" alt="=)"/><br/>';
echo "<small><b>CHAT.NeoFan.ORG</b></small><br/>";
$chl = "&#1095;&#1077;&#1083;&#1086;&#1074;&#1077;&#1082;";
if ((($kol%10==2)||($kol%10==3)||($kol%10==4))&&($kol/10)!=1)$chl = "&#1095;&#1077;&#1083;&#1086;&#1074;&#1077;&#1082;&#1072;";
echo "<small>B &#x447;a&#x442;e <a href=\"online.php\">$kol</a> $chl</small><br/><br/>";
echo "<small>&#x41D;&#x438;&#x43A; &amp; ID:</small><br/>\n";
echo "<input name=\"us\" maxlength=\"10\" title=\"nick\"/><br/>";
echo "<select name=\"transnick\" multiple=\"true\">";
echo "<option value=\"1\">&#x422;&#x440;&#x430;&#x43D;&#x441;&#x43B;&#x438;&#x442; &#x43D;&#x438;&#x43A;&#x430;</option></select><br/>";
echo "<small>&#1055;&#1072;&#1088;&#1086;&#1083;&#1100;:</small><br/>\n";
echo "<input name=\"ps\" maxlength=\"10\" title=\"password\"/><br/>\n";
echo "<small>&#x412;&#x445;&#x43E;&#x434; &#x43F;&#x43E;:</small><br/>";
echo "<small><anchor title=\"go\">[&#x41D;&#x438;&#x43A;]<go href=\"enter.php?ref=$ref\" method=\"post\">";
echo "<postfield name=\"us\" value=\"$(us)\"/>";
echo "<postfield name=\"transnick\" value=\"$(transnick)\"/>";
echo "<postfield name=\"ps\" value=\"$(ps)\"/>";
echo "</go></anchor> &amp; ";
echo "<anchor title=\"go\">[ID]<go href=\"enter.php?ref=$ref\" method=\"post\">\n";
echo "<postfield name=\"id\" value=\"$(us)\"/>\n";
echo "<postfield name=\"ps\" value=\"$(ps)\"/>\n";
echo "</go></anchor><br/>\n";
echo "<br/>\n";
echo "<a href=\"reg.php?mod=reghelp\">&#x420;&#x435;&#x433;&#x438;&#x441;&#x442;&#x440;&#x430;&#x446;&#x438;&#x44F;</a><br/></small>\n";
$r = mysql_query("select count(id) as num from users");
$a = mysql_fetch_array($r);
$num = $a["num"];
echo "<small>Pe&#x433;uc&#x442;pa&#x446;u&#x439; <b>$num</b></small><br/>\n";
echo "<small><br/>(c) <a href=\"http://neofan.org\">WAP.NeoFan.ORG</a></small>\n";
echo "</p></card></wml>";
mysql_close ($link);
?>