include_once("core/config.php"); include("core/functions.php"); /************************************ CODICE PAGINAZIONE *************************************/ $url=curpageurl(); if(isset($_POST['results_per_page'])){ header( 'Location: '.$basepath.'crociere/'.$_POST['results_per_page'].'/' ); } $page=(int)(!isset($_GET["page"]) ? 1 : $_GET["page"]); if ($page <= 0) $page = 1; if(!isset($_GET['results_per_page'])){ $per_page=$_SESSION['per_page']; }else{ $_SESSION['per_page']=$_GET['results_per_page']; $per_page=$_SESSION['per_page']; } if(!isset($_GET['order_by'])){ $order_by=$_SESSION['ordina']; }else{ $_SESSION['ordina']=$_GET['order_by']; $order_by=$_SESSION['ordina']; } switch($order_by) { case $order_by=="data"; $order_by_query="DATE_FORMAT(sailing_date, '%d/%m/%y')"; break; case $order_by=="prezzo"; $order_by_query="prezzo, DATE_FORMAT(sailing_date, '%d/%m/%y')"; break; } $startpoint = ($page * $per_page) - $per_page; /************************************/ //INCLUDO IL FILE DELLE QUERY include("core/cruises_queries.php"); /***********************************/ //Full url with pagination if(isset($_GET['page'])) { $url_with_pag=$url."/".$_GET['page']."/"; $page_number_title="- Pagina ".$_GET['page']; }else{ $url_with_pag=$url."/"; $page_number_title=""; } $_SESSION['referrer_page']=$url_with_pag; //Find the page keywords $keywords_find=mysqli_query($link_cruises,$query)or die(mysqli_error($link_cruises)); while($keywords=mysqli_fetch_assoc($keywords_find)) { $keywords_cruise[]="Offerte Crociere MSC ".$keywords['ship_name']; $keywords_cruise[]="Offerte Crociere MSC da ".strstr($keywords['port_name'],",",true); } $keywords_avoid_duplicates=array_unique($keywords_cruise); $print_keywords=implode(", ",$keywords_avoid_duplicates); ?>
