$booking = $db->select("SELECT * FROM reservation WHERE booking_code = '".$_GET['booking_code']."'"); if(isset($_POST['status'])){ //include_once('api_sms.php'); $approve_code = date("Hids").rand(1000,9999); $record['approve_code'] = $db->mySQLSafe($approve_code); //$record['status'] = 2; $record['status'] = $_POST['status']; $record['h_room'] = 0; $where = "booking_code = '".$_GET['booking_code']."'"; $update = $db->update("reservation", $record, $where); if($update){ echo "<script langquage='javascript'>alert('อัพเดทข้อมูลเรียบร้อย');</script>"; echo "<script langquage='javascript'>window.location='index.php?page=booking_list';</script>"; } } ?>
<div class="heading-bt"> <div class="buttons"><a onclick="$('#form').submit();" class="button">บันทึก</a><a onclick="location = 'index.php?page=setting_rooms';" class="button">ยกเลิก</a></div> </div> <table class="list"> <tr> <td colspan="2" align="left"><strong>ข้อมูลผู้จอง</strong></td> </tr> <tr> <td width="200" align="right">รหัสประจำตัวประชาชน:</td> <td width="300"><?php echo $booking[0]['c_idcard']; ?></td> </tr> <tr> <td width="200" align="right">ชื่อ-นามสกุล:</td> <td width="300"><?php echo $booking[0]['c_firstname']." ".$booking[0]['c_lastname']; ?></td> </tr> <tr> <td width="200" align="right">อีเมล์:</td> <td width="300"><?php echo $booking[0]['email']; ?></td> </tr> <tr> <td width="200" align="right">เบอร์โทรศัพท์:</td> <td width="300"><?php echo $booking[0]['telephone']; ?></td> </tr> <tr> <td width="200" align="right">เบอร์โทรศัพท์มือถือ:</td> <td width="300"><?php echo $booking[0]['mobile']; ?></td> </tr> <tr> <td width="200" align="right">ที่อยู่:</td> <td width="300"><?php echo $booking[0]['address']; ?></td> </tr> <tr> <td align="right">หมายเหตุ:</td> <td><?php echo $booking[0]['comment']; ?></td> </tr> <tr> <td colspan="2" align="left"><strong>ข้อมูลห้องพัก</strong></td> </tr> <tr> <td width="200" align="right">ประเภทห้อง:</td> <td width="300"><?php echo $booking[0]['room']; ?></td> </tr> <tr> <td width="200" align="right">จำนวนห้อง:</td> <td width="300"><?php echo $booking[0]['h_room']; ?></td> </tr> <tr> <td width="200" align="right">จำนวนวัน:</td> <td width="300"><?php echo $booking[0]['h_day']; ?></td> </tr> <tr> <td width="200" align="right">ยอดเงินที่ต้องชำระ:</td> <td width="300"><?php echo $booking[0]['total_price']; ?></td> </tr> <tr> <td align="right">สถานะ:</td> <td><?php $status[0] = "<font color='#FF0000'>รอการชำระเงิน</font>"; $status[1] = "<font color='#009933'>แจ้งชำระเงิน / รอการตรวจสอบ</font>"; $status[2] = "<font color='#000000'>ชำระเงินเรียบร้อย / รายการสำเร็จ</font>"; $status[3] = "<font color='#666666'>ยกเลิก</font>"; echo $status[$booking[0]['status']]; ?> </td> </tr> <?php if($booking[0]['status'] == 1){ ?> <tr> <td colspan="2" align="left"><strong>การแจ้งชำระเงิน</strong></td> </tr> <tr> <td align="right">วันที่ชำระเงิน:</td> <td><?php echo thai_date_short($booking[0]['confirm_date']); ?></td> </tr> <tr> <td width="200" align="right">เวลาชำระเงิน:</td> <td width="300"><?php echo $booking[0]['confirm_time']; ?></td> </tr> <?php } ?> </table> <br /> <form action="index.php?page=booking_list&action=edit&booking_code=<?php echo $_GET['booking_code']; ?>" method="post" enctype="multipart/form-data" id="form"> <table class="form"> <tr> <td> </td> <td> </td> </tr> <tr> <td>ยืนยันการชำระเงิน:</td> <td> <select name="status"> <?php if($booking[0]['status'] == 1){ ?> <option value="2">ชำระเงินเรียบร้อย / รายการสำเร็จ</option> <?php } ?> <?php if($booking[0]['status'] != 3){ ?> <option value="3">ยกเลิก</option> <?php } ?> </select> </td> </tr> </table> </form>
if($_POST['status'] == "3") { header("location:webpage.php"); exit(); }
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง