Файл: in4at/online.php
Строк: 69
<?php
##################################################################################################
## Script name : In4at ##
## Version : Final ##
## Made by : XPYCT(Сергей Мищенко) ##
## E-mail : bce-ok@bk.ru ##
## ICQ : 447-50-50-62 ##
## Site : http://vkontakte.ru/id31604521 ##
## Внимание! Скрипт распространяется бесплатно! Модификация W4at by XPYCT ##
##################################################################################################
header('Cache-Control: no-cache');
header("Content-type: text/vnd.wap.wml");
$ref=rand(10000,1000000);
define('REQ_2_chat', true);
require('4at_set.php');
require("mysql.php");
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="Ктo гдe?">";
echo '<p align="center"><small>';
for ($n = 11;$n <= 20;$n++){
$room = "room".$n;
$tm = time()-300;
$r = mysql_query("Select who from $room WHERE id > '".$tm."' group by who order by id desc;");
$asnum = mysql_affected_rows();
$siz[$n] = $asnum-1;
@$kolp = $kolp + $asnum-1;
}
$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);
$roomselect21 = mysql_query("Select name from rooms where rm=21");
$rooms21 = mysql_fetch_array($roomselect21);
$roomname21=$rooms21["name"];
echo "<b>Клубы</b>($kolp)<br/>";
echo '---<br/>';
echo "<b>$roomname21</b>(".$kolm."):<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 '---<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");
$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"];
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;
if (($k+1) != $kol) echo ', ';}
}
if($kol>1) echo '<br/>';
unset($lines);
}
echo '---<br/>';
$pr_count = mysql_query("SELECT user FROM users WHERE onl> '".$tm ."' AND room='holl' AND inv='0'");
$kolpe = mysql_affected_rows();
echo "<b>Прихожая</b>($kolpe)<br/>";
for ($k = 0;$k < $kolpe;$k++){
$pdc = mysql_fetch_array($pr_count);
$user = $pdc['user'];
echo $user;
if (($k+1) != $kolpe) echo ', ';
}
if($kol>0) echo '<br/>';
echo '---<br/>';
$kol_al = $kol_all + $kolp + $kolm + $kolpe;
echo '<b>Всего: '.$kol_al.'</b><br/>';
mysql_close($link);
echo '---<br/>';
echo "<a href="reg.php">Peгuстpaцuя</a><br/>";
echo "<a href="index.php">Назад</a><br/>";
echo '</small></p></card></wml>';
?>