<% If rqs("picid") = "" Then %>
Gallery
<% Set Rs = Server.CreateObject("adodb.recordset") Rs.Open "SELECT GalSectionID,Title,Description FROM GalSections ORDER BY CreatedOn DESC", Session("dbConn") Do While Not Rs.Eof Response.Write( _ " " & vbCrLf & _ " " & vbCrLf & _ " " & vbCrLf & _ " " ) Rs.MoveNext Loop %>
" & Rs("Title") & "" & Rs("Description") & "
<% Else Dim Rs Set Rs = Server.CreateObject("adodb.recordset") Set dbConn = Session("dbConn") Set Rs = Server.CreateObject("adodb.recordset") Rs.Cursortype = adOpenDynamic Rs.LockType = adLockPessimistic Rs.Open "SELECT * FROM Gallery WHERE [ID] = " & rqs("ID"), Session("dbConn") %> Close <% Rs.Close End If %>