% If LCase(Request.Cookies("IWGalleryAccess")) <> "amministratore" Then Response.Redirect("logout.asp?reason=Accesso negato") %>
<%
Set rsUseCounter = Server.CreateObject("ADODB.Recordset")
rsUseCounter.ActiveConnection = MM_connIWGallery_STRING
rsUseCounter.Source = "SELECT COUNT(*) AS USE_COUNT FROM USERS WHERE USE_APPROVED = 0"
rsUseCounter.CursorType = 0
rsUseCounter.CursorLocation = 2
rsUseCounter.LockType = 1
rsUseCounter.Open()
%>
<%
Set rsPicCounter = Server.CreateObject("ADODB.Recordset")
rsPicCounter.ActiveConnection = MM_connIWGallery_STRING
rsPicCounter.Source = "SELECT COUNT(*) AS PIC_COUNT FROM PICTURES WHERE PIC_APPROVED = 0"
rsPicCounter.CursorType = 0
rsPicCounter.CursorLocation = 2
rsPicCounter.LockType = 1
rsPicCounter.Open()
%>
<%
Tot = (rsUseCounter.Fields.Item("USE_COUNT").Value) + (rsPicCounter.Fields.Item("PIC_COUNT").Value)
%>
<%
rsUseCounter.Close()
Set rsUseCounter = Nothing
%>
<%
rsPicCounter.Close()
Set rsPicCounter = Nothing
%>