<%@ LANGUAGE="VBSCRIPT" %> <% PageStrings = "321, 322, 323, 324, 325, 326, 327, 328, 329" %> <% '=============================================== ' CactuShop ASP Shopping Cart ' ©1999-2004 Cactusoft Ltd. www.cactusoft.com '=============================================== ' All rights reserved. ' Use of this code is covered by the terms and ' conditions in the license agreement. No ' unauthorized duplication or distribution is ' permitted. Cactusoft's copyright notices must ' remain in the ASP sections of the code. '=============================================== strKeyword = request.querystring("strKeyword") %> <% =GetString("Config_headtitle") %>
<% If strKeyword<>"" then '----------------------------------------------- 'THIS NESTED QUERY DRAWS VERSION TABLE '----------------------------------------------- strQuery = "SELECT * FROM tblCactuShopVersions WHERE V_Name" & CStr(numLanguageID) & " LIKE '%" & sqlsafe(strKeyword) & "%' OR V_CodeNumber LIKE '%" & sqlsafe(strKeyword) & "%' ORDER BY V_ID" Call ExecuteSQL(strQuery, numCursorType, objRecordSet) %>
<% WriteString("PageTitle_SearchResults") %>
<% WriteString("ContentText_VersionsMatched") %> <% =objRecordSet.recordcount %>
<% do while not objRecordSet.EOF numBackgroundCounter = numBackgroundCounter + 1 If numBackgroundCounter mod 2 = 0 then strBGColour = "#EEEEEE" else strBGColour = "#DDDDDD" end if %> <% objRecordSet.moveNext loop objRecordSet.Close %>
<% WriteString("ContentText_CodeNumber") %> <% WriteString("ContentText_Name") %>  
<% =objRecordSet("V_CodeNumber") %> <% =objRecordSet("V_Name" & CStr(numLanguageID)) %> "><% WriteSafeString(" title="<% WriteSafeString("ImageLabel_EditThisProduct") %>" src="images_webshop/b_product.gif" border="0"> &P_ID=<% =objRecordSet("V_Product") %>&strCallMode=c"><% WriteSafeString(" title="<% WriteSafeString("ImageLabel_CloneThisVersion") %>" src="images_webshop/c_version.gif" border="0"> &P_ID=<% =objRecordSet("V_Product") %>"><% WriteSafeString(" title="<% WriteSafeString("ImageLabel_EditThisVersion") %>" src="images_webshop/b_version.gif" border="0">
<% end if '----------------------------------------------- 'END OF NESTED QUERY '----------------------------------------------- '----------------------------------------------- 'SEARCH FOR PRODUCTS '----------------------------------------------- 'compile where clause strSearchWhereClause = "WHERE P_Name" & CStr(numLanguageID) & " LIKE '%" & sqlsafe(strKeyword) & "%' " If strKeyword = "" then strSearchWhereClause = "" Else strSearchWhereClause = " WHERE P_Name" & CStr(numLanguageID) & " LIKE '%" & sqlsafe(strKeyword) & "%'" End If 'run database query strQuery = "SELECT * FROM (tblCactuShopProducts INNER JOIN tblCactuShopProductProdTypeLink ON tblCactuShopProducts.P_ID = tblCactuShopProductProdTypeLink.PPT_ProductID) INNER JOIN tblCactuShopProdtype ON tblCactuShopProductProdTypeLink.PPT_ProdTypeID = tblCactuShopProdtype.PT_ID" & strSearchWhereClause & " ORDER BY P_Name" & CStr(numLanguageID) & ", P_ID" Call ExecuteSQL(strQuery, numCursorType, objRecordSet) %>
<% WriteString("ContentText_ProductsMatched") %> <% =objRecordSet.recordcount %>
<% do while not objRecordSet.EOF If numLastProductID <> objRecordSet("P_ID") then numBackgroundCounter = numBackgroundCounter + 1 If numBackgroundCounter mod 2 = 0 then strBGColour = "#EEEEEE" else strBGColour = "#DDDDDD" end if %> <% End if numLastProductID = objRecordSet("P_ID") objRecordSet.moveNext loop objRecordSet.Close %>
<% WriteString("ContentText_Name") %>
<% =objRecordSet("P_Name" & CStr(numLanguageID)) %> &PT_ID=<% =objRecordSet("PT_ID") %>"><% WriteSafeString(" title="<% WriteSafeString("ImageLabel_EditThisProduct") %>" src="images_webshop/b_product.gif" border="0">
<% WriteString("ContentText_NewSearch") %>