<?php switch( $var){ case '1': $finc='1.php'; break; case '2': $finc='2.php'; break; default: $finc='df.php'; } include($finc); ?>
<? $list_id =$_REQUEST['list_id']; $total[$a]=$_REQUEST['total']; $price=$_REQUEST['price']; $sumtotal_uct=$_REQUEST['sumtotal_uct']; $isselect=$_REQUEST['isselect']; $pro_id=$_REQUEST['pro_id']; $order_date=$_REQUEST['order_date']; $mng_approve=$_REQUEST['mng_approve']; $order_id=$_REQUEST['order_id']; $emp_name=$_SESSION['emp_name']; ?> <form name="form" method="post" action="index.php?module=<?=$module?>&mode=checkrequier"> <p> <? $sq="SELECT * FROM tbl_order_list as a, tbl_product as b WHERE a.pro_id=b.pro_id and a.order_id =$order_id"; $q=mysql_query($sq); //$qr=mysql_fetch_array($q); //$b = mysql_num_rows($q); ?> </p> <table width="50%" border="0" align="center" bordercolor="#006600"> <tr> <td colspan="4" align="center" bgcolor="#99CCFF">ใบรายการเบิก</td> <tr> <td colspan="4" align="right" bgcolor="#99CCFF">เลขที่ใบเบิก:<?=$order_id?><br /> วันที่ :<?=$db['order_date']?> </td> <tr bgcolor="#FFFFFF"> <td colspan="4" align="left"><?=$db['emp_name']?></td> <tr> <th align="center"width="42" bgcolor="#555555"><b><font color="#EEEEEE" size="2">ลำดับ</font></b></th> <th align="center"width="68" bgcolor="#555555"><b><font color="#EEEEEE" size="2">รหัสสินค้า</font></b></th> <th align="center"width="86" bgcolor="#555555"><b><font color="#EEEEEE" size="2">ชื่ออุปกรณ์</font></b></th> <th align="center"width="103" bgcolor="#555555"><b><font color="#EEEEEE" size="2">รูปภาพสินค้า</font></b></th> <? $i=1; $f=0; $total = 0; //for($i=0;$i<=$b;$i++){ while ($b=mysql_fetch_array($q)){ // $price=$total[$i]*$price[$i]; // $db['sumtotal_uct']=$total; ?> <tr bgcolor="#FFFFFF"> <td align="center"><?=$i?></td> <td align="center"><?=$b['pro_id']?></td> <td align="center"><?=$b['pro_name']?></td> <td align="center"><? if($db['pro_img']!=''){?> <img src="images/product/<?=$b['pro_img']?>" width="26" height="27" heigth="40px" /> <? }else{?> <img src="images/nopic.gif"width="26" height="27" /> <? }?></td> </tr> <? $i++; }// while($db=mysql_fetch_array($qry)){ ?> <tr bgcolor="#99CCFF"> <td colspan="4" align="center"><input name="mng_approve" type="radio" id="radio" value="1" /> <label for="mng_approve">อนุมัติ <input name="mng_approve" type="radio" id="radio2" value="2" /> ไม่อนุมัติ</label></td> </tr> <tr> <td colspan="4" align="center" bgcolor="#555555"> <input type="submit" name="button" id="button" value="เสร็จสิ้น" /> <input type="hidden" name="mode" value="checkrequier"> <input type="hidden" name="action" value="yes"> <input type="hidden" name="order_id" value="<?=$order_id?>"> </td> </tr> </table> </form>
<form name="form" method="post" action="index.php?module=<?=$module?>&mode=checkrequier"> <p> <? $sq="SELECT * FROM tbl_order_list as a, tbl_product as b WHERE a.pro_id=b.pro_id and a.order_id =$order_id"; $q=mysql_query($sq); //$qr=mysql_fetch_array($q); //$b = mysql_num_rows($q); ?> </p> <table width="50%" border="0" align="center" bordercolor="#006600"> <tr> <td colspan="5" align="center" bgcolor="#99CCFF">ใบรายการเบิก</td> <tr> <td colspan="5" align="right" bgcolor="#99CCFF">เลขที่ใบเบิก:<?=$order_id?><br /> วันที่ :<?=$db['order_date']?> </td> <tr bgcolor="#FFFFFF"> <td colspan="5" align="left"><?=$db['emp_name']?></td> <tr> <th align="center"width="42" bgcolor="#555555"><b><font color="#EEEEEE" size="2">ลำดับ</font></b></th> <th align="center"width="68" bgcolor="#555555"><b><font color="#EEEEEE" size="2">รหัสสินค้า</font></b></th> <th align="center"width="86" bgcolor="#555555"><b><font color="#EEEEEE" size="2">ชื่ออุปกรณ์</font></b></th> <th align="center"width="103" bgcolor="#555555"><b><font color="#EEEEEE" size="2">รูปภาพสินค้า</font></b></th> <th align="center"width="103" bgcolor="#555555"> </th> <? $i=1; $f=0; $total = 0; //for($i=0;$i<=$b;$i++){ while ($b=mysql_fetch_array($q)){ // $price=$total[$i]*$price[$i]; // $db['sumtotal_uct']=$total; ?> <tr bgcolor="#FFFFFF"> <td align="center"><?=$i?></td> <td align="center"><?=$b['pro_id']?></td> <td align="center"><?=$b['pro_name']?></td> <td align="center"><? if($db['pro_img']!=''){?> <img src="images/product/<?=$b['pro_img']?>" width="26" height="27" heigth="40px" /> <? }else{?> <img src="images/nopic.gif"width="26" height="27" /> <? }?></td> <td align="center"><input name="mng_approve" type="radio" id="radio" value="1" /> <label for="mng_approve">อนุมัติ <input name="mng_approve" type="radio" id="radio2" value="2" /> ไม่อนุมัติ</label></td> </tr> <? $i++; }// while($db=mysql_fetch_array($qry)){ ?> <tr bgcolor="#99CCFF"> <td colspan="5" align="center"> </td> </tr> <tr> <td colspan="5" align="center" bgcolor="#555555"> <input type="submit" name="button" id="button" value="เสร็จสิ้น" /> <input type="hidden" name="mode" value="checkrequier"> <input type="hidden" name="action" value="yes"> <input type="hidden" name="order_id" value="<?=$order_id?>"> </td> </tr> </table> </form>
foreach( $_POST['mng_approve'] as $pro_id){ $sql='update table set ...... where id='.intval($pro_id)' }
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง