<% Option Explicit %>
<!--#include file="config.asp"-->
<!--#include file="common.asp"-->
<!--#include file="md5.asp"-->
<%
	PageHeader
%>
	<table border=0 width=100% cellspacing=0 cellpadding=6>
	<tr class=PageText>
		<td>
			<% Welcome %>
		</td>
	</tr>
	<tr class=PageText valign=top>
		<td>
			<b>How it works?</b><br><br>

			1. Make a spend between <b>$<%= Spend(0) %> - $<%= Spend(UBound(Spend)) %></b> worth of E-Gold.<br>
			2. A link to your website or affiliate program is shown below until you're paid.<br>
			3. Other people make spends after you do.<br>
			4. You receive <b><%= 100 + PlayerEarnings %>%</b> of your spend when it reaches the top of the list and there 
			   is enough money below you to pay you, your referrer and to float the profit leverage.<br><br>
		</td>
	</tr>
	<tr class=PageText valign=top>
		<td>
			<b>Affiliates</b><br><br>
			Get <b><%= ReferralCommission %>%</b> from all spend made by the person you refer. You need only to put 
			this link into your page:<br>
			<b><%= CurrentPath %>?ref=YourEGoldNumber</b> .<br>Change 
			<b>YourEGoldNumber</b> with your e-gold account number.
		</td>
	</tr>
	<tr valign=top class=PageText>
		<td>
<%
			Response.Write "<br>"
			Menu
			Response.Write "<br>"
			UnPaidList
%>
		</td>
	</tr>
	<tr>
		<td align=center class=PageText>
			<hr noshade color=black size=1>
			Copyright 2003 © <%= SiteName %>  All Rights Reserved
		</td>
	</tr>
	</table>

	</body>
	</html>
<%
	Sub Welcome()
%>
		<font color=black size=7><b>Welcome to </font><font color=green size=7><%= SiteName %></b></font><br><br>
<%
	End Sub


	Sub UnPaidList()

		OpenConnection

		Dim rs, i

		Set rs = DBC.Execute("SELECT * FROM PayIns WHERE Paid = False")
%>
		<table border=0 width=100% align=center cellspacing=0 cellpadding=3>
		<tr bgcolor=00FF00 class="PageText">
			<td colspan=5 align=center>
				Total payouts: <b>$<%= Application("PL_TotalPayouts") %></b>. 
				Total $$$ needed to burst next bubble: <b>$<%= FormatNumber(Application("PL_NeedToBurst"), 2) %></b> (current bubble profit + current referral fee + admin expenses)<br>
			</td>
		</tr>
		<tr>
			<td colspan=5>
				<br>
			</td>
		</tr>
		<tr bgcolor=80A0F0 class=PageText>
			<td width=20>
				<b>N</b>
			</td>
			<td align=center width=70>
				<b>E-Gold #</b>
			</td>
			<td align=center width=70>
				<b>Referral #</b>
			</td>
			<td align=center width=70>
				<b>Payout</b>
			</td>
			<td align=center>
				<b>Link</b>
			</td>
		</tr>
<%
		i = 0

		Do While Not rs.EOF
%>
		<tr bgcolor=<%= IIf(i Mod 2 = 1, "EEEEEE", "white") %> class=PageText>
			<td><%= i + 1 %>.</td>
			<td><%= rs("From") %></td>
			<td><%= rs("ReferralEGold") %></td>
			<td align=right>$<%= FormatNumber(rs("Cash") * (100 + PlayerEarnings) / 100, 2) %></td>
			<td><a href="<%= rs("Link") %>" target=_new><%= rs("Title") %></a></td>
		</tr>
<%
			i = i + 1
			rs.MoveNext
		Loop
%>
		</table>
<%
	End Sub
%>