|
<%
'--->
' strAllCat = "Movies" strAllGroup = "The OfficeCourse.com Movies" ' '<--- %> <% dim sflds '******************************************** '* Set Values for look and feel '******************************************** dim mainTableBorder,bubTableBorder,BackColour,LimitPerPage Dim formatName(1) Dim formatValue(1) mainTableBorder = 1 subTableBorder = 0 BackColour = "white" strTableColour = "#000080" LimitPerPage=0 '20 Category=strAllCat formatName(0)="Price" formatValue(0)="Price: $" '******************************************** Dim LastID,MaxID DIm sChkSQL,rsCheck sflds = getFields("dynamic","products") if sFlds = "" then Response.Write("Field Values have not been set in db_conf - please set Fields") response.End end if colCount = 1' cint(getValue("dynamic_cols")) if LimitPerPage > 0 then if Category<>"" then fp_sQry="SELECT top "& LimitPerPage &" prodid,"&sFlds&" FROM Products where category='" & Category & "' and [inventory] > 0" else fp_sQry="SELECT top "& LimitPerPage &" prodid,"&sFlds&" FROM Products where [inventory] > 0" end if sChkSQL = "Select max(prodid) as [maxval] from products" set rsCheck=server.createobject("adodb.recordset") set rsCheck = con.execute(sChkSQL) DO UNTIL rsCheck.Eof MaxId=rsCheck(0) rsCheck.movenext loop rsCheck.Close set rsCheck=nothing else if Category<>"" then fp_sQry="SELECT prodid,"&sFlds&" FROM Products where category='" & Category & "'" else fp_sQry="SELECT prodid,"&sFlds&" FROM Products" end if end if if request.querystring("lastid")<>"" then if instr(lcase(fp_sQry),"where")>0 then fp_sQry=fp_sqry&" and prodid > "&request.querystring("lastid") else fp_sqry=fp_sqry & " where prodid > " & request.querystring("lastid") end if end if dim fp_rs set fp_rs = server.createobject("adodb.recordset") set fp_rs = con.execute(fp_sQry & " order by SortOrder asc") if fp_rs.EOF then response.write "No Products found" response.End end if Dim count count = 1 %>
| ||||
% else %> <% end if %>