diff --git a/akadem.php b/akadem.php index 24ff5d1..1fec194 100644 --- a/akadem.php +++ b/akadem.php @@ -1,15 +1,18 @@ room != 61) { + header("Location: main.php"); + exit; +} +if ($user->battle) { header('location: fight.php'); - die(); + exit; } $status = 'Внимание! Моментальная оплата без подтверждения!'; diff --git a/ashop.php b/ashop.php index fbe3568..c470fb9 100644 --- a/ashop.php +++ b/ashop.php @@ -1,16 +1,19 @@ room != 50) { header("Location: main.php"); - die(); + exit; } -if ($user['battle'] != 0) { +if ($user->battle) { header('location: fbattle.php'); - die(); + exit; } $bank = db::c()->query('SELECT `ekr` FROM `bank` WHERE `id`=?i', $_SESSION['uid'])->fetch_assoc(); diff --git a/buttons.php b/buttons.php index 2f1b8e4..dbcee68 100644 --- a/buttons.php +++ b/buttons.php @@ -12,7 +12,7 @@ $header = filter_input(INPUT_GET, 'header'); $ch = filter_input(INPUT_GET, 'ch'); if ($header) { - die(); + exit; } elseif ($ch != null) { ?> diff --git a/buy.php b/buy.php index bc9fa45..ec8748b 100644 --- a/buy.php +++ b/buy.php @@ -1,7 +1,7 @@ query('SELECT `id`, `uid` FROM `abils_user` WHERE `uid` = ?i', $user['id'])->fetch_assoc(); diff --git a/buy_klan.php b/buy_klan.php index 34f6d81..5fca8bb 100644 --- a/buy_klan.php +++ b/buy_klan.php @@ -1,13 +1,13 @@ query('SELECT `id` FROM `abils_klan` WHERE `klan` = ?i', $user['klan'])->fetch_assoc(); $clan = db::c()->query('SELECT `glava` FROM `clans` WHERE `id` = ?i', $user['klan'])->fetch_assoc(); diff --git a/c_forest.php b/c_forest.php index c194273..29ee1ac 100644 --- a/c_forest.php +++ b/c_forest.php @@ -3,18 +3,18 @@ session_start(); require_once('functions.php'); if (!isset($_SESSION['uid'])) { header('Location: index.php'); - die(); + exit; } -if ($user['room'] == 51) { +if ($user->room == 51) { header('location: city.php'); - die(); + exit; } $forest = db::c()->query('SELECT `id`, `room`, `room_id`, `time`, `user`, `data` FROM `forest` WHERE `user` = ?i', $user['id'])->fetch_assoc(); $error = ''; $map_page = ''; if (empty($forest['id'])) { - die('Ошибка. Сообщите Администрации. Код ошибки : 00.'); + exit('Ошибка. Сообщите Администрации. Код ошибки : 00.'); } function loadmap_cell() diff --git a/c_haos.php b/c_haos.php index 3778707..9d37277 100644 --- a/c_haos.php +++ b/c_haos.php @@ -26,8 +26,8 @@ } include "functions.php"; $pass_s=getPass(6); - if ($user['room'] != 600) { header("Location: main.php"); die(); } - if ($user['battle'] != 0) { header('location: fbattle.php'); die(); } + if ($user->room != 600) { header("Location: main.php"); exit; } + if ($user->battle) { header('location: fbattle.php'); exit; } if ($_POST['pay']) { if(!$_POST['pay_gr']) $_POST['pay_gr']=1; diff --git a/c_haos_in.php b/c_haos_in.php index 58f6b34..16313ac 100644 --- a/c_haos_in.php +++ b/c_haos_in.php @@ -115,8 +115,8 @@ "1"=>"Босс глубин" );*/ - if ($user['room'] != 601) { header("Location: main.php"); die(); } - if ($user['battle'] != 0) { header('location: fbattle.php'); die(); } + if ($user->room != 601) { header("Location: main.php"); exit; } + if ($user->battle) { header('location: fbattle.php'); exit; } if ($in_haos['status'] == 4) { mysql_query("UPDATE `users`,`online` SET `users`.`room` = '600',`online`.`room` = '600' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;"); @@ -228,9 +228,9 @@ if($_POST['go_attack']) $bot_count=1; break; - }; - $b_pers=mysql_fetch_array(mysql_query("SELECT * FROM users WHERE id='{$bot_id}' LIMIT 1;"));; - $bot_hp=$b_pers['maxhp']; + } + $b_pers=mysql_fetch_array(mysql_query("SELECT * FROM users WHERE id='{$bot_id}' LIMIT 1;")); + $bot_hp=$b_pers['maxhp']; $bots=array(); $group_raw=mysql_query("SELECT * FROM `cit_haos_status` WHERE `group` = '{$in_haos['group']}' AND status='2';"); while ($gr = mysql_fetch_array($group_raw)) @@ -282,7 +282,7 @@ if($_POST['go_attack']) foreach($group_fight as $gf) mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$gf};"); //} - die(""); + exit(""); } } $group_num=mysql_num_rows(mysql_query("SELECT * FROM `cit_haos_status` WHERE `group` = '{$in_haos['group']}';")); diff --git a/c_park.php b/c_park.php index b6db2f7..3e020c3 100644 --- a/c_park.php +++ b/c_park.php @@ -15,8 +15,8 @@ include "functions.php"; - if ($user['room'] != 602) { header("Location: main.php"); die(); } - if ($user['battle'] != 0) { header('location: fbattle.php'); die(); } + if ($user->room != 602) { header("Location: main.php"); exit; } + if ($user->battle) { header('location: fbattle.php'); exit; } //комнаты парка @@ -119,7 +119,7 @@ addchp ('Внимание! Вы вступили в бой c бандитами!','{[]}'.Nick::id($user['id'])->short().'{[]}'); - die(""); + exit(""); } diff --git a/canalizaciya.php b/canalizaciya.php index cd2edcd..9f6aed8 100644 --- a/canalizaciya.php +++ b/canalizaciya.php @@ -9,7 +9,7 @@ $user = new User($_SESSION['uid']); if ($user->room == 403) { include "startpodzemel.php"; -if ($user->battle != 0) { header('location: fbattle.php'); die(); } +if ($user->battle != 0) { header('location: fbattle.php'); exit; } if($_GET['act']=="cexit") { @@ -486,12 +486,12 @@ if($mesto == '9'){$mesto = '09';} if(isset($_GET['left'])){ mysql_query("UPDATE `labirint` SET `vector` = '".mysql_escape_string($_GET['left'])."' WHERE `user_id` = '{$_SESSION['uid']}' ;"); //header('Location:canalizaciya.php'); - die(""); + exit(""); } if(isset($_GET['right'])){ mysql_query("UPDATE `labirint` SET `vector` = '".mysql_escape_string($_GET['right'])."' WHERE `user_id` = '{$_SESSION['uid']}' ;"); //header('Location:canalizaciya.php'); - die(""); + exit(""); } $fer = mysql_query("SELECT n".mysql_escape_string($rhar[$mesto][$_GET['path']])." FROM podzem3 WHERE glava='".$mir['glava']."' and name='".$mir['name']."'"); @@ -518,7 +518,7 @@ if($_GET['path']==3) {$nav='l=l-12';} mysql_query("UPDATE `labirint` SET `location` = '".mysql_escape_string($rhar[$mesto][$_GET['path']])."',`visit_time`='$vrem',$nav WHERE `user_id` = '{$_SESSION['uid']}' ;"); $_SESSION['time'] = time()+1; //header('Location:canalizaciya.php'); -die(""); +exit(""); } } diff --git a/canalization_mod.php b/canalization_mod.php index cc483ec..05a0362 100644 --- a/canalization_mod.php +++ b/canalization_mod.php @@ -1,5 +1,5 @@ -if ($user['room'] == 403) { +if ($user->room == 403) { $s = db::c()->query('SELECT * FROM podzem2 WHERE name= "?s"', $mir['name'])->fetch_assoc(); $rooms[0] = ""; @@ -320,7 +320,7 @@ if ($user['room'] == 403) { $s .= '
'; } if (($repa["n$mesto"] == '11.1' or $repa["n$mesto"] == '11.0') and $vector == $repa["v$mesto"]) { - $s .= ''; + $s .= ''; } if (($repa["n$loc2"] == '11.1' or $repa["n$loc2"] == '11.0') and $vector == $repa["v$loc2"]) { $s .= ''; @@ -333,7 +333,7 @@ if ($user['room'] == 403) { } ///////////// if (($repa["n$loc2"] == '12.1' or $repa["n$loc2"] == '12.0') and $vector == $repa["v$loc2"]) { - $s .= ''; + $s .= ''; } if (($repa["n$loc3"] == '12.1' or $repa["n$loc3"] == '12.0') and $vector == $repa["v$loc3"]) { $s .= ''; @@ -373,7 +373,7 @@ if ($user['room'] == 403) { $nomers = '10'; } if (($repa["n$mesto"] == 'key1' or $repa["n$mesto"] == 'key2' or $repa["n$mesto"] == 'key3' or $repa["n$mesto"] == 'key4' or $repa["n$mesto"] == 'key5' or $repa["n$mesto"] == 'key6' or $repa["n$mesto"] == 'key7' or $repa["n$mesto"] == 'key8' or $repa["n$mesto"] == 'key9' or $repa["n$mesto"] == 'key10') and $vector == $repa["v$mesto"]) { - $s .= ''; + $s .= ''; } if (($repa["n$loc2"] == 'key1' or $repa["n$loc2"] == 'key2' or $repa["n$loc2"] == 'key3' or $repa["n$loc2"] == 'key4' or $repa["n$loc2"] == 'key5' or $repa["n$loc2"] == 'key6' or $repa["n$loc2"] == 'key7' or $repa["n$loc2"] == 'key8' or $repa["n$loc2"] == 'key9' or $repa["n$loc2"] == 'key10') and $vector == $repa["v$loc2"]) { $s .= ''; @@ -539,10 +539,10 @@ if ($user['room'] == 403) { } /////////////////////////////////////////// if ($step1['fwd'] and ($repa["n$loc2"] == '13.1' or $repa["n$loc2"] == '13.0')) { - $s .= ''; + $s .= ''; } if ($step1['fwd'] and ($repa["n$loc2"] == '14.1' or $repa["n$loc2"] == '14.0')) { - $s .= ''; + $s .= ''; } /////////////////////1///////////////////// @@ -550,20 +550,20 @@ if ($user['room'] == 403) { if ($k_b2 == '1') { if ($rt["n$loc2"] == '8') { - $s .= ''; + $s .= ''; } else { - $s .= ''; + $s .= ''; } } if ($k_b2 == '2') { - $s .= ''; - $s .= ''; + $s .= ''; + $s .= ''; } if ($k_b2 == '3') { - $s .= ''; - $s .= ''; - $s .= ''; + $s .= ''; + $s .= ''; + $s .= ''; } } diff --git a/cave.php b/cave.php index 2dc3f88..940e70e 100644 --- a/cave.php +++ b/cave.php @@ -207,11 +207,11 @@ function redirectbyroom($r) { if (in_array($r, Config::$canalenters)) { header("location: enter_cave.php"); - die(); + exit; } if ($r == 1) { header("location: main.php"); - die(); + exit; } } @@ -229,7 +229,7 @@ if ($user["login"] == "Rallo Tabs") { if ($user['battle'] > 0) { header("location: fbattle.php"); - die(); + exit; } $objsizes = [0 => [0, 0], 1 => [120, 60], 2 => [120, 60], 3 => [120, 60], 4 => [110, 72], 5 => [120, 120]]; @@ -288,15 +288,15 @@ function makedeath() { global $user, $floor, $loses, $x, $y, $dir; $cavedata = Config::$cavedata ?? []; - if (!isset($cavedata[$user['room']]['x' . $floor])) { + if (!isset($cavedata[$user->room]['x' . $floor])) { $floor = 1; loadmap(); } - mysql_query("UPDATE `caveparties` SET `floor` = $floor, `x` = '" . $cavedata[$user['room']]['x' . $floor] . "', `y` = '" . $cavedata[$user['room']]['y' . $floor] . "', `dir` = '" . $cavedata[$user['room']]['dir' . $floor] . "', `loses` = (`loses`+1) WHERE `user` = '$user[id]' LIMIT 1"); + mysql_query("UPDATE `caveparties` SET `floor` = $floor, `x` = '" . $cavedata[$user->room]['x' . $floor] . "', `y` = '" . $cavedata[$user->room]['y' . $floor] . "', `dir` = '" . $cavedata[$user->room]['dir' . $floor] . "', `loses` = (`loses`+1) WHERE `user` = '$user[id]' LIMIT 1"); mysql_query('UPDATE `users` SET `hp` = 1 WHERE `id` = "' . $user['id'] . '" LIMIT 1'); - $x = $cavedata[$user['room']]['x' . $floor]; - $y = $cavedata[$user['room']]['y' . $floor]; - $dir = $cavedata[$user['room']]['dir' . $floor]; + $x = $cavedata[$user->room]['x' . $floor]; + $y = $cavedata[$user->room]['y' . $floor]; + $dir = $cavedata[$user->room]['dir' . $floor]; updparties(); $loses++; } @@ -447,9 +447,9 @@ function getcavedata($caveleader, $floor) return unserialize(implode("", file("cavedata/$caveleader-$floor.dat"))); } -if (!in_array($user['room'], Config::$caverooms)) { +if (!in_array($user->room, Config::$caverooms)) { header("Location: main.php"); - die('Not in this life ...'); + exit('Not in this life ...'); } if (isset($_GET['direction'])) { @@ -472,7 +472,7 @@ while ($rec = mysql_fetch_assoc($r)) { $party[] = $rec; } -if ($user['room'] == 621) { +if ($user->room == 621) { $base = "/underdesigns/alchcave"; } @@ -553,8 +553,8 @@ if (@$_GET['useitem']) { $ty = $y + 1; } if (@$_GET['useitem']) { - if (file_exists("underground/objects/$user[room].php")) { - include "underground/objects/$user[room].php"; + if (file_exists("underground/objects/$user->room.php")) { + include "underground/objects/$user->room.php"; } } @@ -650,7 +650,7 @@ if ($wander && !isset($_GET['attack'])) { $ty = $v['y'] + 2; } - if ($user['room'] == 74 || $user['room'] == 76) { + if ($user->room == 74 || $user->room == 76) { if (strpos($map[$ty][$tx], 's/') !== false && !@$mapbots[$ty][$tx]) { break; } @@ -718,8 +718,8 @@ if ($moved && (substr($map[$y * 2][$x * 2], 0, 1) === "e" || substr($map[$y * 2] $tx = $x; $ty = $y; $tmp = explode("/", $map[$y * 2][$x * 2]); - if (file_exists("underground/events/$user[room].php")) { - include("underground/events/$user[room].php"); + if (file_exists("underground/events/$user->room.php")) { + include("underground/events/$user->room.php"); } } @@ -744,7 +744,7 @@ if ($ambushes[$y * 2][$x * 2 - 2] && $map[$y * 2][$x * 2 - 1] == 0) { if ($ax && $ay && $user['hp'] > 0) { $cavedata = Config::$cavedata ?? []; - if (!($cavedata[$user['room']]['x' . $floor] == $x && $cavedata[$user['room']]['y' . $floor] == $y)) { + if (!($cavedata[$user->room]['x' . $floor] == $x && $cavedata[$user->room]['y' . $floor] == $y)) { if ($ax < $x) { $dir1 = 0; } elseif ($ax > $x) { @@ -818,12 +818,12 @@ if (@$_GET['speak']) { $tmp = explode("/", $cell); if ($tmp[0] == "d") { header("location: dialog.php?char=$tmp[2]"); - die(); + exit; } if ($tmp[0] == "b" && isset($dialogs[CaveBots::$bots[$tmp[1]]])) { header("location: dialog.php?char=" . CaveBots::$bots[$tmp[1]]); - die(); + exit; } } @@ -908,7 +908,7 @@ if (@$_GET['exit']) { } } mysql_query("DELETE FROM `inventory` WHERE `owner` = '$user[id]' AND `foronetrip` = 1"); - gotoroom($user['room'] - 1); + gotoroom($user->room - 1); } $standingon = $map[$y * 2][$x * 2]; @@ -1517,9 +1517,9 @@ function drawmap($map1, $players, $x, $y, $direction) $ret .= drawobject2($aMap[$yy][$xx], $x, $y); } - $rrm = $user['room']; + $rrm = $user->room; - if (isset($dialogs[CaveBots::$bots[$data[1]]]) && (CaveBots::$bots[$data[1]] == 11147 && $user['room'] == 74)) { + if (isset($dialogs[CaveBots::$bots[$data[1]]]) && (CaveBots::$bots[$data[1]] == 11147 && $user->room == 74)) { $ret .= " 1 ? " ($cnt)" : "") . "\" " . ($y == 1 && $x == 3 ? "onclick=\"speakattackmenu(event);\"" : "") . " width=\"" . $imgdata[$x][$y]["wd"] . "\" height=\"" . $imgdata[$x][$y]["ht"] . "\" src=\"/i/dungeon/mobs/$rrm/$bot.gif\" style=\"position: absolute; left: " . $imgdata[$x][$y]["x"][$bn] . "px; top: " . $imgdata[$x][$y]["y"] . "px;" . ($x == 3 && $y == 1 ? "cursor: pointer;" : "") . ($x == 3 ? "z-index: " . (99 - ($y * 5)) . ";" : "") . "\" />"; } else { $ret .= " 1 ? " ($cnt)" : "") . "\" " . ($y == 1 && $x == 3 ? " onclick=\"document.location.href='cave.php?attack=1';\"" : "") . " width=\"" . $imgdata[$x][$y]["wd"] . "\" height=\"" . $imgdata[$x][$y]["ht"] . "\" src=\"/i/dungeon/mobs/$rrm/$bot.gif\" style=\"position: absolute; left: " . $imgdata[$x][$y]["x"][$bn] . "px; top: " . $imgdata[$x][$y]["y"] . "px;" . ($x == 3 && $y == 1 ? "cursor: pointer;" : "") . ($x == 3 ? "z-index: " . (99 - ($y * 5)) . ";" : "") . "\" />"; @@ -1609,7 +1609,7 @@ function drawmap($map1, $players, $x, $y, $direction) $left = $imgdata[$x][$y]["x"][1]; $top = $imgdata[$x][$y]["y"] + $ht; } - $rrm = $user['room']; + $rrm = $user->room; if (!isset($imgmap[$obj])) { $ret .= " @@ -1654,7 +1654,7 @@ function drawmap($map1, $players, $x, $y, $direction) $left = $imgdata[$x][$y]["x"][1]; $top = $imgdata[$x][$y]["y"] + $ht; } - $rrm = $user['room']; + $rrm = $user->room; if (!isset($imgmap[$obj])) { $ret .= " " . ($y == 1 && $x == 3 ? "" : "") . " @@ -1815,7 +1815,7 @@ function drawmap($map1, $players, $x, $y, $direction) } $objInWall = explode('/', $map[3][$wall]); if ($objInWall[1] == "o") { - if ($user['room'] == 83 && !(!$direction && (($x == 13 && $y == 4) || ($x == 12 && $y == 4)))) { // исключение 2-ух клеток в комнате 82 + if ($user->room == 83 && !(!$direction && (($x == 13 && $y == 4) || ($x == 12 && $y == 4)))) { // исключение 2-ух клеток в комнате 82 $ret .= drawobject('//' . $objInWall[2], 3, $i); } } @@ -2038,10 +2038,10 @@ progress_update();