Admin_Message.Asp
上传用户:qfkgdy
上传日期:2020-06-18
资源大小:1888k
文件大小:2k
- <!--#include file="../wml.ini"-->
- <%
- call wmlbegin("管理留言","wrap")
- go=request.QueryString("go")
- id=cint(request.QueryString("id"))
- wapcks=request("wapcks")
- if Go="" Then
- %>
- <%
- Dim zNum,i,j
- Dim Ados,Ados1
- Randomize timer
- zNum = cint(8999*Rnd+1000)
- Session("gg") = zNum
- Session.Timeout=5
- Dim zimg(4),NStr
- NStr=cstr(zNum)
- For i=0 To 3
- zimg(i)=cint(mid(NStr,i+1,1))
- Next
- %>
- 密码:<input name="Pass" title="密码" size="10" maxlength="20" value=""/><br/>
- 验证码:<br/>
- <input name="wapcks<%=minute(now)%><%=second(now)%>" size="5" maxlength="4"/><%=Session("gg")%><br/>
- <anchor>[登 陆]<go method="post" href="Admin_Message.Asp?Go=1&id=<%=id%>">
- <postfield name="Pass" value="$(Pass)"/>
- <postfield name="wapcks" value="$(wapcks<%=minute(now)%><%=second(now)%>)"/>
- </go>
- </anchor><br/>
- <%
- else
- Pass=trim(request("Pass"))
- Admin=trim(request("Admin"))
- if Pass="" then Pass=session("Pass")
- if session("addl")="" then session("addl")=0
- if session("addl")>=4 then
- response.write "你已经输入验证码错误5次了,该休息一会了吧!<br/>"
- else
- if wapcks<>CStr(Session("gg")) and session("MessagePass")="" then
- session("addl")=session("addl")+1
- Session.Timeout=3
- response.write "请输入正确验证码!<br/>"
- else
- set objgbrs=Server.CreateObject("ADODB.Recordset")
- ssql="select * from [Message] where Pass=" & sqlstr(Pass) & " and id=" & id & ""
- objgbrs.open ssql,conn,1,1
- if objgbrs.eof then
- call wmlwrite("<b>用户名或密码不对!</b>",true)
- else
- session("MessagePass")=objgbrs("id")
- session("Pass")=Pass
- call wmlwrite("<b>登陆成功!</b>",true)
- call wmllink("Edit_Message.Asp?id=" & id & "","修改",false)
- call wmllink("Del_Message.Asp?id=" & id & "","删除",true)
- end if
- set objgbrs=nothing
- conn.close
- set conn=nothing
- End IF
- End IF
- End IF
- call wap.navs("留言本,index.asp|预览留言,View.Asp?id=" & id & "|管理留言,")
- call wmlend
- %>