diff --git a/buy_klan.php b/buy_klan.php index 8732a61..33a69f6 100644 --- a/buy_klan.php +++ b/buy_klan.php @@ -1,6 +1,6 @@ $dat[$forest['room']]['Up'], 'Down' => $dat[$forest['room']]['Down'], 'Left' => $dat[$forest['room']]['Left'], 'Right' => $dat[$forest['room']]['Right']]; - return $dat; + return ['Up' => $dat[$forest['room']]['Up'], 'Down' => $dat[$forest['room']]['Down'], 'Left' => $dat[$forest['room']]['Left'], 'Right' => $dat[$forest['room']]['Right']]; } $map_user = loadmap_cell(); @@ -73,33 +72,40 @@ if ($_GET['move'] == 'true') { } else { $error = 'Not in this life'; } - if (empty($error)) db::c()->query('UPDATE `forest` SET `room` = "?s", `room_id` = ?i WHERE `id` = ?i', $forest['room'], $forest['room_id'], $forest['id']); + if (empty($error)) { + db::c()->query('UPDATE `forest` SET `room` = "?s", `room_id` = ?i WHERE `id` = ?i', $forest['room'], $forest['room_id'], $forest['id']); + } } -if ($map_user['Right'] == 1) $map_page = << + onclick="location.href='?move=true&Dir=Right';" alt="Вправо"> MAP; -if ($map_user['Left'] == 1) $map_page = << + onclick="location.href='?move=true&Dir=Left';" alt="Влево"> MAP; -if ($map_user['Down'] == 1) $map_page = << + onclick="location.href='?move=true&Dir=Down';" alt="Вниз"> MAP; -if ($map_user['Up'] == 1) $map_page = << + onclick="location.href='?move=true&Dir=Up';" alt="Вверх"> MAP; +} +Template::header('forest'); ?> - - - - forest - -
@@ -135,6 +139,4 @@ MAP;
-
- - \ No newline at end of file +
\ No newline at end of file diff --git a/ch.php b/ch.php index 8d098d1..b03e10c 100644 --- a/ch.php +++ b/ch.php @@ -1,6 +1,6 @@ room == 51) { header('location: city.php'); exit; } diff --git a/game.php b/game.php index 7e376cf..ccd6d9b 100644 --- a/game.php +++ b/game.php @@ -6,7 +6,7 @@ */ session_start(); -if (!isset($_SESSION['uid'])) header("Location: index.php"); +if (empty($_SESSION['uid'])) header("Location: index.php"); //include("config.php"); //$msg = filter_input(INPUT_POST,'msg'); diff --git a/game2.php b/game2.php index 5bfc2a1..4c73e29 100644 --- a/game2.php +++ b/game2.php @@ -6,7 +6,7 @@ */ session_start(); -if (!isset($_SESSION['uid'])) header("Location: index.php"); +if (empty($_SESSION['uid'])) header("Location: index.php"); //include("config.php"); //$msg = filter_input(INPUT_POST,'msg'); diff --git a/group_arena.php b/group_arena.php index d0ba46d..44fd76b 100644 --- a/group_arena.php +++ b/group_arena.php @@ -1,6 +1,6 @@ array(8, 16, 24, 32), 2 => array(15, 30, 45, 60), 3 => array(25, 50, 75, 100), 4 => array(40, 80, 120, 160)); diff --git a/hostel_room.php b/hostel_room.php index 138f69e..7f08d23 100644 --- a/hostel_room.php +++ b/hostel_room.php @@ -1,6 +1,6 @@