diff --git a/11city.php b/11city.php index 3e67d29..036dc57 100644 --- a/11city.php +++ b/11city.php @@ -392,9 +392,6 @@ if($d['mass'] > get_meshok() && $_GET['cp']) { // shop if ($_GET['got'] && $_GET['level2']) { mysql_query("UPDATE `users`,`online` SET `users`.`room` = '22',`online`.`room` = '22' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;"); - if($user['first'] == 6){ - mysql_query("update `users` set `kwest_shop_see`=`kwest_shop_see`+'1' where `id`='".$user['id']."'"); - } header('location: shop.php'); } // repait @@ -493,9 +490,6 @@ if($d['mass'] > get_meshok() && $_GET['cp']) { } else { mysql_query("UPDATE `users`,`online` SET `users`.`room` = '29',`online`.`room` = '29' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;"); - if($user['first'] == 5){ - mysql_query("update `users` set `kwest_bank_see`=`kwest_bank_see`+'1' where `id`='".$user['id']."'"); - } header('location: bank.php'); } } @@ -687,10 +681,7 @@ elseif($user['room']==2655) { header('location: city.php?cp=1'); } if ($_GET['got'] && $_GET['level5']) { - if($user['first'] == 11){ - mysql_query("update `users` set `kwest_see_znahar`=`kwest_see_znahar`+'1' where `id`='".$user['id']."'"); - } - // print ""; + // print ""; mysql_query("UPDATE `users`,`online` SET `users`.`room` = '43',`online`.`room` = '43' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;"); header('location: znahar.php'); diff --git a/city.php b/city.php index a22c5c3..d0325f7 100644 --- a/city.php +++ b/city.php @@ -424,9 +424,6 @@ if ($user['room'] == 20) { // shop if ($_GET['got'] && $_GET['level2']) { mysql_query("UPDATE `users`,`online` SET `users`.`room` = '22',`online`.`room` = '22' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;"); - if ($user['first'] == 6) { - mysql_query("UPDATE `users` SET `kwest_shop_see`=`kwest_shop_see`+'1' WHERE `id`='" . $user['id'] . "'"); - } header('location: shop.php'); } // repait @@ -497,18 +494,10 @@ if ($user['room'] == 20) { if ($_GET['got'] && $_GET['level5']) { - if ($user['align'] == 4) { - print ""; - } else { - mysql_query("UPDATE `users`,`online` SET `users`.`room` = '29',`online`.`room` = '29' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;"); - if ($user['first'] == 5) { - mysql_query("UPDATE `users` SET `kwest_bank_see`=`kwest_bank_see`+'1' WHERE `id`='" . $user['id'] . "'"); - } - header('location: bank.php'); - } + mysql_query("UPDATE `users`,`online` SET `users`.`room` = '29',`online`.`room` = '29' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;"); + header('location: bank.php'); } if ($_GET['got'] && $_GET['level16']) { - //if($user['login'] == 'SaulDin' || $user['login'] == 'Дед мазай'){ $effs = mysql_fetch_array(mysql_query("SELECT `id` FROM `effects` WHERE `owner` = '{$user['id']}' AND `type` = '21' LIMIT 1")); if (isset($effs['id'])) print ""; @@ -516,9 +505,7 @@ if ($user['room'] == 20) { mysql_query("UPDATE `users`,`online` SET `users`.`room` = '31',`online`.`room` = '31' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;"); header('location: tower.php'); } - //}else{ print ""; - // } } @@ -680,9 +667,6 @@ elseif ($user['room'] == 2655) { header('location: city.php?cp=1'); } if ($_GET['got'] && $_GET['level5']) { - if ($user['first'] == 11) { - mysql_query("UPDATE `users` SET `kwest_see_znahar`=`kwest_see_znahar`+'1' WHERE `id`='" . $user['id'] . "'"); - } // print ""; mysql_query("UPDATE `users`,`online` SET `users`.`room` = '43',`online`.`room` = '43' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;"); header('location: znahar.php'); diff --git a/functions.php b/functions.php index 61659fc..1597f04 100644 --- a/functions.php +++ b/functions.php @@ -4780,10 +4780,6 @@ function dressitem($id) } if (!($item['type'] == 12 && $user['level'] < 4)) { - if ($user['first'] == 3 && ($item['name'] == 'Шлем новобранца' || $item['name'] == 'Рубаха новобранца')) { - mysql_query("UPDATE `users` SET `kwest_items_odet` = (`kwest_items_odet`+1) WHERE `id` = '" . $user['id'] . "' LIMIT 1"); - } - if (mysql_query("UPDATE `users` AS `u`, `inventory` AS `i` SET `u`.`{$slot1}` = {$id}, `i`.`dressed` = 1, `u`.`sila` = `u`.`sila` + `i`.`gsila`, `u`.`lovk` = `u`.`lovk` + `i`.`glovk`, `u`.`inta` = `u`.`inta` + `i`.`ginta`, `u`.`intel` = `u`.`intel` + `i`.`gintel`, `u`.`maxhp` = `u`.`maxhp` + `i`.`ghp`, `u`.`noj` = `u`.`noj` + `i`.`gnoj`, `u`.`topor` = `u`.`topor` + `i`.`gtopor`, `u`.`dubina` = `u`.`dubina` + `i`.`gdubina`, `u`.`mec` = `u`.`mec` + `i`.`gmech`, `u`.`mfire` = `u`.`mfire` + `i`.`gfire`, `u`.`mwater` = `u`.`mwater` + `i`.`gwater`, `u`.`mair` = `u`.`mair` + `i`.`gair`, `u`.`mearth` = `u`.`mearth` + `i`.`gearth`, `u`.`mlight` = `u`.`mlight` + `i`.`glight`, `u`.`mgray` = `u`.`mgray` + `i`.`ggray`, `u`.`mdark` = `u`.`mdark` + `i`.`gdark`, `u`.`ubron1` = `u`.`ubron1` + `i`.`bron1`, `u`.`ubron2` = `u`.`ubron2` + `i`.`bron2`, `u`.`ubron3` = `u`.`ubron3` + `i`.`bron3`, `u`.`ubron4` = `u`.`ubron4` + `i`.`bron4`, `u`.`fkrit` = `u`.`fkrit` + `i`.`mfkrit`, `u`.`fakrit` = `u`.`fakrit` + `i`.`mfakrit`, `u`.`fuvorot` = `u`.`fuvorot` + `i`.`mfuvorot`, `u`.`fauvorot` = `u`.`fauvorot` + `i`.`mfauvorot`, `u`.`uminu` = `u`.`uminu` + `i`.`minu`, `u`.`umaxu` = `u`.`umaxu` + `i`.`maxu` WHERE `i`.`needident` = 0 AND `i`.`id` = {$id} AND `i`.`dressed` = 0 AND `i`.owner = {$user['id']} AND (20 + `u`.`sila`) >= `i`.`nsila` AND (20 + `u`.`lovk`) >= `i`.`nlovk` AND (20 + `u`.`inta`) >= `i`.`ninta` AND `u`.`vinos` >= `i`.`nvinos` AND (20 + `u`.`intel`) >= `i`.`nintel` AND `u`.`mudra` >= `i`.`nmudra` AND `u`.`level` >= `i`.`nlevel` AND (($al OR (" . (int)$user['align'] . " = `i`.`nalign`)) OR (`i`.`nalign` = 0)) AND `u`.`noj` >= `i`.`nnoj` AND `u`.`topor` >= `i`.`ntopor` AND `u`.`dubina` >= `i`.`ndubina` AND `u`.`mec` >= `i`.`nmech` AND `u`.`mfire` >= `i`.`nfire` AND `u`.`mwater` >= `i`.`nwater` AND `u`.`mair` >= `i`.`nair` AND `u`.`mearth` >= `i`.`nearth` AND `u`.`mlight` >= `i`.`nlight` AND `u`.`mgray` >= `i`.`ngray` AND `u`.`mdark` >= `i`.`ndark` AND `i`.`setsale` = 0 AND `u`.`id` = {$user['id']}")) $user[$slot1] = $item['id']; return true; diff --git a/krshop.php b/krshop.php index 9c45c9e..9d6f847 100644 --- a/krshop.php +++ b/krshop.php @@ -176,11 +176,6 @@ if($_REQUEST['present']) { // если в офе mysql_query("INSERT INTO `telegraph` (`owner`,`date`,`text`) values ('".$to['id']."','','".'Внимание! '.$from.' '.$action.' вам '.$buket_name.'. '."');"); } - - if($user['first'] == 12 && ($to['id'] == 10023 || $to['id'] == 10024)) { - mysql_query("update `users` set `kwest_see_syvenir`=`kwest_see_syvenir`+'1' where `id`='".$user['id']."'"); - } - echo "Подарок удачно доставлен к \"",$_POST['to_login'],"\""; } echo mysql_error(); diff --git a/main.php b/main.php index 5288c8e..06a036c 100644 --- a/main.php +++ b/main.php @@ -2,50 +2,56 @@ ob_start("ob_gzhandler"); session_start(); $errkom = ''; -if(!isset($_SESSION['uid'])) { header("Location: index.php"); } +if (!isset($_SESSION['uid'])) { + header("Location: index.php"); +} include("config.php"); include("functions.php"); $tmaz = time(); db::c()->query('UPDATE `online` SET `real_time` = ?i WHERE `id` = ?i', time(), $u->i()['id']); -if($u->i()['battle'] != 0) { header('location: fbattle.php'); die(); } +if ($u->i()['battle'] != 0) { + header('location: fbattle.php'); + die(); +} //if($user['klan']) { // $shadow = mysql_fetch_array(mysql_query("SELECT `id`, `mshadow`, `wshadow` FROM `clans` WHERE `id` = '{$user['klan']}' LIMIT 1")); //} -if($_POST['bankpsw']) { - echo "".auth_bank((int)$_POST['bank'], $_POST['bankpsw'], $u->i()['id']).""; +if ($_POST['bankpsw']) { + echo "" . auth_bank((int)$_POST['bank'], $_POST['bankpsw'], $u->i()['id']) . ""; } -if($_GET['unset_bank'] == 1) { - exit_bank('?error=bank'); +if ($_GET['unset_bank'] == 1) { + exit_bank('?error=bank'); } -if($_GET['error'] == 'bank') { +if ($_GET['error'] == 'bank') { err('Работа со счётом завершена.'); } -function updstats() { - global $user; - $u1 = mysql_fetch_array(mysql_query(" +function updstats() +{ + global $user; + $u1 = mysql_fetch_array(mysql_query(" SELECT `sila`, `lovk`, `inta`, `intel`, `noj`, `mec`, `topor`, `dubina`, `mfire`, `mwater`, `mair`, `mearth`, `mlight`, `mgray`, `mdark`, `hp`, `maxhp` FROM `users` WHERE `id` = '$user[id]' LIMIT 1")); - foreach($u1 as $k => $v) { - $user[$k] = $v; - } + foreach ($u1 as $k => $v) { + $user[$k] = $v; + } } -if(!isset($_SESSION['stackall'])){ - $_SESSION['stackall'] = true; +if (!isset($_SESSION['stackall'])) { + $_SESSION['stackall'] = true; } -if(@$_GET['stackall']) { - $_SESSION['stackall'] = ($_SESSION['stackall'] ? false : true); - /* +if (@$_GET['stackall']) { + $_SESSION['stackall'] = ($_SESSION['stackall'] ? false : true); + /* $rec = mysql_query("SELECT `id` FROM `inventory` WHERE `owner` = '$user[id]' AND `setsale` = 0 AND `koll` >= 1 ORDER BY `id` DESC"); while($pl = mysql_fetch_array($rec)) { if(isset($pl['id'])) { @@ -57,2320 +63,2862 @@ if(@$_GET['stackall']) { */ } -if($_GET["stack"]) { - $_GET["stack"] = (int)$_GET["stack"]; - $rec = mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `id` = '".mysql_real_escape_string($_GET['stack'])."' AND `owner` = '$user[id]' AND `setsale` = 0 LIMIT 1")); - if(isset($rec['id'])) { - stack($rec['id']); - unset($rec); - } -} - -if($_GET['unstack']) { - unstack((int)$_GET['unstack'], (int)$_POST["qty"]); -} - -if(isset($_GET['obraz']) && $_GET['obraz'] !== null && ($user['shadow'] == 'g0.gif' || $user['shadow'] == 'man0.gif' || $shadow['mshadow'] || $shadow['wshadow'])) { - if($user['sex']) { - switch(@$_GET['obraz']) { - case 0: mysql_query("UPDATE `users` SET `shadow` = 'man0.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 1: mysql_query("UPDATE `users` SET `shadow` = 'man1.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 2: mysql_query("UPDATE `users` SET `shadow` = 'man2.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 3: mysql_query("UPDATE `users` SET `shadow` = 'man3.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 4: mysql_query("UPDATE `users` SET `shadow` = 'man4.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 5: mysql_query("UPDATE `users` SET `shadow` = 'man5.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 6: mysql_query("UPDATE `users` SET `shadow` = 'man6.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 7: mysql_query("UPDATE `users` SET `shadow` = 'man7.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 8: mysql_query("UPDATE `users` SET `shadow` = 'man8.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 9: mysql_query("UPDATE `users` SET `shadow` = 'man9.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 10: mysql_query("UPDATE `users` SET `shadow` = 'man10.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 11: mysql_query("UPDATE `users` SET `shadow` = 'man11.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 12: mysql_query("UPDATE `users` SET `shadow` = 'man12.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 13: mysql_query("UPDATE `users` SET `shadow` = 'man13.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 14: mysql_query("UPDATE `users` SET `shadow` = 'man14.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 40: mysql_query("UPDATE `users` SET `shadow` = '{$shadow['mshadow']}' WHERE `id` = '{$user['id']}' LIMIT 1"); break; +if ($_GET["stack"]) { + $_GET["stack"] = (int)$_GET["stack"]; + $rec = mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `id` = '" . mysql_real_escape_string($_GET['stack']) . "' AND `owner` = '$user[id]' AND `setsale` = 0 LIMIT 1")); + if (isset($rec['id'])) { + stack($rec['id']); + unset($rec); } - } else { - switch(@$_GET['obraz']) { - case 0: mysql_query("UPDATE `users` SET `shadow` = 'g0.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 1: mysql_query("UPDATE `users` SET `shadow` = 'g1.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 2: mysql_query("UPDATE `users` SET `shadow` = 'g2.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 3: mysql_query("UPDATE `users` SET `shadow` = 'g3.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 4: mysql_query("UPDATE `users` SET `shadow` = 'g4.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 5: mysql_query("UPDATE `users` SET `shadow` = 'g5.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 6: mysql_query("UPDATE `users` SET `shadow` = 'g6.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 7: mysql_query("UPDATE `users` SET `shadow` = 'g7.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 8: mysql_query("UPDATE `users` SET `shadow` = 'g8.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 9: mysql_query("UPDATE `users` SET `shadow` = 'g9.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 10: mysql_query("UPDATE `users` SET `shadow` = 'g10.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 11: mysql_query("UPDATE `users` SET `shadow` = 'g11.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 12: mysql_query("UPDATE `users` SET `shadow` = 'g12.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 13: mysql_query("UPDATE `users` SET `shadow` = 'g13.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 14: mysql_query("UPDATE `users` SET `shadow` = 'g14.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 15: mysql_query("UPDATE `users` SET `shadow` = 'g15.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 16: mysql_query("UPDATE `users` SET `shadow` = 'g16.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 17: mysql_query("UPDATE `users` SET `shadow` = 'g17.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - case 41: mysql_query("UPDATE `users` SET `shadow` = '{$shadow['wshadow']}' WHERE `id` = '{$user['id']}' LIMIT 1"); break; - } - } } +if ($_GET['unstack']) { + unstack((int)$_GET['unstack'], (int)$_POST["qty"]); +} -if($_GET['del'] == 1) { - if($_GET['efid'] > 0) { - $pl = mysql_fetch_array(mysql_query('SELECT `id`, `type` FROM `effects` WHERE `owner` = "'.$user['id'].'" AND `id` = "'.(int)$_GET['efid'].'" LIMIT 1')); - if(isset($pl['id'])) { - del_efs($user['id'], $pl['id'], $pl['type']); +if (isset($_GET['obraz']) && $_GET['obraz'] !== null && ($user['shadow'] == 'g0.gif' || $user['shadow'] == 'man0.gif' || $shadow['mshadow'] || $shadow['wshadow'])) { + if ($user['sex']) { + switch (@$_GET['obraz']) { + case 0: + mysql_query("UPDATE `users` SET `shadow` = 'man0.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 1: + mysql_query("UPDATE `users` SET `shadow` = 'man1.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 2: + mysql_query("UPDATE `users` SET `shadow` = 'man2.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 3: + mysql_query("UPDATE `users` SET `shadow` = 'man3.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 4: + mysql_query("UPDATE `users` SET `shadow` = 'man4.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 5: + mysql_query("UPDATE `users` SET `shadow` = 'man5.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 6: + mysql_query("UPDATE `users` SET `shadow` = 'man6.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 7: + mysql_query("UPDATE `users` SET `shadow` = 'man7.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 8: + mysql_query("UPDATE `users` SET `shadow` = 'man8.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 9: + mysql_query("UPDATE `users` SET `shadow` = 'man9.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 10: + mysql_query("UPDATE `users` SET `shadow` = 'man10.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 11: + mysql_query("UPDATE `users` SET `shadow` = 'man11.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 12: + mysql_query("UPDATE `users` SET `shadow` = 'man12.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 13: + mysql_query("UPDATE `users` SET `shadow` = 'man13.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 14: + mysql_query("UPDATE `users` SET `shadow` = 'man14.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 40: + mysql_query("UPDATE `users` SET `shadow` = '{$shadow['mshadow']}' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + } } else { - echo 'Эффект не найден ...'; + switch (@$_GET['obraz']) { + case 0: + mysql_query("UPDATE `users` SET `shadow` = 'g0.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 1: + mysql_query("UPDATE `users` SET `shadow` = 'g1.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 2: + mysql_query("UPDATE `users` SET `shadow` = 'g2.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 3: + mysql_query("UPDATE `users` SET `shadow` = 'g3.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 4: + mysql_query("UPDATE `users` SET `shadow` = 'g4.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 5: + mysql_query("UPDATE `users` SET `shadow` = 'g5.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 6: + mysql_query("UPDATE `users` SET `shadow` = 'g6.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 7: + mysql_query("UPDATE `users` SET `shadow` = 'g7.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 8: + mysql_query("UPDATE `users` SET `shadow` = 'g8.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 9: + mysql_query("UPDATE `users` SET `shadow` = 'g9.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 10: + mysql_query("UPDATE `users` SET `shadow` = 'g10.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 11: + mysql_query("UPDATE `users` SET `shadow` = 'g11.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 12: + mysql_query("UPDATE `users` SET `shadow` = 'g12.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 13: + mysql_query("UPDATE `users` SET `shadow` = 'g13.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 14: + mysql_query("UPDATE `users` SET `shadow` = 'g14.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 15: + mysql_query("UPDATE `users` SET `shadow` = 'g15.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 16: + mysql_query("UPDATE `users` SET `shadow` = 'g16.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 17: + mysql_query("UPDATE `users` SET `shadow` = 'g17.gif' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + case 41: + mysql_query("UPDATE `users` SET `shadow` = '{$shadow['wshadow']}' WHERE `id` = '{$user['id']}' LIMIT 1"); + break; + } } - } } -if(isset($_GET['modif_bron'])) { - $brons = $_GET['modif_bron']; - $ids = $_GET['ids']; - $cur = mysql_fetch_assoc(mysql_query("SELECT `id`, `free_bron`, `bron1`, `bron2`, `bron3`, `bron4` FROM `inventory` WHERE `owner` = '".$user['id']."' AND `id` = '".mysql_real_escape_string($ids)."' LIMIT 1")); - if(isset($cur['id'])) { - if($cur['free_bron'] > 0 && $cur[$brons] > 0) { - mysql_query("UPDATE `inventory` SET `free_bron` = (`free_bron`-1), `".$brons."` = (`".$brons."`+1) WHERE `owner` = '".$user['id']."' AND `id` = '".mysql_real_escape_string($ids)."' LIMIT 1"); - echo "Параметр брони увеличен!"; - } - } +if ($_GET['del'] == 1) { + if ($_GET['efid'] > 0) { + $pl = mysql_fetch_array(mysql_query('SELECT `id`, `type` FROM `effects` WHERE `owner` = "' . $user['id'] . '" AND `id` = "' . (int)$_GET['efid'] . '" LIMIT 1')); + if (isset($pl['id'])) { + del_efs($user['id'], $pl['id'], $pl['type']); + } else { + echo 'Эффект не найден ...'; + } + } } -if(isset($_GET['modif_stat'])){ - $stats = $_GET['modif_stat']; - $ids = $_GET['ids']; - $cur = mysql_fetch_assoc(mysql_query("SELECT `id`, `free_stat`, `gsila`, `glovk`, `ginta`, `gintel` FROM `inventory` WHERE `owner` = '".$user['id']."' AND `id` = '".mysql_real_escape_string($ids)."' LIMIT 1")); - if(isset($cur['id'])) { - if($cur['free_stat'] > 0 && $cur[$stats] > 0) { - mysql_query("UPDATE `inventory` SET `free_stat` = (`free_stat`-1), `".$stats."` = (`".$stats."`+1) WHERE `owner` = '".$user['id']."' AND `id` = '".mysql_real_escape_string($ids)."' LIMIT 1"); - echo "Параметр увеличен!"; + +if (isset($_GET['modif_bron'])) { + $brons = $_GET['modif_bron']; + $ids = $_GET['ids']; + $cur = mysql_fetch_assoc(mysql_query("SELECT `id`, `free_bron`, `bron1`, `bron2`, `bron3`, `bron4` FROM `inventory` WHERE `owner` = '" . $user['id'] . "' AND `id` = '" . mysql_real_escape_string($ids) . "' LIMIT 1")); + if (isset($cur['id'])) { + if ($cur['free_bron'] > 0 && $cur[$brons] > 0) { + mysql_query("UPDATE `inventory` SET `free_bron` = (`free_bron`-1), `" . $brons . "` = (`" . $brons . "`+1) WHERE `owner` = '" . $user['id'] . "' AND `id` = '" . mysql_real_escape_string($ids) . "' LIMIT 1"); + echo "Параметр брони увеличен!"; + } } - } } -if(isset($_GET['modif_mf'])) { - $mfs = $_GET['modif_mf']; - $ids = $_GET['ids']; - $cur = mysql_fetch_assoc(mysql_query("SELECT `id`, `free_mf`, `mfkrit`, `mfakrit`, `mfuvorot`, `mfauvorot` FROM `inventory` WHERE `owner` = '".$user['id']."' AND `id` = '".mysql_real_escape_string($ids)."' LIMIT 1")); - if(isset($cur['id'])) { - if($cur['free_mf'] > 0 && $cur[$mfs] > 0){ - mysql_query("UPDATE `inventory` SET `free_mf` = (`free_mf`-1), `".$mfs."` = (`".$mfs."`+1) WHERE `owner` = '".$user['id']."' AND `id` = '".mysql_real_escape_string($ids)."' LIMIT 1"); - echo "Параметр увеличен!"; +if (isset($_GET['modif_stat'])) { + $stats = $_GET['modif_stat']; + $ids = $_GET['ids']; + $cur = mysql_fetch_assoc(mysql_query("SELECT `id`, `free_stat`, `gsila`, `glovk`, `ginta`, `gintel` FROM `inventory` WHERE `owner` = '" . $user['id'] . "' AND `id` = '" . mysql_real_escape_string($ids) . "' LIMIT 1")); + if (isset($cur['id'])) { + if ($cur['free_stat'] > 0 && $cur[$stats] > 0) { + mysql_query("UPDATE `inventory` SET `free_stat` = (`free_stat`-1), `" . $stats . "` = (`" . $stats . "`+1) WHERE `owner` = '" . $user['id'] . "' AND `id` = '" . mysql_real_escape_string($ids) . "' LIMIT 1"); + echo "Параметр увеличен!"; + } + } +} + +if (isset($_GET['modif_mf'])) { + $mfs = $_GET['modif_mf']; + $ids = $_GET['ids']; + $cur = mysql_fetch_assoc(mysql_query("SELECT `id`, `free_mf`, `mfkrit`, `mfakrit`, `mfuvorot`, `mfauvorot` FROM `inventory` WHERE `owner` = '" . $user['id'] . "' AND `id` = '" . mysql_real_escape_string($ids) . "' LIMIT 1")); + if (isset($cur['id'])) { + if ($cur['free_mf'] > 0 && $cur[$mfs] > 0) { + mysql_query("UPDATE `inventory` SET `free_mf` = (`free_mf`-1), `" . $mfs . "` = (`" . $mfs . "`+1) WHERE `owner` = '" . $user['id'] . "' AND `id` = '" . mysql_real_escape_string($ids) . "' LIMIT 1"); + echo "Параметр увеличен!"; + } } - } } $d = mysql_fetch_array(mysql_query("SELECT SUM(`massa`) AS `summ` FROM `inventory` WHERE `owner` = '{$user['id']}' AND `dressed` = 0 AND `setsale` = 0")); -if($d['summ'] > get_meshok() && $_GET['got']) { - echo "У вас переполнен рюкзак, вы не можете передвигаться..."; - $_GET['got'] = 0; +if ($d['summ'] > get_meshok() && $_GET['got']) { + echo "У вас переполнен рюкзак, вы не можете передвигаться..."; + $_GET['got'] = 0; } -$eff = mysql_fetch_array(mysql_query("SELECT `id` FROM `effects` WHERE `owner` = '".$user['id']."' AND (`type` = 14 OR `type` = 13) LIMIT 1")); -if(isset($eff['id']) && $_GET['got']) { - echo "У вас тяжелая травма, вы не можете передвигатся..."; - $_GET['got'] = 0; +$eff = mysql_fetch_array(mysql_query("SELECT `id` FROM `effects` WHERE `owner` = '" . $user['id'] . "' AND (`type` = 14 OR `type` = 13) LIMIT 1")); +if (isset($eff['id']) && $_GET['got']) { + echo "У вас тяжелая травма, вы не можете передвигатся..."; + $_GET['got'] = 0; } $array = array( - 1 => array(), 2 => array(), 3 => array(), 4 => array(), - 5 => array('min_level' => 1, 'max_level' => 3), 6 => array('min_level' => 1, 'max_level' => 3), 7 => array('min_level' => 1, 'max_level' => 3), 8 => array('min_level' => 4, 'max_level' => 21), - 9 => array('min_level' => 4, 'max_level' => 6), 10 => array('min_level' => 7, 'max_level' => 9), 11 => array('min_level' => 10, 'max_level' => 12), 12 => array('min_level' => 13, 'max_level' => 15), - 13 => array('min_level' => 16, 'max_level' => 19), 14 => array('min_level' => 19, 'max_level' => 21), 15 => array('paladin' => 1), 16 => array('paladin' => 1), - 17 => array('align' => 3), 36 => array('align' => 2), 54 => array('align' => 6), 19 => array('sex' => 2), - 18 => array('align' => 3), 56 => array('align' => 2), 55 => array('align' => 6) + 1 => array(), 2 => array(), 3 => array(), 4 => array(), + 5 => array('min_level' => 1, 'max_level' => 3), 6 => array('min_level' => 1, 'max_level' => 3), 7 => array('min_level' => 1, 'max_level' => 3), 8 => array('min_level' => 4, 'max_level' => 21), + 9 => array('min_level' => 4, 'max_level' => 6), 10 => array('min_level' => 7, 'max_level' => 9), 11 => array('min_level' => 10, 'max_level' => 12), 12 => array('min_level' => 13, 'max_level' => 15), + 13 => array('min_level' => 16, 'max_level' => 19), 14 => array('min_level' => 19, 'max_level' => 21), 15 => array('paladin' => 1), 16 => array('paladin' => 1), + 17 => array('align' => 3), 36 => array('align' => 2), 54 => array('align' => 6), 19 => array('sex' => 2), + 18 => array('align' => 3), 56 => array('align' => 2), 55 => array('align' => 6) ); -function gone_rooms($room) { - global $array, $user; - $error = 0; - $param = $array[$room]; - if($room == 57) { - err("Комнаты не существует..."); - $error = 1; - } - if(isset($param['min_level'])) { - if($user['level'] < $param['min_level']) { - err("Вы не можете попасть в эту комнату. Уровень маловат..."); - $error = 1; +function gone_rooms($room) +{ + global $array, $user; + $error = 0; + $param = $array[$room]; + if ($room == 57) { + err("Комнаты не существует..."); + $error = 1; } - } - if(isset($param['max_level'])) { - if($user['level'] > $param['max_level']) { - err("Вы не можете попасть в эту комнату. Уровень высоковат..."); - $error = 1; + if (isset($param['min_level'])) { + if ($user['level'] < $param['min_level']) { + err("Вы не можете попасть в эту комнату. Уровень маловат..."); + $error = 1; + } } - } - if(isset($param['align_int'])) { - if((int)$user['align'] != $param['align_int']) { - err("Вы не можете попасть в эту комнату. Склонность не та..."); - $error = 1; + if (isset($param['max_level'])) { + if ($user['level'] > $param['max_level']) { + err("Вы не можете попасть в эту комнату. Уровень высоковат..."); + $error = 1; + } } - } - if(isset($param['align'])) { - if($user['align'] != $param['align']) { - err("Вы не можете попасть в эту комнату. Склонность не та..."); - $error = 1; + if (isset($param['align_int'])) { + if ((int)$user['align'] != $param['align_int']) { + err("Вы не можете попасть в эту комнату. Склонность не та..."); + $error = 1; + } } - } - if(isset($param['paladin'])) { - if($user['align'] <= 1 || $user['align'] >= 2) { - err("Вы не можете попасть в эту комнату. Склонность не та..."); - $error = 1; + if (isset($param['align'])) { + if ($user['align'] != $param['align']) { + err("Вы не можете попасть в эту комнату. Склонность не та..."); + $error = 1; + } } - } - if(isset($param['sex'])) { - if(($param['sex'] == 2 && $user['sex'] == 1) || ($param['sex'] == 1 && $user['sex'] == 0)) { - err("Вы не можете попасть в эту комнату. Пол не подходит..."); - $error = 1; + if (isset($param['paladin'])) { + if ($user['align'] <= 1 || $user['align'] >= 2) { + err("Вы не можете попасть в эту комнату. Склонность не та..."); + $error = 1; + } + } + if (isset($param['sex'])) { + if (($param['sex'] == 2 && $user['sex'] == 1) || ($param['sex'] == 1 && $user['sex'] == 0)) { + err("Вы не можете попасть в эту комнату. Пол не подходит..."); + $error = 1; + } + } + if ($error == 0 OR $user['admin'] == 1) { + mysql_query("UPDATE `users`, `online` SET `users`.`room` = '$room', `online`.`room` = '$room' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$user['id']}'"); + header('Location: main.php'); } - } - if($error == 0 OR $user['admin'] == 1) { - mysql_query("UPDATE `users`, `online` SET `users`.`room` = '$room', `online`.`room` = '$room' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$user['id']}'"); - header('Location: main.php'); - } } -if(isset($_GET['got']) && $_GET['got']) { - gone_rooms($_GET['room']); +if (isset($_GET['got']) && $_GET['got']) { + gone_rooms($_GET['room']); } -if(@$_REQUEST['changepsw']) {?> -
+if (@$_REQUEST['changepsw']) { ?> + + - + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + +