Bad Request (Invalid URL)"; exit; } } } url_xss($_SERVER['QUERY_STRING']); ///////////////////url hack////////////////////// session_start(); //////////////////getURL///////////////////////// function curPageURL() { $pageURL = 'http'; if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") { $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; } else { $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; } return $pageURL; } $url=curPageURL(); $url=str_replace("&lang=en", "", $url); $url=str_replace("&lang=gr", "", $url); $url=str_replace("&lang=al", "", $url); $url=str_replace("?lang=gr", "", $url); $url=str_replace("?lang=en", "", $url); $url=str_replace("?lang=al", "", $url); $pos=strrpos($url,"index.php"); $pos_lang=strrpos($url,"lang="); $pos_var=strrpos($url,"?"); //////////////////getURL///////////////////////// /////////////////////lang/////////////////////// if((!isset($_REQUEST['lang']))&&(isset($_SESSION['lang']))){ $_SESSION['lang']=$_SESSION['lang']; } if((!isset($_REQUEST['lang']))&&(!isset($_SESSION['lang']))){ $_SESSION['lang']='gr'; } if(isset($_REQUEST['lang'])){ $_SESSION['lang']=$_REQUEST['lang']; } $lang=$_SESSION['lang']; /////////////////////lang/////////////////////// include("admin/db.php"); //////////////////menu///////////////////// $sql="SELECT * FROM `menu` WHERE `pub`='1' ORDER BY `order` ASC "; $result=mysql_query($sql, $conn) or die(mysql_error()); $menu_num=mysql_num_rows($result); //////////////////menu///////////////////// $menu_id=$_REQUEST['menu_id']; $mod=$_REQUEST['mod']; if(!$menu_id) $menu_id=43; ?> <? if($lang=="gr") echo "Πετρόχτιστα, Κεραμοσκεπές, Πέτρινα Σπίτια στην Κρήτη - Ξυλόπετρα"; if($lang=="en") echo "Stone walls, Tile roofs, Stone houses in Crete - Xyloptetra"; if($lang=="al") echo "Mure gury, Cati, Shtepi me gure në Kretë - Xylopetra"; ?> "> ">
lang=gr"> lang=en"> lang=al">