+elseif $"cmd" = "approved" then
+ showNormal := false
+
+ %><h3>Pending applications</h3><%
+
+ foreach appl in App.listApps App.ACCEPTED 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
+elseif $"add" <> "" then
+ Group.requireGroupNum 0;
+ showNormal := false;
+ val id = Web.stoi ($"add");
+ val appl = App.lookupApp id;
+ App.add id %>
+
+First, run this on deleuze:
+<blockquote><tt>new-user <% #name appl %> "<% #rname appl %>"<% if #forward appl then %> "<% #email appl %>"<% end %></tt></blockquote>
+
+<form action="users" method="post">
+<input type="hidden" name="app" value="<% #id appl %>">
+<table class="blanks">
+<tr> <td>Name:</td> <td><input name="name" value="<% Web.html (#name appl) %>"></td> </tr>
+<tr> <td>Real name:</td> <td><input name="rname" value="<% Web.html (#rname appl) %>"></td> </tr>
+<tr> <td>Funded by:</td> <td><select name="bal">
+ <option value="">A new balance</option>
+<% foreach bal in Balance.listBalances () do %>
+ <option value="<% #id bal %>"><% Web.html (#name bal) %></option>
+<% end %>
+</select></td></tr>
+<tr> <td>Initial transaction amount:</td> <td><input name="amount"></td> </tr>
+<tr> <td>Initial transaction description:</td> <td><input name="descr"></td> </tr>
+<!--tr> <td><input type="checkbox" name="subscribe" checked></td> <td>Subscribe to hcoop-announce</td> </tr-->
+<tr> <td>Groups:</td> <td><select name="grp" size="5" multiple>
+<% foreach group in Group.listGroups () do %>
+ <option value="<% #id group %>"<% if #name group = "paying" then %> selected<% end %>><% Web.html (#name group) %></option>
+<% end %>
+</select></td></tr>
+<tr> <td><input type="submit" name="cmd" value="Create"></td> </tr>
+</table>
+</form>
+
+<a href="apps?abort=<% #id appl %>">Abort adding this member</a>
+
+<% elseif $"abort" <> "" then
+ App.abortAdd (Web.stoi ($"abort"))
+ %><h3>Aborted</h3><%
+