% @header[("title", ["Support"])];
val you = Init.getUserId ();
val admin = Group.inGroupName "support";
ref showNormal = true;
if $"sub" <> "" then
Support.subscribe { cat = Web.stoi ($"sub"), usr = you }
%>
Subscribed
<% elseif $"unsub" <> "" then
Support.unsubscribe { cat = Web.stoi ($"unsub"), usr = you }
%>Unsubscribed
<% elseif $"cmd" = "add" then
Group.requireGroupName "support";
val id = Support.addCategory (Web.stoi ($"grp"), $"name", $"descr")
%>Category added
<% elseif $"mod" <> "" then
Group.requireGroupName "support";
showNormal := false;
val id = Web.stoi ($"mod");
val cat = Support.lookupCategory id %>
Modify category
<% elseif $"save" <> "" then
Group.requireGroupName "support";
val id = Web.stoi ($"save");
val cat = Support.lookupCategory id;
Support.modCategory {cat with name = $"name", descr = $"descr", grp = Web.stoi ($"grp")}
%>Category saved
<% elseif $"del" <> "" then
Group.requireGroupName "support";
showNormal := false;
val id = Web.stoi ($"del");
val cat = Support.lookupCategory id;
%>Are you sure you want to delete category "<% Web.html (#name cat) %>"?
Yes, delete "<% Web.html (#name cat) %>"!
<% elseif $"del2" <> "" then
Group.requireGroupName "support";
val id = Web.stoi ($"del2");
val cat = Support.lookupCategory id;
Support.deleteCategory id;
%>"<% Web.html (#name cat) %>" deleted
<% end;
if showNormal then %>
Otherwise...
First, check our member FAQ and read all the question descriptions to make sure that your problem isn't solved there.
If you don't find it, visit our Bugzilla database to open a custom issue. You can log in there using the same username and password that you are using to access this portal.
<% if admin then %>
<% end %>
<% end %>
<% @footer[] %>