<{* page fo group administrator *}>
<{* $Revision: 1.8.2.1.2.3 $ *}>
<{include file="db:xoonips_breadcrumbs.inc.html"}>

<h4><{$title}></h4>

<{if $op == 'list' }>
<{* group list *}>
<table class="outer" cellspacing="1">
  <tr>
    <th align="center" width="20%"><{$smarty.const._MD_XOONIPS_MODERATOR_GNAME}></th>
    <th align="center" width="50%"><{$smarty.const._MD_XOONIPS_MODERATOR_GDESC}></th>
    <th align="center" width="30%"><{$smarty.const._MD_XOONIPS_MODERATOR_OPERATION}></th>
  </tr>
<{foreach from=$groups item=group}>
  <tr>
    <td class="even"><{$group.gname}></td>
    <td class="<{cycle name="row1" values="even,odd"}>"><{$grp.gdesc}></td>
    <td class="<{cycle name="row2" values="even,odd"}>"><a href="<{$group.link}>"><{$smarty.const._MD_XOONIPS_MODERATOR_EDIT}></a></td>
  </tr>
<{/foreach}>
</table>
<{else}>
<{* member add/delete *}>
<script type="text/javascript">
//<!--
function xoonips_submit_add_member()
{
    var form = document.getElementById('xoonips_add_member_form');
    form.submit();
    return false;
}

function xoonips_submit_delete_member()
{
    var form = document.getElementById('xoonips_delete_member_form');
    form.submit();
    return false;
}

//-->
</script>
<table class="outer" cellspacing="1">
  <tr>
    <th align="center"><{$smarty.const._MD_XOONIPS_ACCOUNT_GROUPADMIN_NON_MEMBERS}></th>
    <th></th>
    <th align="center"><{$smarty.const._MD_XOONIPS_ACCOUNT_GROUPADMIN_MEMBERS}></th>
  </tr>
  <tr>
   <td class="even">
     <form action="groupadmin.php" method="post" id="xoonips_add_member_form">
     <{$token_ticket}>
     <input type="hidden" name="op" value="update"/>
     <input type="hidden" name="mode" value="add"/>
     <input type="hidden" name="gid" value="<{$gid}>"/>
     <select name="uids[]" size="10" multiple="multiple">
<{foreach from=$non_members item=user}>
       <option value="<{$user.uid}>"><{$user.uname}></option>
<{/foreach}>
     </select>
     </form>
   </td>
   <td align="center" class="odd">
     <input class="formButton" type="button" value="<{$smarty.const._MD_XOONIPS_ACCOUNT_GROUPADMIN_ADD_BUTTON}>" onclick="xoonips_submit_add_member();"/>
     <br />
     <input class="formButton" type="button" value="<{$smarty.const._MD_XOONIPS_ACCOUNT_GROUPADMIN_DELETE_BUTTON}>" onclick="xoonips_submit_delete_member();"/>
   </td>
   <td class="even">
     <form action="groupadmin.php" method="post" id="xoonips_delete_member_form">
     <{$token_ticket}>
     <input type="hidden" name="op" value="update"/>
     <input type="hidden" name="mode" value="del"/>
     <input type="hidden" name="gid" value="<{$gid}>"/>
     <select name="uids[]" size="10" multiple="multiple">
<{foreach from=$members item=user}>
       <option value="<{$user.uid}>"><{$user.uname}></option>
<{/foreach}>
     </select>
     </form>
    </td>
  </tr>
</table>
<{/if}>
