查看文件: adpage.php
大小: 2.65 KB
类型: application/octet-stream
<?php require('system/login.php'); ?> <?php require_once('../Connections/BE2.php'); ?> <?php if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO adpage (pdoc, plink,pdata,psignup,pindex) VALUES (%s, %s, %s, %s, %s)", GetSQLValueString($_POST['pdoc'], "text"), GetSQLValueString($_POST['plink'], "text"), GetSQLValueString($_POST['pdata'], "text"), GetSQLValueString($_POST['psignup'], "text"), GetSQLValueString($_POST['pindex'], "int")); mysql_select_db($database_BE2, $BE2); $Result1 = mysql_query($insertSQL, $BE2) or die(mysql_error()); $insertGoTo = $_POST['url']; // header(sprintf("Location: %s", $insertGoTo)); $write='資料已更新...'; echo "<script>alert('".$write."');location.href='".$insertGoTo."';</script>"; } ?> <form action="" method="post" name="form1" id="form1"> <table align="center"> <tr valign="baseline"> <th width="84" align="right" nowrap="nowrap"><span class="font2">廣告分頁說明</span>:</th> <td width="272"><input type="text" name="pdoc" value="" size="32" /></td> </tr> <tr valign="baseline"> <th nowrap="nowrap" align="right"><span class="font2">廣告分頁連結</span>:</th> <td><input type="text" name="plink" value="" size="32" /></td> </tr> <tr valign="baseline"> <th nowrap="nowrap" align="right"><span class="font2">排列序</span>:</th> <td><input name="pindex" type="text" id="pindex" value="0" size="32" /></td> </tr> <tr valign="baseline"> <th nowrap="nowrap" align="right"><span class="font2">連結報名表</span>:</th> <td><select name="psignup" id="psignup"> <option value="N" selected="selected">N</option> <option value="Y">Y</option> <? if($myadmin){?> <? }?> </select></td> </tr> <tr valign="baseline"> <th nowrap="nowrap" align="right"><span class="font2">資料模式</span>:</th> <td><label for="select"></label> <select name="pdata" id="pdate"> <option value="Y" selected="selected">廣告區塊模式</option> <option value="N">HTML 文字編輯</option> <? if($myadmin){?> <option value="P">php程式</option> <? }?> </select></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right"> </td> <td><input type="submit" value="插入記錄" /></td> </tr> </table> <input type="hidden" name="MM_insert" value="form1" /> <input name="url" type="hidden" id="url" value="<? echo $_SERVER['HTTP_REFERER'];?>" /> </form>
保存
取消
返回文件列表