<% '---> '

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 %>
>
<% '---> response.write(strAllGroup) '<--- %>
bgcolor=<%=BackColour%>> <%do until fp_rs.eof lastID=fp_rs(0) %> <% if count >=colCount then response.write("") count=1 else count=count+1 end if fp_rs.movenext loop %>
bgcolor=<%=BackColour%>>
<%response.write(fp_rs(1))%>
<%response.write(fp_rs(2))%>
<%response.write(fp_rs(4))%> <% '---> ' Price: $<%response.write(fp_rs(3))%_> '<--- if fp_rs(3)<>0 then %>  >   <% end if %>
<%if LimitPerPage > 0 then %>
> >

 

<% else %> <% end if %> <% con.close() set con = nothing set fp_rs = nothing %>