Ещё немного уборки мусора.
This commit is contained in:
@@ -215,8 +215,7 @@ function gotoroom($r, $redir = 1)
|
||||
|
||||
function redirectbyroom($r)
|
||||
{
|
||||
global $canalenters;
|
||||
if (in_array($r, $canalenters)) {
|
||||
if (in_array($r, Config::$canalenters)) {
|
||||
header("location: enter_cave.php");
|
||||
die();
|
||||
}
|
||||
@@ -442,11 +441,11 @@ function loadmap()
|
||||
|
||||
function getslot($i, $user1 = 0)
|
||||
{
|
||||
global $userslots, $user;
|
||||
global $user;
|
||||
if (!$user1) {
|
||||
$user1 = $user;
|
||||
}
|
||||
foreach ($userslots as $k => $v) {
|
||||
foreach (Config::$userslots as $k => $v) {
|
||||
if ($user1[$v] == $i) {
|
||||
return $v;
|
||||
}
|
||||
@@ -458,7 +457,7 @@ function getcavedata($caveleader, $floor)
|
||||
return unserialize(implode("", file("cavedata/$caveleader-$floor.dat")));
|
||||
}
|
||||
|
||||
if (!in_array($user['room'], $caverooms)) {
|
||||
if (!in_array($user['room'], Config::$caverooms)) {
|
||||
header("Location: main.php");
|
||||
die('Not in this life ...');
|
||||
}
|
||||
@@ -499,7 +498,7 @@ if (@$_GET['kill'] && $user['id'] == $user['caveleader'] && $_GET['kill'] != $us
|
||||
mysql_query("UPDATE `users` SET `room` = (`room`-1), `caveleader` = 0 WHERE `id` = '$v[user]' LIMIT 1");
|
||||
$r = mysql_query("SELECT `id`, `dressed` FROM `inventory` WHERE `owner` = '$v[user]' AND `dressed` = 1 AND `foronetrip` = 1");
|
||||
if (mysql_num_rows($r) > 0) {
|
||||
$usr = mysql_fetch_array(mysql_query("SELECT " . implode(",", $userslots) . " FROM `users` WHERE `id` = '$v[user]'"));
|
||||
$usr = mysql_fetch_array(mysql_query("SELECT " . implode(",", Config::$userslots) . " FROM `users` WHERE `id` = '$v[user]'"));
|
||||
}
|
||||
while ($rec = mysql_fetch_assoc($r)) {
|
||||
$slot = getslot($rec['id'], $usr);
|
||||
|
||||
Reference in New Issue
Block a user