注册 登录
编程论坛 ASP技术论坛

请教高手代码问题,多谢!

TONGTONGYANG 发布于 2012-10-13 22:25, 315 次点击
<%
sub ChkLogin()
Dim c,u
Dim i,k
Dim b
Dim sb
Dim Conn
sb=request("tishi")
 Set conn = Server.CreateObject("ADODB.Connection")
  conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("denglu.mdb")
set rs=conn.execute("Select username,password from [user] where username='"&request("username")&"' ")
If rs.bof and rs.eof then
  response.write "对不起,你不是该系统用户"
    response.end
Else
    c=rs("password")
    u=rs("username")
End If
set rs=nothing
ch=""
k=Len(c)
Response.write("用户"+u+"密码"+c)
'Response.end
For i=1 To k
    b=c Mod 10
    c=c\10
    if b=0 then
       t=Mid(sb,10,1)
    else
      t=Mid(sb,b,1)
    End if
    ch=t+ch
   session("p")=session("p")+1
   If request("password")=ch Then
      response.write"登录成功"
   Else
     If session("p")=3 Then
       response.write" 对不起,您不是该系统的用户。"
       'main
       response.end
     End If
     response.write"密码错误,请重新输入"
     response.end
   End If
Next
end sub

%>
主要为红色代码部分不能执行,请问这段代码意思?多谢高手!
1 回复
#2
yms1232012-10-14 00:08
不明白对密码取余数做什么?
1