查看文件: member_bossedit.php
大小: 3.41 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 company SET company_boss='%s' WHERE coid='%s'",$_POST['company_boss'], $_POST['coid']); mysql_select_db($database_BE2, $BE2); $Result1 = mysql_query($upSQL, $BE2) or die(mysql_error()); if($_POST["oldstate"]<>$_POST["company_boss"]){ $mess='申請開發商'; $InsertSQL = sprintf("INSERT INTO rec_step(rdoc,companyid,ostate,rstate,rdate,ruser)VALUES('%s','%s','%s','%s','%s','%s')",$mess, $_POST['coid'],$_POST["oldstate"],$_POST["company_boss"],date('Y-m-d'),$_SESSION['login_id']); 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 a.*,b.scode,b.mem_mobile,b.mem_time FROM company as a,member as b WHERE a.mid=b.mem_auto AND a.mid = '%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 style="background-color:#EBEBEB"> <form method="post" name="form1" action=""> <table width="485" align="center"> <tr valign="baseline"> <td width="144" height="30" 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 height="34" align="right" nowrap>註冊日期Idate:</td> <td> <?php echo $row_Rt2['mem_time']; ?> </td> <td> </td> </tr> <tr valign="baseline"> <td height="37" align="right" nowrap>聯繫電話</td> <td><?= $row_Rt2['mem_mobile'];?></td> <td> </td> </tr> <tr valign="baseline"> <td height="35" align="right" nowrap><span class="font2">申請開發商審核</span></td> <td><select name="company_boss" id="company_boss"> <option value="Y" <?= ($row_Rt2['company_boss']=='Y')?'selected="selected"':'' ?>>Y</option> <option value="N" <?= ($row_Rt2['company_boss']=='N')?'selected="selected"':'' ?>>N</option> </select></td> <td><input type="hidden" name="oldstate" id="oldstate" value="<?= $row_Rt2['company_boss'] ?>" /></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="coid" type="hidden" id="coid" value="<?= $row_Rt2['coid']; ?>" /></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> <?php mysql_free_result($Rt2); ?>
保存
取消
返回文件列表