| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1204 人关注过本帖
标题:登陆模块的一些问题,没有提示任何错误,但是也进不去????
只看楼主 加入收藏
fengmnll
Rank: 1
等 级:新手上路
帖 子:79
专家分:3
注 册:2008-11-6
结帖率:85.71%
收藏
已结贴  问题点数:10 回复次数:16 
登陆模块的一些问题,没有提示任何错误,但是也进不去????
admin.login.asp
<!--#include file="conn.asp" -->
<!--#include file="login_menu.asp" -->
<html>
<head>
<title><%=site_name%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="com.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (25175_sub2.psd) -->
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td background="images/index_02.gif"><table width="898" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td>
<!--#include file="topadmin_login.asp" -->
<table width="898" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="202" valign="top"><%call login()%></td>
    <td width="696" valign="top"><table width="695" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="images/index_15.gif" width="695" height="48" alt=""></td>
      </tr>
      <tr>
        <td><table width="695" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="32"><img src="images/index_17.gif" width="32" height="579" alt=""></td>
            <td valign="top" bgcolor="#FFFFFF"><table width="619" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
              <tr>
                <td><table width="619" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                  <tr>
                    <td width="340">&nbsp;</td>
                    <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="4%"><div align="right"><img src="images/index_19.gif" width="6" height="20" alt=""></div></td>
                        <td width="93%" bgcolor="#E4E7DB">&nbsp;&nbsp;<a href="index.asp">首页</a> &gt; <a href="admin_login.asp">管理页面</a> &gt; 登陆</td>
                        <td width="3%"><img src="images/index_21.gif" width="7" height="20" alt=""></td>
                      </tr>
                    </table></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="80" valign="bottom"><table width="97%"  border="0" align="right" cellpadding="0" cellspacing="0">
                  <tr>
                    <td><div align="center"><img src="images/index_30.gif" width="6" height="70" alt=""></div></td>
                    <td width="600" background="images/index_31.gif">
<%
  if admin="" then
      response.write"你还没有登陆,请先登陆后台管理系统 ->"
  else
      dim rank
      set rs=conn.execute("select rank from Admin where admin='"&admin&"'")
      select case rs("rank")
      case 0
          rank="你是无权限管理,仅可登陆后台修改密码"
      case 1
          rank="你是前台管理员,可有限制地管理前后台"
      case 2
          rank="你是普通管理员,可有限制地管理前后台"
      case 3
          rank="你是系统管理员,可进行本系统所有操作"
      end select
      set rs=nothing
      response.write admin &",欢迎登陆后台管理,"& rank &"。"
  end if
%>
                    </td>
                    <td><div align="center"><img src="images/index_34.gif" height="70" alt=""></div></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td><table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td height="419" valign="top">

<%
  if admin="" then
      dim rndnum     '经过转化的随机数
      dim truenum    '最终确定的随机数
      Randomize      '初始化随机数生成器
      Do While Len(truenum)<4
          rndnum=CStr(Chr((57-48)*rnd+48))
          truenum=truenum&rndnum
      loop
%>
                    <form name="form1" method="post" action="admin_check.asp">
                      <table width="100%" border="0">
                        <tr>
                          <td width="40%" height="25" align="right">帐 号</td>
                          <td width="60%" height="25"><input name="mname" type="text" id="mname"></td>
                        </tr>
                        <tr>
                          <td width="40%" height="25" align="right">密 码</td>
                          <td width="60%" height="25"><input name="password" type="password" id="password"></td>
                        </tr>
                        <tr>
                          <td width="40%" height="25" align="right">验证码</td>
                          <td width="60%" height="25"><input name="validate" type="text" id="validate"><input type="hidden" name="revalidate" size="10" value="<%=truenum%>"> <font color="#FF0000" size="3"><%=truenum%></font></td>
                        </tr>
                        <tr>
                          <td height="50" colspan="2" align="right">
                            <div align="center">
                              <input type="submit" name="Submit3" value="登陆后台">                           
                              <input type="reset" name="Submit32" value="重输">
                            </div></td>
                          </tr>
                      </table>
                    </form>
<%
  end if
%>                    </td>
                  </tr>
                  <tr>
                    <td height="18"><div align="center"></div></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><img src="images/index_78.gif" alt="" width="620" height="24"></td>
              </tr>
            </table></td>
            <td width="43"><img src="images/index_22.gif" width="43" height="579" alt=""></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table></td>
      </tr>
      <tr>
        <td><!--#include file="bottom.asp" -->
</td>
      </tr>
    </table></td>
    <td width="26%" background="images/index_02.gif" align="center" valign="top"><img src="images/3.gif" width="340" height="80" alt=""> </td>
  </tr>
</table>
<!-- End ImageReady Slices -->
</body>
</html>
admin_check.asp
<!--#include file="conn.asp" -->
<!--#include file="login_menu.asp" -->
<!--#include file="error.asp" -->
<html>
<head>
<title><%=site_name%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="com.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (25175_sub2.psd) -->
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td background="images/index_02.gif"><table width="898" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td>
<!--#include file="topadmin_login.asp" -->
<table width="898" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="202" valign="top"><%call login()%></td>
    <td width="696" valign="top"><table width="695" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="images/index_15.gif" width="695" height="48" alt=""></td>
      </tr>
      <tr>
        <td><table width="695" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="32"><img src="images/index_17.gif" width="32" height="579" alt=""></td>
            <td valign="top" bgcolor="#FFFFFF"><table width="619" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
              <tr>
                <td><table width="619" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                  <tr>
                    <td width="340">&nbsp;</td>
                    <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="4%"><div align="right"><img src="/images/index_19.gif" width="6" height="20" alt=""></div></td>
                        <td width="93%" bgcolor="#E4E7DB">&nbsp;&nbsp;<a href="index.asp">首页</a> &gt; <a href="index.asp">管理页面</a> &gt; 登陆</td>
                        <td width="3%"><img src="images/index_21.gif" width="7" height="20" alt=""></td>
                      </tr>
                    </table></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="80" valign="bottom"><table width="97%"  border="0" align="right" cellpadding="0" cellspacing="0">
                  <tr>
                    <td><div align="center"><img src="/images/index_30.gif" width="6" height="70" alt=""></div></td>
                    <td width="600" background="images/index_31.gif">&nbsp;</td>
                    <td><div align="center"><img src="images/index_34.gif" height="70" alt=""></div></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td><table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td height="419" valign="top">
<%
  dim mname,password,validate,revalidate
  mname=lcase(replace(trim(request.form("mname")),"'",""))
  password=replace(request.form("password"),"'","")
  validate=trim(request.form("validate"))
  revalidate=request.form("revalidate")
  if mname="" or password="" or validate="" then
      founderr="true"
      errmsg="<li>请输入帐号、密码、验证码"
  else
      set rs=conn.execute("select id from guanliyuan where admin='"&mname&"' and password='"&password&"'")
      if rs.eof and rs.bof then
          founderr="true"
          errmsg="<li>帐号或密码输入错误"
      end if
      set rs=nothing
      if validate<>revalidate then
          founderr="true"
          errmsg=errmsg&"<li>验证码输入错误<br>"
      end if         
  end if
      
  if founderr="true" then
      call errormsg()
  else
      conn.execute("update guanliyuan set mloads=mloads+1,mlastdate=now() where admin='"&mname&"'")
      session("admin")=mname
      response.redirect"admin_login.asp"
  end if
%>
                    </td>
                  </tr>
                  <tr>
                    <td height="18"><div align="center"></div></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><img src="images/index_78.gif" alt="" width="620" height="24"></td>
              </tr>
            </table></td>
            <td width="43"><img src="images/index_22.gif" width="43" height="579" alt=""></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table></td>
      </tr>
      <tr>
        <td><!--#include file="bottom.asp" -->
</td>
      </tr>
    </table></td>
    <td width="26%" background="images/index_02.gif" align="center" valign="top"><img src="images/3.gif" width="340" height="80" alt=""> </td>
  </tr>
</table>
<!-- End ImageReady Slices -->
</body>
</html>
蓝色字体标出的为主要的代码,就是没有提示任何错误,麻烦各位帮忙解决一下,谢谢.
图片附件: 游客没有浏览图片的权限,请 登录注册

这是admin表.
搜索更多相关主题的帖子: 模块 提示 登陆 
2010-05-14 10:13
hams
Rank: 12Rank: 12Rank: 12
等 级:贵宾
威 望:18
帖 子:912
专家分:3670
注 册:2008-7-30
收藏
得分:0 
显示的是什么

俺不高手,俺也是来学习的。
俺的意见不一定就对,当你不认同时请点忽视按钮。
当走到十字路口不知该如何走时,可在论坛问下路,但你若希望别人能一路把你送到目的地,显然是不现实的,因为别人也有自己要走的路。
2010-05-14 10:45
fengmnll
Rank: 1
等 级:新手上路
帖 子:79
专家分:3
注 册:2008-11-6
收藏
得分:0 
先点击没反应,而后就显示
操作出错:

请输入帐号、密码、验证码
返回上一页
  
2010-05-14 11:26
fengmnll
Rank: 1
等 级:新手上路
帖 子:79
专家分:3
注 册:2008-11-6
收藏
得分:0 
回复 2楼 hams
先点击没反应,而后就显示
操作出错:

请输入帐号、密码、验证码
返回上一页  
2010-05-14 11:26
cnfarer
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:179
帖 子:3330
专家分:21157
注 册:2010-1-19
收藏
得分:0 
form值没取到?!

★★★★★为人民服务★★★★★
2010-05-14 14:34
fengmnll
Rank: 1
等 级:新手上路
帖 子:79
专家分:3
注 册:2008-11-6
收藏
得分:0 
回复 5楼 cnfarer
不知道怎么修改?谢谢
2010-05-14 15:01
gupiao175
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:40
帖 子:1787
专家分:7527
注 册:2007-6-27
收藏
得分:0 
admin_login.asp里这个是:
<input name="validate" type="text" id="validate"><input type="hidden" name="revalidate" size="10" value="<%=truenum%>"> <font color="#FF0000" size="3"><%=truenum%></font></td>
     看上面红色体里validate根本没有值!最起码要有一个value=<%=truenum%>,应改为:<input name="validate" type="text" id="validate" value="<%=truenum%>">
而admin_check.asp里取的               
  dim mname,password,validate,revalidate
  mname=lcase(replace(trim(request.form("mname")),"'",""))
  password=replace(request.form("password"),"'","")
  validate=trim(request.form("validate"))  '核心在这里。这里根本没有取到值!
  revalidate=request.form("revalidate") ‘而这个revalidate才真正有值!
 if mname="" or password="" or validate="" then
      founderr="true"
      errmsg="<li>请输入帐号、密码、验证码"
  else

Q:1428196631,百度:开发地 即可找到我,有事请留言!
2010-05-14 15:19
fengmnll
Rank: 1
等 级:新手上路
帖 子:79
专家分:3
注 册:2008-11-6
收藏
得分:0 
回复 7楼 gupiao175
还是不对呢
2010-05-14 16:12
gupiao175
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:40
帖 子:1787
专家分:7527
注 册:2007-6-27
收藏
得分:0 
错误提示如果还是:请输入帐号、密码、验证码!
就说明那3个变量的值有一个没有取到:
 dim mname,password,validate,revalidate
  mname=lcase(replace(trim(request.form("mname")),"'",""))
  password=replace(request.form("password"),"'","")
validate=trim(request.form("validate"))
  revalidate=request.form("revalidate")
 response.write(mname&"+"&psssword&"+"&validate)'在此输出3个变量,自己检查一下自己的输入,看看在页面是否能够显示出来!缺什么就全力检查哪个!
response.end


Q:1428196631,百度:开发地 即可找到我,有事请留言!
2010-05-14 17:37
gupiao175
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:40
帖 子:1787
专家分:7527
注 册:2007-6-27
收藏
得分:0 
不好意思,更正一下:
<tr>
                         <td width="40%" height="25" align="right">验证码</td>
                          <td width="60%" height="25"><input name="validate" type="text" id="validate"><input type="hidden" name="revalidate" size="10" value="<%=truenum%>"> <font color="#FF0000" size="3"><%=truenum%></font></td>
                        </tr>
验证码这段内容无需更改!保持原来的代码!

Q:1428196631,百度:开发地 即可找到我,有事请留言!
2010-05-14 17:48
快速回复:登陆模块的一些问题,没有提示任何错误,但是也进不去????
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.030141 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved