<?
include $_SERVER[DOCUMENT_ROOT] . "/backoffice/header.php";
include $_SERVER[DOCUMENT_ROOT] . "/module/member/member.lib.php";
if(!in_array("member_manage",$_SESSION[$_SITE["DOMAIN"]]["ADMIN"]["AUTH"]) && $_SESSION[$_SITE["DOMAIN"]]["ADMIN"]["GRADE"]!="ROOT"):
	jsMsg("권한이 없습니다.");
	jsHistory("-1");
endif;

//DB연결
$dblink = SetConn($_conf_db["main_db"]);

$arrInfo = getArticleInfo($GLOBALS["_conf_tbl"]["member_level"], $_REQUEST[idx]);
//_DEBUG($arrInfo);

//DB해제
SetDisConn($dblink);

?>
<div id="admin-container">
	<? include "menu.php"; ?>
    <div id="admin-content">
		<h2 class="admin-title">회원등급 관리</h2>

<script language="javascript">
function checkForm(frm){
	if (frm.level_no.value==""){
		alert("회원등급을 입력해 주세요.");
		frm.level_no.focus();
		return false;
	}
	if (frm.level_name.value==""){
		alert("회원등급 이름을 입력해 주세요.");
		frm.level_name.focus();
		return false;
	}
}
</script>
<form name="frmBBS" method="post" action="member_level_evn.php" onSubmit="return checkForm(this)">
<input type="hidden" name="evnMode" value="editMemberLevel">
<input type="hidden" name="idx" value="<?=$_REQUEST[idx]?>">

	<table class="admin-table-type1">
	  <colgroup>
	  <col width="140" />
	  <col width="*" />
	  </colgroup>
	  <tbody>
		<tr>
			<th>회원등급</th>
			<td class="space-left"><input type="text" name="level_no" value="<?=$arrInfo["list"][0][level_no]?>" style="width:200px;" class="input" /></td>
		</tr>
		<tr>
			<th>회원등급 이름</th>
			<td class="space-left"><input type="text" name="level_name" value="<?=$arrInfo["list"][0][level_name]?>" style="width:200px;" class="input" /></td>
		</tr>
		<tr>
			<th>생성일</th>
			<td class="space-left"><?=$arrInfo["list"][0][wdate]?></td>
		</tr>
	  </tbody>
	</table>

	<div class="admin-buttons">
		<div class="cen">
			<span class="btn_pack xlarge icon"><span class="refresh"></span><input type="submit" value="정보수정" style="font-weight:bold" /></span>
		</div>
	</div>	
</form>
</div>
</div>
<?
include $_SERVER[DOCUMENT_ROOT] . "/backoffice/footer.php";
?>