Thailand Hotel Booking
province as $province) { $sel = $province->province_id == $pv ? “selected” : “”;
if (trim($province->reggroup) <> $opt && $opt) echo “\n”;
if (trim($province->reggroup) <> $opt) { echo “\n”;
}
}
$partner = “runthailand.com”;
$defcur = $_REQUEST[‘cur’] ? $_REQUEST[‘cur’] : “THB”;
$province= $_REQUEST[‘pv’] ? $_REQUEST[‘pv’] : “10”;
$location= $_REQUEST[‘loc’];
$promote=””; $sorting = “name”; $lg = “en”;
$stay = $_REQUEST[‘date11’] ? date2stay($_REQUEST[‘date11’],$_REQUEST[‘date12’],””) .”/”. date2stay($_REQUEST[‘date21’],$_REQUEST[‘date22’],””) : “”;
if ($stay)
{ $stay0 = strtr(trim($stay),”/*”,”~~”); list($d1, $d2) = explode(“~”, $stay0);
$today1 = getdate(strtotime($d1)); $today2 = getdate(strtotime($d2));
$stay = date(“Y-m-d”,strtotime($d1)).”~”.date(“Y-m-d”,strtotime($d2));
}
if (!$stay || $today[0] >= $today1[0])
{ $today1 = getdate(strtotime(“+1 days”)); $today2 = getdate(strtotime(“+2 days”));
$stay = date(“Y-m-d”,strtotime(“+1 days”)).”~”.date(“Y-m-d”,strtotime(“+2 days”));
}
$url2 = “http://th.R24.org/xmlR24.php?p=”.$partner.”&r=”.$region.”&c=”.$defcur.”&v=”.$province.”&kl=”.$location.”&s=”.$sorting.”&d=”.$stay;
$xml2 = @simplexml_load_file($url2);
?>
promote == “recommend”) ? “Recommended” : “”; ?>
availability[‘avs’] != -9) $available++; } /* foreach */ ?>