<%@ Language=VBScript %> <% option explicit response.buffer = true '********************************************************************************************** '*功能:特定首页显示程序 '*编码:许泽辉编写 '*日期:2005-04-20 '*功能说明 '* 此页面主要显示广告,产品分行业显示,公司新闻,及友情链接 '*更新记录 '* 2010-08-11 修改代码支持MsSQL 陈泽军 '********************************************************************************************** %> <% On error resume next const pModuleName="Site_Page" '模块名称 const IsUseUpLoad=1 '是否使用上载功能 Response.write ShowInfo(vSiteName) '调用ShowInfo函数显示内容 Function ShowInfo(vSiteName) ON error resume next vTemplatePath=mGetTemplePath(vSiteName) LoadTemplate server.mappath(vTemplatePath) & "/FirstPage/FirstPage.htm", "All" setVar "TemplatePath",vTemplatePath mShowHeader vSiteName 'mShowNavigationTop vSiteName '显示当前位置(位于顶部) '显示广告信息 ShowAdvertisement vSiteName,"Advertisement",vTemplatePath '显示产品信息 ShowProductsList vSiteName,"ShowProducts","Products",vTemplatePath '显示网站新闻 '是否调用新闻 Dim ObjSite_Page set ObjSite_Page=New ClsSite_Page With ObjSite_Page .GetOneByQuery " And PageName='最新动态' And Enabled>0 Order by Enabled Desc" '当Enabled的值有大于0时则首页显示新闻,否则只显示产品类 If (not .eof) Then ShowNews "最新动态","ShowNews","最新动态",vTemplatePath End if End With Set ObjSite_Page=Nothing 'mShowNavigationBottom vSiteName '显示当前位置(位于底部) mShowFooter vSiteName parse "All",False ShowInfo=PrintVar("All") '返回页面的内容 UnloadTemplate if err then response.write "显示数据时错误:" & err.description response.end end if End Function '++++++++++++++++++++++++++ShowAdvertisement++++++++++++++++++++++++++++++++ Function ShowAdvertisement(vSiteName,vBlockName,vTemplatePath) LoadTemplate server.mappath(vTemplatePath) & "/FirstPage/Advertisement.htm", vBlockName if err then UnloadTemplate response.write "加载广告页面时错误:" & err.description' response.end end if ' session("ScriptTempItem")=0 ' session("ScriptTemp")="" ' session("ScriptTemp")="