<%@page contentType="text/html; charset=utf-8" %>
<%@page import="java.util.*" %>
<%@page import="org.acts.common.*" %>
<%@page import="org.acts.common.html.*" %>

<%@include file="../include/header.jsp" %>
<% 
	String login_id=request.getParameter("reset_login_id");
	if(login_id==null) login_id="";
	String email=request.getParameter("reset_email");
	if(email==null) email="";
	String msg=request.getParameter("reset_msg");
	if(msg==null) msg="";
%>
<SCRIPT TYPE="text/javascript">
function reset_password(){
	var f=document.stdform;
	if(f.reset_login_id.value==""){
		alert("<%=Lang.set("請輸入會眾編號 / 登入編號")%>");
		return;
	}
	if(f.reset_email.value==""){
		alert("<%=Lang.set("請輸入系統內登記的電郵")%>");
		return;
	}
	f.submit();
}
</SCRIPT>
</head>
<body onload=document.stdform.login_id.focus()>
<center>
<form method=POST name="stdform" action="../servlet/ActionDispatcher">

<table width=400px border=0>
    <tr>
        <td colspan=2><center><img src="../image/logo.jpg"></center></td>
    </tr>
    <tr>
        <td colspan=2><center><br/><%=Lang.set("請提交以下資料來重設你的密碼")%><br/><br/></center></td>
    </tr>
    
	
	<tr>
        <td align="right" width=20px height=30px><%=Lang.set("會眾編號 / 登入編號")%></td>
        <td><input type="text" name="reset_login_id" value="<%=login_id%>" style="width:140px;"></td>
    </tr>
    <tr>
        <td align="right" width=200px height=30px><%=Lang.set("系統內登記的電郵")%></td>
        <td><input type="text" name="reset_email" value="<%=email%>" style="width:140px;" onkeydown="if(event.keyCode==13){reset_password();}"></td>
    </tr>
    <tr>
        <td colspan=2 height=30px>
            <center>
				<%
				(new EmptySpace(15,15)).toHtml(out);
				(new Button("提交","reset_password()")).toHtml(out);
                if(msg!=""){
					String msg_out="";
					if(msg.equals("login_id")){
						msg_out="會眾編號 / 登入編號 不存在";
					}else
					if(msg.equals("email")){
						msg_out="系統內登記的電郵不正確";
					}
					out.println("<br><br><font color=red>"+Lang.set(msg_out)+"</font>");
				}
				%>
            </center>
        </td>
    </tr>
</table>
       
<input type="hidden" name="op" value="member.MemberModuleAction.reset_password">
       
</form>
<center>

<%@include file="../include/footer.jsp" %>




