<div class="page-header"> <h3>รายงานยอดขายแบ่งตารางเฉพาะวันที่</h3> <h5>ตั้งแต่วันที่ : <?php echo thaidate($_GET['stdate']); ?> ถึงวันที่ : <?php echo thaidate($_GET['endate']); ?></h5> </div> <?php $where = ' where orders_date>="'.$_GET['stdate'].'" and orders_date<="'.$_GET['endate'].'" '; $query = sprintf('select * from orders %s order by orders_date asc',$where); $result = mysqli_query($con,$query); if (mysqli_num_rows($result)>0) { $sum=0; for ($i=1;$i<=mysqli_num_rows($result);$i++) { $rs = mysqli_fetch_array($result); ?> <table class="table table-bordered"> <thead> <tr> <th>#</th> <th>วัน-เวลาที่สั่งซื้อ</th> <th>ชื่อลูกค้า</th> <th>การรับสินค้า</th> <th>รวมเป็นเงิน</th> <th>สถานะ</th> </tr> </thead> <?php $query2 = 'select * from orders_detail where orders_id='.$rs['orders_id']; $result2 = mysqli_query($con,$query2); for ($j=1;$j<=mysqli_num_rows($result2);$j++) { $rs2 = mysqli_fetch_array($result2); $query3 = 'select * from product where pro_no="'.$rs2['pro_no'].'"'; $result3 = mysqli_query($con,$query3); $rs3 = mysqli_fetch_array($result3); $sum=$rs2['pro_amount'] * $rs3['pro_price']; } $query3 = sprintf('select * from branch where br_id=%s',$rs['branch_id']); $result3 = mysqli_query($con,$query3); $rs3 = mysqli_fetch_array($result3);?> <tbody> <tr> <td><?php echo $i; ?></td> <td><?php echo thaidate($rs['orders_date']).' '.$rs['orders_time']; ?></td> <td><?php echo $rs['cus_name']; ?></td> <td><?php echo 'รับที่ '.$rs3['br_name'].'<br> วันที่ : '.thaidate($rs['rec_date']).' - '.$rs['rec_time']; ?></td> <td><?php echo number_format($sum,2); ?></td> <td> <?php if ($rs['orders_status']==1) {echo 'ยังไม่ชำระเงิน';} else if ($rs['orders_status']==2) { echo 'รอการตรวจสอบ'; } else if ($rs['orders_status']==3) { echo 'รอจัดส่งสินค้า'; } else {echo 'รับสินค้าเรียบร้อย';} ?> </td> </tr> <?php }} ?> </tbody> </table>
<table class="table table-bordered"> <thead> <tr> <th>#</th> <th>หัวข้อ</th> </tr> </thead> <tbody> <?php for($i=1;$i<=50; $i++){ ?> <tr> <td><?php echo $i; ?></td> <td>test - xxxx</td> </tr> <?php if($i%5==0&&$i!=50){ ?> </tbody> </table> <table class="table table-bordered"> <thead> <tr> <th>#</th> <th>หัวข้อ</th> </tr> </thead> <tbody> <?php } //+ end if($i%5==0&&$i!=50){ ?> <?php } //+ end for($i=1;$i<=50; $i++){ ?> <tbody> </table>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง