?? admin_boardunite.asp
字號:
<!--#include file="conn.asp"-->
<!-- #include file="inc/const.asp" -->
<!--#include file=inc/char.asp-->
<!--#include file=chkuser.asp-->
<title><%=ForumName%>--管理頁面</title>
<link rel="stylesheet" type="text/css" href="forum.css">
<BODY <%=ForumBody%>>
<%
dim str
if instr(session("flag"),"03")=0 then
Errmsg=Errmsg+"<br>"+"<li>本頁面為管理員專用,請<a href=admin_index.asp target=_top>登陸</a>后進入。<br><li>您沒有管理本頁面的權限。"
call Error()
else
call main()
conn.close
set conn=nothing
end if
sub main()
%>
<table cellpadding=0 cellspacing=0 border=0 width=<%=tablewidth%> bgcolor=<%=tablebackcolor%> align=center>
<tr>
<td>
<table cellpadding=3 cellspacing=1 border=0 width=100%>
<tr bgcolor='<%=Tabletitlecolor%>'>
<td><font color="<%=TablefontColor%>">歡迎<b><%=membername%></b>進入管理頁面</font>
</td>
</tr>
<tr bgcolor=<%=tablebodycolor%>>
<td width="100%" valign=top>
<font color="<%=TableContentColor%>">
<table width="100%" border="0" cellspacing="3" cellpadding="0">
<tr>
<td><font color="<%=TableContentColor%>">1.注意事項: 在下面,您將看到目前所有的論壇列表。不能在同一個版面內進行操作。您可以將一個論壇和另外一個論壇進行合并,合并后兩個論壇所有帖子轉入合并論壇,被合并論壇將被刪除且不可恢復。</font>
</td>
</tr>
</table>
<%
if Request("action") = "unite" then
call unite()
else
call boardinfo()
end if
end sub
sub boardinfo()
%><br>
<table width="95%" border="0" cellspacing="3" cellpadding="0" align=center>
<tr>
<td><font color="<%=TableContentColor%>">
<%
set rs = server.CreateObject ("Adodb.recordset")
sql="select boardid,boardtype from board"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "沒有論壇"
else
response.write "<form action=admin_boardunite.asp?action=unite method=post>"
response.write "將論壇"
response.write "<select name=oldboard size=1>"
do while not rs.eof
response.write "<option value="&rs("boardid")&">"&rs("boardtype")&"</option>"
rs.movenext
loop
response.write "</select>"
end if
rs.close
sql="select * from board"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "沒有論壇"
else
response.write "合并到"
response.write "<select name=newboard size=1>"
do while not rs.eof
response.write "<option value="&rs("boardid")&">"&rs("boardtype")&"</option>"
rs.movenext
loop
response.write "</select>"
end if
rs.close
set rs=nothing
response.write "<input type=submit name=Submit value=執行></form>"
%></font>
</td>
</tr>
</table>
<%
end sub
sub unite()
%><br>
<table width="95%" border="0" cellspacing="3" cellpadding="0" align=center>
<tr>
<td><font color="<%=TableContentColor%>">
<%
if cint(request("newboard"))=cint(request("oldboard")) then
response.write "請不要在相同版面內進行操作。"
else
newboard=cint(request("newboard"))
oldboard=cint(request("oldboard"))
'更新論壇帖子數據
conn.execute("update bbs1 set boardid="&newboard&" where boardid="&oldboard)
'更新新論壇帖子計數
set rs=conn.execute("select lastbbsnum,lasttopicnum,todayNum from board where boardid="&oldboard)
conn.execute("update board set lastbbsnum=lastbbsnum+"&rs(0)&",lasttopicnum=lasttopicnum+"&rs(1)&",todaynum=todaynum+"&rs(2)&" where boardid="&newboard)
'刪除被合并論壇
conn.execute("delete from board where boardid="&oldboard)
response.write "合并成功,已經將被合并論壇所有數據轉入您所合并論壇。"
end if
%></font>
</td>
</tr>
</table>
<%
end sub
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -