?!--#include file="../lib/base.asp"-->
<%
''' SDCMS 留言
''' ==================================================================
''' 版权所?http://www.sdcms.cn
''' ------------------------------------------------------------------
''' q不是一个自pYӞ您只能在不用于商业目的的前提下对E序代码q行修改和用;
''' 未经授权不允许对E序代码以Q何Ş式Q何目的的再发布?
''' ==================================================================
''' ~写: ITqx
''' 修改QITqx in 2014.07
dim act:act=sdcms.fget("act",0)
select case act
case "add":adddb
case else
dim config:config=eval(sdcms.getsys("expand.book"))
if not(config(0)) then
sdcms.echo "未开启留言"
sdcms.die
end if
sdcms.show theme_book,""
end select
sdcms.db.dbclose
sub adddb()
dim t0,t1,t2,t3,t4
t0=sdcms.enhtml(sdcms.fpost("t0",0))
t1=sdcms.enhtml(sdcms.fpost("t1",0))
t2=sdcms.enhtml(sdcms.fpost("t2",0))
t3=sdcms.getint(sdcms.fpost("t3",0),0)
t4=sdcms.enhtml(sdcms.fpost("t4",0))
dim config:config=eval(sdcms.getsys("expand.book"))
if not(config(0)) then
sdcms.ajaxjson "未开启留言",0
exit sub
end if
dim f,passnum
if config(1) then
f=1
passnum=0
else
f=2
passnum=1
end if
if not(sdcms.checkpost) then
sdcms.ajaxjson "禁止外部提交数据",0
exit sub
end if
if sdcms.strlen(t0)=0 then
sdcms.ajaxjson "姓名不能为空",0
exit sub
end if
if sdcms.strlen(t1)=0 then
sdcms.ajaxjson "内容不能为空",0
exit sub
end if
if sdcms.strlen(t1)=0 then
sdcms.ajaxjson "内容臛_输入5个字W?,0
exit sub
end if
if sdcms.strlen(t2)=0 then
sdcms.ajaxjson "手机L不能为空",0
exit sub
end if
if sdcms.strlen(t4)=0 then
sdcms.ajaxjson "验证码不能为空",0
exit sub
end if
if sdcms.loadsession("imgcode")="" then
sdcms.ajaxjson "系统验证码错误,请点击刷新",0
exit sub
end if
if sdcms.loadsession("imgcode")<>t4 then
sdcms.ajaxjson "验证码错误",0
exit sub
end if
if sdcms.loadcookie("book_add")<>"" then
if int(datediff("s",sdcms.loadcookie("book_add"),now()))<=60 then
sdcms.ajaxjson "请勿重复提交",0
exit sub
end if
end if
dim data
data=array(array("username",t0,20,1),array("content",t1,255,1),array("tel",t2,20,1),array("sex",t3,1,1),array("createdate",sqltime,0,0),array("islock",passnum,0,0),array("postip",sdcms.getip,0,1))
sdcms.db.insert "sd_expand_book",data
dim body:body=""
dim title:title="您有一条新留言(来自|站)"
body=body&"姓 名:"&t0
body=body&"
手 机:"&t2
dim sex
select case t3
case "0":sex="保密"
case "1":sex="?
case "2":sex="?
end select
body=body&"
性 别:"&sex
body=body&"
日 期:"&now()
body=body&"
内 容:"&t1
sdcms.sendmail sdcms.getsys("adminemail"),title,body
sdcms.ajaxjson f&"提交成功,我们会尽快给您回复,谢谢!",1
sdcms.setcookie "book_add",now()
end sub
%> 手机成人在线视频97_人妻无码一区二区三区TV_欧美成人办公室秘书系列_韩国成人学院无码免费视频在线