<% on error goto 0 '#################################################### '# PROGRAM NAME: Showpath.asp '# DESCRIPTION: Display Page content '# CREATE DATE: 1 September 2002 '# COPYRIGHT: B3 Productions Pty Ltd (www.b3.com.au) '# USAGE: used with SIS '# METHODS: Nil '# FUNCTIONS: Nil '# '#################################################### '# CHANGE LOG '# '# VERSION: 3.0 '# DATE: 1/9/2001 '# CHANGES MADE: Initial Release '# '# '# '# '#################################################### dim pgid,force,strlang 'response.write pgid=cint(Request.QueryString("pgid")) pgid=cint(Request.QueryString("pgid")) if (pgid="" or pgid=0) then pgid=1 end if session.timeout=1200 stylename="style" if (pgid=22 or pgid=23 or pgid=24 or pgid=25) then stylename="style_pixel" %> <% '#----#B3: Nishith: 8/10/02: on error goto 0 is uncommented since we are using err. handling. session("DIS_EXISTS")=-1 '---### B3: Nishith: 26/10/02: this line added. session("WSATMT2_EXISTS")=-1'---### B3: Nishith: 26/10/02: this line added. strlang=Request.QueryString("whichlang") if strlang="" then strlang="Lang1" end if dim strPath,fso,f,strText,strBody,showUserDocs,userPage,showRelTopics,showDynBar,showStatBar,foundTag,searchScript,strMetaDesc dim tempstr,strPathLen,index1 showUserDocs=1 strPath=Session("RootFilePath") 'on error goto 0 Set fso = CreateObject("Scripting.FileSystemObject") strBody="" if Session("CurrentLang")="lang2" then Set f = fso.openTextFile(strPath & "\dynamicdata\data\pages\Lang2\" & pgid & ".txt", 1, true) strPath1 = Session("RootURLPath") & "dynamicdata/data/pages/Lang2/" & pgid & ".txt" elseif Session("CurrentLang")="lang3" then Set f = fso.openTextFile(strPath & "\dynamicdata\data\pages\Lang3\" & pgid & ".txt", 1, true) strPath1 = Session("RootURLPath") & "dynamicdata/data/pages/Lang3/" & pgid & ".txt" elseif Session("CurrentLang")="lang4" then Set f = fso.openTextFile(strPath & "\dynamicdata\data\pages\Lang4\" & pgid & ".txt", 1, true) strPath1 = Session("RootURLPath") & "dynamicdata/data/pages/Lang4/" & pgid & ".txt" else Set f = fso.openTextFile(strPath & "\dynamicdata\data\pages\Lang1\" & pgid & ".txt", 1, true) strPath1 = Session("RootURLPath") & "dynamicdata/data/pages/Lang1/" & pgid & ".txt" end if while not f.AtEndOfStream strBody = strBody & f.ReadLine wend f.close dim rsPg,sql,rsTemp,strMeta,strTitle,rsDef,rsSubCats,strAppend,rsCheck,pos,strname set rsPg=Server.CreateObject("ADODB.Recordset") set rsCheck=Server.CreateObject("ADODB.Recordset") set rsTemp=Server.CreateObject("ADODB.Recordset") set rsDef=Server.CreateObject("ADODB.Recordset") set rsSubCats=Server.CreateObject("ADODB.Recordset") sql="Select * from tblPages where catid=" & pgid rsPg.Open sql,cn,1,3 if err.number>0 then Response.write err.description end if 'showRelTopics=rsPg.Fields("ShowRelLinks") 'showDynBar=rsPg.Fields("ShowDynMenu") showStatBar=rsPg.Fields("ShowStatMenu") if Session("logged")="" then Session("show")="No" else sql="Select UserGrants from tblPages where catid=" & pgid rsCheck.Open sql,cn,1,3 if err.number>0 then Response.write err.description end if if rsCheck.RecordCount>0 then pos=instr(1,rsCheck(0),Session("logged"),0) if pos>0 then Session("show")="Yes" else Session("show")="No" end if else Session("show")="No" end if rsCheck.close end if if rsPg.RecordCount <> 0 then if rsPg.Fields("IsHidden") then strBody= "
This page is Temporarily not Available for viewing.
Please Try Later..


click here to return back..
" elseif rsPg.Fields("IsSecured") and Session("show")="No" then strBody= "
This page needs Authentication.
Please Login and try..
" strBody = strBody & "
User Name: 
  Password: 
" strBody = strBody & "

  
" elseif rsPg.Fields("IsSecured") and Session("show")="Yes" then userPage=1 end if strMeta=rsPg.Fields("MetaKeywords") strMetaDesc=rsPg.Fields("MetaDescription") if session("CurrentLang")="lang2" then strTitle=rsPg.Fields("PageTitle2") strname=rsPg.Fields("PageName2") elseif session("CurrentLang")="lang3" then strTitle=rsPg.Fields("PageTitle3") strname=rsPg.Fields("PageName3") elseif session("CurrentLang")="lang4" then strTitle=rsPg.Fields("PageTitle4") strname=rsPg.Fields("PageName4") else strTitle=rsPg.Fields("PageTitle1") strname=rsPg.Fields("PageName1") end if dim bgColor,bgImg,Header,Footer,NavBar,leftnav,tempId if session("CurrentLang")="lang1" then tempId=rsPg.Fields("TemplateId1") elseif session("CurrentLang")="lang2" then tempId=rsPg.Fields("TemplateId2") elseif session("CurrentLang")="lang3" then tempId=rsPg.Fields("TemplateId3") elseif session("CurrentLang")="lang4" then tempId=rsPg.Fields("TemplateId4") else tempId=rsPg.Fields("TemplateId1") end if sql="Select * from tblTemplates where TemplateId=" & tempId rsTemp.open sql,cn,1,3 if err.number>0 then Response.write err.description end if leftnav=false if rsTemp.recordcount=0 then sql="Select * from tblTemplates where TemplateId=0" rsDef.open sql,cn,1,3 bgColor=rsDef.Fields("PgBgColor") bgImg=rsDef.Fields("PgBgImage") leftnav=rsDef.Fields("IsLeftnav") tempId=0 rsDef.close else bgColor=rsTemp.Fields("PgBgColor") bgImg=rsTemp.Fields("PgBgImage") leftnav=rsTemp.Fields("IsLeftnav") rsTemp.close end if Set f = fso.openTextFile(strPath & "\dynamicdata\data\placeHolders\" & tempId & "H.txt", 1, true) strText = "" while not f.AtEndOfStream strText = strText & f.ReadLine wend f.close Header=strText Set f = fso.openTextFile(strPath & "\dynamicdata\data\placeHolders\" & tempId & "F.txt", 1, true) strText = "" while not f.AtEndOfStream strText = strText & f.ReadLine wend f.close Footer=strText footerfile = Session("RootURLPath") & "dynamicdata\data\placeHolders\" & tempId & "F.txt" headerfile = Session("RootURLPath") & "dynamicdata\data\placeHolders\" & tempId & "H.txt" navfile = Session("RootURLPath") & "dynamicdata\data\placeHolders\" & tempId & "N.txt" Set f = fso.openTextFile(strPath & "\dynamicdata\data\placeHolders\jscripts.js", 1, true) strText = "" while not f.AtEndOfStream strText = strText & f.ReadLine wend f.close searchScript=strText dim findBTag findBTag=instr(1, searchScript, "0 then foundTag="Yes" else foundTag="No" end if if showStatBar then Set f = fso.openTextFile(strPath & "\dynamicdata\data\placeHolders\" & tempId & "N.txt", 1, true) strText = "" while not f.AtEndOfStream strText = strText & f.ReadLine wend f.close NavBar=strText end if else strBody = "
This page is Not Available on the Server!!
" end if rsPg.Close %> <%=strTitle%> <% '!--HeaderStart--> call splitstring(Header,pgid,tempId) '!--HeaderEnd--> if showStatBar then '!--NavBarStart--> call splitstring(NavBar,pgid,tempId) '!--NavBarEnd--> end if '!--ContentStart--> call splitstring(strBody,pgid,tempId) '!--ContentEnd--> '!--FooterStart--> call splitstring(Footer,pgid,tempId) '!--FooterEnd--> 'cn.close 'set cn = Nothing cnInstal.close set cnInstal = Nothing %>