array( "url"=>"/^\/articles\/?(.*)?/is", "file"=>"articles", "template"=>"basic", ), 2=>array( "url"=>"/^\/news\/?(.*)?/is", "file"=>"news", "template"=>"basic", ), 3=>array( "url"=>"/^\/contacts\/?(.*)?/is", "file"=>"contacts", "template"=>"basic", ), 4=>array( "url"=>"/^\/registration\/?(.*)?/is", "file"=>"registration", "template"=>"basic", ), 5=>array( "url"=>"/^\/lost_password\/?(.*)?/is", "file"=>"lost_password", "template"=>"basic", ), 6=>array( "url"=>"/^\/login\/?(.*)?/is", "file"=>"login", "template"=>"basic", ), 7=>array( "url"=>"/^\/account\/?(.*)?/is", "file"=>"account", "template"=>"basic", ), 8=>array( "url"=>"/^\/users\/?(.*)?/is", "file"=>"users", "template"=>"basic", ), 10=>array( "url"=>"/^\/category\/?(.*)?/is", "path"=>"catalog", "file"=>"catalog", "template"=>"basic", ), 11=>array( "url"=>"/^\/product\/?(.*)?/is", "path"=>"detailed", "file"=>"detailed", "template"=>"basic", ), 13=>array( "url"=>"/^\/order\/?(.*)?/is", "path"=>"basket", "file"=>"basket", "template"=>"basic_order", ), 15=>array( "url"=>"/^\/search\/?(.*)?/is", "path"=>"search", "file"=>"search", "template"=>"basic", ), 49=>array( "url"=>"/^\/error404\/?(.*)?/is", "file"=>"error404", "template"=>"basic", ), 50=>array( "url"=>"/^\/$/is", "file"=>"index", "template"=>"basic", ), ); $request = explode ("?", $_SERVER["REQUEST_URI"]); $DIV=0;$path=""; foreach($DIVS as $k=>$v) { if (preg_match($v["url"], $request[0], $matches)) { $DIV = $k; $matches = preg_replace("/[^A-z0-9_\-\.\/\%]/", '', $matches); if (isset($matches[1])) $path = explode ("/", $matches[1]); break; } } require ("../scripts/index.php"); ?>