ion=pjActionSearch&listing_search=1&date_from=" .$_REQUEST['date_from']. "&date_to=" .$_REQUEST['date_to']. "&hotel=" .$_REQUEST['hotel']. "&adults_from=" .$_REQUEST['adults_from']. "&children_from=" .$_REQUEST['children_from']."&type_id=" .$type_id. "&address_city=".$_REQUEST['address_city'].""; } //Ricava tutte le immagini relative allo slideshow per la testata. //Mischia l'array risultante e prende le prime 3 immagini che comporranno lo slideshow. $slideshow = array(); $slideshow = get_header_slideshow(); shuffle($slideshow); $_SLIDESHOW_HEADER = array(); if(sizeof($slideshow)>0){ $_SLIDESHOW_HEADER = array($slideshow[0], $slideshow[1], $slideshow[2]); } $_ALLTAGS = get_all_tags(); $_ALLCAT = get_all_categories(); // inizializzazione delle template Smarty $smarty = new SmartyBC(); $smarty->assign('SLIDESHOW',$slideshow); // template di base $smarty->template_dir = SMARTY_TEMPLATES; $smarty->compile_dir = SMARTY_COMPILE; // inizializzo le template con il layout del reseller, se presente if ($layout) { if (is_dir(SMARTY_TEMPLATES_RESELLERS.$layout)) { $smarty->template_dir = SMARTY_TEMPLATES_RESELLERS.$layout; $smarty->compile_dir = SMARTY_TEMPLATES_RESELLERS.$layout.'/compiled/'; } } $smarty->config_dir = SMARTY_CONFIG; $smarty->cache_dir = SMARTY_CACHE; $smarty->plugins_dir[] = SMARTY_PLUGINS; //$smarty->clearAllcache(); //Plug-ins include SMARTY_PLUGINS.'function.allegati.php'; $smarty->registerPlugin("function","allegati","smarty_function_allegati"); include SMARTY_PLUGINS.'function.rentallisting.php'; $smarty->registerPlugin("function","rentallisting","smarty_function_rentallisting"); $jsonToFile = array(); foreach($_ALLTAGS as $tag_tr){ //Tutte le pagine di ogni TAG $all = strtoupper($tag_tr) ."_ALL"; $$all = get_tag_category_list('tag_tr', $tag_tr, 2); $jsonToFile[$all] = $$all; $smarty->assign($all,$$all); } // file_put_contents($_SERVER['DOCUMENT_ROOT'].'/alltags_'.$lingua.'.json', json_encode($jsonToFile)); foreach(array_unique($_ALLCAT) as $tag_cat){ //tutte le pagine di una categoria di tag $cat = strtoupper($tag_cat) ."_CAT"; $$cat = get_tag_category_list('categoria', $tag_cat); $smarty->assign($cat,$$cat); //tutti i tag del sito appartenenti ad una categoria $cattag = strtoupper($tag_cat) ."_CATTAG"; $$cattag = get_tags(-1,true,'categoria',$tag_cat); $smarty->assign($cattag,$$cattag); } $smarty->assign("ALLCAT",$_ALLCAT); $smarty->assign('lingua',$lingua); $smarty->assign('pagina',$pagina); $smarty->assign('idlingua',$idlingua); $smarty->assign('idpagina',$idpagina); $smarty->assign('baselink',$baselink); $smarty->assign('template',$template); $smarty->assign('classelingua',$classelingua); $smarty->assign('TAGS',$_TAGS); $smarty->assign('VALUTE',$_VALUTE); $smarty->assign('LABELS',$_LABELS); $smarty->assign('PAGINA',$_PAGINA); $smarty->assign('ALLTAGS',$_ALLTAGS); $smarty->assign('LINK_SEARCH',$_LINK_SEARCH); $smarty->assign('CORRELATE',$_CORRELATE); $smarty->assign('LINK_LINGUE',$_LINK_LINGUE); $smarty->assign('SLIDESHOW_HEADER',$_SLIDESHOW_HEADER); $smarty->assign('ID_HOMEPAGE',ID_HOMEPAGE); $smarty->registerPlugin("modifier",'link', 'linktopage'); if (isset($_ALLCAT)) { $smarty->assign('ALLCAT',$_ALLCAT); } // mostriamo finalmente la pagina $smarty->display($template); // chiudiamo la connessione con il database mysql_close($dblink); ?>