% M_UAdd = fun_chkRight("galid","V") if M_UAdd = 0 then %> <% response.end end if%> <% id = Trim(Request("id")) if id = "" or isNumeric(id) = False Then Response.Redirect "galL.asp" ttlPhotos = -1 Set rs = Server.CreateObject("ADODB.Recordset") strSQL = "select a.galid, a.heading, a.imgname, a.display, a.logdate, a.updated from photo_gallary a where a.galid = " & id rs.Open strSQL, con, 3, 3 if not rs.EOF Then galArr = rs.GetRows() galid = galArr(0,0) end if rs.Close if galid <> "" Then strSQL = "select photoid, photonm, heading, display, logdate, updated from photos where galid = " & galid & " and galid <> 0 order by logdate" rs.Open strSQL, con, 3, 3 if not rs.EOF Then photoArr = rs.GetRows() ttlPhotos = ubound(photoArr, 2) end if rs.close end if set rs = nothing con.Close set con = nothing %>