新手求助asp网站的后台不知道为啥打不开了
新手求助asp网站的后台不知道为啥打不开了后台页面路径是admin/manage/login.asp
下面是login.asp的内容,求高手看看那里出错了
一直显示HTTP 500 内部服务器错误
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%Option Explicit%>
<%Session.CodePage=936%>
<!--#include file="Include/Config.asp" -->
<!--#include file="Include/CfsEnCode.asp" -->
<!--#include file="CheckAdmin.asp" -->
<!--#Include File="Include/OnlineClass.asp" -->
<!--#Include File="Include/UpdateAdminTime.asp" -->
<!--#Include file="Include/Tkl_SYSProedomClass.asp" -->
<!--#Include File="Include/Tkl_LogClass.asp" -->
<%
Dim Conn
Set Conn = Server.CreateObject("Adodb.Connection")
Conn.Open ConnStr
%>
<html>
<head>
<title>Login.asp</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="Tsys,FuJinFuZhou,ChanGong_Studio">
<meta name="Version" content="Tsys V1.1">
<link rel="stylesheet" href="Include/ManageStyle.css" type="text/css">
<script src="Include/Tkl_Skin.js"></script>
<script src="Include/Tkl_Tooltip.js"></script>
<SCRIPT LANGUAGE="JavaScript">
<!--
function chkForm(obj){
if(obj.Title.value == ""){
alert("请输入登录帐户");
obj.Title.focus();
return false;
}
if(obj.Pwd.value == ""){
alert("请输入登录密码");
obj.Pwd.focus();
return false;
}
}
//-->
</SCRIPT>
<style>
body {
margin: 0px;
padding: 0px;
text-align: center;
border: none;
}
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000" onLoad="try{form1.Title.focus()}catch(exception){}">
<%
Dim LogClass
Set LogClass=New Tkl_LogClass
Dim SysAdmin
Set SysAdmin=New SYSProedom_Class
Dim Coll
Set Coll = New UserInfo_Collection_Class
Select Case Request("Work")
Case "LoginOut" :
LoginOut()
Case "CheckLogin" :
CheckLogin()
End Select
%>
<br>
<form name="form1" method="post" action="?" onsubmit="return chkForm(this)">
<br>
<table width="64%" border="0" align="center" cellpadding="3" cellspacing="1" class="ContentTabBg">
<tr align="center">
<td colspan="2" class="BarTitleBg">管理员登录</td>
</tr>
<tr>
<td width="25%" align="center" valign="middle" bgcolor="#FFFFFF"><img src="Images/Skin/TsysLogo2.jpg" width="100" height="252"></td>
<td width="75%" bgcolor="#FFFFFF">
<table width="100%" height="133" border="0" align="center" cellpadding="3" cellspacing="1" class="ContentTabBg">
<tr>
<td width="27%" bgcolor="#FFFFFF" class="BarTitle"> 帐户:</td>
<td width="73%" bgcolor="#FFFFFF">
<input type="text" name="Title" maxlength="20" class="Input" size="40" tabindex="1" onKeyDown="if(event.keyCode==13)event.keyCode=9" value="<%=Request.Cookies("TsysLoginCookie")("AdminTitle")%>">
</td>
</tr>
<tr>
<td width="27%" bgcolor="#FFFFFF" class="BarTitle">密码:</td>
<td width="73%" bgcolor="#FFFFFF">
<input type="password" name="Pwd" maxlength="20" class="Input" size="40" tabindex="2">
</td>
</tr>
<tr>
<td width="27%" bgcolor="#FFFFFF">
<input type="hidden" name="Work" value="CheckLogin">
</td>
<td width="73%" bgcolor="#FFFFFF">
<input name="Submit" type="submit" class="button01-out" id="Submit" value="确 定">
<input name="Submit32" type="button" class="button01-out" value="还 原" onClick="window.history.back();">
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF"></td>
<td bgcolor="#FFFFFF" class="BarText">
<label for="AutoRemberLoginName">
<input type="checkbox" id="AutoRemberLoginName" name="AutoRemberLoginName" value="1" <% If Def_IsAutoRemberLoginName Then Response.Write "checked" End If%>>
记住登录名</label>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="5"></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="ContentTabBg">
<tr>
<td bgcolor="#FFFFFF">注:<br>
1.退出本系统前请先注销用户,否则在系统默认的帐号超时时间内,同名的管理员帐号无法从另一IP登录,同时也防止管理员权限贮留,产生安全瘾患!<br>
2.本系统要求服务器端及客户端均安装有<strong>IE5.5</strong>以上版本,否则将无法正常使用核心功能。</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
<%
Set LogClass=Nothing
'//函数:登录安全登记
Sub RemberLoginWrong()
LogClass.AddLog("IP:" & Request.ServerVariables("REMOTE_ADDR")& "登录失败")
If Def_UseLoginPolliceMan Then
Conn.ExeCute("Insert Into LoginWrongLog (Title,AddTime)Values('"&Request.ServerVariables("REMOTE_ADDR")&"',#"&Now()&"#)")
'删除不在监视范围内的安全登记
Conn.ExeCute("Delete From LoginWrongLog Where DateDiff('s',AddTime,Now())>" & Def_StakeoutTimeRange)
Dim Rs
Set Rs=Conn.ExeCute("Select Count(*) From LoginWrongLog Where Title='"&Request.ServerVariables("REMOTE_ADDR")&"'")
If Rs(0)>Def_EnableLoginWrong_Number Then
'错误登录次数超标则封IP
Conn.ExeCute("Insert Into LoginLock (Title,AddTime)Values('"&Request.ServerVariables("REMOTE_ADDR")&"',#"&Now()&"#)")
'清空当前IP的安全登记
Conn.ExeCute("Delete From LoginWrongLog Where Title='"&Request.ServerVariables("REMOTE_ADDR")&"'")
End If
Rs.Close
Set Rs=Nothing
End If
End Sub
'//函数:登录安全检查
'//返回:Bool(True:允许登录)
Function ChkEnableLogin()
ChkEnableLogin=False
If Def_UseLoginPolliceMan Then
'删除超出监视时间范围的错误登录记录
Conn.ExeCute("Delete From LoginLock Where DateDiff('s',AddTime,Now())>" & Def_LoginWrongLockTimeRange)
Dim Rs
Set Rs=Conn.ExeCute("Select * From LoginLock Where Title='"&Request.ServerVariables("REMOTE_ADDR")&"'")
ChkEnableLogin=Rs.Eof And Rs.Bof
Rs.Close
Set Rs=Nothing
Else
ChkEnableLogin=True
End If
End Function
'//函数:登录验证
Function CheckLogin()
If Not ChkEnableLogin() Then
Response.Write("<script>alert(""<登录失败>\n你的IP由于登录错误次数过多,已经被禁止。一段时间内将无法再次登录,详情请与[超级管理员]联系"& Def_SoftCopyright_Script &""");window.history.back()</script>")
Response.End
End If
Dim Title,Pwd
Title=Replace(Trim(Request("Title")),"'","''")
Pwd=Replace(Trim(Request("Pwd")),"'","''")
If Title = "" Or Pwd = "" Then
Response.Redirect "?"
Response.End
End If
Dim Result
Result=CheckAdmin(Title,CfsEnCode(Pwd))
If Result = "" Then
'进行安全登记
Call RemberLoginWrong()
Response.Write("<script>alert(""<登录失败>\n[用户]或[密码]错误"& Def_SoftCopyright_Script &""");window.history.back();</script>")
Response.Redirect "?"
Response.End
End If
If Result="{LOCK}" Then
Response.Write("<script>alert(""<登录失败>\n该用户已被锁定,详情请与[超级管理员]联系"& Def_SoftCopyright_Script &""");</script>")
Response.End
End If
Dim AdmInfo
AdmInfo=Split(Result,vbTab,-1,1)
'生成管理员信息
SysAdmin.AdminLogined = "TRUE"
SysAdmin.AdminTitle = AdmInfo(0)
SysAdmin.AdminPopedom = AdmInfo(1)
SysAdmin.AdminRoleTitle = AdmInfo(2)
SysAdmin.AdminNickName = AdmInfo(3)
SysAdmin.AdminClassPopedom = AdmInfo(4)
SysAdmin.AdminTopClassId = AdmInfo(5)
SysAdmin.AdminFileSysRoot = AdmInfo(6)
Dim myInfo
'添加当前管理员入[在线列表]
Set myInfo = New UserInfo_Class
myInfo.Id = SysAdmin.AdminTitle
myInfo.Name = SysAdmin.AdminTitle
myInfo.Ip = Request.ServerVariables("REMOTE_ADDR")
myInfo.NickName = SysAdmin.AdminNickName
myInfo.AddTime = Now
myInfo.UpTime = Now
myInfo.Remark=""
Set Coll = New UserInfo_Collection_Class
If Not Def_DubleOnlineUser Then
If Coll.Find(myInfo.Name) Then
Dim tempmyInfo
Set tempmyInfo= Coll.GetUser(myInfo.Name)
If Trim(tempmyInfo.Ip)<>Trim(myInfo.Ip) Then
Response.Write("<script>alert(""<登录失败>\n该[用户]当前正在线!因些你无法登录,请更换登入名,或要求对方消注登录\n对方登录时间:"&tempmyInfo.AddTime&"\n最后刷新时间:"&tempmyInfo.AddTime&"\n对方IP:"&tempmyInfo.Ip& Def_SoftCopyright_Script &""");window.history.back();</script>")
SysAdmin.LogOut()
Response.End
End If
End If
End If
Coll.Add(myInfo)
If CBool(Request("AutoRemberLoginName")) Then
Response.Cookies("TsysLoginCookie")("AdminTitle")=myInfo.Name
Response.Cookies("TsysLoginCookie").Expires=Date()+Def_AutoRemberLoginName_ExpiresTime
Else
Response.Cookies("TsysLoginCookie")("AdminTitle")=""
Response.Cookies("TsysLoginCookie").Expires=Date()-1
End If
LogClass.AddLog(myInfo.Name & "登录系统,IP:" & myInfo.Ip)
Conn.ExeCute("Delete From LoginLock Where Title='"&Request.ServerVariables("REMOTE_ADDR")&"'")
Call UpdateAdminTime()
Dim Rs,Sql
Set Rs=Server.CreateObject("ADODB.RecordSet")
Sql="Select * From View_AdminInfo Where UCase(Title)='" & UCase(SysAdmin.AdminTitle) & "'"
Rs.Open Sql,Conn,1,3
If Rs.Eof And Rs.Bof Then
Rs.Close
Set Rs=Nothing
Response.Write ("无法获得管理员信息")
Response.End
End If
Rs("LastLoginTime") = Rs("LoginTime")
Rs("LoginTime") = Now()
Rs("LoginCount") = Rs("LoginCount")+1
Rs.Update
Rs.Close
Set Rs = Nothing
Response.Redirect "Index_PopWin.asp"
Response.End
End Function
'//函数:用户退出
Function LoginOut()
SysAdmin.LogOut()
Coll.Remove(SysAdmin.AdminTitle)
If CBool(Request("CloseWin")) Then
Response.Write "<script>top.close();</script>"
Response.End
End If
Response.Write "<script>top.location='Login.asp'</script>"
Response.End
End Function
%>