<% top if instr(Request.ServerVariables("http_referer"),"http://"&Request.ServerVariables("server_name")&"") = 0 then error("
  • 来源错误") if Request.Cookies("username")=empty then error("
  • 您还未登录社区") forumid=int(Request("forumid")) content=HTMLEncode(Request.Form("content")) ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' if Request.ServerVariables("request_method") = "POST" and Request("preview")="" then If not conn.Execute("Select username From [prison] where username='"&Request.Cookies("username")&"'" ).eof Then error("
  • 您被关进监狱") username=Request.Cookies("username") icon=Request("icon") topic=HTMLEncode(Request.Form("topic")) if Len(topic)<2 then message=message&"
  • 文章主题不能小于 2 字符" if Len(content)<2 then message=message&"
  • 文章内容不能小于 2 字符" if Request.Cookies("posttime")<>empty then if DateDiff("s",Request.Cookies("posttime"),Now()) < int(PostTime) then message=message&"
  • 为防止有人用程序灌水,论坛限制一个人两次发帖间隔必须大于"&PostTime&"秒!" end if if message<>"" then error(""&message&"") sql="select * from [user] where username='"&HTMLEncode(username)&"'" rs.Open sql,Conn,1,3 if rs("userlife")<3 then message=message&"
  • 您的体力值 < 3 不能发表文章
  • 每有效停留时间 10 分钟:体力值:+10" if rs("experience")<1 and Reg10 = 1 then message=message&"
  • 新注册用户登录社区停留 10 分钟以上才可发表帖子" if message<>"" then error(""&message&"") if rs("membercode")<2 and instr("|"&Conn.Execute("Select moderated From [bbsconfig] where id="&forumid&"")(0)&"|","|"&Request.Cookies("username")&"|")=0 then rs("userlife")=rs("userlife")-3 end if rs("landtime")=now() rs("posttopic")=rs("posttopic")+1 rs("money")=rs("money")+3 rs("experience")=rs("experience")+3 rs.update rs.close rs.Open "forum",conn,1,3 rs.addnew rs("username")=username rs("lastname")=username rs("forumid")=forumid rs("topic")=topic rs("content")=content rs("postip")=remoteaddr rs("icon")=icon rs("deltopic")=ActivationForum ''''''''''''''''''''''''''''''''''' '投票处理程序 if Request("vote")<>"" then vote=Request("vote") if instr(vote,"|") > 0 then error("
  • 投票选项中不能含有“|”字符") polltopic=split(vote,chr(13)&chr(10)) j=0 for i = 0 to ubound(polltopic) if not (polltopic(i)="" or polltopic(i)=" ") then allpolltopic=""&allpolltopic&""&polltopic(i)&"|" j=j+1 end if next if j>11 then error("
  • 投票项目不能超过10个") for y = 1 to j votenum=""&votenum&"0|" next rs("polltopic")=HTMLEncode(allpolltopic) rs("pollresult")=votenum rs("multiplicity")=Request("multiplicity") end if ''''''''''''''''''''''''''''''''''' rs.update id=rs("id") rs.close conn.execute("update [bbsconfig] set lasttopic='"&left(topic,15)&"',lastname='"&username&"',lasttime='"&now()&"',today=today+1,toltopic=toltopic+1,tolrestore=tolrestore+1 where id="&forumid&"") conn.execute("update [clubconfig] set today=today+1") Application.Lock Application(CacheName&"CountForum") = Application(CacheName&"CountForum")+1 Application.UnLock Response.Cookies("posttime")=now if ActivationForum=1 then ActivationForum="由于论坛设有审核制度,您发表的帖子需要等待管理员激活才能显示于论坛。" else ActivationForum="返回主题" end if message="
  • 新主题发表成功
  • "&ActivationForum&"
  • 返回论坛
  • 返回论坛首页" succeed(""&message&"") end if ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' sql="select * from bbsconfig where id="&forumid&"" Set Rs=Conn.Execute(sql) bbsname=rs("bbsname") logo=rs("logo") moderated=rs("moderated") pass=rs("pass") password=rs("password") followid=rs("followid") rs.close %>
       <%ClubTree%> → <%ForumTree(followid)%><%=ForumTreeList%> ><%=bbsname%> → 发表帖子

    <% if Request("preview")<>"" then %>
    预览帖子

    <% end if %> >
    发表文章
    用户名称 <%=Request.Cookies("username")%> [退出登录]
    文章标题 ">
    您的表情
    文章内容
    (查看内容长度)


    粗体 斜体 下划线 居中 插入超链接 插入电子邮件地址 插入图片 插入FLASH文件 插入RealPlayer文件 插入Media Player文件 引用

                 『 替换内容 』 『 复制到剪贴板
    增加附件
    <% htmlend %>