dim txt_zj
dim txt_pw
txt_zj=request.Form("txt_zj")
txt_pw=request.Form("txt_pw")
if trim(txt_zj) &"x"="x" or trim(txt_pw) &"y"="y" then
response.Write("<script>alert('证件名或密码不能为空,请检查输入信息')</script>")
response.write ("<script>window.location='../main_index.asp'</script>")
else
dim strsql
dim rs
strsql="select * from usertb where user_num='"&txt_zj&"'"
set rs=server.CreateObject("adodb.recordset")
rs.open strsql,conn,3,3
if rs.recordcount=0 then
response.Write("<script>alert('无此证件号,请检查输入信息')</script>")
response.write ("<script>window.location='../main_index.asp'</script>")
elseif cstr(txt_pw)<>cstr(rs("user_password")) then
response.Write("<script>alert('密码错误,请检查输入信息')</script>")
response.write ("<script>window.location='../main_index.asp'</script>")
else
session("user_num")=txt_zj
session("user_password")=txt_pw
response.write ("<script>window.location='../main_index.asp'</script>")