📄 forummerge.asp
字号:
<%
if not session("sfadmin") then response.redirect("welcome.asp")
%>
<!--#INCLUDE FILE="../inc/db_inc.asp"-->
<!--#INCLUDE FILE="../inc/md5_inc.asp"-->
<!--#INCLUDE FILE="../inc/char_inc.asp"-->
<HTML>
<HEAD>
<TITLE>Untitled Document</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK rel="stylesheet" href="image/style.css" type="text/css">
</HEAD>
<BODY bgcolor="#FFFFFF" text="#000000" leftmargin="10" topmargin="10">
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open StrConn
%>
<!--#INCLUDE FILE="checkadmin.asp"-->
<%
if request("step") = "2" then
errstr = "<LI>论坛id错误<BR>"
if IsNumeric(request("forumid1")) and IsNumeric(request("forumid2")) then
errstr = ""
end if
if errstr = "" then
strsql = "update sf_thread set forumid=" & request("forumid2") & " where forumid=" & request("forumid1")
Conn.Execute(strsql)
strsql = "update sf_post set forumid=" & request("forumid2") & " where forumid=" & request("forumid1")
Conn.Execute(strsql)
strsql = "select threadcount, postcount from sf_forum where forumid=" & request("forumid1")
Set rs = Conn.Execute(strsql)
Conn.Execute("update sf_forum set threadcount=threadcount + " & rs("threadcount") & ", postcount=postcount + " & rs("postcount") &" where forumid=" & request("forumid2"))
if request("delforum") = "yes" then
Conn.Execute("delete from sf_forum where forumid=" & request("forumid1"))
else
Conn.Execute("update sf_forum set threadcount=0, postcount=0 where forumid=" & request("forumid1"))
end if
%>
<TABLE width="100%" border="0" cellspacing="1" cellpadding="4" align="center">
<TR>
<TD bgcolor="#D1E3BF" align="center">论坛合并完毕</TD>
</TR>
</TABLE>
<%
else
%>
<TABLE width="100%" border="0" cellspacing="1" cellpadding="4" align="center">
<TR>
<TD bgcolor="#D1E3BF">错误:<BR><%= errstr %></TD>
</TR>
</TABLE>
<%
end if
else
strsel = ""
strsql = "select sf_forum.forumid, sf_forum.title from sf_forum left join sf_cate on (sf_forum.cateid = sf_cate.cateid) order by sf_cate.displayorder DESC, sf_cate.cateid ASC, sf_forum.displayorder DESC, sf_forum.forumid ASC"
Set rs = Conn.Execute(strsql)
if not(rs.bof or rs.eof) then
do until rs.eof
strsel = strsel & "<option value=""" & rs("forumid") & """>" & rs("title") & "</option>"
rs.movenext
loop
end if
strsel = strsel & "</select>"
%>
<FORM name="form1" method="post" action="forummerge.asp">
<TABLE width="100%" border="0" cellspacing="1" cellpadding="4" align="center">
<TR>
<TD bgcolor="#D1E3BF" align="center" colspan="2"><B>合并论坛</B></TD>
</TR>
<TR bgcolor="#F5F5F5">
<TD width="50%">将版块:
<%
response.write "<select name=""forumid1"">" & strsel
%>
</TD><TD>并入版块:
<%
response.write "<select name=""forumid2"">" & strsel
%>
</TD></TR><TR bgcolor="#DDDDDD" height="3"><TD colspan="2"></TD></TR>
<TR bgcolor="#FFFFFF"><TD align="center" colspan="2">
<input type="checkbox" name="delforum" value="yes">合并数据后删除原论坛
<input type="hidden" name="step" value="2">
<input type="submit" value="确 定">
</TD></TR>
</TABLE>
</FORM>
<%
end if
%>
<BR><BR><BR>
</BODY>
</HTML>
<%
Conn.close
Set Conn = nothing
Set rs = nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -