<? $sql_pur_agt="SELECT * FROM book_order WHERE Book_status='$ses_Pur_agt'" ; //$sql_pur_agt="SELECT * FROM unitcount u INNER JOIN book_order b ON u.Unit_id=b.Unit_id WHERE Book_status='$ses_Pur_agt'"; $result_pur_agt=mysql_query($sql_pur_agt); $numrows=mysql_num_rows($result_pur_agt); ?> </p> <table width=780 align=center border=1 cellpadding=4 cellspacing=0> <tr bgcolor=#C0C0C0> <th width=41 align="center">เลือก</th> <th width=152>ชื่อหนังสือ</th> <th width=167>จำนวนที่สั่งซื้อ</th> <th width=295>หน่วยนับ</th> <th width=350>ราคา</th> </tr> <? while($data_pur_agt=mysql_fetch_array($result_pur_agt)){ ?> <tr> <td align="center"><input type=checkbox name=inChk[] id=inChk[] value=<?=$data_pur_agt[Book_Oid];?>></td> <td align=center><a href=Receiver_detail.php?purid=<?=sprintf("%06d",$data_pur_agt[Order_id]);?>><strong><strong> <?=$data_pur_agt[Book_Oname];?> </strong></strong></a><a href=detail.php?purid=<?=sprintf("%06d",$data_pur_agt[Book_Oname]);?>></a> </td> <td align=center><font size="2"><font size="2"><font size="2"> <? echo "<select name=item id=item>" ; for ($i=1; $i<=100; $i++) { echo "<option value=$i>$i</option>" ; } echo "</select>" ; ?> </font></font></font></td> <td align=center><font size="2"> <?php $sql2 = "select * From Unitcount"; $result2 = mysql_query($sql2); $Num_Rows2 = mysql_num_rows($result2); $result2 = mysql_query($sql2); echo "<select name=productstypecode id=productstypecode class=input>"; echo "<option value=0>เลือกหน่วยนับ"; While($row2= mysql_fetch_array($result2)){ $productstypecode = $row2["Unit_id"]; $productstypename = $row2["Unit_name"]; ?> <option value="<? echo "$productstypecode"; ?>" onBlur="return chkForm();"><? echo "$productstypename"; ?> <? } echo "</option></select>"; ?> </option> </font><strong><strong> </strong></strong></td> <td align=center><strong><strong> <?=number_format ($data_pur_agt[Book_Oprice],2);?> </strong></strong></td> </tr> <? } ?>
<? @session_start() ; include("config.php") ; ?> <? if(isset($Submit)){ if(!session_is_registered("ses_b_id")){ $ses_b_id=array(); } if(isset($_POST[Submit])){ for($i=0;$i<count($inChk);$i++){ $chk_array=in_array($inChk[$i],$ses_b_id); if($chk_array==false && isset($inChk[$i])){ $sql = "SELECT * FROM book_order WHERE Book_Oid='$inChk[$i]'" ; $result = mysql_query($sql) ; $data = mysql_fetch_array($result) ; $ses_b_id[] = $data[Book_Oid] ; $ses_b_title[] = $data[Book_Oname] ; $ses_b_price[] = $data[Book_Oprice] ; $ses_item[] = $_POST[item]; $ses_unit[] = $_POST[productstypecode]; session_register("ses_b_id") ; session_register("ses_b_title") ; session_register("ses_b_price") ; session_register("ses_item") ; session_register("ses_unit") ; } } } } ?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง