<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <%dim title title="Zion King Gallery" dim conn_gallery, rs_gallery, medium_image, large_image dim url_image_group, url_start_row dim display_rows, dsply_minus_one dim start_row, end_range_row dim gallery_count url_image_group = Request.QueryString("image_group") if url_image_group = "" then response.Redirect("zion-gallery.asp") end if url_start_row = 1 if Request.QueryString("start_row") <> "" then if IsNumeric(Request.QueryString("start_row")) then url_start_row = int(Request.QueryString("start_row")) end if end if start_row = url_start_row - 1 gallery_count = 0 display_rows=7 dsply_minus_one = display_rows - 1 call qry_select(conn_gallery, rs_gallery, "zion_gallery", "image_group, medium_image, large_image", qf("image_group = 'url_image_group'"), "") image_count = rs_gallery.RecordCount %> <%=title%>

<%=url_image_group%>

<% call nav_images() response.Write("
") rs_Gallery.Move(start_row) Do While NOT rs_gallery.EOF AND gallery_count < display_rows medium_image = rs_gallery.fields("medium_image") large_image = rs_gallery.fields("large_image") gallery_count = gallery_count + 1 if large_image <> "" then response.Write("") else response.Write("") end if response.Write("
") call copyright() response.Write("

") rs_gallery.MoveNext Loop response.Write("

") call nav_images() %>







<%call qry_close(conn_gallery, rs_gallery)%> <% '************************************************************************************** '************************** FUNCTIONS ***************************** '************************************************************************************** sub nav_images() dim m if image_count > display_rows then response.Write("
") for m=1 to image_count step display_rows end_range_row =m+dsply_minus_one if url_start_row <> m then response.Write("") else response.Write("") end if response.Write(m) if m < image_count then response.Write(" - ") if end_range_row < image_count then response.Write(end_range_row) else response.Write(image_count) end if end if if url_start_row <> m then response.Write("") else response.Write("") end if response.Write("  ") Next response.Write("
") end if end sub %>