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

📄 index.asp

📁 公司企业网站管理系统全站源码,用于企业内部对网站的管理
💻 ASP
📖 第 1 页 / 共 3 页
字号:
						i=i+1
					Next
					If Dvbbs.Board_Setting(60)<>"" And Dvbbs.Board_Setting(60)<>"0" Then
						If Dvbbs.Board_Setting(38) = "0" Then
								PostTime = Node.selectSingleNode("@lastpost_2").text
						Else
								PostTime = Node.selectSingleNode("@dateandtime").text
						End If
						If DateDiff("n",Posttime,Now)+Cint(Dvbbs.Forum_Setting(0)) < CLng(Dvbbs.Board_Setting(61)) Then
							Node.setAttribute "datedifftime",DateDiff("n",Posttime,Now)+Cint(Dvbbs.Forum_Setting(0))
						End If
					End If
				Next
				XMLDom.documentElement.appendChild(topidlist.documentElement)
				End If
				Set Rs=Nothing
		End If
	End If
	If Not IsObject(Conn) Then ConnectionDatabase 
	If IsSqlDataBase=1 And IsBuss=1 Then
		Set Cmd = Server.CreateObject("ADODB.Command")
		Set Cmd.ActiveConnection=conn
		Cmd.CommandText="dv_list"
		Cmd.CommandType=4
		Cmd.Parameters.Append cmd.CreateParameter("@boardid",3)
		Cmd.Parameters.Append cmd.CreateParameter("@pagenow",3)
		Cmd.Parameters.Append cmd.CreateParameter("@pagesize",3)
		Cmd.Parameters.Append cmd.CreateParameter("@tl",3)
		Cmd.Parameters.Append cmd.CreateParameter("@topicmode",3)
		Cmd.Parameters.Append cmd.CreateParameter("@totalrec",3,2)
		Cmd("@boardid")=Dvbbs.BoardID
		Cmd("@pagenow")=page
		Cmd("@pagesize")=Cint(Dvbbs.Board_Setting(26))
		Cmd("@topicmode")=TopicMode
		Cmd("@tl")=0
		Set Rs=Cmd.Execute
		If Not Rs.EoF Then
			SQL=Rs.GetRows(-1)
			Set topidlist=Dvbbs.ArrayToxml(sql,rs,"row","topic")
		Else
			Set topidlist=Nothing
		End If
		Set Rs=Nothing
	Else
		Set Rs = Server.CreateObject ("adodb.recordset")
		If Cint(TopicMode)=0 Then
			Sql="Select  TopicID,boardid,title,postusername,postuserid,dateandtime,child,hits,votetotal,lastpost,lastposttime,istop,isvote,isbest,locktopic,Expression,TopicMode,Mode,GetMoney,GetMoneyType,UseTools,IsSmsTopic,hidename From Dv_Topic Where BoardID="&Dvbbs.BoardID&" And IsTop=0 Order By LastPostTime Desc"
		Else
			Sql="Select  TopicID,boardid,title,postusername,postuserid,dateandtime,child,hits,votetotal,lastpost,lastposttime,istop,isvote,isbest,locktopic,Expression,TopicMode,Mode,GetMoney,GetMoneyType,UseTools,IsSmsTopic,hidename From Dv_Topic Where Mode="&TopicMode&" and BoardID="&Dvbbs.BoardID&" And IsTop=0  Order By LastPostTime Desc"
		End If
		Rs.Open Sql,Conn,1,1
		If Page >1 Then
			Rs.Move (page-1) * Clng(Dvbbs.Board_Setting(26))
		End If
		If Not Rs.EoF Then
			SQL=Rs.GetRows(Dvbbs.Board_Setting(26))
			Set topidlist=Dvbbs.ArrayToxml(sql,rs,"row","topic")
		Else
			Set topidlist=Nothing
		End If
		Set Rs=Nothing
	End If
	SQL=Empty
	If Not topidlist Is Nothing Then 
		For Each Node in topidlist.documentElement.SelectNodes("row")
				Node.selectSingleNode("@title").text=Dvbbs.ChkBadWords(Node.selectSingleNode("@title").text)
				If Not Node.selectSingleNode("@topicmode").text ="1"  Then
						Node.selectSingleNode("@title").text=replace(Node.selectSingleNode("@title").text,"<","&lt;")
				End If
				Node.selectSingleNode("@postusername").text=Dvbbs.ChkBadWords(Node.selectSingleNode("@postusername").text)
				i=0
				For each lastpost in split(Node.selectSingleNode("@lastpost").text,"$")
					Node.setAttribute "lastpost_"& i,lastpost
					i=i+1
				Next
				If Dvbbs.Board_Setting(60)<>"" And Dvbbs.Board_Setting(60)<>"0" Then
					If Dvbbs.Board_Setting(38) = "0" Then
							PostTime = Node.selectSingleNode("@lastpost_2").text
					Else
							PostTime = Node.selectSingleNode("@dateandtime").text
					End If
					If DateDiff("n",Posttime,Now)+Cint(Dvbbs.Forum_Setting(0)) < CLng(Dvbbs.Board_Setting(61)) Then
						Node.setAttribute "datedifftime",DateDiff("n",Posttime,Now)+Cint(Dvbbs.Forum_Setting(0))
					End If
				End If
			Next
		XMLDom.documentElement.appendChild(topidlist.documentElement)
	End If
	Dvbbs.SqlQueryNum = Dvbbs.SqlQueryNum + 1
End Sub
Sub transform_topicList()
	If (Not Response.IsClientConnected) and Dvbbs.userid=0 Then
		Response.Clear
		Session(Dvbbs.CacheName & "UserID")=empty
		Response.End
	End If
	Dim proc,XMLStyle,node,cnode
	If Not IsObject(Application(Dvbbs.CacheName & "_listtemplate_"& Dvbbs.SkinID)) Then
		Set Application(Dvbbs.CacheName & "_listtemplate_"& Dvbbs.SkinID)=Server.CreateObject("Msxml2.XSLTemplate" & MsxmlVersion )
		Set XMLStyle=Server.CreateObject("Msxml2.FreeThreadedDOMDocument"& MsxmlVersion )
		XMLStyle.loadxml template.html(1) ' 
		'XMLStyle.load Server.MapPath("list.xslt")

		'插入各种图片的设置数据
		Set Node=XMLStyle.createNode(1,"xsl:variable","http://www.w3.org/1999/XSL/Transform")
		Set CNode=XMLStyle.createNode(2,"name","")
		CNode.text="picurl"
		Node.attributes.setNamedItem(CNode)
		node.text=Dvbbs.Forum_PicUrl
		XMLStyle.documentElement.appendChild(node)
		Set Node=XMLStyle.createNode(1,"xsl:variable","http://www.w3.org/1999/XSL/Transform")
		Set CNode=XMLStyle.createNode(2,"name","")
		CNode.text="pic_nofollow"
		Node.attributes.setNamedItem(CNode)
		node.text=Dvbbs.mainpic(10)
		XMLStyle.documentElement.appendChild(node)
		Set Node=XMLStyle.createNode(1,"xsl:variable","http://www.w3.org/1999/XSL/Transform")
		Set CNode=XMLStyle.createNode(2,"name","")
		CNode.text="pic_follow"
		Node.attributes.setNamedItem(CNode)
		node.text=Dvbbs.mainpic(11)
		XMLStyle.documentElement.appendChild(node)
		Set Node=XMLStyle.createNode(1,"xsl:variable","http://www.w3.org/1999/XSL/Transform")
		Set CNode=XMLStyle.createNode(2,"name","")
		CNode.text="ztopic"
		Node.attributes.setNamedItem(CNode)
		node.text=Dvbbs.mainpic(0)
		XMLStyle.documentElement.appendChild(node)
		Set Node=XMLStyle.createNode(1,"xsl:variable","http://www.w3.org/1999/XSL/Transform")
		Set CNode=XMLStyle.createNode(2,"name","")
		CNode.text="istopic"
		Node.attributes.setNamedItem(CNode)
		node.text=Dvbbs.mainpic(1)
		XMLStyle.documentElement.appendChild(node)
		Set Node=XMLStyle.createNode(1,"xsl:variable","http://www.w3.org/1999/XSL/Transform")
		Set CNode=XMLStyle.createNode(2,"name","")
		CNode.text="opentopic"
		Node.attributes.setNamedItem(CNode)
		node.text=Dvbbs.mainpic(2)
		XMLStyle.documentElement.appendChild(node)
		Set Node=XMLStyle.createNode(1,"xsl:variable","http://www.w3.org/1999/XSL/Transform")
		Set CNode=XMLStyle.createNode(2,"name","")
		CNode.text="hottopic"
		Node.attributes.setNamedItem(CNode)
		node.text=Dvbbs.mainpic(3)
		XMLStyle.documentElement.appendChild(node)
		Set Node=XMLStyle.createNode(1,"xsl:variable","http://www.w3.org/1999/XSL/Transform")
		Set CNode=XMLStyle.createNode(2,"name","")
		CNode.text="ilocktopic"
		Node.attributes.setNamedItem(CNode)
		node.text=Dvbbs.mainpic(4)
		XMLStyle.documentElement.appendChild(node)
		Set Node=XMLStyle.createNode(1,"xsl:variable","http://www.w3.org/1999/XSL/Transform")
		Set CNode=XMLStyle.createNode(2,"name","")
		CNode.text="besttopic"
		Node.attributes.setNamedItem(CNode)
		node.text=Dvbbs.mainpic(5)
		XMLStyle.documentElement.appendChild(node)
		Set Node=XMLStyle.createNode(1,"xsl:variable","http://www.w3.org/1999/XSL/Transform")
		Set CNode=XMLStyle.createNode(2,"name","")
		CNode.text="votetopic"
		Node.attributes.setNamedItem(CNode)
		node.text=Dvbbs.mainpic(6)
		XMLStyle.documentElement.appendChild(node)
		Set Node=XMLStyle.createNode(1,"xsl:variable","http://www.w3.org/1999/XSL/Transform")
		Set CNode=XMLStyle.createNode(2,"name","")
		CNode.text="pic_toptopic1"
		Node.attributes.setNamedItem(CNode)
		node.text=Dvbbs.mainpic(19)
		XMLStyle.documentElement.appendChild(node)
		Application(Dvbbs.CacheName & "_listtemplate_"& Dvbbs.SkinID).stylesheet=XMLStyle
	End If
	Set proc = Application(Dvbbs.CacheName & "_listtemplate_"& Dvbbs.SkinID).createProcessor()
	proc.input = XMLDom
	'test
	'XMLDom.save Server.MapPath("list.asp.xml")
	proc.transform()
	Response.Write  Dvbbs.ArchiveHtml(proc.output)
	Set XMLDom=Nothing 
	Set proc=Nothing
End Sub
Sub LoadBoardlistData()
	Dim Node,Xpath,LastPost,BoardiD,Xpath1
	Set XMLDom=Application(Dvbbs.CacheName&"_boardlist").cloneNode(True)
	XMLDom.documentElement.setAttribute "boardid",Dvbbs.BoardID
	If Dvbbs.Boardid=0 Then
		Xpath="board[@depth=1]"
		Xpath1="board[@depth=0]"
		XMLDom.documentElement.appendChild(Application(Dvbbs.CacheName &"_grouppic").documentElement.cloneNode(True))
		If Not IsObject(Application(Dvbbs.CacheName & "_link")) Then LoadlinkList()
		XMLDom.documentElement.appendChild(Application(Dvbbs.CacheName & "_link").documentElement.cloneNode(True))
		Rem ===============传送论坛信息和设置数据到XML===============================================================
		Set Node=XMLDom.documentElement.appendChild(XMLDom.createNode(1,"forum_info",""))
		Node.setAttribute "forum_type",Dvbbs.forum_info(0)
		Node.setAttribute "forum_maxonline",Dvbbs.CacheData(5,0)
		Node.setAttribute "forum_maxonlinedate",Dvbbs.CacheData(6,0)
		Node.setAttribute "forum_topicnum",Dvbbs.CacheData(7,0)
		Node.setAttribute "forum_postnum",Dvbbs.CacheData(8,0)
		Node.setAttribute "forum_todaynum",Dvbbs.CacheData(9,0)
		Node.setAttribute "forum_usernum",Dvbbs.CacheData(10,0)
		Node.setAttribute "forum_yesterdaynum",Dvbbs.CacheData(11,0)
		Node.setAttribute "forum_maxpostnum",Dvbbs.CacheData(12,0)
		Node.setAttribute "forum_maxpostdate",Dvbbs.CacheData(13,0)
		Node.setAttribute "forum_lastuser",Dvbbs.CacheData(14,0)
		Node.setAttribute "forum_online",MyBoardOnline.Forum_Online
		Node.setAttribute "forum_useronline",MyBoardOnline.Forum_UserOnline
		Node.setAttribute "forum_guestonline",MyBoardOnline.Forum_GuestOnline
		Node.setAttribute "forum_createtime",FormatDateTime(Dvbbs.Forum_Setting(74),1)
		Set Node=XMLDom.documentElement.appendChild(XMLDom.createNode(1,"forum_setting",""))
		Node.setAttribute "logincheckcode",Dvbbs.forum_setting(79)'登录验证码设置
		If Dvbbs.Forum_ChanSetting(0)=1 And Dvbbs.Forum_ChanSetting(10)=1 Then 	Node.setAttribute "loginmobile",""'手机会员登录
		Node.setAttribute "rss",Dvbbs.Forum_ChanSetting(2)'rss订阅
'		Node.setAttribute "wap",Dvbbs.Forum_ChanSetting(1)'wap访问
		Node.setAttribute "pic_0",template.pic(0)
		Node.setAttribute "pic_1",template.pic(1)
		Node.setAttribute "pic_2",template.pic(2)
		Node.setAttribute "pic_3",template.pic(3)
		Node.setAttribute "issearch_a",0
		Node.setAttribute "ForumUrl",Dvbbs.Get_ScriptNameUrl()
		Node.setAttribute "dvgetcode",Dvbbs.GetCode()
		
		If Dvbbs.Forum_setting(29)="1" Then
			If Not IsObject(Application(Dvbbs.CacheName & "_biruser")) Then
				Forum_BirUser()
			ElseIf Application(Dvbbs.CacheName & "_biruser").documentElement.selectSingleNode("@date").text <> CStr(Date()) Then
				Forum_BirUser()
			End If
			XMLDom.documentElement.appendChild(Application(Dvbbs.CacheName &"_biruser").documentElement.cloneNode(True))
		End If

		If Not (XMLDOM.documentElement.firstchild is nothing) Then
			If Not IsObject(Application(Dvbbs.CacheName &"_information_" & XMLDOM.documentElement.firstchild.getAttribute("boardid")) ) Then
			Dvbbs.LoadAllBoardinformation()
			End If
		End If
		Rem ========================================================================================================================================
	Else
		Xpath="board[@parentid="&Dvbbs.BoardID&" and @depth="& CLng(XMLDom.documentElement.selectSingleNode("board[@boardid="& Dvbbs.boardid &"]/@depth").text)+1&"]"
		Xpath1="board[@boardid="& Dvbbs.Boardid&"]"
	End If
	If Dvbbs.BoardID<>0 Then
		Set Node=XMLDom.documentElement.appendChild(XMLDom.createNode(1,"forum_setting",""))
		Node.setAttribute "pic_0",template.pic(0)
		Node.setAttribute "pic_1",template.pic(1)
		Node.setAttribute "pic_2",template.pic(2)
		Node.setAttribute "pic_3",template.pic(3)
		Node.setAttribute "issearch_a",1
	End If

	For Each Node In XMLDom.documentElement.selectNodes(Xpath)
		BoardId=Node.selectSingleNode("@boardid").text
		If Not IsObject(Application(Dvbbs.CacheName &"_information_" & BoardID) ) Then Dvbbs.LoadBoardinformation BoardID


		LastPost=Node.appendChild(Application(Dvbbs.CacheName &"_information_" & BoardID).documentElement.firstChild.cloneNode(True)).selectSingleNode("@lastpost_2").text
		If Not IsDate(LastPost) Then LastPost=Now()
		If DateDiff("h",Dvbbs.Lastlogin,LastPost)=0 Then Node.setAttribute "newpost","1"
		XMLDom.documentElement.appendChild(Application(Dvbbs.CacheName &"_boardmaster").documentElement.selectSingleNode("boardmaster[@boardid='"& boardid &"']").cloneNode(True))
	Next
	XMLDOM.documentElement.setAttribute "picurl",Dvbbs.Forum_PicUrl
	XMLDOM.documentElement.setAttribute "lastupdate",Now()
	If CachePage Then 
		Set Application(Dvbbs.CacheName & "_Pagecache_index_" & Dvbbs.BoardID)=XMLDOM.cloneNode(True)
	End If 
End Sub
Sub BoardList()
	If Dvbbs.BoardID=0 Then
		ShowNews()
	ElseIf Application(Dvbbs.CacheName&"_boardlist").documentElement.selectSingleNode("board[@boardid="&dvbbs.boardid&"]/@nopost").text<>"1" Then 
		ShowNews()
	End If
	Dim Node,ShowMod,Xpath1,BoardId
	If CachePage Then

⌨️ 快捷键说明

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