⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_postings.asp

📁 生活者姿态整站程序 生活者姿态整站程序 生活者姿态整站程序
💻 ASP
📖 第 1 页 / 共 2 页
字号:
	else
%>
            <table cellpadding=0 cellspacing=0 border=0 width="<%=Tablewidth%>" bgcolor=<%=Tablebackcolor%> align=center>
                <tr>
                    <td>
                    <table cellpadding=6 cellspacing=1 border=0 width=100%>
                        <tr>
                        <td bgcolor=<%=Tabletitlecolor%> valign=middle align=center colspan=2>
                        <form action="admin_postings.asp" method="post">
                        <input type=hidden name="action" value="move">
                        <input type=hidden name="checked" value="yes">
                        <input type=hidden name="boardid" value="<%=request("boardid")%>">
                        <input type=hidden name="rootid" value="<%=request("rootid")%>">
                        <input type=hidden name="id" value="<%=request("id")%>">
                        <b>移动主题</b></td></tr>

                                    <tr>
                                    <td bgcolor=<%=Tablebodycolor%> valign=middle>
                                    <b>移动选项</td>
                                    <td bgcolor=<%=Tablebodycolor%> valign=middle>
                                    <!--<input name="leavemessage" type="radio" value="yes"> 移动并保留一个已经锁定的主题在原论坛<br>--><input name="leavemessage" type="radio" value="no" checked> 移动并将此主题从原论坛中删除
                                    </td>
                                    </tr>

                            <tr>
                        <td bgcolor=<%=Tablebodycolor%> valign=top><b>移动到:</b></td>
                        <td bgcolor=<%=Tablebodycolor%> valign=top>
<%
   sql="select boardid,boardtype from board"
   rs.open sql,conn,1,1
%>
<select name="newboardid" size="1">
<option value="">选择一个论坛</option>
<%
	do while not rs.eof
        response.write "<option value='"+CStr(rs("BoardID"))+"'>"+rs("Boardtype")+"</option>"+chr(13)+chr(10)
	rs.movenext
	loop
	rs.close
%>        
          </select>
			</td>
                        </tr>
                    <tr>
                <td bgcolor=<%=Tabletitlecolor%> valign=middle colspan=2 align=center><input type=submit name="submit" value="提 交"></td></tr></form></table></td></tr></table>
            </table>
            </td></tr>
            </table>
<%
	end if
	end sub



	sub copy()
		dim newboardid
		dim todaynum,postnum
		sql="select count(*) from bbs1 where rootid="&rootid
		set rs=conn.execute(sql)
		postNum=rs(0)
		sql="select count(*) from bbs1 where rootid="&rootid&" and dateandtime>#"&date()&"#"
		set rs=conn.execute(sql)
		todayNum=rs(0)

	
		if request("checked")="yes" then
			if request("boardid")=request("newboardid") then
			founderr=true
			Errmsg=Errmsg+"<br>"+"<li>不能在相同版面内进行转移操作。"
			elseif not isInteger(request("newboardid")) then
				founderr=true
				Errmsg=Errmsg+"<br>"+"<li>非法的版面参数。"
				exit sub
			else
				newboardid=request("newboardid")
				rs.close
				sql="select boardid,announceid,Parentid from bbs1 where announceid="&id&" and boardid="&cstr(boardid)
				rs.open sql,conn,1,1
				if rs.eof and rs.bof then
					founderr=true
					Errmsg=Errmsg+"<br>"+"<li>您选择的贴子并不存在。"
				end if
				rs.close
			end if
			if founderr=false then
				'ON ERROR RESUME NEXT
				dim newtopic,username,body,dateandtime,length,ip,Expression
				dim announceid
				sql="select * from bbs1 where announceid="&id
				set rs=conn.execute(sql)
				newtopic=rs("topic") & "-->" & membername & "添加"
				username=rs("username")
				body=rs("body")
				DateAndTime=rs("DateAndTime")
				length=rs("length")
				ip=rs("ip")
				Expression=rs("Expression")
				rs.close
				sql="select * from bbs1"
				rs.open sql,conn,1,3
					rs.AddNew
				rs("BoardID")=newboardID
					rs("ParentID")=0
					rs("Child")=0
					rs("UserName")=UserName
					rs("Topic")=newTopic
					rs("Body")=Body
					rs("DateAndTime")=DateAndTime
					rs("hits")=0
					rs("length")=length
					rs("rootID")=0
					rs("layer")=1
					rs("orders")=0
					rs("ip")=ip
					rs("Expression")=Expression
					rs("locktopic")=0
					rs("signflag")=0
					rs("emailflag")=0
					rs("times")=0
					rs("isvote")=0
					rs("istop")=0
					rs("isbest")=0
					rs.Update
				rs.MoveLast
					announceid=rs("AnnounceID")
					rs("RootID")= announceid
					rs("Times")= announceid
					rs.Update
					rs.close
	
	'更新论坛贴子数据
	
		LastCount(boardid)
		LastCount(Newboardid)
		call BoardNumAdd(newboardid,1,postNum,todayNum)
		call AllboardNumAdd(todayNum,postNum,1)
	
	
		url="dispbbs.asp?boardid="&newboardid&"&rootid="&announceid&"&id="&announceid
		sql="insert into log (l_username,l_content,l_url) values ('"&membername&"','拷贝帖子','"&url&"')"
		conn.execute(sql)
	'更新论坛数据结束
				call success()
			end if
		else
%>
            <table cellpadding=0 cellspacing=0 border=0 width="<%=tablewidth%>" bgcolor=<%=Tablebackcolor%> align=center>
                <tr>
                    <td>
                    <table cellpadding=6 cellspacing=1 border=0 width=100%>
                        <tr>
                        <td bgcolor=<%=Tabletitlecolor%> valign=middle align=center colspan=2>
                        <form action="admin_postings.asp" method="post">
                        <input type=hidden name="action" value="copy">
                        <input type=hidden name="checked" value="yes">
                        <input type=hidden name="boardid" value="<%=request("boardid")%>">
                        <input type=hidden name="rootid" value="<%=request("rootid")%>">
                        <input type=hidden name="id" value="<%=request("id")%>">
                        <b>复制帖子</b></td></tr>

                                    <tr>
                                    <td bgcolor=<%=Tablebodycolor%> valign=middle>
                                    <b>操作说明</td>
                                    <td bgcolor=<%=Tablebodycolor%> valign=middle>
帖子将复制到别的论坛,成为新的帖子,并保留在原来论坛
                                    </td>
                                    </tr>
                            <tr>
                        <td bgcolor=<%=Tablebodycolor%> valign=top><b>移动到:</b></td>
                        <td bgcolor=<%=Tablebodycolor%> valign=top>
<%
rs.close
   sql="select boardid,boardtype from board"
   rs.open sql,conn,1,1
%>
<select name="newboardid" size="1">
<option value="">选择一个论坛</option>
<%
	do while not rs.eof
        response.write "<option value='"+CStr(rs("BoardID"))+"'>"+rs("Boardtype")+"</option>"+chr(13)+chr(10)
	rs.movenext
	loop
	rs.close
%>        
          </select>
			</td>
                        </tr>
                    <tr>
                <td bgcolor=<%=Tabletitlecolor%> valign=middle colspan=2 align=center><input type=submit name="submit" value="提 交"></td></tr></form></table></td></tr></table>
            </table>
            </td></tr>
            </table>
<%
	end if
	end sub

sub success()
%>
    <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 align="center"> 
      <td width="100%" bgcolor=<%=Tabletitlecolor%>>成功:帖子操作</td>
    </tr>
    <tr> 
      <td width="100%" bgcolor=<%=Tablebodycolor%>><li>帖子操作成功。<li>您的操作信息已经记录在案。<br>
      </td>
    </tr>
    <tr align="center"> 
      <td width="100%" bgcolor=<%=Tabletitlecolor%>>
<a href="list.asp?boardid=<%=request("boardid")%>"> << 返回论坛</a>
      </td>
    </tr>  
    </table>   </td></tr></table>
<%
end sub
	
	
	

	'更新指定论坛信息
	function LastCount(boardid)
		set rs=conn.execute("select top 1 topic,body,rootid,dateandtime,username from bbs1 where not locktopic=2 and boardid="&boardid&" order by announceid desc")
		if not(rs.eof and rs.bof) then
			Lasttopic=rs(0)
			body=rs(1)
			LastRootid=rs(2)
			LastPost=rs(3)
			LastPostUser=rs(4)
		else
			LastTopic="无"
			LastRootid=0
			LastPost=now()
			LastPostUser="无"
		end if
		if Lasttopic="" or isnull(Lasttopic) then LastTopic=left(body,20)
		rs.close
		set rs=nothing
	
		sql="update board set lasttopic='"&LastTopic&"',lastrootid='"&LastRootid&"',lastposttime='"&LastPost&"',lastpostuser='"&LastPostUser&"' where boardid="&boardid
		conn.execute(sql)
	end function
	
	'版面发帖数增加
	sub BoardNumAdd(boardid,topicNum,postNum,todayNum)
		sql="update board set lastbbsnum=lastbbsnum+"&postNum&",lasttopicNum=lasttopicNum+"&topicNum&",todayNum=todayNum+"&todayNum&" where boardid="&boardid
		conn.execute(sql)
	end sub
	
	'版面发帖数减少
	sub BoardNumSub(boardid,topicNum,postNum,todayNum)
		sql="update board set lastbbsnum=lastbbsnum-"&postNum&",lasttopicNum=lasttopicNum-"&topicNum&",todayNum=todayNum-"&todayNum&" where boardid="&boardid
		'response.write sql
		'response.end
		conn.execute(sql)
	end sub
	
	
	'所有论坛发帖数增加
	function AllboardNumAdd(todayNum,postNum,topicNum)
		sql="update config set TodayNum=todayNum+"&todaynum&",BbsNum=bbsNum+"&postNum&",TopicNum=topicNum+"&TopicNum
		conn.execute(sql)
	end function

	'所有论坛发帖数减少
	function AllboardNumSub(todayNum,postNum,topicNum)
		sql="update config set TodayNum=todayNum-"&todaynum&",BbsNum=bbsNum-"&postNum&",TopicNum=topicNum-"&TopicNum
		conn.execute(sql)
	end function

end if
%>
<!--#include file="footer.asp"-->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -