<?
if($_GET['vihodu'] && $_SESSION['ID_P'])
unset($_SESSION['ID_P']);

$site_1=$_SERVER['HTTP_REFERER'];
$site_2=doman_name($site_1);
$sites_1=$_SERVER['HTTP_HOST'];
$sites_2=doman_name($sites_1);
if($site_2[1] != $sites_2[1])
exit();

$MM_restrictGoTo = "../";

if (!isset($_SESSION['ID_P'])) 
	{
  	echo "<HTML><HEAD><meta http-equiv='Refresh' charset='utf-8' content='0; URL=".$MM_restrictGoTo."'></HEAD></HTML>";
  	exit();
	} 
elseif($_SESSION['ID_P'][2] != md5($_SERVER['REMOTE_ADDR']))
	{
	unset($_SESSION['ID_P']);
	echo "<HTML><HEAD><meta http-equiv='Refresh' charset='utf-8' content='0; URL=".$MM_restrictGoTo."'></HEAD></HTML>";
	exit();
	}
else $_SESSION['ID_P'][1] = intval($_SESSION['ID_P'][1]);

	
$base_path="../";
$bp="../";

?>