Add_Messagecl.Asp
上传用户:qfkgdy
上传日期:2020-06-18
资源大小:1888k
文件大小:2k
- <!--#include file="../wml.ini"-->
- <%
- call wmlbegin("发表留言","wrap")
- dim Name,Title,Content,Relation,Pass
- Name=trim(request("Name"))
- Title=trim(request("Title"))
- Content=trim(request("Content"))
- Relation=trim(request("Relation"))
- Pass=trim(request("Pass"))
- wapcks=request("wapcks")
- ok=true
- if Name="" then
- call wmlwrite("您的昵称不能为空",true)
-
- ok=false
- End if
- if Title="" then
- call wmlwrite("留言标题不能为空",true)
- ok=false
- End if
- if Content="" then
- call wmlwrite("留言内容不能为空",true)
- ok=false
- End if
- if Relation="" then
- call wmlwrite("联系方法不能为空",true)
- ok=false
- End if
- if Pass="" then
- call wmlwrite("密码不能为空",true)
- ok=false
- End if
- if Session("Content")="wapck" then
- call wmlwrite("<b>Sorry! 5分钟内只可发表一次留言</b>",true)
- else
- if session("addl")="" then session("addl")=0
- if session("addl")>=4 then
- response.write "你已经输入验证码错误5次了,该休息一会了吧!<br/>"
- else
- if wapcks<>CStr(Session("gg")) then
- session("addl")=session("addl")+1
- Session.Timeout=3
- response.write "请输入正确验证码!<br/>"
- else
- if ok=true then
- Application.Lock
- sql="insert into [Message](Name,Title,Content,Relation,Pass) values ("
- sql=sql & sqlstr(Name) & ","
- sql=sql & sqlstr(Title) & ","
- sql=sql & sqlstr(Content) & ","
- sql=sql & sqlstr(Relation) & ","
- sql=sql & sqlstr(Pass) & ")"
- conn.execute(sql)
- Application.Unlock
- Session("Content")="wapck"
- Session.Timeout=5
- call wmlwrite("<b>发表成功!</b>",true)
- end if
- end if
- end if
- end if
- call wap.navs("留言本,index.asp|发表留言,Add_Message.Asp|,")
- call wmlend
- %>