% catid = Request.QueryString("catid") if catid then response.redirect "http://asterweb.jpl.nasa.gov/gallery.asp?catid=" & catid else response.redirect "http://asterweb.jpl.nasa.gov/gallery.asp" end if Set dbase = Server.CreateObject("ADODB.Connection") dbase.Open "gallery" if len(catid) = 0 then catid = "start" end if set cat = dbase.Execute(" select * from cat order by catid ") if catid = "start" then Set list = dbase.Execute(" select * from picture where rotation = true order by id desc ") else Set list = dbase.Execute(" select * from picture where catid = "& catid &" and rotation = true order by lname") set catname = dbase.Execute(" select * from cat where catid = " & catid) end if %>
, <% list.movenext loop list.movefirst %>">
CATEGORIES: <% do while not cat.eof if cat("catid") = 0 then cat.movenext end if %>- "><%=cat("cat")%> <% cat.movenext loop cat.movefirst %> |
<%=catname("cat")%> <% else %> 20 Most Recent Additions to the Gallery <% end if %>
|
|