Файл: mafia/whoroom.php
Строк: 28
<?
require'../shaxty.php'; // waphp.ru - закрытый клуб вап мастеров!
$align='left';
check_login();
$title='Кто в Мафии?';
include_once (H.'shaxty/head.php');
$rmmaf = check(intval($_GET['rmmaf']));
if (!ctype_digit($rmmaf)) { header("Location: index.php"); die; }
$us = $user['user'];
$mafid = 0;
$rmafaction = "mafaction".$rmmaf;
$rscores = "scores".$rmmaf;
$ringame = "ingame".$rmmaf;
$room="maf".$rmmaf;
$tm = time()-300;
$ingame = "";
$outgame = "";
$tm = time()-300;
$res=mysql_query("SELECT * FROM $room WHERE id >'".$tm."' group by who order by id desc");
$kol = mysql_affected_rows();
//if($num!=0)echo "<br/>";
echo "<b>В игре:</b><br/>";
for ($k = 0; $k < $kol; $k++){
$lines = mysql_fetch_array ($res);
$use = $lines["who"];
$user_id = $lines["usid"];
$r = mysql_query("select * from $ringame WHERE gamer_id = '".$user_id."'");
$a = mysql_fetch_array($r);
$id_in_game = $a["id_in_game"];
if (mysql_affected_rows()!=0) $ingame = $ingame."$use($id_in_game), ";
else $outgame = $outgame."$use, ";
}
unset($lines);
echo "$ingame<br/>";
echo "<b>Вне игры:</b><br/>";
echo "$outgame<br/>";
echo '<br />';
echo $div1."<a href="maf.php?&rmmaf=1">В игру</a>".$div9;
include_once (H.'shaxty/foot.php');
?>