game/adminion/mod/dungeon_edit.php

93 lines
5.3 KiB
PHP
Raw Blame History

<?
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("<script>window.location = 'index.php?mod=dungeon_list';</script>");
}
?><script src="https://<? echo $c['img']; ?>/js/jx/jquery.js" type="text/javascript"></script>
<div align="left">
<h3 style="text-align:left;"><?php echo $dungeon_params['id'] ? '如戾龛螯' : '念徉忤螯'; ?> 镥<>痼</h3>
</div>
<form method="post" action="">
<table border="0" cellpadding="0" cellspacing="1">
<tbody>
<tr>
<td><font color="red">*</font>ID 镱溏屐咫<E5B190><E592AB>: &nbsp; </td>
<td><input name="dungeon_id" type="text" value="<?php echo $dungeon_params['dungeon_id']; ?>" size="5" maxlength="255"></td>
</tr>
<tr>
<td><font color="red">*</font>袜玮囗桢 镥<>瘥: &nbsp; </td>
<td><input name="dungeon_name" type="text" value="<?php echo $dungeon_params['dungeon_name']; ?>" size="30" maxlength="255"></td>
</tr>
<tr>
<td><font color="red">*</font>妙痤<E5A699>: &nbsp; </td>
<td><input name="city" type="text" value="<?php echo $dungeon_params['city']; ?>" size="30" maxlength="255"></td>
</tr>
<tr>
<td><font color="red">*</font>引<>: &nbsp; </td>
<td><input name="dungeon_tag" type="text" value="<?php echo $dungeon_params['dungeon_tag']; ?>" size="30" maxlength="255"></td>
</tr>
<tr>
<td><font color="red">*</font>ID 腩赅鲨<E8B585> (怩钿 <20> 镱溏屐咫<E5B190>): &nbsp; </td>
<? if($dungeon_params['id'] != 0) $room = mysql_fetch_assoc(mysql_query("SELECT id,name FROM `room` WHERE `id`='".$dungeon_params['id']."'")); else $room['name']=''; ?>
<td><input name="id" type="text" value="<?php echo $dungeon_params['id']; ?>" size="5" maxlength="255"><i style="font-size:11px;color: brown;">&nbsp; <?=$room['name']?></i></td>
</tr>
<tr>
<td><font color="red">*</font>ID 腩赅鲨<E8B585> (镱溏屐咫<E5B190>): &nbsp; </td>
<? if($dungeon_params['dungeon_room'] != 0) $room = mysql_fetch_assoc(mysql_query("SELECT id,name FROM `room` WHERE `id`='".$dungeon_params['dungeon_room']."'")); else $room['name']=''; ?>
<td><input name="dungeon_room" type="text" value="<?php echo $dungeon_params['dungeon_room']; ?>" size="5" maxlength="255"><i style="font-size:11px;color: brown;">&nbsp; <?=$room['name']?></i></td>
</tr>
<tr>
<td>ID 宣鲟瘃觐泐 爨汔玷磬: &nbsp; </td>
<? if($dungeon_params['shop'] != 0) $room = mysql_fetch_assoc(mysql_query("SELECT id,name FROM `room` WHERE `id`='".$dungeon_params['shop']."'")); else $room['name']=''; ?>
<td><input name="shop" type="text" value="<?php echo $dungeon_params['shop']; ?>" size="5" maxlength="255"><i style="font-size:11px;color: brown;">&nbsp; <?=$room['name']?></i></td>
</tr>
<tr>
<td>ID 觐祉囹<E7A589><> 恹躅溧: &nbsp; </td>
<? if($dungeon_params['roomLeave'] != 0) $room = mysql_fetch_assoc(mysql_query("SELECT id,name FROM `room` WHERE `id`='".$dungeon_params['roomLeave']."'")); else $room['name']=''; ?>
<td><input name="roomLeave" type="text" value="<?php echo $dungeon_params['roomLeave']; ?>" size="5" maxlength="255"></td>
</tr>
<tr>
<td>狸蜩忭<E89CA9>: &nbsp; </td>
<td><select name="active"><option <? if($dungeon_params['active']=='1') echo' selected="selected" '; ?>value="1">泥</option><option <? if($dungeon_params['active']!='1') echo' selected="selected" ';?>value="0">湾<></option></select></td>
</tr>
<tr>
<td>玛膻麇睇 赈羼螓: &nbsp; </td>
<td><select name="quest"><option <? if($dungeon_params['quest']=='1') echo' selected="selected" '; ?>value="1">泥</option><option <? if($dungeon_params['quest']!='1') echo' selected="selected" ';?>value="0">湾<></option></select></td>
</tr>
</tbody>
</table>
<p></p>
<input name="submit" type="submit" value="杨躔囗栩<E59B97>" style="width: 150px"/>
<input name="cancel" type="submit" onclick="document.location='index.php?mod=dungeon_list'; return false;" value="悟戾磬" />
<p><font color="red">*</font> - 吾<>玎蝈朦睇<E69CA6><><E995B1> </p>
</form>