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

手机WAP编程

开发平台:

ASP/ASPX

  1. <!--#include file="../wml.ini"-->
  2. <%
  3. call wmlbegin("发表留言","wrap")
  4.   dim Name,Title,Content,Relation,Pass
  5.   Name=trim(request("Name"))
  6.   Title=trim(request("Title"))
  7.   Content=trim(request("Content"))
  8.   Relation=trim(request("Relation"))
  9.   Pass=trim(request("Pass"))
  10.   wapcks=request("wapcks")
  11.   ok=true
  12.   if Name="" then
  13.   call wmlwrite("您的昵称不能为空",true)
  14.  
  15.   ok=false
  16.   End if
  17.   if Title="" then
  18.   call wmlwrite("留言标题不能为空",true)
  19.    ok=false
  20.   End if
  21.   if Content="" then
  22.   call wmlwrite("留言内容不能为空",true)
  23.    ok=false
  24.   End if
  25.   if Relation="" then
  26.   call wmlwrite("联系方法不能为空",true)
  27.    ok=false
  28.   End if
  29.   if Pass="" then
  30.   call wmlwrite("密码不能为空",true)
  31.    ok=false
  32.   End if
  33.   if Session("Content")="wapck" then
  34.   call wmlwrite("<b>Sorry! 5分钟内只可发表一次留言</b>",true)
  35.   else
  36.   if session("addl")="" then session("addl")=0
  37.   if session("addl")>=4 then
  38.   response.write "你已经输入验证码错误5次了,该休息一会了吧!<br/>"
  39.   else
  40.   if wapcks<>CStr(Session("gg")) then
  41.   session("addl")=session("addl")+1
  42.   Session.Timeout=3
  43.      response.write "请输入正确验证码!<br/>"
  44.   else
  45.   if  ok=true then
  46.   Application.Lock
  47.   sql="insert into [Message](Name,Title,Content,Relation,Pass) values ("
  48.   sql=sql & sqlstr(Name) & ","
  49.   sql=sql & sqlstr(Title) & ","
  50.   sql=sql & sqlstr(Content) & ","
  51.   sql=sql & sqlstr(Relation) & ","
  52.   sql=sql & sqlstr(Pass) & ")"
  53.   conn.execute(sql)
  54.   Application.Unlock
  55.   Session("Content")="wapck"
  56.   Session.Timeout=5
  57.   call wmlwrite("<b>发表成功!</b>",true)
  58.   end if
  59.   end if
  60.   end if
  61.   end if
  62. call wap.navs("留言本,index.asp|发表留言,Add_Message.Asp|,")
  63. call wmlend
  64. %>