Using ASP to Create a Website from Spreadsheets Continued
Finished with the product pages, but the catalog needs a heirarchy, so some asp pages were created to arrange several levels of indexes and also the pricing pages within the navigation schema. These are by product and group types. Then, the homepage was coded to be created from database sources to create drop-down select boxes by product or group. Since these two groupings rely on the same logic, slightly altered, here’s the one for the index of product types.
set conn2 = server.createobject(“Scripting.FileSystemObject“) htmlOut = “X:websharewwwrootgnsv1type_price_00” & series & “.html“ set output = conn2.OpenTextFile(htmlOut, 8, True)
set conn1 = server.createobject(“ADODB.Connection“) “ ” & lcase(rsInput(“prod_type“)) & “ |
” & rsInput(“prod_page“) & ““” target=_top>” & rsInput(“prod_model“) & “ |
” & rsInput(“part_number“) & “ |
“>” & rsInput(“description“) & “ |
$” & formatnumber(rsInput(“sin132_price“), 0, –2) & “ |
“) |
“)
output.writeline(“Notes:
“)
set conn1 = server.createobject(“ADODB.Connection“)
conn1.open “Provider=Microsoft.Jet.OLEDB.3.51; Data Source=X:websharewwwrootgnscgigns_01.mdb“
set rsTemp3 = server.createobject(“ADODB.Recordset“)
rsTemp3.open “notes“, conn1, 2, 3, 2
while not rsTemp3.EOF
if not (rsTemp3(“prod_type“) = ptype) then
if done = 0 then
done = 1
if not isnull(rsTemp3(“note1“)) then
output.writeline(“” & rsTemp3(“note1“) & “
“)
end if
if not isnull(rsTemp3(“note2“)) then
output.writeline(“” & rsTemp3(“note2“) & “
“)
end if
if not isnull(rsTemp3(“note3“)) then
output.writeline(“” & rsTemp3(“note3“) & “
“)
end if
end if
end if
rsTemp3.movenext
wend