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

📄 wap_board.asp

📁 一个功能强大的asp招聘求职系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="Conn.asp"-->
<!-- #include file="inc/const.asp" -->
<!--#include file="inc/Class_Mobile.asp"-->
<%
'版面列表
'http://bbs.dvbbs.net/wap_board.asp?path=/&stype=3&startid=19&child=4&echild=2&mobile=123456789123&number=1
Dim EmotPath,Forum_Url
Dim FoundTopTopic
FoundTopTopic = False
Dvbbs.LoadTemplates("dispbbs")
Forum_Url = Dvbbs.Get_ScriptNameUrl
EmotPath= Forum_Url & Split(Dvbbs.Forum_emot,"|||")(0)		'em心情路径

DvbbsWap.ShowXMLStar
If DvbbsWap.PathCount = -1 or DvbbsWap.Mobile=0 or DvbbsWap.Child=0 Then
	DvbbsWap.ShowErr 0,"参数错误,请确认从有效的地址访问!"
Else
	Select Case DvbbsWap.Child
		Case 1 :	'只显示版块
			ShowBoard()
		Case 2 :	'只显示主题
			ShowTopic()
		Case 3 :	'显示主题及版块
			ShowBoard()
			ShowTopic()
		Case 4 :	'浏览帖子
			Dim Announceid,TotalUseTable,FoundErr,Star
			Dim TopicCount,Topic
			FoundErr = False
			If DvbbsWap.StartID="" Then DvbbsWap.StartID=1
			Star = Clng(DvbbsWap.StartID)	'分页
			Chk_Topic_Err
			If FoundTopTopic Then
				ShowTopic()
			Else
				ShowDispbbs()
			End If
		Case Else
			DvbbsWap.ShowErr 0,"参数错误,请确认从有效的地址访问!"
	End Select
End If

DvbbsWap.ShowXMLEnd

'显示版块
Sub ShowBoard()
	Dim Rs,Sql,SearchSQL
	Dim i,Board_Datas,LastPost,Setings,Loadboard
	Dim Show_Content
	Dim TotalNum,n,page
	Sql = "select boardid,BoardType,ParentID,ParentStr,Depth,RootID,Child,Readme,BoardMaster,PostNum,TopicNum,indexIMG,todayNum,boarduser,LastPost,Sid,Board_Setting,Board_user,IsGroupSetting,BoardTopStr From Dv_board "
	If DvbbsWap.PathCount = 1 or DvbbsWap.PathCount = -1 Then
		SearchSQL = "where ParentID=0 "
		Sql = Sql & SearchSQL
		DvbbsWap.Stype = 1
	Else
		If Not IsNumeric(DvbbsWap.Path(DvbbsWap.PathCount-1)) or DvbbsWap.Path(DvbbsWap.PathCount-1)="" Then Exit Sub
		SearchSQL = "where ParentID="& DvbbsWap.Path(DvbbsWap.PathCount-1)
		Sql = Sql & SearchSQL
		DvbbsWap.Stype = 2
	End If
	Sql = Sql & " order by orders,boardid"

	If DvbbsWap.StartID="" or DvbbsWap.StartID=0 Then DvbbsWap.StartID=1
	page = Clng(DvbbsWap.StartID)	'分页
	If DvbbsWap.Number = 0 THen DvbbsWap.Number = 10	'每页记录数
	TotalNum = Dvbbs.Execute("Select Count(*) From Dv_Board "&SearchSQL)(0)
	Set Rs = Dvbbs.Execute(Sql)
	If Rs.Eof And Rs.Bof Then
		DvbbsWap.ShowErr 0,"找不到数据,请返回!"
		Rs.Close
		Exit Sub
	End If
	If TotalNum Mod DvbbsWap.Number=0 Then
				n = TotalNum \ DvbbsWap.Number
	Else
	     		n = TotalNum \ DvbbsWap.Number+1
  	End If
	Rs.MoveFirst
	Response.Write "<pagecounter>"&N&"</pagecounter>"
	If page > n Then
		page = n
		DvbbsWap.ShowErr 0,"参数错误,请返回!"
		Exit Sub
	End If
	If page < 1 Then page = 1
	If page > 1 Then 				
		Rs.Move (page-1) * DvbbsWap.Number
	End if
	If Rs.Eof Then
		Rs.Close
		DvbbsWap.AddErrCode(29)
		Exit Sub
	Else
		Board_Datas = Rs.GetRows(DvbbsWap.Number)
		Rs.Close
	End If

	'显示我发表的主题链接
	'ShowCodes(S_Self ,S_Child ,S_Sid ,S_Stype ,S_Name ,S_Content ,S_OtherContent,S_Author ,S_Createtime ,S_Modifytime)
	If (DvbbsWap.PathCount = 1 or DvbbsWap.PathCount = -1) And Dvbbs.UserID > 0 Then
		DvbbsWap.ShowCodes DvbbsWap.Self,2,-1,DvbbsWap.Stype ,"我发表的主题" ,DvbbsWap.Format_Content( 0 , "我在此论坛发表过的主题列表" ) ,"","自己" ,"" ,Now()
	End If
	'显示我发表的主题链接
	For i=0 To Ubound(Board_Datas,2)
			Loadboard = True
			Setings = Split(Board_Datas(16,i),",")
			If CInt(Setings(1))=1 And CInt(Dvbbs.GroupSetting(37))<>1 Then Loadboard = False
			If Loadboard Then
				LastPost = Split(Board_Datas(14,i),"$")(2)
				If Not IsDate(LastPost) Then LastPost = Now()
				Show_Content = DvbbsWap.Format_Content( 0 , DvbbsWap.ForMatHtml(Board_Datas(7,i)) )
				If Clng(Board_Datas(6,i))>0 Then	'当有下属版块,设置显示主题则为3,不显示为1,没有下属版块则为2
					If Cint(Setings(43)) = 1 Then
						DvbbsWap.Child = 1
					Else
						DvbbsWap.Child = 3
					End If
				Else
					DvbbsWap.Child = 2
				End If
				DvbbsWap.ShowCodes DvbbsWap.Self,DvbbsWap.Child,Board_Datas(0,i),DvbbsWap.Stype ,Board_Datas(1,i) ,Show_Content ,"",Board_Datas(8,i) ,"" ,LastPost
			End If
	Next
	Set Rs=Nothing
End Sub

'显示主题
Sub ShowTopic()
	Dim Rs,Sql
	Dvbbs.BoardID = DvbbsWap.Path(DvbbsWap.PathCount-1)
	If Dvbbs.BoardID<>"" And IsNumeric(Dvbbs.BoardID) Then
		Dvbbs.BoardID = Clng(Dvbbs.BoardID)
	Else
		DvbbsWap.AddErrCode(29)
		Exit Sub
	End If

	Select Case Dvbbs.BoardID
	Case -1
		'查看自己的帖子
		'Exit Function
	Case -2
		'查看固顶类帖子
		Dvbbs.BoardID = DvbbsWap.Path(DvbbsWap.PathCount-2)
		If Dvbbs.BoardID<>"" And IsNumeric(Dvbbs.BoardID) Then
			Dvbbs.BoardID = Clng(Dvbbs.BoardID)
		Else
			DvbbsWap.AddErrCode(29)
			Exit Sub
		End If
		DvbbsWap.LoadBoardPass
	Case Else
		DvbbsWap.LoadBoardPass
	End Select

	'查看固顶和总固顶主题
	If Not Dvbbs.BoardID = -1 And Not FoundTopTopic Then DvbbsWap.ShowCodes DvbbsWap.Self,4,-2 ,1 ,"查看本论坛重要通知和固顶主题" ,"查看本论坛总固顶、区域固顶、版面固顶主题" ,"","管理员" ,Now() ,Now()

	Dim TopicMode,page,ti,n,Cmd,limitime,LastPost,LastPostTime
	Dim S_Content
	Dim TopicNum
	TopicMode = 0
	If DvbbsWap.StartID="" or DvbbsWap.StartID=0 Then DvbbsWap.StartID=1
	page = Clng(DvbbsWap.StartID)	'分页
	If DvbbsWap.Number = 0 THen DvbbsWap.Number = 10	'每页记录数

	If Dvbbs.BoardID > 0 Then TopicNum = Application(Dvbbs.CacheName &"_information_" & node.text).documentElement.selectSingleNode("information/@topicnum").text	'该版块主题数

	If Not IsObject(Conn) Then ConnectionDatabase
	If FoundTopTopic Then
		'查询总固顶、区域固顶、版面固顶帖子
		Dim Forum_AllTopNum
		Forum_AllTopNum=Dvbbs.CacheData(28,0)
		If Trim(Application(Dvbbs.CacheName &"_information_" & Dvbbs.boardid).documentElement.selectSingleNode("information/@boardtopstr").text)<>"" Then
			If Trim(Forum_AllTopNum)<>"" Then
				Forum_AllTopNum = Forum_AllTopNum & "," & Application(Dvbbs.CacheName &"_information_" & Dvbbs.boardid).documentElement.selectSingleNode("information/@boardtopstr").text
			Else
				Forum_AllTopNum = Application(Dvbbs.CacheName &"_information_" & Dvbbs.boardid).documentElement.selectSingleNode("information/@boardtopstr").text
			End If
		End If
		If Trim(Forum_AllTopNum)<>"" Then
			Sql="Select TopicID,boardid,title,postusername,postuserid,dateandtime,child,hits,votetotal,lastpost,lastposttime,istop,isvote,isbest,locktopic,Expression,TopicMode,Mode,GetMoney,GetMoneyType,UseTools From Dv_Topic Where istop>0 and TopicID in ("&Forum_AllTopNum&") Order By istop desc, Lastposttime Desc"
			Set Rs = server.CreateObject ("adodb.recordset")
			Rs.Open Sql,Conn,1,1
			TopicNum = Ubound(Split(Forum_AllTopNum,","))
		Else
			Response.Write "<pagecounter>0</pagecounter>"
		End If
	ElseIf Dvbbs.UserID > 0 And Dvbbs.BoardID = -1 Then
		'查询我发表的主题
		Set Rs=Dvbbs.Execute("Select Count(*) From Dv_Topic Where PostUserID = "&Dvbbs.UserID)
		TopicNum = Rs(0)
		If IsNull(TopicNum) Then TopicNum = 0
		Sql="Select TopicID,boardid,title,postusername,postuserid,dateandtime,child,hits,votetotal,lastpost,lastposttime,istop,isvote,isbest,locktopic,Expression,TopicMode,Mode,GetMoney,GetMoneyType,UseTools From Dv_Topic Where PostUserID = "&Dvbbs.UserID&" Order By LastPostTime Desc"
		Set Rs = server.CreateObject ("adodb.recordset")
		Rs.Open Sql,Conn,1,1
	ElseIf 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")=DvbbsWap.Number
		Cmd("@topicmode")=TopicMode
		If limitime="" Then
			Cmd("@tl")=0
		Else
			Cmd("@tl")=limitime
		End If
		set Rs=Cmd.Execute
	Else
		Sql="Select TopicID,boardid,title,postusername,postuserid,dateandtime,child,hits,votetotal,lastpost,lastposttime,istop,isvote,isbest,locktopic,Expression,TopicMode,Mode,GetMoney,GetMoneyType,UseTools From Dv_Topic Where BoardID="&Dvbbs.BoardID&" And IsTop=0 Order By LastPostTime Desc"
		Set Rs = server.CreateObject ("adodb.recordset")
		Rs.Open Sql,Conn,1,1
	End If
	If Not (Rs.Eof And Rs.Bof) Then
		If TopicNum Mod DvbbsWap.Number=0 Then
			n = TopicNum \ DvbbsWap.Number
		Else
	     	n = TopicNum \ DvbbsWap.Number+1
  		End If

⌨️ 快捷键说明

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