<?
require_once('include/global.php');
require_once("include/file.php");
require_once("include/mail_lib.php");
require_once("include/member_lib.php");
require_once('include/member_group_lib.php');
require_once('conf.inc.php');


// check
	if (!is_numeric($_GET['m_no']))
		msg('올바른 URL로 접근하여 주십시오', 0, true);

	if ($G['DINFO']['d_mbrgrp_isuse'] == 'N')
		msg("조직도 사용이 제한되었습니다.\\n\\n관리자에게 문의하여 주십시오.", 0, true);

	if (member_group_deny_check())
		msg("조직도를 사용할 수 없는 [".$AUTH['auth_mg_name']."]조직입니다.\\n\\n관리자에게 문의하여 주십시오.", 0, true);


// set
	$CFG['TITLE'] = '<b>조직도</b> >> <b>상세정보</b>';

	// db - select
		$q = "SELECT * FROM ".$TB['MEMBER']." WHERE m_no='" . $_GET['m_no'] . "' AND d_no='" . $G['DINFO']['d_no'] . "' AND mg_no > 0 AND m_usertype IS NULL";
		$mbr = db_get_row($q);

		if (!$mbr)
			msg('존재하지 않는 회원입니다.', 0, true);

		$q = "SELECT mg_name FROM ".$TB['MEMBER_GROUP']." WHERE d_no='" . $G['DINFO']['d_no'] . "' AND mg_no='" . $mbr['mg_no'] . "'";
		$mbr['mg_name'] = db_get_one($q);

		if ($mbr['mc_no'] > 0)
		{
			$q = "SELECT mc_name FROM ".$TB['MEMBER_CLASS']." WHERE d_no='" . $G['DINFO']['d_no'] . "' AND mc_no='" . $mbr['mc_no'] . "'";
			$mbr['mc_name'] = db_get_one($q);
		}	// if()

		$_eml = $mbr['m_id'].'@'.$G['DINFO']['d_name'];
		$mbr['m_email'] = get_mailto_url($_eml, $mbr['m_name'], true, NULL, ' target="_blank" ');


	$mf = get_member_field();


// skin view
	nskinset('webmail', 'member_info.html', 'window_open');
	include($NSKIN['view_layout']);

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