<%@ page contentType="text/html; charset=euc-kr" %>
<jsp:directive.page import="org.kldp.ebmsh.moniter.permission.PermissionManager"/>
<jsp:directive.page import="org.kldp.ebmsh.moniter.persistant.EbmsMoniterManager"/>

<%
	String id = request.getParameter("id");
	String password = request.getParameter("password");
	
	EbmsMoniterManager manager = new EbmsMoniterManager();
	
	if( manager.authorizeAdmin(id, password) ) {
		// 로그인 성공
		PermissionManager.adminLogin(session, id);
%>	
		<script language="JavaScript">
			document.location.href = '<%= request.getContextPath() %>/moniter/index.jsp';
		</script>
<%	
	}
	else {
		// 로그인 실패
%>
		<script language="JavaScript">
			alert('로그인을 실패했습니다.');
			
			document.location.href = '<%= request.getContextPath() %>/authorize/login.jsp';
		</script>
<%
	}
%>