查看文件: rtype_edit.php
大小: 3.47 KB
类型: application/octet-stream
<?php require('system/login.php'); ?> <?php require_once('../Connections/BE2.php'); ?> <?php if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) { $upSQL = sprintf("UPDATE order_rtype SET pric='%s',ruse='%s' WHERE rid='%s'", $_POST['pric'],$_POST['ruse'], $_POST['rid']); mysql_select_db($database_BE2, $BE2); $Result1 = mysql_query($upSQL, $BE2) or die(mysql_error()); $write='資料已更新...'; $updateGoTo = $_POST["url"]; // header(sprintf("Location: %s", $updateGoTo)); echo "<script>alert('".$write."');location.href='".$updateGoTo."';</script>"; } $colname_Rt2 = "-1"; if (isset($_GET['id'])) { $colname_Rt2 = (get_magic_quotes_gpc()) ? $_GET['id'] : addslashes($_GET['id']); } mysql_select_db($database_BE2, $BE2); $query_Rt2 = sprintf("SELECT * FROM order_rtype WHERE rid='%s' ",$colname_Rt2); $Rt2 = mysql_query($query_Rt2, $BE2) or die(mysql_error()); $row_Rt2 = mysql_fetch_assoc($Rt2); $totalRows_Rt2 = mysql_num_rows($Rt2); ?> <div class="row"> <div class="col-md-12"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title">雲點數交易設置-編輯</h3> </div> <form method="post" name="form1" action=""> <table width="509" align="center"> <tr valign="baseline"> <td height="26" align="right" nowrap> </td> <td><h1>雲點數交易設置</h1></td> <td> </td> </tr> <tr valign="baseline"> <td width="119" align="right" nowrap><span class="s1"><span class="font2">ID(代號)</span>:</span></td> <td width="321"> <?= $row_Rt2['rid']; ?></td> <td width="53"> </td> </tr> <tr valign="baseline"> <td nowrap align="right"><span class="font2">說明</span>:</td> <td><?= $row_Rt2['rdoc']; ?></td> <td> </td> </tr> <tr valign="baseline"> <td nowrap align="right"><span class="font2">交易對象</span>:</td> <td><?= $row_Rt2['rdoc2'];?></td> <td> </td> </tr> <tr valign="baseline"> <td nowrap align="right"><span class="font2">交易:</span> </td> <td><input type="text" name="pric" id="pric" value="<?= $row_Rt2['pric'] ?>" />%</td> <td> </td> </tr> <tr valign="baseline"> <td nowrap align="right"><span class="font2">即時可用</span>:</td> <td><select name="ruse" id="ruse"> <option value="Y" <?= ($row_Rt2['ruse']=='Y')?'selected="selected"':'' ?>>Y</option> <option value="N" <?= ($row_Rt2['ruse']=='N')?'selected="selected"':'' ?>>N</option> </select> <input name="url" type="hidden" id="url" value="<?php echo $_SERVER['HTTP_REFERER']; ?>" /> <input type="hidden" name="MM_update" value="form1" /> <input type="hidden" name="rid" id="rid" value="<?= $row_Rt2['rid'] ?>" /></td> <td> </td> </tr> <tr valign="baseline"> <td nowrap align="right"> </td> <td> </td> <td> </td> </tr> <tr valign="baseline"> <td nowrap align="right"> </td> <td><div id="btsubmit" ><input type="submit" value="更新記錄"></div></td> <td> </td> </tr> </table> </form> <div id="back"><a href="javascript:history.back();"><img src="images/back.gif" alt="回上一頁" title="回上一頁" width="115" height="32" border="0"></a></div> </div> </div> </div> <?php mysql_free_result($Rt2); ?>
保存
取消
返回文件列表