<? session_start(); if(!isset($username)){ require_once("../include/headermember2.php"); require_once("../include/check_data.php"); require_once("../include/connect_db.php"); require_once("../include/function.php"); header_member2("::: ระบบการจองตั๋วออนไลน์ :::"); $count=0; $bus_code = $_GET["bus_code"]; $rootcode = $_GET["rootcode"]; $Day_name = $_GET["Day_name"]; // การติดต่อฐานข้อมูลละ SQL $conn = connect_db("busdb"); if(!$conn) echo "<center><b class='red'>เกิดความผิดพลาดไม่สามารถติดต่อกับฐานข้อมูลได้</b></bcenter>"; /* $sql="SELECT* FROM tbltimebus LEFT JOIN tblrootbus ON (tbltimebus.Bus_Id=tblrootbus.Root_Id) LEFT JOIN tblday ON (tblrootbus.Root_Id=tblday.Day_Id) "; */ $sql2 = "select Station_to from tblrootbus where root_code= '$rootcode' "; $result2 = mysql_query($sql2); $row2 = mysql_fetch_array($result2); $Station_to = $row2["Station_to"]; $sql = "select * from tbltimebus where rootcode= '$rootcode' and bus_code='$bus_code' "; $result = mysql_query($sql); $row = mysql_fetch_array($result); $Timeout = $row["Timeout"]; } ?> <title>Untitled Document</title> <script type="text/javascript"> var cb_count = 0; function check(e) { if(e.checked==true) cb_count=++cb_count; else cb_count=--cb_count; if(cb_count>2) { alert(" User 1 ท่านสามารถเลือกได้ 2 ที่นั่งคุณเลือกที่นั่งเกิน 2 ที่นั่งแล้ว"); e.checked = false; return false; } return true; } </script> <LINK href='template.css' type='text/css' rel='stylesheet'><CENTER> </head> <body> <br> <br /> <form method="GET" action="repostregister_from.php"> <table width="448" border="0" align="center" cellpadding="0" cellspacing="0"> <tr bgcolor="#003366"> <td colspan="4" align="center" bgcolor="#FFFFFF"><font class="blue">วันที่รถออก : <b class='red'> <?php echo "$Day_name";?></b></font></td> </tr> <tr bgcolor="#003366"> <td colspan="4" align="center" bgcolor="#FFFFFF"><font class="blue">สถานีต้นทาง - ปลายทาง : <b class='red'> <?php echo "$Station_to";?></b></font></td> </tr> <tr bgcolor="#003366"> <td colspan="4" align="center" bgcolor="#FFFFFF"><font class="red">ประเภทรถโดยสาร : ปรับอากาศ ชั้น 1 <b class='red'> <?php echo "$Type";?> </b></font></td> </tr> <tr> <td align="center"><font class="blue">เวลาเดินทาง : <b class='red'></b></font> <font class="blue"><b class='red'><?php echo "$Timeout";?></b></font></td> </tr> <tr> <td align="center"><font class="bigblue">แผนผังที่นั่งบนรถ / Bus Plan</b></font></td> </tr> <tr> <td><img src="../images/ko.jpg" width="458" height="42" /></td> </tr> </table> <table width="460" height="338" border="1" align="center" cellpadding="0" cellspacing="2" bordercolor="#0099FF"> <tr> <td colspan="5" bgcolor="#0066FF"align="center"><b class='white'>ห้องพนักงานขับรถ Driver's / Room</b></td> </tr> <tr bgcolor="#CBDCE7"> <td width="98" class="style1" align="center"><input type="checkbox" name="Number" value="A1" onClick="check(this)"/>A1</td> <td width="98" class="style1"align="center"><input type="checkbox" name="Number" value="B1" onClick="check(this)"/>B1</td> <td width="27" bgcolor="#00FFFF" class="style1"></td> <td width="98" class="style1"align="center"><input type="checkbox" name="Number" value="C1" onClick="check(this)"/>C1</td> <td width="98" class="style1"align="center"><input type="checkbox" name="Number" value="D1" onClick="check(this)"/>D1</td> </tr> <tr bgcolor="#CBDCE7"> <td width="98" class="style1" align="center"><input type="checkbox" name="Number" value="A2" onClick="check(this)"/>A2</td> <td width="98" class="style1"align="center"><input type="checkbox" name="Number" value="B2" onClick="check(this)"/>B2</td> <td width="27" bgcolor="#00FFFF" class="style1"></td> <td width="98" class="style1"align="center"><input type="checkbox" name="Number" value="C2" onClick="check(this)"/>C2</td> <td width="98" class="style1"align="center"><input type="checkbox" name="Number" value="D2" onClick="check(this)"/>D2</td> </tr> <tr bgcolor="#CBDCE7"> <td width="98" class="style1" align="center"><input type="checkbox" name="Number" value="A3" onClick="check(this)"/>A3</td> <td width="98" class="style1"align="center"><input type="checkbox" name="Number" value="B3" onClick="check(this)"/>B3</td> <td width="27" bgcolor="#00FFFF" class="style1"></td> <td width="98" class="style1"align="center"><input type="checkbox" name="Number" value="C3" onClick="check(this)"/>C3</td> <td width="98" class="style1"align="center"><input type="checkbox" name="Number" value="D3" onClick="check(this)"/>D3</td> </tr> <tr bgcolor="#CBDCE7"> <td width="98" class="style1" align="center"><input type="checkbox" name="Number" value="A4" onClick="check(this)"/>A4</td> <td width="98" class="style1"align="center"><input type="checkbox" name="Number" value="B4" onClick="check(this)"/>B4</td> <td width="27" bgcolor="#00FFFF" class="style1"></td> <td width="98" class="style1"align="center"><input type="checkbox" name="Number" value="C4" onClick="check(this)"/>C4</td> <td width="98" class="style1"align="center"><input type="checkbox" name="Number" value="D4" onClick="check(this)"/>D4</td> </tr> <tr bgcolor="#CBDCE7"> <td width="98" class="style1" align="center"><input type="checkbox" name="Number" value="A5" onClick="check(this)"/>A5</td> <td width="98" class="style1"align="center"><input type="checkbox" name="Number" value="B5" onClick="check(this)"/>B5</td> <td width="27" bgcolor="#00FFFF" class="style1"></td> <td width="98" class="style1"align="center"><input type="checkbox" name="Number" value="C5" onClick="check(this)"/>C5</td> <td width="98" class="style1"align="center"><input type="checkbox" name="Number" value="D5" onClick="check(this)"/>D5</td> </tr> <tr bgcolor="#CBDCE7"> <td width="98" class="style1" align="center"><input type="checkbox" name="Number" value="A6" onClick="check(this)"/>A6</td> <td width="98" class="style1"align="center"><input type="checkbox" name="Number" value="B6" onClick="check(this)"/>B6</td> <td width="27" bgcolor="#00FFFF" class="style1"></td> <td width="98" class="style1"align="center"><input type="checkbox" name="Number" value="C6" onClick="check(this)"/>C6</td> <td width="98" class="style1"align="center"><input type="checkbox" name="Number" value="D6" onClick="check(this)"/>D6</td> </tr> <tr bgcolor="#CBDCE7"> <td width="98" class="style1" align="center"><input type="checkbox" name="Number" value="A7" onClick="check(this)"/>A7</td> <td width="98" class="style1"align="center"><input type="checkbox" name="Number" value="B7" onClick="check(this)"/>B7</td> <td width="27" bgcolor="#00FFFF" class="style1"></td> <td width="98" class="style1"align="center"><input type="checkbox" name="Number" value="C7" onClick="check(this)"/>C7</td> <td width="98" class="style1"align="center"><input type="checkbox" name="Number" value="D7" onClick="check(this)"/>D7</td> </tr> <tr bgcolor="#CBDCE7"> <td width="98" class="style1" align="center"><input type="checkbox" name="Number" value="A8" onClick="check(this)"/>A8</td> <td width="98" class="style1"align="center"><input type="checkbox" name="Number" value="B8" onClick="check(this)"/>B8</td> <td width="27" bgcolor="#00FFFF" class="style1"></td> <td width="98" class="style1"align="center"><input type="checkbox" name="Number" value="C8" onClick="check(this)"/>C8</td> <td width="98" class="style1"align="center"><input type="checkbox" name="Number" value="D8" onClick="check(this)"/>D8</td> </tr> <tr> <td colspan="5" bgcolor="#0066FF"align="center"><b class='white'>ห้องสุขา / Toilet</b></td> </tr> <tr> <td height="26" colspan="5" valign="top" bgcolor="#82D2D2" align="center"> <a href="repostregister_from.php? bus_code=<?=$row["Bus_code"]?> &rootcode=<?=$row["rootcode"]?> &Day_name=<?= $Day_name;?> &Type=<?=$row["Type"]?> &Timeout=<?=$row["Timeout"]?> &Number=<? $row["Nubmer"]; ?> ">เลือกเวลาเดินทาง</a></td> </tr> </table> </form> <? require_once("../include/footermember.php"); ?>
$getorder = " SELECT * FROM tbltourbus WHERE Number='$Number' "; $resultorder = mysql_query($getorder)or die(mysql_error()); $order_arr = array(); while($ro=mysql_fetch_assoc($resultorder)) { $order_arr[] = $ro['Number1']; }
<? $Number = "A1" ; if($Number=="A1"){ ?> <td width="80" height="40" align="center" bgcolor="#FFFF00">จองแล้ว</td> <? }else{ ?> <td width="98" class="style1" align="center"><input type="checkbox" name="Number" value="A1" onClick="check(this)"/>A1</td> <? }?>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง