<%@ LANGUAGE="VBSCRIPT" %> <% PageStrings = "18, 55, 57, 107, 108, 149, 150, 151, 152, 153, 154, 158, 160, 161, 265, 266, 648, 897, 898, 1231, 1236, 1237" %> <% Set objRecordSet3 = Server.CreateObject("ADODB.Recordset") PT_ID = Request.Querystring("PT_ID") numRecordPosition = Request.Querystring("numRecordPosition") strSearchCriteria = sqlsafe(Request.Querystring("strSearchCriteria")) strKeywords = sqlsafe(Request.Querystring("strKeywords")) strPageHistory = sqlsafe(Request.Querystring("strPageHistory")) If numRecordPosition = "" Then numRecordPosition = 1 numPageStartPosition = numRecordPosition If PT_ID = "" Then PT_ID = 0 If Not IsNumeric(numRecordPosition) Then Response.Redirect("error.asp") If Not IsNumeric(PT_ID) And PT_ID <> "all" Then Response.Redirect("error.asp") numRecordPosition = Clng(numRecordPosition) blnNoShow = false strQuery = "SELECT PT_Name" & CStr(numLanguageID) & ", PT_ProductDisplayType, PT_ProdTypeDisplayType, PT_Desc" & CStr(numLanguageID) & ", PT_MotherProdType, PT_OrderProductsBy FROM tblCactuShopProdtype WHERE PT_Live='y' AND PT_ID=" & PT_ID Call ExecuteSQL(strQuery, numCursorType, objRecordSet) If Not (objRecordSet.BOF And objRecordSet.EOF) Then PT_Name = objRecordSet("PT_Name" & CStr(numLanguageID) & "") PT_ProductDisplayType = objRecordSet("PT_ProductDisplayType") PT_ProdTypeDisplayType = objRecordSet("PT_ProdTypeDisplayType") PT_Desc = objRecordSet("PT_Desc" & CStr(numLanguageID)) PT_MotherProdType = objRecordSet("PT_MotherProdType") PT_OrderProductsBy = objRecordSet("PT_OrderProductsBy") blnNoShow = objRecordSet("PT_Name" & CStr(numLanguageID)) & "" = "" strPageTitleHTML = PT_Name & " | " & GetString("Config_Webshopname") strMetaDescHTML = left(PT_Desc, 200) strMetaDescHTML = Replace(strMetaDescHTML, "","") strMetaDescHTML = Replace(strMetaDescHTML, "","") strMetaDescHTML = Replace(strMetaDescHTML, "
","") strMetaDescHTML = Replace(strMetaDescHTML, "","") strMetaDescHTML = Replace(strMetaDescHTML, "","") strMetaDescHTML = Replace(strMetaDescHTML, " ","") strMetaDescHTML = Replace(strMetaDescHTML, "
","") strMetaDescHTML = Replace(strMetaDescHTML, "
","") strMetaDescHTML = Replace(strMetaDescHTML, "","") strMetaDescHTML = Replace(strMetaDescHTML, "","") strMetaDescHTML = Replace(strMetaDescHTML, vbcrlf, ". ") Else PT_ProductDisplayType = "d" PT_ProdTypeDisplayType = "d" PT_ID = "0" strPageTitleHTML = GetString("ContentText_Categories") & " | " & GetString("Config_Webshopname") strMetaDescHTML = left(PT_Desc, 200) strMetaDescHTML = Replace(strMetaDescHTML, "","") strMetaDescHTML = Replace(strMetaDescHTML, "","") strMetaDescHTML = Replace(strMetaDescHTML, "
","") strMetaDescHTML = Replace(strMetaDescHTML, "","") strMetaDescHTML = Replace(strMetaDescHTML, "","") strMetaDescHTML = Replace(strMetaDescHTML, " ","") strMetaDescHTML = Replace(strMetaDescHTML, "
","") strMetaDescHTML = Replace(strMetaDescHTML, "
","") strMetaDescHTML = Replace(strMetaDescHTML, "","") strMetaDescHTML = Replace(strMetaDescHTML, "","") strMetaDescHTML = Replace(strMetaDescHTML, vbcrlf, ". ") If Application(LICENSENUMBER & "convertdescbreaks") = "y" Then PT_Desc = replace(PT_Desc, vbcrlf, "
") End If End If objRecordSet.Close %> <% If PT_ProductDisplayType = "d" Then PT_ProductDisplayType = Application(LICENSENUMBER & "defaultproddisplay") If PT_ProdTypeDisplayType = "d" Then PT_ProdTypeDisplayType = Application(LICENSENUMBER & "defaultprodtypedisplay") If PT_ProductDisplayType = "s" Then numProdShortenValueCols = Application(LICENSENUMBER & "shortenedformatcols") numProdsPerPage = numProdShortenValueCols * Application(LICENSENUMBER & "shortenedformatrows") Else numProdsPerPage = Application(LICENSENUMBER & "prodtypepagesize") End If Call ReadFromTemplate(strTemplateLocation, aryPageTemplate, strBasketHTML, strCategoryListHTML) Response.Write(aryPageTemplate(0)) If blnNoShow Then %>
<% WriteString("ContentText_ProdTypeUnavailable") %>
<% Else strProductsOrderBy = Application(LICENSENUMBER & "orderby_products") If PT_OrderProductsBy <> "" Then strProductsOrderBy = PT_OrderProductsBy If strProductsOrderBy = "" Then strProductsOrderBy = "P_Name" If strProductsOrderBy = "P_Name" Or strProductsOrderBy = "P_Desc" Or strProductsOrderBy = "P_StrapLine" Or strProductsOrderBy = "P_SpecTable" Or strProductsOrderBy = "P_Hyperlink" Then strProductsOrderBy = strProductsOrderBy & CStr(numLanguageID) End If If strDatabaseType = "access" Then strQuery = "SELECT DISTINCTROW PT_ID, P_ID, P_VersionDisplayType, P_OrderVersionsBy, P_StrapLine" & CStr(numLanguageID) & ", P_Desc" & CStr(numLanguageID) & ", P_Name" & CStr(numLanguageID) Else strQuery = "SELECT DISTINCT PT_ID, P_ID, P_VersionDisplayType, P_OrderVersionsBy, P_StrapLine" & CStr(numLanguageID) & ", P_Desc" & CStr(numLanguageID) & ", P_Name" & CStr(numLanguageID) End If If instr(strQuery, strProductsOrderBy) = "0" Then strQuery = strQuery & ", " & strProductsOrderBy strQuery = strQuery & " FROM ((tblCactuShopProdtype INNER JOIN tblCactuShopProductProdTypeLink ON tblCactuShopProdtype.PT_ID = tblCactuShopProductProdTypeLink.PPT_ProdTypeID) INNER JOIN tblCactuShopProducts ON tblCactuShopProducts.P_ID = tblCactuShopProductProdTypeLink.PPT_ProductID) INNER JOIN tblCactuShopVersions ON tblCactuShopVersions.V_Product = tblCactuShopProducts.P_ID WHERE P_Name" & CStr(numLanguageID) & " <> '' AND P_Live = 'y' AND PT_Live = 'y' AND PT_ID=" & PT_ID & " ORDER BY " & strProductsOrderBy Call ExecuteSQL(strQuery, numCursorType, objRecordSet) numRecordCount = objRecordSet.RecordCount If numRecordCount > 0 Then objRecordSet.AbsolutePosition = numRecordPosition End If %> <% If strPageLinks <> "" Then %> <% End If Set objFileSystem = Server.CreateObject("Scripting.FileSystemObject") aryFileTypes = Split(Application(LICENSENUMBER & "allowedimages"), ",") strCategoryPath = Server.MapPath(Application(LICENSENUMBER & "uploadsfolder") & "images_categories/") strCategoryLargePath = Server.MapPath(Application(LICENSENUMBER & "uploadsfolder") & "images_categories_large/") strFileName = GetFileLocation(strCategoryPath, PT_ID, aryFileTypes, objFileSystem) strFileStatus = "" If Not strFileName = "" Then strFileStatus = " &
" strFileName = GetFileLocation(strCategoryLargePath, PT_ID, aryFileTypes, objFileSystem) strFileStatus2 = "" If Not strFileName = "" Then If gfxSpex(strCategoryLargePath & "\" & strFileName, imgW, imgH, c, strType) = True Then strImage = strFileName strImageType = "category" strFileStatus2 = "

" & GetString("ContentText_View2") & " & " End If End If strText = strFileStatus & Highlight(PT_Desc, strKeywords, "searchtexthighlight") & strFileStatus2 If strText <> " " Then %> <% End If %>
<% If PT_ID <> 0 Then Select Case strPageHistory Case "cat": strLocationBar = strLocationBar & "" & GetString("ContentText_Categories") & " > " Case "search" strLocationBar = strLocationBar & "" & GetString("ContentText_Search") & " > " strLocationBar = strLocationBar & "" & GetString("ContentText_SearchResults") & " > " Case Else: strLocationBar = strLocationBar & "" & GetString("ContentText_Home") & " > " End Select numMotherID = PT_MotherProdType Do While numMotherID > 0 strQuery = "SELECT PT_ID, PT_Name" & CStr(numLanguageID) & ", PT_MotherProdType FROM tblCactuShopProdtype WHERE PT_ID = " & numMotherID Call ExecuteSQL(strQuery, numCursorType, objRecordSet3) If Not (objRecordSet3.BOF And objRecordSet3.EOF) Then numMotherID = objRecordSet3("PT_MotherProdType") strMothers = "" & objRecordSet3("PT_Name" & CStr(numLanguageID)) & " > " & strMothers Else numMotherID = 0 End If objRecordSet3.Close Loop strLocationBar = StrLocationBar & strMothers & PT_Name Response.Write("" & PT_Name & "
" & strLocationBar & "") Else Response.Write("" & GetString("ContentText_Categories") & "
") End If %>
<%= strPageLinks %>
<%= strText %>
<% strQuery = "SELECT * FROM tblCactuShopProdtype WHERE PT_Name" & numLanguageID & " <> '' AND PT_MotherProdtype = " & PT_ID & " AND PT_Live = 'y' ORDER BY " & strCategoryOrderBy Call ExecuteSQL(strQuery, numCursorType, objRecordSet3) numCatRecordCount = objRecordSet3.RecordCount If PT_ProdTypeDisplayType = "s" Then numCatShortenValueCols = Application(LICENSENUMBER & "shortenedformatcols") 'number of columns to display numCatColumnWidthPercent = 100 / numCatShortenValueCols 'width of each column Else numCatShortenValueCols = 1 End If If numCatRecordCount > 0 Then %> <% End If If numCatRecordCount > 0 And PT_ID <> 0 Then %> <% End If Do While Not objRecordSet3.EOF numCatRecordPosition = numCatRecordPosition + 1 If PT_ProdTypeDisplayType = "s" Then %> <% If (numCatRecordPosition = numCatRecordCount) Or (numCatRecordPosition mod numCatShortenValueCols = 0) Then numExtraCells = numCatShortenValueCols- (numCatRecordPosition mod numCatShortenValueCols) If numExtraCells = numCatShortenValueCols Then numExtraCells=0 For numCellCounter = 1 To numExtraCells numCatRecordPosition = numCatRecordPosition + 1 Response.Write "" & vbCrlf Next %> <% If numCatRecordPosition >= objRecordSet3.RecordCount Then %>

<% WriteString("ContentText_SubCategories") %>

"><%= objRecordSet3("PT_Name" & CStr(numLanguageID))%>
<% strFileName = GetFileLocation(strCategoryPath, objRecordSet3("PT_ID"), aryFileTypes, objFileSystem) If strFileName = "" Then strFileStatus = "" Else strFileStatus = " & " End If Response.Write(strFileStatus) %>
 
<% End If If numCatRecordPosition < numCatRecordCount Then %> <% End If End If ElseIf PT_ProdTypeDisplayType = "l" Then %> <% Else %> <% End If objRecordSet3.MoveNext Loop objRecordSet3.Close If numCatRecordCount > 0 Then %>
"><%= objRecordSet3("PT_Name" & CStr(numLanguageID))%>
"><%= objRecordSet3("PT_Name" & CStr(numLanguageID))%>
<% Response.Write(objRecordSet3("PT_Desc" & CStr(numLanguageID))) %>
<% End If If PT_ProductDisplayType="s" Then numProdShortenValueCols = Application(LICENSENUMBER & "shortenedformatcols") numProdsPerPage = numProdShortenValueCols * Application(LICENSENUMBER & "shortenedformatrows") numProdColumnWidthPercent = 100 / numProdShortenValueCols Else numProdShortenValueCols = 1 End If Set objFileSystem = Server.CreateObject("Scripting.FileSystemObject") strProductPath = Server.MapPath(Application(LICENSENUMBER & "uploadsfolder") & "images_products/") strVersionPath = Server.MapPath(Application(LICENSENUMBER & "uploadsfolder") & "images_versions/") strVersionLargePath = Server.MapPath(Application(LICENSENUMBER & "uploadsfolder") & "images_versions_large/") aryFileTypes = Split(Application(LICENSENUMBER & "allowedimages"), ",") If objRecordSet.RecordCount > 0 Then %> <% End If numSpacerCounter = 0 Do While numRecordPosition < Clng(numPageStartPosition + numProdsPerPage) And Not objRecordSet.EOF P_OrderVersionsBy = objrecordSet("P_OrderVersionsBy") If PT_ProductDisplayType <> "s" Or numProdShortenValueCols = 0 Then %> <% Else If numRecordPosition mod numProdsPerPage = 1 Then %>

<% WriteString("ContentText_Products") %>

<% If PT_ProductDisplayType = "e" Then %> <% End If objRecordSet.MoveNext %>
<% Response.Write("" & objRecordSet("P_Name" & CStr(numLanguageID)) & "") %>

<% strFileName = GetFileLocation(strProductPath, objRecordSet("P_ID"), aryFileTypes, objFileSystem) If strFileName = "" Then strFileStatus = "" Else If gfxSpex(strProductPath & "\" & strFileName, imgW, imgH, c, strType) = True Then strFileStatus = " & " End If End If Response.Write(strFileStatus) If strFileName = "" Then Else Response.Write("
") End If If objRecordSet("P_StrapLine" & CStr(numLanguageID)) <> "" Then Response.Write("" & objRecordSet("P_StrapLine" & CStr(numLanguageID)) & "
") End If P_Desc = objRecordSet("P_Desc" & CStr(numLanguageID)) intTruncatePoint = Clng(Application(LICENSENUMBER & "truncateproductoncategory")) If intTruncatePoint > 0 And len(P_Desc) > intTruncatePoint Then P_Desc = left(P_Desc, intTruncatePoint - 3) & "..." End If If Application(LICENSENUMBER & "convertdescbreaks") = "y" Then P_Desc = replace(P_Desc, vbcrlf, "
") End If Response.Write P_Desc If strFileName = "" Then Else Response.Write("
") End If %>
<% If Application(LICENSENUMBER & "showmoredetaillink") = "l" Then %>
"><% WriteString("ContentText_ViewProductMoreDetail") %> >> <% Else %>
"> ">
<% End If %>
<% strVersionsOrderBy = Application(LICENSENUMBER & "orderby_versions") If P_OrderVersionsBy <> "" Then strVersionsOrderBy = P_OrderVersionsBy If strVersionsOrderBy = "" Then strVersionsOrderBy = "V_Name" If strVersionsOrderBy = "V_Name" Or strVersionsOrderBy = "V_Desc" Then strVersionsOrderBy = strVersionsOrderBy & CStr(numLanguageID) P_VersionDisplayType = objRecordSet("P_VersionDisplayType") strQuery3 = "SELECT DISTINCT T_Taxrate, V_ID, V_Price, V_Weight, V_RRP, V_Tax, V_Product, V_CodeNumber, V_Quantity, V_Quantity, V_QuantityWarnLevel, " & strVersionsOrderBy & " As OrderByBit, V_Name" & CStr(numLanguageID) & ", V_Desc" & CStr(numLanguageID) & " FROM tblCactuShopVersions INNER JOIN tblCactuShopTaxRates ON tblCactuShopVersions.V_Tax = tblCactuShopTaxRates.T_ID WHERE V_Live = 'y' AND V_Product=" & objRecordSet("P_ID") & " AND V_Name" & CStr(numLanguageID) & " <> '' ORDER BY " & strVersionsOrderBy Call ExecuteSQL(strQuery3, numCursorType, objRecordSet3) Set objFileSystem = Server.CreateObject("Scripting.FileSystemObject") strReturnURL = "prodtype.asp:::PT_ID=" & PT_ID & "|||numRecordPosition=" & numPageStartPosition & "|||strPageHistory=" & strPageHistoryClause strVersionPath = Server.MapPath(Application(LICENSENUMBER & "uploadsfolder") & "images_versions/") strVersionLargePath = Server.MapPath(Application(LICENSENUMBER & "uploadsfolder") & "images_versions_large/") %> <% objRecordSet3.Close %>

<% End If %> <% If (numRecordPosition = numRecordCount) OR (numRecordPosition mod numProdShortenValueCols = 0) Then numModValue = (numRecordPosition mod numProdsPerPage) mod numProdShortenValueCols numExtraCells = numProdShortenValueCols-numModValue If numExtraCells = numProdShortenValueCols Then numExtraCells = 0 For numCellCounter = 1 To numExtraCells numRecordPosition = numRecordPosition + 1 %> <% Next %> <% If numRecordPosition mod numProdsPerPage <> 0 And numRecordPosition <> numRecordCount Then %> <% End If End If objRecordSet.MoveNext End If numRecordPosition = numRecordPosition + 1 Loop If objRecordSet.RecordCount > 0 Then %>
<% If objRecordSet("P_StrapLine" & CStr(numLanguageID)) <> "" Then %> <% End If %> <% If Application(LICENSENUMBER & "shortenedformatshowdesc") = "y" Then %> <% End If If Application(LICENSENUMBER & "shortenedformatshowversions") = "y" Then %> <% End If %>
<% Response.Write("" & objRecordSet("P_Name" & CStr(numLanguageID)) & "") %>
<%= objRecordSet("P_StrapLine" & CStr(numLanguageID)) %>
<% strFileName = GetFileLocation(strProductPath, objRecordSet("P_ID"), aryFileTypes, objFileSystem) If strFileName = "" Then strFileStatus = "" Else strFileStatus = " & " End If Response.Write(strFileStatus) %>
<% P_Desc = objRecordSet("P_Desc" & CStr(numLanguageID)) If Application(LICENSENUMBER & "convertdescbreaks") = "y" Then P_Desc = replace(P_Desc, vbcrlf, "
") End If Response.Write(P_Desc) %>
<% strVersionsOrderBy = Application(LICENSENUMBER & "orderby_versions") If P_OrderVersionsBy <> "" Then strVersionsOrderBy = P_OrderVersionsBy If strVersionsOrderBy = "" Then strVersionsOrderBy = "V_Name" If strVersionsOrderBy = "V_Name" Or strVersionsOrderBy = "V_Desc" Then strVersionsOrderBy = strVersionsOrderBy & CStr(numLanguageID) P_VersionDisplayType = objRecordSet("P_VersionDisplayType") If P_VersionDisplayType = "d" Then P_VersionDisplayType = Application(LICENSENUMBER & "defaultversiondisplay") If P_VersionDisplayType <> "r" Then strQuery3 = "SELECT DISTINCT T_Taxrate, V_ID, V_Price, V_Weight, V_RRP, V_Tax, V_Product, V_CodeNumber, V_Quantity, V_Quantity, V_QuantityWarnLevel, " & strVersionsOrderBy & " As OrderByBit, V_Name" & CStr(numLanguageID) & ", V_Desc" & CStr(numLanguageID) & " FROM tblCactuShopVersions INNER JOIN tblCactuShopTaxRates ON tblCactuShopVersions.V_Tax = tblCactuShopTaxRates.T_ID WHERE V_Live = 'y' AND V_Product=" & objRecordSet("P_ID") & " ORDER BY " & strVersionsOrderBy Call ExecuteSQL(strQuery3, numCursorType, objRecordSet3) Set objFileSystem = Server.CreateObject("Scripting.FileSystemObject") strReturnURL = "prodtype.asp:::PT_ID=" & PT_ID & "|||numRecordPosition=" & numPageStartPosition & "|||strPageHistory=" & strPageHistoryClause strVersionPath = Server.MapPath(Application(LICENSENUMBER & "uploadsfolder") & "images_versions/") strVersionLargePath = Server.MapPath(Application(LICENSENUMBER & "uploadsfolder") & "images_versions_large/") %> <% objRecordSet3.Close Else Response.Write " " End If %>
 
<% End If objRecordSet.Close Set objFileSystem = Nothing If strPageLinks <> "" Then %>
<%= strPageLinks %>
<% End If End If Response.Write(aryPageTemplate(1)) objDataConn.Close Set objDataConn = Nothing %>