File size: 3.49Kb
<?
//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\"><small>Can not connect to MySQL</small></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\"><small>error select the database...</small></p>
</card></wml>");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.2//EN\" \"http://www.wapforum.org/DTD/wml12.dtd\">";
echo "<wml>";
echo "<head><meta http-equiv=\"Cache-Control\" content=\"no-cache\" forua=\"true\"/></head>";
echo "<card id=\"who\" title=\"Кто где?\">";
echo "<p align=\"center\"><small>";
@$rooms = array ("Викторина","Воздушный Замок","Жемчужная Река","Седьмое Небо","Лунная Соната","Храм Ангелов","Райский Уголок","Темница","Высший Совет","Зоопарк");
$tm = time()-300;
$ingame = "";
$outgame = "";
$res = @mysql_query ("Select * from maf1 WHERE id > '".$tm."' group by usid order by id desc");
$kol = mysql_affected_rows();
@$kolm = $kolm + $kol-1;
$lines = mysql_fetch_array ($res); //Топик - не нужен
//if($num!=0)echo "<br/>\n";
$roomselect21 = @mysql_query ("Select name from rooms where rm=21");
$rooms21 = @mysql_fetch_array($roomselect21);
$roomname21=$rooms21["name"];
echo "$roomname21(".$kolm."):<br/>\n";
echo "<b>Р’ РёРіСЂРµ:</b><br/>\n";
for ($k = 1; $k < $kol; $k++){
$lines = mysql_fetch_array ($res);
$user = $lines["who"];
$user_id = $lines["usid"];
$r = mysql_query("select * from ingame1 WHERE gamer_id = '".$user_id."'");
$a = mysql_fetch_array($r);
$id_in_game = $a["id_in_game"];
if (mysql_affected_rows()!=0) $ingame = $ingame."$user($id_in_game), "; else $outgame = $outgame."$user, ";
}
unset($lines);
echo "$ingame<br/>\n";
echo "<b>Р’РЅРµ РёРіСЂС‹:</b><br/>\n";
echo "$outgame<br/>\n";
echo "---<br/>";
for ($num = 0; $num <= 9; $num++)
{
$room = "room".$num;
$tm = time()-300;
$res = @mysql_query ("Select who,hid from $room WHERE id > '".$tm."' group by who order by id desc");
echo " ".mysql_error()." ";
$kol = mysql_affected_rows();
$kol_all += ($kol-1);
$lines = mysql_fetch_array ($res); //Топик - не нужен
$roomselect = @mysql_query ("Select name from rooms where rm=$num");
$rooms = @mysql_fetch_array($roomselect);
$roomname=$rooms["name"];
if($num==9){
echo "<b>$roomname</b>(".($kol-1)."):<br/>";
} else{
echo "<b>$roomname</b>(".($kol-1)."):<br/>";
}
for ($k = 1; $k < $kol; $k++)
{
$lines = mysql_fetch_array ($res);
$user = $lines["who"];
$hd = $lines["hid"];
if ($hd != 1)
echo "$user";
else
if ($row["level"] > 6) echo "$user(invisible)";
if (($k+1) != $kol) print ', ';
}
if($kol>1)
echo "<br/>";
unset($lines);
}
echo "---<br/>";
print '<b>Всего: '.$kol_all.'</b><br/>';
echo "---<br/>";
print "<a href=\"reg.php\">Регистрация</a><br/>";
print "<a href=\"index.php\">← Назад</a><br/>";
echo "</small></p></card></wml>";
?>