帮偶看看这个ASP的LOGIN.ASP有什么错误啊....30分.
首先conn.asp,siteconfig.asp,top.asp,bottom.asp,md5.asp这几个程序肯定是 没有问题.并且我的IIS也运行正常,别的页都可以显示,但就这个页,只说500内部服务器错误,偶把IIS的调试的报错功能也打开了,但就是不出现详细的错误,大家帮我看看啊,哪儿错了.....
login.asp文件源码如下
<!--#include file="conn.asp"-->
<!--#include file="siteconfig.asp"-->
<%
dim action,comeurl
action=request.QueryString("action")
comeurl=Request.ServerVariables("HTTP_REFERER")
%>
<Script language="JavaScript">
<!--
function checkspace(checkstr) {
var str = '';
for(i = 0; i < checkstr.length; i++) {
str = str + ' ';
}
return (str == checkstr);
}
function checkuser()
{
if(checkspace(document.userinfo.username.value)) {
document.userinfo.username.focus();
alert("用户名不能为空!");
return false;
}
if(checkspace(document.userinfo.password.value)) {
document.userinfo.password.focus();
alert("密码不能为空!");
return false;
}
}
//-->
</Script>
<html>
<head><title><%=sitename%>--用户登录</title>
<head>
<body leftmargin="0" rightmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="top.asp"-->
<%select case action
case ""%>
<table width="776" border="0" cellpadding="0" cellspacing="0" bgcolor="#D0E2FD">
<tr>
<td>
<form name="userinfo" action="login.asp?action=checkuser" method="post"align="center">
用户名:<input name="username" type="text" size="20"> <a href="reg.asp">还没注册?</a><br>
密 码:<input name="password" type="password" size="20"> <a href="lostpass.asp">忘记密码?</a><br>
<input name="Submit" onClick="return checkuser();" type="submit" value="登录系统">
<input name="reset" type="reset" value="重新输入"
</form>
</td>
</tr>
</table>
<%case "checkuser"%>
<!--#include file="md5.asp"-->
<%
dim username,password,comeurl
username=replace(trim(request("username")),"'","")
password=md5(replace(trim(request("password")),"'",""))
if trim(request("comeurl"))="" then
comeurl="default.asp"
else
comeurl=trim(request("comeurl"))
end if
if username="" or password="" then
call loginerr()
end if
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from book_user where username='"&username&"' and password='"&password&"' " ,conn,1,3
if not(rs.bof and rs.eof) then
if password=rs("password") then
response.Cookies("book")("username")=trim(request("username"))
response.Cookies("book").expires=date+1
rs("logins")=rs("logins")+1
rs.Update
rs.Close
set rs=nothing
call loginok()
else
response.write "<script LANGUAGE='javascript'>alert('对不起,您的用户名或密码有误!');window.location.reload('javascript:history.go(-1)')</script>"
end if
else
response.write "<script LANGUAGE='javascript'>alert('对不起,您的用户名或密码有误!');window.location.reload('javascript:history.go(-1)')</script>"
end if
%>
<%end selcet%>
<%
sub loginerr()
response.Write "<center><a href=login.asp><font color=red size=2>对不起,登陆失败,请检查您的登陆名和密码</font></a></center>"
response.end
end sub
sub loginok()
response.Write "<font size=2>欢迎您 <font color=red size=2>"&request.Cookies("book")("username")&"</font>,两秒种后将自动跳转到相应页!</font>"
response.Write "<meta http-equiv=refresh content=2;URL="&comeurl&">"
end sub
%>
<!--#include file="bottom.asp"-->