%
'Module :Section page reading routine.
'Description :Fetch Section, Content, and Css details for the current document.
' :The document is fetched from teh QueryString variable "con"
' :On the bases of the provided QS value the routine queries various detail specificDB tables
' : and fetch document related data. (tables: tblSection, tblContent, tblCss)
'Author : Waqas Mahmood Khan
'Created : Wednesday, May 28, 2003 6:00 PM
'// ****************************************************************************** //
'Local variables
Dim SectionName, SectionId
Dim strSQLCss, strSQLContent, strSQLSection
Dim objRsCss, objRsSection, objRsContent
Dim DocId, DocTitle, DocDescription, DocFile, DocPath, DocCssId
Dim CssId, CssFile, CssPath
Dim objFSO, objDocFile
Dim strFileDataString
Dim P1, P2
'Normalize QueryString "con"
DocId = Request.QueryString("con")
If Len(DocId) = 0 Then DocId = 0
'Fetch current section name from URL
P1 = InStrRev(Request.ServerVariables("SCRIPT_NAME"), "/") - 1
P2 = InStrRev(Request.ServerVariables("SCRIPT_NAME"), "/", P1) + 1
SectionName = Mid(Request.ServerVariables("SCRIPT_NAME"), P2, (P1-p2)+1)
' //****************
<%
' Module : Scripting.FileSystemObject is used to open and read text file
' Description : FSO object fetch the file on the bases of two variabled values
' : "DocPath" - Contains the document physical path which is fetched from DB in above module
' Author : Waqas Mahmood Khan
' Created : Wednesday, May 28, 2003 7:00Pm
'// ************************************************************* //
' If DocId <> 0 Then
' CONST ForReading = 1
' Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
' If objFSO.FileExists(Request.ServerVariables("APPL_PHYSICAL_PATH")& DocPath & DocFile) Then
' Set objDocFile = objFSO.OpenTextFile(Request.ServerVariables("APPL_PHYSICAL_PATH")& DocPath & DocFile, ForReading)
' strFileDataString = objDocFile.ReadAll
' objDocFile.Close
' Response.Write strFileDataString
' Else
' Response.Write "File not found - broken link!
"&VbCrLf
' Response.Write " - No file available behind this URL.
"&VbCrLf
' Response.Write " - To report about this broken link to webmaster "&VbCrLf
' Response.Write "click here, and a notification will be sent."
' End If
' Else
' End If
%>
include "default.htm" ?>
include "../include/footer.php" ?>