if(isset($_COOKIE["nomobile"])){ setcookie('nomobile','',time()-1,'/','.capisanihotel.it'); } $gallery_hotel=Array( array('file'=> 'vista-Venice-albergo-1' , 'desc' => "Venice Certosa Hotel"), array('file'=> 'vista-Venice-albergo-2' , 'desc' => "Serata all'hotel"), array('file'=> 'esterno-ristorante-giorno' , 'desc' => "Ristorante"), array('file'=> 'esterno-ristorante-cena' , 'desc' => "Esterno del ristorante di sera"), ); $gallery_rooms=array( array('file'=> 'camera_01' , 'desc'=>''), array('file'=> 'camera_02' , 'desc'=>''), array('file'=> 'camera_03' , 'desc'=>''), array('file'=> 'camera_04' , 'desc'=>''), array('file'=> 'camera_05' , 'desc'=>''), array('file'=> 'camera_06' , 'desc'=>''), array('file'=> 'camera_07' , 'desc'=>''), array('file'=> 'camera_08' , 'desc'=>'') ); $imgpath="gallery"; $kind="Hotel"; if(isset($_GET["g"]) && $_GET["g"]=="camere") {$arr=$gallery_rooms; $imgpath="camere";$kind="Camere"; $anchor="rooms";} else{ $arr=$gallery_hotel; $imgpath="hotel";$kind="Hotel";$anchor="hotel";} $descr=""; $first_photo = $arr[0]['file']; $last_photo = $arr[count($arr)-1]['file']; if(isset($_GET["f"])) $file = $arr[$_GET["f"]]['file']; else $file=$arr[0]['file']; $now=1; foreach($arr as $k=>$elem){ if($file==$elem['file']){ $next_f= ($k < (count($arr)-1) ) ? $k+1 : 0; $prev_f= ($k > 1 ) ? $k-1 : count($arr)-1; $descr=$elem["desc"]; break; } } // DETECT PHONE $iphone = strpos($_SERVER['HTTP_USER_AGENT'],"iPhone"); $blackberry = preg_match("/BlackBerry/",$_SERVER['HTTP_USER_AGENT']); $android = strpos($_SERVER['HTTP_USER_AGENT'],"Android"); echo ''; ?>