Like Us on Facebook Donate to SafeSpace
 

Photo Gallery

<% xAlbumID = CheckSQL(request("AlbumID")) '================ Connection to Gallery Albums Dim rs, SQL Set rs = Server.CreateObject("ADODB.Recordset") SQL = "SELECT * From Gallery_Albums " If xAlbumID <> "" Then SQL = SQL & " WHERE ID = " & xAlbumID End If SQL = SQL & " order by DateCreated Desc" rs.Open CheckSQL(SQL), Conn, 1, 3 Dim picCount picCount = 1 If xAlbumID <> "" Then Dim rs2, SQL2 Set rs2 = Server.CreateObject("ADODB.Recordset") SQL2 = "SELECT * FROM Gallery_Photos where Album = " & xAlbumID rs2.Open CheckSQL(SQL2), Conn, 1, 3 AlbumDir = rs("DirectoryName")%>
<%Do While Not rs2.EOF If piccount = 1 Then%> <%End If%> <%If picCount = 3 Then%> <% picCount = 1 Else picCount = picCount + 1 End if rs2.MoveNext Loop %>
<%=rs("Name")%> Return to Albums
<%=rs("Description")%>

Click on Image to Enlarge
" class="highslide" onclick="return hs.expand(this)"> " alt="<%=rs2("Photo")%>" />
<%=rs("Name")%>
<%=rs2("Caption")%>
 
<%Else 'Display all of the Albums %>
<% If rs.recordcount = 0 Then%> <% End If Dim rs1, SQL1 Set rs1 = Server.CreateObject("ADODB.Recordset") Do While Not rs.EOF 'Get Default Image SQL1 = "SELECT * From Gallery_Photos " If rs("DefaultPhoto") <> "" Then SQL1 = SQL1 & " Where ID = " & rs("DefaultPhoto") Else SQL1 = SQL1 & " WHERE Album = " & rs("ID") End if SQL1 = SQL1 & " ORDER BY id" rs1.Open CheckSQL(SQL1), Conn, 1, 3 If rs1.EOF Then SQL1 = "SELECT * From Gallery_Photos WHERE Album = " & rs("ID") & " ORDER BY ID" rs1.close rs1.Open CheckSQL(SQL1), Conn, 1, 3 End if If Not rs1.EOF Then DefaultPhoto = rs("DirectoryName") & "/" & rs1("thumbnail") Else DefaultPhoto = "icon_noimage.gif" End If rs1.close If piccount = 1 Then%> <%End If%> <%If picCount = 3 Then%> <% picCount = 1 Else picCount = picCount + 1 End if rs.MoveNext Loop %>
Click on an Event Photo Album below to view pictures.
There are no Albums Created at this time
photo-gallery.asp?albumID=<%=rs("ID")%>><%=GalleryPath%><%=DefaultPhoto%>
photo-gallery.asp?albumID=<%=rs("ID")%> class="textlinks"><%=rs("Name")%>
<%=rs("Description")%>
<%=rs("DateCreated")%>
 
<%End if%>