<% @header [("title", ["Membership applications"])]; val you = Init.getUserId (); val board = Group.inGroupName "board"; val root = Group.inGroupNum 0; ref showNormal = true; if $"vote" <> "" then Group.requireGroupName "board"; App.vote (you, Web.stoi ($"vote")) %>

Vote registered

<% elseif $"unvote" <> "" then Group.requireGroupName "board"; App.unvote (you, Web.stoi ($"unvote")) %>

Unvote registered

<% elseif $"deny" <> "" then showNormal := false; val appl = App.lookupApp (Web.stoi ($"deny")) %>

Deny application for <% #name appl %>

"> Reason:

<% elseif $"deny2" <> "" then Group.requireGroupName "board"; if not (App.deny (Web.stoi ($"deny2"), $"msg")) then %>

Error denying application

<% else %>

Application denied

<% end elseif $"approve" <> "" then showNormal := false; val appl = App.lookupApp (Web.stoi ($"approve")) %>

Approve application for <% #name appl %>

"> Message:

<% elseif $"approve2" <> "" then Group.requireGroupName "board"; if not (App.approve (Web.stoi ($"approve2"), $"msg")) then %>

Error approving application

<% else %>

Application approved

<% end end %> <% if showNormal then %>

Pending applications

<% foreach appl in App.listPending () do %>


Received: <% #applied appl %>
Approved by: <% ref first = true; ref found = false; foreach (id, name) in App.votes (#id appl) do if first then first := false else %>, <% end %><% name %><% if id = you then found := true %> [Unvote]<% end end %> <% if (iff board then not found else false) then %>[Vote]<% end %>
Username: <% #name appl %>
Real name: <% Web.html (#rname appl) %>
E-mail address: <% #email appl %>
Forward e-mail? <% if #forward appl then %>yes<% else %>no<% end %>
Proposed uses: <% Web.htmlNl (#uses appl) %>
Other information: <% Web.htmlNl (#other appl) %>
<% if board then %> Add this member.
Deny this application. <% end %> <% end end %> <% @footer[] %>