<% On Error Resume Next 'open default connection for all pages Set oConn = dbOpenConn(Server.MapPath(db_sDatabasePath)) 'Check for valid product If (Not IsNumeric(Request.QueryString("pid"))) Then Response.Redirect "default.asp" End If sSql = "SELECT title FROM [category] WHERE (categoryID=(SELECT parentID FROM [category] WHERE categoryID=(SELECT categoryID1 FROM [product] WHERE productID=" & Request.QueryString("pid") & ")));" Dim sPrimaryCategory : sPrimaryCategory = dbGetValue(oConn, sSql) sSql = "SELECT title FROM [category] WHERE (categoryID=(SELECT categoryID1 FROM [product] WHERE productID=" & Request.QueryString("pid") & "));" Dim sSubCategory : sSubCategory = dbGetValue(oConn, sSql) sSql = "SELECT title FROM [product] WHERE (productID=" & Request.QueryString("pid") & ");" Dim sProductTitle : sProductTitle = dbGetValue(oConn, sSql) 'PAGE TITLE renderVar_title = sPrimaryCategory & " > " & sSubCategory & " > " & sProductTitle & " @ presentsR4U.com" 'PAGE DESCRIPTION renderVar_description = dbGetValue(oConn, "SELECT description FROM [product] WHERE (productID=" & Request.QueryString("pid") & ");") 'BANNER renderVar_banner = wyebridgeDisplayPromotion(oConn, 6) 'SUB MENU renderVar_subMenu = wyebridgeCategories(oConn, 0) 'PAGE NAVIGATION renderVar_pageNav = "" 'BASKET INFO On Error Resume Next renderVar_basketInfo = "view basket | items " & Session("FroyaCart")(0) & " | £" & FormatNumber(Session("FroyaCart")(6),2,,,0) & "" On Error GoTo 0 'PAGE HEADING renderVar_pageHeading = sPrimaryCategory 'PAGE SUB HEADING renderVar_pageSubHeading = sSubCategory 'CONTENT renderVar_content = wyebridgeDetail(oConn, Request.QueryString("pid")) If (Not bUseCache) Then sDocument = renderTemplate("theme/productTemplate.html") Call cacheSave(sDocument) sDocument = renderContent(sDocument) End If sDocument = renderContent(sDocument) Response.Write(sDocument) %>