<?php if(!isset($_SESSION)){ session_start(); } require './config/function.php'; if(!isset($_SESSION['user'])){ redirect_to('index.php'); } require './config/connect.php'; $result = $con->prepare("SELECT * FROM revenue ORDER BY date DESC"); $result->execute(); <body> <div class="container-fluid"> <div class="row-fluid"> <div class="col-md-6"> <div class="col-md-12"> <button class="btn btn-warning" type="button" onclick="window.location='index.php' ">กลับไปหน้าหลัก </button> </div> </div> <div class="col-md-2"> <div class="form-group"> </div> </div> <div class="col-md-2"> <div class="form-group"> </div> </div> <div class="col-md-2"> <div class="form-group navbar-right"> <input class="form-control" style="width: 200px;" type="text" name="search" id="search" placeholder="ค้นหา"> </div> </div> แสดง รายการต่อหน้า <div class="row-fluid"> <div class="col-md-12 text-center"> <label class="control-label" style="font-family: rsubold; font-size: 40px; color: #c7254e;">ตารางยอดเงินทั้งหมด</label> <table class="table table-hover table-responsive"> <thead class="bg-info"> <th style="width: 90px; text-align:center; font-family: rsuregular; font-size: 17px; color: darkorange;">ชื่อพนักงาน (ที่บันทึก)</th> <th style="width: 90px; text-align:center; font-family: rsuregular; font-size: 17px; color: darkorange;">วันที่ <BR>(วัน/เดือน/ปี)</th> <th style="width: 90px; text-align:center; font-family: rsuregular; font-size: 17px; color: darkorange;">เวลาเข้ากะ (ชั่วโมง:นาที:วินาที)</th> <th style="width: 90px; text-align:center; font-family: rsuregular; font-size: 17px; color: darkorange;">เวลาออกกะ (ชั่วโมง:นาที:วินาที)</th> <th style="width: 60px; text-align:center; font-family: rsuregular; font-size: 17px; color: darkorange;">ค่าเกมส์ (บาท)</th> <th style="width: 80px; text-align:center; font-family: rsuregular; font-size: 17px; color: darkorange;">ค่าขนม (บาท)</th> <th style="width: 80px; text-align:center; font-family: rsuregular; font-size: 17px; color: darkorange;">ค่าปริ้นท์ (บาท)</th> <th style="width: 80px; text-align:center; font-family: rsuregular; font-size: 17px; color: darkorange;">รวมยอด (บาท)</th> <th style="width: 300px; text-align:center; font-family: rsuregular; font-size: 17px; color: darkorange;">หมายเหตุ <BR>(เช่น หนี - จ่ายค่าเบ็ดเตล็ด)</th> <th style="width: 90px; text-align:center; font-family: rsuregular; font-size: 17px; color: darkorange;">หักค่าเกมส์ (บาท)</th> <th style="width: 90px; text-align:center; font-family: rsuregular; font-size: 17px; color: darkorange;">หักค่าขนม (บาท)</th> <th style="width: 90px; text-align:center; font-family: rsuregular; font-size: 17px; color: darkorange;">หักค่าปริ้นท์ (บาท)</th> <th style="width: 100px; text-align:center; font-family: rsuregular; font-size: 17px; color: darkorange;">ยอดจริงคงเหลือ (บาท)</th> <th style="width: 25px; text-align:center; font-family: rsuregular; font-size: 17px; color: darkorange;">แก้ไข</th> <th style="width: 25px; text-align:center; font-family: rsuregular; font-size: 17px; color: darkorange;">ลบ</th> </thead> <?php while ($rs = $result->fetch()) { ?> <tr> <td style="width: 90px; text-align:center; font-family: rsubold; font-size: 20px; color: sienna;"><?php echo $rs['username']; ?></td> <td style="width: 90px; text-align:center; font-family: rsubold; font-size: 20px; color: magenta;"><?php echo $rs['date']; ?></td> <td style="width: 90px; text-align:center; font-family: rsubold; font-size: 20px; color: magenta;"><?php echo $rs['time_in']; ?></td> <td style="width: 90px; text-align:center; font-family: rsubold; font-size: 20px; color: magenta;"><?php echo $rs['time_out']; ?></td> <td style="width: 80px; text-align:center; font-family: rsubold; font-size: 20px; color: sienna;"><?php echo $rs['games']; ?></td> <td style="width: 80px; text-align:center; font-family: rsubold; font-size: 20px; color: sienna;"><?php echo $rs['dessert']; ?></td> <td style="width: 80px; text-align:center; font-family: rsubold; font-size: 20px; color: sienna;"><?php echo $rs['print']; ?></td> <?php $x = $rs['games']+$rs['dessert']+$rs['printlost'] ; ?> <td style="width: 80px; text-align:center; font-family: rsubold; font-size: 20px; color: sienna;"><?php echo $x; ?></td> <td style="width: 300px; text-align:center; font-family: rsubold; font-size: 20px; color: sienna;"><?php echo $rs['remark']; ?></td> <td style="width: 90px; text-align:center; font-family: rsubold; font-size: 20px; color: sienna;"><?php echo $rs['gameslost']; ?></td> <td style="width: 90px; text-align:center; font-family: rsubold; font-size: 20px; color: sienna;"><?php echo $rs['dessertlost']; ?></td> <td style="width: 90px; text-align:center; font-family: rsubold; font-size: 20px; color: sienna;"><?php echo $rs['printlost']; ?></td> <?php $y = $rs['gameslost']+$rs['dessertlost']+$rs['printlost'] ; ?> <td style="width: 100px; text-align:center; font-family: rsubold; font-size: 20px; color: sienna;"><?php echo $x-$y; ?></td> <?php if($_SESSION['user']['status']=='admin') { ?> <td style="width: 90px; text-align:center;"><a href="editdata.php?id=<?php echo $rs['id']; ?>" class="btn btn-sm btn-warning">Edit</a></td> <?php }else{ ?> <td style="width: 90px; text-align:center;"><a href="#" class="btn btn-sm btn-warning">Edit</a></td> <?php } ?> <td style="width: 90px; text-align:center;"><a href="editdata.php?id=<?php echo $rs['id']; ?>" class="btn btn-sm btn-danger">Del</a></td> </tr> <?php } ?> </table> <nav aria-label="Page navigation"> <ul class="pagination"> <li> <a href="#" aria-label="Previous"> <span aria-hidden="true">«</span> </a> </li> <li class="active"><a href="#">1</a></li> <li><a href="#">2</a></li> <li><a href="#">3</a></li> <li><a href="#">4</a></li> <li> <a href="#" aria-label="Next"> <span aria-hidden="true">»</span> </a> </li> </ul> </nav> </div> </div> </div> </div>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง