|
|
|
Search ยังไม่ได้เลยครับช่วยดูให้หน่อยครับ Code (PHP) การค้นหาในฐานข้อมูล ระบบค้นหามีปัญหาครับ |
|
|
|
|
|
|
|
Code (PHP)
<?
session_start() ;
$_GET[$Hotel_ID];
include "Connections/conn.php";
mysql_query("SET character_set_results=tis620");
$sql="select * from hotel where hotel_id='$Hotel_ID'";
$result=mysql_db_query($database_conn,$sql);
$row=mysql_fetch_array($result);
$hotel_name=$row[hotel_name];
$address =$row[address];
$province_id =$row[province_id];
$zipcode =$row[zipcode];
$tel =$row[tel];
$email=$row[email];
$username=$row[username];
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<HEAD>
<TITLE></TITLE>
<script language="JavaScript" src="javascript/ts_picker.js"></script>
<META http-equiv="Content-Type" content="text/html; charset=windows-874">
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</HEAD>
<BODY><strong>
<marquee>
<span class="style70 style79">จองห้องพักทั่วไทยกับเราได้ที่นี่
</span>
</marquee></strong></div>
<TABLE width="780" border="0" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<TR>
<TD height="29" colspan="2" valign="top" background="images/index_01.gif"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="780" height="29" valign="bottom" background="images/h1.gif"><div align="left"><span class="style32 style69"> <span class="style78"> </span></span><span class="style78">HOTELS THAILAND
</span>
</div>
<div align="left"></div></td>
</tr>
</table> </TD>
</TR>
<TR>
<TD height="124" colspan="2" valign="top" background="images/Untitled-1_011.gif"><!--DWLayoutEmptyCell--> </TD>
</TR>
<TR>
<TD height="51" colspan="2" valign="top"><table width="780" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="594" height="46" valign="top"><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','594','height','50','src','flash/main-manu2','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','flash/main-manu2' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="594" height="50">
<param name="movie" value="flash/main-manu2.swf">
<param name="quality" value="high">
<embed src="flash/main-manu2.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="594" height="50"></embed>
</object></noscript></td>
<td width="186"><img src="images/Untitled-1_05.gif" width="186" height="51"></td>
</tr>
</table></TD>
</TR>
<TR>
<TD width="258" height="29" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="308" height="29" background="images/button3.gif"><div align="center"><span class="style81"><? echo $hotel_name;?> ยินดีต้อนรับครับ</span></div></td>
</tr>
</table> </TD>
<TD width="522"> </TD>
</TR>
<TR>
<TD height="186" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td height="58"><table width="81%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="13%"><span class="style75">ชื่อโรงแรม</span></td>
<td width="54%"><span class="style75"><? echo $hotel_name;?> </span></td>
<td width="33%"> </td>
</tr>
<tr>
<td height="29"><span class="style75">ที่อยู่</span></td>
<td><span class="style75"><? echo $address;?> </span></td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td width="780" height="217">
<form action="hotel_detail.php" method="post" name="search_hotel" target="_parent">
<table width="100%" height="180" cellpadding="2" cellspacing="1" class="d3" summary="">
<!--DWLayoutTable-->
<!--DWLayoutTable-->
<tr>
<td width="346" height="17" valign="middle" bgcolor="#0db6cf" class="ne"> กรุณาเลือกวันเดินทาง </td>
<td width="417" bgcolor="#41729e" class="ne"><div align="center">กรุณาเลือกจำนวนห้องพักที่ท่านต้องการ </div></td>
</tr>
<tr>
<td height="85" valign="top"><table width="100%" height="85" border="0" cellpadding="0" cellspacing="0" bordercolor="#CCFFFF" background="images/bg_shade_instant.jpg">
<tr>
<td><span class="style75"><span class="ne"> <b>: .</b></span>วันที่เข้าพัก</span></td>
<td><span class="style75"> <span class="ne"> <b>: .</b></span>วันที่ออก</span></td>
</tr>
<tr>
<td width="51%"><input name="checkin" type="Text" value="" size="17" id="checkin">
<a href="javascript:show_calendar('document.search_hotel.checkin', document.search_hotel.checkin.value);"> <img src="images/cal.gif" alt="" width="16" height="16" border="0"></a></td>
<td width="49%"><span class="style75">
<input name="checkout" type="Text" value="" size="17">
<a href="javascript:show_calendar('document.search_hotel.checkout', document.search_hotel.checkout.value);"> <img src="images/cal.gif" width="16" height="16" border="0"></a></span></td>
</tr>
<tr>
<td colspan="2" class="ne"> (วันที่ใช้รูปแบบ dd-mm-yyyy และใช้ปี ค.ศ. ) </td>
</tr>
</table></td>
<td valign="top"><table width="100%" height="84" border="0" cellpadding="0" cellspacing="0" bordercolor="#CCFFFF" background="images/bg_shade_instant.jpg">
<tr>
<td colspan="3"><span class="style78"> <span class="style75">กรุณาเลือกประเภทห้องพัก</span></span></td>
</tr>
<tr>
<td width="28%"><span class="style75">ประเภทห้องพัก</span></td>
<td width="42%"><span class="style75">
<select name='Lroomtype' id="Lroomtype">
<option>เลือกประเภทห้องพัก</option>
<?
include "Connections/conn_search.php";
$sql ="select * from roomtype order by roomtype_id asc";
$obj = mysql_query($sql, $connector);
while($result = mysql_fetch_array($obj))
{
echo "<option value='".$result['roomtype_id']."'>".$result['roomtype_name']."</option>";
}
?>
</select>
</span></td>
<td width="30%"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="33" colspan="2"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/bg_shade_instant.jpg">
<tr>
<td><div align="center">
<input name="roomtype_id" type="hidden" id="roomtype_id" value="<?php echo $result['roomtype_id'] ; ?>">
<button type="submit" name="button" id="button" ><img src="images/imagesm.jpeg" width="20" height="20" align="absmiddle" />ตรวจสอบราคา และห้องว่าง</button>
</div></td>
</tr>
</table></td>
</tr>
<tr>
<td bgcolor="#0db6cf" height="20" class="ne" colspan="2"> <b>: . </b><span class="style105"><span class="style104">-- </span></span> Call Center:<span class="style107"><span class="style75"><? echo $tel;?></span></span></td>
</tr>
</table>
</form>
<?
include "Connections/conn_search.php";
$query_rsSearch="select * from room, roomtype, roomdetail";
$query_rsSearch= 'EXPLAIN select t.roomtype_id,r.room_id from roomtype t,room r, roomdetail d where t.roomtype_id = \'".$Lroomtype."\' and d.check_out < ".$checkin." and r.status = \'1\' and t.roomtype_id=r.roomtype_id and r.room_id = d.room_id';
mysql_select_db($newDB, $connector);
$rsSearch= mysql_query($query_rsSearch, $connector) or die(mysql_error());
$row_rsSearch=mysql_fetch_assoc($rsSearch);
$totalRows_rsSearch=mysql_num_rows($rsSearch);
?>
</td>
</tr>
</table> </TD>
</TR>
<TR>
<TD height="152" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td valign="top" background="images/icon-find.gif"><!--DWLayoutEmptyCell--> </td>
<td height="29" colspan="2" valign="middle"><span class="style81">รายการห้องพัก
</span></td>
</tr>
<tr>
<td width="28" valign="middle"><div align="center"><img src="images/cal.gif" width="16" height="16"></div></td>
<td width="752" height="19" colspan="2" valign="middle"><span class="style81">ช่วงเวลา</span></td>
</tr>
<tr>
<td height="94" colspan="3" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="780" height="123" valign="top"><table width="100%" height="123" cellpadding="2" cellspacing="1" class="d3" summary="">
<tr>
<td bgcolor="#41729e" class="ne"> </td>
<td bgcolor="#41729e" class="ne"><div align="center"><strong>ประเภทห้องพัก</strong></div></td>
<td bgcolor="#41729e" height="30" class="ne"><div align="center"><strong>หมายเลขห้องพัก</strong></div></td>
<td bgcolor="#41729e" class="ne"><div align="center"><strong>ราคาห้องพัก</strong></div></td>
<td bgcolor="#41729e" class="ne"><div align="center"><strong>เลือก</strong></div></td>
</tr>
<? while ($row_rsSearch=mysql_fetch_assoc($rsSearch));{?>
<tr>
<td bgcolor="#ffffff" width="17" class="ne"><img src="images/bullet-news.gif" width="10" height="10"></td>
<td bgcolor="#ffffff" width="408" class="ne"><? echo $row_rsSearch['roomtype.roomtype_name'];?> </td>
<td bgcolor="#ffffff" width="134" height="33" class="ne"><? echo $row_rsSearch['room.room_id'];?></td>
<td bgcolor="#ffffff" width="134" class="ne"><? echo $row_rsSearch['roomdetail.price'];?></td>
<td bgcolor="#ffffff" width="59" class="ne"><div align="center">
<input type="checkbox" name="checkbox" id="checkbox">
</div></td>
</tr>
<? } ?>
<tr>
<td bgcolor="#0db6cf" height="20" class="ne" colspan="5"> <b>: . </b><span class="style105"><span class="style104">-- </span></span><span class="style107">--</span></td>
</tr>
<tr>
<td bgcolor="#0db6cf" height="30" class="ne" colspan="5"><div align="center">
<button type="submit" name="reserv" id="reserv" ><img src="images/imagesm.jpeg" width="20" height="20" align="absmiddle" />จองห้องพัก</button>
</div></td>
</tr>
</table></td>
</tr>
</table> </td>
</tr>
</table>
</TD>
</TR>
<TR>
<TD height="211" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="780" height="166" valign="top" bgcolor="#ddeeff"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/bg_shade_instant.jpg">
<!--DWLayoutTable-->
<tr>
<td height="39" background="images/bg_shade_instant.jpg"><div align="center" class="style68"><img src="images/light_blue.gif" width="12" height="12"> บริการจองโรงแรม ที่พัก ในประเทศไทย <img src="images/light_blue.gif" width="12" height="12"></div></td>
</tr>
<tr>
<td height="31"><table width="100%" border="0" background="images/foot_bg.gif">
<tr>
<td><div align="center"><span class="style32"><strong>Copyright ? 2009 www.Allresortthailand.com All rights reserved</strong><br>
AllresortThailand.com is a registered travel agent with the Tourism Authority of Thailand.</span></div></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/bg_shade_instant.jpg">
<tr>
<td width="23%" height="122"><div align="center">
<input type="image" name="imageField2" id="imageField2" src="images/amazingthailand.gif">
</div></td>
<td width="53%"><table style="border: 1px solid rgb(193, 210, 226);" align="center" border="0" cellpadding="0" cellspacing="0" width="92%" height="68">
<tbody>
<tr>
<td style="font-family: MS sans serif; font-size: 13px;" align="center" bgcolor="#eef7ff" height="34">ยินดีรับบัตรเครดิต <img src="images/icf_visa.gif" title="Visa Card" alt="Visa Card" align="absmiddle" width="31" height="19" hspace="5"> <img src="images/icf_master.gif" title="Master Card" alt="Master Card" align="absmiddle" width="32" height="20" hspace="5"> <img src="images/icf_m.gif" title="Amarican Express" alt="Amarican Express" align="absmiddle" width="37" height="20" hspace="5"> <a href="http://www.hotelsthailand.com/mpay.cfm" title="M-pay"><img src="images/lg_mpay.gif" alt="m-PAY" align="absmiddle" border="0" width="32" height="32" hspace="5"></a><a href="http://www.hotelsthailand.com/payment/counter-service.cfm" title="M-pay"><img src="images/counter-service-s.gif.jpeg" alt="Counter Service" align="absmiddle" border="0" width="49" height="32" hspace="5"> </a></td>
</tr>
<tr>
<td style="font-family: MS sans serif; font-size: 13px;" align="center" bgcolor="#eef7ff" height="34"><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','152','height','17','src','flash/248','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','flash/248' ); //end AC code
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="152" height="17">
<param name="movie" value="flash/248.swf">
<param name="quality" value="high">
<embed src="flash/248.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="152" height="17"></embed>
</object>
</noscript></td>
</tr>
</tbody>
</table></td>
<td width="24%"><div align="center">
<input type="image" name="imageField6" id="imageField6" src="images/etourism.gif">
</div></td>
</tr>
</table></td>
</tr>
</table></TD>
</TR>
</TABLE>
<blockquote> </blockquote>
</BODY>
</html>
Tag : - - - -
|
|
|
|
|
|
Date :
2009-10-21 14:18:13 |
By :
giroo |
View :
1315 |
Reply :
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
พี่ทำเว็บจองโรงแรมเหมือนผมเลยอะ
แต่ของผมนี่ยังไม่ได้ทำ Check In Check Out เลย กำลังหาข้อมูลเกี่ยวกับเรื่องเวลาอะครับ
ขอถามหน่อยนะครับว่า ปฏิธินของพี่นี่ถ้าคลิกเรื่องวันแล้ว มันจะ โชว์ ใน Text Box เลยป่ะครับพี่
ผมอยากทำแบบนี้บ้าง พอจะมีตัวอย่างโค้ดบ้างมะครับ
ขอบคุณมากครับผม
|
|
|
|
|
Date :
2009-12-23 12:02:41 |
By :
gungrave |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|