} $mro->setPerson('2'); $mro->setDepartureDate($abreiseDate->format('Y-m-d')); $mro->setReturnDate($ruckreiseDate->format('Y-m-d')); try { if ($mro->getJourneyType() == 'FLIGHT') { echo 'index controller search flights'; $result = $sc->searchFlights($mro); if ($result != null) { // Template::searchFlightsTemplate($result, $mro); } } else { $dst = $mro->getDestination(); if (!($dst[0] == null)) { // echo 'index controller search offers'; $offers = $sc->searchOffers($mro); //var_dump($offers); if ($offers != null) { $temp = 1; $m = 0; $c = 0; for ($i = 0; $i < count($offers); $i++) { $m = $temp; $c = $temp + 1; $temp = $c + 1; $offerMro = new MixerRequestObject($mro->getCfg(), $mro->getXpwp(), $mro->getIp()); $offerMro->setParamsByArray($mro->getParamsAsArray()); $offerMro->setHotel('|' . $offers[$i]->getLc() . '|' . $offers[$i]->getUc()); $offerMro->setSource($offers[$i]->getSource()); $offerMro->setHotelGiataCode($offers[$i]->getGid()); $offerMro->setBookingCode($offers[$i]->getUc());
$mro->setParamsByArray($_GET); try { if ($mro->getJourneyType() == 'FLIGHT') { // echo 'searchFlights<br>'; echo 'index controller search flights'; //var_dump($mro); $result = $sc->searchFlights($mro); if ($result != null) { Template::searchFlightsTemplate($result, $mro); } } else { $dst = $mro->getDestination(); if (!($dst[0] == null)) { // echo 'searchOffers<br>'; echo 'index controller search offers'; $result = $sc->searchOffers($mro); if ($result != null) { Template::searchOfferTemplate($result, $mro); } } else { // echo 'searchDestination<br>'; echo 'index controller search destinations'; $result = $sc->searchDestination($mro); if ($result != null) { Template::searchDestinationTemplate($result, $mro); } } } } catch (Exception $exc) { echo '<pre>'; print_r($exc->getTraceAsString());