| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 512 人关注过本帖
标题:大家帮我看看 控制页面是哪里出错了?
只看楼主 加入收藏
wsxzen
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2010-10-22
结帖率:0
收藏
已结贴  问题点数:10 回复次数:1 
大家帮我看看 控制页面是哪里出错了?
这里是登陆页
<%
 Option Explicit
'强制浏览器重新访问服务器下载页面,而不是从缓存读取页面
'主要是使随机出现的图片数字随机
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
'================================================
'如果已经登陆
'================================================
if session("UserName")<>"" or session("Permissions")<>"" or session("LoginSystem")="Succeed" then response.Redirect "Index.asp"
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>管理系统</title>
<style type="text/css">

td     { font-size:12px;
         font-family:Arial, Helvetica, sans-serif;
         color:#FFFFFF;}
.baise {
    font-size:12px;
    font-family:Arial, Helvetica, sans-serif;
    color:#FFFFFF;
    letter-spacing: 5px;
   
}
.biaodan {
    width:84px;
    height:19px;
    background-image:url(../images/input_bg.gif);
    border:0px;
    text-align:left;
    padding:0px;
    font-size:12px;
    color:#FFFFFF;
    line-height:19px;
    padding-left:2px;

}
.xiaobiaodan {
    width:38px;
    height:19px;
    background-image:url(../images/xiao_bg.gif);
    border:0px;   
    text-align:left;
    padding:0px;
    font-size:12px;
    color:#FFFFFF;
    line-height:19px;
    padding-left:2px;
}


.annniu{
    width:40px;
    height:19px;
    background-image:url(../images/denglu.gif);
    border:0px;
    text-align:left;
    font-size:12px;
    color:#FFFFFF;
    line-height:19px;   
}
form { padding:0px;
       margin:0px;}
.red_font { font-size:12px; color:#FF0000; font-family:Arial, Helvetica, sans-serif;text-decoration: none;}
.white_font { font-size:12px; color:#FFFFFF; font-family:Arial, Helvetica, sans-serif;text-decoration: none;}
</style>
<SCRIPT language=JScript event="OnCompleted(hResult,pErrorObject, pAsyncContext)" for=foo>
            document.forms[0].MAC.value=unescape(MACAddr);
            //alert(MACAddr);
          //document.formbar.submit();
      </SCRIPT>
    <SCRIPT language=JScript event=OnObjectReady(objObject,objAsyncContext) for=foo>
           if(objObject.IPEnabled != null && objObject.IPEnabled != "undefined" && objObject.IPEnabled == true)
           {
               if(objObject.MACAddress != null && objObject.MACAddress != "undefined")
                  MACAddr = objObject.MACAddress;
               if(objObject.IPEnabled && objObject.IPAddress(0) != null && objObject.IPAddress(0) != "undefined")
                  IPAddr = objObject.IPAddress(0);
               if(objObject.DNSHostName != null && objObject.DNSHostName != "undefined")
                  sDNSName = objObject.DNSHostName;
           }
        </SCRIPT>
<script language="javascript" src="../Include/Admin.js"></script>
</head>
<body>
<table style="margin-top:150px;" width="500" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><table width="608" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td><img src="../images/3_03.gif" width="608" height="160" alt="" /></td>
      </tr>
    </table>
        <table width="608" height="89" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td background="../images/3_05.gif"><form action="CheckLogin.asp" method="post" name="AdminLogin" id="AdminLogin"  onsubmit="return CheckAdminLogin()">
                <table width="555" border="0" align="center" cellpadding="0" cellspacing="0"><input name="MAC" id="MAC" value="" />
                  <tr>
                    <td width="55" align="center" valign="middle" class="baise"><label></label>员工号</td>
                    <td width="90" valign="middle"><input name="LoginID" type="text" class="biaodan" id="LoginID" size="10" /></td>
                    <td width="55" align="center" valign="middle" class="baise">密码</td>
                    <td width="90" valign="middle"><input name="LoginPassword" type="password" class="biaodan" id="LoginPassword" size="10" /></td>
                    <td width="55" valign="middle">验证码</td>
                    <td width="52" valign="middle"><input name="CheckCode" type="text" class="xiaobiaodan" id="CheckCode" size="3" maxlength="20" /></td>
                    <td width="57" valign="middle"><span style="background:#FFFFFF; padding:3px;"><img id='checkcode' src='../Include/Code.asp' align="absmiddle" style="cursor : pointer;" onclick="javascript:this.src='../Include/Code.asp?'+Math.random();" /></span></td>
                    <td width="69" valign="middle"><input name=" 11" type="submit" class="annniu" id=" 11" value=" " /></td>
                  </tr>
              </table>
            </form></td>
          </tr>
        </table>
      <table width="608" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td height="34" valign="top" background="../images/3_06.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="50%">&nbsp;</td>
                  <td width="50%" height="26" class="red_font">&nbsp;</td>
                </tr>
            </table></td>
          </tr>
      </table></td>
  </tr>
</table><OBJECT id=locator classid=CLSID:76A64158-CB41-11D1-8B02-00600806D9B6 VIEWASTEXT></OBJECT>
      <OBJECT id=foo classid=CLSID:75718C9A-F029-11d1-A1AC-00C04FB6C223></OBJECT>  
          <SCRIPT language=JScript>
           var service = locator.ConnectServer();
              
             if (null != service) {
                 var MACAddr ;
               service.Security_.ImpersonationLevel=3;
               service.InstancesOfAsync(foo, 'Win32_NetworkAdapterConfiguration');
             } else {
                //alert('请使用IE系列浏览器!');
             } 
      </SCRIPT>
</body>
</html>

控制页
<!--#include file="../Include/Conn.asp"-->
<!--#include file="../Include/Md5.asp"-->
<%
Response.Write "<html>"
Response.Write "<head>"
Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=gb2312' />"
Response.Write "<title>验证登陆</title>"
Response.Write "</head>"
Response.Write "<BODY>"
'--------------------------------------------
Dim LoginID,LoginPassword,AdminName,Password,Permissions,UserName,Rs,Sql,UserID,SortID,LoginUser,MAC
LoginID = Int(Trim(Request.Form("LoginID")))
LoginUser = Int(Trim(Request.Form("LoginUser")))
LoginPassword = Md5(Request.Form("LoginPassword"))
MAC = Trim(Request.Form("MAC"))


If Session("CheckCode")<>Trim(Request.Form("CheckCode")) Then ClMsg("验证码错误!")
----------------------------------------大家主要帮我看看这一段------------------------谢谢---------
Set Rs = Server.Createobject("Adodb.Recordset")
Sql="Select * From [eims_User] Where ItemID="&LoginID
Rs.Open Sql,Conn,1,1
If Trim(Rs("Item9"))<>"Z9" Then
Set RsLox = Server.Createobject("Adodb.Recordset")
Sql="Select * From [eims_site] Where MAC="&MAC
RsLox.Open Sql,Conn,1,1
If RsLox.Eof Then   
   ClMsg("授权非法")
   End If
Ene If
   Else Then
   UserID = Int(Trim(Rs("ItemID")))
   SortID = Int(Trim(Rs("SortID")))
   AdminName = Trim(Rs("Item1"))
   Password = Trim(Rs("Item2"))
   Permissions = Trim(Rs("Item9"))
   ItemRec = Trim(Rs("ItemRec"))
End If
------------------------------------------------------大家主要帮我看看这一段------------------------谢谢------------
If Not ItemRec Then ClMsg("此用户已被冻结!")
If LoginPassword<>Password Then ClMsg("密码错误!")
IF LoginUser<>AdminName Then C1Msg("用户名不存在!")
If LoginID = UserID And LoginPassword = Password Then

'----------------------判断记录------------------
Set RsLog = Server.Createobject("Adodb.Recordset")
Sql="Select * From [eims_UserLog] Where UserID="&LoginID
RsLog.Open Sql,Conn,1,3
If RsLog.RecordCount > Int(LogRec) Then
RsLog.MoveFirst
RsLog.Delete
End If
RsLog.Close : Set RsLog = Nothing
'----------------------记录开始------------------
Set RsLogRec = Server.Createobject("Adodb.Recordset")
Sql="Select * From [eims_UserLog] Where UserID="&LoginID
RsLogRec.Open Sql,Conn,1,3
RsLogRec.AddNew
RsLogRec("UserID") = LoginID
RsLogRec("SortID") = SortID
RsLogRec("LastLoginTime") = Now()
RsLogRec("LastLoginIP") = Userip()
RsLogRec.Update
RsLogRec.Close : Set RsLogRec = Nothing
'----------------------转向系统------------------
   Session("UserID")=UserID
   Session("UserName")=AdminName
   Session("Permissions")=Permissions
   Session("LoginSystem")="Succeed"
   Session.Timeout=60
   Response.Redirect "Index.asp"
   Response.End
End If
Call CloseConn()
'--------------------------------------------
Response.Write "</BODY>"
Response.Write "</HTML>"
'================================================
'登录示错误提示框
'================================================
Function ClMsg(Message)
Response.Write "<script language=javascript>alert('"&Message&"');window.location.reload('Login.asp');</script>"
Response.End
End Function
%>
搜索更多相关主题的帖子: 页面 
2010-10-22 09:47
dzt0001
Rank: 13Rank: 13Rank: 13Rank: 13
等 级:蒙面侠
威 望:5
帖 子:1281
专家分:4998
注 册:2005-10-12
收藏
得分:10 

If Trim(Rs("Item9"))<>"Z9" Then
Set RsLox = Server.Createobject("Adodb.Recordset")
Sql="Select * From [eims_site] Where MAC="&MAC
RsLox.Open Sql,Conn,1,1
If RsLox.Eof Then  
   ClMsg("授权非法")
   End If
Ene If
   Else Then
   UserID = Int(Trim(Rs("ItemID")))
   SortID = Int(Trim(Rs("SortID")))
   AdminName = Trim(Rs("Item1"))
   Password = Trim(Rs("Item2"))
   Permissions = Trim(Rs("Item9"))
   ItemRec = Trim(Rs("ItemRec"))
End If

红字删除看看
 

[ 本帖最后由 dzt0001 于 2010-10-22 15:19 编辑 ]

----我怎能在别人的苦难面前转过脸去----
2010-10-22 15:18
快速回复:大家帮我看看 控制页面是哪里出错了?
数据加载中...
 
   



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

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