X-Git-Url: http://git.hcoop.net/hcoop/zz_old/portal.git/blobdiff_plain/1fe415e08e00c6d35d0561f8213914d3c15532a4..b45f26c921c9c2824496852bd2d493b5dbeb77fa:/users.mlt diff --git a/users.mlt b/users.mlt index cd7582b..1cd37f0 100644 --- a/users.mlt +++ b/users.mlt @@ -17,7 +17,7 @@ if $"cmd" = "Create" then "" => Balance.addBalance ($"name") | s => Web.stoi s); - val id = Init.addUser ($"name", $"rname", bal, ap); + val id = Init.addUser ($"name", $"rname", bal, ap, 1); Group.addToGroups (id, map Web.stoi (Web.getMultiParam "grp")); if $"amount" <> "" then @@ -74,9 +74,8 @@ elseif $"mod" <> "" then Init.grandfatherUsers() %>
<% Web.html (#name user) %> | +<% val bal = Balance.lookupBalance (#bal user); +if Balance.isNegative bal then + negative := negative + 1 +end %> +<% #amount bal %> | +<%if #name bal <> #name user then %> + <% Web.html (#name bal) %> +<% end %> + |
<% negative %> have negative balances.
+ +<% elseif $"cmd" = "diff" then + showNormal := false; + + val against = (case $"against" of + "" => Init.usersInAfs () + | x => String.tokens Char.isSpace x); + + val diff = Init.usersDiff (Init.listUsernames (), against) %> + +