<?
$kari_arr = @explode("/",$_SERVER["PATH_INFO"]);
$main = "売買";
$_REQUEST["main_cd"] = "sell";
$sitetop = "/";


if(@strstr($_SERVER["PATH_INFO"],"/detail/")){
	$strurl = strstr($_SERVER["PATH_INFO"],"/detail/"); 
	@$kari_arr = explode("/",$strurl);
	$sid = @$kari_arr[2];
	if(@$kari_arr[2] and !@$kari_arr[3]){
		include("detail.php");
		exit;
	}else{
		exit;
	}
}else if(@strstr($_SERVER["PATH_INFO"],"/map/")){
	$strurl = strstr($_SERVER["PATH_INFO"],"/map/"); 
	@$kari_arr = explode("/",$strurl);
	include("map.php");
}else if(@strstr($_SERVER["PATH_INFO"],"/amt/")){
	$strurl = strstr($_SERVER["PATH_INFO"],"/amt/"); 
	@$kari_arr = explode("/",$strurl);
	$list = "amt";
	if(@$kari_arr[2]){
		$bcode = explode("-",$kari_arr[1]);
	}
	$type = $kari_arr[2];
	include("list.php");
}else if(@strstr($_SERVER["PATH_INFO"],"/list/")){
	$strurl = strstr($_SERVER["PATH_INFO"],"/list/"); 
	@$kari_arr = explode("/",$strurl);
	if($kari_arr[2]){
		$bcode = explode("-",$kari_arr[2]);
	}
	include("list.php");
}else if(@$kari_arr[1] == "arealist"){
	include("arealist.php");
}else if(@$kari_arr[1] == "search"){
		$bcode[0] = "search";
		include("list.php");
}else if(@$kari_arr[1] == "school"){
		if(@$kari_arr[2]){
			$schoolname = urldecode($kari_arr[2]);
			$schoolname = htmlspecialchars($schoolname);
			$list = "school";
			$bcode[0] = "school";
			include("list.php");
		}else{
			include("school.php");
		}
}else if(@$kari_arr[1] == "tanto"){
	$sitetop = "/";
	$tantoid = urldecode($kari_arr[2]);
	$list = "tanto";
	$bcode[0] = "tanto";
	include("list.php");
}else if(@$kari_arr[1] == "map"){
		include("map.php");
}else if(@$kari_arr[1] == "movies"){
		include("movies.php");
}else if(@$kari_arr[1] == "blog"){
		include("blog.php");
}else if(@$kari_arr[1] == "estate"){
	if(@$kari_arr[2]){
		$vender_id = substr($kari_arr[2],1, 4);
		include("estate_detail.php");
	}else{
		include("estate_list.php");
	}
}else if(@$kari_arr[1] == "souba"){
		if(@$kari_arr[2]){
			$_REQUEST["type"] = "tochi"; 
			$_REQUEST["type2"] = "sell"; 
			include("amt.php");
		}else{
			include("souba.php");
		}
}else if(@$kari_arr[1] == "tochi" or @$kari_arr[1] == "tatemono" or @$kari_arr[1] == "mansion"){
	include("index.html");
}else{
	include("index.html");
}
?>