?!--#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 "islogin":userstaus 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 userstaus() if sdcms.is_login then dim userdata:userdata=sdcms.userinfo sdcms.echo " (匿名发表)" else sdcms.echo " (登陆发表)" end if end sub 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个字符",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 userid,avatar userid=0 avatar=0 if sdcms.is_login then dim userdata:userdata=sdcms.userinfo userid=userdata(0) avatar=userdata(12) if t0<>userdata(13) then t0=userdata(13) 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("userid",userid,0,0),array("avatar",avatar,0,0),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&"cUͼ"&t0 body=body&"
c话:"&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 %> 精品高朝久久久久9999|久久久久久无码亚洲|亚洲伊人久久综合成人|99久久精品这里只有精品
  • <nav id="bwk74"><acronym id="bwk74"></acronym></nav>
    <output id="bwk74"><strike id="bwk74"></strike></output>
    <menu id="bwk74"><cite id="bwk74"></cite></menu>
      1. <address id="bwk74"><xmp id="bwk74"></xmp></address>
      2. <bdo id="bwk74"><sup id="bwk74"></sup></bdo>

        1. <strong id="bwk74"></strong>
          <menuitem id="bwk74"><p id="bwk74"><pre id="bwk74"></pre></p></menuitem>