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

📄 indivgroup_dispbbs.asp

📁 公司企业网站管理系统全站源码,用于企业内部对网站的管理
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->
<!--#include file="inc/const.asp"-->
<!--#include file="inc/dv_clsother.asp"-->
<!--#include file="inc/dv_ubbcode.asp"-->
<!--#include file="Dv_plus/IndivGroup/Dv_IndivGroup_Config.asp"-->
<!--#include file="Dv_plus/IndivGroup/Dv_IndivGroup_MainCls.asp"-->
<%
Dim Rs,SQL,TopicInfo
Dim TopicID,ReplyID,Star,Skin,TopicTitle,TopFlag,TopicCount,PostUserName,TopicLockFlag
Dim CanRead,TrueMaster,CanReply

If Dv_IndivGroup_MainClass.ID=0 Or Dv_IndivGroup_MainClass.Name="" Then Response.redirect "showerr.asp?ErrCodes=对不起,你访问的圈子不存在或已经被删除&action=OtherErr"
If Dv_IndivGroup_MainClass.PowerFlag>0 Then
	If Dv_IndivGroup_MainClass.PowerFlag>3 And Dv_IndivGroup_MainClass.GroupStats=3 Then Response.redirect "showerr.asp?ErrCodes=<li>圈子“"&Dv_IndivGroup_MainClass.Name&"”已关闭,只有圈子管理员才能进入。&action=OtherErr"
Else
	Response.redirect "showerr.asp?ErrCodes=<li>抱歉,圈子“"&Dv_IndivGroup_MainClass.Name&"”不公开,只有圈子成员才能进入。&action=OtherErr"
End If
If Dv_IndivGroup_MainClass.BoardID=0 Then Response.Write "错误,栏目ID为0,该帖子不能浏览。"
Dvbbs.LoadTemplates("indivgroup")

Dim replyid_a,AnnounceID_a,RootID_a
Dim PostBuyUser,abgcolor,bgcolor,UserName
Dim Page,action,n,EmotPath,dv_ubb

Call Chk_Topic_Err:Dvbbs.Showerr()
Response.Write Dvbbs.mainhtml(18)
Dvbbs.Nav()
Dv_IndivGroup_MainClass.Head_var 1,"",""

If UserFlashGet = 1 Then
%>
<!--#include file="Dv_plus/Flashget/Flashget_base64.asp"-->
<%
	Response.Write "<script src=""http://ufile.kuaiche.com/Flashget_union.php?fg_uid="&FlashGetID&"""></script>"
End If

GetForumTextAd(0)
Dvbbs.ActiveOnline()
Page=Dvbbs.CheckNumeric(Request("Page")):If Page=0 Then Page=1

Set Dv_ubb=new Dvbbs_UbbCode
Dv_ubb.PostType=1
Show_Topic_HTML()
Set Dv_ubb=Nothing

Dvbbs.Footer()

Sub Chk_Topic_Err()
	TopicID=Dvbbs.CheckNumeric(Request("ID")):If TopicID=0 Then Dvbbs.AddErrCode(30):Exit Sub
	ReplyID=Dvbbs.CheckNumeric(Request("ReplyID")):If ReplyID=0 Then ReplyID=TopicID
	Star=Dvbbs.CheckNumeric(Request("Star")):If Star=0 Then Star=1
	Skin=Dvbbs.CheckNumeric(Request("Skin"))
	'浏览帖子权限
	If Dv_IndivGroup_MainClass.PowerFlag>0 And Dv_IndivGroup_MainClass.PowerFlag<4 Then TrueMaster=True	
	CanRead=False:CanReply=True

	SQL="Select GroupID,title,istop,isbest,PostUserName,PostUserid,hits,child,pollid,LockTopic,BoardID,TopicMode,DateAndTime,Expression,TopicID,topicID as ReplyID,topicID as star,topicID as page,topicID as skin From Dv_Group_Topic where GroupID="&Dv_IndivGroup_MainClass.ID&" And BoardID="&Dv_IndivGroup_MainClass.BoardID&" And TopicID="&TopicID
	Set Rs=Dv_IndivGroup_MainClass.Execute(SQL)
	If Not(Rs.BOF and Rs.EOF) then
		If Rs(10)=Dv_IndivGroup_MainClass.BoardID Then
			Dv_IndivGroup_MainClass.Execute("Update Dv_Group_Topic Set hits=hits+1 Where GroupID="&Dv_IndivGroup_MainClass.ID&" And TopicID="&TopicID)
			TopicTitle=Rs(1)
			TopFlag=Rs(2)
			TopicCount=Rs(7)+1
			PostUserName = Rs(4)
			TopicLockFlag = Rs(9)
			TopicTitle=Replace(Dvbbs.ChkBadWords(TopicTitle),"<","&lt;")
			Dv_IndivGroup_MainClass.Stats = TopicTitle
			Set Topicinfo=Dvbbs.RecordsetToxml(Rs,"postinfo","xml")
		Else
			'Dvbbs.AddErrCode(29)
		End if
	Else
		Dvbbs.AddErrcode(32)
	End If
	Rs.Close:Set Rs=Nothing
End Sub

Function Topic_Ads(n)
	Randomize
	Topic_Ads=Dvbbs.Forum_ads(n)(CInt(UBound(Dvbbs.Forum_ads(n))*Rnd))
End Function

Sub Show_Topic_HTML()
	Dim namestyle,nameglow(7)
	Dim i,XMLDom,Node
	Dim PageCount,postarray,postuseridlist,postuserlist,UserGroupID,postbody,Topic,cmd,postbuyusers,UserIM
	Dim userface
	nameglow(0)=Dvbbs.mainsetting(9):nameglow(1)=Dvbbs.mainsetting(7):nameglow(2)=Dvbbs.mainsetting(7):nameglow(3)=Dvbbs.mainsetting(5):nameglow(6)="gray":nameglow(7)=Dvbbs.mainsetting(11)
	'是否开启帖间广告
	If Dvbbs.Forum_ads(7)="1" Then
		Dvbbs.Forum_ads(14)=replace(Dvbbs.Forum_ads(14),Chr(13),"")
		Dvbbs.Forum_ads(14)=Split(Dvbbs.Forum_ads(14),Chr(10))
	End If
	'帖子顶楼顶部广告位
	If Dvbbs.Forum_ads(18)="1" Then
		Dvbbs.Forum_ads(19)=replace(Dvbbs.Forum_ads(19),Chr(13),"")
		Dvbbs.Forum_ads(19)=Split(Dvbbs.Forum_ads(19),Chr(10))
	End If
	'帖子顶楼底部广告位
	If Dvbbs.Forum_ads(20)="1" Then
		Dvbbs.Forum_ads(21)=replace(Dvbbs.Forum_ads(21),Chr(13),"")
		Dvbbs.Forum_ads(21)=Split(Dvbbs.Forum_ads(21),Chr(10))
	End If
	'帖子顶楼左右广告位
	If Dvbbs.Forum_ads(22)<>"0" Then
		Dvbbs.Forum_ads(23)=replace(Dvbbs.Forum_ads(23),Chr(13),"")
		Dvbbs.Forum_ads(23)=Split(Dvbbs.Forum_ads(23),Chr(10))
	End If

	'插入顶帖广告节点
	Set Node = TopicInfo.documentElement.firstChild.appendChild(TopicInfo.createNode(1,"forum_ads",""))
		Node.attributes.setNamedItem(TopicInfo.createNode(2,"id","")).text = 18
		Node.attributes.setNamedItem(TopicInfo.createNode(2,"set","")).text = Dvbbs.Forum_ads(18)
	If Dvbbs.Forum_ads(18)="1" Then
		Node.attributes.setNamedItem(TopicInfo.createNode(2,"code","")).text = Topic_Ads(19)
	End If
	Set Node = TopicInfo.documentElement.firstChild.appendChild(TopicInfo.createNode(1,"forum_ads",""))
		Node.attributes.setNamedItem(TopicInfo.createNode(2,"id","")).text = 20
		Node.attributes.setNamedItem(TopicInfo.createNode(2,"set","")).text = Dvbbs.Forum_ads(20)
	If Dvbbs.Forum_ads(20)="1" Then
		Node.attributes.setNamedItem(TopicInfo.createNode(2,"code","")).text = Topic_Ads(21)
	End If
	Set Node = TopicInfo.documentElement.firstChild.appendChild(TopicInfo.createNode(1,"forum_ads",""))
		Node.attributes.setNamedItem(TopicInfo.createNode(2,"id","")).text = 22
		Node.attributes.setNamedItem(TopicInfo.createNode(2,"set","")).text = Dvbbs.Forum_ads(22)
	If Dvbbs.Forum_ads(22)<>"0" Then
		Node.attributes.setNamedItem(TopicInfo.createNode(2,"code","")).text = Topic_Ads(23)
	End If

	If TopicCount mod 10=0 then
			PageCount= TopicCount \ 10
	Else
			PageCount= TopicCount \ 10+1
	End If
	If star > PageCount Then star = PageCount
	If star < 1 Then star = 1
	If Skin=1 Then
		If Clng(replyid)=Clng(TopicID) Then
			SQL="Select Top 1 AnnounceID,GroupID,UserName,Topic,dateandtime,body,Expression,ip,RootID,signflag,isbest,PostUserid,layer,isagree,IsUpload,Ubblist,TopicLockFl,ParentID From Dv_Group_BBS where RootID="& TopicID &" and Boardid="&Dv_IndivGroup_MainClass.BoardID&" And GroupID="&Dv_IndivGroup_MainClass.ID
		Else
			SQL="Select AnnounceID,GroupID,UserName,Topic,dateandtime,body,Expression,ip,RootID,signflag,isbest,PostUserid,layer,isagree,IsUpload,Ubblist,LockTopic,ParentID From Dv_Group_BBS where AnnounceID="&replyID&" and Boardid="&Dv_IndivGroup_MainClass.BoardID&" And GroupID="&Dv_IndivGroup_MainClass.ID
		End If
	Else
		SQL="Select AnnounceID,GroupID,UserName,Topic,dateandtime,body,Expression,ip,RootID,signflag,isbest,PostUserid,layer,isagree,IsUpload,Ubblist,LockTopic,ParentID From Dv_Group_BBS where RootID="& TopicID &" and Boardid="&Dv_IndivGroup_MainClass.BoardID&" And GroupID="&Dv_IndivGroup_MainClass.ID&" Order By Announceid"
	End If
	Set Rs=Dvbbs.Execute(SQL)
	If Not Rs.EOF Then
		If Not Skin=1 Then Rs.Move(10*(star-1))
		If Not Rs.EOF Then
			TopicInfo.documentElement.firstChild.selectSingleNode("@replyid").text=Rs(0)
			TopicInfo.documentElement.firstChild.selectSingleNode("@star").text=star
			TopicInfo.documentElement.firstChild.selectSingleNode("@page").text=page
			TopicInfo.documentElement.firstChild.selectSingleNode("@skin").text=skin



			If TopicInfo.documentElement.firstChild.selectSingleNode("@topicmode").text <> "1" Then
				TopicInfo.documentElement.firstChild.selectSingleNode("@title").text=replace(TopicInfo.documentElement.firstChild.selectSingleNode("@title").text,"<","&lt;")
			End If
			postarray=Rs.GetRows(10)
			Set XMLDom=Dvbbs.ArrayToxml(postarray,rs,"row","post")
			postarray=null
			'循环中整理数据,并取出发贴用户ID列表
			i=0
			For Each Node In XmlDom.documentElement.SelectNodes("row")

⌨️ 快捷键说明

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