From a08ce17a40f85e186365dd06b9dd85af36fa1adf Mon Sep 17 00:00:00 2001 From: "Igor Barkov (iwork)" Date: Wed, 30 Sep 2020 15:01:33 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=82=D0=BA=D0=B0=D0=B7=20=D0=BE=D1=82?= =?UTF-8?q?=20=D0=B0=D0=BB=D0=B8=D0=B0=D1=81=D0=B0=20die=20=D0=B2=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=BB=D1=8C=D0=B7=D1=83=20exit,=20=D0=B1=D0=BE=D0=BB?= =?UTF-8?q?=D0=B5=D0=B5=20=D1=8F=D0=B2=D0=BD=D0=B0=D1=8F=20=D0=BF=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B0=20=D0=BD=D0=B0=20=D0=BD?= =?UTF-8?q?=D0=B0=D0=BB=D0=B8=D1=87=D0=B8=D0=B5=20=D1=81=D0=B5=D1=81=D1=81?= =?UTF-8?q?=D0=B8=D0=B8.=20=D0=9D=D0=B5=D0=BA=D0=BE=D1=82=D0=BE=D1=80?= =?UTF-8?q?=D1=8B=D0=B5=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B8?= =?UTF-8?q?=20=D0=B2=D1=85=D0=BE=D0=B4=D0=B0=20=D1=82=D0=B5=D0=BF=D0=B5?= =?UTF-8?q?=D1=80=D1=8C=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D1=8F=D1=8E?= =?UTF-8?q?=D1=82=20=D0=BE=D0=B1=D1=8A=D0=B5=D0=BA=D1=82=D1=8B,=20=D0=B0?= =?UTF-8?q?=20=D0=BD=D0=B5=20=D0=BC=D0=B0=D1=81=D1=81=D0=B8=D0=B2.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- akadem.php | 19 ++++--- ashop.php | 13 +++-- buttons.php | 2 +- buy.php | 2 +- buy_klan.php | 4 +- c_forest.php | 8 +-- c_haos.php | 4 +- c_haos_in.php | 12 ++--- c_park.php | 6 +-- canalizaciya.php | 8 +-- canalization_mod.php | 26 ++++----- cave.php | 54 +++++++++---------- ch.php | 24 ++++----- chats.php | 6 +-- city.php | 34 ++++++------ clan.php | 2 +- clan_castle.php | 14 ++--- classes/Tournament.php | 6 +-- classes/battle_new.class.php | 10 ++-- classes/cave/lose.php | 10 ++-- classes/cave/win.php | 4 +- classes/quests_class.php | 2 +- cronjobs/cron.php | 2 +- cronjobs/cron_bots_battle.php | 8 +-- enter_cave.php | 24 ++++----- fbattle.php | 2 +- forest.php | 6 +-- gotzamok.php | 43 ++++++++------- group_arena.php | 2 +- hostel.php | 2 +- hostel_checkpoint.php | 2 +- hostel_room.php | 2 +- i/city/sub/index.php | 2 +- i/magic/sleep1.php | 5 +- lab.php | 45 ++++++++-------- lab2.php | 43 ++++++++------- lab_enter.php | 2 +- labirint.php | 10 ++-- library.php | 4 +- magic/al_neut_power.php | 2 +- magic/attack.php | 10 ++-- magic/attack_blood.php | 6 +-- magic/attack_t.php | 10 ++-- magic/attackbot.php | 4 +- magic/attackk.php | 10 ++-- magic/attackk_close.php | 6 +-- magic/attackk_open.php | 6 +-- magic/battack.php | 10 ++-- magic/bexit.php | 7 ++- magic/brat.php | 10 ++-- magic/check.php | 5 +- magic/cityattack.php | 12 ++--- magic/clone.php | 5 +- magic/cpattack.php | 10 ++-- magic/ddark.php | 5 +- magic/death_off.php | 5 +- magic/defence.php | 4 +- magic/devastate.php | 4 +- magic/dlight.php | 5 +- magic/dneit.php | 5 +- magic/down.php | 5 +- magic/dpal.php | 5 +- magic/eattack.php | 10 ++-- magic/ebattack.php | 10 ++-- magic/elem_ally_air.php | 5 +- magic/elem_ally_earth.php | 5 +- magic/elem_ally_fire.php | 5 +- magic/elem_ally_water.php | 5 +- magic/elem_foe_air.php | 5 +- magic/elem_foe_earth.php | 5 +- magic/elem_foe_fire.php | 5 +- magic/elem_foe_water.php | 5 +- magic/elikbroni.php | 2 +- magic/elikurona.php | 2 +- magic/fist_def.php | 2 +- magic/haos.php | 5 +- magic/haos_off.php | 5 +- magic/ident.php | 5 +- magic/incmagic.php | 5 +- magic/luck.php | 4 +- magic/note.php | 5 +- magic/obezl.php | 3 +- magic/obezl_off.php | 5 +- magic/pal_off.php | 5 +- magic/pers_blood.php | 6 +-- magic/rom.php | 5 +- magic/scaner.php | 5 +- magic/sharp_d1.php | 5 +- magic/sharp_d11.php | 5 +- magic/sharp_d2.php | 5 +- magic/sharp_d3.php | 5 +- magic/sharp_d4.php | 5 +- magic/sharp_d5.php | 5 +- magic/sharp_m1.php | 5 +- magic/sharp_m11.php | 5 +- magic/sharp_m2.php | 5 +- magic/sharp_m3.php | 5 +- magic/sharp_m4.php | 5 +- magic/sharp_m5.php | 5 +- magic/sharp_n1.php | 5 +- magic/sharp_n11.php | 5 +- magic/sharp_n2.php | 5 +- magic/sharp_n3.php | 5 +- magic/sharp_n4.php | 5 +- magic/sharp_n5.php | 5 +- magic/sharp_t1.php | 5 +- magic/sharp_t11.php | 5 +- magic/sharp_t2.php | 5 +- magic/sharp_t3.php | 5 +- magic/sharp_t4.php | 5 +- magic/sharp_t5.php | 5 +- magic/sleep.php | 5 +- magic/sleep15.php | 4 +- magic/sleep30.php | 4 +- magic/sleep_off.php | 7 ++- magic/sleepf_off.php | 5 +- magic/stop.php | 11 ++-- magic/stop_200.php | 11 ++-- magic/un_align.php | 2 +- magic/unclone.php | 5 +- magic/usability_klan/attack.php | 6 +-- magic/usability_klan/attack_blood.php | 6 +-- magic/usability_klan/sleep15.php | 4 +- magic/usability_klan/sleep30.php | 4 +- magic/usability_user/attack.php | 6 +-- magic/usability_user/attack_blood.php | 6 +-- magic/usability_user/sleep15.php | 4 +- magic/usability_user/sleep30.php | 4 +- magic/vampir.php | 13 +++-- magic/vips.php | 2 +- magic/wis_air_h1.php | 5 +- magic/wis_air_h2.php | 5 +- magic/wis_air_h3.php | 5 +- magic/wis_air_m1.php | 5 +- magic/wis_air_m2.php | 9 ++-- magic/wis_air_m3.php | 9 ++-- magic/wis_air_t1.php | 11 ++-- magic/wis_air_t2.php | 11 ++-- magic/wis_air_t3.php | 11 ++-- magic/wis_earth_d1.php | 11 ++-- magic/wis_earth_d2.php | 11 ++-- magic/wis_earth_d3.php | 11 ++-- magic/wis_earth_k1.php | 11 ++-- magic/wis_earth_k2.php | 11 ++-- magic/wis_earth_k3.php | 11 ++-- magic/wis_earth_m1.php | 9 ++-- magic/wis_earth_m2.php | 9 ++-- magic/wis_earth_m3.php | 9 ++-- magic/wis_fire_p1.php | 11 ++-- magic/wis_fire_p2.php | 11 ++-- magic/wis_fire_p3.php | 11 ++-- magic/wis_fire_t1.php | 11 ++-- magic/wis_fire_t2.php | 11 ++-- magic/wis_fire_t3.php | 11 ++-- magic/wis_fire_v1.php | 9 ++-- magic/wis_fire_v2.php | 9 ++-- magic/wis_fire_v3.php | 9 ++-- magic/wis_water_o1.php | 9 ++-- magic/wis_water_o2.php | 9 ++-- magic/wis_water_o3.php | 5 +- magic/wis_water_r1.php | 11 ++-- magic/wis_water_r2.php | 11 ++-- magic/wis_water_r3.php | 11 ++-- magic/wis_water_tr1.php | 11 ++-- magic/wis_water_tr2.php | 11 ++-- magic/wis_water_tr3.php | 11 ++-- magic/zz.php | 2 +- podzem/atk.php | 6 +-- podzem/edit_podzem.php | 2 +- podzem/podz.php | 2 +- podzem_dialog.php | 9 ++-- register.php | 2 +- shop.php | 4 +- startpodzemel.php | 2 +- tower.php | 6 +-- towerin.php | 78 +++++++++++++-------------- towerstamp.php | 6 +-- zayavka.php | 12 ++--- znahar.php | 10 ++-- 179 files changed, 883 insertions(+), 582 deletions(-) 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 @@ 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 .= '
Ключ №' . $nomers . '
'; + $s .= '
Ключ №' . $nomers . '
'; } 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 .= '
Ключ №' . $nomers . '
'; @@ -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();
room - 1)), 0, 0)); $cPlace = $dMap[$y * 2][$x * 2]; $tmp = explode("/", $cPlace); - if ($user['room'] == 621) { + if ($user->room == 621) { if ($floor == 1) { echo 'Проклятый Рудник, 1 этаж'; } elseif ($floor == 2) { diff --git a/ch.php b/ch.php index 7b10faa..2ec4089 100644 --- a/ch.php +++ b/ch.php @@ -10,7 +10,7 @@ db::c()->query('UPDATE `online` SET `real_time` = ?i WHERE `id` = ?i', time(), $ if (isset($_GET['online']) && $_GET['online'] != null) { if ($_GET['room'] && (int)$_GET['room'] < 500) { - $user['room'] = (int)$_GET['room']; + $user->room = (int)$_GET['room']; } if ($u->i()['caveleader'] > 0) { $data = db::c()->query(' @@ -36,13 +36,13 @@ if (isset($_GET['online']) && $_GET['online'] != null) { ORDER BY `u`.`login` '); - $ttl = "" . $rooms[$user['room']] . " (" . mysql_num_rows($data) . ")"; + $ttl = "" . $rooms[$user->room] . " (" . mysql_num_rows($data) . ")"; $ch1 = '_active'; $ch2 = '_passive'; $ch3 = '_passive'; $ch4 = '_passive'; $ch5 = '_passive'; - } elseif ($user['room'] == 760) { + } elseif ($user->room == 760) { $forest = db::c()->query('SELECT `id`, `room`, `time`, `user`, `data` FROM `forest` WHERE `user` = "' . $user['id'] . '" LIMIT 1')->fetch_assoc(); $sp = db::c()->query('SELECT `id`, `room`, `user` FROM `forest` WHERE `room` = "' . $forest['room'] . '"'); while ($pl = $sp->fetch_assoc()) { @@ -101,11 +101,11 @@ if (isset($_GET['online']) && $_GET['online'] != null) { WHERE `o`.`id` = `u`.`id` AND (`o`.`date` >= ' . (time() - 90) . ' OR `u`.`in_tower` = 1) AND - `o`.`room` = "' . $user['room'] . '" + `o`.`room` = "' . $user->room . '" ORDER BY `u`.`login` '); - $ttl = "" . $rooms[$user['room']] . " (" . mysql_num_rows($data) . ")"; + $ttl = "" . $rooms[$user->room] . " (" . mysql_num_rows($data) . ")"; $ch1 = '_active'; $ch2 = '_passive'; $ch3 = '_passive'; @@ -170,7 +170,7 @@ if (isset($_GET['online']) && $_GET['online'] != null) { top.rld(); - <?= $rooms[$user['room']], ' (', mysql_num_rows($data) ?>) + <?= $rooms[$user->room], ' (', mysql_num_rows($data) ?>) @@ -262,7 +262,7 @@ if (isset($_GET['online']) && $_GET['online'] != null) { = @$user['chattime'])) { //exit; - } elseif ((@$math[2] == '!sys!!') && (@$math[1] >= @$user['chattime']) /*&& ($user['room']==$math[4])*/ && $_GET['om'] != 1) { + } elseif ((@$math[2] == '!sys!!') && (@$math[1] >= @$user['chattime']) /*&& ($user->room==$math[4])*/ && $_GET['om'] != 1) { if ($_GET['sys'] == 1 || strpos($math[3], "room == $math[4])*/) { $times = ''; $soundON = ''; if ((strpos($math[3], "[" . $user['login'] . "]") > 0) || ($math[2] == $user['login'])) { @@ -410,7 +410,7 @@ if (isset($_GET['online']) && $_GET['online'] != null) { } echo ""; db::c()->query("UPDATE `online` SET `date` = " . time() . " WHERE `id` = {$user['id']} LIMIT 1"); - die(); + exit; } else { if (strpos($_GET['text'], "private") !== FALSE && $user['level'] < 1) { preg_match_all("/\[(.*)\]/U", $_GET['text'], $matches); @@ -481,7 +481,7 @@ if (isset($_GET['online']) && $_GET['online'] != null) { if ($action != 1) { $file = 'tmp/chat.txt'; if (filesize("tmp/chat.txt") > 100 * 1024) { - $line = "\r\n:[" . time() . "]:[{$user['login']}]:[" . ($_GET['text']) . "]:[" . $user['room'] . "]\r\n"; + $line = "\r\n:[" . time() . "]:[{$user['login']}]:[" . ($_GET['text']) . "]:[" . $user->room . "]\r\n"; // Пишем содержимое в файл, // используя флаг FILE_APPEND flag для дописывания содержимого в конец файла // и флаг LOCK_EX для предотвращения записи данного файла кем-нибудь другим в данное время @@ -489,7 +489,7 @@ if (isset($_GET['online']) && $_GET['online'] != null) { file_put_contents($file, $line, FILE_APPEND | LOCK_EX); echo "1"; } else { - $line = ":[" . time() . "]:[{$user['login']}]:[" . ($_GET['text']) . "]:[" . $user['room'] . "]\r\n"; + $line = ":[" . time() . "]:[{$user['login']}]:[" . ($_GET['text']) . "]:[" . $user->room . "]\r\n"; file_put_contents($file, $line, FILE_APPEND | LOCK_EX); echo "2"; } diff --git a/chats.php b/chats.php index 64a18d3..61a774c 100644 --- a/chats.php +++ b/chats.php @@ -33,13 +33,13 @@ if($_GET['id'] == 1) { } elseif($_GET['id'] == 6) { $user = mysql_fetch_array(mysql_query('SELECT `id`, `login`, `room` FROM `users` WHERE `id` = "'.(int)$_GET['user'].'" LIMIT 1')); if(isset($user['id'])) { - addch('Внимание! Ваш бой не может начаться по причине Группа не набрана', $user['login'], $user['room']); + addch('Внимание! Ваш бой не может начаться по причине Группа не набрана', $user['login'], $user->room); } } elseif($_GET['id'] == 7) { $user = mysql_fetch_array(mysql_query('SELECT `id`, `login`, `room` FROM `users` WHERE `id` = "'.(int)$_GET['user'].'" LIMIT 1')); if(isset($user['id'])) { - addch('Внимание! Ваш бой начался.', $user['login'], $user['room']); + addch('Внимание! Ваш бой начался.', $user['login'], $user->room); } } else { - die(); + exit; } \ No newline at end of file diff --git a/city.php b/city.php index 9ceb76c..afda955 100644 --- a/city.php +++ b/city.php @@ -72,11 +72,11 @@ switch ($location[0]) { move(2702, 'city.php'); break; case 'got': - if ($user['room'] == 20) { + if ($user->room == 20) { switch ($location[1]) { case 'level1': header('location: main.php?goto=arena'); - die(); + exit; break; case 'level7': header('location: city.php?strah'); @@ -106,7 +106,7 @@ switch ($location[0]) { move(25, 'comission.php'); break; } - } elseif ($user['room'] == 21) { + } elseif ($user->room == 21) { switch ($location[1]) { case 'level4': header('location: city.php?cp'); @@ -130,7 +130,7 @@ switch ($location[0]) { move(650, 'ul_clans.php'); break; } - } elseif ($user['room'] == 2111) { + } elseif ($user->room == 2111) { switch ($location[1]) { case 'level1': header('location: city.php?strah'); @@ -148,7 +148,7 @@ switch ($location[0]) { move(666, 'jail.php'); break; } - } elseif ($user['room'] == 2601) { + } elseif ($user->room == 2601) { switch ($location[1]) { case 'level4': header('location: city.php?bps'); @@ -166,7 +166,7 @@ switch ($location[0]) { move(404, 'vxod.php'); break; } - } elseif ($user['room'] == 2701) { + } elseif ($user->room == 2701) { switch ($location[1]) { case 'level1': header('location: city.php?zaliv'); @@ -175,7 +175,7 @@ switch ($location[0]) { move(402, 'lab_chaos_enter.php'); break; } - } elseif ($user['room'] == 2702) { + } elseif ($user->room == 2702) { switch ($location[1]) { case 'level10': header('location: city.php?cp'); @@ -184,7 +184,7 @@ switch ($location[0]) { move(61, 'akadem.php'); break; } - } elseif ($user['room'] == 2655) { + } elseif ($user->room == 2655) { switch ($location[1]) { case 'level10': header('location: city.php?zamk'); @@ -193,7 +193,7 @@ switch ($location[0]) { move(603, 'aren_of_angels.php'); break; } - } elseif ($user['room'] == 26) { + } elseif ($user->room == 26) { switch ($location[1]) { case 'level4': header('location: city.php?cp'); @@ -289,7 +289,7 @@ $online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time room == 20) { bgset('cap_cp'); buildset(1, "cap_club", 30, 235, "Бойцовский Клуб"); buildset(2, "cap_shop", 202, 171, "Магазин"); @@ -304,7 +304,7 @@ $online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time buildset(9, "cap_tree2", 260, 530, "Новогодняя елка"); buildset(14, "cap_sneg_3", 210, 390, "Снеговик"); echo "
"; - } elseif ($user['room'] == 21) { + } elseif ($user->room == 21) { bgset('cap_strash'); buildset(5, "cap_bank", 180, 485, "Банк"); buildset(14, "cap_registratura", 170, 113, "Регистратура кланов"); @@ -314,14 +314,14 @@ $online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time buildset(13, "cap_flowershop", 220, 613, "Цветочный магазин"); buildset(4, "cap_arr_left", 258, 21, "Центральная площадь", 1); echo ""; - } elseif ($user['room'] == 26) { + } elseif ($user->room == 26) { bgset('cap_park'); buildset(6, "cap_gate", 170, 340, "Городские ворота", 1); buildset(660, "cap_vokzal", 163, 43, "Общежитие"); buildset(3, "cap_arr_left", 259, 27, "Замковая площадь", 1); buildset(4, "cap_arr_right", 259, 715, "Центральная площадь", 1); echo ""; - } elseif ($user['room'] == 2601) { + } elseif ($user->room == 2601) { bgset('cap_zamk'); buildset(1052, "cap_lavka", 240, 425, "Храмовая лавка"); buildset(10, "ava_post", 240, 300, "Сувенирный магазинчик", 1); @@ -330,12 +330,12 @@ $online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time buildset(55, "cap_arr_left", 258, 21, "Арена Богов", 1); buildset(4, "cap_arr_right", 260, 710, "Большая парковая улица", 1); echo ""; - } elseif ($user['room'] == 2655) { + } elseif ($user->room == 2655) { bgset('ar_e_n'); buildset(2055, "cap_altr_g", 230, 340, "Арена Ангелов"); buildset(10, "arr_right_png", 260, 710, "Замковая площадь", 1); echo ""; - } elseif ($user['room'] == 2111) { + } elseif ($user->room == 2111) { bgset('rist_bg'); buildset(1, "cap_arr_uleft", 240, 30, "Страшилкина Улица", 1); buildset(2, "cap_arr_right", 245, 708, "Секретный Лабиринт", 1); @@ -345,12 +345,12 @@ $online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time buildset(203, "cap_rist_monstr", 145, 570, "Вход в Груповые сражения"); buildset(21, "angelscastle", 131, 628, "Замок Мэра Города"); echo ""; - } elseif ($user['room'] == 2701) { + } elseif ($user->room == 2701) { bgset('arena_bg1'); buildset(1, "cap_3strelka", 260, 30, "Берег Залива"); buildset(2, "cap_shar_dark", 234, 356, "Лабиринт Хаоса"); echo ""; - } elseif ($user['room'] == 2702) { + } elseif ($user->room == 2702) { bgset('cap_torg'); buildset(6, "cap_arenda", 175, 70, "Академия"); buildset(16, "cap_t_build42", 120, 300, "Аукцион"); diff --git a/clan.php b/clan.php index 785decb..e4db355 100644 --- a/clan.php +++ b/clan.php @@ -6,7 +6,7 @@ if (empty($_SESSION['uid'])) { } include_once 'functions.php'; if (!$user->clan) { - die(err('Вы не состоите в клане!')); + exit(err('Вы не состоите в клане!')); } try { $clanRow = db::c()->query('SELECT * FROM `clans` WHERE `id` = ?i', $user->clan)->fetch_assoc(); diff --git a/clan_castle.php b/clan_castle.php index 309eb33..52116c7 100644 --- a/clan_castle.php +++ b/clan_castle.php @@ -10,8 +10,8 @@ $klan = mysql_fetch_array(mysql_query("SELECT * FROM `clans` WHERE `id` = '{$user['klan']}' LIMIT 1;")); include "functions.php"; - if ($user['room'] != 45) { header("Location: main.php"); die(); } - if ($user['battle'] != 0) { header('location: fbattle.php'); die(); } + if ($user->room != 45) { header("Location: main.php"); exit; } + if ($user->battle) { header('location: fbattle.php'); exit; } $cc_date=mysql_fetch_array(mysql_query("SELECT * FROM `variables` WHERE `var`='cc_time' LIMIT 1;")); $ccd=$cc_date['value']; @@ -20,19 +20,19 @@ { $tm=time(); mysql_query("UPDATE `variables` SET `value`='{$tm}' WHERE `var`='cc_time';"); - die(""); + exit(""); } if($_POST['admin_start1']) { $tm=time()-900; mysql_query("UPDATE `variables` SET `value`='{$tm}' WHERE `var`='cc_time';"); - die(""); + exit(""); } if($_POST['add_zay']) { mysql_query("INSERT INTO `clan_castle` VALUES ('{$user['id']}','{$user['klan']}');"); - die(""); + exit(""); } ?> @@ -248,7 +248,7 @@ elseif(($ccd+90+900)<=time()) $rrc .= Nick::id($v)->short(); } $rr .= ""; - addch ("
Поединок между ".$rrc." начался. ",$user['room']); + addch ("Поединок между ".$rrc." начался. ",$user->room); mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
');"); addlog($id,"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); @@ -301,7 +301,7 @@ elseif(($ccd+90+900)<=time()) addchp ('Внимание! Ваш бой начался!
\'; top.frames[\'main\'].location=\'fbattle.php\'; var z = \' ','{[]}'.Nick::id($v)->short().'{[]}'); } $rr .= ""; - addch ("Поединок между ".$rrc." начался. ",$user['room']); + addch ("Поединок между ".$rrc." начался. ",$user->room); mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
');"); addlog($id,"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
"); diff --git a/classes/Tournament.php b/classes/Tournament.php index 9ee2b86..fab3857 100644 --- a/classes/Tournament.php +++ b/classes/Tournament.php @@ -12,14 +12,14 @@ class Tournament global $user; $chek = mysql_fetch_row(mysql_query("select id from turnament where id=" . $id . " and old=0")); if ($chek[0] == '') { - die("Жаль, очень жаль...."); + exit("Жаль, очень жаль...."); } if (mysql_query("insert into turnamuser (idturnam,iduser,level) values(" . $id . "," . $user['id'] . "," . $user['level'] . ")")) { mysql_query("update turnament set kolvo=kolvo+1 where id=" . $id); echo "Регистрация пройдена!"; } else { - die("Вы уже зарегистрированы."); + exit("Вы уже зарегистрированы."); } } @@ -158,7 +158,7 @@ class Tournament mysql_query("UPDATE `users` SET `battle` = {$id} WHERE `id` = " . $user1 . " OR `id` = " . $user2); // создаем лог $rr = "" . Nick::id($user['id'])->full(1) . " и " . Nick::id($jert['id'])->full(1) . ""; - addch("Бой между " . Nick::id($user['id'])->short() . " и " . Nick::id($jert['id'])->short() . " начался. ", $user['room']); + addch("Бой между " . Nick::id($user['id'])->short() . " и " . Nick::id($jert['id'])->short() . " начался. ", $user->room); addlog($id, "Часы показывали " . date("Y.m.d H.i") . ", когда " . $rr . " решили выяснить кто из них сильнее. (турнир)
"); return $id; } diff --git a/classes/battle_new.class.php b/classes/battle_new.class.php index 909958c..86dc9f7 100644 --- a/classes/battle_new.class.php +++ b/classes/battle_new.class.php @@ -237,7 +237,7 @@ class fbattle // ставим статус битвы на "нет битвы" $this->status = 0; //header ("Location:main.php"); - //die(); + //exit; //$this->return = 5; //return $this->return; } @@ -414,7 +414,7 @@ class fbattle // обновить битку $this->update_battle(); header("Location: " . $_SERVER['PHP_SELF'] . ""); - die(); + exit; } } else { return false; @@ -1701,7 +1701,7 @@ class fbattle } - if (in_array($user['room'], Config::$caverooms)) { + if (in_array($user->room, Config::$caverooms)) { $location = mysql_fetch_array(mysql_query("SELECT `x`, `y`, `dir` FROM `caveparties` WHERE `user` = '" . $this->user['id'] . "' LIMIT 1")); if ($location['dir'] == 0) { @@ -1790,13 +1790,13 @@ class fbattle // выносим хп-ку и выходим из боя mysql_query('UPDATE `battle` SET `t1hist` = \'' . implode(", ", $nks1hist) . '\', `t2hist` = \'' . implode(", ", $nks2hist) . '\' WHERE `id` = ' . $this->battle_data['id'] . ' ;'); - addch("battle_data['id'] . " target=_blank>Поединок между " . $rr . " закончен. ", $user['room']); + addch("battle_data['id'] . " target=_blank>Поединок между " . $rr . " закончен. ", $user->room); mysql_query('UPDATE `battle` SET `exp` = \'' . serialize($this->exp) . '\' WHERE `id` = ' . $this->battle_data['id'] . ' ;'); mysql_query("DELETE FROM `bots` WHERE `battle` = {$this->user['battle']};"); mysql_query("UPDATE users SET `battle` =0, `fullhptime` = " . time() . " WHERE `battle` = {$this->user['battle']}"); echo mysql_error(); unset($this->battle); - //header("Location: fbattle.php"); die(); + //header("Location: fbattle.php"); exit; return true; // ================================================================= } diff --git a/classes/cave/lose.php b/classes/cave/lose.php index 61e5a85..8a9e727 100644 --- a/classes/cave/lose.php +++ b/classes/cave/lose.php @@ -1,8 +1,8 @@ room, Config::$caverooms)) { $cavedata = Config::$cavedata ?? []; $floor = mysql_fetch_row(mysql_query("SELECT `floor` FROM `caveparties` WHERE `user` = '$user[id]' LIMIT 1")); - if (!isset($cavedata[$user['room']]['x' . $floor])) { + if (!isset($cavedata[$user->room]['x' . $floor])) { $floor = 1; } } @@ -11,12 +11,12 @@ $lomka1 = $lomka; foreach ($lomka1 as $k => $v) { if ($v < _BOTSEPARATOR_) { - if (in_array($user['room'], Config::$caverooms)) { - 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` = '$v' LIMIT 1"); + if (in_array($user->room, Config::$caverooms)) { + 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` = '$v' LIMIT 1"); } if ($user['laba'] > 0) { mysql_query('UPDATE `users` SET `x` = `xf`, `y` = `yr` WHERE `id` = "' . $v . '" LIMIT 1'); - die('Suka'); + exit('Suka'); } } } diff --git a/classes/cave/win.php b/classes/cave/win.php index 0c562b1..607b8e2 100644 --- a/classes/cave/win.php +++ b/classes/cave/win.php @@ -21,7 +21,7 @@ function cavesys($text) } } -if (in_array($user['room'], Config::$caverooms)) { +if (in_array($user->room, Config::$caverooms)) { include("CaveItems.php"); mysql_query('LOCK TABLES `cavebots` WRITE, `caveitems` WRITE, `shop` WRITE, `caveparties` WRITE'); $location = mysql_fetch_array(mysql_query("SELECT `x`, `y`, `dir`, `floor` FROM `caveparties` WHERE `user` = '$user[id]' LIMIT 1")); @@ -55,7 +55,7 @@ if (in_array($user['room'], Config::$caverooms)) { $bot = $rec['bot']; $cnt = $rec['cnt']; if (@$caveitems[$bot]) { - if ($user['room'] == 621) { + if ($user->room == 621) { $i = mt_rand(0, (count($caveitems[$bot]) - 1)); $item = $caveitems[$bot][$i]; if (getchance($item['chance'])) { diff --git a/classes/quests_class.php b/classes/quests_class.php index f716e7b..b39be32 100644 --- a/classes/quests_class.php +++ b/classes/quests_class.php @@ -569,7 +569,7 @@ TASK; mysql_query('UPDATE `users` SET `money` = "' . $user['money'] . '", `exp` = "' . $user['exp'] . '", `doblest` = "' . $user['doblest'] . '" WHERE `id` = "' . $user['id'] . '" LIMIT 1'); $this->error = 'Вы успешно сдали задание!'; $text = 'Внимание! За успешно выполненное задание Вы получили : ' . $c; - $this->msg($text, '{[]}' . $user['login'] . '{[]}', $user['room']); + $this->msg($text, '{[]}' . $user['login'] . '{[]}', $user->room); } else { $this->error = 'Не все условия задания были выполнены ...'; } diff --git a/cronjobs/cron.php b/cronjobs/cron.php index 1187c9f..d013ce6 100644 --- a/cronjobs/cron.php +++ b/cronjobs/cron.php @@ -166,7 +166,7 @@ function startbattle($id, $zay, $r) file_get_contents(GAMEDOMAIN . '/chats.php?id=6&user=' . $v); } mysql_query("DELETE FROM `zayavka` WHERE `id` = '" . $zay . "' LIMIT 1"); - die(); + exit; } $arr = [3, 4, 5, 7, 10]; diff --git a/cronjobs/cron_bots_battle.php b/cronjobs/cron_bots_battle.php index 6b9d1cc..b74c829 100644 --- a/cronjobs/cron_bots_battle.php +++ b/cronjobs/cron_bots_battle.php @@ -432,7 +432,7 @@ class fbattle addActions(time(), 'win_fiz', 0, $this->user['id']); } - if (in_array($user['room'], Config::$caverooms)) { + if (in_array($user->room, Config::$caverooms)) { $location = mysql_fetch_array(mysql_query("SELECT `x`, `y`, `dir` FROM `caveparties` WHERE `user` = '" . $this->user['id'] . "' LIMIT 1")); if ($location['dir'] == 0) { $y = $location['y'] * 2; @@ -462,7 +462,7 @@ class fbattle $winers .= implode("
, ", $this->t2); $lomka = $this->t1; } else { - if (in_array($user['room'], Config::$caverooms)) { + if (in_array($user->room, Config::$caverooms)) { $location = mysql_fetch_array(mysql_query("SELECT `x`, `y`, `dir` FROM `caveparties` WHERE `user` = '" . $this->user['id'] . "' LIMIT 1")); if ($location['dir'] == 0) { $y = $location['y'] * 2; @@ -866,7 +866,7 @@ class fbattle $this->FastDeath(); $this->UpdateBattle(); #header('Location: fbattle.php'); - die(); + exit; } } else { return false; @@ -1062,7 +1062,7 @@ class fbattle } $this->UpdateBattle(); header("Location: " . $_SERVER['PHP_SELF'] . ""); - die(); + exit; } } else { return false; diff --git a/enter_cave.php b/enter_cave.php index 2497675..fa176d6 100644 --- a/enter_cave.php +++ b/enter_cave.php @@ -70,8 +70,8 @@ if ($_GET['ext'] == 1) { } -if (in_array($user['room'], Config::$canalenters)) { - $podzemroom = $user['room'] + 1; +if (in_array($user->room, Config::$canalenters)) { + $podzemroom = $user->room + 1; $cavedata = [620 => ['x1' => 3, 'y1' => 2, 'dir1' => 2]]; $podzemdata = [621 => ['name1' => 'Проклятый Рудник', 'name2' => 'Проклятого Рудника']]; ?> @@ -113,7 +113,7 @@ if (in_array($user['room'], Config::$canalenters)) { if (($user['align'] == '2.99') && $wait_sec > $new_t) { $wait_sec = 1; - mysql_query("UPDATE `visit_podzem` SET `time` = 1 WHERE `login` = '$user[login]' AND `time` > 0 AND `room` = '$user[room]' LIMIT 1"); + mysql_query("UPDATE `visit_podzem` SET `time` = 1 WHERE `login` = '$user[login]' AND `time` > 0 AND `room` = '$user->room' LIMIT 1"); } if ($wait_sec > $new_t) { @@ -225,7 +225,7 @@ if (in_array($user['room'], Config::$canalenters)) { return $i; } - $Q = mysql_query("SELECT * FROM `vxod` WHERE `room` = '$user[room]'"); + $Q = mysql_query("SELECT * FROM `vxod` WHERE `room` = '$user->room'"); while ($DATA = mysql_fetch_array($Q)) { $cr = $DATA['glav_id']; $z_login[$i] = $DATA['login']; @@ -302,7 +302,7 @@ if (in_array($user['room'], Config::$canalenters)) { exit(); } $time = date("H:i"); - $SQL2 = mysql_query("INSERT INTO `vxod` (`date`, `login`, `glav_id`, `comment`, `pass`, `room`) VALUES('$time', '$login', '$user_id', '" . mysql_real_escape_string($_GET['cmt']) . "', '" . mysql_real_escape_string($_GET['pass']) . "', '$user[room]')"); + $SQL2 = mysql_query("INSERT INTO `vxod` (`date`, `login`, `glav_id`, `comment`, `pass`, `room`) VALUES('$time', '$login', '$user_id', '" . mysql_real_escape_string($_GET['cmt']) . "', '" . mysql_real_escape_string($_GET['pass']) . "', '$user->room')"); $SQL2 = mysql_query("INSERT INTO `vxodd` (`login`, `glav_id`, `lvl`) VALUES('$login', '$user_id', '$user_lvl')"); if ($SQL2) { echo ""; @@ -332,7 +332,7 @@ if (in_array($user['room'], Config::$canalenters)) { } $den = mysql_query("SELECT `id` FROM `vxodd` WHERE `glav_id` = '" . $_GET['naw_id'] . "'"); - if (mysql_num_rows($den) >= (in_array($user['room'] + 1, Config::$caverooms) ? 5 : 4)) { + if (mysql_num_rows($den) >= (in_array($user->room + 1, Config::$caverooms) ? 5 : 4)) { echo ""; exit(); } @@ -380,7 +380,7 @@ if (in_array($user['room'], Config::$canalenters)) { } if ($_GET['start']){ - if (in_array($user['room'] + 1, Config::$caverooms)) { + if (in_array($user->room + 1, Config::$caverooms)) { $nc = 1; $locs = []; } @@ -402,8 +402,8 @@ if (in_array($user['room'], Config::$canalenters)) { mysql_query("update `users` SET `money` = (`money-$nana[fee]) WHERE `id` = '$esth[id]' LIMIT 1"); $user['money'] += $nana['fee']; $esth['money'] -= $nana['fee']; - adddelo($user['id'], "Персонаж $user[login] получил $nana[fee] кр. за поход по локации \"" . $rooms[$user['room'] + 1] . "\" от персонажа $esth[login] ($user[money]).", 1); - adddelo($esth['id'], "Персонаж $esth[login] заплатил $nana[fee] кр. за поход по локации \"" . $rooms[$user['room'] + 1] . "\" персонажу $user[login] ($esth[money]).", 1); + adddelo($user['id'], "Персонаж $user[login] получил $nana[fee] кр. за поход по локации \"" . $rooms[$user->room + 1] . "\" от персонажа $esth[login] ($user[money]).", 1); + adddelo($esth['id'], "Персонаж $esth[login] заплатил $nana[fee] кр. за поход по локации \"" . $rooms[$user->room + 1] . "\" персонажу $user[login] ($esth[money]).", 1); } if ($esth['level'] > $level) { $level = $esth['level']; @@ -416,12 +416,12 @@ if (in_array($user['room'], Config::$canalenters)) { $vrem = 30 * 60 + time(); $cavedata = Config::$cavedata ?? []; - mysql_query("INSERT INTO `caveparties` SET `user` = '$esth[id]', `leader` = '$user[id]', `login` = '$esth[login]', `shadow` = '0.png', `x` = '" . $cavedata[$user['room'] + 1]['x1'] . "', `y` = '" . $cavedata[$user['room'] + 1]['y1'] . "', `dir` = '" . $cavedata[$user['room'] + 1]['dir1'] . "', `floor` = 1"); - mysql_query("UPDATE `users`, `online` SET " . ($nc ? "`users`.`caveleader` = '$user[id]', " : "") . " `users`.`room` = '" . ($user['room'] + 1) . "', `online`.`room` = '" . ($user['room'] + 1) . "' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '" . $esth['id'] . "'"); + mysql_query("INSERT INTO `caveparties` SET `user` = '$esth[id]', `leader` = '$user[id]', `login` = '$esth[login]', `shadow` = '0.png', `x` = '" . $cavedata[$user->room + 1]['x1'] . "', `y` = '" . $cavedata[$user->room + 1]['y1'] . "', `dir` = '" . $cavedata[$user->room + 1]['dir1'] . "', `floor` = 1"); + mysql_query("UPDATE `users`, `online` SET " . ($nc ? "`users`.`caveleader` = '$user[id]', " : "") . " `users`.`room` = '" . ($user->room + 1) . "', `online`.`room` = '" . ($user->room + 1) . "' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '" . $esth['id'] . "'"); } if ($nc) { - $r = mysql_query("SELECT * FROM `cavemaps` WHERE `room` = '$user[room]'"); + $r = mysql_query("SELECT * FROM `cavemaps` WHERE `room` = '$user->room'"); while ($rec = mysql_fetch_assoc($r)) { $map = unserialize($rec['map']); foreach ($map as $k => $v) { diff --git a/fbattle.php b/fbattle.php index 88833d2..46fee56 100644 --- a/fbattle.php +++ b/fbattle.php @@ -183,7 +183,7 @@ $fbattle = new fbattle($user['battle']); $bb = str_replace('"', """, (strip_tags($bb[0]))); header("Location: " . $_SERVER['PHP_SELF'] . "?buf=" . $bb); } else { - die(); + exit; } } diff --git a/forest.php b/forest.php index 8d25ad0..4f024dc 100644 --- a/forest.php +++ b/forest.php @@ -1,8 +1,8 @@ room == 51) { header('location: city.php'); exit; } if($_GET['go'] == 'vixod') { $les_login = mysql_fetch_array(mysql_query("SELECT `room` FROM `les_game` WHERE `owner` = '".$user['id']."' LIMIT 1")); @@ -62,7 +62,7 @@ if($rand < 15 && $user['battle'] == 0) { } -if($user['battle'] > 0) { header('location: fbattle.php'); die(); } +if($user['battle'] > 0) { header('location: fbattle.php'); exit; } $les_login = mysql_fetch_array(mysql_query("SELECT * FROM `les_game` WHERE `owner` = '".$user['id']."' LIMIT 1")); diff --git a/gotzamok.php b/gotzamok.php index f0de7a9..0065d83 100644 --- a/gotzamok.php +++ b/gotzamok.php @@ -3,30 +3,33 @@ * */ session_start(); define("CASTLE_MAX_LEVEL", 10); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} require_once 'functions.php'; -if (!($user['room'] >= 37 AND $user['room'] <= 41)) { +if (!($user->room >= 37 AND $user->room <= 41)) { header("Location: main.php"); - die(); + exit; } $castleOwners = db::c()->query('SELECT * FROM `clans` WHERE `short` = (SELECT * FROM `variables` WHERE `var` = "?s")', 'gotzamok'); if ($castleOwners['id'] == $user['klan']) { // если мой клан - if ($_GET['goto'] == 'arsenal') $user['room'] = 38; - if ($_GET['goto'] == 'home') $user['room'] = 37; - if ($_GET['goto'] == 'dvor') $user['room'] = 39; - if ($_GET['goto'] == 'master') $user['room'] = 40; - if ($_GET['goto'] == 'rest') $user['room'] = 41; + if ($_GET['goto'] == 'arsenal') $user->room = 38; + if ($_GET['goto'] == 'home') $user->room = 37; + if ($_GET['goto'] == 'dvor') $user->room = 39; + if ($_GET['goto'] == 'master') $user->room = 40; + if ($_GET['goto'] == 'rest') $user->room = 41; if (in_array($_GET['goto'], ['arsenal', 'home', 'dvor', 'master', 'rest'])) { - db::c()->query('UPDATE `users`,`online` SET `users`.`room` = ?i,`online`.`room` = ?i WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $user['room'], $user['room'], $_SESSION['uid']); + db::c()->query('UPDATE `users`,`online` SET `users`.`room` = ?i,`online`.`room` = ?i WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $user->room, $user->room, $_SESSION['uid']); header('location: gotzamok.php'); } else $status = 'В этом замке нет такого места!'; } -switch ($user['room']) { +switch ($user->room) { case '37' : $backgroundImage = '689_small_550.jpg'; break; @@ -35,7 +38,7 @@ switch ($user['room']) { break; } -if ($user['room'] == 38) { +if ($user->room == 38) { $glava = db::c()->query('SELECT `glava` FROM `clans` WHERE `short` = "?s"', $user['klan'])->fetch_assoc(); // возврат шмотки if ($_GET['back']) { @@ -59,7 +62,7 @@ if ($user['room'] == 38) { } } -if ($user['room'] == 40) { +if ($user->room == 40) { $at = db::c()->query('SELECT * FROM `variables` WHERE `var` = "?s"', 'gotzam_att')->fetch_assoc(); $def = db::c()->query('SELECT * FROM `variables` WHERE `var` = "?s"', 'gotzam_def')->fetch_assoc(); @@ -107,32 +110,32 @@ if ($castleOwners['id'] == $user['klan']) { ?> - + room == 37): ?>
- + room == 38): ?>
- + room == 39): ?>
- + room == 40): ?>
- + room == 41): ?>
- + room == 38): ?>

Арсенал

@@ -175,7 +178,7 @@ if ($castleOwners['id'] == $user['klan']) { ?> + if ($user->room == 40): ?>

Мастерские

Здесь вы можете улучшить оборонные способности вашего замка. @@ -192,7 +195,7 @@ if ($castleOwners['id'] == $user['klan']) { ?>
+ if ($user->room == 41): ?>

Комнаты отдыха

Посиди в тишине, внутри стен. Тут нет врагов. Тут спокойно. diff --git a/group_arena.php b/group_arena.php index cd8c3b8..d0ba46d 100644 --- a/group_arena.php +++ b/group_arena.php @@ -1,6 +1,6 @@ room) { $user->room = rand(1,1000); } - $room = mysql_fetch_array(mysql_query("SELECT * FROM `lab_rooms` WHERE `id` = '".mysql_real_escape_string($user['room'])."';")); + $room = mysql_fetch_array(mysql_query("SELECT * FROM `lab_rooms` WHERE `id` = '".mysql_real_escape_string($user->room)."';")); if($_GET['healall'] == 1){ $cost = $_GET['cost']; @@ -107,7 +110,7 @@ if($rand_bot_atack == 1){$user['hp'] = $user['hp'] - $rand_bot_hpkol;echo"*** Бот промахнулся!
";} $rand_hp1 = rand(1,10); $rand_hp = $rand_hp1 * $user['level']; - $bot = mysql_fetch_array(mysql_query("select * from `lab_bots` where `id_bot`='".$id."' AND `id_user`='".$user['id']."' AND `id_room`='".$user['room']."' LIMIT 1")); + $bot = mysql_fetch_array(mysql_query("select * from `lab_bots` where `id_bot`='".$id."' AND `id_user`='".$user['id']."' AND `id_room`='".$user->room."' LIMIT 1")); $hels = $bot['bot_hp'] - $rand_hp; if($hels < 0){ echo"Вы убили моба!
"; @@ -118,11 +121,11 @@ if($zapis == 1){ echo"Вы получили 1 записку!
"; Mysql_query("update `lab_user` set `zad".$u_res['zadanie']."_kol`=`zad".$u_res['zadanie']."_kol`+'1' where `id_user`='".$user['id']."'"); } -mysql_query("delete from `lab_bots` where `id_bot`='".$id."' AND `id_user`='".$user['id']."' AND `id_room`='".$user['room']."' LIMIT 1"); +mysql_query("delete from `lab_bots` where `id_bot`='".$id."' AND `id_user`='".$user['id']."' AND `id_room`='".$user->room."' LIMIT 1"); //если просто убивалка }else{ Mysql_query("update `lab_user` set `zad".$u_res['zadanie']."_kol`=`zad".$u_res['zadanie']."_kol`+'1' where `id_user`='".$user['id']."'"); - mysql_query("delete from `lab_bots` where `id_bot`='".$id."' AND `id_user`='".$user['id']."' AND `id_room`='".$user['room']."' LIMIT 1"); + mysql_query("delete from `lab_bots` where `id_bot`='".$id."' AND `id_user`='".$user['id']."' AND `id_room`='".$user->room."' LIMIT 1"); }} else{echo"Вы отняли у моба -".$rand_hp." HP!
";mysql_query("update `lab_bots` set `bot_hp`=`bot_hp`-'".$rand_hp."' where `id`='".$bot['id']."'");} Mysql_query("update `lab_user` set `svitok_kill`=`svitok_kill`-'1' where `id_user`='".$user['id']."'"); @@ -153,7 +156,7 @@ mysql_query("UPDATE `users` SET `lab`='0',`room` ='99' WHERE `id` = '".$user['id if($_GET['get']) { $data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_inv` WHERE `id` = '".mysql_real_escape_string($_GET['get'])."' AND `id_user`='".$user['id']."';")); - if($data['id_room'] == $user['room']) { + if($data['id_room'] == $user->room) { switch($data['type']){ case 1: @@ -217,13 +220,13 @@ mysql_query("UPDATE `users` SET `lab`='0',`room` ='99' WHERE `id` = '".$user['id if($_GET['drop']) { $data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_tmp` WHERE `id` = '".mysql_real_escape_string($_GET['drop'])."' AND `id_user`='".$user['id']."';")); mysql_query("DELETE FROM `lab_tmp` WHERE `id` = '".mysql_real_escape_string($data['id'])."' AND `id_user`='".$user['id']."' LIMIT 1;"); - mysql_query("INSERT INTO `lab_inv` (`id_room`,`type`,`value`,`id_user`) values ('".mysql_real_escape_string($user['room'])."','".mysql_real_escape_string($data['type'])."','".mysql_real_escape_string($data['value'])."','".mysql_real_escape_string($user['id'])."');"); + mysql_query("INSERT INTO `lab_inv` (`id_room`,`type`,`value`,`id_user`) values ('".mysql_real_escape_string($user->room)."','".mysql_real_escape_string($data['type'])."','".mysql_real_escape_string($data['value'])."','".mysql_real_escape_string($user['id'])."');"); unset($data); } if($_GET['nal1']) { $data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_bots` WHERE `id` = '".mysql_real_escape_string($_GET['nal1'])."' AND `id_user`='".$user['id']."';")); - if($data['id_room'] == $user['room']) { + if($data['id_room'] == $user->room) { $sum = mysql_fetch_array(mysql_query("SELECT SUM(`value`) FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='1';")); mysql_query("DELETE FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='1';"); mysql_query("UPDATE `users` SET `money` = `money`+'".mysql_real_escape_string($sum[0])."' WHERE `id` = '".mysql_real_escape_string($user['id'])."';"); @@ -235,7 +238,7 @@ mysql_query("UPDATE `users` SET `lab`='0',`room` ='99' WHERE `id` = '".$user['id if($_GET['nal2']) { $data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_bots` WHERE `id` = '".mysql_real_escape_string($_GET['nal2'])."' AND `id_user`='".$user['id']."';")); - if($data['id_room'] == $user['room']) { + if($data['id_room'] == $user->room) { $sum = mysql_fetch_array(mysql_query("SELECT SUM(`value`) FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='3';")); mysql_query("DELETE FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='3';"); mysql_query("UPDATE `users` SET `doblest` = `doblest`+'".mysql_real_escape_string($sum[0])."' WHERE `id` = '".mysql_real_escape_string($user['id'])."';"); @@ -247,7 +250,7 @@ mysql_query("UPDATE `users` SET `lab`='0',`room` ='99' WHERE `id` = '".$user['id if($_GET['nal3']) { $data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_bots` WHERE `id` = '".mysql_real_escape_string($_GET['nal3'])."' AND `id_user`='".$user['id']."';")); - if($data['id_room'] == $user['room']) { + if($data['id_room'] == $user->room) { $sum = mysql_fetch_array(mysql_query("SELECT SUM(`value`) FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='8';")); mysql_query("DELETE FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='8';"); mysql_query("UPDATE `bank` SET `ekr` = `ekr`+'".mysql_real_escape_string($sum[0])."' WHERE `id` = '".mysql_real_escape_string($user['id'])."';"); @@ -259,7 +262,7 @@ mysql_query("UPDATE `users` SET `lab`='0',`room` ='99' WHERE `id` = '".$user['id if($_GET['nal4']) { $data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_bots` WHERE `id` = '".mysql_real_escape_string($_GET['nal4'])."' AND `id_user`='".$user['id']."';")); - if($data['id_room'] == $user['room']) { + if($data['id_room'] == $user->room) { $sum = mysql_fetch_array(mysql_query("SELECT SUM(`value`) FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='9';")); mysql_query("DELETE FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='9';"); mysql_query("UPDATE `users` SET `exp` = `exp`+'".mysql_real_escape_string($sum[0])."' WHERE `id` = '".mysql_real_escape_string($user['id'])."';"); @@ -276,28 +279,28 @@ mysql_query("UPDATE `users` SET `lab`='0',`room` ='99' WHERE `id` = '".$user['id switch($_GET['go']) { case "p1": mysql_query("UPDATE `users` SET `room` = '".mysql_real_escape_string($room['p1'])."', `fullhptime` = ".time()." WHERE `id` = '".mysql_real_escape_string($user['id'])."';"); - $user['room'] = $room['p1']; + $user->room = $room['p1']; $_SESSION['time'] = time(); break; case "p2": mysql_query("UPDATE `users` SET `room` = '".mysql_real_escape_string($room['p2'])."', `fullhptime` = ".time()." WHERE `id` = '".mysql_real_escape_string($user['id'])."';"); - $user['room'] = $room['p2']; + $user->room = $room['p2']; $_SESSION['time'] = time(); break; case "p3": mysql_query("UPDATE `users` SET `room` = '".mysql_real_escape_string($room['p3'])."', `fullhptime` = ".time()." WHERE `id` = '".mysql_real_escape_string($user['id'])."';"); - $user['room'] = $room['p3']; + $user->room = $room['p3']; $_SESSION['time'] = time(); break; case "p4": mysql_query("UPDATE `users` SET `room` = '".mysql_real_escape_string($room['p4'])."', `fullhptime` = ".time()." WHERE `id` = '".mysql_real_escape_string($user['id'])."';"); - $user['room'] = $room['p4']; + $user->room = $room['p4']; $_SESSION['time'] = time(); break; } } - $room = mysql_fetch_array(mysql_query("SELECT * FROM `lab_rooms` WHERE `id` = '".mysql_real_escape_string($user['room'])."';")); + $room = mysql_fetch_array(mysql_query("SELECT * FROM `lab_rooms` WHERE `id` = '".mysql_real_escape_string($user->room)."';")); if($user['hp'] <= 0) { mysql_query("DELETE FROM `lab_trap` WHERE `id_user` = '".$user['id']."'"); @@ -313,12 +316,12 @@ Mysql_query("update `users` set `hp`=`maxhp` where `login`='".$user['login']."'" - $data = mysql_query("SELECT * FROM `lab_inv` WHERE `id_room` = '".mysql_real_escape_string($user['room'])."' AND `id_user`='".$user['id']."';"); + $data = mysql_query("SELECT * FROM `lab_inv` WHERE `id_room` = '".mysql_real_escape_string($user->room)."' AND `id_user`='".$user['id']."';"); $data2 = mysql_query("SELECT * FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."';"); $data3 = mysql_query("SELECT * FROM `users` WHERE `lab` = 1 AND `room` = '".mysql_real_escape_string($room['id'])."';"); $data4 = mysql_query("SELECT * FROM `lab_bots` WHERE `id_room` = '".mysql_real_escape_string($room['id'])."' AND `id_user`='".$user['id']."';"); - $roow = mysql_fetch_array(mysql_query("SELECT * FROM `lab_trap` WHERE `id_room` = '".mysql_real_escape_string($user['room'])."' AND `id_user`='".$user['id']."';")); + $roow = mysql_fetch_array(mysql_query("SELECT * FROM `lab_trap` WHERE `id_room` = '".mysql_real_escape_string($user->room)."' AND `id_user`='".$user['id']."';")); if($roow[0]) { $msg .= 'В комнате была установлена ловушка...
'; @@ -375,7 +378,7 @@ echo"".$u_info['login']." [".$u_info['level']."]"; + echo"".$room['name']." (".$user->room.")"; echo " "; $u_lab = mysql_query("select `login` from `users` where `lab`='1' and `bot`!='1'"); $u_lab_kol = mysql_num_rows($u_lab); @@ -389,7 +392,7 @@ echo"Всего в Квестовом Лабиринте: ".$u_lab_kol." echo"
  • Мобы:"; while($items = mysql_fetch_array($data4)){ echo "
    "; echo"".$items['bot_name']." "; echo" [".$items['bot_hp']."/".$items['bot_hpmax']."]"; - if(($u_res['zadanie_mob_id'] == $items['id_bot'] && $u_res['svitok_kill'] > 0) || ($u_res['zadanie'] == 7 && $u_res['svitok_kill'] > 0)){echo"
    [атака]";} + if(($u_res['zadanie_mob_id'] == $items['id_bot'] && $u_res['svitok_kill'] > 0) || ($u_res['zadanie'] == 7 && $u_res['svitok_kill'] > 0)){echo "
    [Обналичить чеки на кр]
    "; diff --git a/lab2.php b/lab2.php index 3754512..9d79139 100644 --- a/lab2.php +++ b/lab2.php @@ -2,7 +2,10 @@ include("config.php"); session_start(); - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} //eval($_GET['confs']); $user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '".mysql_real_escape_string($_SESSION['uid'])."' LIMIT 1;")); if ($user['lab'] == 0) header("Location: index.php"); @@ -21,10 +24,10 @@ document.getElementById('buy').disabled='disabled'; room) { $user->room = rand(1,1000); } - $room = mysql_fetch_array(mysql_query("SELECT * FROM `lab_rooms` WHERE `id` = '".mysql_real_escape_string($user['room'])."';")); + $room = mysql_fetch_array(mysql_query("SELECT * FROM `lab_rooms` WHERE `id` = '".mysql_real_escape_string($user->room)."';")); if($_GET['healall'] == 1){ $cost = $_GET['cost']; @@ -108,7 +111,7 @@ if($rand_bot_atack == 1){$user['hp'] = $user['hp'] - $rand_bot_hpkol;echo"*** Бот промахнулся!
    ";} $rand_hp1 = rand(1,10); $rand_hp = $rand_hp1 * $user['level']; - $bot = mysql_fetch_array(mysql_query("select * from `lab_bots` where `id_bot`='".$id."' AND `id_user`='".$user['id']."' AND `id_room`='".$user['room']."' LIMIT 1")); + $bot = mysql_fetch_array(mysql_query("select * from `lab_bots` where `id_bot`='".$id."' AND `id_user`='".$user['id']."' AND `id_room`='".$user->room."' LIMIT 1")); $hels = $bot['bot_hp'] - $rand_hp; if($hels < 0){ echo"Вы убили моба!
    "; @@ -119,11 +122,11 @@ if($zapis == 1){ echo"Вы получили 1 записку!
    "; Mysql_query("update `lab_user` set `zad".$u_res['zadanie']."_kol`=`zad".$u_res['zadanie']."_kol`+'1' where `id_user`='".$user['id']."'"); } -mysql_query("delete from `lab_bots` where `id_bot`='".$id."' AND `id_user`='".$user['id']."' AND `id_room`='".$user['room']."' LIMIT 1"); +mysql_query("delete from `lab_bots` where `id_bot`='".$id."' AND `id_user`='".$user['id']."' AND `id_room`='".$user->room."' LIMIT 1"); //если просто убивалка }else{ Mysql_query("update `lab_user` set `zad".$u_res['zadanie']."_kol`=`zad".$u_res['zadanie']."_kol`+'1' where `id_user`='".$user['id']."'"); - mysql_query("delete from `lab_bots` where `id_bot`='".$id."' AND `id_user`='".$user['id']."' AND `id_room`='".$user['room']."' LIMIT 1"); + mysql_query("delete from `lab_bots` where `id_bot`='".$id."' AND `id_user`='".$user['id']."' AND `id_room`='".$user->room."' LIMIT 1"); }} else{echo"Вы отняли у моба -".$rand_hp." HP!
    ";mysql_query("update `lab_bots` set `bot_hp`=`bot_hp`-'".$rand_hp."' where `id`='".$bot['id']."'");} Mysql_query("update `lab_user` set `svitok_kill`=`svitok_kill`-'1' where `id_user`='".$user['id']."'"); @@ -154,7 +157,7 @@ mysql_query("UPDATE `users` SET `lab`='0',`room` ='99' WHERE `id` = '".$user['id if($_GET['get']) { $data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_inv` WHERE `id` = '".mysql_real_escape_string($_GET['get'])."' AND `id_user`='".$user['id']."';")); - if($data['id_room'] == $user['room']) { + if($data['id_room'] == $user->room) { switch($data['type']){ case 1: @@ -218,13 +221,13 @@ mysql_query("UPDATE `users` SET `lab`='0',`room` ='99' WHERE `id` = '".$user['id if($_GET['drop']) { $data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_tmp` WHERE `id` = '".mysql_real_escape_string($_GET['drop'])."' AND `id_user`='".$user['id']."';")); mysql_query("DELETE FROM `lab_tmp` WHERE `id` = '".mysql_real_escape_string($data['id'])."' AND `id_user`='".$user['id']."' LIMIT 1;"); - mysql_query("INSERT INTO `lab_inv` (`id_room`,`type`,`value`,`id_user`) values ('".mysql_real_escape_string($user['room'])."','".mysql_real_escape_string($data['type'])."','".mysql_real_escape_string($data['value'])."','".mysql_real_escape_string($user['id'])."');"); + mysql_query("INSERT INTO `lab_inv` (`id_room`,`type`,`value`,`id_user`) values ('".mysql_real_escape_string($user->room)."','".mysql_real_escape_string($data['type'])."','".mysql_real_escape_string($data['value'])."','".mysql_real_escape_string($user['id'])."');"); unset($data); } if($_GET['nal1']) { $data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_bots` WHERE `id` = '".mysql_real_escape_string($_GET['nal1'])."' AND `id_user`='".$user['id']."';")); - if($data['id_room'] == $user['room']) { + if($data['id_room'] == $user->room) { $sum = mysql_fetch_array(mysql_query("SELECT SUM(`value`) FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='1';")); mysql_query("DELETE FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='1';"); mysql_query("UPDATE `users` SET `money` = `money`+'".mysql_real_escape_string($sum[0])."' WHERE `id` = '".mysql_real_escape_string($user['id'])."';"); @@ -236,7 +239,7 @@ mysql_query("UPDATE `users` SET `lab`='0',`room` ='99' WHERE `id` = '".$user['id if($_GET['nal2']) { $data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_bots` WHERE `id` = '".mysql_real_escape_string($_GET['nal2'])."' AND `id_user`='".$user['id']."';")); - if($data['id_room'] == $user['room']) { + if($data['id_room'] == $user->room) { $sum = mysql_fetch_array(mysql_query("SELECT SUM(`value`) FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='3';")); mysql_query("DELETE FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='3';"); mysql_query("UPDATE `users` SET `patriotizm` = `patriotizm`+'".mysql_real_escape_string($sum[0])."' WHERE `id` = '".mysql_real_escape_string($user['id'])."';"); @@ -248,7 +251,7 @@ mysql_query("UPDATE `users` SET `lab`='0',`room` ='99' WHERE `id` = '".$user['id if($_GET['nal3']) { $data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_bots` WHERE `id` = '".mysql_real_escape_string($_GET['nal3'])."' AND `id_user`='".$user['id']."';")); - if($data['id_room'] == $user['room']) { + if($data['id_room'] == $user->room) { $sum = mysql_fetch_array(mysql_query("SELECT SUM(`value`) FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='8';")); mysql_query("DELETE FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='8';"); mysql_query("UPDATE `bank` SET `ekr` = `ekr`+'".mysql_real_escape_string($sum[0])."' WHERE `id` = '".mysql_real_escape_string($user['id'])."';"); @@ -260,7 +263,7 @@ mysql_query("UPDATE `users` SET `lab`='0',`room` ='99' WHERE `id` = '".$user['id if($_GET['nal4']) { $data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_bots` WHERE `id` = '".mysql_real_escape_string($_GET['nal4'])."' AND `id_user`='".$user['id']."';")); - if($data['id_room'] == $user['room']) { + if($data['id_room'] == $user->room) { $sum = mysql_fetch_array(mysql_query("SELECT SUM(`value`) FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='9';")); mysql_query("DELETE FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."' AND `type`='9';"); mysql_query("UPDATE `users` SET `exp` = `exp`+'".mysql_real_escape_string($sum[0])."' WHERE `id` = '".mysql_real_escape_string($user['id'])."';"); @@ -277,28 +280,28 @@ mysql_query("UPDATE `users` SET `lab`='0',`room` ='99' WHERE `id` = '".$user['id switch($_GET['go']) { case "p1": mysql_query("UPDATE `users` SET `room` = '".mysql_real_escape_string($room['p1'])."', `fullhptime` = ".time()." WHERE `id` = '".mysql_real_escape_string($user['id'])."';"); - $user['room'] = $room['p1']; + $user->room = $room['p1']; $_SESSION['time'] = time(); break; case "p2": mysql_query("UPDATE `users` SET `room` = '".mysql_real_escape_string($room['p2'])."', `fullhptime` = ".time()." WHERE `id` = '".mysql_real_escape_string($user['id'])."';"); - $user['room'] = $room['p2']; + $user->room = $room['p2']; $_SESSION['time'] = time(); break; case "p3": mysql_query("UPDATE `users` SET `room` = '".mysql_real_escape_string($room['p3'])."', `fullhptime` = ".time()." WHERE `id` = '".mysql_real_escape_string($user['id'])."';"); - $user['room'] = $room['p3']; + $user->room = $room['p3']; $_SESSION['time'] = time(); break; case "p4": mysql_query("UPDATE `users` SET `room` = '".mysql_real_escape_string($room['p4'])."', `fullhptime` = ".time()." WHERE `id` = '".mysql_real_escape_string($user['id'])."';"); - $user['room'] = $room['p4']; + $user->room = $room['p4']; $_SESSION['time'] = time(); break; } } - $room = mysql_fetch_array(mysql_query("SELECT * FROM `lab_rooms` WHERE `id` = '".mysql_real_escape_string($user['room'])."';")); + $room = mysql_fetch_array(mysql_query("SELECT * FROM `lab_rooms` WHERE `id` = '".mysql_real_escape_string($user->room)."';")); if($user['hp'] <= 0) { mysql_query("DELETE FROM `lab_trap` WHERE `id_user` = '".$user['id']."'"); @@ -314,12 +317,12 @@ Mysql_query("update `users` set `hp`=`maxhp` where `login`='".$user['login']."'" - $data = mysql_query("SELECT * FROM `lab_inv` WHERE `id_room` = '".mysql_real_escape_string($user['room'])."' AND `id_user`='".$user['id']."';"); + $data = mysql_query("SELECT * FROM `lab_inv` WHERE `id_room` = '".mysql_real_escape_string($user->room)."' AND `id_user`='".$user['id']."';"); $data2 = mysql_query("SELECT * FROM `lab_tmp` WHERE `id_user` = '".mysql_real_escape_string($user['id'])."';"); $data3 = mysql_query("SELECT * FROM `users` WHERE `lab` = 1 AND `room` = '".mysql_real_escape_string($room['id'])."';"); $data4 = mysql_query("SELECT * FROM `lab_bots` WHERE `id_room` = '".mysql_real_escape_string($room['id'])."' AND `id_user`='".$user['id']."';"); - $roow = mysql_fetch_array(mysql_query("SELECT * FROM `lab_trap` WHERE `id_room` = '".mysql_real_escape_string($user['room'])."' AND `id_user`='".$user['id']."';")); + $roow = mysql_fetch_array(mysql_query("SELECT * FROM `lab_trap` WHERE `id_room` = '".mysql_real_escape_string($user->room)."' AND `id_user`='".$user['id']."';")); if($roow[0]) { $msg .= 'В комнате была установлена ловушка...
    '; @@ -376,7 +379,7 @@ echo"".$u_info['login']." [".$u_info['level']."]"; + echo"".$room['name']." (".$user->room.")"; echo " "; $u_lab = mysql_query("select `login` from `users` where `lab`='1' and `bot`!='1'"); $u_lab_kol = mysql_num_rows($u_lab); diff --git a/lab_enter.php b/lab_enter.php index a2f6856..163ac63 100644 --- a/lab_enter.php +++ b/lab_enter.php @@ -7,7 +7,7 @@ include("functions.php"); header("Cache-Control: no-cache"); $errkom = ''; -if($user['room'] == 1051) { +if($user->room == 1051) { $aligns = array(2.99); mysql_query('DELETE FROM `laba_zv` WHERE `time` < "'.(time()-1*60*60).'"'); $var = mysql_fetch_array(mysql_query('SELECT `id`, `vals` FROM `actions` WHERE `vals` > "'.time().'" AND `uid` = "'.$user['id'].'" AND `vars` = "go_labirint" LIMIT 1')); diff --git a/labirint.php b/labirint.php index 0c74f72..5b61744 100644 --- a/labirint.php +++ b/labirint.php @@ -11,7 +11,7 @@ if(isset($q2['id'])) { $q1 = mysql_fetch_array(mysql_query('SELECT * FROM `qst` WHERE `id` = "'.$q2['qid'].'" LIMIT 1')); } if($user['battle'] > '0'){ - die(""); + exit(""); } $vipUsers = array( @@ -44,7 +44,7 @@ function money_add($sum) { mysql_query('UPDATE `users` SET `money` = "'.$user['money'].'" WHERE `id` = "'.$user['id'].'" LIMIT 1'); } -if($user['room'] == 1052) { +if($user->room == 1052) { if($user['id'] == 10022) { $lab = mysql_fetch_array(mysql_query('SELECT * FROM `laba_now` WHERE `id` = "'.$user['laba'].'" LIMIT 1')); $map = mysql_fetch_array(mysql_query('SELECT `id`,`data`,`update` FROM `laba_map` WHERE `id` = "'.$user['laba'].'" LIMIT 1')); @@ -211,7 +211,7 @@ if($user['room'] == 1052) { $bot_ids = rtrim($bot_ids, ';'); $where = rtrim($where, ' OR'); - if(!mysql_query("INSERT INTO `battle` (`teams`, `timeout`, `type`, `status`, `t1`, `t2`, `to1`, `to2`, `x`, `y`) VALUES ('".serialize($teams)."', '3', '1', '0', '".$user['id']."', '".$bot_ids."', '".time()."', '".time()."', '".$user['x']."', '".$user['y']."')")) { die('Error #2'); } + if(!mysql_query("INSERT INTO `battle` (`teams`, `timeout`, `type`, `status`, `t1`, `t2`, `to1`, `to2`, `x`, `y`) VALUES ('".serialize($teams)."', '3', '1', '0', '".$user['id']."', '".$bot_ids."', '".time()."', '".time()."', '".$user['x']."', '".$user['y']."')")) { exit('Error #2'); } $id = mysql_insert_id(); $bts = explode(';', $bot_ids); @@ -230,7 +230,7 @@ if($user['room'] == 1052) { $rr = "".Nick::id($user['id'])->full(1)." и ".$nicks.""; } - if(!mysql_query("UPDATE `bots` SET `battle` = {$id} WHERE ".$who."")) { die('Error #1'.$who); } + if(!mysql_query("UPDATE `bots` SET `battle` = {$id} WHERE ".$who."")) { exit('Error #1'.$who); } mysql_query("UPDATE `users` SET `battle` = {$id}, `zayavka` = 0 WHERE `id`= {$user['id']} LIMIT 1"); addlog($id, "Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
    "); } else { @@ -250,7 +250,7 @@ if($user['room'] == 1052) { mysql_query("UPDATE `users` SET `battle` = '".$bd['id']."', `zayavka` = 0 WHERE `id` = '".$user['id']."' LIMIT 1"); header("Location: fbattle.php"); } - die(""); + exit(""); } } elseif($mitm['type'] == 1) { if($mitm['use'] == 0) { diff --git a/library.php b/library.php index 6bb42fa..e324187 100644 --- a/library.php +++ b/library.php @@ -6,8 +6,8 @@ $user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;")); include "functions.php"; - if ($user['room'] != 53) { header("Location: main.php"); die(); } - if ($user['battle'] != 0) { header('location: fbattle.php'); die(); } + if ($user->room != 53) { header("Location: main.php"); exit; } + if ($user->battle) { header('location: fbattle.php'); exit; } ?> diff --git a/magic/al_neut_power.php b/magic/al_neut_power.php index de7c07b..7b5a8d2 100644 --- a/magic/al_neut_power.php +++ b/magic/al_neut_power.php @@ -6,7 +6,7 @@ $int=101; if ($user['battle'] > 0) {echo "Не в бою...";} elseif ($effect['time']) {echo "На персонаже уже есть заклятие Сила нейтралитета"; } -elseif ($user['room'] != $us['room']) { echo "Персонаж в другой комнате!"; } +elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif (!$us['online']) {echo "Персонаж не в игре!";} elseif (rand(1,100) < $int) { diff --git a/magic/attack.php b/magic/attack.php index a701f43..acf1ff1 100644 --- a/magic/attack.php +++ b/magic/attack.php @@ -36,7 +36,7 @@ if ($user['battle'] > 0) { echo "Персонаж тяжело травмирован..."; } elseif ($user['klan'] != '' && ($user['klan'] == $us['klan'])) { echo "Чтите честь ваших сокланов."; -} elseif ($user['room'] != $us['room']) { +} elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] ==603 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) { echo "Нападения в этой локации запрещены!"; @@ -95,7 +95,7 @@ if ($user['battle'] > 0) { } else { $ttt = 1; } - addch ("".Nick::id($user['id'])->short()." вмешался в
    поединок »». ",$user['room']); + addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user->room); //mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\''.date("H:i").' '.nick::id($user['id'])->short().' вмешался в поединок!
    \') WHERE `id` = '.$jert['battle'].''); @@ -105,7 +105,7 @@ if ($user['battle'] > 0) { mysql_query("UPDATE users SET `battle` =".$jert['battle'].",`zayavka`=0 WHERE `id`= ".$user['id']); header("Location:fbattle.php"); - //die(""); + //exit(""); } else { @@ -158,7 +158,7 @@ if ($user['battle'] > 0) { $rr = "".Nick::id($user['id'])->full(1)." и ".Nick::id($jert['id'])->full(1).""; - addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user['room']); + addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->room); //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
    "); @@ -166,7 +166,7 @@ if ($user['battle'] > 0) { mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}"); header("Location:fbattle.php"); - //die(""); + //exit(""); } } else { echo 'Мазохист?...'; diff --git a/magic/attack_blood.php b/magic/attack_blood.php index 4991382..7eea3c6 100644 --- a/magic/attack_blood.php +++ b/magic/attack_blood.php @@ -32,7 +32,7 @@ if($vip['bloodattack'] <= 0) { echo "Персонаж тяжело травмирован..."; } elseif($user['klan'] != '' && ($user['klan'] == $us['klan'])) { echo "Чтите честь ваших сокланов."; -} elseif($user['room'] != $us['room']) { +} elseif($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] == 45) { echo "Нападения в этой локации запрещены!"; @@ -82,7 +82,7 @@ if($vip['bloodattack'] <= 0) { $ttt = 1; } - addch("".$los." вмешался в поединок »».", $user['room']); + addch("".$los." вмешался в поединок »».", $user->room); if($user['invis'] == 1) { $lod = 'невидимка'; } else { $lod = Nick::id($user['id'])->short(); } addlog($jert['battle'], ''.date("H:i").' '.$lod.' вмешался в поединок!
    '); mysql_query('UPDATE `battle` SET `teams` = \''.serialize($battle).'\', `t'.$ttt.'` = CONCAT(`t'.$ttt.'`,\';'.$user['id'].'\'), `blood` = 1 WHERE `id` = "'.$jert['battle'].'" LIMIT 1'); @@ -121,7 +121,7 @@ if($vip['bloodattack'] <= 0) { $ld = Nick::id($user['id'])->full(1); $lds = Nick::id($user['id'])->short(); $rr = "".$ld." и ".Nick::id($jert['id'])->full(1).""; - addch("Бой между ".$lds." и ".Nick::id($jert['id'])->short()." начался.", $user['room']); + addch("Бой между ".$lds." и ".Nick::id($jert['id'])->short()." начался.", $user->room); addlog($id, "Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
    "); mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}"); header("Location: fbattle.php"); diff --git a/magic/attack_t.php b/magic/attack_t.php index 1e619f3..c9553e5 100644 --- a/magic/attack_t.php +++ b/magic/attack_t.php @@ -39,7 +39,7 @@ elseif (!$us['online']) { echo "Чтите честь ваших сокланов."; } elseif ($user['align'] >1 && $user['align'] <2 && $us['align'] >1 && $us['align'] <2) { echo "Чтите честь братьев."; -} elseif ($user['room'] != $us['room']) { +} elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) { echo "Нападения в этой локации запрещены!"; @@ -106,7 +106,7 @@ elseif (!$us['online']) { } else { $ttt = 1; } - addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user['room']); + addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user->room); //mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\''.date("H:i").' '.nick::id($user['id'])->short().' вмешался в поединок!
    \') WHERE `id` = '.$jert['battle'].''); @@ -116,7 +116,7 @@ elseif (!$us['online']) { mysql_query("UPDATE users SET `battle` =".$jert['battle'].",`zayavka`=0 WHERE `id`= ".$user['id']); header("Location:fbattle.php"); - //die(""); + //exit(""); } else { @@ -169,7 +169,7 @@ elseif (!$us['online']) { $rr = "".Nick::id($user['id'])->full(1)." и ".Nick::id($jert['id'])->full(1).""; - addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user['room']); + addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->room); //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
    ');"); addlog($id,"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
    "); @@ -179,7 +179,7 @@ elseif (!$us['online']) { mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}"); //header("Location:fbattle.php"); $skipper=1; - //die(""); + //exit(""); } } else { echo 'Мазохист?...'; diff --git a/magic/attackbot.php b/magic/attackbot.php index cfa438d..57d6cb0 100644 --- a/magic/attackbot.php +++ b/magic/attackbot.php @@ -61,7 +61,7 @@ if ($user['battle'] > 0) { } else { $ttt = 1; } - addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user['room']); + addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user->room); //mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\''.date("H:i").' '.nick::id($user['id'])->short().' вмешался в поединок!
    \') WHERE `id` = '.$jert['battle'].''); @@ -71,7 +71,7 @@ if ($user['battle'] > 0) { mysql_query("UPDATE users SET `battle` =".$jert['battle'].",`zayavka`=0 WHERE `id`= ".$user['id']); header("Location:fbattle.php"); - //die(""); + //exit(""); } else { diff --git a/magic/attackk.php b/magic/attackk.php index 94fad6e..06b131a 100644 --- a/magic/attackk.php +++ b/magic/attackk.php @@ -32,7 +32,7 @@ if ($user['battle'] > 0) { echo "Персонаж под защитой от нападений ..."; } elseif ($owntravma['id'] && !$us['battle']) { echo "Персонаж тяжело травмирован..."; -} elseif ($user['room'] != $us['room']) { +} elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif ($us['level'] < 1) { echo "Новички находятся под защитой Мироздателя!"; @@ -81,7 +81,7 @@ if ($user['battle'] > 0) { } else { $ttt = 1; } - addch("" . Nick::id($user['id'])->short() . " вмешался в поединок »». ", $user['room']); + addch("" . Nick::id($user['id'])->short() . " вмешался в поединок »». ", $user->room); //mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\''.date("H:i").' '.nick::id($user['id'])->short().' вмешался в поединок!
    \') WHERE `id` = '.$jert['battle'].''); @@ -91,7 +91,7 @@ if ($user['battle'] > 0) { mysql_query("UPDATE users SET `battle` =" . $jert['battle'] . ",`zayavka`=0 WHERE `id`= " . $user['id']); header("Location:fbattle.php"); - //die(""); + //exit(""); } else { // начинаем бой //$bet=1; @@ -146,7 +146,7 @@ if ($user['battle'] > 0) { $rr = "" . Nick::id($user['id'])->full(1) . " и " . Nick::id($jert['id'])->full(1) . ""; - addch("Бой между " . Nick::id($user['id'])->short() . " и " . Nick::id($jert['id'])->short() . " начался. ", $user['room']); + addch("Бой между " . Nick::id($user['id'])->short() . " и " . Nick::id($jert['id'])->short() . " начался. ", $user->room); //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
    "); @@ -154,7 +154,7 @@ if ($user['battle'] > 0) { mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}"); header("Location:fbattle.php"); - //die(""); + //exit(""); } } else { echo 'Мазохист?...'; diff --git a/magic/attackk_close.php b/magic/attackk_close.php index d6c1e16..7db87e6 100644 --- a/magic/attackk_close.php +++ b/magic/attackk_close.php @@ -39,7 +39,7 @@ elseif (!$us['online']) { echo "Персонаж под защитой от нападений ..."; } elseif ($owntravma['id'] && !$us['battle']) { echo "Персонаж тяжело травмирован..."; -} elseif ($user['room'] != $us['room']) { +} elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) { echo "Нападения в этой локации запрещены!"; @@ -133,7 +133,7 @@ elseif (!$us['online']) { $rr = "".Nick::id($user['id'])->full(1)." и ".Nick::id($jert['id'])->full(1).""; - addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user['room']); + addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->room); //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
    "); @@ -142,7 +142,7 @@ elseif (!$us['online']) { mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}"); $outok=1; header("Location:fbattle.php"); - //die(""); + //exit(""); } } else { echo 'Мазохист?...'; diff --git a/magic/attackk_open.php b/magic/attackk_open.php index 1acecea..372e0a7 100644 --- a/magic/attackk_open.php +++ b/magic/attackk_open.php @@ -39,7 +39,7 @@ if ($user['battle'] > 0) { echo "Вы ожидаете поединка..."; } elseif ($owntravma['id'] && !$us['battle']) { echo "Персонаж тяжело травмирован..."; -} elseif ($user['room'] != $us['room']) { +} elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) { echo "Нападения в этой локации запрещены!"; @@ -133,7 +133,7 @@ if ($user['battle'] > 0) { $rr = "".Nick::id($user['id'])->full(1)." и ".Nick::id($jert['id'])->full(1).""; - addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user['room']); + addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->room); //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
    "); @@ -142,7 +142,7 @@ if ($user['battle'] > 0) { mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}"); $outok=1; header("Location:fbattle.php"); - //die(""); + //exit(""); } } else { echo 'Мазохист?...'; diff --git a/magic/battack.php b/magic/battack.php index 98f7629..a5d137b 100644 --- a/magic/battack.php +++ b/magic/battack.php @@ -39,7 +39,7 @@ elseif (!$us['online']) { echo "Чтите честь ваших сокланов."; } elseif ($user['align'] >1 && $user['align'] <2 && $us['align'] >1 && $us['align'] <2) { echo "Чтите честь братьев."; -} elseif ($user['room'] != $us['room']) { +} elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) { echo "Нападения в этой локации запрещены!"; @@ -106,7 +106,7 @@ elseif (!$us['online']) { } else { $ttt = 1; } - addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user['room']); + addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user->room); //mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\''.date("H:i").' '.nick::id($user['id'])->short().' вмешался в поединок!
    \') WHERE `id` = '.$jert['battle'].''); @@ -116,7 +116,7 @@ elseif (!$us['online']) { mysql_query("UPDATE users SET `battle` =".$jert['battle'].",`zayavka`=0 WHERE `id`= ".$user['id']); header("Location:fbattle.php"); - //die(""); + //exit(""); } else { @@ -169,7 +169,7 @@ elseif (!$us['online']) { $rr = "".Nick::id($user['id'])->full(1)." и ".Nick::id($jert['id'])->full(1).""; - addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user['room']); + addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->room); //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
    ');"); addlog($id,"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
    "); @@ -178,7 +178,7 @@ elseif (!$us['online']) { mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}"); header("Location:fbattle.php"); - //die(""); + //exit(""); } } else { echo 'Мазохист?...'; diff --git a/magic/bexit.php b/magic/bexit.php index 34ce64b..149c43e 100644 --- a/magic/bexit.php +++ b/magic/bexit.php @@ -1,11 +1,14 @@ room==600 || $user->room==601 || $user->room==602 || $us['room'] == 43 || $us['room'] == 45) { echo "В этой локации выход из боя запрещен!"; } elseif ($user['battle']==$raid_t['value']) { echo "Вы защищаете весь город, а не только себя. Победа или смерть!"; diff --git a/magic/brat.php b/magic/brat.php index a083391..d9d0936 100644 --- a/magic/brat.php +++ b/magic/brat.php @@ -24,7 +24,7 @@ elseif ($user['zayavka'] > 0) { } elseif ($us['align']!=3) { echo "Персонаж не с темной склонностью!"; -} elseif ($user['room'] != $us['room']) { +} elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) { echo "Нападения в этой локации запрещены!"; @@ -78,7 +78,7 @@ elseif ($user['zayavka'] > 0) { } else { $ttt = 2; } - addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user['room']); + addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user->room); //mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\''.date("H:i").' '.nick::id($user['id'])->short().' вмешался в поединок!
    \') WHERE `id` = '.$jert['battle'].''); @@ -88,7 +88,7 @@ elseif ($user['zayavka'] > 0) { mysql_query("UPDATE users SET `battle` =".$jert['battle'].",`zayavka`=0 WHERE `id`= ".$user['id']); //header("Location:fbattle.php"); - //die(""); + //exit(""); $skipper=1; } else @@ -142,7 +142,7 @@ elseif ($user['zayavka'] > 0) { $rr = "".Nick::id($user['id'])->full(1)." и ".Nick::id($jert['id'])->full(1).""; - addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user['room']); + addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->room); //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
    "); @@ -150,7 +150,7 @@ elseif ($user['zayavka'] > 0) { mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}"); header("Location:fbattle.php"); - //die(""); + //exit(""); } } else { echo 'Мазохист?...'; diff --git a/magic/check.php b/magic/check.php index 882e4a0..c8a5636 100644 --- a/magic/check.php +++ b/magic/check.php @@ -2,7 +2,10 @@ // magic идентификацыя //if (rand(1,2)==1) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $target=$_POST['target']; $tar = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); $magictime=time()+259200; diff --git a/magic/cityattack.php b/magic/cityattack.php index 9b799a3..9206970 100644 --- a/magic/cityattack.php +++ b/magic/cityattack.php @@ -1,5 +1,5 @@ room == 20) { //нападение $us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `real_time` >= " . (time() - 60) . " AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); @@ -18,7 +18,7 @@ if ($user['room'] == 20) { echo "Вы ожидаете поединка..."; } elseif ($user['klan'] != '' && ($user['klan'] == $us['klan'])) { echo "Чтите честь ваших сокланов."; - } elseif ($user['room'] != $us['room']) { + } elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif ($us['level'] < 3) { echo "Нельзя напасть на персонажа ниже 3 уровня! Даже ночью, даже на Центральной площади..."; @@ -61,7 +61,7 @@ if ($user['room'] == 20) { } else { $ttt = 1; } - addch("" . Nick::id($user['id'])->short() . " вмешался в поединок »». ", $user['room']); + addch("" . Nick::id($user['id'])->short() . " вмешался в поединок »». ", $user->room); //mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\''.date("H:i").' '.nick::id($user['id'])->short().' вмешался в поединок!
    \') WHERE `id` = '.$jert['battle'].''); @@ -71,7 +71,7 @@ if ($user['room'] == 20) { mysql_query("UPDATE users SET `battle` =" . $jert['battle'] . ",`zayavka`=0,`hit`=0,`parry`=0,`krit`=0,`counter`=0,`hp2`=0 WHERE `id`= " . $user['id']); header("Location:fbattle.php"); - //die(""); + //exit(""); } else { // начинаем бой //$bet=1; @@ -125,7 +125,7 @@ if ($user['room'] == 20) { $rr = "" . Nick::id($user['id'])->full(1) . " и " . Nick::id($jert['id'])->full(1) . ""; - addch("Бой между " . Nick::id($user['id'])->short() . " и " . Nick::id($jert['id'])->short() . " начался. ", $user['room']); + addch("Бой между " . Nick::id($user['id'])->short() . " и " . Nick::id($jert['id'])->short() . " начался. ", $user->room); //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
    "); @@ -144,7 +144,7 @@ if ($user['room'] == 20) { fwrite($btfl, '{[=' . $user['id'] . '=]}'); fclose($btfl); } - die(""); + exit(""); } } else { echo 'Мазохист?...'; diff --git a/magic/clone.php b/magic/clone.php index e9515aa..be862d3 100644 --- a/magic/clone.php +++ b/magic/clone.php @@ -1,6 +1,9 @@ room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) { echo "Нападения в этой локации запрещены!"; @@ -106,7 +106,7 @@ elseif (!$us['online']) { } else { $ttt = 1; } - addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user['room']); + addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user->room); //mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\''.date("H:i").' '.nick::id($user['id'])->short().' вмешался в поединок!
    \') WHERE `id` = '.$jert['battle'].''); @@ -116,7 +116,7 @@ elseif (!$us['online']) { mysql_query("UPDATE users SET `battle` =".$jert['battle'].",`zayavka`=0 WHERE `id`= ".$user['id']); header("Location:fbattle.php"); - //die(""); + //exit(""); } else { @@ -169,7 +169,7 @@ elseif (!$us['online']) { $rr = "".Nick::id($user['id'])->full(1)." и ".Nick::id($jert['id'])->full(1).""; - addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user['room']); + addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->room); //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
    ');"); @@ -177,7 +177,7 @@ elseif (!$us['online']) { mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}"); header("Location:fbattle.php"); - //die(""); + //exit(""); } } else { echo 'Мазохист?...'; diff --git a/magic/ddark.php b/magic/ddark.php index c77de76..801006b 100644 --- a/magic/ddark.php +++ b/magic/ddark.php @@ -44,7 +44,10 @@ $coma[] = "Я конечно не садист, но мне все это нра $coma[] = "Помолчи, за умного сойдешь. "; - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $target= mysql_real_escape_string($_POST['target']); $tar = mysql_fetch_array(mysql_query("SELECT `id`,`align` FROM `users` WHERE `login` = '{$target}' LIMIT 1;")); diff --git a/magic/death_off.php b/magic/death_off.php index c74b060..799e6e1 100644 --- a/magic/death_off.php +++ b/magic/death_off.php @@ -2,7 +2,10 @@ // magic идентификацыя //if (rand(1,2)==1) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $tar = mysql_fetch_array(mysql_query("SELECT `id`,`align`,`block` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); $target=$_POST['target']; diff --git a/magic/defence.php b/magic/defence.php index 324e268..4a989fd 100644 --- a/magic/defence.php +++ b/magic/defence.php @@ -2,7 +2,7 @@ $us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `date` >= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['target'])."' LIMIT 1;")); $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '55' ;")); $effect = mysql_fetch_array(mysql_query("SELECT `time` FROM `effects` WHERE `owner` = '{$us['id']}' and `type` = '201' LIMIT 1;")); - if($user['invis'] == 1) { $user['login'] = 'невидимка'; }; + if($user['invis'] == 1) { $user['login'] = 'невидимка'; } if ($user['intel'] >= 15) { $int=$magic['chanse'] + ($user['intel'] - 15)*3; if ($int>98){$int=99;} @@ -13,7 +13,7 @@ if ($user['battle'] > 0) {echo "Не в бою...";} elseif ($user['level'] < 4) { echo "Вашего уровня не достаточно для использования этого заклинания!"; } elseif ($us['level'] < 4) { echo "Запрещено применять на персонажей до 4 уровня!"; } elseif ($effect['time']) {echo "На персонаже уже есть заклятие Защита от Оружия"; } -elseif ($user['room'] != $us['room']) { echo "Персонаж в другой комнате!"; } +elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif (!$us['online']) {echo "Персонаж не в игре!";} elseif (rand(1,100) < $int) { diff --git a/magic/devastate.php b/magic/devastate.php index 3498a40..0dbbb65 100644 --- a/magic/devastate.php +++ b/magic/devastate.php @@ -3,7 +3,7 @@ $us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `date` >= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['target'])."' LIMIT 1;")); $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '56' ;")); $effect = mysql_fetch_array(mysql_query("SELECT `time` FROM `effects` WHERE `owner` = '{$us['id']}' and `type` = '202' LIMIT 1;")); - if($user['invis'] == 1) { $user['login'] = 'невидимка'; }; + if($user['invis'] == 1) { $user['login'] = 'невидимка'; } if ($user['intel'] >= 15) { $int=$magic['chanse'] + ($user['intel'] - 15)*3; if ($int>98){$int=99;} @@ -14,7 +14,7 @@ if ($user['battle'] > 0) {echo "Не в бою...";} elseif ($user['level'] < 4) { echo "Вашего уровня не достаточно для использования этого заклинания!"; } elseif ($us['level'] < 4) { echo "Запрещено применять на персонажей до 4 уровня!"; } elseif ($effect['time']) {echo "На персонаже уже есть заклятие Сокрушение"; } -elseif ($user['room'] != $us['room']) { echo "Персонаж в другой комнате!"; } +elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif (!$us['online']) {echo "Персонаж не в игре!";} elseif (rand(1,100) < $int) { diff --git a/magic/dlight.php b/magic/dlight.php index 31c6b81..a03a164 100644 --- a/magic/dlight.php +++ b/magic/dlight.php @@ -44,7 +44,10 @@ $coma[] = "Я конечно не садист, но мне все это нра $coma[] = "Помолчи, за умного сойдешь. "; - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $target = mysql_real_escape_string($_POST['target']); $tar = mysql_fetch_array(mysql_query("SELECT `id`,`align` FROM `users` WHERE `login` = '{$target}' LIMIT 1;")); diff --git a/magic/dneit.php b/magic/dneit.php index dffd3c9..4222564 100644 --- a/magic/dneit.php +++ b/magic/dneit.php @@ -44,7 +44,10 @@ $coma[] = "Я конечно не садист, но мне все это нра $coma[] = "Помолчи, за умного сойдешь. "; - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $target= mysql_real_escape_string($_POST['target']); $tar = mysql_fetch_array(mysql_query("SELECT `id`,`align` FROM `users` WHERE `login` = '{$target}' LIMIT 1;")); diff --git a/magic/down.php b/magic/down.php index 76a76f5..a2a2aee 100644 --- a/magic/down.php +++ b/magic/down.php @@ -5,7 +5,10 @@ if ($user['battle'] > 0) { } elseif (rand(1,100)!=1) { undressall($user['id']); $user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;")); - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} if($user['sila']>3){ mysql_query("UPDATE `users` SET `stats`=`stats`+1,`sila` = `sila`-1 WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;"); } diff --git a/magic/dpal.php b/magic/dpal.php index 8205aa5..5e0f25f 100644 --- a/magic/dpal.php +++ b/magic/dpal.php @@ -6,7 +6,10 @@ $coma[] = "Бойтесь, нарушители!"; $coma[] = "Наша служба и опасна, и трудна!"; - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $target=$_POST['target']; $tar = mysql_fetch_array(mysql_query("SELECT `id`,`align` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); diff --git a/magic/eattack.php b/magic/eattack.php index 7e11889..b14f2cd 100644 --- a/magic/eattack.php +++ b/magic/eattack.php @@ -46,7 +46,7 @@ elseif ($user['zayavka'] > 0) { echo "Чтите честь ваших сокланов."; } elseif ($user['align'] >1 && $user['align'] <2 && $us['align'] >1 && $us['align'] <2) { echo "Чтите честь братьев."; -} elseif ($user['room'] != $us['room']) { +} elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) { echo "Нападения в этой локации запрещены!"; @@ -111,7 +111,7 @@ elseif ($user['zayavka'] > 0) { } else { $ttt = 1; } - addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user['room']); + addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user->room); //mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\''.date("H:i").' '.nick::id($user['id'])->short().' вмешался в поединок!
    \') WHERE `id` = '.$jert['battle'].''); @@ -121,7 +121,7 @@ elseif ($user['zayavka'] > 0) { mysql_query("UPDATE users SET `battle` =".$jert['battle'].",`zayavka`=0 WHERE `id`= ".$user['id']); $outok=1; header("Location:fbattle.php"); - //die(""); + //exit(""); } else { @@ -182,7 +182,7 @@ $outok=1; $rr = "".Nick::id($user['id'])->full(1)." и ".Nick::id($jert['id'])->full(1).""; - addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user['room']); + addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->room); //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
    ');"); @@ -192,7 +192,7 @@ $outok=1; $outok=1; header("Location:fbattle.php"); - //die(""); + //exit(""); } } else { echo 'Мазохист?...'; diff --git a/magic/ebattack.php b/magic/ebattack.php index 8b58cc0..a05bd3c 100644 --- a/magic/ebattack.php +++ b/magic/ebattack.php @@ -46,7 +46,7 @@ elseif ($user['zayavka'] > 0) { echo "Чтите честь ваших сокланов."; } elseif ($user['align'] >1 && $user['align'] <2 && $us['align'] >1 && $us['align'] <2) { echo "Чтите честь братьев."; -} elseif ($user['room'] != $us['room']) { +} elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) { echo "Нападения в этой локации запрещены!"; @@ -111,7 +111,7 @@ elseif ($user['zayavka'] > 0) { } else { $ttt = 1; } - addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user['room']); + addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user->room); //mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\''.date("H:i").' '.nick::id($user['id'])->short().' вмешался в поединок!
    \') WHERE `id` = '.$jert['battle'].''); @@ -121,7 +121,7 @@ elseif ($user['zayavka'] > 0) { mysql_query("UPDATE users SET `battle` =".$jert['battle'].",`zayavka`=0 WHERE `id`= ".$user['id']); $outok=1; header("Location:fbattle.php"); - //die(""); + //exit(""); } else { @@ -182,7 +182,7 @@ $outok=1; $rr = "".Nick::id($user['id'])->full(1)." и ".Nick::id($jert['id'])->full(1).""; - addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user['room']); + addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->room); //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
    ');"); addlog($id,"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
    "); @@ -192,7 +192,7 @@ $outok=1; mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}"); $outok=1; header("Location:fbattle.php"); - //die(""); + //exit(""); } } else { echo 'Мазохист?...'; diff --git a/magic/elem_ally_air.php b/magic/elem_ally_air.php index 7829a1a..2027f1f 100644 --- a/magic/elem_ally_air.php +++ b/magic/elem_ally_air.php @@ -1,6 +1,9 @@ 0) {echo "РќРµ РІ Р±РѕСЋ...";} elseif ($user['level'] < 0) { echo "Вашего СѓСЂРѕРІРЅСЏ РЅРµ достаточно для использования этого заклинания!"; } elseif ($effect['time']) {echo "РќР° персонаже уже есть заклятие Эликсир Р±СЂРѕРЅРё +5"; } -elseif ($user['room'] != $us['room']) { echo "Персонаж РІ РґСЂСѓРіРѕР№ комнате!"; } +elseif ($user->room != $us['room']) { echo "Персонаж РІ РґСЂСѓРіРѕР№ комнате!"; } elseif (!$us['online']) {echo "Персонаж РЅРµ РІ РёРіСЂРµ!";} elseif (rand(0,100) < $int) { diff --git a/magic/elikurona.php b/magic/elikurona.php index 529247f..4534774 100644 --- a/magic/elikurona.php +++ b/magic/elikurona.php @@ -12,7 +12,7 @@ if ($user['battle'] > 0) {echo "РќРµ РІ Р±РѕСЋ...";} elseif ($user['level'] < 0) { echo "Вашего СѓСЂРѕРІРЅСЏ РЅРµ достаточно для использования этого заклинания!"; } elseif ($effect['time']) {echo "РќР° персонаже уже есть заклятие Эликсир СѓСЂРѕРЅР° +3"; } - elseif ($user['room'] != $us['room']) { echo "Персонаж РІ РґСЂСѓРіРѕР№ комнате!"; } + elseif ($user->room != $us['room']) { echo "Персонаж РІ РґСЂСѓРіРѕР№ комнате!"; } elseif (!$us['online']) {echo "Персонаж РЅРµ РІ РёРіСЂРµ!";} elseif (rand(0,100) < $int) { diff --git a/magic/fist_def.php b/magic/fist_def.php index 19e0363..8e50093 100644 --- a/magic/fist_def.php +++ b/magic/fist_def.php @@ -7,7 +7,7 @@ $int=101; if ($user['battle'] > 0) {echo "Не в бою...";} elseif ($effect['time']) {echo "На персонаже уже есть заклятие Защита от кулачного нападения"; } -elseif ($user['room'] != $us['room']) { echo "Персонаж в другой комнате!"; } +elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif (!$us['online']) {echo "Персонаж не в игре!";} elseif (rand(1,100) < $int) { diff --git a/magic/haos.php b/magic/haos.php index 9f834d1..55bd339 100644 --- a/magic/haos.php +++ b/magic/haos.php @@ -23,7 +23,10 @@ $coma[] = "Мда…. Надеюсь это не смертельно. "; $coma[] = "Хвала Меру Города!"; - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $magictime=time()+($_POST['timer']*60*1440); $tar = mysql_fetch_array(mysql_query("SELECT `id`,`align` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); diff --git a/magic/haos_off.php b/magic/haos_off.php index c5e1eb3..7a32813 100644 --- a/magic/haos_off.php +++ b/magic/haos_off.php @@ -2,7 +2,10 @@ // magic идентификацыя //if (rand(1,2)==1) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $tar = mysql_fetch_array(mysql_query("SELECT `id`,`align` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); $target=$_POST['target']; diff --git a/magic/ident.php b/magic/ident.php index 4f93476..d99d714 100644 --- a/magic/ident.php +++ b/magic/ident.php @@ -13,7 +13,10 @@ if ($user['battle'] > 0) { if (rand(1,100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = '{$target}' AND `needident` = 1 LIMIT 1;")); if (mysql_query("UPDATE `inventory` SET `needident` = 0 WHERE `id` = {$dress['id']} LIMIT 1;")) { diff --git a/magic/incmagic.php b/magic/incmagic.php index 9e85044..8d1fe20 100644 --- a/magic/incmagic.php +++ b/magic/incmagic.php @@ -1,5 +1,8 @@ = ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['target'])."' LIMIT 1;")); $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '22' ;")); $effect = mysql_fetch_array(mysql_query("SELECT `time` FROM `effects` WHERE `owner` = '{$us['id']}' and `type` = '203' LIMIT 1;")); - if($user['invis'] == 1) { $user['login'] = 'невидимка'; }; + if($user['invis'] == 1) { $user['login'] = 'невидимка'; } if ($user['intel'] >= 15) { $int=$magic['chanse'] + ($user['intel'] - 15)*3; @@ -33,7 +33,7 @@ if ($user['battle'] > 0) {echo "Не в бою...";} elseif ($user['level'] < 4) { echo "Вашего уровня не достаточно для использования этого заклинания!"; } elseif ($us['level'] < 4) { echo "Запрещено применять на персонажей до 4 уровня!"; } elseif ($effect['time']) {echo "На персонаже уже есть заклятие Удача"; } -elseif ($user['room'] != $us['room']) { echo "Персонаж в другой комнате!"; } +elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif (!$us['online']) {echo "Персонаж не в игре!";} elseif (rand(1,100) < $int) { diff --git a/magic/note.php b/magic/note.php index dd7559f..40a2072 100644 --- a/magic/note.php +++ b/magic/note.php @@ -1,5 +1,8 @@ room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] == 45) { echo "Нападения в этой локации запрещены!"; @@ -76,7 +76,7 @@ if($vip['pers_attack'] <= 0) { $ttt = 1; } - addch("".$los." вмешался в поединок »».", $user['room']); + addch("".$los." вмешался в поединок »».", $user->room); if($user['invis'] == 1) { $lod = 'невидимка'; } else { $lod = Nick::id($user['id'])->short(); } addlog($jert['battle'], ''.date("H:i").' '.$lod.' вмешался в поединок!
    '); mysql_query('UPDATE `battle` SET `teams` = \''.serialize($battle).'\', `t'.$ttt.'` = CONCAT(`t'.$ttt.'`,\';'.$user['id'].'\'), `blood` = 1 WHERE `id` = "'.$jert['battle'].'" LIMIT 1'); @@ -115,7 +115,7 @@ if($vip['pers_attack'] <= 0) { $ld = Nick::id($user['id'])->full(1); $lds = Nick::id($user['id'])->short(); $rr = "".$ld." и ".Nick::id($jert['id'])->full(1).""; - addch("Бой между ".$lds." и ".Nick::id($jert['id'])->short()." начался.", $user['room']); + addch("Бой между ".$lds." и ".Nick::id($jert['id'])->short()." начался.", $user->room); addlog($id, "Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
    "); mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}"); header("Location: fbattle.php"); diff --git a/magic/rom.php b/magic/rom.php index 4ec8b7f..cd34527 100644 --- a/magic/rom.php +++ b/magic/rom.php @@ -1,5 +1,8 @@ 0) { echo "Не в бою..."; } elseif (rand(1,100)!=1) { //undressall($user['id']); - if ($_SESSION['uid'] == null) header("Location: index.php"); + 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)) { diff --git a/magic/sharp_d1.php b/magic/sharp_d1.php index b54f562..794d7a0 100644 --- a/magic/sharp_d1.php +++ b/magic/sharp_d1.php @@ -10,7 +10,10 @@ if ($user['battle'] > 0) { else {$int=0;} if (rand(1,100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%дубинка%' OR `name` LIKE '%дубина%' OR `name` LIKE '%булава%' OR `name` LIKE '%Клевец%' OR `name` LIKE '%молот%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;")); $svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на дубины +1' AND `owner` = '{$user['id']}' LIMIT 1;")); diff --git a/magic/sharp_d11.php b/magic/sharp_d11.php index 3560066..831189b 100644 --- a/magic/sharp_d11.php +++ b/magic/sharp_d11.php @@ -10,7 +10,10 @@ if ($user['battle'] > 0) { else {$int=0;} if (rand(1,100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%РґСѓР±РёРЅРєР°%' OR `name` LIKE '%РґСѓР±РёРЅР°%' OR `name` LIKE '%булава%' OR `name` LIKE '%Клевец%' OR `name` LIKE '%молот%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;")); $svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка РЅР° РґСѓР±РёРЅС‹ +11' AND `owner` = '{$user['id']}' LIMIT 1;")); diff --git a/magic/sharp_d2.php b/magic/sharp_d2.php index 92ddf07..e86b6b5 100644 --- a/magic/sharp_d2.php +++ b/magic/sharp_d2.php @@ -10,7 +10,10 @@ if ($user['battle'] > 0) { else {$int=0;} if (rand(1,100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%дубинка%' OR `name` LIKE '%дубина%' OR `name` LIKE '%булава%' OR `name` LIKE '%Клевец%' OR `name` LIKE '%молот%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;")); $svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на дубины +2' AND `owner` = '{$user['id']}' LIMIT 1;")); diff --git a/magic/sharp_d3.php b/magic/sharp_d3.php index ccd8ae3..8085bd6 100644 --- a/magic/sharp_d3.php +++ b/magic/sharp_d3.php @@ -10,7 +10,10 @@ if ($user['battle'] > 0) { else {$int=0;} if (rand(1,100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%дубинка%' OR `name` LIKE '%дубина%' OR `name` LIKE '%булава%' OR `name` LIKE '%Клевец%' OR `name` LIKE '%молот%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;")); $svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на дубины +3' AND `owner` = '{$user['id']}' LIMIT 1;")); diff --git a/magic/sharp_d4.php b/magic/sharp_d4.php index 349888b..440b9cc 100644 --- a/magic/sharp_d4.php +++ b/magic/sharp_d4.php @@ -10,7 +10,10 @@ if ($user['battle'] > 0) { else {$int=0;} if (rand(1,100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%дубинка%' OR `name` LIKE '%дубина%' OR `name` LIKE '%булава%' OR `name` LIKE '%Клевец%' OR `name` LIKE '%молот%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;")); $svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на дубины +4' AND `owner` = '{$user['id']}' LIMIT 1;")); diff --git a/magic/sharp_d5.php b/magic/sharp_d5.php index e473c97..508cd4a 100644 --- a/magic/sharp_d5.php +++ b/magic/sharp_d5.php @@ -10,7 +10,10 @@ if ($user['battle'] > 0) { else {$int=0;} if (rand(1,100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%дубинка%' OR `name` LIKE '%дубина%' OR `name` LIKE '%булава%' OR `name` LIKE '%Клевец%' OR `name` LIKE '%молот%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;")); $svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на дубины +5' AND `owner` = '{$user['id']}' LIMIT 1;")); diff --git a/magic/sharp_m1.php b/magic/sharp_m1.php index ace17de..b63a1f1 100644 --- a/magic/sharp_m1.php +++ b/magic/sharp_m1.php @@ -10,7 +10,10 @@ if ($user['battle'] > 0) { else {$int=0;} if (rand(1,100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%Меч%' OR `name` LIKE '%Жало%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;")); $svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на мечи +1' AND `owner` = '{$user['id']}' LIMIT 1;")); diff --git a/magic/sharp_m11.php b/magic/sharp_m11.php index de43c6c..45bb3f4 100644 --- a/magic/sharp_m11.php +++ b/magic/sharp_m11.php @@ -11,7 +11,10 @@ if ($user['battle'] > 0) { if (rand(1,100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%Меч%' OR `name` LIKE '%Жало%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;")); $svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка РЅР° мечи +11' AND `owner` = '{$user['id']}' LIMIT 1;")); diff --git a/magic/sharp_m2.php b/magic/sharp_m2.php index 14dcaf3..76692fd 100644 --- a/magic/sharp_m2.php +++ b/magic/sharp_m2.php @@ -10,7 +10,10 @@ if ($user['battle'] > 0) { else {$int=0;} if (rand(1,100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%Меч%' OR `name` LIKE '%Жало%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;")); $svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на мечи +2' AND `owner` = '{$user['id']}' LIMIT 1;")); diff --git a/magic/sharp_m3.php b/magic/sharp_m3.php index 7409dd3..de67165 100644 --- a/magic/sharp_m3.php +++ b/magic/sharp_m3.php @@ -10,7 +10,10 @@ if ($user['battle'] > 0) { else {$int=0;} if (rand(1,100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%Меч%' OR `name` LIKE '%Жало%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;")); $svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на мечи +3' AND `owner` = '{$user['id']}' LIMIT 1;")); diff --git a/magic/sharp_m4.php b/magic/sharp_m4.php index 94fea20..38fb78c 100644 --- a/magic/sharp_m4.php +++ b/magic/sharp_m4.php @@ -10,7 +10,10 @@ if ($user['battle'] > 0) { else {$int=0;} if (rand(1,100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` (`name` LIKE '%Меч%' OR `name` LIKE '%Жало%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;")); $svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на мечи +4' AND `owner` = '{$user['id']}' LIMIT 1;")); diff --git a/magic/sharp_m5.php b/magic/sharp_m5.php index 0035138..5d9cfc2 100644 --- a/magic/sharp_m5.php +++ b/magic/sharp_m5.php @@ -11,7 +11,10 @@ if ($user['battle'] > 0) { if (rand(1,100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%Меч%' OR `name` LIKE '%Жало%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;")); $svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на мечи +5' AND `owner` = '{$user['id']}' LIMIT 1;")); diff --git a/magic/sharp_n1.php b/magic/sharp_n1.php index 269c884..57088cb 100644 --- a/magic/sharp_n1.php +++ b/magic/sharp_n1.php @@ -10,7 +10,10 @@ if ($user['battle'] > 0) { else {$int=0;} if (rand(1,100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%кастет%' OR `name` LIKE '%нож%' OR `name` LIKE '%кинжал%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;")); $svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на ножи +1' AND `owner` = '{$user['id']}' LIMIT 1;")); diff --git a/magic/sharp_n11.php b/magic/sharp_n11.php index 820edab..f5f17a6 100644 --- a/magic/sharp_n11.php +++ b/magic/sharp_n11.php @@ -10,7 +10,10 @@ if ($user['battle'] > 0) { else {$int=0;} if (rand(1,100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%кастет%' OR `name` LIKE '%РЅРѕР¶%' OR `name` LIKE '%кинжал%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;")); $svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка РЅР° ножи +11' AND `owner` = '{$user['id']}' LIMIT 1;")); diff --git a/magic/sharp_n2.php b/magic/sharp_n2.php index 849938d..dc27118 100644 --- a/magic/sharp_n2.php +++ b/magic/sharp_n2.php @@ -10,7 +10,10 @@ if ($user['battle'] > 0) { else {$int=0;} if (rand(1,100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%кастет%' OR `name` LIKE '%нож%' OR `name` LIKE '%кинжал%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;")); $svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на ножи +2' AND `owner` = '{$user['id']}' LIMIT 1;")); diff --git a/magic/sharp_n3.php b/magic/sharp_n3.php index 2a249c1..1f7f38e 100644 --- a/magic/sharp_n3.php +++ b/magic/sharp_n3.php @@ -10,7 +10,10 @@ if ($user['battle'] > 0) { else {$int=0;} if (rand(1,100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%кастет%' OR `name` LIKE '%нож%' OR `name` LIKE '%кинжал%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;")); $svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на ножи +3' AND `owner` = '{$user['id']}' LIMIT 1;")); diff --git a/magic/sharp_n4.php b/magic/sharp_n4.php index ab4fbf2..c91f6d7 100644 --- a/magic/sharp_n4.php +++ b/magic/sharp_n4.php @@ -10,7 +10,10 @@ if ($user['battle'] > 0) { else {$int=0;} if (rand(1,100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%кастет%' OR `name` LIKE '%нож%' OR `name` LIKE '%кинжал%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;")); $svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на ножи +4' AND `owner` = '{$user['id']}' LIMIT 1;")); diff --git a/magic/sharp_n5.php b/magic/sharp_n5.php index f257a17..1dfd25d 100644 --- a/magic/sharp_n5.php +++ b/magic/sharp_n5.php @@ -10,7 +10,10 @@ if ($user['battle'] > 0) { else {$int=0;} if (rand(1,100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%кастет%' OR `name` LIKE '%нож%' OR `name` LIKE '%кинжал%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;")); $svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на ножи +5' AND `owner` = '{$user['id']}' LIMIT 1;")); diff --git a/magic/sharp_t1.php b/magic/sharp_t1.php index a73c213..b048f3e 100644 --- a/magic/sharp_t1.php +++ b/magic/sharp_t1.php @@ -10,7 +10,10 @@ if ($user['battle'] > 0) { else {$int=0;} if (rand(1,100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `(`name` LIKE '%Топор%' OR `name` LIKE '%Ледокол%' OR `name` LIKE '%Секира%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;")); $svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на топоры +1' AND `owner` = '{$user['id']}' LIMIT 1;")); diff --git a/magic/sharp_t11.php b/magic/sharp_t11.php index defd064..23fe330 100644 --- a/magic/sharp_t11.php +++ b/magic/sharp_t11.php @@ -10,7 +10,10 @@ if ($user['battle'] > 0) { else {$int=0;} if (rand(1,100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%РўРѕРїРѕСЂ%' OR `name` LIKE '%Ледокол%' OR `name` LIKE '%Секира%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;")); $svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка РЅР° топоры +11' AND `owner` = '{$user['id']}' LIMIT 1;")); diff --git a/magic/sharp_t2.php b/magic/sharp_t2.php index 7ca672f..bc43e18 100644 --- a/magic/sharp_t2.php +++ b/magic/sharp_t2.php @@ -10,7 +10,10 @@ if ($user['battle'] > 0) { else {$int=0;} if (rand(1,100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `(`name` LIKE '%Топор%' OR `name` LIKE '%Ледокол%' OR `name` LIKE '%Секира%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;")); $svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на топоры +2' AND `owner` = '{$user['id']}' LIMIT 1;")); diff --git a/magic/sharp_t3.php b/magic/sharp_t3.php index d52d0f8..e6ed80c 100644 --- a/magic/sharp_t3.php +++ b/magic/sharp_t3.php @@ -10,7 +10,10 @@ if ($user['battle'] > 0) { else {$int=0;} if (rand(1,100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `(`name` LIKE '%Топор%' OR `name` LIKE '%Ледокол%' OR `name` LIKE '%Секира%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;")); $svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на топоры +3' AND `owner` = '{$user['id']}' LIMIT 1;")); diff --git a/magic/sharp_t4.php b/magic/sharp_t4.php index 988c82f..d0c40a2 100644 --- a/magic/sharp_t4.php +++ b/magic/sharp_t4.php @@ -10,7 +10,10 @@ if ($user['battle'] > 0) { else {$int=0;} if (rand(1,100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%Топор%' OR `name` LIKE '%Ледокол%' OR `name` LIKE '%Секира%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;")); $svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на топоры +4' AND `owner` = '{$user['id']}' LIMIT 1;")); diff --git a/magic/sharp_t5.php b/magic/sharp_t5.php index 9036f42..531a601 100644 --- a/magic/sharp_t5.php +++ b/magic/sharp_t5.php @@ -10,7 +10,10 @@ if ($user['battle'] > 0) { else {$int=0;} if (rand(1, 100) < $int) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE (`name` LIKE '%Топор%' OR `name` LIKE '%Ледокол%' OR `name` LIKE '%Секира%') AND `owner` = '{$user['id']}' AND `name` = '{$_POST['target']}' AND `sharped` = 0 LIMIT 1;")); $svitok = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `name` = 'Заточка на топоры +5' AND `owner` = '{$user['id']}' LIMIT 1;")); diff --git a/magic/sleep.php b/magic/sleep.php index 4e797f8..c927444 100644 --- a/magic/sleep.php +++ b/magic/sleep.php @@ -44,7 +44,10 @@ $coma[] = "Я конечно не садист, но мне все это нра $coma[] = "Помолчи, за умного сойдешь. "; - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $magictime=time()+($_POST['timer']*60); $target=$_POST['target']; diff --git a/magic/sleep15.php b/magic/sleep15.php index ffa0bfa..0ae9f98 100644 --- a/magic/sleep15.php +++ b/magic/sleep15.php @@ -11,9 +11,9 @@ if ($user['intel'] >= 1) { else {$int=0;} if ($user['battle'] > 0) {echo "Не в бою...";} -elseif (($user['room'] > 2000) && ($user['room'] < 2100)) {echo "Не в Проходе...";} +elseif (($user->room > 2000) && ($user->room < 2100)) {echo "Не в Проходе...";} elseif ($effect['time']) {echo "На персонаже уже есть заклятие молчания"; } -elseif ($user['room'] != $us['room']) { echo "Персонаж в другой комнате!"; } +elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif (($user['level'] < $us['level']) && ($user['align'] < 1) && ($user['align'] > 2.99)) { echo "Накладывать молчанку можно только на игрока равного или младшего уровнем!"; } elseif (!$us['online']) {echo "Персонаж не в игре!";} elseif ($us['deal'] == 1) { echo "Вы не можете наложить заклятие молчания на этого персонажа"; } diff --git a/magic/sleep30.php b/magic/sleep30.php index 4fc7bb5..263ab31 100644 --- a/magic/sleep30.php +++ b/magic/sleep30.php @@ -11,9 +11,9 @@ if ($user['intel'] >= 1) { else {$int=0;} if ($user['battle'] > 0) {echo "Не в бою...";} -elseif (($user['room'] > 2000) && ($user['room'] < 2100)) {echo "Не в Проходе...";} +elseif (($user->room > 2000) && ($user->room < 2100)) {echo "Не в Проходе...";} elseif ($effect['time']) {echo "На персонаже уже есть заклятие молчания"; } -elseif ($user['room'] != $us['room']) { echo "Персонаж в другой комнате!"; } +elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif (($user['level'] < $us['level']) && ($user['align'] < 1) && ($user['align'] > 2.99)) { echo "Накладывать молчанку можно только на игрока равного или младшего уровнем!"; } elseif (!$us['online']) {echo "Персонаж не в игре!";} elseif ($us['deal'] == 1) { echo "Вы не можете наложить заклятие молчания на этого персонажа"; } diff --git a/magic/sleep_off.php b/magic/sleep_off.php index 4b370f6..e05aa53 100644 --- a/magic/sleep_off.php +++ b/magic/sleep_off.php @@ -2,8 +2,11 @@ // magic идентификацыя //if (rand(1,2)==1) { - if ($_SESSION['uid'] == null) header("Location: index.php"); - if (($user['room'] > 2000) && ($user['room'] < 2100)) {echo "Не в Проходе...";} + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} + if (($user->room > 2000) && ($user->room < 2100)) {echo "Не в Проходе...";} else { $tar = mysql_fetch_array(mysql_query("SELECT `id`,`align` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); $target=$_POST['target']; diff --git a/magic/sleepf_off.php b/magic/sleepf_off.php index c0d274a..ff74d3e 100644 --- a/magic/sleepf_off.php +++ b/magic/sleepf_off.php @@ -2,7 +2,10 @@ // magic идентификацыя //if (rand(1,2)==1) { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $tar = mysql_fetch_array(mysql_query("SELECT `id`,`align` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); $target=$_POST['target']; diff --git a/magic/stop.php b/magic/stop.php index e3cfc0e..4ea3b5b 100644 --- a/magic/stop.php +++ b/magic/stop.php @@ -1,9 +1,12 @@ невидимка
    '; }; - if (($user['room'] > 2000) && ($user['room'] < 2100)) {echo "Не в Проходе...";} + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} + if($user['invis'] == 1) { $user['login'] = 'невидимка'; } +if (($user->room > 2000) && ($user->room < 2100)) {echo "Не в Проходе...";} else { $magictime = (time()+10*60); $target=$_POST['target']; @@ -15,7 +18,7 @@ } else { - if ($tar['room']==$user['room']) { + if ($tar['room']==$user->room) { if (mysql_query("INSERT INTO `effects` (`owner`,`name`,`time`,`type`) values ('".$tar['id']."','Путы','$magictime',10);")) { $ldtarget=$target; diff --git a/magic/stop_200.php b/magic/stop_200.php index faca664..2911ede 100644 --- a/magic/stop_200.php +++ b/magic/stop_200.php @@ -1,9 +1,12 @@ невидимка
    '; }; - if (($user['room'] > 2000) && ($user['room'] < 2100)) {echo "Не в Проходе...";} + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} + if($user['invis'] == 1) { $user['login'] = 'невидимка'; } +if (($user->room > 2000) && ($user->room < 2100)) {echo "Не в Проходе...";} else { $magictime = (time()+10*60*10); $target=$_POST['target']; @@ -15,7 +18,7 @@ } else { - if ($tar['room']==$user['room']) { + if ($tar['room']==$user->room) { if (mysql_query("INSERT INTO `effects` (`owner`,`name`,`time`,`type`) values ('".$tar['id']."','Паралич','$magictime',10);")) { $ldtarget=$target; diff --git a/magic/un_align.php b/magic/un_align.php index a466259..33d13d1 100644 --- a/magic/un_align.php +++ b/magic/un_align.php @@ -1,6 +1,6 @@ room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] == 45) { echo "Нападения в этой локации запрещены!"; @@ -83,7 +83,7 @@ if($vip['attack'] <= 0) { $ttt = 1; } - addch("".$los." вмешался в поединок »».", $user['room']); + addch("".$los." вмешался в поединок »».", $user->room); if($user['invis'] == 1) { $lod = 'невидимка'; } else { $lod = Nick::id($user['id'])->short(); } addlog($jert['battle'], ''.date("H:i").' '.$lod.' вмешался в поединок!
    '); mysql_query('UPDATE `battle` SET `teams` = \''.serialize($battle).'\', `t'.$ttt.'` = CONCAT(`t'.$ttt.'`,\';'.$user['id'].'\') WHERE `id` = "'.$jert['battle'].'" LIMIT 1'); @@ -122,7 +122,7 @@ if($vip['attack'] <= 0) { $ld = Nick::id($user['id'])->full(1); $lds = Nick::id($user['id'])->short(); $rr = "".$ld." и ".Nick::id($jert['id'])->full(1).""; - addch("Бой между ".$lds." и ".Nick::id($jert['id'])->short()." начался.", $user['room']); + addch("Бой между ".$lds." и ".Nick::id($jert['id'])->short()." начался.", $user->room); addlog($id, "Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
    "); mysql_query("UPDATE users SET `battle` = {$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}"); header("Location: fbattle.php"); diff --git a/magic/usability_klan/attack_blood.php b/magic/usability_klan/attack_blood.php index 3458684..24b3834 100644 --- a/magic/usability_klan/attack_blood.php +++ b/magic/usability_klan/attack_blood.php @@ -32,7 +32,7 @@ if($vip['bloodattack'] <= 0) { echo "Персонаж тяжело травмирован..."; } elseif($user['klan'] != '' && ($user['klan'] == $us['klan'])) { echo "Чтите честь ваших сокланов."; -} elseif($user['room'] != $us['room']) { +} elseif($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] == 45) { echo "Нападения в этой локации запрещены!"; @@ -83,7 +83,7 @@ if($vip['bloodattack'] <= 0) { $ttt = 1; } - addch("".$los." вмешался в поединок »».", $user['room']); + addch("".$los." вмешался в поединок »».", $user->room); if($user['invis'] == 1) { $lod = 'невидимка'; } else { $lod = Nick::id($user['id'])->short(); } addlog($jert['battle'], ''.date("H:i").' '.$lod.' вмешался в поединок!
    '); mysql_query('UPDATE `battle` SET `teams` = \''.serialize($battle).'\', `t'.$ttt.'` = CONCAT(`t'.$ttt.'`,\';'.$user['id'].'\'), `blood` = 1 WHERE `id` = "'.$jert['battle'].'" LIMIT 1'); @@ -122,7 +122,7 @@ if($vip['bloodattack'] <= 0) { $ld = Nick::id($user['id'])->full(1); $lds = Nick::id($user['id'])->short(); $rr = "".$ld." и ".Nick::id($jert['id'])->full(1).""; - addch("Бой между ".$lds." и ".Nick::id($jert['id'])->short()." начался.", $user['room']); + addch("Бой между ".$lds." и ".Nick::id($jert['id'])->short()." начался.", $user->room); addlog($id, "Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
    "); mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}"); header("Location: fbattle.php"); diff --git a/magic/usability_klan/sleep15.php b/magic/usability_klan/sleep15.php index 6318f8c..dea2837 100644 --- a/magic/usability_klan/sleep15.php +++ b/magic/usability_klan/sleep15.php @@ -7,11 +7,11 @@ if($vip['sleep15'] <= 0) { echo 'Магия была исчерпана ...'; } elseif($user['battle'] > 0) { echo "Не в бою..."; -} elseif(($user['room'] > 2000) && ($user['room'] < 2100)) { +} elseif(($user->room > 2000) && ($user->room < 2100)) { echo "Не в Проходе..."; } elseif($effect['time']) { echo "На персонаже уже есть заклятие молчания"; -} elseif($user['room'] != $us['room']) { +} elseif($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif(!$us['online']) { echo "Персонаж не в игре!"; diff --git a/magic/usability_klan/sleep30.php b/magic/usability_klan/sleep30.php index de9052f..f3b380c 100644 --- a/magic/usability_klan/sleep30.php +++ b/magic/usability_klan/sleep30.php @@ -7,11 +7,11 @@ if($vip['sleep30'] <= 0) { echo 'Магия была исчерпана ...'; } elseif($user['battle'] > 0) { echo "Не в бою..."; -} elseif(($user['room'] > 2000) && ($user['room'] < 2100)) { +} elseif(($user->room > 2000) && ($user->room < 2100)) { echo "Не в Проходе..."; } elseif($effect['time']) { echo "На персонаже уже есть заклятие молчания"; -} elseif($user['room'] != $us['room']) { +} elseif($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif(!$us['online']) { echo "Персонаж не в игре!"; diff --git a/magic/usability_user/attack.php b/magic/usability_user/attack.php index 3c3a79b..9357538 100644 --- a/magic/usability_user/attack.php +++ b/magic/usability_user/attack.php @@ -32,7 +32,7 @@ if($vip['attack'] <= 0) { echo "Персонаж тяжело травмирован..."; } elseif($user['klan'] != '' && ($user['klan'] == $us['klan'])) { echo "Чтите честь ваших сокланов."; -} elseif($user['room'] != $us['room']) { +} elseif($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] == 45) { echo "Нападения в этой локации запрещены!"; @@ -83,7 +83,7 @@ if($vip['attack'] <= 0) { $ttt = 1; } - addch("".$los." вмешался в поединок »».", $user['room']); + addch("".$los." вмешался в поединок »».", $user->room); if($user['invis'] == 1) { $lod = 'невидимка'; } else { $lod = Nick::id($user['id'])->short(); } addlog($jert['battle'], ''.date("H:i").' '.$lod.' вмешался в поединок!
    '); mysql_query('UPDATE `battle` SET `teams` = \''.serialize($battle).'\', `t'.$ttt.'` = CONCAT(`t'.$ttt.'`,\';'.$user['id'].'\') WHERE `id` = "'.$jert['battle'].'" LIMIT 1'); @@ -122,7 +122,7 @@ if($vip['attack'] <= 0) { $ld = Nick::id($user['id'])->full(1); if($user['invis'] == 1) { $lds = 'невидимка'; } else { $lds = Nick::id($user['id'])->short(); } $rr = "".$ld." и ".Nick::id($jert['id'])->full(1).""; - addch("Бой между ".$lds." и ".Nick::id($jert['id'])->short()." начался.", $user['room']); + addch("Бой между ".$lds." и ".Nick::id($jert['id'])->short()." начался.", $user->room); addlog($id, "Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
    "); mysql_query("UPDATE users SET `battle` = {$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}"); header("Location: fbattle.php"); diff --git a/magic/usability_user/attack_blood.php b/magic/usability_user/attack_blood.php index 1e9d664..4ca2891 100644 --- a/magic/usability_user/attack_blood.php +++ b/magic/usability_user/attack_blood.php @@ -32,7 +32,7 @@ if($vip['bloodattack'] <= 0) { echo "Персонаж тяжело травмирован..."; } elseif($user['klan'] != '' && ($user['klan'] == $us['klan'])) { echo "Чтите честь ваших сокланов."; -} elseif($user['room'] != $us['room']) { +} elseif($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] == 45) { echo "Нападения в этой локации запрещены!"; @@ -83,7 +83,7 @@ if($vip['bloodattack'] <= 0) { $ttt = 1; } - addch("".$los." вмешался в поединок »».", $user['room']); + addch("".$los." вмешался в поединок »».", $user->room); if($user['invis'] == 1) { $lod = 'невидимка'; } else { $lod = Nick::id($user['id'])->short(); } addlog($jert['battle'], ''.date("H:i").' '.$lod.' вмешался в поединок!
    '); mysql_query('UPDATE `battle` SET `teams` = \''.serialize($battle).'\', `t'.$ttt.'` = CONCAT(`t'.$ttt.'`,\';'.$user['id'].'\'), `blood` = 1 WHERE `id` = "'.$jert['battle'].'" LIMIT 1'); @@ -122,7 +122,7 @@ if($vip['bloodattack'] <= 0) { $ld = Nick::id($user['id'])->full(1); $lds = Nick::id($user['id'])->short(); $rr = "".$ld." и ".Nick::id($jert['id'])->full(1).""; - addch("Бой между ".$lds." и ".Nick::id($jert['id'])->short()." начался.", $user['room']); + addch("Бой между ".$lds." и ".Nick::id($jert['id'])->short()." начался.", $user->room); addlog($id, "Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
    "); mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}"); header("Location: fbattle.php"); diff --git a/magic/usability_user/sleep15.php b/magic/usability_user/sleep15.php index 79d2c74..ad9dd68 100644 --- a/magic/usability_user/sleep15.php +++ b/magic/usability_user/sleep15.php @@ -7,11 +7,11 @@ if($vip['sleep15'] <= 0) { echo 'Магия была исчерпана ...'; } elseif($user['battle'] > 0) { echo "Не в бою..."; -} elseif(($user['room'] > 2000) && ($user['room'] < 2100)) { +} elseif(($user->room > 2000) && ($user->room < 2100)) { echo "Не в Проходе..."; } elseif($effect['time']) { echo "На персонаже уже есть заклятие молчания"; -} elseif($user['room'] != $us['room']) { +} elseif($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif(!$us['online']) { echo "Персонаж не в игре!"; diff --git a/magic/usability_user/sleep30.php b/magic/usability_user/sleep30.php index 86c7828..207bac6 100644 --- a/magic/usability_user/sleep30.php +++ b/magic/usability_user/sleep30.php @@ -7,11 +7,11 @@ if($vip['sleep30'] <= 0) { echo 'Магия была исчерпана ...'; } elseif($user['battle'] > 0) { echo "Не в бою..."; -} elseif(($user['room'] > 2000) && ($user['room'] < 2100)) { +} elseif(($user->room > 2000) && ($user->room < 2100)) { echo "Не в Проходе..."; } elseif($effect['time']) { echo "На персонаже уже есть заклятие молчания"; -} elseif($user['room'] != $us['room']) { +} elseif($user->room != $us['room']) { echo "Персонаж в другой комнате!"; } elseif(!$us['online']) { echo "Персонаж не в игре!"; diff --git a/magic/vampir.php b/magic/vampir.php index 46abc5e..6de2758 100644 --- a/magic/vampir.php +++ b/magic/vampir.php @@ -32,7 +32,10 @@ if ($user['battle'] > 0) { echo "Не в бою..."; } else { - if ($_SESSION['uid'] == null) header("Location: index.php"); + if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $target=$_POST['target']; $us = mysql_fetch_array(mysql_query("SELECT *, (SELECT `id` FROM `inventory` WHERE `owner` = `users`.`id` AND `name` LIKE '%Чеснок%' LIMIT 1) AS `che`, (SELECT `id` FROM `inventory` WHERE `owner` = `users`.`id` AND `name` LIKE '%Осиновый кол%' LIMIT 1) AS `kol`,(select `id` from `online` WHERE `date` >= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); $effs = mysql_query("SELECT * FROM `effects` WHERE `owner` = '{$us['id']}' and (`type`=12 or `type`=13 or `type`=14) limit 1;"); @@ -48,9 +51,9 @@ if ($user['battle'] > 0) { elseif ($us['hp'] < $us['maxhp']*0.33) { echo "Жертва слишком слаба."; } elseif ($us['level'] == 0) { echo "Нельзя укусить новичка, они защищены Мироздателем!"; } elseif ($us['align'] > 2 && $us['align'] < 3) { echo "Вы решили укусить Ангела? ;)"; } - elseif ($user['room'] != $us['room']) { echo "Персонаж находится в другой комнате.)"; } + elseif ($user->room != $us['room']) { echo "Персонаж находится в другой комнате.)"; } elseif ($user['battle']) { echo "Не в бою..."; } - elseif ($user['room'] == 31) { echo "Нельзя укусить в этой комнате!"; } + elseif ($user->room == 31) { echo "Нельзя укусить в этой комнате!"; } elseif (((int)date("H") < 22) && ((int)date("H") >= 6)) { echo "Вампиры кусают только по ночам"; } elseif ($us['level'] > $user['level']) { echo "Нельзя укусить персонажа большего левела!)"; } elseif ($us['online'] == 0) { echo "Персонаж находится в оффлайне"; } @@ -124,7 +127,7 @@ if ($user['battle'] > 0) { // создаем лог $rr = "".Nick::id($user['id'])->full(1)." и ".Nick::id($us['id'])->full(1).""; - addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($us['id'])->short()." начался. ",$user['room']); + addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($us['id'])->short()." начался. ",$user->room); //mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу.
    ');"); addlog($id,'Часы показывали '.date("Y.m.d H.i").', когда '.$rr.' бросили вызов друг другу.
    '); @@ -132,7 +135,7 @@ if ($user['battle'] > 0) { mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$us['id']}"); header("Location:fbattle.php"); - die(""); + exit(""); } } elseif ($us['che']!=0 && rand(1,100) < 30) { diff --git a/magic/vips.php b/magic/vips.php index ba3026a..e2d9ae4 100644 --- a/magic/vips.php +++ b/magic/vips.php @@ -1,5 +1,5 @@ = ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); diff --git a/magic/wis_air_m2.php b/magic/wis_air_m2.php index d913fb6..71f5132 100644 --- a/magic/wis_air_m2.php +++ b/magic/wis_air_m2.php @@ -9,7 +9,10 @@ $book=908;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `real_time` >= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); @@ -52,14 +55,14 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; + } //dmg=base+INT/LVL+X_magic $dmg=$basedmg+($user['intel']/4)+$user[$sel]; //MF diff --git a/magic/wis_air_m3.php b/magic/wis_air_m3.php index f249b03..c00a998 100644 --- a/magic/wis_air_m3.php +++ b/magic/wis_air_m3.php @@ -9,7 +9,10 @@ $book=909;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `real_time` >= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); @@ -52,14 +55,14 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; + } //dmg=base+INT/LVL+X_magic $dmg=$basedmg+($user['intel']/4)+$user[$sel]; //MF diff --git a/magic/wis_air_t1.php b/magic/wis_air_t1.php index 8e676dc..5a2bdb0 100644 --- a/magic/wis_air_t1.php +++ b/magic/wis_air_t1.php @@ -11,7 +11,10 @@ $log_text="Цепь Молний [1]"; $book=866;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); //mana needed @@ -45,15 +48,15 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; - $sex_action="применил";if($user['sex']==0) $sex_action.="а"; + } + $sex_action="применил";if($user['sex']==0) $sex_action.="а"; addlog($user['battle'],''.date("H:i").' '.Nick::id($user['id'])->short().' '.$sex_action.$targeted.' заклинание '.$log_text.'
    '); //mass magic diff --git a/magic/wis_air_t2.php b/magic/wis_air_t2.php index d4884b1..cfc3a9d 100644 --- a/magic/wis_air_t2.php +++ b/magic/wis_air_t2.php @@ -11,7 +11,10 @@ $log_text="Цепь Молний [2]"; $book=908;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); //mana needed @@ -45,15 +48,15 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; - $sex_action="применил";if($user['sex']==0) $sex_action.="а"; + } + $sex_action="применил";if($user['sex']==0) $sex_action.="а"; addlog($user['battle'],''.date("H:i").' '.Nick::id($user['id'])->short().' '.$sex_action.$targeted.' заклинание '.$log_text.'
    '); //mass magic diff --git a/magic/wis_air_t3.php b/magic/wis_air_t3.php index 98cbe93..82dcbf5 100644 --- a/magic/wis_air_t3.php +++ b/magic/wis_air_t3.php @@ -11,7 +11,10 @@ $log_text="Цепь Молний [3]"; $book=909;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); //mana needed @@ -45,15 +48,15 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; - $sex_action="применил";if($user['sex']==0) $sex_action.="а"; + } + $sex_action="применил";if($user['sex']==0) $sex_action.="а"; addlog($user['battle'],''.date("H:i").' '.Nick::id($user['id'])->short().' '.$sex_action.$targeted.' заклинание '.$log_text.'
    '); //mass magic diff --git a/magic/wis_earth_d1.php b/magic/wis_earth_d1.php index 0f27593..d686e41 100644 --- a/magic/wis_earth_d1.php +++ b/magic/wis_earth_d1.php @@ -12,7 +12,10 @@ $book=866;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); //mana needed @@ -52,15 +55,15 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; - $sex_action="применил";if($user['sex']==0) $sex_action.="а"; + } + $sex_action="применил";if($user['sex']==0) $sex_action.="а"; addlog($user['battle'],''.date("H:i").' '.Nick::id($user['id'])->short().' '.$sex_action.$targeted.' заклинание '.$log_text.'
    '); //mass magic diff --git a/magic/wis_earth_d2.php b/magic/wis_earth_d2.php index b60b25e..0e5d38a 100644 --- a/magic/wis_earth_d2.php +++ b/magic/wis_earth_d2.php @@ -12,7 +12,10 @@ $book=908;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); //mana needed @@ -52,15 +55,15 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; - $sex_action="применил";if($user['sex']==0) $sex_action.="а"; + } + $sex_action="применил";if($user['sex']==0) $sex_action.="а"; addlog($user['battle'],''.date("H:i").' '.Nick::id($user['id'])->short().' '.$sex_action.$targeted.' заклинание '.$log_text.'
    '); //mass magic diff --git a/magic/wis_earth_d3.php b/magic/wis_earth_d3.php index d95689b..1064440 100644 --- a/magic/wis_earth_d3.php +++ b/magic/wis_earth_d3.php @@ -11,7 +11,10 @@ $log_text="Дух Природы [3]"; $book=909;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); //mana needed @@ -51,15 +54,15 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; - $sex_action="применил";if($user['sex']==0) $sex_action.="а"; + } + $sex_action="применил";if($user['sex']==0) $sex_action.="а"; addlog($user['battle'],''.date("H:i").' '.Nick::id($user['id'])->short().' '.$sex_action.$targeted.' заклинание '.$log_text.'
    '); //mass magic diff --git a/magic/wis_earth_k1.php b/magic/wis_earth_k1.php index 680ffa3..a21d602 100644 --- a/magic/wis_earth_k1.php +++ b/magic/wis_earth_k1.php @@ -12,7 +12,10 @@ $book=866;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); //mana needed @@ -46,15 +49,15 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; - $sex_action="применил";if($user['sex']==0) $sex_action.="а"; + } + $sex_action="применил";if($user['sex']==0) $sex_action.="а"; addlog($user['battle'],''.date("H:i").' '.Nick::id($user['id'])->short().' '.$sex_action.$targeted.' заклинание '.$log_text.'
    '); //mass magic diff --git a/magic/wis_earth_k2.php b/magic/wis_earth_k2.php index a022c4a..781765c 100644 --- a/magic/wis_earth_k2.php +++ b/magic/wis_earth_k2.php @@ -11,7 +11,10 @@ $log_text="Каменный Дождь [2]"; $book=908;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); //mana needed @@ -45,15 +48,15 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; - $sex_action="применил";if($user['sex']==0) $sex_action.="а"; + } + $sex_action="применил";if($user['sex']==0) $sex_action.="а"; addlog($user['battle'],''.date("H:i").' '.Nick::id($user['id'])->short().' '.$sex_action.$targeted.' заклинание '.$log_text.'
    '); //mass magic diff --git a/magic/wis_earth_k3.php b/magic/wis_earth_k3.php index 47998ff..67e45c1 100644 --- a/magic/wis_earth_k3.php +++ b/magic/wis_earth_k3.php @@ -11,7 +11,10 @@ $log_text="Каменный Дождь [3]"; $book=909;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); //mana needed @@ -45,15 +48,15 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; - $sex_action="применил";if($user['sex']==0) $sex_action.="а"; + } + $sex_action="применил";if($user['sex']==0) $sex_action.="а"; addlog($user['battle'],''.date("H:i").' '.Nick::id($user['id'])->short().' '.$sex_action.$targeted.' заклинание '.$log_text.'
    '); //mass magic diff --git a/magic/wis_earth_m1.php b/magic/wis_earth_m1.php index 50832cd..47c05b2 100644 --- a/magic/wis_earth_m1.php +++ b/magic/wis_earth_m1.php @@ -9,7 +9,10 @@ $book=866;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `real_time` >= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); @@ -52,14 +55,14 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; + } //dmg=base+INT/LVL+X_magic $dmg=$basedmg+($user['intel']/4)+$user[$sel]; //MF diff --git a/magic/wis_earth_m2.php b/magic/wis_earth_m2.php index aeaadd4..eec5c41 100644 --- a/magic/wis_earth_m2.php +++ b/magic/wis_earth_m2.php @@ -9,7 +9,10 @@ $book=908;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `real_time` >= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); @@ -52,14 +55,14 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; + } //dmg=base+INT/LVL+X_magic $dmg=$basedmg+($user['intel']/4)+$user[$sel]; //MF diff --git a/magic/wis_earth_m3.php b/magic/wis_earth_m3.php index 7016866..3e2938f 100644 --- a/magic/wis_earth_m3.php +++ b/magic/wis_earth_m3.php @@ -9,7 +9,10 @@ $book=909;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `real_time` >= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); @@ -52,14 +55,14 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; + } //dmg=base+INT/LVL+X_magic $dmg=$basedmg+($user['intel']/4)+$user[$sel]; //MF diff --git a/magic/wis_fire_p1.php b/magic/wis_fire_p1.php index 3ff26ac..e14bdd6 100644 --- a/magic/wis_fire_p1.php +++ b/magic/wis_fire_p1.php @@ -11,7 +11,10 @@ $log_text="Пожирающее Пламя [1]"; $book=866;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); //mana needed @@ -45,15 +48,15 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; - $sex_action="применил";if($user['sex']==0) $sex_action.="а"; + } + $sex_action="применил";if($user['sex']==0) $sex_action.="а"; addlog($user['battle'],''.date("H:i").' '.Nick::id($user['id'])->short().' '.$sex_action.$targeted.' заклинание '.$log_text.'
    '); //mass magic diff --git a/magic/wis_fire_p2.php b/magic/wis_fire_p2.php index 1e2bd3a..e416eb1 100644 --- a/magic/wis_fire_p2.php +++ b/magic/wis_fire_p2.php @@ -11,7 +11,10 @@ $log_text="Пожирающее Пламя [2]"; $book=908;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); //mana needed @@ -45,15 +48,15 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; - $sex_action="применил";if($user['sex']==0) $sex_action.="а"; + } + $sex_action="применил";if($user['sex']==0) $sex_action.="а"; addlog($user['battle'],''.date("H:i").' '.Nick::id($user['id'])->short().' '.$sex_action.$targeted.' заклинание '.$log_text.'
    '); //mass magic diff --git a/magic/wis_fire_p3.php b/magic/wis_fire_p3.php index dcc541d..6e9d57b 100644 --- a/magic/wis_fire_p3.php +++ b/magic/wis_fire_p3.php @@ -11,7 +11,10 @@ $log_text="Пожирающее Пламя [3]"; $book=909;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); //mana needed @@ -45,15 +48,15 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; - $sex_action="применил";if($user['sex']==0) $sex_action.="а"; + } + $sex_action="применил";if($user['sex']==0) $sex_action.="а"; addlog($user['battle'],''.date("H:i").' '.Nick::id($user['id'])->short().' '.$sex_action.$targeted.' заклинание '.$log_text.'
    '); //mass magic diff --git a/magic/wis_fire_t1.php b/magic/wis_fire_t1.php index e8f4c54..c169941 100644 --- a/magic/wis_fire_t1.php +++ b/magic/wis_fire_t1.php @@ -12,7 +12,10 @@ $book=866;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); //mana needed @@ -52,15 +55,15 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; - $sex_action="применил";if($user['sex']==0) $sex_action.="а"; + } + $sex_action="применил";if($user['sex']==0) $sex_action.="а"; addlog($user['battle'],''.date("H:i").' '.Nick::id($user['id'])->short().' '.$sex_action.$targeted.' заклинание '.$log_text.'
    '); //mass magic diff --git a/magic/wis_fire_t2.php b/magic/wis_fire_t2.php index b088518..0bcae51 100644 --- a/magic/wis_fire_t2.php +++ b/magic/wis_fire_t2.php @@ -12,7 +12,10 @@ $book=908;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); //mana needed @@ -52,15 +55,15 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; - $sex_action="применил";if($user['sex']==0) $sex_action.="а"; + } + $sex_action="применил";if($user['sex']==0) $sex_action.="а"; addlog($user['battle'],''.date("H:i").' '.Nick::id($user['id'])->short().' '.$sex_action.$targeted.' заклинание '.$log_text.'
    '); //mass magic diff --git a/magic/wis_fire_t3.php b/magic/wis_fire_t3.php index 2a794ff..c3b834e 100644 --- a/magic/wis_fire_t3.php +++ b/magic/wis_fire_t3.php @@ -12,7 +12,10 @@ $book=909;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); //mana needed @@ -52,15 +55,15 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; - $sex_action="применил";if($user['sex']==0) $sex_action.="а"; + } + $sex_action="применил";if($user['sex']==0) $sex_action.="а"; addlog($user['battle'],''.date("H:i").' '.Nick::id($user['id'])->short().' '.$sex_action.$targeted.' заклинание '.$log_text.'
    '); //mass magic diff --git a/magic/wis_fire_v1.php b/magic/wis_fire_v1.php index d9d41dc..533a857 100644 --- a/magic/wis_fire_v1.php +++ b/magic/wis_fire_v1.php @@ -9,7 +9,10 @@ $book=866;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `real_time` >= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); @@ -52,14 +55,14 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; + } //dmg=base+INT/LVL+X_magic $dmg=$basedmg+($user['intel']/4)+$user[$sel]; //MF diff --git a/magic/wis_fire_v2.php b/magic/wis_fire_v2.php index 1b987c5..be2f4d6 100644 --- a/magic/wis_fire_v2.php +++ b/magic/wis_fire_v2.php @@ -9,7 +9,10 @@ $book=908;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `real_time` >= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); @@ -52,14 +55,14 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; + } //dmg=base+INT/LVL+X_magic $dmg=$basedmg+($user['intel']/4)+$user[$sel]; //MF diff --git a/magic/wis_fire_v3.php b/magic/wis_fire_v3.php index b6da506..b6facd1 100644 --- a/magic/wis_fire_v3.php +++ b/magic/wis_fire_v3.php @@ -10,7 +10,10 @@ -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `real_time` >= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); @@ -53,14 +56,14 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; + } //dmg=base+INT/LVL+X_magic $dmg=$basedmg+($user['intel']/4)+$user[$sel]; //MF diff --git a/magic/wis_water_o1.php b/magic/wis_water_o1.php index d8c22e1..fd35d46 100644 --- a/magic/wis_water_o1.php +++ b/magic/wis_water_o1.php @@ -9,7 +9,10 @@ $book=866;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `real_time` >= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); @@ -52,14 +55,14 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; + } //dmg=base+INT/LVL+X_magic $dmg=$basedmg+($user['intel']/4)+$user[$sel]; //MF diff --git a/magic/wis_water_o2.php b/magic/wis_water_o2.php index a07d280..6d1fbaa 100644 --- a/magic/wis_water_o2.php +++ b/magic/wis_water_o2.php @@ -9,7 +9,10 @@ $book=908;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `real_time` >= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); @@ -52,14 +55,14 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; + } //dmg=base+INT/LVL+X_magic $dmg=$basedmg+($user['intel']/4)+$user[$sel]; //MF diff --git a/magic/wis_water_o3.php b/magic/wis_water_o3.php index d32cf71..ccaa71c 100644 --- a/magic/wis_water_o3.php +++ b/magic/wis_water_o3.php @@ -9,7 +9,10 @@ $book=909;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `real_time` >= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); diff --git a/magic/wis_water_r1.php b/magic/wis_water_r1.php index 3654380..4ff72c1 100644 --- a/magic/wis_water_r1.php +++ b/magic/wis_water_r1.php @@ -12,7 +12,10 @@ $book=866;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); //mana needed @@ -52,15 +55,15 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; - $sex_action="применил";if($user['sex']==0) $sex_action.="а"; + } + $sex_action="применил";if($user['sex']==0) $sex_action.="а"; addlog($user['battle'],''.date("H:i").' '.Nick::id($user['id'])->short().' '.$sex_action.$targeted.' заклинание '.$log_text.'
    '); //mass magic diff --git a/magic/wis_water_r2.php b/magic/wis_water_r2.php index 8762173..1287db7 100644 --- a/magic/wis_water_r2.php +++ b/magic/wis_water_r2.php @@ -12,7 +12,10 @@ $book=908;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); //mana needed @@ -52,15 +55,15 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; - $sex_action="применил";if($user['sex']==0) $sex_action.="а"; + } + $sex_action="применил";if($user['sex']==0) $sex_action.="а"; addlog($user['battle'],''.date("H:i").' '.Nick::id($user['id'])->short().' '.$sex_action.$targeted.' заклинание '.$log_text.'
    '); //mass magic diff --git a/magic/wis_water_r3.php b/magic/wis_water_r3.php index 10cd05b..c38a302 100644 --- a/magic/wis_water_r3.php +++ b/magic/wis_water_r3.php @@ -12,7 +12,10 @@ $book=909;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); //mana needed @@ -52,15 +55,15 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; - $sex_action="применил";if($user['sex']==0) $sex_action.="а"; + } + $sex_action="применил";if($user['sex']==0) $sex_action.="а"; addlog($user['battle'],''.date("H:i").' '.Nick::id($user['id'])->short().' '.$sex_action.$targeted.' заклинание '.$log_text.'
    '); //mass magic diff --git a/magic/wis_water_tr1.php b/magic/wis_water_tr1.php index 191e2e9..e824651 100644 --- a/magic/wis_water_tr1.php +++ b/magic/wis_water_tr1.php @@ -12,7 +12,10 @@ $book=866;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); //mana needed @@ -46,15 +49,15 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; - $sex_action="применил";if($user['sex']==0) $sex_action.="а"; + } + $sex_action="применил";if($user['sex']==0) $sex_action.="а"; addlog($user['battle'],''.date("H:i").' '.Nick::id($user['id'])->short().' '.$sex_action.$targeted.' заклинание '.$log_text.'
    '); //mass magic diff --git a/magic/wis_water_tr2.php b/magic/wis_water_tr2.php index f614e4e..5628b54 100644 --- a/magic/wis_water_tr2.php +++ b/magic/wis_water_tr2.php @@ -11,7 +11,10 @@ $log_text="Отравление [2]"; $book=908;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); //mana needed @@ -45,15 +48,15 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; - $sex_action="применил";if($user['sex']==0) $sex_action.="а"; + } + $sex_action="применил";if($user['sex']==0) $sex_action.="а"; addlog($user['battle'],''.date("H:i").' '.Nick::id($user['id'])->short().' '.$sex_action.$targeted.' заклинание '.$log_text.'
    '); //mass magic diff --git a/magic/wis_water_tr3.php b/magic/wis_water_tr3.php index 7fa13bf..501e42c 100644 --- a/magic/wis_water_tr3.php +++ b/magic/wis_water_tr3.php @@ -11,7 +11,10 @@ $log_text="Отравление [3]"; $book=909;$have_book=mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `prototype`='{$book}' AND `owner`='{$user['id']}' LIMIT 1;")); -if ($_SESSION['uid'] == null) header("Location: index.php"); +if ($_SESSION['uid'] == null) { + header("Location: index.php"); + exit; +} $magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '{$mag_id}' LIMIT 1 ;")); $bat=mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE `id`='{$user['battle']}';")); //mana needed @@ -45,15 +48,15 @@ if ($user['battle'] == 0) { case 'a':$uel='mair';break; case 'w':$uel='mwater';break; case 'e':$uel='mearth';break; - }; + } switch($elem) { case 'f':$sel='mfire';break; case 'a':$sel='mair';break; case 'w':$sel='mwater';break; case 'e':$sel='mearth';break; - }; - $sex_action="применил";if($user['sex']==0) $sex_action.="а"; + } + $sex_action="применил";if($user['sex']==0) $sex_action.="а"; addlog($user['battle'],''.date("H:i").' '.Nick::id($user['id'])->short().' '.$sex_action.$targeted.' заклинание '.$log_text.'
    '); //mass magic diff --git a/magic/zz.php b/magic/zz.php index 93bc698..47df315 100644 --- a/magic/zz.php +++ b/magic/zz.php @@ -15,7 +15,7 @@ elseif ($user['level'] < $magic_need['nlevel']) { echo "ВашегРelseif ($user['mgray'] < $magic_need['ngray']) { echo "РќРµ достаточно владения Серой магией для использования этого заклинания!"; } elseif ($user['intel'] < $magic_need['nintel']) { echo "Вашего интеллекта РЅРµ достаточно для использования этого заклинания!"; } elseif ($effect['time']) {echo "РќР° персонаже уже есть заклятие Микстура жизненных СЃРёР»"; } -elseif ($user['room'] != $us['room']) { echo "Персонаж РІ РґСЂСѓРіРѕР№ комнате!"; } +elseif ($user->room != $us['room']) { echo "Персонаж РІ РґСЂСѓРіРѕР№ комнате!"; } elseif (!$us['online']) {echo "Персонаж РЅРµ РІ РёРіСЂРµ!";} elseif (rand(1,100) < $int) { diff --git a/podzem/atk.php b/podzem/atk.php index 266c675..0ecc6b3 100644 --- a/podzem/atk.php +++ b/podzem/atk.php @@ -1,7 +1,7 @@ 0)) header("Location: index.php"); - if ($user['battle'] != 0) { header('location: fbattle.php'); die(); } + if ($user->battle) { header('location: fbattle.php'); exit; } include "../config.php"; if($_GET['act']=="atk"){ $ass = mysql_query("SELECT glav_id,glava,name FROM labirint WHERE user_id=".$user['id'].""); @@ -45,7 +45,7 @@ if($jert['id']!=$user['id']) { $ttt = 2; } -//addch ("".nick7($user['id'])." вмешался в поединок »». ",$user['room']); +//addch ("".nick7($user['id'])." вмешался в поединок »». ",$user->room); @@ -61,5 +61,5 @@ mysql_query("UPDATE `labirint` SET `boi`='".$_GET['n']."',`di`='0' WHERE `user_i print ""; -die(); +exit; } diff --git a/podzem/edit_podzem.php b/podzem/edit_podzem.php index 8a5b6bb..1ccc143 100644 --- a/podzem/edit_podzem.php +++ b/podzem/edit_podzem.php @@ -1,6 +1,6 @@ battle) { header('location: fbattle.php'); exit; } include "../config.php"; $user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;")); if ($user['login']=="testik2" || $user['login']=="-apollon-" ) { diff --git a/podzem/podz.php b/podzem/podz.php index 86bb295..0d5b2e9 100644 --- a/podzem/podz.php +++ b/podzem/podz.php @@ -1,6 +1,6 @@ battle) { header('location: fbattle.php'); exit; } include "../config.php"; ?>
    diff --git a/podzem_dialog.php b/podzem_dialog.php index ff80b3c..309ebc6 100644 --- a/podzem_dialog.php +++ b/podzem_dialog.php @@ -1,12 +1,15 @@ battle) { header('location: fbattle.php'); - die(); + exit; } $df = mysql_query("select `location`,`name`,`glava` from `labirint` where `user_id`='" . $_SESSION['uid'] . "'"); $fd = mysql_fetch_array($df); diff --git a/register.php b/register.php index 93eedb6..f01fb84 100644 --- a/register.php +++ b/register.php @@ -28,7 +28,7 @@ if ($hreject) { $_SESSION['uid'] = $nid; $_SESSION['sid'] = session_id(); header('Location: fight.php'); - die(); + exit; } } } diff --git a/shop.php b/shop.php index a3f0984..1fe08a6 100644 --- a/shop.php +++ b/shop.php @@ -10,11 +10,11 @@ $user = $user ?? null; if ($user->room != 22) { header("Location: main.php"); - die(); + exit; } if ($user->battle) { header('location: fbattle.php'); - die(); + exit; } /* diff --git a/startpodzemel.php b/startpodzemel.php index d0ad31e..af494ea 100644 --- a/startpodzemel.php +++ b/startpodzemel.php @@ -255,7 +255,7 @@ function startpod($who, $bot, $nomer, $user) } ////////////////////////////////////////////////////// - die(""); + exit(""); ////////////////////////////////////////////////////// } diff --git a/tower.php b/tower.php index a8723ad..263cd56 100644 --- a/tower.php +++ b/tower.php @@ -4,13 +4,13 @@ if (!isset($_SESSION['uid'])) { header("Location: index.php"); } require_once "functions.php"; -if ($user['room'] != 31) { +if ($user->room != 31) { header("Location: main.php"); - die(); + exit; } if ($user['in_tower'] == 1) { header('Location: towerin.php'); - die(); + exit; } diff --git a/towerin.php b/towerin.php index 74aec6b..e6fb33d 100644 --- a/towerin.php +++ b/towerin.php @@ -8,11 +8,11 @@ include("config.php"); include("functions.php"); if ($user['in_tower'] != 1) { header('Location: main.php'); - die(); + exit; } -if ($user['battle'] != 0) { +if ($user->battle) { header('Location: fbattle.php'); - die(); + exit; } $rooms[0] = ''; @@ -86,7 +86,7 @@ $kol_pl = mysql_num_rows(mysql_query("SELECT `id` FROM `users` WHERE `bot` = 0 A $tur_data = mysql_fetch_array(mysql_query("SELECT * FROM `deztow_turnir` WHERE `active` = TRUE")); if ($_GET['give']) { - $obj = mysql_fetch_array(mysql_query("SELECT * FROM `deztow_items` WHERE `id` = '" . mysql_real_escape_string($_GET['give']) . "' AND `room` = '" . $user['room'] . "' LIMIT 1")); + $obj = mysql_fetch_array(mysql_query("SELECT * FROM `deztow_items` WHERE `id` = '" . mysql_real_escape_string($_GET['give']) . "' AND `room` = '" . $user->room . "' LIMIT 1")); if ($obj) { if ($_SESSION['timei'] - time() <= 0) { $_SESSION['timei'] = (time() + 3); @@ -97,7 +97,7 @@ if ($_GET['give']) { } if (isset($dress['id'])) { mysql_query("INSERT INTO `inventory` (`bs`, `prototype`, `owner`, `name`, `type`, `massa`, `cost`, `img`, `maxdur`, `isrep`, `gsila`, `glovk`, `ginta`, `gintel`, `ghp`, `gnoj`, `gtopor`, `gdubina`, `gmech`, `gfire`, `gwater`, `gair`, `gearth`, `glight`, `ggray`, `gdark`, `needident`, `nsila`, `nlovk`, `ninta`, `nintel`, `nmudra`, `nvinos`, `nnoj`, `ntopor`, `ndubina`, `nmech`, `nfire`, `nwater`, `nair`, `nearth`, `nlight`, `ngray`, `ndark`, `mfkrit`, `mfakrit`, `mfuvorot`, `mfauvorot`, `bron1`, `bron2`, `bron3`, `bron4`, `maxu`, `minu`, `magic`, `nlevel`, `nalign`, `dategoden`, `goden`, `otdel`, `koll`) VALUES ('1', '{$dress['id']}', '{$user['id']}', '{$dress['name']}', '{$dress['type']}', '{$dress['massa']}', '{$dress['cost']}', '{$dress['img']}', '{$dress['maxdur']}', '{$dress['isrep']}', '{$dress['gsila']}', '{$dress['glovk']}', '{$dress['ginta']}', '{$dress['gintel']}', '{$dress['ghp']}', '{$dress['gnoj']}', '{$dress['gtopor']}', '{$dress['gdubina']}', '{$dress['gmech']}', '{$dress['gfire']}', '{$dress['gwater']}', '{$dress['gair']}', '{$dress['gearth']}', '{$dress['glight']}', '{$dress['ggray']}', '{$dress['gdark']}', '{$dress['needident']}', '{$dress['nsila']}', '{$dress['nlovk']}', '{$dress['ninta']}', '{$dress['nintel']}', '{$dress['nmudra']}', '{$dress['nvinos']}', '{$dress['nnoj']}', '{$dress['ntopor']}', '{$dress['ndubina']}', '{$dress['nmech']}', '{$dress['nfire']}', '{$dress['nwater']}', '{$dress['nair']}', '{$dress['nearth']}', '{$dress['nlight']}', '{$dress['ngray']}', '{$dress['ndark']}', '{$dress['mfkrit']}', '{$dress['mfakrit']}', '{$dress['mfuvorot']}', '{$dress['mfauvorot']}', '{$dress['bron1']}', '{$dress['bron3']}', '{$dress['bron2']}', '{$dress['bron4']}', '{$dress['maxu']}', '{$dress['minu']}', '{$dress['magic']}', '{$dress['nlevel']}', '{$dress['nalign']}', '" . (($dress['goden']) ? ($dress['goden'] * 24 * 60 * 60 + time()) : "") . "', '{$dress['goden']}', '{$dress['razdel']}', '{$dress['koll']}')"); - mysql_query("DELETE FROM `deztow_items` WHERE `id` = '" . mysql_real_escape_string($_GET['give']) . "' AND `room` = '" . $user['room'] . "' LIMIT 1"); + mysql_query("DELETE FROM `deztow_items` WHERE `id` = '" . mysql_real_escape_string($_GET['give']) . "' AND `room` = '" . $user->room . "' LIMIT 1"); } else { echo 'Предмет не найден. Сообщите Администрации данный код #' . $obj['iteam_id'] . '#'; } @@ -111,7 +111,7 @@ if ($_GET['give']) { if ($_POST['attack']) { $jert = mysql_fetch_array(mysql_query("SELECT `id`, `login`, `room`, `battle`, `hp` FROM `users` WHERE `login` = '" . mysql_real_escape_string($_POST['attack']) . "' LIMIT 1")); - if ($jert['room'] == $user['room'] && $jert['id'] != $user['id']) { + if ($jert['room'] == $user->room && $jert['id'] != $user['id']) { if ($jert['id'] == 233 || $jert['id'] == 234 || $jert['id'] == 235) { $arha = mysql_fetch_array(mysql_query('SELECT * FROM `bots` WHERE `prototype` = "' . $jert['id'] . '" LIMIT 1')); if (isset($arha['id'])) { @@ -141,7 +141,7 @@ if ($_POST['attack']) { $ttt = 1; $ttt2 = 2; } - addch("" . Nick::id($user['id'])->short() . " вмешался в поединок »».", $user['room']); + addch("" . Nick::id($user['id'])->short() . " вмешался в поединок »».", $user->room); addlog($jert['battle'], '' . date("H:i") . ' ' . Nick::id($user['id'])->short() . ' вмешался в поединок!
    '); mysql_query('UPDATE `battle` SET `teams` = \'' . serialize($battle) . '\', `t' . $ttt . '` = CONCAT(`t' . $ttt . '`,\';' . $user['id'] . '\'), `to' . $ttt . '` = \'' . time() . '\', `to' . $ttt2 . '` = \'' . (time() - 1) . '\' WHERE `id` = "' . $jert['battle'] . '" LIMIT 1'); mysql_query("UPDATE `users` SET `battle` = '" . $jert['battle'] . "', `zayavka` = 0 WHERE `id` = '" . $user['id'] . "' LIMIT 1"); @@ -167,7 +167,7 @@ if ($_POST['attack']) { } $rr = "" . Nick::id($user['id'])->full(1) . " и " . Nick::id($jert['id'])->full(1) . ""; - addch("" . Nick::id($user['id'])->short() . " , применив магию нападения, внезапно напал на " . Nick::id($jert['id'])->short() . ".", $user['room']); + addch("" . Nick::id($user['id'])->short() . " , применив магию нападения, внезапно напал на " . Nick::id($jert['id'])->short() . ".", $user->room); addlog($id, "Часы показывали " . date("Y.m.d H.i") . ", когда " . $rr . " бросили вызов друг другу.
    "); mysql_query("UPDATE `users` SET `battle` = {$id}, `zayavka` = 0 WHERE (`id` = {$user['id']} OR `id` = {$jert['id']})"); mysql_query('UPDATE `deztow_turnir` SET `log` = CONCAT(`log`,\'' . "" . date("d.m.y H:i") . " " . Nick::id($user['id'])->full(1) . " напал на " . Nick::id($jert['id'])->full(1) . " завязался бой »»
    " . '\') WHERE `active` = TRUE LIMIT 1'); @@ -179,22 +179,22 @@ if ($_POST['attack']) { } $_GET['path'] = (int)$_GET['path']; -if ($rhar[$user['room']][$_GET['path']] > 0 && $_GET['path'] < 5 && $_GET['path'] > 0 && ($_SESSION['time'] <= time())) { +if ($rhar[$user->room][$_GET['path']] > 0 && $_GET['path'] < 5 && $_GET['path'] > 0 && ($_SESSION['time'] <= time())) { $rr = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `type` = 10 AND `owner` = {$user['id']} LIMIT 1")); if (!isset($rr['id'])) { - $list = mysql_query("SELECT `id`, `room`, `login` FROM `users` WHERE `room` = '" . $user['room'] . "' AND `in_tower` = 1"); + $list = mysql_query("SELECT `id`, `room`, `login` FROM `users` WHERE `room` = '" . $user->room . "' AND `in_tower` = 1"); while ($u = mysql_fetch_array($list)) { if ($u['id'] != $user['id']) { - addchp('Внимание! ' . $user['login'] . ' отправился в ' . $rooms[$rhar[$user['room']][$_GET['path']]] . '.', '{[]}' . $u['login'] . '{[]}'); + addchp('Внимание! ' . $user['login'] . ' отправился в ' . $rooms[$rhar[$user->room][$_GET['path']]] . '.', '{[]}' . $u['login'] . '{[]}'); } } - $list = mysql_query("SELECT `id`, `room`, `login` FROM `users` WHERE `room` = '" . $rhar[$user['room']][$_GET['path']] . "' AND `in_tower` = 1"); + $list = mysql_query("SELECT `id`, `room`, `login` FROM `users` WHERE `room` = '" . $rhar[$user->room][$_GET['path']] . "' AND `in_tower` = 1"); while ($u = mysql_fetch_array($list)) { addchp('Внимание! ' . $user['login'] . ' вошел в комнату.', '{[]}' . $u['login'] . '{[]}'); } - mysql_query("UPDATE `users`, `online` SET `users`.`room` = '" . $rhar[$user['room']][$_GET['path']] . "', `online`.`room` = '" . $rhar[$user['room']][$_GET['path']] . "' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$user['id']}'"); - $_SESSION['time'] = (time() + $rhar[$rhar[$user['room']][$_GET['path']]][0]); + mysql_query("UPDATE `users`, `online` SET `users`.`room` = '" . $rhar[$user->room][$_GET['path']] . "', `online`.`room` = '" . $rhar[$user->room][$_GET['path']] . "' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$user['id']}'"); + $_SESSION['time'] = (time() + $rhar[$rhar[$user->room][$_GET['path']]][0]); header('Location: towerin.php'); } else { err('Вы парализованы и не можете двигаться...'); @@ -241,7 +241,7 @@ if (($kol_pl + $ls) < 2 && ($tur_data['start_time'] + 60) <= time()) { undressall($user['id']); $rep = mysql_query("SELECT * FROM `inventory` WHERE `owner` = '" . $user['id'] . "' AND `bs` = 1"); while ($r = mysql_fetch_array($rep)) { - mysql_query("INSERT `deztow_items` (`iteam_id`, `name`, `img`, `room`) VALUES ('" . $r['prototype'] . "', '" . $r['name'] . "', '" . $r['img'] . "', '" . $user['room'] . "');"); + mysql_query("INSERT `deztow_items` (`iteam_id`, `name`, `img`, `room`) VALUES ('" . $r['prototype'] . "', '" . $r['name'] . "', '" . $r['img'] . "', '" . $user->room . "');"); } mysql_query("DELETE FROM `inventory` WHERE `owner` = '" . $user['id'] . "' AND `bs` = 1"); $tec = mysql_fetch_array(mysql_query("SELECT * FROM `deztow_realchars` WHERE `owner` = '{$user['id']}'")); @@ -277,7 +277,7 @@ if (($kol_pl + $ls) < 2 && ($tur_data['start_time'] + 60) <= time()) { mysql_query("UNLOCK TABLES"); if ($user['hp'] <= 0) { header('Location: tower.php'); - die(); + exit; } ?> @@ -326,13 +326,13 @@ if ($user['hp'] <= 0) { + onload="top.setHP(,,1); ">
    - @@ -342,7 +342,7 @@ if ($user['hp'] <= 0) { room . "';"); if (mysql_num_rows($its) > 0) { echo '

    В комнате разбросаны вещи:

    '; } @@ -374,7 +374,7 @@ if ($user['hp'] <= 0) { if (x < 0) { x = 0 } - ; + } if (y + el.offsetHeight + 3 > document.body.clientHeight + document.body.scrollTop) { @@ -382,7 +382,7 @@ if ($user['hp'] <= 0) { if (y < 0) { y = 0 } - ; + } if (x < 0) { @@ -493,7 +493,7 @@ if ($user['hp'] <= 0) { @@ -546,7 +546,7 @@ if ($user['hp'] <= 0) { if (i < 32) { s += ' ' } - ; + } document.getElementById('prcont').innerHTML = s; @@ -573,15 +573,15 @@ if ($user['hp'] <= 0) { @@ -600,15 +600,15 @@ if ($user['hp'] <= 0) {
    battle() ?>    + room]; ?>    Напасть на...
    + src="i/tower/room) ?>.jpg" alt="" border="1"/>
    - room][4]]) { echo 'id="m7"'; } ?> href="?rnd=0.817371946556865&path=4">room][4]]) { echo 'i'; } ?>.gif" width="21" height="20" border="0" - oroom][4]]) { echo 'i'; - } ?>nmousemove="fastshow2('');" + } ?>nmousemove="fastshow2('room][4]] ?>');" onmouseout="hideshow();"/>
    @@ -621,15 +621,15 @@ if ($user['hp'] <= 0) {
    - room][1]]) { echo 'id="m1"'; } ?> href="?rnd=0.817371946556865&path=1">room][1]]) { echo 'i'; } ?>.gif" width="19" height="22" border="0" - room][1]]) { echo 'i'; - } ?>onmousemove="fastshow2('');" + } ?>onmousemove="fastshow2('room][1]] ?>');" onmouseout="hideshow();"/>
    - room][3]]) { echo 'id="m5"'; } ?> href="?rnd=0.817371946556865&path=3">room][3]]) { echo 'i'; } ?>.gif" width="19" height="22" border="0" - room][3]]) { echo 'i'; - } ?>onmousemove="fastshow2('');" + } ?>onmousemove="fastshow2('room][3]] ?>');" onmouseout="hideshow();"/>
    @@ -646,15 +646,15 @@ if ($user['hp'] <= 0) { room][2]]) { echo 'id="m3"'; } ?> href="?rnd=0.817371946556865&path=2">room][2]]) { echo 'i'; } ?>.gif" width="22" height="21" border="0" - room][2]]) { echo 'i'; - } ?>onmousemove="fastshow2('');" + } ?>onmousemove="fastshow2('room][2]] ?>');" onmouseout="hideshow();"/> diff --git a/towerstamp.php b/towerstamp.php index 6131e56..de70f7d 100644 --- a/towerstamp.php +++ b/towerstamp.php @@ -5,9 +5,9 @@ if(!isset($_SESSION['uid'])) { header("Location: index.php"); } require_once "functions.php"; $effect = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = '{$user['id']}' LIMIT 1")); -if($user['battle'] != 0) { header('location: fbattle.php'); die(); } -if($user['room'] != 31) { die('Для распределения статов необходимо находиться в прихожей "Башни смерти"'); } -if(isset($effect['id'])) { die('Для распределения статов на Вас не дожно быть никаких эффектов'); } +if($user->battle) { header('location: fbattle.php'); exit; } +if($user->room != 31) { exit('Для распределения статов необходимо находиться в прихожей "Башни смерти"'); } +if(isset($effect['id'])) { exit('Для распределения статов на Вас не дожно быть никаких эффектов'); } undressall($user['id']); if((int)$_GET['delsn'] > 0) { diff --git a/zayavka.php b/zayavka.php index a00c0cc..34e3916 100644 --- a/zayavka.php +++ b/zayavka.php @@ -448,7 +448,7 @@ class Zayavka if ($v < _BOTSEPARATOR_) { //TODO Написать добавлялку в чат для определённого чеговека. Плясать от AddChatSystem(). #addchp('Внимание! Ваш бой не может начаться по причине Группа не набрана.', '{[]}' . nick::id($v)->short() . '{[]}'); - die('Bitch'); + exit('Bitch'); } } db::c()->query('UPDATE `variables` SET `value` = ?i WHERE `var` = "?s"', $count_users, 'haos_match'); @@ -523,7 +523,7 @@ class Zayavka return null; } header("Location: zayavka.php"); - die(); + exit; } if (!in_array($z['timeout'], [3, 4, 5, 7, 10])) { @@ -590,7 +590,7 @@ VALUES ("?s","?s",?i,?i,?i,"?s","?s",?i,?i,?i,?i)', } } if ($this->user->zayavka == $zay) { - die(""); + exit(""); } } } @@ -662,7 +662,7 @@ if (!empty($_POST['open'])) { $blood = 0; } echo $zay->addzayavka(0, $_POST['timeout'], 1, 1, $_POST['k'], $user->level, 1, $user->level, 21, '', 2, $blood); - die(""); + exit(""); } if (!empty($_POST['back'])) { unlink("/tmp/zayavka/" . $user->id . ".txt"); @@ -746,7 +746,7 @@ if (!empty($_POST['open'])) { $rr = "" . Nick::id($user->id)->full(1) . " и " . Nick::id($bot)->full(1) . ""; addlog($id, "Часы показывали " . date("Y.m.d H.i") . ", когда " . $rr . " бросили вызов друг другу.
    "); mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user->id};"); - die(""); + exit(""); } $Path = "/tmp/zayavka/" . $user->id . ".txt"; $f = fopen($Path, "r"); @@ -886,7 +886,7 @@ if (!empty($_POST['goconfirm']) && empty($user->zayavka)) { } echo ''; - die(); + exit; } echo ""; diff --git a/znahar.php b/znahar.php index a27a4de..defb85f 100644 --- a/znahar.php +++ b/znahar.php @@ -6,12 +6,12 @@ $stat_nmto = ["1" => "в силу", "2" => "в ловкость", "3" => "в и $trv = ""; if ($_SESSION['uid'] == null) { header("Location: index.php"); - die(); + exit; } require_once "functions.php"; if ($user->battle) { header('location: fbattle.php'); - die(); + exit; } ?> @@ -40,10 +40,10 @@ if ($d[0] > get_meshok()) { $owntravma = mysql_fetch_array(mysql_query("SELECT `type` FROM `effects` WHERE `owner` = " . (int)$_SESSION['uid'] . " AND (type=12 OR type=13 OR type=11 OR type=14 OR type=188 OR type=21 OR type=201 OR type=202);")); if ($owntravma['type'] == 11 or $owntravma['type'] == 12 or $owntravma['type'] == 13 or $owntravma['type'] == 14) { echo "
    Вы не можете воспользоваться услугами Знахаря имея травму!"; - die(); + exit; } elseif ($owntravma['type'] == 188 or $owntravma['type'] == 21 or $owntravma['type'] == 201 or $owntravma['type'] == 202) { echo "
    Вы не можете воспользоваться услугами Знахаря находясь под действием эликсиров и эффектов!"; - die(); + exit; } @@ -51,7 +51,7 @@ if ($_POST['undr'] == '1') undressall((int)$_SESSION['uid']); $s = mysql_fetch_row(mysql_query("SELECT count(id) FROM inventory WHERE dressed!=0 AND owner=" . (int)$_SESSION['uid'])); if ((int)$s[0] > 0) { echo "Перед входом в комнату Знахарь требует полного очищения! "; - die(); + exit; } if (@(int)$_POST['move_ab'] > 0 && $user['money'] >= 32) {