查看文件: registerformuser_edit.php
大小: 13 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")) { $picpath= "/storelogo/"; $img = "logo".sprintf("%08d",$_POST['rid']); $rimgext=$_POST['rimgext']; $tfile="fileToUpload1"; if($_FILES[$tfile]["name"]<>''){ $ext= explode('.',$_FILES[$tfile]['name']) ; $rimgext=strtolower($ext[count($ext)-1]); //取最後一筆 $pic=$wwwpath.$picpath.$img.".".$rimgext; move_uploaded_file($_FILES[$tfile]["tmp_name"],$pic); } $updateSQL = sprintf("UPDATE regformuser SET item=%s, companyname=%s, idnumber=%s, phone1=%s, phone2=%s, fax=%s, email=%s, address=%s, myname=%s, LINE=%s, web2=%s,message1=%s ,message2=%s,pa1=%s,pa2=%s,pa3=%s,pa4=%s,pa5=%s,pa6=%s,area=%s,bus=%s,service=%s,rdate=%s, rshow=%s,rlogo=%s,rimgext=%s,stat=%s,mapdoc=%s WHERE rid=%s", GetSQLValueString($_POST['item'], "text"), GetSQLValueString($_POST['companyname'], "text"), GetSQLValueString($_POST['idnumber'], "text"), GetSQLValueString($_POST['phone1'], "text"), GetSQLValueString($_POST['phone2'], "date"), GetSQLValueString($_POST['fax'], "text"), GetSQLValueString($_POST['email'], "text"), GetSQLValueString($_POST['address'], "text"), GetSQLValueString($_POST['myname'], "text"), GetSQLValueString($_POST['LINE'], "text"), GetSQLValueString($_POST['web2'], "text"), GetSQLValueString($_POST['message1'], "text"), GetSQLValueString($_POST['message2'], "text"), GetSQLValueString($_POST['pa1'], "text"), GetSQLValueString($_POST['pa2'], "text"), GetSQLValueString($_POST['pa3'], "text"), GetSQLValueString($_POST['pa4'], "text"), GetSQLValueString($_POST['pa5'], "text"), GetSQLValueString($_POST['pa6'], "text"), GetSQLValueString($_POST['area'], "text"), GetSQLValueString($_POST['bus'], "text"), GetSQLValueString($_POST['service'], "text"), GetSQLValueString($_POST['rdate'], "date"), GetSQLValueString($_POST['rshow'], "text"), GetSQLValueString($_POST['rlogo'], "text"), GetSQLValueString($rimgext, "text"), GetSQLValueString($_POST['stat'], "text"), GetSQLValueString($_POST['mapdoc'], "text"), GetSQLValueString($_POST['rid'], "int")); mysql_select_db($database_BE2, $BE2); $Result1 = mysql_query($updateSQL, $BE2) or die(mysql_error()); $updateGoTo = $_POST["url"]; header(sprintf("Location: %s", $updateGoTo)); } $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 regformuser WHERE rid = %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" id="form1" enctype="multipart/form-data" action=""> <table align="center"> <tr valign="baseline"> <td width="287" align="right" nowrap class="font2">行業別:</td> <td colspan="2"><input type="text" name="item" value="<?php echo $row_Rt2['item']; ?>" size="32"></td> </tr> <tr valign="baseline"> <td align="right" nowrap class="font2">公司商店名:</td> <td colspan="2"><input type="text" name="companyname" value="<?php echo $row_Rt2['companyname']; ?>" size="32"></td> </tr> <tr valign="baseline"> <td align="right" nowrap class="font2">統一編號 :</td> <td colspan="2"><input name="idnumber" type="text" id="idnumber" value="<?php echo $row_Rt2['idnumber']; ?>" size="32" /></td> </tr> <tr valign="baseline"> <td align="right" nowrap class="font2">公司電話:</td> <td colspan="2"><input type="text" name="phone1" value="<?php echo $row_Rt2['phone1']; ?>" size="32"></td> </tr> <tr valign="baseline"> <td align="right" nowrap class="font2">傳真電話:</td> <td colspan="2"><input type="text" name="fax" value="<?php echo $row_Rt2['fax']; ?>" size="32" /></td> </tr> <tr valign="baseline"> <td align="right" nowrap class="font2">Email:</td> <td colspan="2"><input type="text" name="email" value="<?php echo $row_Rt2['email']; ?>" size="32"></td> </tr> <tr valign="baseline"> <td align="right" nowrap class="font2">服務地址:</td> <td colspan="2"><input type="text" name="address" value="<?php echo $row_Rt2['address']; ?>" size="32"></td> </tr> <tr valign="baseline"> <td align="right" nowrap class="font2">聯絡人:</td> <td colspan="2"><input type="text" name="myname" value="<?php echo $row_Rt2['myname']; ?>" size="32"></td> </tr> <tr valign="baseline"> <td align="right" nowrap class="font2">聯絡人電話:</td> <td colspan="2"><input type="text" name="phone2" value="<?php echo $row_Rt2['phone2']; ?>" size="32"></td> </tr> <tr valign="baseline"> <td align="right" nowrap class="font2">LINE ID:</td> <td colspan="2"><input type="text" name="LINE" value="<?php echo $row_Rt2['LINE']; ?>" size="32" /></td> </tr> <tr valign="baseline"> <td align="right" nowrap class="font2">官網:</td> <td colspan="2"><input name="web2" type="text" id="web2" value="<?php echo $row_Rt2['web2']; ?>" size="32" /></td> </tr> <tr valign="baseline"> <td align="right" nowrap class="font2">是否有分處:</td> <td colspan="2"><select name="office" id="office"> <option value="1" <?php if (!(strcmp('1', $row_Rt2['office']))) {echo "SELECTED";} ?>>無</option> <option value="2" <?php if (!(strcmp('2', $row_Rt2['office']))) {echo "SELECTED";} ?>>有 (分公司、營業分處所) </option> </select></td> </tr> <tr valign="baseline"> <td align="right" nowrap class="font2">分處所在區域:</td> <td colspan="2"><input name="area" type="text" id="area" value="<?php echo $row_Rt2['area']; ?>" size="32" /></td> </tr> <tr valign="baseline"> <td align="right" nowrap class="font2">提供服務類別:</td> <td colspan="2"><input name="service" type="text" id="service" value="<?php echo $row_Rt2['service']; ?>" size="32" /></td> </tr> <tr valign="baseline"> <td align="right" nowrap class="font2">提供車輛種類:</td> <td colspan="2"><input name="bus" type="text" id="bus" value="<?php echo $row_Rt2['bus']; ?>" size="32" /></td> </tr> <tr valign="baseline"> <td align="right" valign="middle" nowrap class="font2">公司簡介:</td> <td colspan="2"><textarea name="message1" cols="60" rows="8" id="message1"><?php echo $row_Rt2['message1']; ?></textarea></td> </tr> <tr valign="baseline" class="font2"> <td colspan="3" align="center" nowrap> 加入方案 </td> </tr> <tr valign="baseline"> <td align="right" nowrap class="font2"> <label>單區 $3600/一年</label> </td> <td colspan="2"><select name="pa1" id="pa1"> <option value="Y" <?php if (!(strcmp('Y', $row_Rt2['pa1']))) {echo "SELECTED";} ?>>Y</option> <option value="N" <?php if (!(strcmp('N', $row_Rt2['pa1']))) {echo "SELECTED";} ?>>N</option> </select></td> </tr> <tr valign="baseline"> <td align="right" nowrap class="font2"> <label> 分公司 $1200/一年</label> </td> <td colspan="2"><select name="pa2" id="pa2"> <option value="Y" <?php if (!(strcmp('Y', $row_Rt2['pa2']))) {echo "SELECTED";} ?>>Y</option> <option value="N" <?php if (!(strcmp('N', $row_Rt2['pa2']))) {echo "SELECTED";} ?>>N</option> </select></td> </tr> <tr valign="baseline" class="font2"> <td colspan="3" align="center" valign="baseline" nowrap>廣告圖刊登</td> </tr> <tr valign="baseline"> <td align="right" nowrap class="font2"> <label>首頁 $3000/2個月</label> </td> <td colspan="2"><select name="pa3" id="pa3"> <option value="Y" <?php if (!(strcmp('Y', $row_Rt2['pa3']))) {echo "SELECTED";} ?>>Y</option> <option value="N" <?php if (!(strcmp('N', $row_Rt2['pa3']))) {echo "SELECTED";} ?>>N</option> </select></td> </tr> <tr valign="baseline"> <td align="right" nowrap class="font2"> <label>業者搜尋 $2000/2個月</label> </td> <td colspan="2"><select name="pa4" id="pa4"> <option value="Y" <?php if (!(strcmp('Y', $row_Rt2['pa4']))) {echo "SELECTED";} ?>>Y</option> <option value="N" <?php if (!(strcmp('N', $row_Rt2['pa4']))) {echo "SELECTED";} ?>>N</option> </select></td> </tr> <tr valign="baseline"> <td align="right" nowrap class="font2"><label>合作廠商 熱門焦點$3000/2個月</label> </td> <td colspan="2"><select name="pa5" id="pa5"> <option value="Y" <?php if (!(strcmp('Y', $row_Rt2['pa5']))) {echo "SELECTED";} ?>>Y</option> <option value="N" <?php if (!(strcmp('N', $row_Rt2['pa5']))) {echo "SELECTED";} ?>>N</option> </select></td> </tr> <tr valign="baseline" class="font2"> <td height="26" colspan="3" align="center" nowrap>熱門焦點記者、部落客採訪報導</td> </tr> <tr valign="baseline"> <td height="26" align="right" nowrap class="font2"> <label>文章發表 $4800/一篇</label> </td> <td colspan="2"><select name="pa6" id="pa6"> <option value="Y" <?php if (!(strcmp('Y', $row_Rt2['pa6']))) {echo "SELECTED";} ?>>Y</option> <option value="N" <?php if (!(strcmp('N', $row_Rt2['pa6']))) {echo "SELECTED";} ?>>N</option> </select></td> </tr> <tr valign="baseline"> <td align="right" valign="middle" nowrap class="font2"> 備註: </td> <td colspan="2"><textarea name="message2" cols="60" rows="8" id="message2"><?php echo $row_Rt2['message2']; ?></textarea></td> </tr> <tr valign="baseline"> <td align="right" nowrap class="font2"> </td> <td colspan="2"><h5> </h5></td> </tr> <tr valign="baseline"> <td align="right" nowrap class="font2">註冊日期Idate:</td> <td colspan="2"><input type="text" name="rdate" value="<?php echo $row_Rt2['rdate']; ?>" size="32" readonly ></td> </tr> <tr valign="baseline"> <td height="32" align="right" nowrap class="font2">已處理:</td> <td width="69"><select name="stat" id="stat"> <option value="Y" <?php if (!(strcmp('Y', $row_Rt2['stat']))) {echo "SELECTED";} ?>>Y</option> <option value="N" <?php if (!(strcmp('N', $row_Rt2['stat']))) {echo "SELECTED";} ?>>N</option> </select></td> <td width="364" rowspan="3" align="center"> <? //$pic=$wwwpath.$picpath.$img.".".$rimgext; $img="logo".sprintf("%08d",$row_Rt2['rid']).".".$row_Rt2['rimgext']; $pic= "/storelogo/".$img; if(! file_exists($wwwpath.$pic)){ $pic="images/noimage.png";}?> <img src="<?= $pic?>" width="250" /></td> </tr> <tr valign="baseline"> <td nowrap align="right" class="font2">開通:</td> <td><select name="rshow" id="rshow"> <option value="Y" <?php if (!(strcmp('Y', $row_Rt2['rshow']))) {echo "SELECTED";} ?>>Y</option> <option value="N" <?php if (!(strcmp('N', $row_Rt2['rshow']))) {echo "SELECTED";} ?>>N</option> </select></td> </tr> <tr valign="baseline"> <td nowrap align="right" class="font2">使用LOGO圖:</td> <td><select name="rlogo" id="rlogo"> <option value="Y" <?php if (!(strcmp('Y', $row_Rt2['rlogo']))) {echo "SELECTED";} ?>>Y</option> <option value="N" <?php if (!(strcmp('N', $row_Rt2['rlogo']))) {echo "SELECTED";} ?>>N</option> </select></td> </tr> <tr valign="baseline"> <td nowrap align="right" class="font2">LOGO圖 上傳</td> <td colspan="2"><input name="fileToUpload1" type="file" id="fileToUpload1" />(寬 820 jpg)</td> </tr> <tr valign="baseline"> <td align="right" valign="middle" nowrap><span class="font2">地圖 IFRAME</span></td> <td colspan="2"><textarea name="mapdoc" cols="60" rows="8" id="mapdoc"><?php echo $row_Rt2['mapdoc']; ?></textarea></td> </tr> <tr valign="baseline"> <td nowrap align="right"> </td> <td colspan="2"><input type="submit" value="更新記錄"></td> </tr> </table> <input type="hidden" name="MM_update" value="form1"> <input type="hidden" name="rid" value="<?php echo $row_Rt2['rid']; ?>"> <input name="url" type="hidden" id="url" value="<?php echo $_SERVER['HTTP_REFERER']; ?>" /> <input name="rimgext" type="hidden" id="rimgext" value="<?php echo $row_Rt2['rimgext']; ?>" /> </form> <?php mysql_free_result($Rt2); ?>
保存
取消
返回文件列表