File: D:/web/coventrydemolition/2026-01-28/new/inc-pages.asp
<%
' called for every request, calls the appropriate routine, page holds the page name, defaults to products'
' (SS,17/4/12) modified to allow pages directly from sitedetails table without needing separate templates for customer info, about, how to order, links etc.
' (SS,22/5/12) added reviews
' (SS,17/1/13) added hook to CustomShowPageContent for content from third party SEO company
' (SS,12/12/18) Added HTMLEncode to render of page name (FPageName) chosen to prevent XSS
' (SS,27/1/26) Change to contact page to redirect to home page
Dim FPageName
FPageName = LCase(Request.QueryString("page"))
' (SS,1/7/11) added Request.QueryString("search") <> ""
' (SS,7/10/15) added missing brackets after the "And"
If FPageName = "products" Or (FPageName = "" And (Request.QueryString("cmd") <> "" Or Request.QueryString("code") <> "" Or Request.QueryString("cat") <> "" Or Request.QueryString("search") <> "")) Then
ShowPage_products
ElseIf FPageName = "contact" Then
' DoContactForm
' (SS,27/1/26) replaced above with following to redirect (301) to home page
DoRedirect "/", True
' (SS,22/5/12)
ElseIf FPageName = "reviews" Then
DoReviewsPage
ElseIf FPageName = "account" Then
DoAccount ' (SS,22/6/09) replaced DoCreateAccountForm, DoAccountLogout, DoAccountLogin and DoForgotPassword with just DoAccount
ElseIf FPageName = "" Or FPageName = "home" Then
ShowPage_home
ElseIf PageExists(FPageName) Then
ShowClosureBanner
ShowPageContent(FPageName)
' if IIS has redirect to 404 error page (i.e. page=404) then set the status to 404
If FPageName = "404" Then
Response.Status = "404 Not Found" ' tells the browser that page was not found
End If
' (SS,17/1/13) added CustomPage for integration with content from SEO company
ElseIf CustomPagesEnabled And CustomPageExists(FPageName) Then
CustomShowPageContent(FPageName)
Else ' page doesn't exist so return 404 error, and display page does not exist message
' (SS,12/12/18) Added HTMLEncode to FPageName to prevent XSS
Response.Write "<strong>Sorry, page '" & HTMLEncode(FPageName) & "' does not exist.</strong>"
Response.Status = "404 Not Found" ' tells the browser that page was not found
End If
%>