--- /dev/null
+all: header.mlt footer.mlt
+
+header.mlt: /etc/hcoop.header header.setTitle header.mlt.in
+ cat header.setTitle >header.mlt
+ hcoop_header "<% Web.html title %>" >>header.mlt
+ cat header.mlt.in >>header.mlt
+
+footer.mlt: /etc/hcoop.footer footer.mlt.in
+ cat footer.mlt.in >footer.mlt
+ hcoop_footer >>footer.mlt
if $"vote" <> "" then
Group.requireGroupName "board";
App.vote (you, Web.stoi ($"vote"))
- %><h3><b>Vote registered</b></h3><%
+ %><h3>Vote registered</h3><%
elseif $"unvote" <> "" then
Group.requireGroupName "board";
App.unvote (you, Web.stoi ($"unvote"))
- %><h3><b>Unvote registered</b></h3><%
+ %><h3>Unvote registered</h3><%
elseif $"deny" <> "" then
showNormal := false;
val appl = App.lookupApp (Web.stoi ($"deny"))
- %><h3><b>Deny application for <% #name appl %></b></h3>
+ %><h3>Deny application for <% #name appl %></h3>
<form action="apps" method="post">
<input type="hidden" name="deny2" value="<% $"deny" %>">
<b>Reason</b>:<br>
elseif $"deny2" <> "" then
Group.requireGroupName "board";
if not (App.deny (Web.stoi ($"deny2"), $"msg")) then
- %><h3><b>Error denying application</b></h3><%
+ %><h3>Error denying application</h3><%
else
- %><h3><b>Application denied</b></h3><%
+ %><h3>Application denied</h3><%
end
elseif $"approve" <> "" then
showNormal := false;
val appl = App.lookupApp (Web.stoi ($"approve"))
- %><h3><b>Approve application for <% #name appl %></b></h3>
+ %><h3>Approve application for <% #name appl %></h3>
<form action="apps" method="post">
<input type="hidden" name="approve2" value="<% $"approve" %>">
<b>Message</b>:<br>
elseif $"approve2" <> "" then
Group.requireGroupName "board";
if not (App.approve (Web.stoi ($"approve2"), $"msg")) then
- %><h3><b>Error approving application</b></h3><%
+ %><h3>Error approving application</h3><%
else
- %><h3><b>Application approved</b></h3><%
+ %><h3>Application approved</h3><%
end
elseif $"cmd" = "approved" then
showNormal := false
- %><h3><b>Pending applications</b></h3><%
+ %><h3>Pending applications</h3><%
foreach appl in App.listApps App.ACCEPTED do %>
<br><hr><br>
- <table>
- <tr> <td align="right"><b>Received</b>:</td> <td><% #applied appl %></td> </tr>
- <tr> <td align="right"><b>Approved by</b>:</td> <td><%
+ <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
end
%><a href="user?id=<% id %>"><% name %></a><%
end %> </td> </tr>
- <tr> <td align="right"><b>Username</b>:</td> <td><% #name appl %></td> </tr>
- <tr> <td align="right"><b>Real name</b>:</td> <td><% Web.html (#rname appl) %></td> </tr>
- <tr> <td align="right"><b>E-mail address</b>:</td> <td><a href="mailto:<% #email appl %>"><% #email appl %></a></td> </tr>
- <tr> <td align="right"><b>Forward e-mail?</b></td> <td><% if #forward appl then %>yes<% else %>no<% end %></td> </tr>
- <tr> <td align="right" valign="top"><b>Proposed uses</b>:</td> <td><% Web.htmlNl (#uses appl) %></td> </tr>
- <tr> <td align="right" valign="top"><b>Other information</b>:</td> <td><% Web.htmlNl (#other appl) %></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>
+ <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 %>
<form action="users" method="post">
<input type="hidden" name="app" value="<% #id appl %>">
-<table>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name" value="<% Web.html (#name appl) %>"></td> </tr>
-<tr> <td align="right"><b>Real name</b>:</td> <td><input name="rname" value="<% Web.html (#rname appl) %>"></td> </tr>
-<tr> <td align="right" valign="top"><b>Funded by</b>:</td> <td><select name="bal">
+<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 align="right"><b>Initial transaction amount</b>:</td> <td><input name="amount"></td> </tr>
-<tr> <td align="right"><b>Initial transaction description</b>:</td> <td><input name="descr" value="PayPal"></td> </tr>
-<tr> <td align="right"><input type="checkbox" name="subscribe" checked></td> <td>Subscribe to hcoop-announce</td> </tr>
-<tr> <td align="right"><b>Groups</b>:</td> <td><select name="grp" size="5" multiple>
+<tr> <td>Initial transaction amount:</td> <td><input name="amount"></td> </tr>
+<tr> <td>Initial transaction description:</td> <td><input name="descr" value="PayPal"></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 %>
<% elseif $"abort" <> "" then
App.abortAdd (Web.stoi ($"abort"))
- %><h3><b>Aborted</b></h3><%
+ %><h3>Aborted</h3><%
end %>
<% if showNormal then %>
-<h3><b>Pending applications</b></h3>
+<h3>Pending applications</h3>
<% foreach appl in App.listApps App.PENDING do %>
<br><hr><br>
- <table>
- <tr> <td align="right"><b>Received</b>:</td> <td><% #applied appl %></td> </tr>
- <tr> <td align="right"><b>Approved by</b>:</td> <td><%
+ <table class="blanks">
+ <tr> <td>Received:</td> <td><% #applied appl %></td> </tr>
+ <tr> <td>Approved by:</td> <td><%
ref first = true;
ref found = false;
val votes = App.votes (#id appl);
%> <a href="apps?unvote=<% #id appl %>">[Unvote]</a><%
end
end %> <% if (iff board then not found else false) then %><a href="apps?vote=<% #id appl %>">[Vote]</a><% end %></td> </tr>
- <tr> <td align="right"><b>Username</b>:</td> <td><% #name appl %></td> </tr>
- <tr> <td align="right"><b>Real name</b>:</td> <td><% Web.html (#rname appl) %></td> </tr>
- <tr> <td align="right"><b>E-mail address</b>:</td> <td><a href="mailto:<% #email appl %>"><% #email appl %></a></td> </tr>
- <tr> <td align="right"><b>Forward e-mail?</b></td> <td><% if #forward appl then %>yes<% else %>no<% end %></td> </tr>
- <tr> <td align="right" valign="top"><b>Proposed uses</b>:</td> <td><% Web.htmlNl (#uses appl) %></td> </tr>
- <tr> <td align="right" valign="top"><b>Other information</b>:</td> <td><% Web.htmlNl (#other appl) %></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>
+ <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 board then %>
if ok then
val id = Apt.add (Init.getUserId(), $"req", $"msg");
if not (Apt.notifyNew id) then
- %><h3><b>Error sending e-mail notification</b></h3><%
+ %><h3>Error sending e-mail notification</h3><%
end
- %><h3><b>Request added</b></h3><%
+ %><h3>Request added</h3><%
end
elseif $"cmd" = "open" then
- %><h3><b>Open requests</b></h3>
+ %><h3>Open requests</h3>
<a href="apt?cmd=list">List all requests</a><%
foreach (name, req) in Apt.listOpen () do %>
<br><hr><br>
-<table>
-<tr> <td align="right"><b>By</b>:</td> <td colspan="2"><a href="user?id=<% #usr req %>"><% name %></a></td> </tr>
-<tr> <td align="right"><b>Time</b>:</td> <td colspan="2"><% #stamp req %></td> </tr>
-<tr> <td align="right"><b>Packages</b>:</td><%
+<table class="blanks">
+<tr> <td>By:</td> <td colspan="2"><a href="user?id=<% #usr req %>"><% name %></a></td> </tr>
+<tr> <td>Time:</td> <td colspan="2"><% #stamp req %></td> </tr>
+<tr> <td>Packages:</td><%
ref first = true;
val pkgs = String.tokens Char.isSpace (#data req);
end
end %>
</tr>
-<tr> <td align="right" valign="top"><b>Reason</b>:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
+<tr> <td>Reason:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
</table>
<% if admin then %>
<% end
elseif $"cmd" = "list" then
- %><h3><b>All requests</b></h3><%
+ %><h3>All requests</h3><%
foreach (name, req) in Apt.list () do %>
<br><hr><br>
-<table>
-<tr> <td align="right"><b>By</b>:</td> <td colspan="2"><a href="user?id=<% #usr req %>"><% name %></a></td> </tr>
-<tr> <td align="right"><b>Time</b>:</td> <td colspan="2"><% #stamp req %></td> </tr>
-<tr> <td align="right"><b>Packages</b>:</td><%
+<table class="blanks">
+<tr> <td>By:</td> <td colspan="2"><a href="user?id=<% #usr req %>"><% name %></a></td> </tr>
+<tr> <td>Time:</td> <td colspan="2"><% #stamp req %></td> </tr>
+<tr> <td>Packages:</td><%
ref first = true;
val pkgs = String.tokens Char.isSpace (#data req);
end
end %>
</tr>
-<tr> <td align="right" valign="top"><b>Reason</b>:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
+<tr> <td>Reason:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
</table>
<% if admin then %>
val id = Web.stoi ($"mod");
val req = Apt.lookup id;
val user = Init.lookupUser (#usr req) %>
-<h3><b>Handle request</b></h3>
+<h3>Handle request</h3>
<form action="apt" method="post">
<input type="hidden" name="save" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Requestor</b>:</td> <td><a href="user?id=<% #usr req %>"><% #name user %></a></td> </tr>
-<tr> <td align="right"><b>Time</b>:</td> <td><% #stamp req %></td> </tr>
-<tr> <td align="right"><b>Status</b>:</td> <td><select name="status">
+<table class="blanks">
+<tr> <td>Requestor:</td> <td><a href="user?id=<% #usr req %>"><% #name user %></a></td> </tr>
+<tr> <td>Time:</td> <td><% #stamp req %></td> </tr>
+<tr> <td>Status:</td> <td><select name="status">
<option value="0"<% if #status req = Apt.NEW then %> selected<% end %>>New</option>
<option value="1"<% if #status req = Apt.INSTALLED then %> selected<% end %>>Installed</option>
<option value="2"<% if #status req = Apt.REJECTED then %> selected<% end %>>Rejected</option>
</select></td> </tr>
-<tr> <td align="right" valign="top"><b>Packages</b>:</td> <td><textarea name="pkgs" rows="5" cols="40" wrap="soft"><% Web.html (#data req) %></textarea></td> </tr>
-<tr> <td align="right" valign="top"><b>Message</b>:</td> <td><textarea name="msg" rows="10" cols="80" wrap="soft"><% Web.html (#msg req) %></textarea></td> </tr>
+<tr> <td>Packages:</td> <td><textarea name="pkgs" rows="5" cols="40" wrap="soft"><% Web.html (#data req) %></textarea></td> </tr>
+<tr> <td>Message:</td> <td><textarea name="msg" rows="10" cols="80" wrap="soft"><% Web.html (#msg req) %></textarea></td> </tr>
<tr> <td><input type="submit" value="Save"></td> </tr>
</table>
</form>
Apt.modify {req with data = $"pkgs", msg = $"msg", status = newStatus};
if oldStatus <> newStatus then
if not (Apt.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then
- %><h3><b>Error sending e-mail notification</b></h3><%
+ %><h3>Error sending e-mail notification</h3><%
end
end
- %><h3><b>Request modified</b></h3>
+ %><h3>Request modified</h3>
Back to: <a href="apt?cmd=open">open requests</a>, <a href="apt?cmd=list">all requests</a>
<% elseif $"del" <> "" then
val id = Web.stoi ($"del");
val req = Apt.lookup id;
val user = Init.lookupUser (#usr req)
- %><h3><b>Are you sure you want to delete request by <% #name user %> for <tt><% #data req %></tt>?</b></h3>
+ %><h3>Are you sure you want to delete request by <% #name user %> for <tt><% #data req %></tt>?</h3>
<a href="apt?del2=<% id %>">Yes, I'm sure!</a>
<% elseif $"del2" <> "" then
Group.requireGroupName "server";
val id = Web.stoi ($"del2");
Apt.delete id
- %><h3><b>Request deleted</b><h3>
+ %><h3>Request deleted</b><h3>
Back to: <a href="apt?cmd=open">open requests</a>, <a href="apt?cmd=list">all requests</a>
<% else %>
-<h3><b>Request new installations</b></h3>
+<h3>Request new installations</h3>
List the package names you'd like, separated by any whitespace characters.
<form action="apt" method="post">
-<table>
-<tr> <td align="right" valign="top"><b>Packages</b>:</td> <td><textarea name="new" rows="10" cols="40" wrap="soft"></textarea></td> </tr>
-<tr> <td align="right" valign="top"><b>Reason</b>:</td> <td><textarea name="msg" rows="5" cols="80" wrap="soft"></textarea></td> </tr>
+<table class="blanks">
+<tr> <td>Packages:</td> <td><textarea name="new" rows="10" cols="40" wrap="soft"></textarea></td> </tr>
+<tr> <td>Reason:</td> <td><textarea name="msg" rows="5" cols="80" wrap="soft"></textarea></td> </tr>
<tr> <td><input type="submit" value="Request"></td> </tr>
</table>
</form>
if $"cmd" = "Create" then
if not (Balance.validBalanceName ($"name")) then %>
- <h3><b>Invalid balance name</b></h3>
+ <h3>Invalid balance name</h3>
<% else switch Balance.balanceNameToId ($"name") of
SOME _ => %>
- <h3><b>Balance name already in use</b></h3>
+ <h3>Balance name already in use</h3>
<% | NONE =>
val id = Balance.addBalance ($"name") %>
- <h3><b>Balance added</b></h3>
+ <h3>Balance added</h3>
<% end
end
elseif $"mod" <> "" then
showNormal := false;
val balance = Balance.lookupBalance (Web.stoi ($"mod")) %>
-<h3><b>Modify balance record</b></h3>
+<h3>Modify balance record</h3>
<form action="balances" method="post">
<input type="hidden" name="id" value="<% $"mod" %>">
-<table>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name" value="<% #name balance %>"></td> </tr>
+<table class="blanks">
+<tr> <td>Name:</td> <td><input name="name" value="<% #name balance %>"></td> </tr>
<tr> <td><input type="submit" name="cmd" value="Save"></td> </tr>
</table>
</form>
<% elseif $"cmd" = "Save" then
val balance = Balance.lookupBalance (Web.stoi ($"id"));
Balance.modBalance {balance with name = $"name"} %>
- <h3><b>Balance record saved.</b></h3>
+ <h3>Balance record saved.</h3>
<% elseif $"del" <> "" then
showNormal := false;
val balance = Balance.lookupBalance (Web.stoi ($"del")) %>
- <h3><b>Are you sure you want to delete balance <% #name balance %></a>?</b></h3>
+ <h3>Are you sure you want to delete balance <% #name balance %></a>?</h3>
<a href="balances?del2=<% $"del" %>">Yes, delete <% #name balance %>!</a>
<% elseif $"del2" <> "" then
val balance = Balance.lookupBalance (Web.stoi ($"del2"));
Balance.deleteBalance (Web.stoi ($"del2")) %>
- <h3><b><% #name balance %> deleted!</b></h3>
+ <h3><% #name balance %> deleted!</h3>
<% end %>
<% if showNormal then
ref total = 0.0 %>
-<h3><b>New balance</b></h3>
+<h3>New balance</h3>
<form action="balances" method="post">
-<table>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name"></td> </tr>
+<table class="blanks">
+<tr> <td>Name:</td> <td><input name="name"></td> </tr>
<tr> <td><input type="submit" name="cmd" value="Create"></td> </tr>
</table>
</form>
-<h3><b>Manage current balances</b></h3>
+<h3>Manage current balances</h3>
<table>
<% foreach balance in Balance.listBalances () do
if $"cmd" = "add" then
val id = Contact.addContact (Init.getUserId(), Web.stoi ($"knd"), $"v", Contact.privFromInt (Web.stoi ($"priv"))) %>
- <h3><b>Contact added</b></h3>
+ <h3>Contact added</h3>
<% elseif $"mod" <> "" then
showNormal := false;
val id = Web.stoi ($"mod");
val cont = Contact.lookupContact id %>
-<h3><b>Modify contact entry</b></h3>
+<h3>Modify contact entry</h3>
<form action="contact" method="post">
<input type="hidden" name="save" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Kind</b>:</td> <td><select name="knd">
+<table class="blanks">
+<tr> <td>Kind:</td> <td><select name="knd">
<% foreach kind in Contact.listKinds () do %>
<option value="<% #id kind %>"<% if #knd cont = #id kind then %> selected<% end %>><% Web.html (#name kind) %></option>
<% end %>
</select></td> </tr>
-<tr> <td align="right"><b>Value</b>:</td> <td><input name="v" value="<% Web.html (#v cont) %>"></td> </tr>
-<tr> <td align="right"><b>Readable by</b>:</td> <td><select name="priv">
+<tr> <td>Value:</td> <td><input name="v" value="<% Web.html (#v cont) %>"></td> </tr>
+<tr> <td>Readable by:</td> <td><select name="priv">
<option value="0"<% if #priv cont = Contact.PUBLIC then %> selected<% end %>>Anyone</option>
<option value="1"<% if #priv cont = Contact.MEMBERS then %> selected<% end %>>Members only</option>
<option value="2"<% if #priv cont = Contact.ADMINS then %> selected<% end %>>Admins only</option>
val id = Web.stoi ($"save");
val cont = Contact.lookupContact id;
Contact.modContact {cont with knd = Web.stoi ($"knd"), v = $"v", priv = Contact.privFromInt (Web.stoi ($"priv"))} %>
- <h3><b>Contact entry saved</b></h3>
+ <h3>Contact entry saved</h3>
<% elseif $"del" <> "" then
showNormal := false;
val id = Web.stoi ($"del");
val cont = Contact.lookupContact id %>
- <h3><b>Are you sure you want to delete contact entry "<% Web.html (#v cont) %>"?</b></h3>
+ <h3>Are you sure you want to delete contact entry "<% Web.html (#v cont) %>"?</h3>
<a href="contact?del2=<% id %>">Yes, delete "<% Web.html (#v cont) %>"!</a>
<% elseif $"del2" <> "" then
val id = Web.stoi ($"del2");
val cont = Contact.lookupContact id;
Contact.deleteContact id %>
- <h3><b>Contact entry "<% Web.html (#v cont) %>" deleted</b></h3>
+ <h3>Contact entry "<% Web.html (#v cont) %>" deleted</h3>
<% end;
if showNormal then %>
-<h3><b>Add new contact information</b></h3>
+<h3>Add new contact information</h3>
<form action="contact" method="post">
<input type="hidden" name="cmd" value="add">
-<table>
-<tr> <td align="right"><b>Kind</b>:</td> <td><select name="knd">
+<table class="blanks">
+<tr> <td>Kind:</td> <td><select name="knd">
<% foreach kind in Contact.listKinds () do %>
<option value="<% #id kind %>"><% Web.html (#name kind) %></option>
<% end %>
</select></td> </tr>
-<tr> <td align="right"><b>Value</b>:</td> <td><input name="v"></td> </tr>
-<tr> <td align="right"><b>Readable by</b>:</td> <td><select name="priv">
+<tr> <td>Value:</td> <td><input name="v"></td> </tr>
+<tr> <td>Readable by:</td> <td><select name="priv">
<option value="0">Anyone</option>
<option value="1" selected>Members only</option>
<option value="2">Admins only</option>
</table>
</form>
-<h3><b>Your contact information</b></h3>
+<h3>Your contact information</h3>
-<table>
+<table class="blanks">
<% foreach (kind, cont) in Contact.listUserContacts (Init.getUserId(), Contact.ADMINS) do %>
- <tr> <td align="right" valign="top"><b><% Web.html (#name kind) %></b>:</td>
+ <tr> <td><% Web.html (#name kind) %>:</td>
<td><% Contact.format (kind, cont) %></td>
<td><i><% switch #priv cont of
Contact.PUBLIC => %>Public<%
if Util.validDomain dom then
val id = Domain.add (Init.getUserId(), dom, $"msg");
if not (Domain.notifyNew id) then
- %><h3><b>Error sending e-mail notification</b></h3><%
+ %><h3>Error sending e-mail notification</h3><%
end
- %><h3><b>Request added</b></h3><%
+ %><h3>Request added</h3><%
else
- %><h3><b>Invalid domain name</b></h3><%
+ %><h3>Invalid domain name</h3><%
end
elseif $"cmd" = "open" then
- %><h3><b>Open requests</b></h3>
+ %><h3>Open requests</h3>
<a href="domain?cmd=list">List all requests</a><%
foreach (name, req) in Domain.listOpen () do %>
<br><hr><br>
-<table>
-<tr> <td align="right"><b>By</b>:</td> <td><a href="user?id=<% #usr req %>"><% name %></a></td> </tr>
-<tr> <td align="right"><b>Time</b>:</td> <td><% #stamp req %></td> </tr>
-<tr> <td align="right"><b>Domain</b>:</td> <td><a href="<% Util.whoisUrl (#data req) %>"><% #data req %></a></td> </tr>
-<tr> <td align="right" valign="top"><b>Reason</b>:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
+<table class="blanks">
+<tr> <td>By:</td> <td><a href="user?id=<% #usr req %>"><% name %></a></td> </tr>
+<tr> <td>Time:</td> <td><% #stamp req %></td> </tr>
+<tr> <td>Domain:</td> <td><a href="<% Util.whoisUrl (#data req) %>"><% #data req %></a></td> </tr>
+<tr> <td>Reason:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
</table>
<% if admin then %>
<% end
elseif $"cmd" = "list" then
- %><h3><b>All requests</b></h3><%
+ %><h3>All requests</h3><%
foreach (name, req) in Domain.list () do %>
<br><hr><br>
-<table>
-<tr> <td align="right"><b>By</b>:</td> <td colspan="2"><a href="user?id=<% #usr req %>"><% name %></a></td> </tr>
-<tr> <td align="right"><b>Time</b>:</td> <td colspan="2"><% #stamp req %></td> </tr>
-<tr> <td align="right"><b>Domain</b>:</td> <td><a href="<% Util.whoisUrl (#data req) %>"><% #data req %></a></td> </tr>
-<tr> <td align="right" valign="top"><b>Reason</b>:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
+<table class="blanks">
+<tr> <td>By:</td> <td colspan="2"><a href="user?id=<% #usr req %>"><% name %></a></td> </tr>
+<tr> <td>Time:</td> <td colspan="2"><% #stamp req %></td> </tr>
+<tr> <td>Domain:</td> <td><a href="<% Util.whoisUrl (#data req) %>"><% #data req %></a></td> </tr>
+<tr> <td>Reason:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
</table>
<% if admin then %>
val id = Web.stoi ($"mod");
val req = Domain.lookup id;
val user = Init.lookupUser (#usr req) %>
-<h3><b>Handle request</b></h3>
+<h3>Handle request</h3>
<form action="domain" method="post">
<input type="hidden" name="save" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Requestor</b>:</td> <td><a href="user?id=<% #usr req %>"><% #name user %></a></td> </tr>
-<tr> <td align="right"><b>Time</b>:</td> <td><% #stamp req %></td> </tr>
-<tr> <td align="right"><b>Status</b>:</td> <td><select name="status">
+<table class="blanks">
+<tr> <td>Requestor:</td> <td><a href="user?id=<% #usr req %>"><% #name user %></a></td> </tr>
+<tr> <td>Time:</td> <td><% #stamp req %></td> </tr>
+<tr> <td>Status</b>:</td> <td><select name="status">
<option value="0"<% if #status req = Domain.NEW then %> selected<% end %>>New</option>
<option value="1"<% if #status req = Domain.INSTALLED then %> selected<% end %>>Installed</option>
<option value="2"<% if #status req = Domain.REJECTED then %> selected<% end %>>Rejected</option>
</select></td> </tr>
-<tr> <td align="right"><b>Domain</b>:</td> <td><input name="dom" value="<% #data req %>"></td> </tr>
-<tr> <td align="right" valign="top"><b>Message</b>:</td> <td><textarea name="msg" rows="10" cols="80" wrap="soft"><% Web.html (#msg req) %></textarea></td> </tr>
+<tr> <td>Domain:</td> <td><input name="dom" value="<% #data req %>"></td> </tr>
+<tr> <td>Message:</td> <td><textarea name="msg" rows="10" cols="80" wrap="soft"><% Web.html (#msg req) %></textarea></td> </tr>
<tr> <td><input type="submit" value="Save"></td> </tr>
</table>
</form>
Domain.modify {req with data = $"dom", msg = $"msg", status = newStatus};
if oldStatus <> newStatus then
if not (Domain.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then
- %><h3><b>Error sending e-mail notification</b></h3><%
+ %><h3>Error sending e-mail notification</h3><%
end
end
- %><h3><b>Request modified</b></h3>
+ %><h3>Request modified</h3>
Back to: <a href="domain?cmd=open">open requests</a>, <a href="domain?cmd=list">all requests</a>
<% elseif $"del" <> "" then
val id = Web.stoi ($"del");
val req = Domain.lookup id;
val user = Init.lookupUser (#usr req)
- %><h3><b>Are you sure you want to delete request by <% #name user %> for <tt><% #data req %></tt>?</b></h3>
+ %><h3>Are you sure you want to delete request by <% #name user %> for <tt><% #data req %></tt>?</h3>
<a href="domain?del2=<% id %>">Yes, I'm sure!</a>
<% elseif $"del2" <> "" then
Group.requireGroupName "server";
val id = Web.stoi ($"del2");
Domain.delete id
- %><h3><b>Request deleted</b><h3>
+ %><h3>Request deleted</b><h3>
Back to: <a href="domain?cmd=open">open requests</a>, <a href="domain?cmd=list">all requests</a>
<% else %>
-<h3><b>Request new domain</b></h3>
+<h3>Request new domain</h3>
Enter the full Internet domain name that you own and would like set up here. We don't do domain registration, so it is your responsibility to register this name with your registrar of choice before submitting it here. The "Reason" field is optional.
<form action="domain" method="post">
-<table>
-<tr> <td align="right" valign="top"><b>Domain</b>:</td> <td><input name="req"></td> </tr>
-<tr> <td align="right" valign="top"><b>Reason</b>:</td> <td><textarea name="msg" rows="5" cols="80" wrap="soft"></textarea></td> </tr>
+<table class="blanks">
+<tr> <td>Domain:</td> <td><input name="req"></td> </tr>
+<tr> <td>Reason:</td> <td><textarea name="msg" rows="5" cols="80" wrap="soft"></textarea></td> </tr>
<tr> <td><input type="submit" value="Request"></td> </tr>
</table>
</form>
<title>Hcoop Portal: Exception</title>
</head><body>
-<h1><b>Exception</b></h1>
+<h1>Exception</h1>
<% switch Web.getExn () of
Fail msg => %>
-</body></html>
\ No newline at end of file
+</div>
+
+</div>
+</div>
+
+</body></html>
--- /dev/null
+</div>
+
+</div>
if $"cmd" = "Create" then
if not (Group.validGroupName ($"name")) then %>
- <h3><b>Invalid group name</b></h3>
+ <h3>Invalid group name</h3>
<% else switch Group.groupNameToId ($"name") of
SOME _ => %>
- <h3><b>Group name already in use</b></h3>
+ <h3>Group name already in use</h3>
<% | NONE =>
val id = Group.addGroup ($"name") %>
- <h3><b>Group added</b></h3>
+ <h3>Group added</h3>
<% end
end
elseif $"mod" <> "" then
showNormal := false;
val group = Group.lookupGroup (Web.stoi ($"mod")) %>
-<h3><b>Modify group record</b></h3>
+<h3>Modify group record</h3>
<form action="groups" method="post">
<input type="hidden" name="id" value="<% $"mod" %>">
-<table>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name" value="<% #name group %>"></td> </tr>
+<table class="blanks">
+<tr> <td>Name:</td> <td><input name="name" value="<% #name group %>"></td> </tr>
<tr> <td><input type="submit" name="cmd" value="Save"></td> </tr>
</table>
</form>
<% elseif $"cmd" = "Save" then
val group = Group.lookupGroup (Web.stoi ($"id"));
Group.modGroup {group with name = $"name"} %>
- <h3><b>Group record saved.</b></h3>
+ <h3>Group record saved.</h3>
<% elseif $"del" <> "" then
showNormal := false;
val group = Group.lookupGroup (Web.stoi ($"del")) %>
- <h3><b>Are you sure you want to delete group <% #name group %>?</b></h3>
+ <h3>Are you sure you want to delete group <% #name group %>?</h3>
<a href="groups?del2=<% $"del" %>">Yes, delete <% #name group %>!</a>
<% elseif $"del2" <> "" then
val group = Group.lookupGroup (Web.stoi ($"del2"));
Group.deleteGroup (Web.stoi ($"del2")) %>
- <h3><b><% #name group %> deleted!</b></h3>
+ <h3><% #name group %> deleted!</h3>
<% elseif $"cmd" = "Grant" then
Group.addToGroup {usr = Web.stoi ($"usr"), grp = Web.stoi ($"grp")} %>
- <h3><b>Membership granted.</b></h3>
+ <h3>Membership granted.</h3>
<% elseif $"revoke" <> "" then
Group.removeFromGroup {usr = Web.stoi ($"revoke"), grp = Web.stoi ($"grp")} %>
- <h3><b>Membership revoked.</b></h3>
+ <h3>Membership revoked.</h3>
<% end %>
<% if showNormal then %>
-<h3><b>Create group</b></h3>
+<h3>Create group</h3>
<form action="groups" method="post">
-<table>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name"></td> </tr>
+<table class="blanks">
+<tr> <td>Name:</td> <td><input name="name"></td> </tr>
<tr> <td><input type="submit" name="cmd" value="Create"></td> </tr>
</table>
</form>
-<h3><b>Grant membership</b></h3>
+<h3>Grant membership</h3>
<form action="groups" method="post">
-<table>
-<tr> <td align="right"><b>Group</b>:</td> <td><select name="grp">
+<table class="blanks">
+<tr> <td>Group:</td> <td><select name="grp">
<% foreach group in Group.listGroups () do %>
<option value="<% #id group %>"><% Web.html (#name group) %></option>
<% end %>
</select></td> </tr>
-<tr> <td align="right"><b>Member</b>:</td> <td><select name="usr">
+<tr> <td>Member:</td> <td><select name="usr">
<% foreach user in Init.listUsers () do %>
<option value="<% #id user %>"><% Web.html (#name user) %></option>
<% end %>
</table>
</form>
-<h3><b>Manage current groups</b></h3>
+<h3>Manage current groups</h3>
<table>
<% foreach group in Group.listGroups () do %>
-<html><head>
<% val title =
case $"title" of
"" => "HCoop Portal"
| t => ("HCoop Portal: " ^ t) %>
+<html><head>
+<link rel="stylesheet" type="text/css" href="http://hcoop.net/hcoop.css" />
<title><% Web.html title %></title>
</head><body>
-<a href="portal">Return to main page</a>
+<div class="main">
+
+<div class="title">
+<img class="globe" src="http://hcoop.net/globe.gif" />
+<h1><% Web.html title %></h1>
+</div>
+
+<div class="break"></div>
+<div class="sidebar">
+
+<% if Group.inGroupNum 0 then %>
+<div class="sbgroup">
+Admin<br />
+<li> <a href="apps?cmd=approved">Approved applicants waiting for accounts</a></li>
+<li> <a href="users">Members</a></li>
+<li> <a href="groups">Groups</a></li>
+<li> <a href="balances">Balances</a></li>
+<li> <a href="kind">Contact kinds</a></li>
+<li> <a href="roll">Roll call!</a></li>
+</div>
+<% end %>
+
+<div class="sbgroup">
+Your account<br />
+<li> <a href="pref">Preferences</a></li>
+<li> <a href="money">Financial</a></li>
+<li> <a href="sec">Security settings</a></li>
+<li> <a href="contact">Contact information</a></li>
+<li> <a href="location">Your geographic locations</a></li>
+<li> <a href="link">Public URL directory</a></li>
+</div>
+
+<div class="sbgroup">
+Support requests<br />
+<li> <a href="domain">Request control of a domain with domtool</a></li>
+<li> <a href="apt">Request Debian apt packages</a></li>
+<li> <a href="list">Request a Mailman mailing list</a></li>
+<li> <a href="support">Other support request</a></li>
+</div>
+
+<div class="sbgroup">
+Statistics<br />
+<li> <a href="webbw">Apache bandwidth</a></li>
+<li> <a href="quotas">Disk usage</a></li>
+</div>
+
+<div class="sbgroup">
+Public pages<br />
+<li> <a href="http://hcoop.net/dyn/members.html">Member directory</a></li>
+<li> <a href="http://hcoop.net/dyn/locs.html">Member location summary</a></li>
+<li> <a href="http://hcoop.net/dyn/sites.html">URL directory</a></li>
+</div>
+
+<div class="sbgroup">
+Miscellaneous<br />
+<li> <a href="apps">Review pending membership applications</a></li>
+<li> <a href="dir">Contact information directory</a></li>
+<li> <a href="poll">Polls</a></li>
+</div>
+
+<div class="sbgroup">
+Other services<br />
+<li> <a href="/webalizer/">Webalizer</a></li>
+<li> <a href="/mrtg/">MRTG statistics</a></li>
+<li> <a href="http://nms.interserver.net/cac/nms.php?server_name=bmV3Lmhjb29wLm5ldA==">InterServer bandwidth statistics</a></li>
+<li> <a href="/usermin/">Usermin</a></li>
+<li> <a href="/squirrel/">SquirrelMail</a></li>
+<li> <a href="/passwd">Change vmail passwords</a></li>
+</div>
+
+</div>
-<h2><b><% Web.html title %></b></h2>
+<div class="main2">
--- /dev/null
+<div class="sidebar">
+
+<% if Group.inGroupNum 0 then %>
+<div class="sbgroup">
+Admin<br />
+<li> <a href="apps?cmd=approved">Approved applicants waiting for accounts</a></li>
+<li> <a href="users">Members</a></li>
+<li> <a href="groups">Groups</a></li>
+<li> <a href="balances">Balances</a></li>
+<li> <a href="kind">Contact kinds</a></li>
+<li> <a href="roll">Roll call!</a></li>
+</div>
+<% end %>
+
+<div class="sbgroup">
+Your account<br />
+<li> <a href="pref">Preferences</a></li>
+<li> <a href="money">Financial</a></li>
+<li> <a href="sec">Security settings</a></li>
+<li> <a href="contact">Contact information</a></li>
+<li> <a href="location">Your geographic locations</a></li>
+<li> <a href="link">Public URL directory</a></li>
+</div>
+
+<div class="sbgroup">
+Support requests<br />
+<li> <a href="domain">Request control of a domain with domtool</a></li>
+<li> <a href="apt">Request Debian apt packages</a></li>
+<li> <a href="list">Request a Mailman mailing list</a></li>
+<li> <a href="support">Other support request</a></li>
+</div>
+
+<div class="sbgroup">
+Statistics<br />
+<li> <a href="webbw">Apache bandwidth</a></li>
+<li> <a href="quotas">Disk usage</a></li>
+</div>
+
+<div class="sbgroup">
+Public pages<br />
+<li> <a href="http://hcoop.net/dyn/members.html">Member directory</a></li>
+<li> <a href="http://hcoop.net/dyn/locs.html">Member location summary</a></li>
+<li> <a href="http://hcoop.net/dyn/sites.html">URL directory</a></li>
+</div>
+
+<div class="sbgroup">
+Miscellaneous<br />
+<li> <a href="apps">Review pending membership applications</a></li>
+<li> <a href="dir">Contact information directory</a></li>
+<li> <a href="poll">Polls</a></li>
+</div>
+
+<div class="sbgroup">
+Other services<br />
+<li> <a href="/webalizer/">Webalizer</a></li>
+<li> <a href="/mrtg/">MRTG statistics</a></li>
+<li> <a href="http://nms.interserver.net/cac/nms.php?server_name=bmV3Lmhjb29wLm5ldA==">InterServer bandwidth statistics</a></li>
+<li> <a href="/usermin/">Usermin</a></li>
+<li> <a href="/squirrel/">SquirrelMail</a></li>
+<li> <a href="/passwd">Change vmail passwords</a></li>
+</div>
+
+</div>
+
+<div class="main2">
--- /dev/null
+<% val title =
+ case $"title" of
+ "" => "HCoop Portal"
+ | t => ("HCoop Portal: " ^ t) %>
if $"cmd" = "new" then
showNormal := false %>
-<h3><b>New issue</b></h3>
+<h3>New issue</h3>
<form action="issue" method="post">
<input type="hidden" name="cat" value="<% catId %>">
<input type="hidden" name="cmd" value="add">
-<table>
-<tr> <td align="right"><b>Title</b>:</td> <td><input name="title"></td> </tr>
-<tr> <td align="right"><input type="checkbox" name="priv"></td> <td>Only make this issue accessible to the admins for this support category.</td> </tr>
-<tr> <td align="right"><b>Description</b>:</td> <td><textarea name="body" rows="10" cols="80" wrap="soft"></textarea></td> </tr>
+<table class="blanks">
+<tr> <td>Title:</td> <td><input name="title"></td> </tr>
+<tr> <td><input type="checkbox" name="priv"></td> <td>Only make this issue accessible to the admins for this support category.</td> </tr>
+<tr> <td>Description:</td> <td><textarea name="body" rows="10" cols="80" wrap="soft"></textarea></td> </tr>
<tr> <td><input type="submit" value="Add"></td> </tr>
</table>
</form>
<% elseif $"cmd" = "add" then
val title = $"title";
if not (Support.validTitle title) then
- %><h3><b>Invalid title</b></h3><%
+ %><h3>Invalid title</h3><%
else
val id = Support.addIssue (you, catId, title, $"priv" = "on", Support.NEW);
val _ = Support.addPost (you, id, $"body");
if not (Support.notifyCreation id) then
- %><h3><b>Error sending e-mail notification</b></h3><%
+ %><h3>Error sending e-mail notification</h3><%
end;
viewingIssue := SOME id
end
elseif $"cmd" = "list" then
showNormal := false %>
- <h3><b>All issues</b></h3>
+ <h3>All issues</h3>
<table>
<% foreach (name, issue) in Support.listCategoryIssues catId do
val id = Web.stoi ($"mod");
val issue = Support.lookupIssue id;
if catId <> #cat issue then
- %><h3><b>Inconsistent cat field</b></h3><%
+ %><h3>Inconsistent cat field</h3><%
elseif not admin then
- %><h3><b>You aren't authorized to modify that.</b></h3><%
+ %><h3>You aren't authorized to modify that.</h3><%
else %>
-<h3><b>Modify issue</b></h3>
+<h3>Modify issue</h3>
<form action="issue" method="post">
<input type="hidden" name="cat" value="<% catId %>">
<input type="hidden" name="save" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Category</b>:</td> <td><select name="newCat">
+<table class="blanks">
+<tr> <td>Category:</td> <td><select name="newCat">
<% foreach cat in Support.listCategories () do %>
<option value="<% #id cat %>"<% if #id cat = catId then %> selected<% end %>><% Web.html (#name cat) %></option>
<% end %></select></td> </tr>
-<tr> <td align="right"><b>Title</b>:</td> <td><input name="title" value="<% Web.html (#title issue) %>"></td> </tr>
-<tr> <td align="right"><input type="checkbox" name="priv"<% if #priv issue then %> checked<% end %>></td> <td>Only make this issue accessible to the admins for this support category.</td> </tr>
-<tr> <td align="right"><b>Status</b>:</td> <td><select name="status">
+<tr> <td>Title>:</td> <td><input name="title" value="<% Web.html (#title issue) %>"></td> </tr>
+<tr> <td><input type="checkbox" name="priv"<% if #priv issue then %> checked<% end %>></td> <td>Only make this issue accessible to the admins for this support category.</td> </tr>
+<tr> <td>Status:</td> <td><select name="status">
<option value="0"<% if #status issue = Support.NEW then %> selected<% end %>>New</option>
<option value="1"<% if #status issue = Support.PENDING then %> selected<% end %>>Pending</option>
<option value="2"<% if #status issue = Support.CLOSED then %> selected<% end %>>Closed</option>
val newCat = Support.lookupCategory (Web.stoi ($"newCat"));
if catId <> #cat issue then
- %><h3><b>Inconsistent cat field</b></h3><%
+ %><h3>Inconsistent cat field</h3><%
elseif (iff admin then not (Group.inGroupNum (#grp newCat)) else false) then
- %><h3><b>Authorization failure</b></h3><%
+ %><h3>Authorization failure</h3><%
elseif not (Support.validTitle title) then
- %><h3><b>Invalid title</b></h3><%
+ %><h3>Invalid title</h3><%
elseif (iff status < 0 then false else status > 2) then
- %><h3><b>Invalid status</b></h3><%
+ %><h3>Invalid status</h3><%
else
val status = (case status of
0 => Support.NEW
status = status};
if status <> oldStatus then
if not (Support.notifyStatus (you, oldStatus, status, id)) then
- %><h3><b>Error sending e-mail notification</b></h3><%
+ %><h3>Error sending e-mail notification</h3><%
end
end;
viewingIssue := SOME id
- %><h3><b>Issue saved</b></h3<%
+ %><h3>Issue saved</b></h3<%
end
elseif $"del" <> "" then
val issue = Support.lookupIssue id;
if catId <> #cat issue then
- %><h3><b>Inconsistent cat field</b></h3><%
+ %><h3>Inconsistent cat field</h3><%
elseif not admin then
- %><h3><b>Authorization failure</b></h3><%
+ %><h3>Authorization failure</h3><%
else
- %><h3><b>Are you sure you want to delete "<% Web.html (#title issue) %>"?</b></h3>
+ %><h3>Are you sure you want to delete "<% Web.html (#title issue) %>"?</h3>
<a href="issue?cat=<% catId %>&del2=<% id %>">Yes, delete "<% Web.html (#title issue) %>"!</a><%
end
val issue = Support.lookupIssue id;
if catId <> #cat issue then
- %><h3><b>Inconsistent cat field</b></h3><%
+ %><h3>Inconsistent cat field</h3><%
elseif not admin then
- %><h3><b>Authorization failure</b></h3><%
+ %><h3>Authorization failure</h3><%
else
Support.deleteIssue id
- %><h3><b>Issue "<% Web.html (#title issue) %>" deleted</b></h3><%
+ %><h3>Issue "<% Web.html (#title issue) %>" deleted</h3><%
end
elseif $"cmd" = "post" then
val issue = Support.lookupIssue id;
if catId <> #cat issue then
- %><h3><b>Inconsistent cat field</b></h3><%
+ %><h3>Inconsistent cat field</h3><%
elseif not (Support.allowedToSee id) then
- %><h3><b>Authorization failure</b></h3><%
+ %><h3>Authorization failure</h3><%
else
val id = Support.addPost (you, id, $"body");
if not (Support.notifyPost id) then
- %><h3><b>Error sending e-mail notification</b></h3><%
+ %><h3>Error sending e-mail notification</h3><%
end
- %><h3><b>Posted</b></h3><%
+ %><h3>Posted</h3><%
end
elseif $"modPost" <> "" then
val post = Support.lookupPost id;
val issue = Support.lookupIssue (#iss post);
if catId <> #cat issue then
- %><h3><b>Inconsistent cat field</b></h3><%
+ %><h3>Inconsistent cat field</h3><%
elseif not admin then
- %><h3><b>You aren't authorized to modify that.</b></h3><%
+ %><h3>You aren't authorized to modify that.</h3><%
else %>
-<h3><b>Modify post</b></h3>
+<h3>Modify post</h3>
<form action="issue" method="post">
<input type="hidden" name="cat" value="<% catId %>">
val issue = Support.lookupIssue (#iss post);
if catId <> #cat issue then
- %><h3><b>Inconsistent cat field</b></h3><%
+ %><h3>Inconsistent cat field</h3><%
elseif not admin then
- %><h3><b>Authorization failure</b></h3><%
+ %><h3>Authorization failure</h3><%
else
Support.modPost {post with body = $"body"};
viewingIssue := SOME (#iss post)
- %><h3><b>Post saved</b></h3<%
+ %><h3>Post saved</b></h3<%
end
elseif $"delPost" <> "" then
val issue = Support.lookupIssue (#iss post);
if catId <> #cat issue then
- %><h3><b>Inconsistent cat field</b></h3><%
+ %><h3>Inconsistent cat field</h3><%
elseif not admin then
- %><h3><b>Authorization failure</b></h3><%
+ %><h3>Authorization failure</h3><%
else
- %><h3><b>Are you sure you want to delete this post?</b></h3>
+ %><h3>Are you sure you want to delete this post?</h3>
<blockquote><% Web.htmlNl (#body post) %></blockquote>
<a href="issue?cat=<% catId %>&delPost2=<% id %>">Yes, delete it!</a><%
end
val issue = Support.lookupIssue (#iss post);
if catId <> #cat issue then
- %><h3><b>Inconsistent cat field</b></h3><%
+ %><h3>Inconsistent cat field</h3><%
elseif not admin then
- %><h3><b>Authorization failure</b></h3><%
+ %><h3>Authorization failure</h3><%
else
Support.deletePost id;
viewingIssue := SOME (#iss post)
- %><h3><b>Post deleted</b></h3><%
+ %><h3>Post deleted</h3><%
end
elseif $"id" <> "" then
val canEdit = Support.allowedToEdit id;
val canView = Support.allowedToSee id;
if catId <> #cat issue then
- %><h3><b>Inconsistent cat field</b></h3><%
+ %><h3>Inconsistent cat field</h3><%
elseif not canView then
- %><h3><b>You aren't authorized to view that.</b></h3><%
+ %><h3>You aren't authorized to view that.</h3><%
else
val user = Init.lookupUser (#usr issue) %>
-<table>
-<tr> <td align="right"><b>Title</b>:</td> <td><% Web.html (#title issue) %></td> </tr>
-<tr> <td align="right"><b>Created by</b>:</td> <td><a href="user?id=<% #usr issue %>"><% #name user %></a></td> </tr>
-<tr> <td align="right"><b>At</b>:</td> <td><% #stamp issue %></td> </tr>
-<tr> <td align="right"><b>Private</b>:</td> <td><% if #priv issue then %>yes<% else %>no<% end %></td> </tr>
-<tr> <td align="right"><b>Status</b>:</td> <td><% switch #status issue of
+<table class="blanks">
+<tr> <td>Title:</td> <td><% Web.html (#title issue) %></td> </tr>
+<tr> <td>Created by:</td> <td><a href="user?id=<% #usr issue %>"><% #name user %></a></td> </tr>
+<tr> <td>At:</td> <td><% #stamp issue %></td> </tr>
+<tr> <td>Private:</td> <td><% if #priv issue then %>yes<% else %>no<% end %></td> </tr>
+<tr> <td>Status:</td> <td><% switch #status issue of
Support.NEW => %>New<%
| Support.PENDING => %>Pending<%
| Support.CLOSED => %>Closed<%
<br><hr><br>
-<h3><b>Post to this thread</b></h3>
+<h3>Post to this thread</h3>
<form action="issue" method="post">
<input type="hidden" name="cat" value="<% catId %>">
<a href="issue?cat=<% catId %>&cmd=new">New issue</a><br>
<a href="issue?cat=<% catId %>&cmd=list">List all issues</a>
-<h3><b>Open issues</b></h3>
+<h3>Open issues</h3>
<table>
<% val issues = iff admin then Support.listOpenCategoryIssuesAdmin catId
if $"cmd" = "add" then
val id = Contact.addKind ($"name", (iff $"url" = "on" then SOME ($"urlPrefix", $"urlPostfix") else NONE))
- %> <h3><b>Contact kind added</b></h3>
+ %> <h3>Contact kind added</h3>
<% elseif $"mod" <> "" then
showNormal := false;
<form action="kind" method="post">
<input type="hidden" name="save" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name" value="<% Web.html (#name kind) %>"></td> </tr>
-<tr> <td align="right"><b>URL pattern</b>:</td> <td><%
+<table class="blanks">
+<tr> <td>Name:</td> <td><input name="name" value="<% Web.html (#name kind) %>"></td> </tr>
+<tr> <td>URL pattern:</td> <td><%
switch #makeUrl kind of
NONE => %><input type="checkbox" name="url"> <input name="urlPrefix">...<input name="urlPostfix"><%
| SOME (pre, post) => %><input type="checkbox" name="url" checked> <input name="urlPrefix" value="<% Web.html pre %>">...<input name="urlPostfix" value="<% Web.html post %>"><%
val id = Web.stoi ($"save");
val kind = Contact.lookupKind id;
Contact.modKind {kind with name = $"name", makeUrl = (iff $"url" = "on" then SOME ($"urlPrefix", $"urlPostfix") else NONE)}
- %> <h3><b>Contact kind modified</b></h3>
+ %> <h3>Contact kind modified</h3>
<% elseif $"del" <> "" then
showNormal := false;
val id = Web.stoi ($"del");
val kind = Contact.lookupKind id %>
- <h3><b>Are you sure you want to delete "<% Web.html (#name kind) %>"?</b></h3>
+ <h3>Are you sure you want to delete "<% Web.html (#name kind) %>"?</h3>
<a href="kind?del2=<% $"del" %>">Yes, delete "<% Web.html (#name kind) %>"!</a>
val id = Web.stoi ($"del2");
val kind = Contact.lookupKind id;
Contact.deleteKind id %>
- <h3><b>"<% Web.html (#name kind) %>" deleted</b></h3>
+ <h3>"<% Web.html (#name kind) %>" deleted</h3>
<% end %>
<% if showNormal then %>
-<h3><b>Add a contact kind</b></h3>
+<h3>Add a contact kind</h3>
<form action="kind" method="post">
<input type="hidden" name="cmd" value="add">
-<table>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name"></td> </tr>
-<tr> <td align="right"><b>URL pattern</b>:</td> <td><input type="checkbox" name="url"> <input name="urlPrefix">...<input name="urlPostfix"></td> </tr>
+<table class="blanks">
+<tr> <td>Name:</td> <td><input name="name"></td> </tr>
+<tr> <td>URL pattern:</td> <td><input type="checkbox" name="url"> <input name="urlPrefix">...<input name="urlPostfix"></td> </tr>
<tr> <td><input type="submit" value="Add"></td> </tr>
</table>
</form>
-<h3><b>Current contact kinds</b></h3>
+<h3>Current contact kinds</h3>
<table>
<tr> <td><b>Kind</b></td> <td><b>URL pattern</b></td> </tr>
if $"cmd" = "add" then
val id = Link.addLink (you, $"title", $"url", $"descr") %>
- <h3><b>Link added</b></h3>
+ <h3>Link added</h3>
<% elseif $"mod" <> "" then
val id = Web.stoi ($"mod");
val link = Link.lookupLink id;
if (iff admin then false else you <> #usr link) then
- %><h3><b>You can't modify somebody else's link.</b></h3><%
+ %><h3>You can't modify somebody else's link.</h3><%
else
showNormal := false %>
-<h3><b>Modify link</b></h3>
+<h3>Modify link</h3>
<form action="link" method="post">
<input type="hidden" name="save" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Title</b>:</td> <td><input name="title" value="<% Web.html (#title link) %>"></td> </tr>
-<tr> <td align="right"><b>URL</b>:</td> <td><input name="url" value="<% Web.html (#url link) %>"></td> </tr>
-<tr> <td align="right"><b>Description</b>:</td> <td><input name="descr" value="<% Web.html (#descr link) %>"></td> </tr>
+<table class="blanks">
+<tr> <td>Title:</td> <td><input name="title" value="<% Web.html (#title link) %>"></td> </tr>
+<tr> <td>URL:</td> <td><input name="url" value="<% Web.html (#url link) %>"></td> </tr>
+<tr> <td>Description:</td> <td><input name="descr" value="<% Web.html (#descr link) %>"></td> </tr>
<tr> <td><input type="submit" value="Save"></td> </t>
</table>
</form>
val id = Web.stoi ($"save");
val link = Link.lookupLink id;
if (iff admin then false else you <> #usr link) then
- %><h3><b>You can't modify somebody else's link.</b></h3><%
+ %><h3>You can't modify somebody else's link.</h3><%
else
Link.modLink {link with title = $"title", url = $"url", descr = $"descr"}
- %><h3><b>Link modified</b></h3><%
+ %><h3>Link modified</h3><%
end
elseif $"del" <> "" then
val id = Web.stoi ($"del");
val link = Link.lookupLink id;
if (iff admin then false else you <> #usr link) then
- %><h3><b>You can't delete somebody else's link.</b></h3><%
+ %><h3>You can't delete somebody else's link.</h3><%
else
showNormal := false %>
- <h3><b>Are you sure you want to delete link to "<% Web.html (#title link) %>"?</b></h3>
+ <h3>Are you sure you want to delete link to "<% Web.html (#title link) %>"?</h3>
<a href="link?del2=<% id %>">Yes, delete "<% Web.html (#title link) %>"!</a><%
end
val id = Web.stoi ($"del2");
val link = Link.lookupLink id;
if (iff admin then false else you <> #usr link) then
- %><h3><b>You can't delete somebody else's link.</b></h3><%
+ %><h3>You can't delete somebody else's link.</h3><%
else
Link.deleteLink id;
- %><h3><b>Link "<% Web.html (#title link) %>" deleted</b></h3><%
+ %><h3>Link "<% Web.html (#title link) %>" deleted</h3><%
end
end;
<% end %>
</table>
-<h3><b>Add a link to a site you host with Hcoop</b></h3>
+<h3>Add a link to a site you host with Hcoop</h3>
<form action="link" method="post">
<input type="hidden" name="cmd" value="add">
-<table>
-<tr> <td align="right"><b>Title</b>:</td> <td><input name="title"></td> </tr>
-<tr> <td align="right"><b>URL</b>:</td> <td><input name="url" value="http://"></td> </tr>
-<tr> <td align="right"><b>Description</b>:</td> <td><input name="descr"></td> </tr>
+<table class="blanks">
+<tr> <td>Title:</td> <td><input name="title"></td> </tr>
+<tr> <td>URL:</td> <td><input name="url" value="http://"></td> </tr>
+<tr> <td>Description:</td> <td><input name="descr"></td> </tr>
<tr> <td><input type="submit" value="Add"></td> </t>
</table>
</form>
if Util.validEmail dom then
val id = MailingList.add (Init.getUserId(), dom, $"msg");
if not (MailingList.notifyNew id) then
- %><h3><b>Error sending e-mail notification</b></h3><%
+ %><h3>Error sending e-mail notification</h3><%
end
- %><h3><b>Request added</b></h3><%
+ %><h3>Request added</h3><%
else
- %><h3><b>Invalid list e-mail address</b></h3><%
+ %><h3>Invalid list e-mail address</h3><%
end
elseif $"cmd" = "open" then
- %><h3><b>Open requests</b></h3>
+ %><h3>Open requests</h3>
<a href="list?cmd=list">List all requests</a><%
foreach (name, req) in MailingList.listOpen () do %>
<br><hr><br>
-<table>
-<tr> <td align="right"><b>By</b>:</td> <td><a href="user?id=<% #usr req %>"><% name %></a></td> </tr>
-<tr> <td align="right"><b>Time</b>:</td> <td><% #stamp req %></td> </tr>
-<tr> <td align="right"><b>List name</b>:</td> <td><% #data req %></td> </tr>
-<tr> <td align="right" valign="top"><b>Reason</b>:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
+<table class="blanks">
+<tr> <td>By:</td> <td><a href="user?id=<% #usr req %>"><% name %></a></td> </tr>
+<tr> <td>Time:</td> <td><% #stamp req %></td> </tr>
+<tr> <td>List name:</td> <td><% #data req %></td> </tr>
+<tr> <td>Reason:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
</table>
<% if admin then
<% end
elseif $"cmd" = "list" then
- %><h3><b>All requests</b></h3><%
+ %><h3>All requests</h3><%
foreach (name, req) in MailingList.list () do %>
<br><hr><br>
-<table>
-<tr> <td align="right"><b>By</b>:</td> <td colspan="2"><a href="user?id=<% #usr req %>"><% name %></a></td> </tr>
-<tr> <td align="right"><b>Time</b>:</td> <td colspan="2"><% #stamp req %></td> </tr>
-<tr> <td align="right"><b>List name</b>:</td> <td><% #data req %></td> </tr>
-<tr> <td align="right" valign="top"><b>Reason</b>:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
+<table class="blanks">
+<tr> <td>By:</td> <td colspan="2"><a href="user?id=<% #usr req %>"><% name %></a></td> </tr>
+<tr> <td>Time:</td> <td colspan="2"><% #stamp req %></td> </tr>
+<tr> <td>List name:</td> <td><% #data req %></td> </tr>
+<tr> <td>Reason:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
</table>
<% if admin then %>
val id = Web.stoi ($"mod");
val req = MailingList.lookup id;
val user = Init.lookupUser (#usr req) %>
-<h3><b>Handle request</b></h3>
+<h3>Handle request</h3>
<form action="list" method="post">
<input type="hidden" name="save" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Requestor</b>:</td> <td><a href="user?id=<% #usr req %>"><% #name user %></a></td> </tr>
-<tr> <td align="right"><b>Time</b>:</td> <td><% #stamp req %></td> </tr>
-<tr> <td align="right"><b>Status</b>:</td> <td><select name="status">
+<table class="blanks">
+<tr> <td>Requestor:</td> <td><a href="user?id=<% #usr req %>"><% #name user %></a></td> </tr>
+<tr> <td>Time:</td> <td><% #stamp req %></td> </tr>
+<tr> <td>Status:</td> <td><select name="status">
<option value="0"<% if #status req = MailingList.NEW then %> selected<% end %>>New</option>
<option value="1"<% if #status req = MailingList.INSTALLED then %> selected<% end %>>Installed</option>
<option value="2"<% if #status req = MailingList.REJECTED then %> selected<% end %>>Rejected</option>
</select></td> </tr>
-<tr> <td align="right"><b>List name</b>:</td> <td><input name="dom" value="<% #data req %>"></td> </tr>
-<tr> <td align="right" valign="top"><b>Message</b>:</td> <td><textarea name="msg" rows="10" cols="80" wrap="soft"><% Web.html (#msg req) %></textarea></td> </tr>
+<tr> <td>List name:</td> <td><input name="dom" value="<% #data req %>"></td> </tr>
+<tr> <td>Message:</td> <td><textarea name="msg" rows="10" cols="80" wrap="soft"><% Web.html (#msg req) %></textarea></td> </tr>
<tr> <td><input type="submit" value="Save"></td> </tr>
</table>
</form>
MailingList.modify {req with data = $"dom", msg = $"msg", status = newStatus};
if oldStatus <> newStatus then
if not (MailingList.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then
- %><h3><b>Error sending e-mail notification</b></h3><%
+ %><h3>Error sending e-mail notification</h3><%
end
end
- %><h3><b>Request modified</b></h3>
+ %><h3>Request modified</h3>
Back to: <a href="list?cmd=open">open requests</a>, <a href="list?cmd=list">all requests</a>
<% elseif $"del" <> "" then
val id = Web.stoi ($"del");
val req = MailingList.lookup id;
val user = Init.lookupUser (#usr req)
- %><h3><b>Are you sure you want to delete request by <% #name user %> for <tt><% #data req %></tt>?</b></h3>
+ %><h3>Are you sure you want to delete request by <% #name user %> for <tt><% #data req %></tt>?</h3>
<a href="list?del2=<% id %>">Yes, I'm sure!</a>
<% elseif $"del2" <> "" then
Group.requireGroupName "lists";
val id = Web.stoi ($"del2");
MailingList.delete id
- %><h3><b>Request deleted</b><h3>
+ %><h3>Request deleted</b><h3>
Back to: <a href="list?cmd=open">open requests</a>, <a href="list?cmd=list">all requests</a>
<% else %>
-<h3><b>Request new mailing list</b></h3>
+<h3>Request new mailing list</h3>
<p>Enter here the e-mail address you would like for your list. Please keep in mind that the part of your list address before the "@" must be unique across all mailing lists we run. We may reject applications with overly general names here, especially names of current users or UNIX usernames that are likely to be chosen by future members. The "Reason" field is optional.</p>
<p>If you want to use the Mailman web interface on your new list, and you want this to appear on a different web virtual host than hcoop.net, you should create a file <tt>.mailman</tt> in the domtool directory for this domain, before submitting a request. In that file, put the hostname of the vhost you want to use, and be sure to include a <tt>Mailman</tt> directive in that vhost's configuration.</p>
<form action="list" method="post">
-<table>
-<tr> <td align="right" valign="top"><b>List name</b>:</td> <td><input name="req"></td> </tr>
-<tr> <td align="right" valign="top"><b>Reason</b>:</td> <td><textarea name="msg" rows="5" cols="80" wrap="soft"></textarea></td> </tr>
+<table class="blanks">
+<tr> <td>List name:</td> <td><input name="req"></td> </tr>
+<tr> <td>Reason:</td> <td><textarea name="msg" rows="5" cols="80" wrap="soft"></textarea></td> </tr>
<tr> <td><input type="submit" value="Request"></td> </tr>
</table>
</form>
val name = $"name";
if Location.alreadyExists (parent, name) then
- %><h3><b>That location already exists!</b></h3><%
+ %><h3>That location already exists!</h3><%
else
val id = Location.addLocation (parent, $"name")
- %><h3><b>Location added</b></h3>
+ %><h3>Location added</h3>
<% end
elseif $"mod" <> "" then
val id = Web.stoi ($"mod");
val loc = Location.lookupLocation id %>
-<h3><b>Modify a location</b></h3>
+<h3>Modify a location</h3>
<form action="location" method="post">
<input type="hidden" name="save" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Parent</b>:</td> <td><select name="parent">
+<table class="blanks">
+<tr> <td>Parent:</td> <td><select name="parent">
<option value=""<% if #parent loc = NONE then %> selected<% end %>><None></option>
<% ref indent = 0;
foreach item in Location.locationTree (NONE, NONE) do
<% end
end %>
</select></td> </tr>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name" value="<% Web.html (#name loc) %>"></td> </tr>
+<tr> <td>Name:</td> <td><input name="name" value="<% Web.html (#name loc) %>"></td> </tr>
<tr> <td><input type="submit" value="Save"></td> </tr>
</table>
</form>
val loc = Location.lookupLocation id;
Location.modLocation {loc with parent = (case $"parent" of "" => NONE | parent => SOME (Web.stoi parent)),
name = $"name"};
- %><h3><b>Location saved</b></h3>
+ %><h3>Location saved</h3>
<% elseif $"del" <> "" then
Group.requireGroupName "location";
showNormal := false;
val id = Web.stoi ($"del");
val loc = Location.lookupLocation id %>
- <h3><b>Are you sure you want to delete "<% Web.html (#name loc) %>"?</b></h3>
+ <h3>Are you sure you want to delete "<% Web.html (#name loc) %>"?</h3>
<a href="location?del2=<% id %>">Yes, delete "<% Web.html (#name loc) %>"!</a>
<% elseif $"del2" <> "" then
val id = Web.stoi ($"del2");
val loc = Location.lookupLocation id;
Location.deleteLocation id %>
- <h3><b>Deleted location "<% Web.html (#name loc) %>"</b></h3>
+ <h3>Deleted location "<% Web.html (#name loc) %>"</h3>
<% elseif $"addLoc" <> "" then
Location.addToLocation {loc = Web.stoi ($"addLoc"), usr = Init.getUserId ()}
- %><h3><b>Added</b></h3>
+ %><h3>Added</h3>
<% elseif $"remLoc" <> "" then
Location.removeFromLocation {loc = Web.stoi ($"remLoc"), usr = Init.getUserId ()}
- %><h3><b>Removed</b></h3>
+ %><h3>Removed</h3>
<% elseif $"id" <> "" then
showNormal := false;
%><b>Parent</b>: <a href="location?id=<% par %>"><% Web.html (#name ploc) %></a><%
end %>
-<h3><b>Residents:</b></h3>
+<h3>Residents:</h3>
<% ref first = true;
foreach user in Location.residents id do
if first then
%><a href="user?id=<% #id user %>"><% #name user %></a><%
end %>
-<h3><b>Regions:</b></h3>
+<h3>Regions:</h3>
<% foreach loc in Location.subLocations (SOME id) do %>
<a href="location?id=<% #id loc %>"><% Web.html (#name loc) %></a><br>
<% end;
end %>
</ul>
-<h3><b>Add a new location</b></h3>
+<h3>Add a new location</h3>
<form action="location" method="post">
<input type="hidden" name="cmd" value="add">
-<table>
-<tr> <td align="right"><b>Parent</b>:</td> <td><select name="parent">
+<table class="blanks">
+<tr> <td>Parent:</td> <td><select name="parent">
<option value=""><None></option>
<% ref indent = 0;
foreach item in Location.locationTree (NONE, NONE) do
<% end
end %>
</select></td> </tr>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name"></td> </tr>
+<tr> <td>Name:</td> <td><input name="name"></td> </tr>
<tr> <td><input type="submit" value="Add"></td> </tr>
</table>
</form>
<% val withUser = Location.locationTreeWithUser (NONE, NONE, Init.getUserId ()) %>
-<h3><b>Add yourself to a location</b></h3>
+<h3>Add yourself to a location</h3>
Adding yourself to a location automatically adds you to all more general loations.
</select> <input type="submit" value="Add">
</form>
-<h3><b>Remove yourself from a location</b></h3>
+<h3>Remove yourself from a location</h3>
<form action="location" method="post">
<select name="remLoc">
val admin = Group.inGroupName "money";
showNormal := false %>
-<h3><b>Transactions</b></h3>
+<h3>Transactions</h3>
<table>
<tr> <td><b>Date</b></td> <td><b>Description</b></td> <td><b>Amount</b></td> <td><b>Last modified</b></td> <td><b>Participants</b></td> </tr>
<% elseif $"cmd" = "bals" then
showNormal := false %>
-<h3><b>Balances</b></h3>
+<h3>Balances</h3>
<table>
<% foreach bal in Balance.listOwnedBalances () do %>
Group.requireGroupName "money";
showNormal := false %>
-<h3><b>New hosting bill</b></h3>
+<h3>New hosting bill</h3>
<form action="money" method="post">
<input type="hidden" name="cmd" value="hosting2">
-<table>
-<tr> <td align="right"><b>Description</b>:</td> <td><input name="descr"></td> </tr>
-<tr> <td align="right"><b>Date</b>:</td> <td><input name="d"></td> </tr>
-<tr> <td align="right"><b>Amount</b>:</td> <td><input name="amount"></td> </tr>
-<tr> <td align="right"><b>Free bandwidth cutoff (MB)</b>:</td> <td><input name="cutoff" value="200"></td> </tr>
-<tr> <td align="right"><b>Cost/GB</b>:</td> <td><input name="cost" value="4"></td> </tr>
-<tr> <td align="right" valign="top"><b>Member usage</b>:</td> <td><textarea wrap="soft" name="usage" rows="24" cols="80"></textarea></td> </tr>
+<table class="blanks">
+<tr> <td>Description:</td> <td><input name="descr"></td> </tr>
+<tr> <td>Date:</td> <td><input name="d"></td> </tr>
+<tr> <td>Amount:</td> <td><input name="amount"></td> </tr>
+<tr> <td>Free bandwidth cutoff (MB):</td> <td><input name="cutoff" value="200"></td> </tr>
+<tr> <td>Cost/GB:</td> <td><input name="cost" value="4"></td> </tr>
+<tr> <td>Member usage:</td> <td><textarea wrap="soft" name="usage" rows="24" cols="80"></textarea></td> </tr>
<tr> <td><input type="submit" value="Add"></td> </tr>
</table>
val id = Money.addTransaction ($"descr", Util.neg (Web.stor ($"amount")), $"d");
Money.addHostingCharges {trn = id, cutoff = 1000 * Web.stoi ($"cutoff"), cost = Web.stor ($"cost"), usage = $"usage"};
- %><h3><b>Hosting transaction added.</b></h3>
+ %><h3>Hosting transaction added.</h3>
<% elseif $"modHosting" <> "" then
Group.requireGroupName "money";
val id = Web.stoi ($"modHosting");
val trn = Money.lookupTransaction id %>
-<h3><b>Modify hosting bill</b></h3>
+<h3>Modify hosting bill</h3>
<form action="money" method="post">
<input type="hidden" name="saveHosting" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Description</b>:</td> <td><input name="descr" value="<% Web.html (#descr trn) %>"></td> </tr>
-<tr> <td align="right"><b>Date</b>:</td> <td><input name="d" value="<% Web.html (#d trn) %>"></td> </tr>
-<tr> <td align="right"><b>Amount</b>:</td> <td><input name="amount" value="<% Util.neg (#amount trn) %>"></td> </tr>
-<tr> <td align="right"><b>Free bandwidth cutoff (MB)</b>:</td> <td><input name="cutoff" value="200"></td> </tr>
-<tr> <td align="right"><b>Cost/GB</b>:</td> <td><input name="cost" value="4"></td> </tr>
-<tr> <td align="right" valign="top"><b>Member usage</b>:</td> <td><textarea wrap="soft" name="usage" rows="24" cols="80"><%
+<table class="blanks">
+<tr> <td>Description:</td> <td><input name="descr" value="<% Web.html (#descr trn) %>"></td> </tr>
+<tr> <td>Date:</td> <td><input name="d" value="<% Web.html (#d trn) %>"></td> </tr>
+<tr> <td>Amount:</td> <td><input name="amount" value="<% Util.neg (#amount trn) %>"></td> </tr>
+<tr> <td>Free bandwidth cutoff (MB):</td> <td><input name="cutoff" value="200"></td> </tr>
+<tr> <td>Cost/GB:</td> <td><input name="cost" value="4"></td> </tr>
+<tr> <td>Member usage:</td> <td><textarea wrap="soft" name="usage" rows="24" cols="80"><%
switch Money.lookupHostingUsage id of
SOME s => s
end %></textarea></td> </tr>
Money.modTransaction {trn with descr = $"descr", d = $"d", amount = Util.neg (Web.stor ($"amount"))};
Money.addHostingCharges {trn = id, cutoff = 1000 * Web.stoi ($"cutoff"), cost = Web.stor ($"cost"), usage = $"usage"};
- %><h3><b>Hosting transaction modified.</b></h3>
+ %><h3>Hosting transaction modified.</h3>
<% elseif $"cmd" = "evenForm" then
Group.requireGroupName "money";
showNormal := false %>
-<h3><b>New generic/even transaction</b></h3>
+<h3>New generic/even transaction</h3>
<form action="money" method="post">
<input type="hidden" name="cmd" value="even">
-<table>
-<tr> <td align="right"><b>Description</b>:</td> <td><input name="descr"></td> </tr>
-<tr> <td align="right"><b>Date</b>:</td> <td><input name="d"></td> </tr>
-<tr> <td align="right"><b>Amount</b>:</td> <td><input name="amount"></td> </tr>
-<tr> <td align="right" valign="top"><b>Members</b>:</td> <td><select name="usrs" size="5" multiple>
+<table class="blanks">
+<tr> <td>Description:</td> <td><input name="descr"></td> </tr>
+<tr> <td>Date:</td> <td><input name="d"></td> </tr>
+<tr> <td>Amount:</td> <td><input name="amount"></td> </tr>
+<tr> <td>Members:</td> <td><select name="usrs" size="5" multiple>
<% foreach usr in Init.listUsers () do %>
<option value="<% #id usr %>"><% #name usr %></option>
<% end %>
Group.requireGroupName "money";
showNormal := false %>
-<h3><b>New member payment</b></h3>
+<h3>New member payment</h3>
<form action="money" method="post">
<input type="hidden" name="cmd" value="pay2">
-<table>
-<tr> <td align="right"><b>Description</b>:</td> <td><input name="descr"></td> </tr>
-<tr> <td align="right"><b>Date</b>:</td> <td><input name="d"></td> </tr>
-<tr> <td align="right"><b>Amount</b>:</td> <td><input name="amount"></td> </tr>
-<tr> <td align="right" valign="top"><b>Member</b>:</td> <td><select name="usr">
+<table class="blanks">
+<tr> <td>Description:</td> <td><input name="descr"></td> </tr>
+<tr> <td>Date:</td> <td><input name="d"></td> </tr>
+<tr> <td>Amount:</td> <td><input name="amount"></td> </tr>
+<tr> <td>Member:</td> <td><select name="usr">
<% foreach usr in Init.listUsers () do %>
<option value="<% #id usr %>"><% #name usr %></option>
<% end %>
Money.addCharge {trn = id, usr = Web.stoi ($"usr"), amount = amount};
Money.applyCharges id;
- %><h3><b>Payment transaction added.</b></h3>
+ %><h3>Payment transaction added.</h3>
<% elseif $"modPay" <> "" then
Group.requireGroupName "money";
val id = Web.stoi ($"modPay");
val trn = Money.lookupTransaction id %>
-<h3><b>Modify member payment</b></h3>
+<h3>Modify member payment</h3>
<form action="money" method="post">
<input type="hidden" name="savePay" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Description</b>:</td> <td><input name="descr" value="<% Web.html (#descr trn) %>"></td> </tr>
-<tr> <td align="right"><b>Date</b>:</td> <td><input name="d" value="<% Web.html (#d trn) %>"></td> </tr>
-<tr> <td align="right"><b>Amount</b>:</td> <td><input name="amount" value="<% #amount trn %>"></td> </tr>
-<tr> <td align="right" valign="top"><b>Member</b>:</td> <td><select name="usr">
+<table class="blanks">
+<tr> <td>Description:</td> <td><input name="descr" value="<% Web.html (#descr trn) %>"></td> </tr>
+<tr> <td>Date:</td> <td><input name="d" value="<% Web.html (#d trn) %>"></td> </tr>
+<tr> <td>Amount:</td> <td><input name="amount" value="<% #amount trn %>"></td> </tr>
+<tr> <td>Member:</td> <td><select name="usr">
<% foreach (sel, usr) in Money.listUsers (#id trn) do %>
<option value="<% #id usr %>"<% if sel then %> selected<% end %>><% #name usr %></option>
<% end %>
Money.addCharge {trn = id, usr = Web.stoi ($"usr"), amount = amount};
Money.applyCharges id;
- %><h3><b>Member payment modified.</b></h3>
+ %><h3>Member payment modified.</h3>
<% elseif $"cmd" = "evenForm" then
Group.requireGroupName "money";
showNormal := false %>
-<h3><b>New generic/even transaction</b></h3>
+<h3>New generic/even transaction</h3>
<form action="money" method="post">
<input type="hidden" name="cmd" value="even">
-<table>
-<tr> <td align="right"><b>Description</b>:</td> <td><input name="descr"></td> </tr>
-<tr> <td align="right"><b>Date</b>:</td> <td><input name="d"></td> </tr>
-<tr> <td align="right"><b>Amount</b>:</td> <td><input name="amount"></td> </tr>
-<tr> <td align="right" valign="top"><b>Members</b>:</td> <td><select name="usrs" size="5" multiple>
+<table class="blanks">
+<tr> <td>Description:</td> <td><input name="descr"></td> </tr>
+<tr> <td>Date:</td> <td><input name="d"></td> </tr>
+<tr> <td>Amount:</td> <td><input name="amount"></td> </tr>
+<tr> <td>Members:</td> <td><select name="usrs" size="5" multiple>
<% foreach usr in Init.listUsers () do %>
<option value="<% #id usr %>"><% #name usr %></option>
<% end %>
val id = Money.addTransaction ($"descr", Web.stor ($"amount"), $"d");
Money.addEvenCharges (id, map Web.stoi (Web.getMultiParam "usrs"))
- %><h3><b>Even transaction added.</b></h3>
+ %><h3>Even transaction added.</h3>
<% elseif $"modEven" <> "" then
Group.requireGroupName "money";
showNormal := false;
val trn = Money.lookupTransaction (Web.stoi ($"modEven")) %>
-<h3><b>Modify even transaction</b></h3>
+<h3>Modify even transaction</h3>
<form action="money" method="post">
<input type="hidden" name="saveEven" value="<% $"modEven" %>">
-<table>
-<tr> <td align="right"><b>Description</b>:</td> <td><input name="descr" value="<% Web.html (#descr trn) %>"></td> </tr>
-<tr> <td align="right"><b>Date</b>:</td> <td><input name="d" value="<% Web.html (#d trn) %>"></td> </tr>
-<tr> <td align="right"><b>Amount</b>:</td> <td><input name="amount" value="<% #amount trn %>"></td> </tr>
-<tr> <td align="right" valign="top"><b>Members</b>:</td> <td><select name="usrs" size="5" multiple>
+<table class="blanks">
+<tr> <td>Description:</td> <td><input name="descr" value="<% Web.html (#descr trn) %>"></td> </tr>
+<tr> <td>Date:</td> <td><input name="d" value="<% Web.html (#d trn) %>"></td> </tr>
+<tr> <td>Amount:</td> <td><input name="amount" value="<% #amount trn %>"></td> </tr>
+<tr> <td>Members:</td> <td><select name="usrs" size="5" multiple>
<% foreach (sel, usr) in Money.listUsers (#id trn) do %>
<option value="<% #id usr %>"<% if sel then %> selected<% end %>><% #name usr %></option>
<% end %>
Money.modTransaction {trn with descr = $"descr", d = $"d", amount = Web.stor ($"amount")};
Money.addEvenCharges (id, map Web.stoi (Web.getMultiParam "usrs"))
- %><h3><b>Even transaction modified</b></h3>
+ %><h3>Even transaction modified</h3>
<% elseif $"del" <> "" then
Group.requireGroupName "money";
showNormal := false;
val trn = Money.lookupTransaction (Web.stoi ($"del")) %>
- <h3><b>Are you sure you want to delete transaction <a href="money?trn=<% #id trn %>"><% Web.html (#descr trn) %></a>?</b></h3>
+ <h3>Are you sure you want to delete transaction <a href="money?trn=<% #id trn %>"><% Web.html (#descr trn) %></a>?</h3>
<a href="money?del2=<% $"del" %>">Yes, delete <% Web.html (#descr trn) %>!</a>
<% elseif $"del2" <> "" then
val trn = Money.lookupTransaction id;
Money.clearCharges id;
Money.deleteTransaction id %>
- <h3><b><% Web.html (#descr trn) %> deleted!</b></h3>
+ <h3><% Web.html (#descr trn) %> deleted!</h3>
<% elseif $"cmd" = "equalize" then
Group.requireGroupName "money";
Money.equalizeBalances ();
- %><h3><b>Balances equalized</b></h3>
+ %><h3>Balances equalized</h3>
<% elseif $"trn" <> "" then
showNormal := false;
val id = Web.stoi ($"trn");
val trn = Money.lookupTransaction id %>
-<table>
-<tr> <td align="right"><b>TRN#</b>:</td> <td><% id %></td> </tr>
-<tr> <td align="right"><b>Description</b>:</td> <td><% Web.html (#descr trn) %></td> </tr>
-<tr> <td align="right"><b>Date</b>:</td> <td><% #d trn %></td> </tr>
-<tr> <td align="right"><b>Amount</b>:</td> <td>$<% #amount trn %></td> </tr>
-<tr> <td align="right" valign="top"><b>Distribution</b>:</td>
-
+<table class="blanks">
+<tr> <td>TRN#:</td> <td><% id %></td> </tr>
+<tr> <td>Description:</td> <td><% Web.html (#descr trn) %></td> </tr>
+<tr> <td>Date:</td> <td><% #d trn %></td> </tr>
+<tr> <td>Amount:</td> <td>$<% #amount trn %></td> </tr>
+<tr> <td>Distribution:</td>
+x
<% ref first = true;
foreach (name, cha) in Money.listChargesWithNames id do
if first then
<% if showNormal then %>
-<h3><b>Your balance:</b> $<% #amount (Balance.lookupBalance (#bal (Init.getUser ()))) %></h3>
+<h3>Your balance:</b> $<% #amount (Balance.lookupBalance (#bal (Init.getUser ()))) %></h3>
<a href="money?cmd=list">List all transactions</a><br>
<a href="money?cmd=bals">List all balances</a><br>
<br>
<a href="money?cmd=equalize">Equalize balances</a><br>
-<h3><b>Most recent transactions</b></h3>
+<h3>Most recent transactions</h3>
<table>
<tr> <td><b>Date</b></td> <td><b>Description</b></td> <td><b>Amount</b></td> <td><b>Participants</b></td> <td><b>Replace</b></td> <td><b>Delete</b></td> </tr>
<% else %>
-<h3><b>Your recent account activity</b></h3>
+<h3>Your recent account activity</h3>
<table>
<tr> <td><b>Date</b></td> <td><b>Description</b></td> <td><b>Amount</b></td> </tr>
if $"cmd" = "list" then
showNormal := false %>
-<h2><b>All polls</b></h2>
+<h2>All polls</h2>
<% foreach pol in Poll.listPolls () do %>
<li> <a href="poll?id=<% #id pol %>"><% Web.html (#title pol) %></a>
val id = Web.stoi ($"vote");
val poll = Poll.lookupPoll id %>
-<table>
-<tr> <td align="right"><b>Poll#</b>:</td> <td><% id %></td> </tr>
-<tr> <td align="right"><b>Title</b>:</td> <td><% Web.html (#title poll) %></td> </tr>
-<tr> <td align="right"><b>Start</b>:</td> <td><% Web.html (#starts poll) %></td> </tr>
-<tr> <td align="right"><b>End</b>:</td> <td><% Web.html (#ends poll) %></td> </tr>
-<tr> <td align="right"><b>Votes/person</b>:</td> <td><% #votes poll %></td> </tr>
-<tr> <td align="right" valign="top"><b>Description</b>:</td> <td><% Web.htmlNl (#descr poll) %></td> </tr>
+<table class="blanks">
+<tr> <td>Poll#:</td> <td><% id %></td> </tr>
+<tr> <td>Title:</td> <td><% Web.html (#title poll) %></td> </tr>
+<tr> <td>Start:</td> <td><% Web.html (#starts poll) %></td> </tr>
+<tr> <td>End:</td> <td><% Web.html (#ends poll) %></td> </tr>
+<tr> <td>Votes/person:</td> <td><% #votes poll %></td> </tr>
+<tr> <td>Description:</td> <td><% Web.htmlNl (#descr poll) %></td> </tr>
</table>
-<h3><b>Choices</b></h3>
+<h3>Choices</h3>
<form action="poll" method="post">
<input type="hidden" name="vote2" value="<% id %>">
| v => map Web.stoi v;
if length votes > #votes poll then
- %><h3><b>You can't vote for that many different choices!</b></h3><%
+ %><h3>You can't vote for that many different choices!</h3><%
elseif not (Poll.noDupes votes) then
- %><h3><b>You can't vote multiple times for the same choice!</b></h3><%
+ %><h3>You can't vote multiple times for the same choice!</h3><%
else
Poll.vote (Init.getUserId (), id, votes)
- %><h3><b>Thanks for voting!</b></h3>
+ %><h3>Thanks for voting!</h3>
<% end
elseif $"cmd" = "add" then
val ends = $"ends";
val votes = Web.stoi ($"votes");
if title = "" then
- %><h3><b>Your poll must have a title.</b></h3><%
+ %><h3>Your poll must have a title.</h3><%
elseif not pollAdmin and not (Poll.dateGeNow starts) then
- %><h3><b>That start date is in the past!</b></h3><%
+ %><h3>That start date is in the past!</h3><%
elseif not pollAdmin and not (Poll.dateLe (starts, ends)) then
- %><h3><b>The end date comes before the start date!</b></h3><%
+ %><h3>The end date comes before the start date!</h3><%
elseif votes <= 0 then
- %><h3><b>You must specify a positive number of votes per person.</b></h3><%
+ %><h3>You must specify a positive number of votes per person.</h3><%
else
val id = Poll.addPoll (Init.getUserId(), title, $"descr", starts, ends, votes);
editingPoll := SOME id;
- %><h3><b>Poll added!</b></h3><%
+ %><h3>Poll added!</h3><%
end
elseif $"mod" <> "" then
val poll = Poll.lookupPoll (Web.stoi ($"mod"));
Poll.requireCanModify poll %>
-<h3><b>Modify poll</b></h3>
+<h3>Modify poll</h3>
<form action="poll" method="post">
<input type="hidden" name="id" value="<% $"mod" %>">
-<table>
-<tr> <td align="right"><b>Title</b>:</td> <td><input name="title" value="<% Web.html (#title poll) %>"></td> </tr>
-<tr> <td align="right"><b>Start date</b>:</td> <td><input name="starts" value="<% Web.html (#starts poll) %>"></td> </tr>
-<tr> <td align="right"><b>End date</b>:</td> <td><input name="ends" value="<% Web.html (#ends poll) %>"></td> </tr>
-<tr> <td align="right"><b>Max votes/person</b>:</td> <td><input name="votes" value="<% #votes poll %>"></td> </tr>
-<tr> <td align="right" valign="top"><b>Description</b>:</td> <td><textarea name="descr" wrap="soft" rows="5" cols="80"><% Web.html (#descr poll) %></textarea></td> </tr>
+<table class="blanks">
+<tr> <td>Title:</td> <td><input name="title" value="<% Web.html (#title poll) %>"></td> </tr>
+<tr> <td>Start date:</td> <td><input name="starts" value="<% Web.html (#starts poll) %>"></td> </tr>
+<tr> <td>End date:</td> <td><input name="ends" value="<% Web.html (#ends poll) %>"></td> </tr>
+<tr> <td>Max votes/person:</td> <td><input name="votes" value="<% #votes poll %>"></td> </tr>
+<tr> <td>Description:</td> <td><textarea name="descr" wrap="soft" rows="5" cols="80"><% Web.html (#descr poll) %></textarea></td> </tr>
<tr> <td><input type="submit" name="cmd" value="Save"></td> </tr>
</table>
</form>
val ends = $"ends";
val votes = Web.stoi ($"votes");
if title = "" then
- %><h3><b>Your poll must have a title.</b></h3><%
+ %><h3>Your poll must have a title.</h3><%
elseif not pollAdmin and not (Poll.dateGeNow starts) then
- %><h3><b>That start date is in the past!</b></h3><%
+ %><h3>That start date is in the past!</h3><%
elseif not pollAdmin and not (Poll.dateLe (starts, ends)) then
- %><h3><b>The end date comes before the start date!</b></h3><%
+ %><h3>The end date comes before the start date!</h3><%
elseif votes <= 0 then
- %><h3><b>You must specify a positive number of votes per person.</b></h3><%
+ %><h3>You must specify a positive number of votes per person.</h3><%
else
Poll.modPoll {poll with title = title, descr = $"descr", starts = starts, ends = ends, votes = votes};
editingPoll := SOME (#id poll);
- %><h3><b>Poll record saved.</b></h3><%
+ %><h3>Poll record saved.</h3><%
end
elseif $"del" <> "" then
Group.requireGroupName "poll";
showNormal := false;
val poll = Poll.lookupPoll (Web.stoi ($"del")) %>
- <h3><b>Are you sure you want to delete poll <a href="poll?id=<% #id poll %>"><% Web.html (#title poll) %></a>?</b></h3>
+ <h3>Are you sure you want to delete poll <a href="poll?id=<% #id poll %>"><% Web.html (#title poll) %></a>?</h3>
<a href="poll?del2=<% $"del" %>">Yes, delete <% Web.html (#title poll) %>!</a>
<% elseif $"del2" <> "" then
Group.requireGroupName "poll";
val poll = Poll.lookupPoll (Web.stoi ($"del2"));
Poll.deletePoll (Web.stoi ($"del2")) %>
- <h3><b><% Web.html (#title poll) %> deleted!</b></h3>
+ <h3><% Web.html (#title poll) %> deleted!</h3>
<% elseif $"addChoice" <> "" then
val id = Web.stoi ($"addChoice");
editingPoll := SOME id;
val descr = $"descr";
if descr = "" then
- %><h3><b>Your poll choice must have a description.</b></h3><%
+ %><h3>Your poll choice must have a description.</h3><%
else
val id = Poll.addChoice (id, Web.stor ($"seq"), descr);
- %><h3><b>Choice added!</b></h3><%
+ %><h3>Choice added!</h3><%
end
elseif $"modChoice" <> "" then
<form action="poll" method="post">
<input type="hidden" name="saveChoice" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Text</b>:</td> <td><input name="descr" value="<% Web.html (#descr cho) %>"></td> </tr>
-<tr> <td align="right"><b>Sequence#</b>:</td> <td><input name="seq" value="<% #seq cho %>"></td> </tr>
+<table class="blanks">
+<tr> <td>Text:</td> <td><input name="descr" value="<% Web.html (#descr cho) %>"></td> </tr>
+<tr> <td>Sequence#:</td> <td><input name="seq" value="<% #seq cho %>"></td> </tr>
<tr> <td><input type="submit" value="Save"></td> </tr>
</table>
</form>
editingPoll := SOME (#id poll);
val descr = $"descr";
if descr = "" then
- %><h3><b>Your poll choice must have a description.</b></h3><%
+ %><h3>Your poll choice must have a description.</h3><%
else
Poll.modChoice {cho with seq = Web.stor ($"seq"), descr = descr};
- %><h3><b>Choice saved!</b></h3><%
+ %><h3>Choice saved!</h3><%
end
elseif $"delChoice" <> "" then
val poll = Poll.lookupPoll (#pol cho);
Poll.requireCanModify poll;
showNormal := false %>
- <h3><b>Are you sure you want to delete choice "<% Web.html (#descr cho) %>"</a>?</b></h3>
+ <h3>Are you sure you want to delete choice "<% Web.html (#descr cho) %>"</a>?</h3>
<a href="poll?delChoice2=<% $"delChoice" %>">Yes, delete "<% Web.html (#descr cho) %>"!</a>
<% elseif $"delChoice2" <> "" then
Poll.requireCanModify poll;
Poll.deleteChoice id;
editingPoll := SOME (#id poll) %>
- <h3><b>"<% Web.html (#descr cho) %>" deleted!</b></h3>
+ <h3>"<% Web.html (#descr cho) %>" deleted!</h3>
<% elseif $"report" <> "" then
showNormal := false;
val poll = Poll.lookupPoll id;
val canModify = Poll.canModify poll %>
-<h3><b>Vote Report</b></h3>
+<h3>Vote Report</h3>
<p>Voters:
<% ref first = true;
%><a href="user?id=<% #id user %>"><% #name user %></a><%
end %></p>
-<table>
-<tr> <td align="right"><b>Poll#</b>:</td> <td><% id %></td> </tr>
-<tr> <td align="right"><b>Title</b>:</td> <td><% Web.html (#title poll) %></td> </tr>
-<tr> <td align="right"><b>Start</b>:</td> <td><% Web.html (#starts poll) %></td> </tr>
-<tr> <td align="right"><b>End</b>:</td> <td><% Web.html (#ends poll) %></td> </tr>
-<tr> <td align="right"><b>Votes/person</b>:</td> <td><% #votes poll %></td> </tr>
-<tr> <td align="right" valign="top"><b>Description</b>:</td> <td><% Web.htmlNl (#descr poll) %></td> </tr>
+<table class="blanks">
+<tr> <td>Poll#</b>:</td> <td><% id %></td> </tr>
+<tr> <td>Title</b>:</td> <td><% Web.html (#title poll) %></td> </tr>
+<tr> <td>Start>:</td> <td><% Web.html (#starts poll) %></td> </tr>
+<tr> <td>End:</td> <td><% Web.html (#ends poll) %></td> </tr>
+<tr> <td>Votes/person:</td> <td><% #votes poll %></td> </tr>
+<tr> <td>Description:</td> <td><% Web.htmlNl (#descr poll) %></td> </tr>
</table>
<br><hr><br>
val poll = Poll.lookupPoll id;
val canModify = Poll.canModify poll %>
-<table>
+<table class="blanks">
<% if canModify then %><tr> <td></td> <td><a href="poll?mod=<% id %>">Edit poll data</a></td> </tr><% end %>
-<tr> <td align="right"><b>Poll#</b>:</td> <td><% id %></td> </tr>
-<tr> <td align="right"><b>Title</b>:</td> <td><% Web.html (#title poll) %></td> </tr>
-<tr> <td align="right"><b>Start</b>:</td> <td><% Web.html (#starts poll) %></td> </tr>
-<tr> <td align="right"><b>End</b>:</td> <td><% Web.html (#ends poll) %></td> </tr>
-<tr> <td align="right"><b>Votes/person</b>:</td> <td><% #votes poll %></td> </tr>
-<tr> <td align="right" valign="top"><b>Description</b>:</td> <td><% Web.htmlNl (#descr poll) %></td> </tr>
+<tr> <td>Poll#:</td> <td><% id %></td> </tr>
+<tr> <td>Title:</td> <td><% Web.html (#title poll) %></td> </tr>
+<tr> <td>Start:</td> <td><% Web.html (#starts poll) %></td> </tr>
+<tr> <td>End:</td> <td><% Web.html (#ends poll) %></td> </tr>
+<tr> <td>Votes/person:</td> <td><% #votes poll %></td> </tr>
+<tr> <td>Description:</td> <td><% Web.htmlNl (#descr poll) %></td> </tr>
</table>
-<h3><b>Choices<% if Poll.takingVotes poll then %><a href="poll?vote=<% id %>">(Vote!)</a><% end %></b></h3>
+<h3>Choices<% if Poll.takingVotes poll then %><a href="poll?vote=<% id %>">(Vote!)</a><% end %></h3>
<p><% Poll.countVoters (#id poll) %> people have voted.</p>
<% if canModify then %>
<br><hr><br>
-<h3><b>Add a new choice</b></h3>
+<h3>Add a new choice</h3>
<form action="poll" method="post">
<input type="hidden" name="addChoice" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Text</b>:</td> <td><input name="descr"></td> </tr>
-<tr> <td align="right"><b>Sequence#</b>:</td> <td><input name="seq" value="<% Poll.nextSeq id %>"></td> </tr>
+<table class="blanks">
+<tr> <td>Text:</td> <td><input name="descr"></td> </tr>
+<tr> <td>Sequence#:</td> <td><input name="seq" value="<% Poll.nextSeq id %>"></td> </tr>
<tr> <td><input type="submit" value="Add"></td> </tr>
</table>
</form>
<a href="poll?cmd=list">Show all polls</a><br>
-<h3><b>Create a poll</b></h3>
+<h3>Create a poll</h3>
<form action="poll" method="post">
<input type="hidden" name="cmd" value="add">
-<table>
-<tr> <td align="right"><b>Title</b>:</td> <td><input name="title"></td> </tr>
-<tr> <td align="right"><b>Start date</b>:</td> <td><input name="starts"></td> </tr>
-<tr> <td align="right"><b>End date</b>:</td> <td><input name="ends"></td> </tr>
-<tr> <td align="right"><b>Max votes/person</b>:</td> <td><input name="votes"></td> </tr>
-<tr> <td align="right" valign="top"><b>Description</b>:</td> <td><textarea name="descr" wrap="soft" rows="5" cols="80"></textarea></td> </tr>
+<table class="blanks">
+<tr> <td>Title:</td> <td><input name="title"></td> </tr>
+<tr> <td>Start date:</td> <td><input name="starts"></td> </tr>
+<tr> <td>End date:</td> <td><input name="ends"></td> </tr>
+<tr> <td>Max votes/person:</td> <td><input name="votes"></td> </tr>
+<tr> <td>Description:</td> <td><textarea name="descr" wrap="soft" rows="5" cols="80"></textarea></td> </tr>
<tr> <td><input type="submit" value="Create"></td> </tr>
</table>
</form>
-<% val you = Init.getUser();
-val bal = Balance.lookupBalance (#bal you);
-@header [] %>
-
-<% if Group.inGroupNum 0 then %>
-<b><h3>Admin</h3></b>
-<a href="apps?cmd=approved">Approved applicants waiting for accounts</a><br>
-<a href="users">Members</a><br>
-<a href="groups">Groups</a><br>
-<a href="balances">Balances</a><br>
-<a href="kind">Contact kinds</a><br>
-<a href="roll">Roll call!</a><br>
-<% end %>
-
-<b><h3>Your account</h3></b>
-
-<a href="pref">Preferences</a><br>
-<a href="money">Financial</a><br>
-<a href="sec">Security settings</a><br>
-<a href="contact">Contact information</a><br>
-<a href="location">Your geographic locations</a><br>
-<a href="link">Public URL directory</a><br>
-
-<b><h3>Support requests</h3></b>
-
-<a href="domain">Request control of a domain with domtool</a><br>
-<a href="apt">Request Debian apt packages</a><br>
-<a href="list">Request a Mailman mailing list</a><br>
-<a href="support">Other support request</a><br>
-
-<h3><b><a href="money">Your recent account activity</a></b></h3>
-
-<table>
-<tr> <td><b>Date</b></td> <td><b>Description</b></td> <td><b>Amount</b></td> </tr>
-<% foreach (amount, trn) in Money.listUserTransactionsLimit (Init.getUserId (), 5) do %>
-<tr> <td><% #d trn %></td> <td><a href="money?trn=<% #id trn %>"><% Web.html (#descr trn) %></a></td> <td><% amount %>/<% #amount trn %></td> </tr>
-<% end %>
-</table>
-<b>Balance: $<% #amount bal %></b>
-
-<h3><b><a href="poll">Current polls</a></b></h3>
-
-<% foreach pol in Poll.listCurrentPolls () do %>
-<li> <a href="poll?id=<% #id pol %>"><% Web.html (#title pol) %></a>
-<% if Poll.takingVotes pol then %><a href="poll?vote=<% #id pol %>">[VOTE]</a><% end %>
-(<% Web.html (#starts pol) %> to <% Web.html (#ends pol) %>)</li>
-<% end %>
-
-<h3><b><a href="support">Open support issues</a></b></h3>
-
-<% foreach (name, issue) in Support.listOpenIssues (#id you) do %>
-<a href="user?id=<% #usr issue %>"><% name %></a>: <a href="issue?cat=<% #cat issue %>&id=<% #id issue %>"><% Web.html (#title issue) %></a>
-<% switch #status issue of
- Support.NEW => %>(New)<%
- | Support.PENDING => %>(Pending)<%
- | Support.CLOSED => %>(Closed)<%
-end %>
-<br>
-<% end %>
-
-<h3><b>Statistics</b></h3>
-
-<a href="webbw">Apache bandwidth</a><br>
-<a href="quotas">Disk usage</a><br>
-
-<h3><b>Public pages</b></h3>
-
-<a href="http://hcoop.net/dyn/members.html">Member directory</a><br>
-<a href="http://hcoop.net/dyn/locs.html">Member location summary</a><br>
-<a href="http://hcoop.net/dyn/sites.html">URL directory</a><br>
-
-<h3><b>Miscellaneous</b></h3>
-
-<a href="apps">Review pending membership applications</a><br>
-<a href="dir">Contact information directory</a><br>
-<a href="poll">Polls</a><br>
-
-<h3><b>Other services</b></h3>
-
-<a href="/webalizer/">Webalizer</a><br>
-<a href="/mrtg/">MRTG statistics</a><br>
-<a href="http://nms.interserver.net/cac/nms.php?server_name=bmV3Lmhjb29wLm5ldA==">InterServer bandwidth statistics</a><br>
-<a href="/usermin/">Usermin</a><br>
-<a href="/squirrel/">SquirrelMail</a><br>
-
-<% @footer [] %>
\ No newline at end of file
+<% val you = Init.getUser();
+val bal = Balance.lookupBalance (#bal you);
+@header [] %>
+
+<h3><a href="money">Your recent account activity</a></h3>
+
+<table>
+<tr> <td><b>Date</b></td> <td><b>Description</b></td> <td><b>Amount</b></td> </tr>
+<% foreach (amount, trn) in Money.listUserTransactionsLimit (Init.getUserId (), 5) do %>
+<tr> <td><% #d trn %></td> <td><a href="money?trn=<% #id trn %>"><% Web.html (#descr trn) %></a></td> <td><% amount %>/<% #amount trn %></td> </tr>
+<% end %>
+</table>
+<b>Balance: $<% #amount bal %></b>
+
+<% val polls = Poll.listCurrentPolls ();
+switch polls of
+ _::_ => %>
+<h3><a href="poll">Current polls</a></h3>
+
+<% foreach pol in polls do %>
+<li> <a href="poll?id=<% #id pol %>"><% Web.html (#title pol) %></a>
+<% if Poll.takingVotes pol then %><a href="poll?vote=<% #id pol %>">[VOTE]</a><% end %>
+(<% Web.html (#starts pol) %> to <% Web.html (#ends pol) %>)</li>
+<% end
+end %>
+
+<% val issues = Support.listOpenIssues (#id you);
+switch issues of
+ _::_ => %>
+<h3><a href="support">Open support issues</a></h3>
+
+<% foreach (name, issue) in issues do %>
+<a href="user?id=<% #usr issue %>"><% name %></a>: <a href="issue?cat=<% #cat issue %>&id=<% #id issue %>"><% Web.html (#title issue) %></a>
+<% switch #status issue of
+ Support.NEW => %>(New)<%
+ | Support.PENDING => %>(Pending)<%
+ | Support.CLOSED => %>(Closed)<%
+end %>
+<br>
+<% end
+end %>
+
+<% @footer [] %>
\ No newline at end of file
Pref.subscribe ("hcoop-discuss", youremail)
else
Pref.unsubscribe ("hcoop-discuss", youremail)) then
- %><h3><b>Error setting <tt>hcoop-discuss</tt> status</b></h3><%
+ %><h3>Error setting <tt>hcoop-discuss</tt> status</h3><%
end;
if not (iff $"misc" = "on" then
Pref.subscribe ("hcoop-misc", youremail)
else
Pref.unsubscribe ("hcoop-misc", youremail)) then
- %><h3><b>Error setting <tt>hcoop-misc</tt> status</b></h3><%
+ %><h3>Error setting <tt>hcoop-misc</tt> status</h3><%
end;
- %><h3><b>Preferences updated</b></h3><%
+ %><h3>Preferences updated</h3><%
end %>
<form action="pref" method="post">
<input type="hidden" name="cmd" value="mod">
-<table>
-<tr> <td align="right"><input type="checkbox" name="dir"<% if Pref.hasDirectory you then %> checked<% end %>></td> <td>Include me in the public member directory.</td> </tr>
-<tr> <td align="right"><input type="checkbox" name="discuss"<% if Pref.subscribed ("hcoop-discuss", youremail) then %> checked<% end %>></td> <td>Include me on the <tt>hcoop-discuss</tt> mailing list. <i>(On-topic discussion and sporadically high volume)</i></td> </tr>
-<tr> <td align="right"><input type="checkbox" name="misc"<% if Pref.subscribed ("hcoop-misc", youremail) then %> checked<% end %>></td> <td>Include me on the <tt>hcoop-misc</tt> mailing list. <i>(Off-topic)</i></td> </tr>
+<table class="blanks">
+<tr> <td><input type="checkbox" name="dir"<% if Pref.hasDirectory you then %> checked<% end %>></td> <td>Include me in the public member directory.</td> </tr>
+<tr> <td><input type="checkbox" name="discuss"<% if Pref.subscribed ("hcoop-discuss", youremail) then %> checked<% end %>></td> <td>Include me on the <tt>hcoop-discuss</tt> mailing list. <i>(On-topic discussion and sporadically high volume)</i></td> </tr>
+<tr> <td><input type="checkbox" name="misc"<% if Pref.subscribed ("hcoop-misc", youremail) then %> checked<% end %>></td> <td>Include me on the <tt>hcoop-misc</tt> mailing list. <i>(Off-topic)</i></td> </tr>
<tr> <td><input type="submit" value="Save"></td> </tr>
</table>
if code = #code rc then
Roll.respond (rol, you);
- %><h3><b>Your response has been saved. Thank you!</b></h3><%
+ %><h3>Your response has been saved. Thank you!</h3><%
else
- %><h3><b>Incorrect code!</b></h3><%
+ %><h3>Incorrect code!</h3><%
end
elseif $"cmd" = "add" then
Group.requireGroupNum 0;
val title = $"title";
val msg = $"msg";
if title = "" then
- %><h3><b>Your roll call must have a title.</b></h3><%
+ %><h3>Your roll call must have a title.</h3><%
else
val id = Roll.addRollCall (title, msg);
viewingCall := SOME id;
- %><h3><b>Roll call added!</b></h3><%
+ %><h3>Roll call added!</h3><%
end
elseif $"mod" <> "" then
Group.requireGroupNum 0;
showNormal := false;
val rc = Roll.lookupRollCall (Web.stoi ($"mod")) %>
-<h3><b>Modify roll call</b></h3>
+<h3>Modify roll call</h3>
<form action="roll" method="post">
<input type="hidden" name="id" value="<% $"mod" %>">
-<table>
-<tr> <td align="right"><b>Title</b>:</td> <td><input name="title" value="<% Web.html (#title rc) %>"></td> </tr>
-<tr> <td align="right" valign="top"><b>Message</b>:</td> <td><textarea name="msg" wrap="soft" rows="5" cols="80"><% Web.html (#msg rc) %></textarea></td> </tr>
+<table class="blanks">
+<tr> <td>Title:</td> <td><input name="title" value="<% Web.html (#title rc) %>"></td> </tr>
+<tr> <td>Message:</td> <td><textarea name="msg" wrap="soft" rows="5" cols="80"><% Web.html (#msg rc) %></textarea></td> </tr>
<tr> <td><input type="submit" name="cmd" value="Save"></td> </tr>
</table>
</form>
val title = $"title";
val msg = $"msg";
if title = "" then
- %><h3><b>Your rol call must have a title.</b></h3><%
+ %><h3>Your rol call must have a title.</h3><%
else
Roll.modRollCall {rc with title = title, msg = msg};
viewingCall := SOME (#id rc);
- %><h3><b>Roll call saved.</b></h3><%
+ %><h3>Roll call saved.</h3><%
end
elseif $"del" <> "" then
Group.requireGroupNum 0;
showNormal := false;
val rc = Roll.lookupRollCall (Web.stoi ($"del")) %>
- <h3><b>Are you sure you want to delete roll call "<a href="roll?view=<% #id rc %>"><% Web.html (#title rc) %></a>"?</b></h3>
+ <h3>Are you sure you want to delete roll call "<a href="roll?view=<% #id rc %>"><% Web.html (#title rc) %></a>"?</h3>
<a href="roll?del2=<% $"del" %>">Yes, delete <% Web.html (#title rc) %>!</a>
<% elseif $"del2" <> "" then
Group.requireGroupNum 0;
val rc = Roll.lookupRollCall (Web.stoi ($"del2"));
Roll.deleteRollCall (Web.stoi ($"del2")) %>
- <h3><b><% Web.html (#title rc) %> deleted!</b></h3>
+ <h3><% Web.html (#title rc) %> deleted!</h3>
<% elseif $"cmd" = "mailall" then
Group.requireGroupNum 0;
switch viewingCall of
NONE => %>
-<h3><b>Existing roll calls</b></h3>
+<h3>Existing roll calls</h3>
<% foreach rc in Roll.listRollCalls () do %>
<li> <a href="roll?view=<% #id rc %>"><% Web.html (#title rc) %></a> (<% #started rc %>)</li>
<% end %>
-<h3><b>New roll call</b></h3>
+<h3>New roll call</h3>
<form action="roll" method="post">
<input type="hidden" name="cmd" value="add">
-<table>
-<tr> <td align="right"><b>Title</b>:</td> <td><input name="title"></td> </tr>
-<tr> <td align="right" valign="top"><b>Message</b>:</td> <td><textarea name="msg" wrap="soft" rows="5" cols="80"></textarea></td> </tr>
+<table class="blanks">
+<tr> <td>Title:</td> <td><input name="title"></td> </tr>
+<tr> <td>Message:</td> <td><textarea name="msg" wrap="soft" rows="5" cols="80"></textarea></td> </tr>
<tr> <td><input type="submit" value="Create"></td> </tr>
</table>
</form>
<% | SOME id =>
val rc = Roll.lookupRollCall id %>
- <h3><b>Roll call "<% Web.html (#title rc) %>"</b></h3>
- <table border="0">
- <tr> <td align="right"><b>Started:</b></td> <td><% #started rc %></td> </tr>
- <tr> <td align="right" valign="top"><b>Message:</b></td> <td><% Web.htmlNl (#msg rc) %></td> </tr>
+ <h3>Roll call "<% Web.html (#title rc) %>"</h3>
+ <table border="0" class="blanks">
+ <tr> <td>Started:</td> <td><% #started rc %></td> </tr>
+ <tr> <td>Message:</td> <td><% Web.htmlNl (#msg rc) %></td> </tr>
</table>
[ <a href="roll?mod=<% id %>">Modify</a> | <a href="roll?del=<% id %>">Delete</a> ]<br>
<% val (didnt, did) = Roll.listEntries id %>
-<h2><b>Didn't respond yet:</b></h2>
+<h2>Didn't respond yet:</h2>
<% foreach (usr, ent) in didnt do %>
<li> <a href="user?id=<% #id usr %>"><% Web.html (#name usr) %></a></li>
<% end %>
-<h2><b>Responded:</b></h2>
+<h2>Responded:</h2>
<% foreach (usr, ent) in did do %>
<li> <a href="user?id=<% #id usr %>"><% Web.html (#name usr) %></a> (<%
switch #responded ent of SOME st => st end %>)</li>
elseif $"cmd" = "socks2" then
val id = Sec.Req.add (you, String.concat [uname, ": change socket permissions to ", $"socks"], $"msg");
if not (Sec.Req.notifyNew id) then
- %><h3><b>Error sending e-mail notification</b></h3><%
+ %><h3>Error sending e-mail notification</h3><%
end
- %><h3><b>Request added</b></h3><%
+ %><h3>Request added</h3><%
elseif $"cmd" = "tpe" then
showNormal := false;
elseif $"cmd" = "tpe2" then
val id = Sec.Req.add (you, String.concat [uname, ": turn tpe ", $"tpe"], $"msg");
if not (Sec.Req.notifyNew id) then
- %><h3><b>Error sending e-mail notification</b></h3><%
+ %><h3>Error sending e-mail notification</h3><%
end
- %><h3><b>Request added</b></h3><%
+ %><h3>Request added</h3><%
elseif $"cmd" = "cron" then
showNormal := false;
val cron = iff $"cron" = "enabled" then "enable" else "disable";
val id = Sec.Req.add (you, String.concat [uname, ": ", cron, " cron access"], $"msg");
if not (Sec.Req.notifyNew id) then
- %><h3><b>Error sending e-mail notification</b></h3><%
+ %><h3>Error sending e-mail notification</h3><%
end
- %><h3><b>Request added</b></h3><%
+ %><h3>Request added</h3><%
elseif $"cmd" = "ftp" then
showNormal := false;
val ftp = iff $"ftp" = "enabled" then "enable" else "disable";
val id = Sec.Req.add (you, String.concat [uname, ": ", ftp, " FTP access"], $"msg");
if not (Sec.Req.notifyNew id) then
- %><h3><b>Error sending e-mail notification</b></h3><%
+ %><h3>Error sending e-mail notification</h3><%
end
- %><h3><b>Request added</b></h3><%
+ %><h3>Request added</h3><%
elseif $"cmd" = "rule" then
showNormal := false;
elseif $"cmd" = "rule2" then
val id = Sec.Req.add (you, String.concat ["Add firewall rule \"", uname, " ", $"rule", "\""], $"msg");
if not (Sec.Req.notifyNew id) then
- %><h3><b>Error sending e-mail notification</b></h3><%
+ %><h3>Error sending e-mail notification</h3><%
end
- %><h3><b>Request added</b></h3><%
+ %><h3>Request added</h3><%
elseif $"modRule" <> "" then
showNormal := false;
elseif $"modRule2" <> "" then
val id = Sec.Req.add (you, String.concat ["Change firewall rule \"", uname, " ", $"modRule2", "\" to \"", uname, " ", $"rule", "\""], $"msg");
if not (Sec.Req.notifyNew id) then
- %><h3><b>Error sending e-mail notification</b></h3><%
+ %><h3>Error sending e-mail notification</h3><%
end
- %><h3><b>Request added</b></h3><%
+ %><h3>Request added</h3><%
elseif $"delRule" <> "" then
showNormal := false;
elseif $"delRule2" <> "" then
val id = Sec.Req.add (you, String.concat ["Delete firewall rule \"", uname, " ", $"delRule2", "\""], $"msg");
if not (Sec.Req.notifyNew id) then
- %><h3><b>Error sending e-mail notification</b></h3><%
+ %><h3>Error sending e-mail notification</h3><%
end
- %><h3><b>Request added</b></h3><%
+ %><h3>Request added</h3><%
elseif $"cmd" = "open" then
showNormal := false;
Group.requireGroupName "server";
- %><h3><b>Open requests</b></h3>
+ %><h3>Open requests</h3>
<a href="sec?cmd=list">List all requests</a><%
foreach (name, req) in Sec.Req.listOpen () do %>
<br><hr><br>
-<table>
-<tr> <td align="right"><b>By</b>:</td> <td><a href="user?id=<% #usr req %>"><% name %></a></td> </tr>
-<tr> <td align="right"><b>Time</b>:</td> <td><% #stamp req %></td> </tr>
-<tr> <td align="right"><b>Request</b>:</td> <td><% #data req %></td> </tr>
-<tr> <td align="right" valign="top"><b>Msg</b>:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
+<table class="blanks">
+<tr> <td>By:</td> <td><a href="user?id=<% #usr req %>"><% name %></a></td> </tr>
+<tr> <td>Time:</td> <td><% #stamp req %></td> </tr>
+<tr> <td>Request:</td> <td><% #data req %></td> </tr>
+<tr> <td>Msg:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
</table>
<br>
elseif $"cmd" = "list" then
showNormal := false;
Group.requireGroupName "server"
- %><h3><b>All requests</b></h3><%
+ %><h3>All requests</h3><%
foreach (name, req) in Sec.Req.list () do %>
<br><hr><br>
-<table>
-<tr> <td align="right"><b>By</b>:</td> <td colspan="2"><a href="user?id=<% #usr req %>"><% name %></a></td> </tr>
-<tr> <td align="right"><b>Time</b>:</td> <td colspan="2"><% #stamp req %></td> </tr>
-<tr> <td align="right"><b>Request</b>:</td> <td><% #data req %></td> </tr>
-<tr> <td align="right" valign="top"><b>Reason</b>:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
+<table class="blanks">
+<tr> <td>By:</td> <td colspan="2"><a href="user?id=<% #usr req %>"><% name %></a></td> </tr>
+<tr> <td>Time:</td> <td colspan="2"><% #stamp req %></td> </tr>
+<tr> <td>Request:</td> <td><% #data req %></td> </tr>
+<tr> <td>Reason:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
</table>
<br>
val id = Web.stoi ($"mod");
val req = Sec.Req.lookup id;
val user = Init.lookupUser (#usr req) %>
-<h3><b>Handle request</b></h3>
+<h3>Handle request</h3>
<form action="sec" method="post">
<input type="hidden" name="save" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Requestor</b>:</td> <td><a href="user?id=<% #usr req %>"><% #name user %></a></td> </tr>
-<tr> <td align="right"><b>Time</b>:</td> <td><% #stamp req %></td> </tr>
-<tr> <td align="right"><b>Status</b>:</td> <td><select name="status">
+<table class="blanks">
+<tr> <td>Requestor:</td> <td><a href="user?id=<% #usr req %>"><% #name user %></a></td> </tr>
+<tr> <td>Time:</td> <td><% #stamp req %></td> </tr>
+<tr> <td>Status:</td> <td><select name="status">
<option value="0"<% if #status req = Sec.Req.NEW then %> selected<% end %>>New</option>
<option value="1"<% if #status req = Sec.Req.INSTALLED then %> selected<% end %>>Installed</option>
<option value="2"<% if #status req = Sec.Req.REJECTED then %> selected<% end %>>Rejected</option>
</select></td> </tr>
-<tr> <td align="right"><b>Request</b>:</td> <td><input name="req" value="<% #data req %>"></td> </tr>
-<tr> <td align="right" valign="top"><b>Message</b>:</td> <td><textarea name="msg" rows="10" cols="80" wrap="soft"><% Web.html (#msg req) %></textarea></td> </tr>
+<tr> <td>Request:</td> <td><input name="req" value="<% #data req %>"></td> </tr>
+<tr> <td>Message:</td> <td><textarea name="msg" rows="10" cols="80" wrap="soft"><% Web.html (#msg req) %></textarea></td> </tr>
<tr> <td><input type="submit" value="Save"></td> </tr>
</table>
</form>
Sec.Req.modify {req with data = $"req", msg = $"msg", status = newStatus};
if oldStatus <> newStatus then
if not (Sec.Req.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then
- %><h3><b>Error sending e-mail notification</b></h3><%
+ %><h3>Error sending e-mail notification</h3><%
end
end
- %><h3><b>Request modified</b></h3>
+ %><h3>Request modified</h3>
Back to: <a href="sec?cmd=open">open requests</a>, <a href="sec?cmd=list">all requests</a>
<% elseif $"del" <> "" then
val id = Web.stoi ($"del");
val req = Sec.Req.lookup id;
val user = Init.lookupUser (#usr req)
- %><h3><b>Are you sure you want to delete request by <% #name user %> for "<% #data req %>"?</b></h3>
+ %><h3>Are you sure you want to delete request by <% #name user %> for "<% #data req %>"?</h3>
<a href="sec?del2=<% id %>">Yes, I'm sure!</a>
<% elseif $"del2" <> "" then
Group.requireGroupName "server";
val id = Web.stoi ($"del2");
Sec.Req.delete id
- %><h3><b>Request deleted</b><h3>
+ %><h3>Request deleted</b><h3>
Back to: <a href="sec?cmd=open">open requests</a>, <a href="sec?cmd=list">all requests</a>
<% end;
<option value="<% name %>"<% if uname = name then %> selected<% end %>><% name %></option>
<% end %></select> <input type="submit" value="Switch"> </form>
-<h3><b>Request socket permissions change</b></h3>
+<h3>Request socket permissions change</h3>
<form action="sec" method="post">
<input type="hidden" name="uname" value="<% uname %>">
<input type="hidden" name="cmd" value="socks">
-<table>
-<tr> <td align="right"><b>New permissions:</b></td> <td><select name="socks">
+<table class="blanks">
+<tr> <td>New permissions:</td> <td><select name="socks">
<option value="none"<% if socks = Sec.NADA then %> selected<% end %>>None</option>
<option value="any"<% if socks = Sec.ANY then %> selected<% end %>>Any</option>
<option value="client"<% if socks = Sec.CLIENT_ONLY then %> selected<% end %>>Client only</option>
<option value="server"<% if socks = Sec.SERVER_ONLY then %> selected<% end %>>Server only</option>
</select></td> </tr>
-<tr> <td align="right" valign="top"><b>Reason:</b></td> <td><textarea name="msg" wrap="soft" rows="3" cols="80"></textarea></td> </tr>
+<tr> <td>Reason:</td> <td><textarea name="msg" wrap="soft" rows="3" cols="80"></textarea></td> </tr>
<tr> <td><input type="submit" value="Request"></td> </tr>
</table>
</form>
-<h3><b>Request change to your execute permissions</b></h3>
+<h3>Request change to your execute permissions</h3>
<form action="sec" method="post">
<input type="hidden" name="uname" value="<% uname %>">
<input type="hidden" name="cmd" value="tpe">
-<table>
-<tr> <td align="right"><b>Trusted path executables only?</b></td> <td><select name="tpe">
+<table class="blanks">
+<tr> <td>Trusted path executables only?</td> <td><select name="tpe">
<option value="no"<% if not tpe then %> selected<% end %>>No</option>
<option value="yes"<% if tpe then %> selected<% end %>>Yes</option>
</select></td> </tr>
-<tr> <td align="right" valign="top"><b>Reason:</b></td> <td><textarea name="msg" wrap="soft" rows="3" cols="80"></textarea></td> </tr>
+<tr> <td>Reason:</td> <td><textarea name="msg" wrap="soft" rows="3" cols="80"></textarea></td> </tr>
<tr> <td><input type="submit" value="Request"></td> </tr>
</table>
</form>
-<h3><b>Request change to your <tt>cron</tt> permissions</b></h3>
+<h3>Request change to your <tt>cron</tt> permissions</h3>
<form action="sec" method="post">
<input type="hidden" name="uname" value="<% uname %>">
<input type="hidden" name="cmd" value="cron">
-<table>
-<tr> <td align="right"><b>Allowed to use cron?</b></td> <td><select name="cron">
- <option value="no"<% if not cron then %> selected<% end %>>No</option>
+<table class="blanks">
+<tr> <td>Allowed to use cron?</td> <td><select name="cron">
+ option value="no"<% if not cron then %> selected<% end %>>No</option>
<option value="yes"<% if cron then %> selected<% end %>>Yes</option>
</select></td> </tr>
-<tr> <td align="right" valign="top"><b>Reason:</b></td> <td><textarea name="msg" wrap="soft" rows="3" cols="80"></textarea></td> </tr>
+<tr> <td>Reason:</td> <td><textarea name="msg" wrap="soft" rows="3" cols="80"></textarea></td> </tr>
<tr> <td><input type="submit" value="Request"></td> </tr>
</table>
</form>
-<h3><b>Request change to your FTP permissions</b></h3>
+<h3>Request change to your FTP permissions</h3>
<form action="sec" method="post">
<input type="hidden" name="uname" value="<% uname %>">
<input type="hidden" name="cmd" value="ftp">
-<table>
-<tr> <td align="right"><b>Allowed to use FTP?</b></td> <td><select name="ftp">
+<table class="blanks">
+<tr> <td>Allowed to use FTP?</td> <td><select name="ftp">
<option value="no"<% if not ftp then %> selected<% end %>>No</option>
<option value="yes"<% if ftp then %> selected<% end %>>Yes</option>
</select></td> </tr>
-<tr> <td align="right" valign="top"><b>Reason:</b></td> <td><textarea name="msg" wrap="soft" rows="3" cols="80"></textarea></td> </tr>
+<tr> <td>Reason:</td> <td><textarea name="msg" wrap="soft" rows="3" cols="80"></textarea></td> </tr>
<tr> <td><input type="submit" value="Request"></td> </tr>
</table>
</form>
<% val rules = Sec.findFirewallRules uname;
switch rules of
_::_ => %>
-<h3><b>Your firewall rules</b></h3>
+<h3>Your firewall rules</h3>
<% foreach rule in rules do %>
<form action="sec" method="post">
<% end
end%>
-<h3><b>Request a new firewall rule</b></h3>
+<h3>Request a new firewall rule</h3>
<p>You can find a description of rule formats <a href="http://wiki.hcoop.net/wiki/FirewallRules">on our wiki</a>. Enter here the rule you want, without the initial <tt>user</tt> portion.</p>
<form action="sec" method="post">
<input type="hidden" name="uname" value="<% uname %>">
<input type="hidden" name="cmd" value="rule">
-<table>
-<tr> <td align="right"><b>Rule</b></td> <td><input name="rule" size="80"></td> </tr>
-<tr> <td align="right" valign="top"><b>Reason:</b></td> <td><textarea name="msg" wrap="soft" rows="3" cols="80"></textarea></td> </tr>
+<table class="blanks">
+<tr> <td>Rule</td> <td><input name="rule" size="80"></td> </tr>
+<tr> <td>Reason:</td> <td><textarea name="msg" wrap="soft" rows="3" cols="80"></textarea></td> </tr>
<tr> <td><input type="submit" value="Request"></td> </tr>
</table>
</form>
let
val db = C.conn "dbname='hcoop_hcoop'"
+ fun procOutput (outf, cmdline) =
+ let
+ val proc = Unix.execute cmdline
+ val ins = Unix.textInstreamOf proc
+
+ fun loop () =
+ case TextIO.inputLine ins of
+ NONE => ()
+ | SOME s => (TextIO.output (outf, s); loop ())
+ in
+ loop ();
+ ignore (Unix.reap proc)
+ end
+
fun header (outf, title) =
- (TextIO.output (outf, "<html><head>\n<title>");
- TextIO.output (outf, title);
- TextIO.output (outf, "</title></head>\n<body>\n<h2><b>");
- TextIO.output (outf, title);
- TextIO.output (outf, "</b></h2>\n"))
+ procOutput (outf, ("/usr/local/bin/hcoop_header", [title]))
fun footer outf =
- TextIO.output (outf, "\n</body></html>")
+ procOutput (outf, ("/usr/local/bin/hcoop_footer", []))
fun genMemberList () =
let
end
| printOne _ = raise Fail "Bad printOne line"
- val _ = header (outf, "Member list")
+ val _ = header (outf, "HCoop Member List")
val _ = TextIO.output (outf, "<table>\n")
val (total, anon) = C.fold db printOne (0, 0)
"SELECT name, rname, usr FROM WebUserPaying LEFT OUTER JOIN DirectoryPref ON id = usr ORDER BY name"
let
val outf = TextIO.openOut (String.concat [outputDir, "member/", name, ".html"])
- val _ = header (outf, "Hcoop member: " ^ name)
+ val _ = header (outf, "HCoop member: " ^ name)
val _ = TextIO.output (outf, "<table>\n<tr> <td align=\"right\"><b>Member</b>:</td> <td>")
val _ = TextIO.output (outf, name)
val _ = TextIO.output (outf, "</td> </tr>\n<tr> <td align=\"right\"><b>Name</b>:</td> <td>")
let
val outf = TextIO.openOut (outputDir ^ "locs.html")
- val _ = header (outf, "Where members live")
+ val _ = header (outf, "HCoop: Where members live")
fun countResidents () =
let
let
val outf = TextIO.openOut (outputDir ^ "sites.html")
- val _ = header (outf, "Hosted sites")
+ val _ = header (outf, "HCoop: Hosted sites")
fun doLink [url, title, descr, name] = (C.stringFromSql url, C.stringFromSql title, C.stringFromSql descr, C.stringFromSql name)
| doLink _ = raise Fail "Bad link' row"
if $"sub" <> "" then
Support.subscribe { cat = Web.stoi ($"sub"), usr = you }
- %><h3><b>Subscribed</b></h3>
+ %><h3>Subscribed</h3>
<% elseif $"unsub" <> "" then
Support.unsubscribe { cat = Web.stoi ($"unsub"), usr = you }
- %><h3><b>Unsubscribed</b></h3>
+ %><h3>Unsubscribed</h3>
<% elseif $"cmd" = "add" then
Group.requireGroupName "support";
val id = Support.addCategory (Web.stoi ($"grp"), $"name", $"descr")
- %><h3><b>Category added</b></h3>
+ %><h3>Category added</h3>
<% elseif $"mod" <> "" then
Group.requireGroupName "support";
val id = Web.stoi ($"mod");
val cat = Support.lookupCategory id %>
-<h3><b>Modify category</b></h3>
+<h3>Modify category</h3>
<form action="support" method="post">
<input type="hidden" name="save" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name" value="<% Web.html (#name cat) %>"></td> </tr>
-<tr> <td align="right"><b>Owning group</b>:</td> <td><select name="grp">
+<table class="blanks">
+<tr> <td>Name:</td> <td><input name="name" value="<% Web.html (#name cat) %>"></td> </tr>
+<tr> <td>Owning group:</td> <td><select name="grp">
<% foreach group in Group.listGroups () do %>
<option value="<% #id group %>"<% if #id group = #grp cat then %> selected<% end %>><% #name group %></option>
<% end %>
</select></td> </tr>
-<tr> <td align="right"><b>Description</b>:</td> <td><input name="descr" value="<% Web.html (#descr cat) %>"></td> </tr>
+<tr> <td>Description:</td> <td><input name="descr" value="<% Web.html (#descr cat) %>"></td> </tr>
<tr> <td><input type="submit" value="Save"></td> </tr>
</table>
</form>
val id = Web.stoi ($"save");
val cat = Support.lookupCategory id;
Support.modCategory {cat with name = $"name", descr = $"descr", grp = Web.stoi ($"grp")}
- %><h3><b>Category saved</b></h3>
+ %><h3>Category saved</h3>
<% elseif $"del" <> "" then
Group.requireGroupName "support";
showNormal := false;
val id = Web.stoi ($"del");
val cat = Support.lookupCategory id;
- %><h3><b>Are you sure you want to delete category "<% Web.html (#name cat) %>"?</b></h3>
+ %><h3>Are you sure you want to delete category "<% Web.html (#name cat) %>"?</h3>
<a href="support?del2=<% id %>">Yes, delete "<% Web.html (#name cat) %>"!</a>
<% elseif $"del2" <> "" then
val id = Web.stoi ($"del2");
val cat = Support.lookupCategory id;
Support.deleteCategory id;
- %><h3><b>"<% Web.html (#name cat) %>" deleted</b></h3>
+ %><h3>"<% Web.html (#name cat) %>" deleted</h3>
<% end;
if showNormal then %>
-<h3><b>Choose a category:</b></h3>
+<h3>Choose a category:</h3>
<% foreach (sub, cat) in Support.listCategoriesWithSubscriptions you do %>
<a href="issue?cat=<% #id cat %>"><% Web.html (#name cat) %></a>: <% Web.html (#descr cat) %>
<% if admin then %>
-<h3><b>Add new category</b></h3>
+<h3>Add new category</h3>
<form action="support" method="post">
<input type="hidden" name="cmd" value="add">
-<table>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name"></td> </tr>
-<tr> <td align="right"><b>Owning group</b>:</td> <td><select name="grp">
+<table class="blanks">
+<tr> <td>Name:</td> <td><input name="name"></td> </tr>
+<tr> <td>Owning group:</td> <td><select name="grp">
<% foreach group in Group.listGroups () do %>
<option value="<% #id group %>"><% #name group %></option>
<% end %>
</select></td> </tr>
-<tr> <td align="right"><b>Description</b>:</td> <td><input name="descr"></td> </tr>
+<tr> <td>Description:</td> <td><input name="descr"></td> </tr>
<tr> <td><input type="submit" value="Add"></td> </tr>
</table>
</form>
@header[("title", [#name user])] %>
-<table>
-<tr> <td align="right"><b>Member</b>:</td> <td><% #name user %></td> </tr>
-<tr> <td align="right"><b>Real name</b>:</td> <td><% Web.html (#rname user) %></td> </tr>
-<tr> <td align="right"><b>Hcoop e-mail</b>:</td> <td><a href="mailto:<% #name user %><% Init.emailSuffix %>"><tt><% #name user %><% Init.emailSuffix %></tt></a></td> </tr>
-<tr> <td align="right"><b>Joined</b>:</td> <td><% #joined user %></td> </tr>
-<tr> <td align="right"><b>Locations</b>:</td> <td><%
+<table class="blanks">
+<tr> <td>Member:</td> <td><% #name user %></td> </tr>
+<tr> <td>Real name:</td> <td><% Web.html (#rname user) %></td> </tr>
+<tr> <td>Hcoop e-mail:</td> <td><a href="mailto:<% #name user %><% Init.emailSuffix %>"><tt><% #name user %><% Init.emailSuffix %></tt></a></td> </tr>
+<tr> <td>Joined:</td> <td><% #joined user %></td> </tr>
+<tr> <td>Locations:</td> <td><%
ref first = true;
foreach loc in Location.userLocations id do
if first then
if $"cmd" = "Create" then
if not (Init.validUsername ($"name")) then %>
- <h3><b>Invalid username</b></h3>
+ <h3>Invalid username</h3>
<% else switch Init.userNameToId ($"name") of
SOME _ => %>
- <h3><b>Username already in use</b></h3>
+ <h3>Username already in use</h3>
<% | NONE =>
val ap = Web.stoi ($"app");
val bal =
if $"subscribe" = "on" then
if not (Pref.subscribe ("hcoop-announce", $"name" ^ Init.emailSuffix)) then
- %><h3><b>Error subscribing to hcoop-announce</b></h3><%
+ %><h3>Error subscribing to hcoop-announce</h3><%
end
end %>
- <h3><b>Member added</b></h3>
+ <h3>Member added</h3>
<% end
end
elseif $"mod" <> "" then
showNormal := false;
val user = Init.lookupUser (Web.stoi ($"mod")) %>
-<h3><b>Modify member record</b></h3>
+<h3>Modify member record</h3>
<form action="users" method="post">
<input type="hidden" name="id" value="<% $"mod" %>">
-<table>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name" value="<% #name user %>"></td> </tr>
-<tr> <td align="right"><b>Real name</b>:</td> <td><input name="rname" value="<% #rname user %>"></td> </tr>
-<tr> <td align="right" valign="top"><b>Funded by</b>:</td> <td><select name="bal">
+<table class="blanks">
+<tr> <td>Name:</td> <td><input name="name" value="<% #name user %>"></td> </tr>
+<tr> <td>Real name:</td> <td><input name="rname" value="<% #rname user %>"></td> </tr>
+<tr> <td>Funded by:</td> <td><select name="bal">
<% foreach bal in Balance.listBalances () do %>
<option value="<% #id bal %>"<% if #bal user = #id bal then %> selected <% end %>><% Web.html (#name bal) %></option>
<% end %>
<% elseif $"cmd" = "Save" then
val user = Init.lookupUser (Web.stoi ($"id"));
Init.modUser {user with name = $"name", bal = Web.stoi ($"bal")} %>
- <h3><b>Member record saved.</b></h3>
+ <h3>Member record saved.</h3>
<% elseif $"del" <> "" then
showNormal := false;
val user = Init.lookupUser (Web.stoi ($"del")) %>
- <h3><b>Are you sure you want to delete member <a href="user?id=<% #id user %>"><% #name user %></a>?</b></h3>
+ <h3>Are you sure you want to delete member <a href="user?id=<% #id user %>"><% #name user %></a>?</h3>
<a href="users?del2=<% $"del" %>">Yes, delete <% #name user %>!</a>
<% elseif $"del2" <> "" then
val user = Init.lookupUser (Web.stoi ($"del2"));
Init.deleteUser (Web.stoi ($"del2")) %>
- <h3><b><% #name user %> deleted!</b></h3>
+ <h3><% #name user %> deleted!</h3>
<% elseif $"cmd" = "grandfather" then
Init.grandfatherUsers()
- %><h3><b>Grandfathered</b></h3>
+ %><h3>Grandfathered</h3>
<% end %>
<% if showNormal then %>
-<h3><b>New member</b></h3>
+<h3>New member</h3>
<form action="users" method="post">
-<table>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name"></td> </tr>
-<tr> <td align="right"><b>Real name</b>:</td> <td><input name="rname"></td> </tr>
-<tr> <td align="right" valign="top"><b>Funded by</b>:</td> <td><select name="bal">
+<table class="blanks">
+<tr> <td>Name:</td> <td><input name="name"></td> </tr>
+<tr> <td>Real name:</td> <td><input name="rname"></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 align="right"><b>Initial transaction amount</b>:</td> <td><input name="amount"></td> </tr>
-<tr> <td align="right"><b>Initial transaction description</b>:</td> <td><input name="descr"></td> </tr>
-<tr> <td align="right"><input type="checkbox" name="subscribe" checked></td> <td>Subscribe to hcoop-announce</td> </tr>
-<tr> <td align="right"><b>Groups</b>:</td> <td><select name="grp" size="5" multiple>
+<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 %>
</table>
</form>
-<h3><b>Manage current members</b></h3>
+<h3>Manage current members</h3>
<table>
<% foreach user in Init.listUsers () do %>
--- /dev/null
+all: passwd.mlt
+
+passwd.mlt: /etc/hcoop.header /etc/hcoop.footer passwd.mlt.in
+ hcoop_html "HCoop: Change virtual mailbox password" passwd.mlt.in >passwd.mlt
<html><head>
-<title>Change virtual mailbox password</title>
+<link rel="stylesheet" type="text/css" href="http://hcoop.net/hcoop.css" />
+<title>HCoop: Change virtual mailbox password</title>
</head><body>
+<div class="main">
+
+<div class="title">
+<img class="globe" src="http://hcoop.net/globe.gif" />
+<h1>HCoop: Change virtual mailbox password</h1>
+</div>
+
+<div class="break"></div>
<% if $"email" <> "" then
val email = $"email"
val old = $"old"
end
end %>
-<h2><b>Change virtual mailbox password</b></h2>
-
<form action="passwd" method="post">
-<table>
-<tr> <td align="right"><b>E-mail address</b>:</td> <td><input name="email" value="<% Web.html ($"email") %>"></td> </tr>
-<tr> <td align="right"><b>Old password</b>:</td> <td><input type="password" name="old"></td> </tr>
-<tr> <td align="right"><b>New password</b>:</td> <td><input type="password" name="new"></td> </tr>
-<tr> <td align="right"><b>Confirm new password</b>:</td> <td><input type="password" name="new2"></td> </tr>
+<table class="blanks">
+<tr> <td>E-mail address:</td> <td><input name="email" value="<% Web.html ($"email") %>"></td> </tr>
+<tr> <td>Old password:</td> <td><input type="password" name="old"></td> </tr>
+<tr> <td>New password:</td> <td><input type="password" name="new"></td> </tr>
+<tr> <td>Confirm new password:</td> <td><input type="password" name="new2"></td> </tr>
<tr> <td><input type="submit" value="Change"></td> </tr>
</table>
</form>
+</div>
-</body></html>
\ No newline at end of file
+</body></html>
--- /dev/null
+<% if $"email" <> "" then
+ val email = $"email"
+ val old = $"old"
+ val new = $"new"
+ val new2 = $"new2"
+
+ if not (Pass.validEmail email) then
+ %><h2><b>That is not a valid virtual mailbox address!</b></h2><%
+ elseif new <> new2 then
+ %><h2><b>Your new passwords do not match.</b></h2><%
+ elseif not (Pass.change (email, old, new)) then
+ %><h2><b>Error changing password. Did you enter the right e-mail address and current password?</b></h2><%
+ else
+ %><h2><b>Password changed!</b></h2><%
+ end
+end %>
+
+<form action="passwd" method="post">
+
+<table class="blanks">
+<tr> <td>E-mail address:</td> <td><input name="email" value="<% Web.html ($"email") %>"></td> </tr>
+<tr> <td>Old password:</td> <td><input type="password" name="old"></td> </tr>
+<tr> <td>New password:</td> <td><input type="password" name="new"></td> </tr>
+<tr> <td>Confirm new password:</td> <td><input type="password" name="new2"></td> </tr>
+<tr> <td><input type="submit" value="Change"></td> </tr>
+</table>
+
+</form>