$pv){if($pokracovat){if($pole1[$pk]==$pole2[$pk]){unset($pole2[$pk]);}else{$pokracovat=false;}}}$uri2=implode("/",$pole2);$otaznik=strpos($uri2,"?");if($otaznik>0){$uri2=substr($uri2,0,$otaznik);}$_REQUEST["requested_html"]=$uri2;}if(isset($_REQUEST["rewrite_type"])&&$_REQUEST["rewrite_type"]=="2"){$uri=$_SERVER["REQUEST_URI"];if(strpos($_SERVER["REQUEST_URI"],"?requested_html=")>0&&trim($_SERVER["REDIRECT_URL"])!=""){header("Location: ".$_SERVER["REDIRECT_URL"]);return;}if(strpos($_REQUEST["requested_html"],"/../")!==false){die("error");}if(file_exists($_REQUEST["requested_html"]."index.php")){$_REQUEST["requested_html"].="index.php";}$rewrite_pathinfo=pathinfo($_REQUEST["requested_html"]);if(isset($rewrite_pathinfo["extension"])){$rewrite_extension=strtolower($rewrite_pathinfo["extension"]);}else{$rewrite_extension="";}switch(basename($_REQUEST["requested_html"])){case"js_connector.php":include"js_connector.php";return;case"robots.txt":include"robots.php";return;case"sitemap.xml":include"sitemap.php";return;}if(in_array($rewrite_extension,array("sql","pem","key"))){header("HTTP/1.1 401 Unauthorized");die("Unauthorized extension [".$rewrite_extension."] ");exit;}if($rewrite_extension=="php"){if(file_exists($_REQUEST["requested_html"])){$rewrite_dir=str_replace("_mod_rewrite.php",$rewrite_pathinfo["dirname"],$_SERVER["SCRIPT_FILENAME"]);chdir($rewrite_dir);include($rewrite_pathinfo["basename"]);return;}elseif($rewrite_pathinfo["basename"]=="index.php"){$new_uri=$_SERVER["REQUEST_URI"];$new_uri=str_replace("/".$rewrite_pathinfo["dirname"],"",$new_uri);header("Location: ".$new_uri);return;}else{$sekce="404";include("index.php");}}if(file_exists($_REQUEST["requested_html"])){switch($rewrite_extension){case"css":$rewrite_mimetype="text/css";break;case"js":$rewrite_mimetype="text/js";break;default:$rewrite_mimetype=mime_content_type($_REQUEST["requested_html"]);}header('Content-Type: '.$rewrite_mimetype);header('Content-Length: '.filesize($_REQUEST["requested_html"]));header('Last-Modified: '.gmdate('D, d M Y H:i:s',filemtime($_REQUEST["requested_html"])).' GMT',true,200);readfile($_REQUEST["requested_html"]);return;}if($rewrite_extension=="html"){$requested_html=$_REQUEST["requested_html"]=substr($_REQUEST["requested_html"],0,strlen($_REQUEST["requested_html"])-5);}include("index.php");return;}$requested_html=trim($_REQUEST["requested_html"]);$requested_html=trim($requested_html,"/");if(file_exists($requested_html.".html")){readfile($requested_html.".html");return;}if(file_exists($requested_html.".php")&&$requested_html!="index"){$x=explode("/",$requested_html);header("Location: ".$x[count($x)-1].".php");return;}include("index.php");