battles/magic/scaner.php

26 lines
900 B
PHP
Raw Normal View History

2018-01-28 16:40:49 +00:00
<?php
// магия "шаг назад"
if ($user['battle'] > 0) {
echo "Не в бою...";
} elseif (rand(1, 100) != 1) {
if (empty($_SESSION['uid'])) {
header("Location: index.php");
exit;
}
global $rooms;
$rs = mysql_query("SELECT * FROM `users` WHERE `in_tower` = 1 ORDER by `room` DESC;");
while ($r = mysql_fetch_array($rs)) {
if ($rt != $r['room']) {
$rt = $r['room'];
$rr .= "\n" . $rooms[$r['room']] . ": ";
}
$rr .= $r['login'] . ", ";
}
echo "<font color=red><b>Отчет о сканировании у вас в рюкзаке<b></font>";
mysql_query("INSERT INTO `inventory` (`bs`,`owner`,`name`,`type`,`massa`,`cost`,`img`,`letter`,`maxdur`,`isrep`)VALUES('1','{$_SESSION['uid']}','Отчет о сканировании','200',1,0,'paper100.gif','{$rr}',1,0) ;");
$bet = 1;
2018-01-28 16:40:49 +00:00
}