%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
if NOT isempty(request("LoginSubmit")) then
dim admin,password
admin=replace(trim(request("Name")),"'","")
password=md5(replace(trim(request("Pws")),"'",""))
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from [admin] where admin='"&admin&"' and password='"&password&"' " ,conn,1,1
if not(rs.bof and rs.eof) then
if password=rs("password") then
session("admin")=trim(rs("admin"))
session("rank")=int(rs("rank"))
session.Timeout=sessionLife
rs.Close
set rs=nothing
response.Redirect "mpro.asp"
else
call MsgBox("登录失败!","Back","None")
end if
else
call MsgBox("非法登陆!","Back","None")
end if
end if
%>