📄 board.asp
字号:
<!--#include file="../conn.asp"-->
<!--#include file="inc/const.asp"-->
<!--#include file="../inc/dv_clsother.asp"-->
<!--#include file="../inc/GroupPermission.asp"-->
<!--#include file=../inc/md5.asp-->
<%
Head()
Server.ScriptTimeout=999999
dim Str
dim admin_flag
admin_flag=Split("11,12",",")
founderr=False
CheckAdmin(admin_flag(0))
CheckAdmin(admin_flag(1))
call main()
footer()
Sub main()
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<th width="100%" colspan=2 style="text-align:center;">论坛管理
</th>
</tr>
<tr>
<td class="td2" colspan=2>
<p><B>注意</B>:<BR>①删除论坛同时将删除该论坛下所有帖子!删除分类同时删除下属论坛和其中帖子! 操作时请完整填写表单信息;<BR>②如果选择<B>复位所有版面</B>,则所有版面都将作为一级论坛(分类),这时您需要重新对各个版面进行归属的基本设置,<B>不要轻易使用该功能</B>,仅在做出了错误的设置而无法复原版面之间的关系和排序的时候使用,在这里您也可以只针对某个分类进行复位操作(见分类的更多操作下拉菜单),具体请看操作说明。<BR><font color=blue>每个版面的更多操作请见下拉菜单,操作前请仔细阅读说明,分类下拉菜单中比别的版面增加了分类排序和分类复位功能</font><BR>
<font color=red>如果您希望某个版面需要会员付出一定代价(货币)才能进入,可以在版面高级设置中设置相应版面进入所需的金币或点券数以及能访问的时间是多少</font>
</td>
</tr>
<tr>
<td class="td2" height=25>
<B>论坛操作选项</B></td>
<td class="td2"><a href="board.asp">论坛管理首页</a> | <a href="board.asp?action=add">新建论坛版面</a> | <a href="?action=settemplates">模板风格批量设置</a> | <a href="?action=orders">一级分类排序</a> | <a href="?action=boardorders">N级分类排序</a> | <a href="?action=RestoreBoard" onclick="{if(confirm('复位所有版面将把所有版面恢复成为一级大分类,复位后要对所有版面重新进行归属的基本设置,请慎重操作,确定复位吗?')){return true;}return false;}">复位所有版面</a> | <a href="?action=RestoreBoardCache" onclick="{if(confirm('有时候您对论坛版面的修改在前台看不出修改效果,这很可能是相应版面的缓存没有生效所致,在这里将重建所有版面的缓存,如果您的版面很多,这将消耗您一定的时间,确定吗?')){return true;}return false;}">重建版面缓存</a>
</td>
</tr>
</table>
<p></p>
<%
select case Request("action")
case "add"
call add()
case "edit"
call edit()
case "savenew"'新增论坛
call savenew()
Case "savedit"
call savedit()
Case "del"
call del()
Case "orders"
call orders()
case "updatorders"
call updateorders()
Case "boardorders"
call boardorders()
case "updatboardorders"
call updateboardorders()
Case "mode"
call mode()
case "savemod"
call savemod()
Case "permission"
call boardpermission()
case "editpermission"
call editpermission()
case "RestoreBoard"
call RestoreBoard()
Case "RestoreBoardCache"
Call RestoreBoardCache()
Case "clearDate"
Call clearDate
Case "delDate"
Call delDate
Case "RestoreClass"
Call RestoreClass
Case "handorders"
Call handorders
Case "savehandorders"
Call savehandorders
Case "savesid"
Call savesid
Case "upallsid"
Call upallsid
Case "settemplates"
Call Settemplates
Case Else
Call boardinfo()
end select
end Sub
Sub upallsid()
Dim Sid,cid,board
SID= Request("Sid")
cid=Request("CID")
If SID="" Then SID=1
If CID="" Then CID=1
SID=CLng(SID)
CID=CLng(CID)
Dvbbs.Execute("Update Dv_Setup Set Forum_Sid="& SID &",Forum_CID="& CID )
Dvbbs.Execute("Update Dv_Board Set Sid="& SID &",CID="& CID )
Dvbbs.loadSetup()
For Each board in Application(Dvbbs.CacheName&"_boardlist").documentElement.selectNodes("board/@boardid")
Dvbbs.LoadBoardData(board.text)
Next
Dv_suc("论坛版面风格样式统一设置成功!")
End Sub
Sub savesid
Dim i,boardid,TempStr
Dim Templateslist,sid,j,bid,cid
sid=""
For Each TempStr in Request.form("upboardid")
If Bid="" Then
Bid=TempStr
Else
Bid=Bid&","&TempStr
End If
Next
Bid=split(Bid,",")
For i=0 to UBound(bid)
If sid="" Then
sid=Request("sid"&bid(i))
Else
sid=sid&","&Request("sid"&bid(i))
End If
If cid="" Then
cid=Request("cid"&bid(i))
Else
cid=cid&","&Request("cid"&bid(i))
End If
Next
sid=split(sid,",")
cid=split(cid,",")
For i=0 to UBound(bid)
Dvbbs.Execute("Update Dv_board set sid="&CLng(sid(i))&" ,cid="&CLng(cid(i))&" Where BoardId="&bid(i)&" ")
Dvbbs.LoadBoardData(bid(i))
Next
Dv_suc("论坛模板批量设置成功!")
End Sub
Sub Settemplates
'Application(Dvbbs.CacheName &"_style")
Dim reBoard_Setting,MoreMenu,i
Dim Templateslist,rs,SQL
%>
<form action ="board.asp?action=upallsid" method=post name="dv">
<table cellspacing="0" cellpadding="0" align="center" width="100%">
<tr>
<th colspan="2" style="text-align:center;">模 板 统 一 设 置
</th>
</tr>
<tr>
<td width="70%" align=Left class="td2"><B>所有论坛版面风格模板设置为:</b>
<%
Dim forum_sid,iCssName,iCssID,iStyleName
Dim Forum_cid
set rs=dvbbs.execute("select forum_sid,Forum_CID from dv_setup")
Forum_sid=rs(0)
Forum_CID=Rs(1)
Rs.close:Set Rs=Nothing
%>
<Select Size=1 Name="sid">
<%
For Each Templateslist in Application(Dvbbs.CacheName &"_style").documentElement.selectNodes("style")
Response.Write "<Option value="""& Templateslist.selectSingleNode("@id").text &""""
If Forum_sid = CLng(Templateslist.selectSingleNode("@id").text) Then Response.Write " selected "
Response.Write ">"& Templateslist.selectSingleNode("@stylename").text &" </Option>"
Next
%>
</Select>
Css样式:<Select Size=1 Name="cid">
<%
For Each Templateslist in Application(Dvbbs.CacheName & "_csslist").documentElement.selectNodes("css[tid="& Forum_sid &"]")
Response.Write "<Option value="""& Templateslist.selectSingleNode("@id").text &""""
If Forum_cid = CLng(Templateslist.selectSingleNode("@id").text) Then Response.Write " selected "
Response.Write ">"& Templateslist.selectSingleNode("@type").text &" </Option>"
Next
%>
</Select>
</td>
<td width="30%" align=Left class="td2" >
<Input type="submit" name="Submit" value="设 定" class="button"></td>
</tr>
</table><BR>
</form>
<form action ="board.asp?action=savesid" method=post name="dv1">
<table cellspacing="0" cellpadding="0" align="center" width="100%">
<tr>
<th width="70%"> 论坛版面
</th>
<th width="30%">采用风格样式
</th>
</tr>
<%
dim classrow
sql="select * from dv_board order by rootid,orders"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof
reBoard_Setting=split(rs("Board_setting"),",")
if classrow="td2" then
classrow="td1"
else
classrow="td2"
end if
%>
<tr>
<td height="25" class="<%=classrow%>">
<%if rs("depth")>0 then%>
<%for i=1 to rs("depth")%>
<%next%>
<%end if%>
<%if rs("child")>0 then%><img src="../skins/default/plus.gif"><%else%><img src="../skins/default/nofollow.gif"><%end if%>
<%if rs("parentid")=0 then%><b><%end if%><%=rs("boardtype")%><%if rs("child")>0 then%>(<%=rs("child")%>)<%end if%>
<%if rs("parentid")=0 then%></b><%end if%>
</td>
<td align=Left class="<%=classrow%>">
<Select Size=1 Name="sid<%=Rs("BoardID")%>">
<%
For Each Templateslist in Application(Dvbbs.CacheName &"_style").documentElement.selectNodes("style")
Response.Write "<Option value="""& Templateslist.selectSingleNode("@id").text &""""
If Rs("SID") = CLng(Templateslist.selectSingleNode("@id").text) Then Response.Write " selected "
Response.Write ">"& Templateslist.selectSingleNode("@stylename").text &" </Option>"
Next
%>
</Select>Css样式:<Select Size=1 Name="Cid<%=Rs("BoardID")%>">
<%
For Each Templateslist in Application(Dvbbs.CacheName & "_csslist").documentElement.selectNodes("css[tid="& Rs("SID") &"]")
Response.Write "<Option value="""& Templateslist.selectSingleNode("@id").text &""""
If Rs("cid") = CLng(Templateslist.selectSingleNode("@id").text) Then Response.Write " selected "
Response.Write ">"& Templateslist.selectSingleNode("@type").text &" </Option>"
Next
%>
</Select>
<Input type="hidden" name="upboardid" value="<%=rs("boardid")%>">
</td></tr>
<%
Rs.movenext
loop
set rs=nothing
%>
<tr>
<td width=300 align=Left class="td2" > </td>
<td width=300 align=Left class="td2" ><input type="submit" name="Submit" value="设 定" class="button"></td>
</tr>
</table><BR><BR>
</form>
<%
End Sub
sub boardinfo()
Dim reBoard_Setting,MoreMenu
Dim Rs,classrow,iii,SQL,i
%>
<div class=menuskin id=popmenu onmouseover="clearhidemenu();" onmouseout="dynamichide(event)" style="Z-index:100"></div>
<table width="100%" cellspacing="0" cellpadding="0" align="center">
<tr>
<th width="35%">论坛版面
</th>
<th width="35%">操作
</th>
</tr>
<%
SQL="select boardid,boardtype,parentid,depth,child,Board_setting from dv_board order by rootid,orders"
SET Rs = Conn.Execute(SQL)
If Rs.eof Then
Rs.close:Set Rs = Nothing
Else
SQL=Rs.GetRows(-1)
Rs.close:Set Rs = Nothing
For iii=0 To Ubound(SQL,2)
reBoard_Setting=split(SQL(5,iii),",")
if classrow="td2" then
classrow="td1"
else
classrow="td2"
end if
Response.Write "<tr>"
Response.Write "<td height=""25"" width=""55%"" class="
Response.Write classrow
Response.Write ">"
if SQL(3,iii)>0 then
for i=1 to SQL(3,iii)
Response.Write " "
next
end if
if SQL(4,iii)>0 then
Response.Write "<img src=""../skins/default/plus.gif"">"
else
Response.Write "<img src=""../skins/default/nofollow.gif"">"
end if
if SQL(2,iii)=0 then
Response.Write "<b>"
end if
Response.Write SQL(1,iii)
if SQL(4,iii)>0 then
Response.Write "("
Response.Write SQL(4,iii)
Response.Write ")"
end if
%>
</td>
<td width="45%" class="<%=classrow%>">
<a href="board.asp?action=add&editid=<%=SQL(0,iii)%>"><font color="<%=Dvbbs.mainsetting(3)%>"><U>添加版面</U></font></a> | <a href="board.asp?action=edit&editid=<%=SQL(0,iii)%>"><font color="<%=Dvbbs.mainsetting(3)%>"><U>基本设置</U></font></a> | <a href="BoardSetting.asp?editid=<%=SQL(0,iii)%>"><font color="<%=Dvbbs.mainsetting(3)%>"><U>高级设置</U></font></a>
<%
if reBoard_Setting(2)=0 then
MoreMenu=MoreMenu & "<div class=menuitems><a href=vipboard.asp?boardid="&SQL(0,iii)&"><font color="&Dvbbs.mainsetting(3)&"><U>VIP论坛申请</U></font></a></div>"
elseif reBoard_Setting(2)=0 and reBoard_Setting(46)>0 then
MoreMenu=MoreMenu & "<div class=menuitems><a href=vipboard.asp?boardid="&SQL(0,iii)&"&action=reinstall><font color="&Dvbbs.mainsetting(3)&"><U>激活VIP论坛</U></font></a></div>"
elseif reBoard_Setting(2)=1 and reBoard_Setting(46)>0 then
MoreMenu=MoreMenu & "<div class=menuitems><a href=vipboard.asp?action=showvipuser&boardid="&SQL(0,iii)&"><font color="&Dvbbs.mainsetting(3)&"><U>查看VIP用户</U></font></a></div>"
end if
MoreMenu=MoreMenu & "<div class=menuitems><a href=update.asp?action=updat&submit=更新论坛数据&boardid="&SQL(0,iii)&" title=更新最后回复、帖子数、回复数><font color="&Dvbbs.mainsetting(3)&"><U>更新数据</U></font></a></div><div class=menuitems><a href=# onclick=alertreadme(\'清空将包括该论坛所有帖子置于回收站,确定清空吗?\',\'update.asp?action=delboard&boardid="&SQL(0,iii)&"\')><font color="&Dvbbs.mainsetting(3)&"><U>清空版面数据</U></font></a></div>"
if SQL(4,iii)=0 then
MoreMenu=MoreMenu & "<div class=menuitems><a href=# onclick=alertreadme(\'删除将包括该论坛的所有帖子,确定删除吗?\',\'board.asp?action=del&editid="&SQL(0,iii)&"\')><font color="&Dvbbs.mainsetting(3)&"><U>删除版面</U></font></a></div>"
else
MoreMenu=MoreMenu & "<div class=menuitems><a href=# onclick=alertreadme(\'该论坛含有下属论坛,必须先删除其下属论坛方能删除本论坛!\',\'#\')><font color="&Dvbbs.mainsetting(3)&"><U>删除版面</U></font></a></div>"
end if
MoreMenu=MoreMenu & "<div class=menuitems><a href=Board.asp?action=clearDate&boardid="&SQL(0,iii)&"><font color="&Dvbbs.mainsetting(3)&"><u>清理数据</u></font></a></div>"
If SQL(2,iii)=0 Then
MoreMenu=MoreMenu & "<div class=menuitems><a href=# onclick=alertreadme(\'复位该分类将会把该分类下的所有版面都复位成二级版面,包括原来的多级分类都将复位成二级版面,请慎重操作,确定复位吗?\',\'?action=RestoreClass&classid="&SQL(0,iii)&"\')><font color="&Dvbbs.mainsetting(3)&"><u>复位该分类</u></font></a></div><div class=menuitems><a href=?action=handorders&classid="&SQL(0,iii)&"><font color="&Dvbbs.mainsetting(3)&"><u>分类排序(手动)</u></font></a></div>"
End If
%>
| <a href="#" onMouseOver="showmenu(event,'<%=MoreMenu%>')" style="CURSOR:hand"><font color=<%=Dvbbs.mainsetting(3)%>><u>更多操作</u></font></a>
<%
if reBoard_Setting(2)=1 then
Response.Write "<a href=board.asp?action=mode&boardid="&SQL(0,iii)&"><font color="&Dvbbs.mainsetting(3)&"><U>认证用户</U></font></a>"
end if
%>
</td></tr>
<%
MoreMenu=""
Next
End If
%>
</table><BR><BR>
<SCRIPT LANGUAGE="JavaScript">
<!--
function alertreadme(str,url){
{if(confirm(str)){
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -