return $groups;
}
+ // getSubgroups obtains a list of immediate subgroups.
+ function getSubgroups() {
+ $mdb2 = getConnection();
+
+ $sql = "select id, name from tt_groups where org_id = $this->org_id and parent_id = ".$this->getActiveGroup();;
+ $res = $mdb2->query($sql);
+ if (!is_a($res, 'PEAR_Error')) {
+ while ($val = $res->fetchRow()) {
+ $groups[] = array('id'=>$val['id'],'name'=>$val['name']);
+ }
+ }
+ return $groups;
+ }
+
// getUser function is used to manage users in group and returns user details.
// At the moment, the function is used for user edits and deletes.
function getUser($user_id) {
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.18.25.4477 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.18.25.4478 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
<td><a href="roles.php">{$i18n.label.configure}</a></td>
</tr>
{/if}
+{if $smarty.const.SUBGROUP_DEBUG == 'true'}
+ {if $user->can('manage_subgroups')}
+ <tr>
+ <td align="right" nowrap>{$i18n.label.subgroups}:</td>
+ <td><a href="groups.php">{$i18n.label.configure}</a></td>
+ </tr>
+ {/if}
+{/if}
<tr>
<td align="right" nowrap>{$i18n.label.language}:</td>
<td>{$forms.groupForm.lang.control}</td>
}
// End of access checks.
-$smarty->assign('groups', $user->getGroups());
-$smarty->assign('title', $i18n->get('title.groups'));
+$smarty->assign('groups', $user->getSubgroups());
+$smarty->assign('title', $i18n->get('label.subgroups'));
$smarty->assign('content_page_name', 'groups.tpl');
$smarty->display('index.tpl');