<?
if (!$_SESSION[$_SITE["DOMAIN"]]["ADMIN"]["ID"]) {
	echo "
		<meta http-equiv=refresh content='0; URL=/backoffice/auth/admin_login.php?Prev_URL=".urlencode($_SERVER[REQUEST_URI])."'>
		";
	exit;
}
// admin 페이지 허용된 아이피만 접근 
$fp = fopen("/home/www/acl.txt","r"); 
$currentIP = fread($fp,1000); 
fclose($fp);

//공백 제거
$currentIP=trim($currentIP);

//CF PROXY IP로 인식하는 문제로 변경함(최준흠)
$remoteIP=$_SERVER["HTTP_X_FORWARDED_FOR"];
//$remoteIP=$_SERVER["HTTP_CF_CONNECTING_IP"];

// 문자열 비교
if( strcmp( $currentIP , $remoteIP ) ){
echo "<meta http-equiv='refresh' content='0; url=http://prime-idc.jp'>"; 
exit;
}
?>
