📄 index.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="inc/const.asp"-->
<!--#include file="inc/dv_clsother.asp"-->
<%
Rem 首页页面设置
Const CachePage=false '是否做页面缓存
Const CacheTime=60 '缓存失效时间
Dim XMLDom,page,TopicMode,Cmd
If Request("w") = "1" Then
Passport_Main()
Response.End
End If
If (Not Response.IsClientConnected) and Dvbbs.userid=0 Then
Session(Dvbbs.CacheName & "UserID")=empty
Response.Clear
Response.End
Else
If Request("action")="xml" Then
Showxml()
Elseif Request("action")="frameon" Then
ShowIsleft()
Else
Main()
End If
End If
Sub ShowIsleft()
Dim RightUrl
RightUrl = Request.QueryString("url")
If RightUrl = "" Then
RightUrl = Dvbbs.ArchiveHtml("index.asp")
Else
If Request.Cookies("geturl")<>RightUrl Then
RightUrl = Dvbbs.ArchiveHtml(Request.Cookies("geturl"))
End If
End If
%>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<TITLE><%=Dvbbs.Forum_Info(0)%></TITLE>
<STYLE>
.navPoint { CURSOR: hand;}
body { OVERFLOW-X: hidden; OVERFLOW: hidden; height:100% }
td { font-size:12px; }
</STYLE>
<SCRIPT>
var status = 1;
function switchSysBar(){
if (1 == window.status){
window.status = 0;
switchPoint.innerHTML = '<img src="images/others/left.gif">';
document.all("frmTitle").style.display="none"
}
else{
window.status = 1;
switchPoint.innerHTML = '<img src="images/others/right.gif">';
document.all("frmTitle").style.display="block"
}
}
</SCRIPT>
<BODY style="MARGIN: 0px">
<TABLE border=0 cellPadding=0 cellSpacing=0 height="100%" width="100%">
<TBODY>
<TR>
<TD align=middle id=frmTitle vAlign=top name="fmTitle" height="100%"><IFRAME frameBorder=0 id=left name=left src="frameleft.asp" style="HEIGHT: 100%; VISIBILITY: inherit;WIDTH: 180px;"></IFRAME>
<TD bgColor="#337ABB" style="WIDTH: 10px">
<TABLE border="0" cellPadding="0" cellSpacing="0" height="100%" style="WIDTH: 10px">
<TBODY>
<TR>
<TD onclick=switchSysBar() style="HEIGHT: 100%"><SPAN class="navPoint" id="switchPoint" title="关闭/打开左栏"><img src="images/others/right.gif"></SPAN></TD></TR></TBODY></TABLE></TD>
<TD style="WIDTH: 100%" vAlign=top>
<IFRAME frameBorder=0 id=frmright name=frmright scrolling=yes src="<%=RightUrl%>" style="HEIGHT:100%; VISIBILITY: inherit; WIDTH:100%; Z-INDEX: 1">
</IFRAME></TD></TR></TBODY></TABLE></body></html>
<%
End Sub
Sub Showxml()
Dim node,BoardNode
Set XMLDOM=Application(Dvbbs.CacheName&"_boardlist").cloneNode(True)
For each node in XMLDOM.documentElement.getElementsByTagName("board")
If node.attributes.getNamedItem("hidden").text="1" and Dvbbs.GroupSetting(37)="0" Then
node.parentNode.removeChild(node)
End If
If Request("pid") <> "" and node.attributes.getNamedItem("parentid").text<>Request("pid") Then
node.parentNode.removeChild(node)
End If
node.removeAttribute "indeximg"
node.removeAttribute "readme"
Next
Response.Clear
Response.CharSet="gb2312"
Response.ContentType="text/xml"
Response.Write "<?xml version=""1.0"" encoding=""gb2312""?>"&vbNewLine
Response.Write XMLDom.documentElement.XML
Response.Flush
Set XMLDOM=Nothing
Set Dvbbs=Nothing
Response.End
End Sub
Sub Main()
Dvbbs.LoadTemplates("index")
If Dvbbs.BoardID=0 Then
Dvbbs.Stats=Replace(template.Strings(0),"动网先锋论坛",Dvbbs.Forum_Info(0))
Response.Write Dvbbs.mainhtml(18)
Dvbbs.Nav()
Dvbbs.ActiveOnline()
GetForumTextAd(0)
BoardList()
Else
Chk_List_Err()
TopicMode=0
If Request("topicmode")<>"" and IsNumeric(Request("topicmode")) Then TopicMode=Cint(Request("topicmode"))
If Dvbbs.Board_Setting(43)="0" Then
Dvbbs.Stats=Dvbbs.LanStr(7)
Else
Dvbbs.Stats=Dvbbs.LanStr(8)
End If
Response.Write Dvbbs.mainhtml(18)
Dvbbs.Nav()
Dvbbs.ActiveOnline()
Dvbbs.Head_var 1,Application(Dvbbs.CacheName&"_boardlist").documentElement.selectSingleNode("board[@boardid='"&Dvbbs.BoardID&"']/@depth").text,"",""
GetForumTextAd(1)
BoardList()
Page=Request("Page")
If ( Not isNumeric(Page) )or Page="" Then Page=1
Page=Clng(Page)
If Page <1 Then Page=1
If Dvbbs.Board_Setting(43)="0" Then
topicList()
End If
End If
Dvbbs.Footer
End Sub
Sub Chk_List_Err()
If Dvbbs.Board_Setting(1)="1" and Dvbbs.GroupSetting(37)="0" Then
Dvbbs.AddErrCode(26)
ElseIf Request("action")="batch" and Dvbbs.GroupSetting(45)<>"1"Then
Dvbbs.AddErrCode(28)
End If
Dvbbs.showerr()
End Sub
Sub topicList()
Dim Node,modelist,modelistimg,i,cpost,ctopic
cpost=0
ctopic=0
If Application(Dvbbs.CacheName&"_boardlist").documentElement.selectSingleNode("board[@boardid='"&Dvbbs.BoardID&"']/@child").text<>"0" Then
For Each Node In Application(Dvbbs.CacheName&"_boardlist").documentElement.selectNodes("board[@parentid='"&Dvbbs.BoardID&"']/@boardid")
ctopic=ctopic+CLng(Application(Dvbbs.CacheName &"_information_" & node.text).documentElement.selectSingleNode("information/@topicnum").text)
cpost=cpost+CLng(Application(Dvbbs.CacheName &"_information_" & node.text).documentElement.selectSingleNode("information/@postnum").text)
Next
End If
Set XMLDom=Application(Dvbbs.CacheName &"_boarddata_" & Dvbbs.boardid).cloneNode(True)
XMLDom.documentElement.firstChild.removeAttribute "boarduser"
XMLDom.documentElement.firstChild.removeAttribute "board_ads"
XMLDom.documentElement.firstChild.removeAttribute "board_user"
XMLDom.documentElement.firstChild.removeAttribute "isgroupsetting"
XMLDom.documentElement.firstChild.removeAttribute "rootid"
XMLDom.documentElement.firstChild.removeAttribute "board_setting"
XMLDom.documentElement.firstChild.removeAttribute "sid"
XMLDom.documentElement.firstChild.removeAttribute "cid"
XMLDom.documentElement.firstChild.setAttribute "boardtype",Dvbbs.boardtype
XMLDom.documentElement.firstChild.setAttribute "forum_online",MyBoardOnline.Forum_Online
'XMLDom.documentElement.firstChild.setAttribute "board_useronline",MyBoardOnline.Board_UserOnline
'XMLDom.documentElement.firstChild.setAttribute "board_guestonline",MyBoardOnline.Board_GuestOnline
XMLDom.documentElement.firstChild.setAttribute "postnum",CLng(Application(Dvbbs.CacheName &"_information_" & Dvbbs.boardid).documentElement.selectSingleNode("information/@postnum").text)-cpost
XMLDom.documentElement.firstChild.setAttribute "topicnum",CLng(Application(Dvbbs.CacheName &"_information_" & Dvbbs.boardid).documentElement.selectSingleNode("information/@topicnum").text)-ctopic
XMLDom.documentElement.firstChild.setAttribute "todaynum",CLng(Application(Dvbbs.CacheName &"_information_" & Dvbbs.boardid).documentElement.selectSingleNode("information/@todaynum").text)
modelist=Split(Dvbbs.Board_Setting(48),"$$")
modelistimg=Split(Dvbbs.Board_Setting(49),"$$")
For i= 0 to UBound(modelist) -1
Set Node = XMLDom.documentElement.firstChild.appendChild(XMLDom.createNode(1,"mode",""))
Node.text=modelist(i)
If i < UBound(modelistimg) Then Node.setAttribute "pic",modelistimg(i)
Next
XMLDOM.documentElement.setAttribute "picurl",Dvbbs.Forum_PicUrl
If Dvbbs.Forum_Setting(14)="1" Or Dvbbs.Forum_Setting(15)="1" Then
XMLDom.documentElement.firstChild.setAttribute "showonline","1"
Else
XMLDom.documentElement.firstChild.setAttribute "showonline","0"
End If
XMLDom.documentElement.appendChild(Application(Dvbbs.CacheName &"_boardmaster").documentElement.selectSingleNode("boardmaster[@boardid='"& Dvbbs.boardid&"']").cloneNode(True))
Rem ===============传送论坛信息和设置数据到XML===============================================================
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 "ishot",Dvbbs.Forum_Setting(44)'热贴最少回复
Node.setAttribute "pagesize",Dvbbs.Board_Setting(26)'列表分页大小
Node.setAttribute "postalipay",Dvbbs.Board_Setting(67)
Node.setAttribute "dispsize",Dvbbs.Board_Setting(27) '贴子分页大小
Node.setAttribute "tools",Dvbbs.Forum_Setting(90)'道具中心开关
Node.setAttribute "newfalgpic",Dvbbs.Board_Setting(60) '显示新贴标志的设置
Node.setAttribute "ForumUrl",Dvbbs.Get_ScriptNameUrl()
Node.setAttribute "isapi_write",isUrlreWrite
If Dvbbs.Board_Setting(3)="1" Or Dvbbs.Board_Setting(57)="1" Then
Node.setAttribute "auditcount",auditcount
End If
Rem 参数传递
XMLDom.documentElement.setAttribute "action",Request("action")
XMLDom.documentElement.setAttribute "page",Page
XMLDom.documentElement.setAttribute "topicmode",topicmode
If Dvbbs.Boardmaster Then
XMLDom.documentElement.setAttribute "ismaster","1"
Else
XMLDom.documentElement.setAttribute "ismaster","0"
End If
If Dvbbs.Board_Setting(68)="1" Then
XMLDom.documentElement.setAttribute "cananony","1"
Else
XMLDom.documentElement.setAttribute "cananony","0"
End If
XMLDom.documentElement.setAttribute "canlookuser",Dvbbs.GroupSetting(1)
If Not IsObject(Application(Dvbbs.CacheName & "_smallpaper")) Then LoadBoardNews_Paper()
For Each Node in Application(Dvbbs.CacheName & "_smallpaper").documentElement.SelectNodes("smallpaper[@s_boardid='"&Dvbbs.Boardid&"']")
XMLDom.documentElement.appendChild(Node.cloneNode(True))
Next
LoadTopiclist()
Response.Write vbNewLine & "<script language=""javascript"" type=""text/javascript"">" & vbNewLine
Response.Write LoadToolsInfo & vbNewLine
Response.Write "</script>" & vbNewLine
If Cint(TopicMode) <> "0" Then
XMLDom.documentElement.setAttribute "modecount",Dvbbs.Execute("Select Count(*) From Dv_Topic Where Mode="&TopicMode&" and BoardID="&Dvbbs.BoardID&" And IsTop=0")(0)
End If
transform_topicList()
End Sub
Function auditcount()
Dim Rs
Set Rs=Dvbbs.Execute("select count(*) from "& Dvbbs.Nowusebbs &" where boardid=777 and locktopic="&Dvbbs.BoardID)
If IsNull(Rs(0)) Then
auditcount=0
Else
auditcount=Rs(0)
End If
Set Rs=Nothing
End Function
Sub LoadTopiclist()
If (Not Response.IsClientConnected) and Dvbbs.userid=0 Then
Session(Dvbbs.CacheName & "UserID")=empty
Response.Clear
Response.End
End If
Dim Node,nodes,topidlist,Rs,Sql,lastpost,i,PostTime,limitime
If Page=1 Then
topidlist=Dvbbs.CacheData(28,0)
If topidlist="" Then
topidlist=Application(Dvbbs.CacheName &"_information_" & Dvbbs.boardid).documentElement.selectSingleNode("information/@boardtopstr").text
ElseIf Trim(Application(Dvbbs.CacheName &"_information_" & Dvbbs.boardid).documentElement.selectSingleNode("information/@boardtopstr").text)<>"" Then
topidlist=topidlist &","& Application(Dvbbs.CacheName &"_information_" & Dvbbs.boardid).documentElement.selectSingleNode("information/@boardtopstr").text
End If
If Trim(topidlist) <>"" Then
Set Rs=Dvbbs.Execute("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 istop > 0 and topicid in ("& Dvbbs.Checkstr(topidlist) &") Order By istop desc, Lastposttime Desc")
If Not Rs.EOF Then
SQL=Rs.GetRows(-1)
Set topidlist=Dvbbs.ArrayToxml(sql,rs,"row","toptopic")
Rs.Close
SQL=Empty
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,"<","<")
End If
Node.selectSingleNode("@lastpost").text=Dvbbs.ChkBadWords(Node.selectSingleNode("@lastpost").text)
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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -