if(!defined('GAME')){ die(); } die('Ошибка, смотри файл'); $dungeon_id = isset($_GET['dungeon_id']) ? intval($_GET['dungeon_id']) : ''; $dungeon_params = mysql_fetch_assoc(mysql_query("SELECT * FROM `dungeon_room` WHERE `id`='".$dungeon_id."'")); if($_POST['id']){ $mysql_query = ''; if($dungeon_id){ $mysql_query .= "UPDATE `dungeon_room` SET "; $mysql_query .= "`id`='".$_POST['id']."',"; $mysql_query .= "`dungeon_id`='".$_POST['dungeon_id']."',"; $mysql_query .= "`dungeon_name`='".$_POST['dungeon_name']."' "; $mysql_query .= "`dungeon_room`='".$_POST['dungeon_room']."' "; $mysql_query .= "`dungeon_tag`='".$_POST['dungeon_tag']."' "; $mysql_query .= "`city`='".$_POST['city']."' "; $mysql_query .= "`shop`='".$_POST['shop']."' "; $mysql_query .= "`roomLeave`='".$_POST['roomLeave']."' "; $mysql_query .= "`active`='".$_POST['active']."' "; $mysql_query .= "`quest`='".$_POST['quest']."' "; $mysql_query .= "WHERE `id`='".$dungeon_id."'"; }else{ $mysql_query .= "INSERT INTO `dungeon_room` "; $mysql_query .= "(`id`,`dungeon_id`,`dungeon_name`,`dungeon_room`,`dungeon_tag`,`shop`,`roomLeave`,`active`,`quest`,`city`)"; $mysql_query .= " VALUES "; $mysql_query .= "('".$_POST['id']."','".$_POST['dungeon_id']."','".$_POST['dungeon_name']."','".$_POST['dungeon_room']."','".$_POST['dungeon_tag']."','".$_POST['shop']."','".$_POST['roomLeave']."','".$_POST['active']."','".$_POST['quest']."','".$_POST['city']."');"; } mysql_query($mysql_query); die(""); } ?>