<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%><%dd_filepath="../"%> <% ids = trizer("id") actions = tristr("action") '以下是保存留言表单提交的留言 if actions = "addbook" then qna=tristr("b_name") if qna = "" then call errbox("姓名不能为空","","","","") elseif len(qna) < 1 then call errbox("姓名太短了","","","","") elseif len(qna) > 10 then call errbox("姓名太长了","","","","") end if call adcallobj(qna) qxb=tristr("b_xb") if qxb="" then call errbox("性别不能为空","","","","") end if qtx=tristr("seltoux") ql=tristr("b_lei") if ql = "" then call errbox("留言类型不能为空","","","","") end if if b_qq_open = 1 then qqq=trizer("b_qq") if b_qq_cheack = 1 then if qqq="" then call errbox("QQ不能为空,请填写你的QQ方便我与你联系","","","","") end if end if if b_qq_cheack <> "" and len(qqq) > 11 then call errbox("这么长的QQ,还没有见过","","","","") end if end if if b_email_open = 1 then qem=tristr("b_email") if b_email_cheack = 1 then if qem = "" then call errbox("电子邮件不能为空","","","","") end if end if if len(qem) > 30 then call errbox("请认真填写你的email","","","","") end if end if if b_url_open = 1 then qwb=tristr("b_url") if b_url_cheack = 1 then if qwb = "" then call errbox("请一定要填您的主页","","","","") end if end if if len(qwb) > 30 then call errbox("有这么长的网址吗?网址太长了吧,是二级域名吗?\n\n请认真填写你的网址","","","","") end if end if if b_form_open = 1 then qlz=tristr("b_form") if b_form_cheack = 1 then if qlz = "" then call errbox("地址为必填项,请填写","","","","") end if end if if len(qlz)>20 then call errbox("你来自于那里?地址太长了吧","","","","") end if end if qxq=tristr("b_xinqing") if qxq = "" then call errbox("请选择您当前的心情","","","","") end if qly=tristr("b_conter") if len(qly) < 8 then call errbox("留言内容太短了,最低不能少于 8 个字符","","","","") elseif len(qly) > qwbm_book_leng then call errbox("留言内容太长了,最多不可超多 "& qwbm_book_leng &" 个字符,当有输入 "& len(qly) &" 个字符","","","","") end if call adcallobj(qly) qc=ischeck("ca") if qc = 1 then qcm=tristr("cakan") if qcm <> "" then else call errbox("选择留言悄悄话模式后,回复查看码不能为空,请输入您的回复查看码","","","","") end if end if if qwbm_book_code = 1 then '是否打开验证码 0 关闭 1 打开 qyz=session("qwbmbook_Code") qyz1=tristr("yianzhen") if qyz1="" or len(qyz1)<4 or not isnumeric(qyz1) then call errbox("请正确输入验证码","","","","") elseif qyz1<>qyz then call errbox("验证码不正确\n\n请正确输入验证码!!!","","","","") end if end if ip=Request.ServerVariables("REMOTE_ADDR") sessid=session.sessionid bkshenhe=qwbm_book_shenhe '留言是否要审核 0 需要审核 1 不用审核 absql="select * from qwbm_message" set abrs=server.createobject("adodb.recordset") abrs.open absql,conn,1,3 abrs.addnew abrs("nickname")=qna abrs("qusex")=qxb abrs("touxiang")=qtx abrs("sid")=ql if b_qq_open=1 then abrs("quqq")=qqq end if if b_email_open=1 then abrs("quemail")=qem end if if b_url_open=1 then abrs("quurl")=qwb end if if b_form_open=1 then abrs("qudizhi")=qlz end if abrs("xinqing")=qxq abrs("liuyangame")=qly abrs("liuyantime")=now() abrs("liuyanip")=ip if qc=1 and qcm<>"" then abrs("showbaomima")=md5(qcm) abrs("gailoutime")=now() end if if ids<>"" then abrs("gailouid")=ids end if abrs("shenhe")=bkshenhe abrs.update abrs.close set abrs=nothing if ids<>"" then absql="select top 1 * from qwbm_message where id="&ids set abrs=server.createobject("adodb.recordset") abrs.open absql,conn,1,3 if not(abrs.eof and abrs.bof) then abrs("gailoutime")=now() end if abrs.update abrs.close set abrs=nothing end if if bkshenhe="1" then bktitle = "留言成功" else bktitle = "留言成功,等待管理员审核" end if call errbox("留言成功","message.asp","","","") response.end end if if qwbmmobileopen(qwbm_mobile_open,"","")=1 then '发现是手机访问 %><% else %><% end if connclose%>