<% 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 %>"> ASTER's Remote Sensing Image Gallery
CATEGORIES:
<% do while not cat.eof if cat("catid") = 0 then cat.movenext end if %>- "><%=cat("cat")%>
<% cat.movenext loop cat.movefirst %>

ASTER's Satellite Image Gallery <% if catid <> "start" then %>
<%=catname("cat")%> <% else %>
20 Most Recent Additions to the Gallery <% end if %>

<% tr = 0 x = 0 do while not list.eof tr = tr + 1 x = x + 1 if tr = 1 then %> <% end if %> <% if tr = 4 then %> <% tr = 0 end if list.movenext if catid="start" then if x = 20 then exit do end if end if loop if tr > 0 then tr = 4 - tr for i = 1 to tr %> <% next %> <% end if %>
<%if list("iow") then%>*Image of the Week*
<%end if%>"><%=list(" src="/gallery/images/pics/tn_<%if list("movie") then %><%=list("thumb")%><%else%><%=list("file")%><%end if%>" border="2">
<%=list("lname")%>
 
List By # of Hits