<%@ page contentType="text/html; charset=utf-8" %>
<%@ page import="kr.co.hsnc.common.message.WAFMessage" %>
<jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
<%
	ctx.init(request, response);
	WAFMessage wafMessage = WAFMessage.getInstance();
	wafMessage.setLocale(ctx.getLocale());
	System.out.println("====================111");
	System.out.println("=ctx.getLocale():" + ctx.getLocale());
	
	boolean is_login         = ctx.getBoolean("is_login");
	boolean is_exist_session = ctx.getBoolean("is_exist_session");
	String  exist_session_ip = ctx.get("exist_session_ip");
	int login_pw_mod_period  = ctx.getInt("login_pw_mod_period"); //암호화 비밀번호 기간
	int login_pw_encription  = ctx.getInt("login_pw_encription"); //암호화 비밀번호 횟수
	String cv                = ctx.get("cv");
	String portal_check      = ctx.get("portal_check");
	int size_value = 4;
%>
<RESULT type="VALUEOBJECT">
	<REQUEST uri="<%= ctx.getRequestURI() %>" event="<%= ctx.getEvent() %>"/>
<%	if( is_login ) { %>
<%		if( login_pw_mod_period >= 0 ) { %>
	<SUCCESS value="pw_valid"><%= "패스워드 유효기간이 만료되었습니다." %></SUCCESS>
<%		} %>
<%		if( is_exist_session ) { %>
	<SUCCESS value="true"><![CDATA[<%= wafMessage.getMessage("Login.OK.Exist.Session") %>]]></SUCCESS>
<%		}
		else { %>
	<SUCCESS value="true"><![CDATA[<%= wafMessage.getMessage("Login.OK") %>]]></SUCCESS>
<%		} %>
    <DETAIL-MESSAGE><![CDATA[<%= cv %>]]></DETAIL-MESSAGE>
    
    <VALUE-OBJECT size="<%=size_value %>">

			<VALUE name="is_exist_session"><![CDATA[<%= is_exist_session %>]]></VALUE>
			<VALUE name="login_pw_mod_period"><![CDATA[<%= login_pw_mod_period %>]]></VALUE>
			<VALUE name="login_pw_encription"><![CDATA[<%= login_pw_encription %>]]></VALUE>
			<VALUE name="portal_check"><![CDATA[<%= portal_check %>]]></VALUE>
			
	</VALUE-OBJECT>
    
<%  }
    else { %>
<%		if( login_pw_encription == 0 ) { %>
	<SUCCESS value="pw_cnt"><%= "패스워드 5회 이상 틀리셨습니다. 관리자에게 문의해주시기 바랍니다." %></SUCCESS>
<%		} 
		else { %>    
	<%-- <SUCCESS value="false"><![CDATA[<%= wafMessage.getMessage("Login.Error") %>]]></SUCCESS> --%>
	<SUCCESS value="false"><%= wafMessage.getMessage("Login.Error") %></SUCCESS>
<%		} %>		
	<VALUE-OBJECT size="1">
		<VALUE name="chk_head"><![CDATA[<%= "N" %>]]></VALUE>
	</VALUE-OBJECT>
<%  } %>
</RESULT>