<% Option Explicit %>
<!--#include file="config.asp"-->
<!--#include file="common.asp"-->
<!--#include file="md5.asp"-->
<%
	PageHeader
	PageBegin
%>
	<table border=0 width="100%" cellspacing="0" cellpadding="8">
	<tr class=PageText>
		<td>
			<% PayoutList %>
		</td>
	</tr>
	</table>
<%
	PageEnd


	Sub PayoutList()
		Dim i

		Set rs = DBC.Execute("SELECT * FROM Payments WHERE [From] = " & MyEGold & " ORDER BY ID DESC")
%>
		<br>
		<table border=0 width=290 cellspacing=1 cellpadding=2 bgcolor=BBBBBB align=center>
		<tr bgcolor=FFEFB2 class=PageText>
			<td align=center><b>ID</b></td>
			<td align=center><b>Account</b></td>
			<td align=center><b>Amount</b></td>
		</tr>
<%
		i = 0

		Do While Not rs.EOF
%>
		<tr bgcolor=<%= IIf(i Mod 2 = 0, "FFFAC6", "FFEFB2") %> class=PageText>
			<td align=center><%= i + 1 %></td>
			<td align=center><%= rs("To") %></td>
			<td align=right>$<%= FormatNumber(rs("Cash"), 2) %></td>
		</tr>
<%
			i = i + 1
			rs.MoveNext
		Loop
%>
		<font color=red><b>There are <%= i %> payouts so far.</b></font><br><br>

		</table>
<%
	End Sub
%>