diff --git a/akadem.php b/akadem.php
index c1cc8d8..6854393 100644
--- a/akadem.php
+++ b/akadem.php
@@ -1,9 +1,10 @@
room != 61) {
diff --git a/aren_of_angels.php b/aren_of_angels.php
index 041e646..ec73987 100644
--- a/aren_of_angels.php
+++ b/aren_of_angels.php
@@ -1,10 +1,11 @@
query('SELECT `value` FROM `variables` WHERE `var` = "arena_of_gods"')->fetch_assoc();
$is_now = db::c()->query('SELECT `id` FROM `battle` WHERE `aren_of` = 1 AND `win` = 3 ORDER BY `id` DESC')->fetch_assoc();
diff --git a/ashop.php b/ashop.php
index c470fb9..89f2922 100644
--- a/ashop.php
+++ b/ashop.php
@@ -1,9 +1,10 @@
room != 50) {
diff --git a/buttons.php b/buttons.php
index dbcee68..5602baa 100644
--- a/buttons.php
+++ b/buttons.php
@@ -1,7 +1,8 @@
room >= 37 AND $user->room <= 41)) {
diff --git a/i/magic/sleep1.php b/i/magic/sleep1.php
index bf868c1..2ba1266 100644
--- a/i/magic/sleep1.php
+++ b/i/magic/sleep1.php
@@ -30,11 +30,12 @@ $coma[] = "Помолчи, за умного сойдешь.";
$coma[] = "Прям как рыбка теперь, только рот открывается.";
-//if ($_SESSION['uid'] == null) {
+//if (empty($_SESSION['uid'])) {
header("Location: index.php");
exit;
}
+
$magictime=time()+($_POST['timer']*60);
$tar = mysql_fetch_array(mysql_query("SELECT `id` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;"));
diff --git a/lab.php b/lab.php
index 9d62147..d8cd8e3 100644
--- a/lab.php
+++ b/lab.php
@@ -1,10 +1,11 @@
include("config.php");
session_start();
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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");
diff --git a/lab2.php b/lab2.php
index 9d79139..9530be8 100644
--- a/lab2.php
+++ b/lab2.php
@@ -2,10 +2,11 @@
include("config.php");
session_start();
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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");
@@ -393,7 +394,7 @@ echo"Всего в Лабиринте: ".$u_lab_kol." чел. Мобы:";
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/lab_enter.php b/lab_enter.php
index 163ac63..e057696 100644
--- a/lab_enter.php
+++ b/lab_enter.php
@@ -2,8 +2,7 @@
ob_start("ob_gzhandler");
session_start();
if(!isset($_SESSION['uid'])) { header("Location: index.php"); }
-include("config.php");
-include("functions.php");
+require_once "functions.php";
header("Cache-Control: no-cache");
$errkom = '';
diff --git a/labirint.php b/labirint.php
index 5b61744..782fce0 100644
--- a/labirint.php
+++ b/labirint.php
@@ -2,8 +2,7 @@
ob_start("ob_gzhandler");
session_start();
if(!isset($_SESSION['uid'])) { header("Location: index.php"); }
-include("config.php");
-include("functions.php");
+require_once "functions.php";
header("Cache-Control: no-cache");
$q2 = mysql_fetch_array(mysql_query('SELECT * FROM `qst_user` WHERE `uid` = "'.$user['id'].'" AND `cancel` = "0" AND `finish` = "0" LIMIT 1'));
diff --git a/logs.php b/logs.php
index 438527f..938714b 100644
--- a/logs.php
+++ b/logs.php
@@ -17,8 +17,7 @@ $_REQUEST['log'] = (int)$_REQUEST['log'];
-include("config.php");
-include("functions.php");
+require_once "functions.php";
$data = mysql_fetch_array(mysql_query ("SELECT * FROM `battle` WHERE `id` = '".$_REQUEST['log']."' LIMIT 1"));
$log = file("backup/logs/battle".$_REQUEST['log'].".txt");
diff --git a/magic/bexit.php b/magic/bexit.php
index 149c43e..b8e4846 100644
--- a/magic/bexit.php
+++ b/magic/bexit.php
@@ -1,9 +1,10 @@
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) {
+ if (empty($_SESSION['uid'])) {
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 5e0f25f..4e16320 100644
--- a/magic/dpal.php
+++ b/magic/dpal.php
@@ -6,11 +6,12 @@ $coma[] = "Бойтесь, нарушители!";
$coma[] = "Наша служба и опасна, и трудна!";
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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;"));
if ($tar['id']) {
diff --git a/magic/elem_ally_air.php b/magic/elem_ally_air.php
index 2027f1f..3453c8b 100644
--- a/magic/elem_ally_air.php
+++ b/magic/elem_ally_air.php
@@ -1,10 +1,11 @@
0) {
if (rand(1,100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 8d1fe20..b5773ba 100644
--- a/magic/incmagic.php
+++ b/magic/incmagic.php
@@ -1,8 +1,9 @@
0) {
echo "Не в бою...";
} elseif (rand(1,100)!=1) {
//undressall($user['id']);
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 794d7a0..ecd0ae2 100644
--- a/magic/sharp_d1.php
+++ b/magic/sharp_d1.php
@@ -10,10 +10,11 @@ if ($user['battle'] > 0) {
else {$int=0;}
if (rand(1,100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 831189b..949464a 100644
--- a/magic/sharp_d11.php
+++ b/magic/sharp_d11.php
@@ -10,10 +10,11 @@ if ($user['battle'] > 0) {
else {$int=0;}
if (rand(1,100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 e86b6b5..b357123 100644
--- a/magic/sharp_d2.php
+++ b/magic/sharp_d2.php
@@ -10,10 +10,11 @@ if ($user['battle'] > 0) {
else {$int=0;}
if (rand(1,100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 8085bd6..0501fb4 100644
--- a/magic/sharp_d3.php
+++ b/magic/sharp_d3.php
@@ -10,10 +10,11 @@ if ($user['battle'] > 0) {
else {$int=0;}
if (rand(1,100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 440b9cc..0b80cf5 100644
--- a/magic/sharp_d4.php
+++ b/magic/sharp_d4.php
@@ -10,10 +10,11 @@ if ($user['battle'] > 0) {
else {$int=0;}
if (rand(1,100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 508cd4a..a703ce1 100644
--- a/magic/sharp_d5.php
+++ b/magic/sharp_d5.php
@@ -10,10 +10,11 @@ if ($user['battle'] > 0) {
else {$int=0;}
if (rand(1,100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 b63a1f1..e34fbfd 100644
--- a/magic/sharp_m1.php
+++ b/magic/sharp_m1.php
@@ -10,10 +10,11 @@ if ($user['battle'] > 0) {
else {$int=0;}
if (rand(1,100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 45bb3f4..5359f7f 100644
--- a/magic/sharp_m11.php
+++ b/magic/sharp_m11.php
@@ -11,10 +11,11 @@ if ($user['battle'] > 0) {
if (rand(1,100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 76692fd..5d1da1b 100644
--- a/magic/sharp_m2.php
+++ b/magic/sharp_m2.php
@@ -10,10 +10,11 @@ if ($user['battle'] > 0) {
else {$int=0;}
if (rand(1,100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 de67165..737ce13 100644
--- a/magic/sharp_m3.php
+++ b/magic/sharp_m3.php
@@ -10,10 +10,11 @@ if ($user['battle'] > 0) {
else {$int=0;}
if (rand(1,100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 38fb78c..37492a4 100644
--- a/magic/sharp_m4.php
+++ b/magic/sharp_m4.php
@@ -10,10 +10,11 @@ if ($user['battle'] > 0) {
else {$int=0;}
if (rand(1,100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 5d9cfc2..e86d9f4 100644
--- a/magic/sharp_m5.php
+++ b/magic/sharp_m5.php
@@ -11,10 +11,11 @@ if ($user['battle'] > 0) {
if (rand(1,100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 57088cb..3536076 100644
--- a/magic/sharp_n1.php
+++ b/magic/sharp_n1.php
@@ -10,10 +10,11 @@ if ($user['battle'] > 0) {
else {$int=0;}
if (rand(1,100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 f5f17a6..72d49ce 100644
--- a/magic/sharp_n11.php
+++ b/magic/sharp_n11.php
@@ -10,10 +10,11 @@ if ($user['battle'] > 0) {
else {$int=0;}
if (rand(1,100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 dc27118..90b7bdd 100644
--- a/magic/sharp_n2.php
+++ b/magic/sharp_n2.php
@@ -10,10 +10,11 @@ if ($user['battle'] > 0) {
else {$int=0;}
if (rand(1,100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 1f7f38e..fe26eab 100644
--- a/magic/sharp_n3.php
+++ b/magic/sharp_n3.php
@@ -10,10 +10,11 @@ if ($user['battle'] > 0) {
else {$int=0;}
if (rand(1,100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 c91f6d7..775f41d 100644
--- a/magic/sharp_n4.php
+++ b/magic/sharp_n4.php
@@ -10,10 +10,11 @@ if ($user['battle'] > 0) {
else {$int=0;}
if (rand(1,100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 1dfd25d..c2e0372 100644
--- a/magic/sharp_n5.php
+++ b/magic/sharp_n5.php
@@ -10,10 +10,11 @@ if ($user['battle'] > 0) {
else {$int=0;}
if (rand(1,100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 b048f3e..3ddcba5 100644
--- a/magic/sharp_t1.php
+++ b/magic/sharp_t1.php
@@ -10,10 +10,11 @@ if ($user['battle'] > 0) {
else {$int=0;}
if (rand(1,100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 23fe330..d22d0ec 100644
--- a/magic/sharp_t11.php
+++ b/magic/sharp_t11.php
@@ -10,10 +10,11 @@ if ($user['battle'] > 0) {
else {$int=0;}
if (rand(1,100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 bc43e18..30bca3a 100644
--- a/magic/sharp_t2.php
+++ b/magic/sharp_t2.php
@@ -10,10 +10,11 @@ if ($user['battle'] > 0) {
else {$int=0;}
if (rand(1,100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 e6ed80c..94f264b 100644
--- a/magic/sharp_t3.php
+++ b/magic/sharp_t3.php
@@ -10,10 +10,11 @@ if ($user['battle'] > 0) {
else {$int=0;}
if (rand(1,100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 d0c40a2..f607c7a 100644
--- a/magic/sharp_t4.php
+++ b/magic/sharp_t4.php
@@ -10,10 +10,11 @@ if ($user['battle'] > 0) {
else {$int=0;}
if (rand(1,100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 531a601..03130b6 100644
--- a/magic/sharp_t5.php
+++ b/magic/sharp_t5.php
@@ -10,10 +10,11 @@ if ($user['battle'] > 0) {
else {$int=0;}
if (rand(1, 100) < $int) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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 c927444..515811e 100644
--- a/magic/sleep.php
+++ b/magic/sleep.php
@@ -44,11 +44,12 @@ $coma[] = "Я конечно не садист, но мне все это нра
$coma[] = "Помолчи, за умного сойдешь. ";
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
header("Location: index.php");
exit;
}
+
$magictime=time()+($_POST['timer']*60);
$target=$_POST['target'];
$tar = mysql_fetch_array(mysql_query("SELECT `id`,`align` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;"));
diff --git a/magic/sleep_off.php b/magic/sleep_off.php
index e05aa53..fdba2e4 100644
--- a/magic/sleep_off.php
+++ b/magic/sleep_off.php
@@ -2,10 +2,11 @@
// magic идентификацыя
//if (rand(1,2)==1) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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;"));
diff --git a/magic/sleepf_off.php b/magic/sleepf_off.php
index ff74d3e..bd05ee2 100644
--- a/magic/sleepf_off.php
+++ b/magic/sleepf_off.php
@@ -2,11 +2,12 @@
// magic идентификацыя
//if (rand(1,2)==1) {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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'];
if ($tar['id']) {
diff --git a/magic/stop.php b/magic/stop.php
index 4ea3b5b..c5c4469 100644
--- a/magic/stop.php
+++ b/magic/stop.php
@@ -1,10 +1,11 @@
невидимка'; }
if (($user->room > 2000) && ($user->room < 2100)) {echo "Не в Проходе...";}
else {
diff --git a/magic/stop_200.php b/magic/stop_200.php
index 2911ede..f8fdd58 100644
--- a/magic/stop_200.php
+++ b/magic/stop_200.php
@@ -1,10 +1,11 @@
невидимка'; }
if (($user->room > 2000) && ($user->room < 2100)) {echo "Не в Проходе...";}
else {
diff --git a/magic/unclone.php b/magic/unclone.php
index 8ef7226..7bd4593 100644
--- a/magic/unclone.php
+++ b/magic/unclone.php
@@ -1,10 +1,11 @@
0) {
echo "Не в бою...";
} else {
- if ($_SESSION['uid'] == null) {
+ if (empty($_SESSION['uid'])) {
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;");
diff --git a/magic/wis_air_h1.php b/magic/wis_air_h1.php
index 3f3beec..1acafba 100644
--- a/magic/wis_air_h1.php
+++ b/magic/wis_air_h1.php
@@ -12,10 +12,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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
diff --git a/magic/wis_air_h2.php b/magic/wis_air_h2.php
index 5430a4a..ee14779 100644
--- a/magic/wis_air_h2.php
+++ b/magic/wis_air_h2.php
@@ -12,10 +12,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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
diff --git a/magic/wis_air_h3.php b/magic/wis_air_h3.php
index 1762fb6..fc4e5c4 100644
--- a/magic/wis_air_h3.php
+++ b/magic/wis_air_h3.php
@@ -12,10 +12,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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
diff --git a/magic/wis_air_m1.php b/magic/wis_air_m1.php
index e434065..51ca856 100644
--- a/magic/wis_air_m1.php
+++ b/magic/wis_air_m1.php
@@ -9,10 +9,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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_air_m2.php b/magic/wis_air_m2.php
index 71f5132..97ddf97 100644
--- a/magic/wis_air_m2.php
+++ b/magic/wis_air_m2.php
@@ -9,10 +9,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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_air_m3.php b/magic/wis_air_m3.php
index c00a998..b511f6f 100644
--- a/magic/wis_air_m3.php
+++ b/magic/wis_air_m3.php
@@ -9,10 +9,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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_air_t1.php b/magic/wis_air_t1.php
index 5a2bdb0..27c2d1d 100644
--- a/magic/wis_air_t1.php
+++ b/magic/wis_air_t1.php
@@ -11,10 +11,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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
diff --git a/magic/wis_air_t2.php b/magic/wis_air_t2.php
index cfc3a9d..55a8444 100644
--- a/magic/wis_air_t2.php
+++ b/magic/wis_air_t2.php
@@ -11,10 +11,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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
diff --git a/magic/wis_air_t3.php b/magic/wis_air_t3.php
index 82dcbf5..88ea6fe 100644
--- a/magic/wis_air_t3.php
+++ b/magic/wis_air_t3.php
@@ -11,10 +11,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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
diff --git a/magic/wis_earth_d1.php b/magic/wis_earth_d1.php
index d686e41..d2ce1fd 100644
--- a/magic/wis_earth_d1.php
+++ b/magic/wis_earth_d1.php
@@ -12,10 +12,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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
diff --git a/magic/wis_earth_d2.php b/magic/wis_earth_d2.php
index 0e5d38a..2ff943a 100644
--- a/magic/wis_earth_d2.php
+++ b/magic/wis_earth_d2.php
@@ -12,10 +12,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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
diff --git a/magic/wis_earth_d3.php b/magic/wis_earth_d3.php
index 1064440..0af7e4e 100644
--- a/magic/wis_earth_d3.php
+++ b/magic/wis_earth_d3.php
@@ -11,10 +11,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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
diff --git a/magic/wis_earth_k1.php b/magic/wis_earth_k1.php
index a21d602..d9b9cbd 100644
--- a/magic/wis_earth_k1.php
+++ b/magic/wis_earth_k1.php
@@ -12,10 +12,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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
diff --git a/magic/wis_earth_k2.php b/magic/wis_earth_k2.php
index 781765c..e4aa718 100644
--- a/magic/wis_earth_k2.php
+++ b/magic/wis_earth_k2.php
@@ -11,10 +11,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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
diff --git a/magic/wis_earth_k3.php b/magic/wis_earth_k3.php
index 67e45c1..dc04aad 100644
--- a/magic/wis_earth_k3.php
+++ b/magic/wis_earth_k3.php
@@ -11,10 +11,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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
diff --git a/magic/wis_earth_m1.php b/magic/wis_earth_m1.php
index 47c05b2..2bc640c 100644
--- a/magic/wis_earth_m1.php
+++ b/magic/wis_earth_m1.php
@@ -9,10 +9,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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_earth_m2.php b/magic/wis_earth_m2.php
index eec5c41..663c3cf 100644
--- a/magic/wis_earth_m2.php
+++ b/magic/wis_earth_m2.php
@@ -9,10 +9,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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_earth_m3.php b/magic/wis_earth_m3.php
index 3e2938f..a2a2af3 100644
--- a/magic/wis_earth_m3.php
+++ b/magic/wis_earth_m3.php
@@ -9,10 +9,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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_fire_p1.php b/magic/wis_fire_p1.php
index e14bdd6..4540002 100644
--- a/magic/wis_fire_p1.php
+++ b/magic/wis_fire_p1.php
@@ -11,10 +11,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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
diff --git a/magic/wis_fire_p2.php b/magic/wis_fire_p2.php
index e416eb1..ec32389 100644
--- a/magic/wis_fire_p2.php
+++ b/magic/wis_fire_p2.php
@@ -11,10 +11,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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
diff --git a/magic/wis_fire_p3.php b/magic/wis_fire_p3.php
index 6e9d57b..bd4b6e8 100644
--- a/magic/wis_fire_p3.php
+++ b/magic/wis_fire_p3.php
@@ -11,10 +11,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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
diff --git a/magic/wis_fire_t1.php b/magic/wis_fire_t1.php
index c169941..bc8eb4f 100644
--- a/magic/wis_fire_t1.php
+++ b/magic/wis_fire_t1.php
@@ -12,10 +12,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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
diff --git a/magic/wis_fire_t2.php b/magic/wis_fire_t2.php
index 0bcae51..674d6eb 100644
--- a/magic/wis_fire_t2.php
+++ b/magic/wis_fire_t2.php
@@ -12,10 +12,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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
diff --git a/magic/wis_fire_t3.php b/magic/wis_fire_t3.php
index c3b834e..f29a19a 100644
--- a/magic/wis_fire_t3.php
+++ b/magic/wis_fire_t3.php
@@ -12,10 +12,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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
diff --git a/magic/wis_fire_v1.php b/magic/wis_fire_v1.php
index 533a857..ca0716c 100644
--- a/magic/wis_fire_v1.php
+++ b/magic/wis_fire_v1.php
@@ -9,10 +9,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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_fire_v2.php b/magic/wis_fire_v2.php
index be2f4d6..1534ddf 100644
--- a/magic/wis_fire_v2.php
+++ b/magic/wis_fire_v2.php
@@ -9,10 +9,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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_fire_v3.php b/magic/wis_fire_v3.php
index b6facd1..d14a67c 100644
--- a/magic/wis_fire_v3.php
+++ b/magic/wis_fire_v3.php
@@ -10,10 +10,11 @@
-if ($_SESSION['uid'] == null) {
+if (empty($_SESSION['uid'])) {
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_o1.php b/magic/wis_water_o1.php
index fd35d46..6f149d1 100644
--- a/magic/wis_water_o1.php
+++ b/magic/wis_water_o1.php
@@ -9,10 +9,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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_o2.php b/magic/wis_water_o2.php
index 6d1fbaa..a7748b4 100644
--- a/magic/wis_water_o2.php
+++ b/magic/wis_water_o2.php
@@ -9,10 +9,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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_o3.php b/magic/wis_water_o3.php
index ccaa71c..8ad5fb1 100644
--- a/magic/wis_water_o3.php
+++ b/magic/wis_water_o3.php
@@ -9,10 +9,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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 4ff72c1..46a617b 100644
--- a/magic/wis_water_r1.php
+++ b/magic/wis_water_r1.php
@@ -12,10 +12,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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
diff --git a/magic/wis_water_r2.php b/magic/wis_water_r2.php
index 1287db7..6ad1702 100644
--- a/magic/wis_water_r2.php
+++ b/magic/wis_water_r2.php
@@ -12,10 +12,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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
diff --git a/magic/wis_water_r3.php b/magic/wis_water_r3.php
index c38a302..70a525d 100644
--- a/magic/wis_water_r3.php
+++ b/magic/wis_water_r3.php
@@ -12,10 +12,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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
diff --git a/magic/wis_water_tr1.php b/magic/wis_water_tr1.php
index e824651..5591da3 100644
--- a/magic/wis_water_tr1.php
+++ b/magic/wis_water_tr1.php
@@ -12,10 +12,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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
diff --git a/magic/wis_water_tr2.php b/magic/wis_water_tr2.php
index 5628b54..c40ede6 100644
--- a/magic/wis_water_tr2.php
+++ b/magic/wis_water_tr2.php
@@ -11,10 +11,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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
diff --git a/magic/wis_water_tr3.php b/magic/wis_water_tr3.php
index 501e42c..cc10208 100644
--- a/magic/wis_water_tr3.php
+++ b/magic/wis_water_tr3.php
@@ -11,10 +11,11 @@
$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) {
+if (empty($_SESSION['uid'])) {
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
diff --git a/podzem_dialog.php b/podzem_dialog.php
index 309ebc6..e69ddde 100644
--- a/podzem_dialog.php
+++ b/podzem_dialog.php
@@ -1,9 +1,10 @@
room != 27) {
diff --git a/shop.php b/shop.php
index 1fe08a6..4c8c290 100644
--- a/shop.php
+++ b/shop.php
@@ -1,10 +1,11 @@
battle) {
diff --git a/towerin.php b/towerin.php
index e6fb33d..b5649aa 100644
--- a/towerin.php
+++ b/towerin.php
@@ -4,8 +4,7 @@ session_start();
if (!isset($_SESSION['uid'])) {
header("Location: index.php");
}
-include("config.php");
-include("functions.php");
+require_once "functions.php";
if ($user['in_tower'] != 1) {
header('Location: main.php');
exit;
diff --git a/ul_clans.php b/ul_clans.php
index 5bfa800..560f808 100644
--- a/ul_clans.php
+++ b/ul_clans.php
@@ -1,10 +1,11 @@
"Сила", "2" => "Ловкость", "3" => "Интуици
$stat_nmdb = ["1" => "sila", "2" => "lovk", "3" => "inta", "4" => "vinos", "5" => "intel", "6" => "mudra"];
$stat_nmto = ["1" => "в силу", "2" => "в ловкость", "3" => "в интуицию", "4" => "в выносливость", "5" => "в интеллект", "6" => "в мудрость"];
$trv = "";
-if ($_SESSION['uid'] == null) {
+if (empty($_SESSION['uid'])) {
header("Location: index.php");
exit;
}
+
require_once "functions.php";
if ($user->battle) {
header('location: fbattle.php');