<?php
	$url = $_SERVER['REQUEST_URI'];
	$url = mb_substr( $url, 1);
	$urld = explode("?",$url);
	$url = $urld['0'];
	$url_ar = explode("/",$url);
	$part = $url_ar['0'];
	$partar = explode(".",$part);
	
	/*if(isset($_GET)){
		print_r($_GET);
	}*/
	
	if($partar['0'] == ''){
		$partar['0'] = 'index';
		$partar['1'] = 'html';
	}
	$file = 'parts/'.$partar['0'].'.php';
	
	if($partar['1'] == 'html'){
		if (file_exists($file));
		else{$file = 'parts/error.php';}
	}
	else{$file = 'parts/error.php';}
	require("blocks/html_start.php");
	require("blocks/menu.php");
	require_once($file);
?>