查看文件: member_ad2edit.php
大小: 4.26 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 member SET m_ad2=%s,m_ad2sdate=%s,m_ad2edate=%s WHERE mem_auto=%s", GetSQLValueString($_POST['m_ad2'], "text"), GetSQLValueString($_POST['m_ad2sdate'], "date"), GetSQLValueString($_POST['m_ad2edate'], "date"), GetSQLValueString($_POST['mem_auto'], "int")); mysql_select_db($database_BE2, $BE2); $Result1 = mysql_query($upSQL, $BE2) or die(mysql_error()); if($_POST['m_addemo']=='Y'){ $doc='雲名片廣告已開啟完成,感謝您的使用, SKYBNI 敬上.'; $Ins_doc = sprintf("INSERT INTO guestdoc(guid,gdate,gsource,gdoc)VALUES('%s','%s','%s','%s')",$_POST['mem_auto'],date('Y-m-d'),1,$doc); mysql_query($Ins_doc, $BE2) or die(mysql_error()); }// else{ $doc='雲名片廣告已關閉,感謝您的使用, SKYBNI 敬上.'; } $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 member WHERE mem_auto = %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); ?> <form method="post" name="form1" action=""> <table width="485" align="center"> <tr valign="baseline"> <td align="right" nowrap> </td> <td> </td> <td> </td> </tr> <tr valign="baseline"> <td width="144" align="right" nowrap><span class="s1"><span class="font2">雲明片廣告審核 ID</span>:</span></td> <td width="228"><a href="/ecard/<?= $row_Rt2['scode']; ?>" target="_blank"><h3><?= $row_Rt2['scode']; ?></h3></a></td> <td width="97"> </td> </tr> <tr valign="baseline"> <td nowrap align="right"><span class="font2">雲明片會員姓名<span class="s1">:</span></span></td> <td><h3><?= $row_Rt2['mem_name']; ?></h3></td> <td> </td> </tr> <tr valign="baseline"> <td nowrap align="right"><span class="font2">雲明片廣告啟用日期 :</span></td> <td><input name="m_ad2sdate" type="text" id="m_ad2sdate" value="<?= ($row_Rt2['m_ad2sdate']=='')?date("Y-m-d"):$row_Rt2['m_ad2sdate'] ; ?>" size="32" /> </td> <td> </td> </tr> <tr valign="baseline"> <td nowrap align="right"><span class="font2"><span style="color:#F00">雲明片廣告截止日期 :</span></span></td> <td><input name="m_ad2edate" type="text" id="m_ad2edate" value="<?= ($row_Rt2['m_ad2edate']=='')?date("Y-m-d",time()+86400*365):$row_Rt2['m_ad2edate'] ; ?>" size="32" /></td> <td> </td> </tr> <tr valign="baseline"> <td nowrap align="right"><span class="font2">聯繫電話</span></td> <td><?= $row_Rt2['mem_mobile'];?></td> <td> </td> </tr> <tr valign="baseline"> <td nowrap align="right"><span class="font2">廣告啟用</span></td> <td><select name="m_ad2" id="m_ad2"> <option value="Y" <?= ($row_Rt2['m_ad2']=='Y')?'selected="selected"':'' ?>>Y</option> <option value="N" <?= ($row_Rt2['m_ad2']=='N')?'selected="selected"':'' ?>>N</option> </select> </td> <td> </td> </tr> <tr valign="baseline"> <td nowrap align="right"> </td> <td> </td> <td><input type="hidden" name="MM_update" value="form1" /> <input name="url" type="hidden" id="url" value="<?php echo $_SERVER['HTTP_REFERER']; ?>" /> <input name="mem_auto" type="hidden" id="mem_auto" value="<?= $row_Rt2['mem_auto']; ?>" /></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> <?php mysql_free_result($Rt2); ?>
保存
取消
返回文件列表