Admin_Message.Asp
上传用户:qfkgdy
上传日期:2020-06-18
资源大小:1888k
文件大小:2k
源码类别:

手机WAP编程

开发平台:

ASP/ASPX

  1. <!--#include file="../wml.ini"-->
  2. <%  
  3. call wmlbegin("管理留言","wrap")
  4. go=request.QueryString("go")
  5. id=cint(request.QueryString("id"))
  6. wapcks=request("wapcks")
  7. if Go="" Then
  8. %>
  9. <%
  10. Dim zNum,i,j
  11. Dim Ados,Ados1
  12. Randomize timer
  13. zNum = cint(8999*Rnd+1000)
  14. Session("gg") = zNum
  15. Session.Timeout=5
  16. Dim zimg(4),NStr
  17. NStr=cstr(zNum)
  18. For i=0 To 3
  19. zimg(i)=cint(mid(NStr,i+1,1))
  20. Next
  21. %>
  22. 密码:<input name="Pass" title="密码" size="10" maxlength="20" value=""/><br/>
  23. 验证码:<br/>
  24. <input name="wapcks<%=minute(now)%><%=second(now)%>" size="5" maxlength="4"/><%=Session("gg")%><br/>
  25. <anchor>[登 陆]<go method="post" href="Admin_Message.Asp?Go=1&amp;id=<%=id%>">
  26. <postfield name="Pass" value="$(Pass)"/>
  27. <postfield name="wapcks" value="$(wapcks<%=minute(now)%><%=second(now)%>)"/>
  28. </go>
  29. </anchor><br/>
  30. <%
  31. else
  32. Pass=trim(request("Pass"))
  33. Admin=trim(request("Admin"))
  34. if Pass="" then Pass=session("Pass")
  35.   if session("addl")="" then session("addl")=0
  36.   if session("addl")>=4 then
  37.   response.write "你已经输入验证码错误5次了,该休息一会了吧!<br/>"
  38.   else
  39.   if wapcks<>CStr(Session("gg")) and session("MessagePass")="" then
  40.   session("addl")=session("addl")+1
  41.   Session.Timeout=3
  42.      response.write "请输入正确验证码!<br/>"
  43.   else
  44.   set objgbrs=Server.CreateObject("ADODB.Recordset")
  45.   ssql="select * from [Message] where Pass=" & sqlstr(Pass) & " and id=" & id & ""
  46.   objgbrs.open ssql,conn,1,1
  47. if objgbrs.eof then
  48. call wmlwrite("<b>用户名或密码不对!</b>",true)
  49. else
  50. session("MessagePass")=objgbrs("id")
  51. session("Pass")=Pass
  52. call wmlwrite("<b>登陆成功!</b>",true)
  53. call wmllink("Edit_Message.Asp?id=" & id & "","修改",false)
  54. call wmllink("Del_Message.Asp?id=" & id & "","删除",true)
  55. end if
  56. set objgbrs=nothing
  57. conn.close
  58. set conn=nothing
  59. End IF
  60. End IF
  61. End IF
  62. call wap.navs("留言本,index.asp|预览留言,View.Asp?id=" & id & "|管理留言,")
  63. call wmlend
  64. %>