示例#1
0
       $hotel_url .= '?lang=' . $lang;*/
 $lenguajes_malos = array('de', 'it', 'fr', 'pt', 'ru');
 if (in_array($lang_set, $lenguajes_malos)) {
     $lang = 'en';
 } else {
     $lang = $lang_set;
 }
 $hotel_url .= '?lang=' . $lang;
 $coin = getMoneda($hotel->monedaId);
 $moneda = $coin->simbolo;
 $hotel_url .= '&selected_currency=' . $coin->codigo;
 $content = file_get_contents($hotel_url, false, $contexto);
 //$html = str_get_dom($content);
 //lista negra
 $blacklist = getWordsInBlacklistToRemove($hotel->id);
 $blacklistNoResults = getWordsInBlacklistToRemoveResult($hotel->id);
 //promocion por palabras clave
 $promociones = getPromocionByHotelIdAndFechas($hotel->id, $inicio, $salida);
 //$inputs = $html('#form_search input');
 $url = $hotel_url . '&';
 $notparse = array('checkin_monthday' => date('d', $inicio), 'checkin_year_month' => date('Y-m', $inicio), 'checkout_year_month' => date('Y-m', $salida), 'checkout_monthday' => date('d', $salida), 'ci_date' => date('Y-m-d', $inicio), 'co_date' => date('Y-m-d', $salida));
 /*
     Antiguo robot
     foreach ($inputs as $input) {
         if (!array_key_exists($input->name, $notparse)) {
             $url .= $input->name . '=' . urlencode($input->value) . '&';
         } else {
             $url .= $input->name . '=' . urlencode($notparse[$input->name]) . '&';
         }
     }*/
 //Para los selectores
示例#2
0
<?php

$logged = $usuario_core->validateUser();
if ($logged) {
    $usuario_core->hasAdminAccess('hotel');
    $idiomas = getAllIdiomas();
    $monedas = getAllMonedas();
    $destinos = getAllDestinos();
    $condiciones = getCondicionesByDistribuidor($usuario_core->getUsuario()->id);
    $smarty->assign('logged_user', $usuario_core->getUsuario());
    if (isset($_GET["id"])) {
        getWordsInBlacklistToRemove($_GET["id"]);
        getWordsInBlacklistToRemoveResult($_GET["id"]);
        $acceso = userCanAccessHotel($_GET["id"], $usuario_core->getUsuario()->id);
        if ($acceso) {
            $hotel = getHotelById($_GET["id"], false);
            if ($hotel->campaniaId) {
                $hotel->campania = getCampania($hotel->campaniaId);
                $hotel->dominioCampania = $hotel->campania->subdominio;
            }
            if ($hotel->idiomas && count($hotel->idiomas)) {
                foreach ($hotel->idiomas as $i) {
                    foreach ($idiomas as $idioma) {
                        if ($idioma->id == $i->id) {
                            $idioma->selected = true;
                        }
                    }
                }
            }
            if ($hotel->monedas && count($hotel->monedas)) {
                foreach ($hotel->monedas as $m) {