日期:2014-05-17  浏览次数:20789 次

简单登录问题,在线等。
我调试了很久没有结果。只是个简单的登录页面login.asp,可是总也调试不出。在index.asp跳转到login.asp页面时总是说HTTP   500   -   内部服务器错误。
数据库名为techvice,userId与password是用户名和密码。请各位高手帮忙看看。非常感谢!
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 ">
<!--   #include   file= "Inc/conn.asp "   -->
<!--   #include   file= "Inc/md5.asp "   -->

<%
function   CheckPassword(userId,password)
        Set   Connection   =   Server.CreateObject( "ADODB.Connection ")  
        Connection.Open   "techvice "
        sql= "select   userId   from   manager   where   userId= ' "&userId& " '   and   password= ' "&password& " ' "
        set   rs=joekoe_cms.exec(sql,1)
        if   rs.eof   then
            CheckPassword=false
else
            CheckPassword=true
end   if
rs.close
end   function
%>

<%
function   CheckStatus(userId)
Set   Connection   =   Server.CreateObject( "ADODB.Connection ")  
        Connection.Open   "techvice "
        sql= "select   status   from   manager   where   userId= ' "&userId& " ' "
        if   status= "0 "   then
            CheckStatus=false
else
            CheckStatus=true
end   function
%>

<%
          dim   userId,password,sql,roleId,authorities
  userId=trim(request.form( "userId "))
  password=trim(request.form( "password "))
          password=jk_md5(password, "short ")

        if   not   function   CheckPassword(userId,password)   then
            response.write   "您输入的 <font   class=red> 用户名称 </font> 或 <font   class=red2> 登陆密码 </font> 有错误!请重新输入以便继续登陆本站! "
    response.end
        else   if   not   function   CheckStatus(userId)   then  
                response.write   " <font   class=red> 您的帐号被禁用! </font> <br> <br> 请与平台管理员联系。 "
response.end
  else
              redirect   manage.asp
end   if
end   if                  
%>

------解决方案--------------------
if not CheckPassword(userId,password) then


else if not CheckStatus(userId) then

------解决方案--------------------
另外,将你的ie设置:显示友好的HTTP错误不打勾,即可看到具体的错误行