查看文件: ad2text.php
大小: 1.76 KB
类型: application/octet-stream
<?php require_once('../Connections/BE2.php'); ?> <?php if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) { $updateSQL = sprintf("UPDATE adpage SET ptxt=%s WHERE pid=%s", GetSQLValueString($_POST['ptxt'], "text"), GetSQLValueString($_POST['pid'], "int")); mysql_select_db($database_BE2, $BE2); $Result1 = mysql_query($updateSQL, $BE2) or die(mysql_error()); $updateGoTo = $_POST['url']; //header(sprintf("Location: %s", $updateGoTo)); echo "<script>location.href='".$updateGoTo."';</script>"; } $colname_Rtg = "-1"; if (isset($_GET['webid'])) { $colname_Rtg = $_GET['webid']; } mysql_select_db($database_BE2, $BE2); $query_Rtg = sprintf("SELECT * FROM adpage WHERE pid = %s", GetSQLValueString($colname_Rtg, "int")); $Rtg = mysql_query($query_Rtg, $BE2) or die(mysql_error()); $row_Rtg = mysql_fetch_assoc($Rtg); $totalRows_Rtg = mysql_num_rows($Rtg); ?> <form action="" method="post" name="form1" id="form1"> <table width="100%" align="center"> <tr valign="baseline"> <td align="center" nowrap="nowrap"><?php echo $row_Rtg['pdoc']; ?></td> </tr> <tr valign="baseline"> <td valign="top" nowrap="nowrap"> <textarea name="ptxt" id="ptxt" rows=30 cols=70 class="ckeditor"><?php echo $row_Rtg['ptxt']; ?></textarea></td> </tr> <tr valign="baseline"> <td align="center" nowrap="nowrap"><input type="submit" value="更新記錄" /></td> </tr> </table> <input type="hidden" name="MM_update" value="form1" /> <input type="hidden" name="pid" value="<?php echo $row_Rtg['pid']; ?>" /> <input name="url" type="hidden" id="url" value="<? echo $_SERVER['HTTP_REFERER'];?>" /> </form> <?php mysql_free_result($Rtg); ?>
保存
取消
返回文件列表