%@ LANGUAGE="VBSCRIPT" %>
<%
stats="斑竹管理页面"
dim rsactiveusers,activeuser
dim sql,rs
dim sql1,rs1
dim id,boardid,rootid
dim Maxid
if founduser=false then
founderr=true
Errmsg=Errmsg+" "+"
请登陆后进行操作。"
end if
if request("boardid")="" then
founderr=true
Errmsg=Errmsg+" "+"
请指定论坛版面。"
elseif not isInteger(request("boardid")) then
founderr=true
Errmsg=Errmsg+" "+"
非法的版面参数。"
else
boardid=request("boardid")
if chkboardmaster(boardid)=false then
founderr=true
Errmsg=Errmsg+" "+"
您不是该版面斑竹或者系统管理员。"
end if
end if
call nav()
call headline(1)
if founderr=true then
call error()
else
dim title
dim content
set rs=server.createobject("adodb.recordset")
call main()
end if
set rs=nothing
call endline()
sub main()
%>
<%
if request("action")="new" then
call savenews()
elseif request("action")="manage" then
call manage()
elseif request("action")="edit" then
call edit()
elseif request("action")="del" then
call del()
elseif request("action")="update" then
call update()
elseif request("action")="saveditbm" then
call saveditbm()
elseif request("action")="editbm" then
call editbm()
else
call news()
end if
%>
<%
end sub
sub news()
%>
<%
end sub
sub savenews()
if master then
boardid=request("boardid")
else
if chkboardmaster(boardid)=false then
founderr=true
Errmsg=Errmsg+" "+"
您不是该版面斑竹或者系统管理员。"
else
boardid=request("boardid")
end if
end if
if request("username")="" then
Errmsg=Errmsg+" "+"
请输入发布者。"
founderr=true
else
username=request("username")
end if
if request("title")="" then
Errmsg=Errmsg+" "+"
请输入新闻标题。"
founderr=true
else
title=request("title")
end if
if request("content")="" then
Errmsg=Errmsg+" "+"
请输入新闻内容。"
founderr=true
else
content=request("content")
end if
if founderr=true then
call error()
else
set rs=server.createobject("adodb.recordset")
sql="select * from bbsnews"
rs.open sql,conn,1,3
rs.addnew
rs("username")=username
rs("title")=title
rs("content")=content
rs("addtime")=Now()
rs("boardid")=boardid
rs.update
rs.close
call success()
end if
end sub
sub manage()
if master=false then
exit sub
end if
sql="select * from bbsnews"
rs.open sql,conn,1,1
%>
<%
end sub
sub edit()
%>
<%
end sub
sub update()
if session("masterlogin")="superadmin" then
boardid=request("boardid")
else
exit sub
end if
if request("username")="" then
Errmsg=Errmsg+" "+"
请输入发布者。"
founderr=true
else
username=request("username")
end if
if request("title")="" then
Errmsg=Errmsg+" "+"
请输入新闻标题。"
founderr=true
else
title=request("title")
end if
if request("content")="" then
Errmsg=Errmsg+" "+"
请输入新闻内容。"
founderr=true
else
content=request("content")
end if
if founderr=true then
call error()
else
sql="select * from bbsnews where id="&cstr(request("id"))
rs.open sql,conn,1,3
rs("username")=username
rs("title")=title
rs("content")=content
rs("addtime")=Now()
rs("boardid")=boardid
rs.update
rs.close
call success()
end if
end sub
sub del()
sql="delete from bbsnews where id="&cstr(request("id"))
conn.execute(sql)
call success()
end sub
sub success()
%>
成功:新闻操作
<%
end sub
sub editbm()
%>
<%
rs.close
end sub
sub saveditbm()
sql = "select * from board where boardid="+Cstr(request("boardid"))
rs.Open sql,conn,1,3
rs("boardmaster") = Request("boardmaster")
rs("readme") = Request("readme")
rs("Tableback") = Request("Tableback")
rs("Tabletitle") = Request("Tabletitle")
rs("Tablebody") = Request("Tablebody")
rs("aTablebody") = Request("aTablebody")
rs("TableFont") = Request("TableFont")
rs("TableContent") = Request("TableContent")
rs("AlertFont") = Request("AlertFont")
rs("Forumlogo") = Request("Logo")
rs("strAllowForumCode") = Request("strAllowForumCode")
rs("strAllowHTML") = Request("strAllowHTML")
rs("strIMGInPosts") = Request("strIMGInPosts")
rs("strIcons") = Request("strIcons")
rs("strflash") = Request("strflash")
rs.Update
rs.Close
response.write "