谁有空帮忙看个程序
这个代码是网站登录,貌似是用指纹登陆的,能不能改成直接用输入用户名和密码登陆。<!--#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 %>