game/modules_data/location/dungeons/trap_portal.php

18 lines
893 B
PHP
Raw Normal View History

2022-06-06 21:30:34 +00:00
<?php
if(!defined('GAME')) { die(); }
if(isset($file) && $file[0] == 'dungeons/trap_portal.php') {
2023-01-10 16:29:32 +00:00
echo '<input type="button" value="Обновить" onclick="location =\''.$_SERVER['REQUEST_URI'].'\';" /> &nbsp;Вы должны быть перемещены, но портал еще не работает. ';
2022-06-06 21:30:34 +00:00
$actions = array();
$action = explode('|', $file[1]);
foreach($action as $value) {
$temp = explode(':', $value);
$actions[$temp[0]] = $temp[1];
}
if(isset($actions['x'], $actions['y'])) {
if(!isset($actions['s'])) { $actions['s'] = 1; }
if(isset($actions['save_port'])) { $save = ", `res_x` = $actions[x], `res_y` = $actions[y]"; } else { $save = ""; }
mysql_query('UPDATE `stats` SET `x` = "'.$actions['x'].'", `y` = "'.$actions['y'].'", `s` = "'.$actions['s'].'" '.$save.' WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
header('location: main.php');
}
}