%@ Language=VBScript %>
<%
option explicit
response.buffer = true
'**********************************************************************************************
'*编码:许泽辉编写
'*日期:2005-06-11
'*更新记录:
'* 创建此代码 2005-06-11 许泽辉编写
'* 修改代码支持MsSQL 2010-08-11 陈泽军
'*用途:分页浏览客户信息的页面目录
'**********************************************************************************************
%>
<%
dim IP
IP=request.servervariables("REMOTE_ADDR")
CheckIP IP
if IP<>"" and (Session(mSession3)="" or session(mSession2)<2) then
response.redirect "/Default.asp"
response.end
end if
%>
<%
on error resume next
Dim vCatalogName,vCatalogType,vClassString
vCatalogName=trim(request.QueryString("CatalogName"))
vCatalogType=trim(request.QueryString("CatalogType"))
vClassString=trim(request.QueryString("ClassString"))
If vCatalogName="" or vClassString="" Then
Response.Write("参数不正确或丢失,请返回!")
Response.End
End If
If vCatalogType<>"CommonPages" And vCatalogType<>"UsersPages" Then
Response.Write("参数不正确或丢失,请返回!")
Response.End
End If
response.write gShowPageByNo
if err then
response.write "Show Page Error:" & err.description
response.end
end if
function gShowPageByNo
on error resume next
LoadTemplate server.mappath(vTemplatePath) & "/Default.htm", "All"
SetVar "SiteName",vSiteName
SetVar "TemplatePath",vTemplatePath
SetVar "PageName",vCatalogName
mShowHeader vSiteName
mShowNavigationTop vSiteName,"no" '显示当前位置(位于顶部)
ShowPageByNo
mShowNavigationBottom vSiteName,"no" '显示当前位置(位于底部)
mShowFooter vSiteName
Parse "All",false
gShowPageByNo=PrintVar("All")
UnloadTemplate
if err then
response.write "Load Template Error0:" & err.description
response.end
end if
end function
'根据页面号,显示页面
function ShowPageByNo
on error resume next
LoadTemplate server.mappath(vTemplatePath) & "/PagesCatalog.htm","Main"
if err then
UnloadTemplate
response.write "加载模板PagesCatalog.htm时发生错误:" & err.description
response.end
end if
LoadTemplate server.mappath(vTemplatePath) & "/Left_Body.htm","Left_Body"
if err then
UnloadTemplate
response.write "加载模板Left_Body.htm时发生错误:" & err.description
response.end
end if
Show_MenuClass_List vSiteName,vCatalogName
mShowHot_Link vSiteName
Session("Body_Content_PagesCatalog")="None"
If vCatalogType="UsersPages" Then
ShowCustomer_Search
ShowCustomer
Else
SetVar "Search_Js",""
SetVar "Left_Body_Search",""
End If
Dim ClassStringTemp,sClassStringTemp,i,j,vClassName,vView,vUrlType,vNextMenuName
ClassStringTemp=split(vClassString,"@",-1)
for i=0 To Ubound(ClassStringTemp)
'response.Write ClassStringTemp(i)&"
"
'赋值前先清空
vClassName=""
vView=""
vUrlType=""
vNextMenuName=""
sClassStringTemp=split(ClassStringTemp(i),"|",-1)
for j=0 To Ubound(sClassStringTemp)
'response.Write ClassStringTemp(i)
If Ubound(sClassStringTemp)=2 Then
If j=0 Then
vClassName=sClassStringTemp(j)
ElseIf j=1 Then
vUrlType=sClassStringTemp(j)
ElseIf j=2 Then
vNextMenuName=sClassStringTemp(j)
End If
ElseIf Ubound(sClassStringTemp)=3 Then
If j=0 Then
vClassName=sClassStringTemp(j)
ElseIf j=1 Then
vUrlType=sClassStringTemp(j)
ElseIf j=2 Then
vView=sClassStringTemp(j)
ElseIf j=3 Then
vNextMenuName=sClassStringTemp(j)
End If
Else
UnloadTemplate
response.Write("ClassString参数有误,请检查!")
response.End
End If
next
Show_Catalog_Title_List vClassName,vUrlType,vView,vNextMenuName '弹出窗口用JsOpen
next
If Session("Body_Content_PagesCatalog")="None" Then
SetVar "Catalog_Body",""
Else
SetVar "NotFound",""
End If
mShowHot_Link vSiteName
SetVar "Left_Body_White",""
Parse "Left_Body",false
Parse "Main",false
end function
Function Show_Catalog_Title_List(vClassName,vUrlType,vView,vNextMenuName)
Dim vTitle,k,vContentTemp
if vUrlType=0 then
Dim ObjMenu_Tree_View,vUrl
set objMenu_Tree_View=new clsMenu_Tree_View
With ObjMenu_Tree_View
.getallbyquery " And ParentName='" & vClassName & "' And NodeOrder>0 Order By NodeOrder Asc"
if Not .Eof Then
Session("Body_Content_PagesCatalog")="Have"
SetVar "Catalog_Title",vNextMenuName
k=1
vContentTemp=""
Do While Not .Eof
vTitle=gCheckNullStr(.MenuName)
vUrl=gCheckNullStr(.MenuUrl)
if vUrl<>"#" then
vUrl=vUrl&"?MenuName="&Server.URLEncode(vNextMenuName)&"&SiteName="&Server.URLEncode(vSiteName)
end if
If ((k-1) mod 2)=0 Then
vContentTemp=vContentTemp&"