| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 652 人关注过本帖
标题:谁有空帮忙看个程序
只看楼主 加入收藏
spirit0904
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2011-8-6
结帖率:0
收藏
已结贴  问题点数:0 回复次数:3 
谁有空帮忙看个程序
这个代码是网站登录,貌似是用指纹登陆的,能不能改成直接用输入用户名和密码登陆。

<!--#include file="conn.asp"-->
<!--#include file="md5.inc"-->
<%
username = Request.Form("username")
password = Request.Form("password")
byfinger = Request.Form("byfinger")
fingertemplate = Request.Form("fingertemplate").item
if byfinger = "fingerprint" then
%>
<%
Logon
Set objRec = Nothing

Sub Logon()
    str = "SELECT * From [user]"
    Set objRec = ExecuteRs( str )

    if objRec.EOF=true and objRec.BOF=true then
        %> 对不起!当前用户不存在! 请重新输入.<%
        Exit sub
    end if
   
    fingerpass = false
    OK = 0
    if byfinger = "fingerprint" then
        Set fpProcess = Server.CreateObject("FPCom.FPProcess")
          '<!--fpProcess.Threshold = 1-100; -->
            while not objRec.eof and ok = 0
              if fpProcess.Process(objRec("fingertemplate"), fingertemplate) then
                 fingerpass = true
                 OK = objRec("id")
               end if
              objRec.movenext
            wend  
          Set fpProcess = Nothing   
        Set objRec = Nothing
    end if
    if fingerpass = true then
            str = "SELECT * From [user] where id="&OK
            Set Rs = ExecuteRs( str )

               if rs("用户类别")="超级管理员" then
                session("adminadminadmin")=true
                session("adminadmin")=true
                session("admin")=true
                session("p")=3
               else
                 if rs("用户类别")="栏目管理员" then
                   session("adminadmin")=true
                   session("admin")=true
                   p=2
               else
                   if rs("用户类别")="一般用户" then
                      session("admin")=true
                      p=1
                   end if
               end if
           end if
           session("user_name")=rs("单位")
           session("user")=rs("用户昵称")
           session("Part") = Rs("部门")
           Set Rs = Nothing
           if session("p")=3 then
           response.Redirect("adminlist.asp")
           else
           response.redirect("list.asp")
           end if
    else
    response.Redirect("index.asp")
   
    end if

end sub

%>
<% else %>
<% '登录检测
   user=trim(request.form("username"))
   password=ucase(md5(trim(request.form("password"))))
   if instr(user,"'")<>0 then m=9 end if
   if instr(user,"&")<>0 then m=9 end if
   if user<>"" and password<>"" and m<>9 then
       str="select * from [user] where 用户名='"&user&"' and 密码='"&password&"'"
       set rs = ExecuteRs(str)
       if not rs.eof then
           if rs("用户类别")="超级管理员" then
                session("adminadminadmin")=true
                session("adminadmin")=true
                session("admin")=true
                session("p")=3
           else
               if rs("用户类别")="栏目管理员" then
                   session("adminadmin")=true
                   session("admin")=true
                   p=2
               else
                   if rs("用户类别")="一般用户" then
                      session("admin")=true
                      p=1
                   else
                     
                   end if
               end if
           end if
           session("user_name")=rs("单位")
           session("user")=rs("用户昵称")
           session("Part") = Rs("部门")
           if session("p")=3 then
           response.Redirect("adminlist.asp")
           else
           response.redirect("list.asp")
           end if
       else
           response.Redirect("index.asp")
       end if
   end if
%>
<%   
 response.Redirect("index.asp")
End If %>
搜索更多相关主题的帖子: 密码 网站 password include 用户名 
2011-08-06 23:28
spirit0904
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2011-8-6
收藏
得分:0 
我用admin登陆的时候显示以下情况
错误类型:
ADODB.Recordset (0x800A0CC1)
在对应所需名称或序数的集合中,未找到项目。
/processlogon.asp, 第 106 行


浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)

网页:
POST 78 ??? /processlogon.asp

POST Data:
byfinger=password&fingertemplate=&username=admin&password=123456&B1.x=0&B1.y=0
2011-08-06 23:29
spirit0904
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2011-8-6
收藏
得分:0 
上面贴的那段代码就是processlogon.asp里面的全部内容。
2011-08-06 23:31
yms123
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:20 
FPCom.FPProcess这个最有可能是指纹识别
    if byfinger = "fingerprint" then
        Set fpProcess = Server.CreateObject("FPCom.FPProcess")
          '<!--fpProcess.Threshold = 1-100; -->
            while not objRec.eof and ok = 0
              if fpProcess.Process(objRec("fingertemplate"), fingertemplate) then
                 fingerpass = true
                 OK = objRec("id")
               end if
              objRec.movenext
            wend  
          Set fpProcess = Nothing   
        Set objRec = Nothing
    end if
关键的指纹识别代码
2011-08-08 14:33
快速回复:谁有空帮忙看个程序
数据加载中...
 
   



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

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