?? login_admin.asp
字號:
<!--#include file="IP_report.asp"-->
<!--#include file="conn_admin.asp"-->
<%
JyDownLoginTitle="短信后臺集成管理系統"
if request("JyDownType")="logout" then
JyDownLoginTitle="退出登陸"
JyDownLoginMgs="成功:退出登陸成功!"
if Session("selviceAdminName")<>"" then
Session("selviceAdminName") =""
Session("selviceAdminDj")=""
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
user=replace(request("user")," ","+++ close")
pwd=replace(request("pwd")," ","+++ close")
verifycode=replace(trim(Request("verifycode")),"'","")
set rs=server.createobject("adodb.recordset")
rs.open "select * from UserInfo where user='"&user&"' and pwd='"&pwd&"'",conn,1,1
thesoft=Request.ServerVariables("HTTP_USER_AGENT")
if instr(thesoft,"Windows NT 5.0") then
vOS="Win 2000"
elseif instr(thesoft,"Windows NT 5.1") then
vOs="Win XP"
elseif instr(thesoft,"Windows NT") then
vOs="Win NT"
elseif instr(thesoft,"Windows 9") then
vOs="Win 9x"
elseif instr(thesoft,"unix") or instr(thesoft,"linux") or instr(thesoft,"SunOS") or instr(thesoft,"BSD") then
vOs="類Unix"
elseif instr(thesoft,"Mac") then
vOs="Mac"
else
vOs="Other"
end if
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("selviceAdminName")=rs("user")
Session("selviceAdminDj")=rs("dj")
Session("selviceAdminAdmin")=rs("admin")
UserId = rs("id")
set rs1=Server.Createobject("adodb.recordset")
sql1="Select * from Log"
rs1.open sql1,conn,3,3
rs1.addnew
rs1("User")=rs("user")
rs1("LoginIP")=request.ServerVariables("Remote_Addr")
rs1("OS")=vOS
rs1.update
rs1.close
end if
end if
else
JyDownLoginMgs="錯誤:你的用戶等級錯誤,不能登陸,請與站長聯系!"
set rs1=Server.Createobject("adodb.recordset")
sql1="Select * from Log"
rs1.open sql1,conn,3,3
rs1.addnew
rs1("User")=Request.Form("User")
rs1("LoginIP")=request.ServerVariables("Remote_Addr")
rs1("OS")=vOS
rs1("ErrorPas")=Request.Form("pwd")
rs1("Result")="Error"
rs1.update
rs1.close
end if
else
JyDownLoginMgs="錯誤:用戶名或密碼錯誤!"
set rs1=Server.Createobject("adodb.recordset")
sql1="Select * from Log"
rs1.open sql1,conn,3,3
rs1.addnew
rs1("User")=Request.Form("User")
rs1("LoginIP")=request.ServerVariables("Remote_Addr")
rs1("OS")=vOS
rs1("ErrorPas")=Request.Form("pwd")
rs1("Result")="Error"
rs1.update
rs1.close
end if
else
JyDownLoginMgs="錯誤:用戶名或密碼錯誤!"
set rs1=Server.Createobject("adodb.recordset")
sql1="Select * from Log"
rs1.open sql1,conn,3,3
rs1.addnew
rs1("User")=Request.Form("User")
rs1("LoginIP")=request.ServerVariables("Remote_Addr")
rs1("OS")=vOS
rs1("ErrorPas")=Request.Form("pwd")
rs1("Result")="Error"
rs1.update
rs1.close
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
else
JyDownLoginMgs="錯誤:用戶名和密碼都不能為空!"
end if
'if verifycode<>CStr(session("CheckCode")) then
'esponse.write"<script>alert(""驗證碼不正確,請刷新后重新登陸"");location.href=""login_admin.asp"";</script>"
'Response.end
'end if
end if
%>
<html>
<head>
<title><%=JyDownLoginTitle%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
td{font-size:9pt}
body{font-size:9pt}
a:link { color: #0033CC; text-decoration: none }
a:visited { color: #0033CC; text-decoration: none }
a:active { color: #FF0000; text-decoration: none }
a:hover { color: #000000; text-decoration: underline}
</style>
</head>
<body topmargin="10" leftmargin="0" bgcolor="#FFFFFF" text="#000000">
<form method="post" action="login_admin.asp?JyDownType=login" target="_top">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="600">
<%if JyDownLoginMgs<>"" then%>
<tr>
<td width="100%" bgcolor="#FFFFFF">
<p align="left">
<table align=center border=0 cellpadding=0 cellspacing=0 width=600>
<tbody>
<tr>
<td width=207> </td>
<td width=11></td>
<td width="537" align=right valign=bottom>
<div id=topnav> <font color="#FFFFFF">|</font></div>
</td>
</tr>
</tbody>
</table>
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -