<?php session_start(); if($_SESSION['member_id'] == "") { header("location:login_form.php"); exit(); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>ใบสั่งซื้อสินค้า</title> <link rel="stylesheet" type="text/css" href="include/styles-ww.css"> <style type="text/css" media="print"> input{ display:none; } </style> </head> <body> <?php include('include/connect-db.php'); $osql="select * from tbl_order_data where order_id='$_GET[order_id]'"; $oquery=mysql_query($osql); $oarr=mysql_fetch_array($oquery); ?> <table width="626" border="1" align="center" cellpadding="5" cellspacing="0" bordercolor="#666666" class="coll"> <tr> <td colspan="2" align="right" class="medium_black"><strong><u>ใบสั่งซื้อเลขที่ : <?php echo sprintf("%08d",$oarr['order_id']);?></u></strong></td> </tr> <tr> <td colspan="2"><table width="626" border="0" align="center" cellpadding="5" cellspacing="0" bordercolor="#CCCCCC" class="coll"> <tr> <td colspan="4" class="medium_black"><strong>รายการที่สั่งซื้อ</strong></td> </tr> <tr class="medium_black"> <td width="84" align="right" bgcolor="#999999"><strong>รหัสสินค้า</strong></td> <td width="262" align="left" bgcolor="#999999"><strong>ชื่อสินค้า</strong></td> <td width="106" align="left" bgcolor="#999999"><strong>จำนวน</strong></td> <td width="134" align="left" bgcolor="#999999"><strong>ราคา</strong></td> </tr> <?php include('include/connect-db.php'); $osql="select * from tbl_order_data where order_id='$_GET[order_id]'"; $oquery=mysql_query($osql); $oarr=mysql_fetch_array($oquery); $dsql="select * from tbl_order_detail where order_id='$oarr[order_id]'"; $dquery=mysql_query($dsql); while($darr=mysql_fetch_array($dquery)) { ?> <tr class="coll"> <td align="right" class="small_black"><?php echo sprintf("%08d",$darr['mobile_id']);?></td> <td align="left" class="small_black"> <? $msql="select * from tbl_mobile where mobile_id='$darr[mobile_id]'"; $mquery=mysql_query($msql); $marr=mysql_fetch_array($mquery); echo $marr['mobile_name']; ?></td> <td align="left" class="small_black"><?=$darr['Qty'];?> เครื่อง</td> <td align="left" class="small_black"><? echo number_format($marr['mobile_price'],2);?> บาท</td> </tr> <?php } ?> <tr> <td colspan="3" align="right" class="small_black"><span class="small_black"><strong>รวม</strong></span></td> <td align="left" class="small_black"><span class="small_black"><strong><? echo number_format($oarr['order_price1'],2);?> บาท</strong></span></td> </tr> <tr> <td colspan="3" align="right" class="small_black"><span class="small_black"><strong>สมาชิกลด</strong></span></td> <td align="left" class="small_black"><span class="small_black"><strong> <?=$oarr['order_price2'];?> %</strong></span></td> </tr> <tr> <td colspan="3" align="right" class="small_black"><span class="small_black"><strong>จำนวนส่วนลด</strong></span></td> <td align="left" class="small_black"><span class="small_black"><strong><? echo number_format($oarr['order_price3'],2);?> บาท</strong></span></td> </tr> <tr> <td colspan="3" align="right" class="small_black"><span class="small_black"><strong>ราคาคงเหลือ</strong></span></td> <td align="left" class="small_black"><span class="small_black"><strong><? echo number_format($oarr['order_price4'],2);?> บาท</strong></span></td> </tr> <tr> <td colspan="3" align="right" class="small_black"><span class="small_black"><strong>ค่าจัดส่ง</strong></span></td> <td align="left" class="small_black"><span class="small_black"><strong><? echo number_format($oarr['order_price5'],2);?> บาท</strong></span></td> </tr> <tr> <td colspan="3" align="right" class="small_black"><span class="small_red"><strong>รวมเป็นเงินทั้งสิ้น</strong></span></td> <td align="left" class="small_black"><span class="small_red"><strong> <? echo number_format($oarr['order_price6'],2);?> บาท</strong></span></td> </tr> </table></td> </tr> <tr> <td colspan="2" class="small_red">สถาน : <?php if($oarr['order_status']=="0") { echo "<span class='small_red'>รอการตรวจสอบการสั่งซื้อ</span>"; } else if($oarr['order_status']=="1") { echo "<span class='small_red'>รอการยืนยันการชำระเงิน</span>"; } else if($oarr['order_status']=="2") { echo "<span class='small_red'>เสร็จสิ้น</span>"; } ?> </td> </tr> <tr> <td width="300" class="medium_black"><table width="300" border="0" align="left" cellpadding="5" cellspacing="0" bordercolor="#CC6666" class="coll"> <tr> <td colspan="2" align="left" class="medium_black"><span class="small_black"><strong>ข้อมูลผู้สั่งซื้อสินค้า</strong></span></td> </tr> <?php $usql="select * from tbl_member where member_id='$oarr[member_id]'"; $uquery=mysql_query($usql); $uarr=mysql_fetch_array($uquery); ?> <tr> <td width="70" align="right" class="small_green"><span class="small_black">ชื่อผู้สั่งซื้อ</span></td> <td width="210" align="left" class="small_black"> <span class="small_black"> <?=$uarr['member_fullname'];?> </span></td> </tr> <tr> <td align="right" valign="top" class="small_green"><span class="small_black">ที่อยู่</span></td> <td align="left" valign="top" class="small_black"> <span class="small_black"> <?=$uarr['member_address'];?> อำเภอ <?=$uarr['member_distric'];?> <br /> จังหวัด <?=$uarr['member_province'];?> <br /> รหัสไปรษณีย์ <?=$uarr['member_zipcode'];?> </span></td> </tr> <tr> <td align="right" class="small_green"><span class="small_black">เบอร์โทร</span></td> <td align="left" class="small_black"> <span class="small_black"> <?=$oarr['order_tel'];?> </span></td> </tr> <tr> <td align="right" class="small_green"><span class="small_black">Email</span></td> <td align="left" class="small_black"> <span class="small_black"> <?=$oarr['order_email'];?> </span></td> </tr> </table> <strong> <br /> </strong></td> <td width="300" class="medium_black"><table width="300" border="0" align="left" cellpadding="5" cellspacing="0" bordercolor="#CC6666" class="coll"> <tr> <td colspan="2" align="left" class="small_blue"><strong>ข้อมูลผู้รับสินค้า</strong></td> </tr> <tr> <td width="88" align="right" class="small_green"><span class="small_blue">ชื่อผู้รับสินค้า</span></td> <td width="192" align="left" class="small_black"><span class="small_blue"> <?=$oarr['order_name'];?> </span></td> </tr> <tr> <td align="right" valign="top" class="small_green"><span class="small_blue">ที่อยู่</span></td> <td align="left" class="small_black"> <span class="small_blue"> <?=$oarr['order_address'];?> อำเภอ <?=$oarr['order_distric'];?> <br /> </span><span class="small_blue">จังหวัด <?=$oarr['order_province'];?> <br /> รหัสไปรษณีย์ <?=$oarr['order_zipcode'];?> </span></td> </tr> <tr> <td align="right" class="small_green"><span class="small_blue">เบอร์โทร</span></td> <td align="left" class="small_black"><span class="small_blue"> <?=$oarr['order_tel'];?> </span></td> </tr> <tr> <td align="right" class="small_green"><span class="small_blue">Email</span></td> <td align="left" class="small_black"><span class="small_blue"> <?=$oarr['order_email'];?> </span></td> </tr> </table></td> </tr> <tr> <td colspan="2" align="center" class="small_gray">สั่งซื้อเมื่อ : <?=$oarr['order_date'];?> </td> </tr> </table> <p align="center"><input type="button" name="button" id="button" value="Print" onclick="print();"></p> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง