?? login.asp
字號:
<%
JyDownLoginTitle="用戶登陸"
if request("JyDownType")="logout" then
JyDownLoginTitle="退出登陸"
JyDownLoginMgs="成功:退出登陸成功!"
if Session("JyDownAdminName")<>"" then
Session("JyDownAdminName") =""
Session("JyDownAdminDj")=""
response.cookies("JyDownUserSoftUrl")=""
end if
if request.cookies("JyDownUserName")<>"" then
response.cookies("JyDownUserName") =""
response.cookies("JyDownUserDj")=""
end if
elseif request("JyDownType")="login" then
server_vv=len(Request.ServerVariables("SERVER_NAME"))
server_v1=left(Cstr(Request.ServerVariables("HTTP_REFERER")),server_vv)
server_v2=left(Cstr("http://"&Request.ServerVariables("SERVER_NAME")),server_vv)
if server_v1<>server_v2 or server_v1="" or server_v1="" then
response.write("<script>alert('錯誤:禁止從站點外部提交數據!.')</script>")
response.end
end if
if request.form("user")<>"" and request.form("pwd")<>"" then
%>
<!--#include file="mdb_path_user.asp"-->
<!--#include file="config.asp"-->
<%user=replace(request("user")," ","+++ close")
pwd=replace(request("pwd")," ","+++ close")
set rs=server.createobject("adodb.recordset")
rs.open "select * from UserInfo where user='"&user&"' and pwd='"&pwd&"'",conn,1,1
if not rs.eof then
if pwd=rs("pwd") and user=rs("user") then
JyDownDj=rs("dj")
if JyDownDj=0 or JyDownDj=1 or JyDownDj=2 or JyDownDj=3 then
if rs("lock")=1 then
JyDownLoginMgs="錯誤:帳號 "&user&" 已被鎖定,你不能登陸!"
else
JyDownLoginMgs="成功:帳號 "&user&" 登錄成功!"
if JyDownDj=0 then SF="普通會員"
if JyDownDj=1 then SF="高級會員"
if JyDownDj=2 then SF="系統管理員"
if JyDownDj=3 then SF="站長"
response.cookies("JyDownUserName")=rs("user")
response.cookies("JyDownUserDj")=rs("dj")
if JyDownDj=2 or JyDownDj=3 then
if rs("softurl")<>"" then
response.cookies("JyDownUserSoftUrl")=rs("softurl")
end if
Session("JyDownAdminName")=rs("user")
Session("JyDownAdminDj")=rs("dj")
Session("JyDownAdminAdmin")=rs("admin")
Session("zhangyi")="net"
end if
end if
else
JyDownLoginMgs="錯誤:你的用戶等級錯誤,不能登陸,請與站長聯系!"
end if
else
JyDownLoginMgs="錯誤:用戶名或密碼錯誤!"
end if
else
JyDownLoginMgs="錯誤:用戶名或密碼錯誤!"
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
else
JyDownLoginMgs="錯誤:用戶名和密碼都不能為空!"
end if
end if
%>
<html>
<head>
<title>網絡城市時尚動漫第一站…{2Flash.Net}</title>
<LINK rel="stylesheet" href="../style.css">
</head>
<body topmargin="0">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="760">
<tr>
<td width="100%"><form method="post" action="login.asp?JyDownType=login" target="_top">
<table width="300" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#F2F1E6" style="border-collapse: collapse">
<tr>
<td width="100%" bgcolor="#D8D5B4"><font color="#FFFFFF"><b><%=JyDownLoginTitle%></b></font></td>
</tr>
<%if JyDownLoginMgs<>"" then%>
<tr>
<td width="100%" bgcolor="#FFFFFF" class="p1">
<font color="#4D9CC8">·</font><%=JyDownLoginMgs%>
<%if SF<>"" then%><br><font color="#4D9CC8">·</font>身份:<font color="#008080"><%=SF%></font><%
if JyDownDj="2" or JyDownDj="3" then%>
<br>
<font color="#4D9CC8">·</font><a href="index.asp">進入管理中心</a>
<%else
%><br><font color="#4D9CC8">·</font><a href="../">登陸首頁</a><br>
<%end if%>
<br><font color="#4D9CC8">·</font><%if webuseredit="1" then%><a href="edit.asp"><%end if%>修改個人資料</a>
<br><font color="#4D9CC8">·</font><a href="login.asp?JyDownType=logout">退出登陸</a>
<br><font color="#4D9CC8">·</font><A href='javascript:window.close()'>關閉窗口</a>
<%else%><%if request("JyDownType")<>"logout" then%><br><font color="#4D9CC8">·</font><%if webreg="1" then%><a href="reg.asp"><%end if%>注冊帳號</a><%end if%>
<br><font color="#4D9CC8">·</font><a href="login.asp">重新登陸</a><br><font color="#4D9CC8">·</font><A href='javascript:window.close()'>關閉窗口</a><%end if%></td>
</tr>
<%else%>
<tr>
<td width="100%" bgcolor="#FFFFFF">
<table border="0" cellpadding="2" cellspacing="0" style="border-collapse: collapse" width="100%">
<tr>
<td width="100%" align="center">用戶名:<input name="user" maxlength="20" size="16"></td>
</tr>
<tr>
<td width="100%" align="center">密 碼:<input type="password" name="pwd" maxlength="20" size="16"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" bgcolor="#F2F1E6">
<p align="center"><input type="submit" name="Submit" value="登 陸">
</td>
</tr>
<%end if%>
</table>
</form></td>
</tr>
</table>
</body></html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -