Exemple #1
0
     $smarty->assign("lugares", $lugares);
 } else {
     $smarty->assign("lugares", false);
 }
 $himages = getAllHotelImages($hotel->id, true);
 $images = array();
 foreach ($himages as $image) {
     if ($image->nombre && strlen(trim($image->nombre))) {
         array_unshift($images, $image);
     } else {
         array_push($images, $image);
     }
 }
 $smarty->assign('images', $images);
 if ($hotel->destinoId) {
     $imagesDestino = getAllDestinoImages($hotel->destinoId);
     $smarty->assign('imagesDestino', $imagesDestino);
 }
 $servicios = getAllHotelServicios($hotel->id);
 $smarty->assign('servicios', $servicios);
 $condiciones = getAllHotelCondiciones($hotel->id);
 $smarty->assign('condiciones', $condiciones);
 $logotipo = getHotelLogotipo($hotel->id);
 $smarty->assign('logotipo', $logotipo);
 $faq = getFaq(1);
 $contenido = json_decode($faq->contenido);
 $smarty->assign("contenido", $contenido->{$lang_set});
 if ($hotel->config->id) {
     $productos = getProductosFullByConfiguracionId($hotel->config->id, 5, true);
     if ($productos && is_array($productos) && count($productos) > 0) {
         $smarty->assign('excursiones', $productos);
Exemple #2
0
} else {
    if (strcmp($action, 'eliminar') == '0') {
        if (isset($_POST['id'])) {
            $id = $_POST['id'];
            $eliminar = deleteDestino($id);
            if ($eliminar) {
                $result['msg'] = 'ok';
                $result['data'] = 'Se eliminó el destino';
            } else {
                $result['data'] = 'No se pudo eliminar el destino';
            }
        }
    } else {
        if (strcmp($action, "getFotos") == 0) {
            if (isset($_POST['idDestino'])) {
                $adjuntos = getAllDestinoImages($_POST['idDestino']);
                if ($adjuntos) {
                    $smarty->assign('adjuntos', $adjuntos);
                    $html = $smarty->fetch('admin/hotel/fotos.tpl');
                    $smarty->assign('adjuntos', $adjuntos);
                    $result['msg'] = 'ok';
                    $result['data'] = 'Adjuntos encontrados';
                    $result['html'] = $html;
                } else {
                    $result['msg'] = 'ok';
                    $result['data'] = 'Adjuntos no encontrados';
                    $result['html'] = '<h1 class="text-center">Destino no cuenta con adjuntos<br />Click aquí para continuar</h1>';
                }
            }
        } else {
            if (strcmp($action, "deleteFoto") == 0) {