session_start(); include ("connect.php") ; include("check_level.php"); session_register("sess_or_id"); $sql = "SELECT * FROM orders WHERE or_id = '$or_id' ORDER BY or_id"; $result = mysql_query($sql) or die("query error ".mysql_error()); $rs = mysql_fetch_array($result); $sess_or_id[]=$rs[or_id]; header("Location: ad-chk-status.php");
<form name="form2" method="post" action="ad-update-status1.php"> <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#ffffff"> <tr bordercolor="#A8C2D9"> <td width="15%" bordercolor="#A3DEDE" bgcolor="#B8DCD7" class="style2"><div align="center" class="style5">Check Status <p></div></td> <td width="16%" bordercolor="#A3DEDE" bgcolor="#B8DCD7" class="style2"><div align="center" class="style5">Username <p></div></td> <td width="21%" bordercolor="#A3DEDE" bgcolor="#B8DCD7" class="style2"><div align="center" class="style5">Province<p></div></td> <td width="25%" bordercolor="#A3DEDE" bgcolor="#B8DCD7" class="style2"><div align="center" class="style5">OR Date <p></div></td> <td width="23%" bordercolor="#A3DEDE" bgcolor="#B8DCD7" class="style2"><div align="center"><span class="style5">Sent Date <p></span></div></td> </tr> <? $sql = "SELECT DISTINCT or_id AS 'order' FROM orders" ; $result1 = mysql_query($sql) or die("query error 1 ".mysql_error()); while ($rs1 = mysql_fetch_array($result1)) {?> <? $num = $rs1['order'];?> <? $sql = "select * from member m,orders o where m.username = o.username and o.or_id = $num order by o.or_id"; $result = mysql_query($sql) or die("query error 2 ".mysql_error()); while ($rs = mysql_fetch_array($result)) { ?> <tr bordercolor="#A8C2D9"> <td colspan="5" bordercolor="#A3DEDE" bgcolor="#ECF5FB" class="style7"><span class="style14">Order ID : <?php echo $rs["or_id"] ?> </span></td> </tr> <tr bordercolor="#A8C2D9"> <td bordercolor="#A3DEDE" class="style8"><div align="center"> <input name="status[]" type="checkbox" value="<? echo $sess_or_id[$i]?>"> </div></td> <td bordercolor="#A3DEDE" class="style2"><div align="center"><a href=ad-view-member-bysearch.php?cus_id=<?php echo $rs["cus_id"] ?> class="style2"> <?php echo $rs["username"] ?> </a></div> <div align="center"></div> <div align="center"><a href=ad-view-product-bysearch.php?pro_id=<?php echo $rs["pro_id"] ?> class="style2"></a></div> <div align="center"></div></td> <td bordercolor="#A3DEDE" class="style2"><div align="center"><?php echo $rs["cus_province"] ?></div></td> <td bordercolor="#A3DEDE" class="style2"><div align="center"> <?php echo $rs["date"] ?> </div></td> <td bordercolor="#A3DEDE" class="style2"><div align="center"> <?php echo $rs['s_date'] ?> </div></td> <? } } ?> </tr> <tr bordercolor="#A8C2D9"> <td colspan="4" bordercolor="#A3DEDE" bgcolor="#ECF5FB" class="style8"><div align="right"> </div></td> <td bordercolor="#A3DEDE" bgcolor="#ECF5FB" class="style8"><div align="center"> <input name="Submit" type="submit" class="style8" id="Submit" value="Update"> </div></td> </tr> </table> </form>
<? //var_dump($sess_or_id); session_start(); if(count($status)== 0){ $status = array(); } for($i=0;$i<count($sess_or_id);$i++){ if(!in_array($sess_or_id[$i],$status)){ $temp_id[]=$sess_or_id[$i]; } } $sess_or_id = $temp_id; header("Location: ad-update-status.php"); ?>
<? $today = date("Y-m-d"); echo "$today,$sess_or_id[$i]"; for($i=0;$i<count($sess_or_id);$i++){ if(status == 0){ $sql1 = "update orders set status = 1 ,s_date = '$today' where or_id = '$sess_or_id[$i]'"; $result = mysql_query($sql1) or die("query error 1 ".mysql_error()); echo "<center><b><br><br><br><br><br><br><br><br><br><br>"; echo "<meta http-equiv='refresh' content='3;URL=ad-view-order.php' /> Update Complete."; echo "</b></center>"; } } ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง