assign('idristorante', $_GET['i']); $_SESSION['i'] = $_GET['i']; $smarty->assign('logged', false); if($_SESSION['user']>0){ $smarty->assign('logged', true); $smarty->assign('utente', $_SESSION['user']); $smarty->assign('login', $_SESSION['login']); $utente = $_SESSION['user']; if(isset($_GET['i']) && $_GET['i']>0){ include('formFeedback.php'); } } if(isset($_GET['i']) && $_GET['i'] > 0){ $smarty->assign('slide', $ristoranti->slideEsiste($_GET['i'])); $smarty->assign('dettRist', $ristoranti->selRistoranteById($_GET['i'])); $smarty->assign('ser', $ristoranti->selServiziById($_GET['i'])); $smarty->assign('gallery', $ristoranti->selGalleryById($_GET['i'])); $smarty->assign('elencoSlide', $ristoranti->elencoImmaginiSlideshow($_GET['i'])); $smarty->assign('feedback', $ristoranti->getFeedbackById($_GET['i'])); $smarty->assign('news', $news->selNewsPub()); $smarty->assign('corpo', 'corpodettaglioristorante.html'); }else{ if(isset($_GET['s'])){ switch($_GET['s']){ case '1': //inserimento utente include('formRegistrazione.php'); // $smarty->assign('formRegistrazione', 'formRegistrazione.html'); break; case '2': //autentiecazione utente include('area_riservata.php'); $smarty->assign('corpo', 'conferma.html'); break; case '3': //password dimenticata include('recupera_password.php'); break; case '4': // recuopera passwor $smarty->assign('corpo', 'recupera_password.html'); break; case '5': //post ricerca combo $smarty->assign('elencoRistoranti', $ristoranti->ricerca($_POST)); $smarty->assign('corpo', 'elencoRistoranti.html'); $smarty->assign('news', $news->selNewsPub()); $smarty->assign('elencoRistorantitopten', $ristoranti->selElencoRistorantiAttivitopten()); break; case '6': //post ricerca parole chiave $smarty->assign('elencoRistoranti', $ristoranti->ricercaParole($_POST)); $smarty->assign('news', $news->selNewsPub()); $smarty->assign('elencoRistorantitopten', $ristoranti->selElencoRistorantiAttivitopten()); $smarty->assign('corpo', 'elencoRistoranti.html'); break; case '7': //utente loggato $smarty->assign('elencoSlide', $ristoranti->elencoImmaginiSlideshow($_GET['i'])); $smarty->assign('titolo', 'trova ristorante'); $smarty->assign('elencoRistoranti', $ristoranti->selElencoRistorantiAttivi()); $smarty->assign('elencoRistorantitopten', $ristoranti->selElencoRistorantiAttivitopten()); $smarty->assign('news', $news->selNewsPub()); $smarty->assign('elencoRistoranti', $ristoranti->selElencoRistorantiAttivi()); $smarty->assign('news', $news->selNewsPub()); $smarty->assign('corpo', 'elencoRistoranti.html'); include('loginUtente.php'); break; case '8': $smarty->assign('elencoRistoranti', $ristoranti->riservaEnoteche()); $smarty->assign('news', $news->selNewsPub()); $smarty->assign('corpo', 'elencoRistoranti.html'); $smarty->assign('elencoRistorantitopten', $ristoranti->selElencoRistorantiAttivitopten()); break; case '9': $smarty->assign('elencoRistoranti', $ristoranti->riservaRomantico()); $smarty->assign('news', $news->selNewsPub()); $smarty->assign('corpo', 'elencoRistoranti.html'); $smarty->assign('elencoRistorantitopten', $ristoranti->selElencoRistorantiAttivitopten()); break; case '10': $smarty->assign('elencoRistoranti', $ristoranti->riservaPlateatico()); $smarty->assign('news', $news->selNewsPub()); $smarty->assign('corpo', 'elencoRistoranti.html'); $smarty->assign('elencoRistorantitopten', $ristoranti->selElencoRistorantiAttivitopten()); break; case '11': $smarty->assign('elencoRistoranti', $ristoranti->vistaEccezionale()); $smarty->assign('news', $news->selNewsPub()); $smarty->assign('corpo', 'elencoRistoranti.html'); $smarty->assign('elencoRistorantitopten', $ristoranti->selElencoRistorantiAttivitopten()); break; case '12': $smarty->assign('elencoRistoranti', $ristoranti->riservaVini()); $smarty->assign('news', $news->selNewsPub()); $smarty->assign('corpo', 'elencoRistoranti.html'); $smarty->assign('elencoRistorantitopten', $ristoranti->selElencoRistorantiAttivitopten()); break; case '13': //recupera password include('recuperaPassword.php'); //$smarty->assign('corpo', 'recuperaPassowrd.html'); break; case '14': $smarty->assign('feedback', $ristoranti->getFeedback($utente)); $smarty->assign('preferiti', $ristoranti->getPreferiti($utente)); $smarty->assign('corpo', 'paginaUtente.html'); break; case '20': //pagina news testata $smarty->assign('news', $news->selNewsPub()); $smarty->assign('corpo', 'newstestata.html'); break; case '21': //pagina help testata $smarty->assign('news', $news->selNewsPub()); $smarty->assign('corpo', 'helpmetestata.html'); break; case '22': //pagina help testata $smarty->assign('news', $news->selNewsPub()); $smarty->assign('corpo', 'ristoratoritestata.html'); break; case '23': //pagina help testata $smarty->assign('news', $news->selNewsPub()); $smarty->assign('corpo', 'feedbacktestata.html'); break; case '24': //pagina help testata $smarty->assign('news', $news->selNewsPub()); $smarty->assign('corpo', 'contattitestata.html'); break; case '40': //pagina video promo $smarty->assign('news', $news->selNewsPub()); $smarty->assign('corpo', 'videopromo.html'); break; case '25': //pagina credits $smarty->assign('news', $news->selNewsPub()); $smarty->assign('corpo', 'credits.html'); break; case '26': //pagina legal $smarty->assign('news', $news->selNewsPub()); $smarty->assign('corpo', 'legal.html'); break; case '27': //pagina privacy $smarty->assign('news', $news->selNewsPub()); $smarty->assign('corpo', 'privacy.html'); break; case '30': //pagina privacy $smarty->assign('news', $news->selNewsPub()); $smarty->assign('corpo', 'ricercamappa.html'); break; case '31': $smarty->assign('newsDett', $news->getNewsById($_GET['n'])); $smarty->assign('corpo', 'dettaglioNews.html'); break; default: $smarty->assign('elencoSlide', $ristoranti->elencoImmaginiSlideshow($_GET['i'])); $smarty->assign('titolo', 'trova ristorante'); $smarty->assign('elencoRistoranti', $ristoranti->selElencoRistorantiAttivi()); $smarty->assign('elencoRistorantitopten', $ristoranti->selElencoRistorantiAttivitopten()); $smarty->assign('news', $news->selNewsPub()); $smarty->assign('corpo', 'elencoRistoranti.html'); break; } } } $smarty->assign('bannerAlto', $ristoranti->selBannerAlto()); $smarty->assign('bannerLato', $ristoranti->selBannerLato()); $smarty->assign('tipologia', $ristoranti->selTipologiaPerRicerca()); $smarty->assign('tipoCucina', $ristoranti->selTipiCucinaPerRicerca()); $smarty->assign('servizi', $ristoranti->selServiziPerRicerca()); $smarty->assign('ambiente', $ristoranti->selAmbientePerRicerca()); $smarty->assign('comune', $ristoranti->selComunePerRicerca()); $smarty->assign('fasceprezzo', $ristoranti->selFasciaPrezzoRicerca()); $smarty->display('index.html'); ?>