%@ Language=VBScript %>
<%
option explicit
response.buffer = true
'**********************************************************************************************
'*日期:2005-5-18
'*更新记录
'* 创建此代码 2005-5-18
'*用途:显示友情链接
'**********************************************************************************************
%>
<%
on error resume next
response.write gShowPageByNo(vSiteName)
if err then
response.write "Show Page Error:" & err.description
response.end
end if
function gShowPageByNo(vSiteName)
on error resume next
dim vTemplatePath
vTemplatePath=mGetTemplePath(vSiteName)
LoadTemplate server.mappath(vTemplatePath) & "/Default.htm", "All"
if err then
UnloadTemplate
response.write "Load default template error:" & err.description
response.end
end if
SetVar "PageName","友情链接"
SetVar "SiteName",vSiteName
SetVar "TemplatePath",vTemplatePath
mShowHeader vSiteName
mShowNavigationTop vSiteName,"no" '显示当前位置(位于顶部)
'------------------------------------------------------------------
LoadTemplate server.mappath(vTemplatePath) & "/Links/LinkSee.htm", "Main"
if err then
UnloadTemplate
response.write "Load friend link template error:" & err.description
response.end
end if
ShowFriendLink vSiteName
Parse "Main",true
'-------------------------------------------------------------------
mShowNavigationBottom vSiteName,"no" '显示当前位置(位于底部)
mShowFooter vSiteName
Parse "All",false
gShowPageByNo=PrintVar("All")
UnloadTemplate
end function
Function ShowFriendLink(vSiteName)
dim objBase_Links
set objBase_Links=new clsBase_Links
'查询构建,此处还可以放一些固定的查询条件和排序条件等
With objBase_Links
.GetAllByQuery "And Enabled<>0 Order By OrderStr Desc"
if Not .Eof Then
Dim k,vLinksTemp
k=0
vLinksTemp=""
Session("Links_Tr_Link")="End"
Do While Not .Eof
K=K+1
'response.Write("K"&K&"
")
If ((k-1) mod 6)=0 Then
vLinksTemp=vLinksTemp&"