$message .= "<p>Destination: " . getDestinationCity($_GET["selTo"]) . " (" . $_GET["selTo"] . ")</p>"; if ($airfareIncluded) { $message .= "<p>Departing Flight: " . $_GET["departAirline"]; if (empty($_GET["departFlightNumber"])) { $message .= "</p>"; } else { $message .= " Flight Number " . $_GET["departFlightNumber"] . "</p>"; } $message .= "<p>Return Flight: " . $_GET["returnAirline"]; if (empty($_GET["returnFlightNumber"])) { $message .= "</p>"; } else { $message .= " Flight Number " . $_GET["returnFlightNumber"] . "</p>"; } } $hotelUrl = SITE_DOMAIN . "/" . getHotelUrl($_GET["selTo"], $_GET["hotelCode"]); $hotelName = getHotelName($_GET["selTo"], $_GET["hotelCode"]); //Image format for hotel thumbnail http://www.travimp.com/images/hotel/axa/axa_see.jpg $message .= "<p>Hotel: <a href='" . $hotelUrl . "'>" . $hotelName . "</a> Room Type: " . $_GET["roomInfo"] . "</p>"; $message .= "<p><a href='" . $hotelUrl . "'><nobr><img src = 'http://www.travimp.com/images/hotel/" . strtolower(convertLongCountryCodes($_GET["selTo"])) . "/" . strtolower(convertLongCountryCodes($_GET["selTo"]) . "_" . $_GET["hotelCode"]) . ".jpg' alt='" . $hotelName . "' width='260' height='180' border='0'></nobr></a></p>"; $message .= "</div>"; $message .= "<h3>Quote to Beat</h3>"; $message .= "<div style='margin-left:20px'>"; //If otherCompanyName is empty then show the quoteProvider else show the otherCompanyName $message .= "<p>Provider: " . (empty($_GET["otherCompanyName"]) ? ucwords($_GET["quoteProvider"]) : $_GET["otherCompanyName"]) . "</p>"; $message .= "<p>Quoted Price: " . $_GET["quotedPrice"] . "</p>"; // Calculated Price $message .= "<p>Price Calculation: " . (strcmp($_GET["priceCalculation"], "perPerson") == 0 ? "Per Person" : "Total Price") . "</p>"; // Tax $message .= "<p>Taxes" . (strcmp($_GET["taxIncluded"], "yes") == 0 ? "" : " Not") . " Included</p>"; $message .= "</div>";
function ListHotelObject($countryCode_, $hotelCode_, $hotelName_, $hotelShortDescription_, $includePrices_ = true) { $countryCode_ = convertLongCountryCodes($countryCode_); $this->countryCode = $countryCode_; $this->hotelCode = $hotelCode_; $this->hotelName = ucwords(strtolower($hotelName_)); $this->hotelShortDescription = $hotelShortDescription_; //if(!file_exists("/var/www/vhosts/airtravel.com/httpdocs/atcref/atcimage2/".strtolower($this->countryCode.$hotelCode_)."_01lg.jpg")) { //$this->hotelImage = "<img src='http://www.airtravel.com/atcref/atcimage2/image-not-available.jpg' alt='.$hotelName_.' width='260' height='180' border='0'>"; //} else { $this->hotelImage = "<img src='http://www.airtravel.com/atcref/atcimage2/" . strtolower(convertLongCountryCodes($this->countryCode) . $hotelCode_) . "_01lg.jpg' alt='" . $this->hotelName . "' width='260' height='180' border='0'>"; //} if ($includePrices_) { //$this->hotelPriceForThreeDays = get_hotel_price($this->countryCode, $hotelCode_, 3, getHotelDiscount($this->countryCode, $hotelCode_)); //if(empty($this->hotelPriceForThreeDays)) { // $this->hotelPriceForSevenDays = ""; //} else { $this->hotelPriceForSevenDays = get_hotel_price($this->countryCode, $hotelCode_, 7, getHotelDiscount($this->countryCode, $hotelCode_), false); try { $this->airPriceForTrip = get_air_price_build(DEFAULT_AIR_GATEWAY, $this->countryCode, 7, AIR_DISCOUNT, false); if (!empty($this->airPriceForTrip)) { $this->airAndHotel = floatval($this->airPriceForTrip) + floatval($this->hotelPriceForSevenDays); $this->airAndHotel = money_format('%n', $this->airAndHotel); } else { $this->airAndHotel = ""; $this->hotelPriceForThreeDays = get_hotel_price($this->countryCode, $hotelCode_, 3, getHotelDiscount($this->countryCode, $hotelCode_)); } } catch (Exception $e) { error_log("errored getting air price for: {$this->countryCode} with exceptiom: {$e}"); $this->airPriceForTrip = ""; $this->hotelPriceForThreeDays = get_hotel_price($this->countryCode, $hotelCode_, 3, getHotelDiscount($this->countryCode, $hotelCode_)); } if (!empty($this->hotelPriceForSevenDays)) { $this->hotelPriceForSevenDays = money_format('%n', $this->hotelPriceForSevenDays); } //} } $this->hotelUrl = "http://" . SITE_DOMAIN . "/" . getHotelUrl($this->countryCode, $hotelCode_); }