查看文件: searchmenu_edit.php
大小: 2.44 KB
类型: application/octet-stream
<?php require_once('../Connections/BE2.php'); ?> <?php $colname_Rt2 = "-1"; if (isset($_GET['id'])) { $colname_Rt2 = $_GET['id']; } mysql_select_db($database_BE2, $BE2); $query_Rt2 = sprintf("SELECT * FROM vdat WHERE v0 = %s", GetSQLValueString($colname_Rt2, "int")); $Rt2 = mysql_query($query_Rt2, $BE2) or die(mysql_error()); $row_Rt2 = mysql_fetch_assoc($Rt2); $totalRows_Rt2 = mysql_num_rows($Rt2); $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) { $updateSQL = sprintf("UPDATE vdat SET v1=%s, v2=%s, v3=%s WHERE v0=%s", GetSQLValueString($_POST['v1'], "text"), GetSQLValueString($_POST['v2'], "text"), GetSQLValueString($_POST['v3'], "int"), GetSQLValueString($_POST['v0'], "int")); mysql_select_db($database_BE2, $BE2); $Result1 = mysql_query($updateSQL, $BE2) or die(mysql_error()); $updateGoTo = $_POST['url']; header(sprintf("Location: %s", $updateGoTo)); } ?> <form action="" method="POST" name="form1" id="form1"> <table align="center"> <tr valign="baseline"> <td colspan="2" align="right" nowrap="nowrap"></td> </tr> <tr valign="baseline"> <td width="121" align="right" nowrap="nowrap"><span class="font2">選單連結值</span>:</td> <td width="281"><input type="text" name="v1" value="<?php echo $row_Rt2['v1']; ?>" size="32" /></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right"><span class="font2">選單名稱</span>:</td> <td><input type="text" name="v2" value="<?php echo $row_Rt2['v2']; ?>" size="32" /></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right"><span class="font2">排列序</span>:</td> <td><input type="text" name="v3" value="<?php echo $row_Rt2['v3']; ?>" size="32" /></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right"><input name="v0" type="hidden" id="m0" value="<?php echo $row_Rt2['v0']; ?>" /> <input name="url" type="hidden" id="url" value="<? echo $_SERVER['HTTP_REFERER'];?>" /></td> <td><input type="submit" value="更新記錄" /></td> </tr> </table> <input type="hidden" name="MM_update" value="form1" /> </form> <?php mysql_free_result($Rt2); ?>
保存
取消
返回文件列表