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'); ?> - - -
-