<% stats="编辑帖子" if membername="" then Errmsg=Errmsg+"
"+"
  • 您没有登录,没有权限编辑贴子!" call error() else dim AnnounceID dim RootID dim BoardID dim username dim cname cname=membername dim rs dim sql dim rsBoard dim boardsql,sel dim old_user dim con,content dim topic,boardtype dim olduser,oldpass if request("boardid")="" then founderr=true Errmsg=Errmsg+"
    "+"
  • 请指定论坛版面。" elseif not isInteger(request("boardid")) then founderr=true Errmsg=Errmsg+"
    "+"
  • 非法的版面参数。" else boardid=request("boardid") end if if request("id")="" then founderr=true Errmsg=Errmsg+"
    "+"
  • 请指定相关贴子。" elseif not isInteger(request("id")) then founderr=true Errmsg=Errmsg+"
    "+"
  • 非法的贴子参数。" else AnnounceID=request("id") end if if request("RootID")="" then founderr=true Errmsg=Errmsg+"
    "+"
  • 请指定相关贴子。" elseif not isInteger(request("RootID")) then founderr=true Errmsg=Errmsg+"
    "+"
  • 非法的贴子参数。" else RootID=request("RootID") end if if founderr then call nav() call headline(2) call error() else call boardinfo() call nav() call headline(2) if founderr then call error() else call edit() if founderr then call error() end if end if sub boardinfo() set rs=conn.execute("select boardtype,Tableback,Tabletitle,Tablebody,aTablebody,TableFont,TableContent,AlertFont,strAllowForumCode,strAllowHTML,strIMGInPosts,strIcons,strflash,Forumlogo,lockboard from board where boardid="&cstr(boardid)) if err then Errmsg=ErrMsg+"
    "+"
  • 数据库操作发生错误!" FoundErr=true else if not (rs.eof and rs.bof) then boardtype=rs("boardtype") Tablebackcolor=trim(rs("Tableback")) Tabletitlecolor=trim(rs("Tabletitle")) Tablebodycolor=trim(rs("Tablebody")) aTablebodycolor=trim(rs("aTablebody")) TableFontcolor=trim(rs("TableFont")) TableContentcolor=trim(rs("TableContent")) AlertFont=trim(rs("AlertFont")) strAllowForumCode=rs("strAllowForumCode") strAllowHTML=rs("strAllowHTML") strIMGInPosts=rs("strIMGInPosts") strIcons=rs("strIcons") strflash=rs("strflash") Forumlogo=rs("Forumlogo") lockboard=rs("lockboard") else if err.number<>0 then Errmsg=ErrMsg+"
    "+"
  • 数据库操作发生错误!" FoundErr=true err.clear else Errmsg=ErrMsg+"
    "+"
  • 不存在的版面!" FoundErr=true end if end if end if rs.close set rs=nothing end sub sub edit() set rs=server.createobject("adodb.recordset") set rs_old = server.CreateObject ("adodb.recordset") sql="select bbs1.username,bbs1.topic,bbs1.body,[user].userclass from bbs1,[user] where bbs1.username=[user].username and bbs1.AnnounceID="&AnnounceID rs.open sql,conn,1,1 if rs.eof and rs.bof then Errmsg=Errmsg+"
    "+"
  • 错误的帖子参数。" Founderr=true else topic=rs("topic") con=rs("body") if rs("username")<>Trim(cname) then if memberclass=grade(19) and cint(rs("userclass"))=19 then response.write"" set rs = nothing response.end() elseif memberclass=grade(20) and cint(rs("userclass"))=20 then response.write"" set rs = nothing response.end() elseif memberclass=grade(19) and cint(rs("userclass"))=20 then response.write"" set rs = nothing response.end() elseif memberclass<>grade(19) and memberclass<>grade(20) then response.write"" set rs = nothing response.end() else sql_old = "select username from [user] where username='"&rs("username")&"'" rs_old.Open sql_old,conn,1,1 old_user = rs_old("username") rs_old.Close call showeditForm() end if else sql_old = "select username from [user] where username='"&rs("username")&"'" rs_old.Open sql_old,conn,1,1 old_user = rs_old("username") rs_old.Close call showeditForm() end if end if set rs_old=nothing rs.Close set rs=nothing end sub end if call endline() %>