<?
require_once('include/global.php');
require_once("include/admin_web_allow_ip_lib.php");
require_once('include/admin_lib.php');
require_once('include/member_lib.php');
//require_once('sadmin_conf.inc.php');

// get
	$mf = get_member_field();

// check
	if (!$_GET['d_no'] || !$_GET['ip_ipaddr'] || !$_GET['ip_netmask'])
		msg('올바른 URL로 접근하여 주십시오');


// set
	if ($_GET['isadmin'])
	{
		auth_limit('admin');
		$CFG['TITLE'] = '<b>관리자메뉴</b> >> <b>웹메일 접근 IP 관리</b> >> <b>수정</b>';
		$_GET['d_no'] = $G['DINFO']['d_no'];
	} else
	{
		auth_limit('serveradmin');
		$CFG['TITLE'] = '<b>메일서버관리</b> >> <b>전체 웹메일 접근 IP 관리</b> >> <b>수정</b>';
	}	// if()


// data
	// get
		$sql = "
			SELECT
				*
			FROM
				".$TB['WEB_ALLOW_IP']."
			WHERE
				d_no='". $_GET['d_no'] . "'
				AND m_id='". $_GET['m_id'] . "'
				AND ip_ipaddr='". $_GET['ip_ipaddr'] . "'
				AND ip_netmask='". $_GET['ip_netmask'] . "'
			";
		$row = db_get_row($sql);

		if (!$row)
			msg("존재하지 않는 웹메일 접근 IP입니다.");


	$view = array();
	$view = setform_admin_web_allow_ip($row);

	$view['d_name'] = get_d_name($row['d_no']);

// skin view
	$CFG['ACTION'] = 'admin_web_allow_ip_mod_ok.php';
	nskinset('sadmin', 'admin_web_allow_ip_form.html');
	include($NSKIN['view_layout']);


require_once('include/global_end.php');
?>