$passengerListObjectRoom2 = new PassengerListObject($numAdultsRoom2, $childArrayRoom2); $totalPassengers = $passengerListObjectRoom1->totalPassengers + $passengerListObjectRoom2->totalPassengers; } $numHotelsPerPage = @$_GET['numHotelsPerPage']; if (empty($numHotelsPerPage)) { $numHotelsPerPage = DEFAULT_HOTELS_PER_PAGE; } $pageIndex = @$_GET['pageIndex']; if (empty($pageIndex)) { $pageIndex = 1; } $hotelListXML = ""; $areaCodeXml = ""; if (!empty($hotelList)) { //PHP doesn't proper parse if the GET string has duplicate named params. Below fixes and puts into array $properQueryParse = proper_parse_str($_SERVER['QUERY_STRING']); $hotelListArray = $properQueryParse["hotelList"]; $logSearchString .= " Hotel List:"; $hotelListXML = "\t\t\t\t\t\t<HotelList>"; if (is_array($hotelListArray)) { foreach ($hotelListArray as $hotelCode) { $hotelListXML .= "\t\t\t\t\t\t\t<HotelCode>{$hotelCode}</HotelCode>\n"; if (LOG_SEARCHES) { $logSearchString .= $hotelCode . "|"; } } } else { $hotelListXML .= "\t\t\t\t\t\t\t<HotelCode>{$hotelList}</HotelCode>\n"; if (LOG_SEARCHES) { $logSearchString .= $hotelList; }
<?php // Change these configuration options if needed, see above descriptions for info. $enable_jsonp = false; $enable_native = false; $valid_url_regex = '/.*/'; // ############################################################################ $queryString = proper_parse_str($_SERVER['QUERY_STRING']); $thePage = $queryString["page"]; $passedQueryString = "?"; $firstRun = true; foreach ($queryString as $paramName => $queryParam) { if ($paramName != "page") { if (is_array($queryParam)) { foreach ($queryParam as $queryArrayItem) { $passedQueryString .= ($firstRun ? "" : "&") . $paramName . "=" . $queryArrayItem; if ($firstRun) { $firstRun = false; } } } else { $passedQueryString .= ($firstRun ? "" : "&") . $paramName . "=" . $queryParam; } if ($firstRun) { $firstRun = false; } } } $url = $thePage . $passedQueryString; if (!$url) { // Passed url not specified.