<!--#include file="webconn.asp"-->
<!--#include file="../inc/md5.asp"-->

<% 
dim uid,pwd
uid=Replace(Request.Form("User_name"),"'","''") 
pwd=md5(replace(trim(Request("User_pwd")),"'","")) 
if uid="" or pwd="" or Request("regjm")="" then
response.write "<script>alert('用户登录出错：\n\n·用户明和密码不能为空');history.go(-1);</Script>"
else
if int(replace(trim(Request("regjm")),"'",""))<>int(Session("GetCode")) then 
response.write "<script>alert('用户登录出错：\n\n·认证码输入错误');history.go(-1);</Script>"
else
set rs=server.CreateObject("ADODB.recordset")
sql="select * from system where s_uid='"& uid &"'and s_pwd='" & pwd &"'"
rs.open sql,conn,3,1
if rs.eof or rs.bof then
	response.write "<script>alert('用户登录出错：\n\n·用户名或者密码错误！');history.go(-1);</Script>"
else
	session("user_admin")=uid
	session.Timeout=30
	response.Redirect("admin.asp")
	rs.close
	set rs=nothing
end if
end if
end if
 %>

