<%@ Language=VBScript %> <% Option Explicit %> <% on error resume next dim category_ID, rsGallery, rsCategory, CategoryName, strUrl category_ID = string_apostroph_safe(request.QueryString("Category_ID")) if category_ID = "" then conn.close set conn = nothing response.Redirect("galleries.asp") end if set rsGallery = server.CreateObject("ADODB.RECORDSET") rsGallery.CursorLocation = adUseClient set rsGallery = conn.execute("SELECT * FROM Galleries WHERE Category_ID=" & Category_ID) set rsCategory = server.CreateObject("ADODB.RECORDSET") rsCategory.CursorLocation = adUseClient set rsCategory = conn.execute("SELECT Name FROM Gallery_Categories WHERE Category_ID=" & Category_ID) if not rsCategory.EOF then CategoryName = rsCategory("Name") end if rsCategory.Close set rsCategory = nothing strUrl = replace(CategoryName, " ", "_") if Err <> 0 then conn.close set conn = nothing response.Redirect("/") end if %> Galleries

<%=CategoryName%>

Please click on the image below to see an enlarged photo:

Back to Galleries

<% dim strThumbnail, objImage, iHeight, iWidth, iRatio do while not rsGallery.EOF 'get image size set objImage = server.CreateObject("IMGSIZE.CHECK") if len(rsGallery("sm_image")) > 3 then objIMage.FileName = Request.ServerVariables("APPL_PHYSICAL_PATH") & "\images\gallery\" & rsGallery("sm_image") strThumbNail = rsGallery("sm_image") else objIMage.FileName = Request.ServerVariables("APPL_PHYSICAL_PATH") & "\images\gallery\" & rsGallery("lg_image") strThumbNail = rsGallery("lg_image") end if iheight = objImage.Height iwidth = objImage.Width if iwidth > 0 and iwidth > 120 then iratio = 120/iwidth iwidth = 120 else iratio = 1 end if set objImage = nothing %> <%rsGallery.MoveNext%> <%if not rsGallery.EOF then set objImage = server.CreateObject("IMGSIZE.CHECK") if len(rsGallery("sm_image")) > 3 then objIMage.FileName = Request.ServerVariables("APPL_PHYSICAL_PATH") & "\images\gallery\" & rsGallery("sm_image") strThumbNail = rsGallery("sm_image") else objIMage.FileName = Request.ServerVariables("APPL_PHYSICAL_PATH") & "\images\gallery\" & rsGallery("lg_image") strThumbNail = rsGallery("lg_image") end if iheight = objImage.Height iwidth = objImage.Width if iwidth > 0 and iwidth > 120 then iratio = 120/iwidth iwidth = 120 else iratio = 1 end if set objImage = nothing %> <%end if%> <% if not rsGallery.EOF then rsGallery.MoveNext end if loop %>
&Name=<%=CategoryName%>"> &Name=<%=CategoryName%>">

 

<% conn.close set conn = nothing %>