<%@ 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&"" End If If instr(GbLimitTitle(vTitle,20),"...")>0 Then vContentTemp=vContentTemp&"    "&GbLimitTitle(vTitle,20)&"" Else vContentTemp=vContentTemp&"    "&GbLimitTitle(vTitle,20)&"" End If .MoveNext If (k mod 2)=0 and (Not .Eof) Then vContentTemp=vContentTemp&"" End If K=K+1 Loop If (K mod 2)=0 Then vContentTemp=vContentTemp&" " End If SetVar "Title_List_Content",vContentTemp Parse "Title_List",false Parse "Catalog_Body",True end if End With Set ObjMenu_Tree_View=Nothing else Dim ObjPage_Permit_View,vPermitId,vPageId set ObjPage_Permit_View=New ClsPage_Permit_View With ObjPage_Permit_View .GetAllByAdvQuery "SELECT PermitId,PageId,Title,Body,BodyType FROM GB_Page_Permit_View Where PageName='"&vClassName&"' and Enabled > 0 Order by Enabled Desc" if Not .Eof Then Session("Body_Content_PagesCatalog")="Have" SetVar "Catalog_Title",vNextMenuName k=1 vContentTemp="" Do While Not .Eof vTitle=gCheckNullStr(.Title) vPermitId=gCheckNullStr(.PermitID) vPageId=gCheckNullStr(.PageId) 'response.Write("K"&K&"
") If ((k-1) mod 2)=0 Then vContentTemp=vContentTemp&"" 'response.Write(K&"tr
") End If If vUrlType=2 Then If instr(GbLimitTitle(vTitle,20),"...")>0 Then vContentTemp=vContentTemp&"    "&GbLimitTitle(vTitle,20)&"" Else vContentTemp=vContentTemp&"    "&GbLimitTitle(vTitle,20)&"" End If ElseIf vUrlType=3 Then If instr(GbLimitTitle(vTitle,20),"...")>0 Then vContentTemp=vContentTemp&"    "&GbLimitTitle(vTitle,20)&"" Else vContentTemp=vContentTemp&"    "&GbLimitTitle(vTitle,20)&"" End If Else If instr(GbLimitTitle(vTitle,20),"...")>0 Then vContentTemp=vContentTemp&"    "&GbLimitTitle(vTitle,20)&"" Else vContentTemp=vContentTemp&"    "&vTitle&"" End If End If .MoveNext If (k mod 2)=0 and (Not .Eof) Then vContentTemp=vContentTemp&"" 'response.Write(K&"/tr
") End If K=K+1 Loop If (K mod 2)=0 Then 'response.Write(K&"td/td/tr
") vContentTemp=vContentTemp&" " End If SetVar "Title_List_Content",vContentTemp Parse "Title_List",false Parse "Catalog_Body",True End If End With Set ObjPage_Permit_View=Nothing end if End Function Function ShowCustomer_Search SetVar "CompanyName_ItemValue","" SetVar "CompanyName_WordKey","查询关键字…" dim vTemplatePath vTemplatePath=mGetTemplePath(vSiteName) LoadTemplate server.mappath(vTemplatePath) & "/Customer_Search.htm", "Left_Body_Search" SetVar "ActionFileName","PagesClass.asp?Search=yes&ClassName="&Server.URLEncode("用户名单")&"&MenuName="&Server.URLEncode("用户名单查询")&"&SiteName="&Server.URLEncode(vSiteName)&"" '\\\\\\\\\\\\\\\\\\\\\\\\\\\显示省的选项\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ dim ObjBase_Sheng,vProvince set ObjBase_Sheng=New clsBase_Sheng With ObjBase_Sheng .GetAll if Not .eof then While Not .eof vProvince=vProvince&"" .MoveNext Wend End If End With set ObjBase_Sheng=nothing SetVar "ProvinceItemValue",vProvince dim ObjBase_smallclass,shi_count set ObjBase_smallclass=new clsBase_smallclass With ObjBase_smallclass .GetAll if Not .eof then Response.Write("")&vbcrlf End If End With set ObjBase_smallclass=nothing '\\\\\\\\\\\\\\\\\\\\\\\\显示产品的选项\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ dim ObjPage_Permit_View,vLink_Product_List set ObjPage_Permit_View=New ClsPage_Permit_View With ObjPage_Permit_View If IsSqlDataBase = 1 Then .GetAllByAdvQuery "SELECT Title FROM GB_Page_Permit_View Where cast(Comment as varchar)<>'' and cast(Comment as varchar)<>'###"&mDownloadCenterCaption&"###' and Enabled > 0 Order by Enabled" Else .GetAllByAdvQuery "SELECT Title FROM GB_Page_Permit_View Where Comment<>'' and Comment<>'###"&mDownloadCenterCaption&"###' and Enabled > 0 Order by Enabled" End If if .eof then vLink_Product_List="" else While Not .eof vLink_Product_List=vLink_Product_List&"" .MoveNext Wend End If End With set ObjPage_Permit_View=nothing SetVar "ProductsItemValue",vLink_Product_List SetVar "Customer_Search_OrderString","" Parse "Search_Js",false Parse "Left_Body_Search",false '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ End Function Function ShowCustomer dim objBase_Customer set objBase_Customer=new clsBase_Customer '查询构建,此处还可以放一些固定的查询条件和排序条件等 With objBase_Customer .GetAllByQuery "Order By JoinTime Desc" if Not .Eof Then SetVar "Catalog_Title","最新用户名单" Dim k,vCustomerTemp k=1 vCustomerTemp="" Do While Not .Eof 'response.Write("K"&K&"
") If ((k-1) mod 2)=0 Then vCustomerTemp=vCustomerTemp&"" 'response.Write(K&"tr
") End If If .CompanyWeb="" or .CompanyWeb="http://" Then vCustomerTemp=vCustomerTemp&"    "&.CompanyName&"" Else vCustomerTemp=vCustomerTemp&"    "&.CompanyName&"" End If If K>=20 Then Exit Do End If .MoveNext If (k mod 2)=0 and (Not .Eof) Then vCustomerTemp=vCustomerTemp&"" 'response.Write(K&"/tr
") End If K=K+1 Loop If (K<20) and (k mod 2)=0 Then 'response.Write(K&"td/td/tr
") vCustomerTemp=vCustomerTemp&" " End If SetVar "Title_List_Content",vCustomerTemp Parse "Title_List",false Parse "Catalog_Body",True End If End With set objBase_Customer=Nothing End Function %>