<!--#include file="include/conns.asp"-->
<%
If action="login" then
	dim uuuu,pppp
	'读取您输入的用户名及密码,并去掉首尾的空格
	uuuu=o.t("uuuu")
	pppp=o.t("pppp")
	'判断输入是否为空
	If uuuu="" Then w.w "erruuuuno":w.e
	If pppp="" Then w.w "errppppno":w.e
	Set oRs=server.createobject("adodb.recordset")
	sSql="select top 1 * from LstAdmin where UsrAdmin='"&uuuu&"'"
	oRs.open sSql,oconn,1,1
	'判断密码是否正确
		If not oRs.eof then
			If oRs("UsrPass") <> MD5(pppp,32) then
				w.w "errpppp"
				w.e
			Else
				session("adminuser")=uuuu
				w.w "loginok"
				w.e
			End If
		Else
		w.w "errnoyou"
		w.e
		End If
End If

If action="lut" then
	session("adminuser")=""
	session("adminlev")=""
	response.redirect "login.asp"
End If	
%>