|
 |
|
หาจำนวนวันครับ ติดอะไม่รู้ครับ ช่วยดูโค๊ดให้ทีครับทำตัวหนาให้แล้วนะคับช่วยทีครับ ขอบคุณครับ |
|
 |
|
|
 |
 |
|
<?php require_once('config_admin.php'); ?>
<?php require_once('../Connections/connresort.php'); ?>
<?php
$book_ID = $_GET["book_ID"];
mysql_select_db($database_connresort, $connresort);
$query_rsReport = "SELECT * FROM bookings,clients,room,roomtype WHERE bookings.room_ID=room.room_ID AND bookings.clients_ID=clients.clients_ID AND bookings.roomtype_ID=roomtype.roomtype_ID AND bookings.book_ID='$book_ID'";
$rsReport = mysql_query($query_rsReport, $connresort) or die(mysql_error());
$row_rsReport = mysql_fetch_assoc($rsReport);
$totalRows_rsReport = mysql_num_rows($rsReport);
mysql_select_db($database_connresort, $connresort);
$query_rsAccount = "SELECT price FROM account WHERE book_ID='$book_ID'";
$rsAccount = mysql_query($query_rsAccount, $connresort) or die(mysql_error());
$row_rsAccount = mysql_fetch_assoc($rsAccount);
$totalRows_rsAccount = mysql_num_rows($rsAccount);
?>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
<style type="text/css">
<!--
.style8 {font-size: 14px}
.style15 {font-size: 14px; font-family: Geneva, Arial, Helvetica, sans-serif; }
.style24 {font-size: 10}
.style29 {font-size: 14; font-family: Geneva, Arial, Helvetica, sans-serif; }
.style30 {font-size: 14}
.style31 {font-size: 12px}
.style35 {font-size: 12px; font-family: Geneva, Arial, Helvetica, sans-serif; }
.style36 {font-size: 12}
-->
</style>
<p> </p>
<table width="60%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#6699FF">
<tr>
<td><div align="center" class="style15">รายงานผลการจองห้องพัก</div></td>
</tr>
<tr>
<td><br> <table width="90%" border="1" align="center" cellpadding="0" cellspacing="0">
<tr bgcolor="#FFFFCC">
<td colspan="2" class="style8"><span class="style36">ประวัติผู้จอง</span></span></td>
</tr>
<tr>
<td width="31%" class="style8"><span class="style36">ชื่อ -นามสกุล</span></td>
<td width="69%" class="style8"><span class="style36">คุณ <?php echo $row_rsReport['firstname']; ?> <?php echo $row_rsReport['lastname']; ?></span></td>
</tr>
<tr>
<td class="style8"><span class="style36"> ที่อยู่ </span></td>
<td class="style8"><span class="style36"><?php echo $row_rsReport['address1']; ?>อำเภอ<?php echo $row_rsReport['province']; ?> จังหวัด <?php echo $row_rsReport['city']; ?>ประเทศ <?php echo $row_rsReport['country']; ?>รหัสไปรษณีย์ <?php echo $row_rsReport['zipcode']; ?></span></td>
</tr>
<tr>
<td class="style8"><span class="style36"> เบอร์โทรศัพท์ </span></td>
<td class="style8"><span class="style36"><?php echo $row_rsReport['tel']; ?></span></td>
</tr>
<tr>
<td class="style8"><span class="style36"> อีเมล์ </span></td>
<td class="style8"><span class="style36"><?php echo $row_rsReport['email']; ?></span></td>
</tr>
</table>
<br>
<table width="90%" border="1" align="center" cellpadding="0" cellspacing="0">
<tr bgcolor="#FFFFCC">
<td colspan="2" class="style8"><span class="style36"> รายละเอียดการจอง </span></td>
</tr>
<tr>
<td width="31%" class="style8"><span class="style36"> จองวันที่ </span></td>
<td width="69%" class="style8"><span class="style36"><?php echo dateThai($row_rsReport['created']); ?></span></td>
</tr>
<tr>
<td class="style8"><span class="style36">เริ่มจองตั้งแต่วันที่ </span></td>
<td class="style8"><span class="style36"><?php echo dateThai($row_rsReport['startdate']); ?>ถึงวันที่ <?php echo dateThai($row_rsReport['enddate']); ?></span></td>
</tr>
<tr>
<td class="style8"><span class="style36">จำนวนวันที่เข้าพัก </span></td>
<td class="style8"><span class="style36"><?php echo ($row_rsReport['startdate']-$row_rsReport['enddate']); ?> วัน</span></td>///// แก้ยังไงครับ ช่วยทีนะครับ
</tr>
</table>
<br>
<table width="90%" border="1" align="center" cellpadding="0" cellspacing="0">
<tr bgcolor="#FFFFCC">
<td colspan="2" class="style8"><span class="style31"> รายละเอียดห้องพัก</span></td>
</tr>
<tr>
<td class="style8"><span class="style31">หมายเลขการจอง</span></td>
<td class="style8"><span class="style31"><?php echo $row_rsReport['book_ID']; ?></span></td>
</tr>
<tr>
<td width="31%" class="style8"><span class="style31">หมายเลขห้อง</span></td>
<td width="69%" class="style8"><span class="style31"><?php echo $row_rsReport['number']; ?></span></td>
</tr>
<tr>
<td class="style8"><span class="style31">ชนิดห้อง</span></td>
<td class="style8"><span class="style31"><?php echo $row_rsReport['name']; ?></span></td>
</tr>
<tr>
<td class="style8"><span class="style31">จำนวนเตียง</span></td>
<td class="style8"><span class="style31"><?php echo $row_rsReport['bed']; ?>เตียง</span></td>
</tr>
<tr valign="top">
<td class="style8"><span class="style31">รายละเอียดห้อง</span></td>
<td class="style8"><span class="style31"><?php echo $row_rsReport['description']; ?></span></td>
</tr>
<tr>
<td class="style8"><span class="style31">ราคา</span></td>
<td class="style8"> <span class="style31"><?php echo intToMoney($row_rsReport['price']); ?>บาท </span></td>
</tr>
</table>
<br>
<table width="90%" border="1" align="center" cellpadding="0" cellspacing="0">
<tr bgcolor="#FFFFCC">
<td colspan="2"><span class="style24">่<strong class="style8">จำนวนเงิน</strong></span></td>
</tr>
<tr>
<td width="72%"><div align="right" class="style29 style31">ราคารวมทั้งหมดที่ต้องชำระ</div></td>
<td width="28%"> <div align="right" class="style35"><?php echo intToMoney($row_rsAccount['price']); ?><span style="">บาท</span> </div></td>
</tr>
<tr>
<td><div align="right" class="style35">จำนวนเงินมัดจำที่ต้องชำระก่อน </div></td>
<td width="28%"><div align="right" class="style35"> <?php echo intToMoney($row_rsAccount['price']*0.3); ?>บาท</div></td>
</tr>
<tr>
<td><span class="style30"></span></td>
<td width="28%"><span class="style30"></span></td>
</tr>
</table>
<div align="center">
<p>
<input name="Button" type="button" onclick="MM_openBrWindow('../clients/detail_reserve.php?book_ID=<?=$book_ID ?>&clients_ID=<?php echo $row_rsReport['clients_ID']; ?>','','width=530,height=620')" value="พิมพ์ใบการจอง">
</p>
<p> </p>
</div>
</td>
</table>
<?php
mysql_free_result($rsReport);
mysql_free_result($rsAccount);
?>
<p> </p>
Tag : - - - -

|
|
 |
 |
 |
 |
Date :
2009-07-29 00:08:14 |
By :
Eroz |
View :
1019 |
Reply :
4 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
$dateExpire = gregoriantojd(29, 01, 2008);
$dateCurrent = gregoriantojd(29, 01, 2009);
echo "เหลืออายุการใช้งานอีก ".($dateExpire - $dateCurrent)." วัน";
ลองใช้ gregoriantojd นี่หละครับ ออกมาเป็นวันดี
|
 |
 |
 |
 |
Date :
2009-07-29 05:09:03 |
By :
deawx |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณครับแต่ลองไปทำแล้ว ไม่ได้นะครับ ช่วยแทรกโค๊ดให้ดูทีนะครับ
พี่ๆ คนไหนเก่งๆ ทำให้เป็นตัวอย่างหน่อยนะครับ
|
 |
 |
 |
 |
Date :
2009-07-29 10:58:47 |
By :
Eroz |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ไปประยุก แล้ว ใช่แล้วงงครับ ผมมะได้เก่งโค๊ดเท่าไหร่ครับ พี่คนไหนเก่งช่วยแก้แล้วทำให้เข้าใจหน่อยครับ
|
 |
 |
 |
 |
Date :
2009-07-29 11:45:56 |
By :
Eroz |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เศร้า....ทำไงก้อไม่ได้ ช่วยหน่อยนะครับคนใจบุญ
|
 |
 |
 |
 |
Date :
2009-07-29 23:17:58 |
By :
Eroz |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 00
|