<% Option Explicit %>
<!--#include file="config.asp"-->
<!--#include file="common.asp"-->
<%
	PageHeader
	PageBegin "Payouts"
	PayoutList
	PageEnd

	Response.Write "</body>"
	Response.Write "</html>"


	Sub PayoutList()

		OpenConnection

		Dim rs, i

		Set rs = DBC.Execute("SELECT * FROM Payments WHERE From = " & MyEGold & " ORDER BY ID DESC")
%>
		<table border=0 width=200 cellspacing=0 cellpadding=3>
		<tr bgcolor=F9F47E class=PageText>
			<td><b>Payout</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, "F9D47E", "F9F47E") %> 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
%>