0){ unset($requestURI[0]); $requestURI = array_values($requestURI); $directory_debth--; } $requestURI = array_map('mysql_real_escape_string', $requestURI); if($requestURI[1] =='o'){ header('Content-type: application/json'); if(file_exists ("open/".$requestURI[2].".php")){ require("open/".$requestURI[2].".php"); } } else if(file_exists ("services/".$requestURI[1].".php")){ header('Content-type: application/json'); require('framework/auth.php'); $GLOBALS['userID'] = Autheticate(); require("services/".$requestURI[1].".php"); } else { require('views/default.php'); }