<% Option Explicit %>
<!--#include file="../config.asp"-->
<!--#include file="../common.asp"-->
<!--#include file="main.asp"-->
<%
	PageHeader

	If Not Session("IsAdminLogin") Then
		PageLogin
		Response.End
	End If

	AdminPageBegin "Summary"
	Summary
	AdminPageEnd



	Sub Summary()
		Dim rs

		OpenConnection
%>
		<br>
		<table border=0 align=center bgcolor=white width=260 cellspacing=0 cellpadding=0>
		<tr class=Odd>
			<td>Total Members</td>
			<td align=right>
<%
				Set rs = DBC.Execute("SELECT COUNT(*) FROM Members")
				Response.Write rs(0)
				rs.Close
%>
			</td>
		</tr>
		<tr class=Odd>
			<td>Total GOLD Members</td>
			<td align=right>
<%
				Set rs = DBC.Execute("SELECT COUNT(*) FROM Members WHERE IsGold = True")
				Response.Write rs(0)
				rs.Close
%>
			</td>
		</tr>
		<tr class=Odd>
			<td>Total Banners</td>
			<td align=right>
<%
				Set rs = DBC.Execute("SELECT COUNT(*) FROM Banners")
				Response.Write rs(0)
				rs.Close
%>
			</td>
		</tr>
		<tr class=Odd>
			<td>Total Links</td>
			<td align=right>
<%
				Set rs = DBC.Execute("SELECT COUNT(*) FROM Campaigns")
				Response.Write rs(0)
				rs.Close
%>
			</td>
		</tr>
		<tr class=Odd>
			<td>Total Messages</td>
			<td align=right>
<%
				Set rs = DBC.Execute("SELECT COUNT(*) FROM MsgBoard")
				Response.Write rs(0)
				rs.Close
%>
			</td>
		</tr>
		<tr><td><br></td></tr>
		<tr class=Odd>
			<td><a href=banner_list.asp>Banners to Approve</a></td>
			<td align=right>
<%
				Set rs = DBC.Execute("SELECT COUNT(*) FROM Banners WHERE Approved = False")
				Response.Write rs(0)
				rs.Close
%>
			</td>
		</tr>
		<tr class=Odd>
			<td><a href=link_list.asp>Links to Approve</a></td>
			<td align=right>
<%
				Set rs = DBC.Execute("SELECT COUNT(*) FROM Campaigns WHERE Approved = False")
				Response.Write rs(0)
				rs.Close
%>
			</td>
		</tr>
		<tr><td><br></td></tr>
		<tr class=Odd>
			<td><a href=payouts.asp>Waitning Payouts</a></td>
			<td align=right>
<%
				Set rs = DBC.Execute("SELECT COUNT(*) FROM Payouts WHERE BatchNumber = 0")
				Response.Write rs(0)
				rs.Close
%>
			</td>
		</tr>
		</table>
<%
	End Sub
%>