%@ Language=VBScript %> <% 'Alter these codes to change BanMan ads ZoneCodeTopBanner1 = 11 'zone id no. ZoneCodeTopBanner2 = 468 'width in pixels ZoneCodeTopBanner3 = 60 'height in pixels ZoneCodeTopBanner4 = 33333 'page id ZoneCodeBottomBanner1 = 1 ZoneCodeBottomBanner2 = 468 ZoneCodeBottomBanner3 = 60 ZoneCodeBottomBanner4 = 33333 strCatt=Request.Querystring("cat") if not IsValidString(strCatt) then strCatt = 0 '-------------------------------- function SpecChar(str) if not isnull(str) then str = Replace(str, "&", "&") str = Replace(str, """", """) str = Replace(str, "<", "<") str = Replace(str, ">", ">") end if SpecChar = str End function '-------------------------------- 'BUILD SQL QUERY To Get Ubercategory name strSQL = "SELECT CatName FROM Category WHERE CatID = '" & sqlsafe(strCatt) & "'" Call ExecuteSQL(strSQL,cursortype,rs_main) strUbCatName = rs_main("CatName") rs_main.Close %>
denotes WINNER
Communication,
Games,
Information Managers,
Internet,
Multimedia,
Personal,
Text and Reference,
Travel,
Utilities |
<%=strUbCatName%> <% 'BUILD SQL QUERY To Get subcat #'s from Ubercategory strSQL = "SELECT CatID, CatName FROM Category WHERE ParentID = '" & sqlsafe(strCatt) & "'" &_ " AND CatID <> 181" &_ " AND CatID <> 169" &_ " AND CatID <> 162" &_ " AND CatID <> 130" &_ " AND CatID <> 141" &_ " AND CatID <> 113" &_ " ORDER BY CatName" Call ExecuteSQL(strSQL,cursortype,rs_main2) 'OPEN RS2 gets all subcat names & numbers for ubercat 'Response.write strSQL 'format the subcategories with all their products Do While Not rs_main2.EOF %>
<% 'BUILD SQL QUERY strSQL = "SELECT Product.ProdID, ProdName, Description1, CompanyName, Web, ImgFileName, AwardStatus " &_ "FROM Product INNER JOIN Company ON Product.CompanyID = Company.CompanyID " &_ "INNER JOIN AwardHistory ON AwardHistory.ProdID = Product.ProdID " &_ "WHERE (AwardStatus LIKE 'Winner' OR AwardStatus LIKE 'Finalist') AND CatID = '" & rs_main2("CatID") & "' " &_ "ORDER BY AwardStatus DESC, ProdName" 'Response.Write strSQL & "|
<%
If rs_main3("ImgFileName") <> "" Then %>
">
<%=SpecChar(rs_main3("ProdName"))%> <%=SpecChar(rs_main3("Description1"))%> |
|
| <%=SpecChar(rs_main3("CompanyName"))%> | <% strWeb=rs_main3("Web") strWeb=Replace(strWeb,"http://","")%> <%=rs_main3("Web")%> |
denotes WINNER
Communication, Games, Information Managers, Internet, Multimedia, Personal, Text and Reference, Travel, Utilities |