<!--#include file="sd_mdb.asp"-->
<!--#include file="sd_md5.asp"-->
<%dim admin,password,verifycode,today
username=replace(trim(request.form("user")),"'","")
password=md5(replace(trim(request.form("pwd")),"'",""))

if username="" or password="" then
	response.Write "<script LANGUAGE='javascript'>alert('您的用户名或密码不能为空！');history.go(-1);</script>"
	response.end
end if
	set rs=server.CreateObject("adodb.recordset")
	sql="Select * From [sd_USER] where sd_user='"&username&"'and sd_Pass='"&password&"'"
	rs.open sql,conn,1,1
	if not(rs.bof and rs.eof) then
		session("sd_username")=rs("sd_User")
		session("sd_password")=rs("sd_Pass")
		session("sd_userid")=rs("sd_UserID")
		session("sd_Points")=rs("sd_Points")
		session("sd_qq")=rs("sd_qq")
		session("sd_email")=rs("sd_email")
		rs.close
		set rs=nothing
		response.Redirect "sd_user_main.asp"
	else
		rs.close
		set rs=nothing
		response.write "<script LANGUAGE='javascript'>alert('对不起，登陆失败！用户名或密码出错！');history.go(-1);</script>"
	end if
%>