<!--#include file="include/conns.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>管理页面</title>
<style>
.pp{color:#FFFFFF;font-size:12px;background:#2E3539;width:100px;height:20px;border:1px solid #050505;}
.pp2{color:#FFFFFF;font-size:12px;background:#2E3539;width:50px;height:20px;border:1px solid #050505;}
td{font-size:12px;}
</style>
</head>
<body bgcolor="#016AA9">
<form name="myform" method=post action="?action=login">
<div align="center">
	<table border="0" width="673" id="table1" background="images/login.jpg" cellspacing="0" cellpadding="0" height="378">
		<tr>
			<td><br><br>
			<table border="0" width="100%" id="table2" height="76" cellspacing="0" cellpadding="0">
				<tr>
					<td width="271" align="right">用户：</td>
					<td width="100"><input class="pp" name="uuuu" value="" size="20"></td>
					<td>　</td>
				</tr>
				<tr>
					<td width="271" align="right">密码：</td>
					<td width="100"><input class="pp" class="editbox4" type="password" size="20" name="pppp"></td>
					<td>　</td>
				</tr>
				<tr>
					<td width="271" align="right">验证：</td>
					<td width="100"><input class="pp2" class=wenbenkuang name=yyyy type=text value="" maxLength=4 size=10>
					<%=yzm%><input name="yyyyok" type="hidden" value="<%=yzm%>"></td>
					<td><input name="Submit" type="submit" class="pp2" id="Submit" value="登 陆"></td>
				</tr>
			</table>
			</td>
		</tr>
	</table>
</div>
</form>
</body>
</html>
<%
If action="login" then
dim uuuu,pppp,yyyy,yyyyok,Mip
'读取您输入的用户名及密码,并去掉首尾的空格
uuuu=trim(request("uuuu"))
pppp=trim(request("pppp"))
yyyy=trim(request("yyyy"))
yyyyok=trim(request("yyyyok"))
Mip=Request.ServerVariables("REMOTE_ADDR")
'判断输入是否为空
If uuuu="" or pppp="" then
	Call Alert("对不起,您输入的用户名或密码不能为空.","-1")
End If
If yyyy <> yyyyok then
	Call Alert("对不起,验证码输入有错.","-1")
End If
'打开ADMIN数据表
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
	Call Alert("对不起密码输入有错.","-1")
	Else 
		session("adminuser")=uuuu
		session("adminlev")=oRs("UsrLev")
		response.redirect "Default.asp"
	End If
Else
	Call Alert("您的用户名可能不存在.","-1")
End If	
End If

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