+<% elseif $"cmd" = "paypal" then
+ showNormal := false;
+ val apps = App.searchPaypal ($"email");
+ val users = Init.searchPaypal ($"email");
+
+ switch apps of
+ _ :: _ =>
+ %><h3>Approved applications</h3>
+
+ <% foreach appl in apps do %>
+ <br><hr><br>
+ <table class="blanks">
+ <tr> <td>Received:</td> <td><% #applied appl %></td> </tr>
+ <tr> <td>Approved by:</td> <td><%
+ ref first = true;
+ ref found = false;
+ foreach (id, name) in App.votes (#id appl) do
+ if first then
+ first := false
+ else
+ %>, <%
+ end
+ %><a href="user?id=<% id %>"><% name %></a><%
+ end %> </td> </tr>
+ <tr> <td>Username:</td> <td><% #name appl %></td> </tr>
+ <tr> <td>Real name:</td> <td><% Web.html (#rname appl) %></td> </tr>
+ <tr> <td>E-mail address:</td> <td><a href="mailto:<% #email appl %>"><% #email appl %></a></td> </tr>
+ <% switch #paypal appl of
+ SOME s => %><tr> <td>PayPal:</td> <td><a href="mailto:<% s %>"><% s %></a></td> </tr>
+ <% end;
+ switch #checkout appl of
+ SOME s => %><tr> <td>Google Checkout:</td> <td><a href="mailto:<% s %>"><% s %></a></td> </tr>
+ <% end %>
+ <tr> <td>Forward e-mail?</td> <td><% if #forward appl then %>yes<% else %>no<% end %></td> </tr>
+ <tr> <td>Proposed uses:</td> <td><% Web.htmlNl (#uses appl) %></td> </tr>
+ <tr> <td>Other information:</td> <td><% Web.htmlNl (#other appl) %></td> </tr>
+ </table>
+
+ <% if root then %>
+ <a href="apps?add=<% #id appl %>">Add this member.</a><br>
+ <% end
+ end
+ end;
+
+ switch users of
+ _ :: _ =>
+ %><h3>Members</h3>
+
+ <% foreach user in users do %>
+ <li> <a href="user?id=<% #id user %>"><% #name user %></a> <a href="?cmd=pay&user=<% #id user %>">[add payment]</a></li>
+ <% end
+ end;
+
+ switch (apps, users) of
+ (nil, nil) => %>No matches.<%
+ end
+
+elseif $"cmd" = "checkout" then
+ showNormal := false;
+ val apps = App.searchCheckout ($"email");
+ val users = Init.searchCheckout ($"email");
+
+ switch apps of
+ _ :: _ =>
+ %><h3>Approved applications</h3>
+
+ <% foreach appl in apps do %>
+ <br><hr><br>
+ <table class="blanks">
+ <tr> <td>Received:</td> <td><% #applied appl %></td> </tr>
+ <tr> <td>Approved by:</td> <td><%
+ ref first = true;
+ ref found = false;
+ foreach (id, name) in App.votes (#id appl) do
+ if first then
+ first := false
+ else
+ %>, <%
+ end
+ %><a href="user?id=<% id %>"><% name %></a><%
+ end %> </td> </tr>
+ <tr> <td>Username:</td> <td><% #name appl %></td> </tr>
+ <tr> <td>Real name:</td> <td><% Web.html (#rname appl) %></td> </tr>
+ <tr> <td>E-mail address:</td> <td><a href="mailto:<% #email appl %>"><% #email appl %></a></td> </tr>
+ <% switch #paypal appl of
+ SOME s => %><tr> <td>PayPal:</td> <td><a href="mailto:<% s %>"><% s %></a></td> </tr>
+ <% end;
+ switch #checkout appl of
+ SOME s => %><tr> <td>Google Checkout:</td> <td><a href="mailto:<% s %>"><% s %></a></td> </tr>
+ <% end %>
+ <tr> <td>Forward e-mail?</td> <td><% if #forward appl then %>yes<% else %>no<% end %></td> </tr>
+ <tr> <td>Proposed uses:</td> <td><% Web.htmlNl (#uses appl) %></td> </tr>
+ <tr> <td>Other information:</td> <td><% Web.htmlNl (#other appl) %></td> </tr>
+ </table>
+
+ <% if root then %>
+ <a href="apps?add=<% #id appl %>">Add this member.</a><br>
+ <% end
+ end
+ end;
+
+ switch users of
+ _ :: _ =>
+ %><h3>Members</h3>
+
+ <% foreach user in users do %>
+ <li> <a href="user?id=<% #id user %>"><% #name user %></a> <a href="?cmd=pay&user=<% #id user %>&checkout=1">[add payment]</a></li>
+ <% end
+ end;
+
+ switch (apps, users) of
+ (nil, nil) => %>No matches.<%
+ end