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

<%
String login_id=request.getParameter("login_id");
String password=request.getParameter("password");

String result="";
String member_id="<unknown>";
String name1="<unkwon>";
String name2="<unkwon>";

int member_seq=Member.getMember_seq(login_id);
if(Member.isPasswordValid(login_id,password)){
    Member m=new Member(member_seq);
    result="pass";
    member_id=m.getMember_id();
    name1=m.getName1();
    name2=m.getName2();
}else
if(member_seq!=-1){ //find a member with such login_id, but the password is wrong
    result="pwd_incorrect";
}else{
    result="id_incorrect";
}

out.println("result:"+result);
out.println("member_id:"+member_id);
out.println("name1:"+name1);
out.println("name2:"+name2);
out.println("login_id:"+login_id);

%>