end if
rsInput.movenext response.write(":" & "<br>"& vbCrLf) wend
conn1.close set rsInput = nothing response.write("done: " & lines & vbCrLf) %>
Next step is the basic product page, which has auto-numbering and link navigation created as a part of the build process. This first section of code just arranges the auto-numbering for this. The next opens a new output file, then opens the tables needed to produce a page between chunks of html. The finished page here is a first pass of many passes before all the keywords are inserted and the page is ready to publish. The database is within the web server's scope so has read/execute/script permissions set under IIS4, and the folder is shared for protection using the machine account under win98/NT4.
set rsInput = server.createobject("ADODB.Recordset")
rsInput.open "content", conn1, 2, 3, 2
rsInput.movefirst
lines = 1 while not rsInput.EOF if not isnull(rsInput("prod_model")) then
series = series + 1
lines = lines + 1 if series < 100then if series < 10then
htmlOut = "x:\webshare\wwwroot\gns\v1\prod_00" & series & ".html"
sNext = series + 1
htmlNext = "prod_00" & sNext & ".html" if series > 1then
sPrev = series - 1
htmlPrev = "prod_00" & sPrev & ".html" end if else
htmlOut = "x:\webshare\wwwroot\gns\v1\prod_0" & series & ".html"
sNext = series + 1
htmlNext = "prod_0" & sNext & ".html"
sPrev = series - 1 if sPrev = 9then
htmlPrev = "prod_009.html" else
htmlPrev = "prod_0" & sPrev & ".html" end if end if else
htmlOut = "x:\webshare\wwwroot\gns\v1\prod_" & series & ".html"
sNext = series + 1
htmlNext = "prod_" & sNext & ".html" if series = 1then
htmlPrev = "prod_001.html" else
sPrev = series - 1 if sPrev = 99then
htmlPrev = "prod_099.html" else
htmlPrev = "prod_" & sPrev & ".html" end if end if end if
filename = mid(htmlOut, instr(htmlOut, "prod_")) response.write("filename: " & filename & "<br>")
Previous versions of VBScript are CaseSensitive, this is written for the latest version.
Development Test System: Windows98, PentiumII 200MHz 128Mb
Personal Web Server 4.0 (IIS4), SQL7b3, Personal Oracle, Sybase