查看文件: member_adedit.php
大小: 3.63 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_addemo='%s' WHERE mem_auto='%s'",$_POST['m_addemo'], $_POST['mem_auto']); 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 敬上.'; } if($_POST["m_addemo"]<>$_POST["old_addemo"]){ $mess='廣告審核'; $InsertSQL = sprintf("INSERT INTO rec_step(rdoc,companyid,ostate,rstate,rdate,ruser)VALUES('%s','%s','%s','%s','%s','%s')",$mess,$_POST['mem_auto'],$_POST["old_addemo"],$_POST["m_addemo"],date('Y-m-d'),$_POST['mem_auto']); mysql_select_db($database_BE2, $BE2); mysql_query($InsertSQL, $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 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 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"><?= $row_Rt2['scode']; ?></a></td> <td width="97"> </td> </tr> <tr valign="baseline"> <td nowrap align="right">註冊日期Idate:</td> <td> <?php echo $row_Rt2['mem_time']; ?> </td> <td> </td> </tr> <tr valign="baseline"> <td nowrap align="right">聯繫電話</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_addemo" id="m_addemo"> <option value="Y" <?= ($row_Rt2['m_addemo']=='Y')?'selected="selected"':'' ?>>Y</option> <option value="N" <?= ($row_Rt2['m_addemo']=='N')?'selected="selected"':'' ?>>N</option> </select> <input type="hidden" name="old_addemo" id="old_addemo" value="<?= $row_Rt2['m_addemo'] ?>" /></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); ?>
保存
取消
返回文件列表