battles/magic/scaner.php

26 lines
842 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// магия "шаг назад"
if ($user['battle'] > 0) {
echo "Не в бою...";
} elseif (rand(1,100)!=1) {
//undressall($user['id']);
if ($_SESSION['uid'] == null) {
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;
}