Pavilion";break; case "dlx" : $typeCheck = "2";$data="Deluxe";break; case "sup" : $typeCheck = "3";$data="Supiroir";break; case "std" : $typeCheck = "4";$data="Standard";break; default : $sql = "";$data="";break; } for($i=1;$i<=getTotalDay($m,$y);$i++){ if($i < 9){ $varDate = "0".$i; }else{ $varDate = $i; } if($m < 9){ $varMonth = "0".$m; }else{ $varMonth = $m; } $dateCheck = $y."-".$varMonth."-".$varDate; $dateToo = date('Y-m-d', strtotime('+1 day', strtotime($dateCheck))) ; $tmpconvCheck = strtotime($dateCheck); $dCheck = intval(date('d',$tmpconvCheck)); $mCheck = intval(date('m',$tmpconvCheck)); $yCheck = intval(date('Y',$tmpconvCheck)); $sql = "SELECT b$dCheck as limit_booking FROM booking_web_monthly WHERE book_type='$typeCheck' AND book_month='$mCheck' AND book_year='$yCheck';"; $query = mysql_query($sql); $row = mysql_fetch_assoc($query); $limitRoom = $row["limit_booking"]; $pavRoom = array(); $dlxRoom = array(); $supRoom = array(); $stdRoom = array(); $tmpARoom = getCheckAvaliableRooms("33",$dateCheck,$dateToo); $tmpData = explode(",",$tmpARoom); foreach($tmpData as $datass){ if($datass > 0 && $datass < 7){ $pavRoom[] = $datass; }else if($datass > 6 && $datass < 23){ $dlxRoom[] = $datass; }else if($datass > 22 && $datass < 39){ $supRoom[] = $datass; }else if($datass > 38 && $datass < 49){ $stdRoom[] = $datass; } } $count = 0; switch($type){ case "pav" : $count = count($pavRoom);break; case "dlx" : $count = count($dlxRoom);break; case "sup" : $count = count($supRoom);break; case "std" : $count = count($stdRoom);break; default : $count = 0;break; } if($count <= $limitRoom){ $flag="red.png"; }else{ $flag="green.png"; } $avaliable = $count; if($avaliable < $limitRoom){ $Classavaliable = "red"; }else{ $Classavaliable = "normal"; } if($i < $today){ $style = ''; }else{ $style=''; } $data .= ''.$style.''; } return $data; } ?>
";break; case "2" : $rooms = genRoom("7","22");$totalRoom = "16";$count = count($dlxRoom);$data="";break; case "3" : $rooms = genRoom("23","38");$totalRoom = "16";$count = count($supRoom);$data="";break; case "4" : $rooms = genRoom("39","48");$totalRoom = "10";$count = count($stdRoom);$data="";break; default : $sql = "";$data="";break; } $avaliable = $count; if($avaliable < $limitRoom){ $check_avaliable = "0"; }else{ $check_avaliable = "1"; } if($check_avaliable == "0"){ echo "
".$bookfrom." Room Is not Avaliable Now
Please Contact Reservation at +66 76-224-439 or banraya_reservation@hotmail.com For More Information

"; $disabled = "disabled"; }else{ $disabled = ""; } ?>

1 && $datass < 7){ $pavRoom[] = $datass; }else if($datass > 6 && $datass < 23){ $dlxRoom[] = $datass; }else if($datass > 22 && $datass < 39){ $supRoom[] = $datass; }else if($datass > 38 && $datass < 49){ $stdRoom[] = $datass; } } $count = 0; switch($id){ case "1" : $rooms = genRoom("1","6");$totalRoom = "6";$count = count($pavRoom);$data="
PavilionDeluxeSupiroirStandard