51 $xoTheme->addStylesheet( XOOPS_URL .
'/modules/system/css/admin.css' );
52 $xoTheme->addScript(
'browse.php?Frameworks/jquery/jquery.js');
53 $xoTheme->addScript(
'browse.php?Frameworks/jquery/plugins/jquery.tablesorter.js');
54 $xoTheme->addScript(
'modules/system/js/admin.js');
71 $xoopsTpl->assign(
'groups_count', $groups_count );
72 if ( $groups_count > 0 ){
73 foreach (array_keys($groups_arr) as
$i){
74 $groups_id = $groups_arr[
$i]->getVar(
"groupid");
75 $groups[
'groups_id'] = $groups_id;
76 $groups[
'name'] = $groups_arr[
$i]->getVar(
"name");
77 $groups[
'description'] = $groups_arr[
$i]->getVar(
"description");
79 if ( $groups_id != 3 ) {
80 $group_id_arr[0] = $groups_id;
81 $nb_users_by_groups =
$member_handler->getUserCountByGroupLink($group_id_arr);
84 $groups[
'nb_users_by_groups'] =
'';
86 $edit_delete =
'<a href="admin.php?fct=groups&op=groups_edit&groups_id=' . $groups_id .
'">
88 if (!in_array($groups_arr[$i]->getVar(
"groupid"), array(XOOPS_GROUP_ADMIN, XOOPS_GROUP_USERS, XOOPS_GROUP_ANONYMOUS))) {
90 $edit_delete .=
'<a href="admin.php?fct=groups&op=groups_delete&groups_id=' . $groups_id .
'">
93 $groups[
'edit_delete'] = $edit_delete;
108 $xoTheme->addStylesheet( XOOPS_URL .
'/modules/system/css/admin.css' );
116 $form = $obj->getForm();
124 $xoTheme->addStylesheet( XOOPS_URL .
'/modules/system/css/admin.css' );
132 if ( $groups_id > 0 ) {
134 $form = $obj->getForm();
143 case 'groups_save_add':
144 if (!
$GLOBALS[
'xoopsSecurity']->check()) {
154 $group->setVar(
'name',
$_POST[
"name"]);
155 $group->setVar(
'description',
$_POST[
"desc"]);
156 if (count($system_catids) > 0) {
157 $group->setVar(
'group_type',
'Admin');
164 $groupid = $group->getVar(
'groupid');
166 if (count($system_catids) > 0) {
167 array_push($admin_mids, 1);
168 foreach ($system_catids as $s_cid) {
170 $sysperm->setVar(
'gperm_groupid', $groupid);
171 $sysperm->setVar(
'gperm_itemid', $s_cid);
172 $sysperm->setVar(
'gperm_name',
'system_admin');
173 $sysperm->setVar(
'gperm_modid', 1);
177 foreach ($admin_mids as $a_mid) {
179 $modperm->setVar(
'gperm_groupid', $groupid);
180 $modperm->setVar(
'gperm_itemid', $a_mid);
181 $modperm->setVar(
'gperm_name',
'module_admin');
182 $modperm->setVar(
'gperm_modid', 1);
185 array_push($read_mids, 1);
186 foreach ($read_mids as $r_mid) {
188 $modperm->setVar(
'gperm_groupid', $groupid);
189 $modperm->setVar(
'gperm_itemid', $r_mid);
190 $modperm->setVar(
'gperm_name',
'module_read');
191 $modperm->setVar(
'gperm_modid', 1);
194 foreach ($read_bids as $r_bid) {
196 $blockperm->setVar(
'gperm_groupid', $groupid);
197 $blockperm->setVar(
'gperm_itemid', $r_bid);
198 $blockperm->setVar(
'gperm_name',
'block_read');
199 $blockperm->setVar(
'gperm_modid', 1);
207 case 'groups_save_update':
208 if (!
$GLOBALS[
'xoopsSecurity']->check()) {
220 $group->setVar(
'name',
$_POST[
"name"]);
221 $group->setVar(
'description',
$_POST[
"desc"]);
223 if (!in_array($group->getVar(
'groupid'), array(XOOPS_GROUP_ADMIN, XOOPS_GROUP_USERS, XOOPS_GROUP_ANONYMOUS))) {
224 if (count($system_catids) > 0) {
225 $group->setVar(
'group_type',
'Admin');
227 $group->setVar(
'group_type',
'');
232 echo $group->getHtmlErrors();
235 $groupid = $group->getVar(
'groupid');
245 if (count($system_catids) > 0) {
246 array_push($admin_mids, 1);
247 foreach ($system_catids as $s_cid) {
249 $sysperm->setVar(
'gperm_groupid', $groupid);
250 $sysperm->setVar(
'gperm_itemid', $s_cid);
251 $sysperm->setVar(
'gperm_name',
'system_admin');
252 $sysperm->setVar(
'gperm_modid', 1);
256 foreach ($admin_mids as $a_mid) {
258 $modperm->setVar(
'gperm_groupid', $groupid);
259 $modperm->setVar(
'gperm_itemid', $a_mid);
260 $modperm->setVar(
'gperm_name',
'module_admin');
261 $modperm->setVar(
'gperm_modid', 1);
264 array_push($read_mids, 1);
265 foreach ($read_mids as $r_mid) {
267 $modperm->setVar(
'gperm_groupid', $groupid);
268 $modperm->setVar(
'gperm_itemid', $r_mid);
269 $modperm->setVar(
'gperm_name',
'module_read');
270 $modperm->setVar(
'gperm_modid', 1);
273 foreach ($read_bids as $r_bid) {
275 $blockperm->setVar(
'gperm_groupid', $groupid);
276 $blockperm->setVar(
'gperm_itemid', $r_bid);
277 $blockperm->setVar(
'gperm_name',
'block_read');
278 $blockperm->setVar(
'gperm_modid', 1);
289 case 'groups_delete':
291 if ( $groups_id > 0 ) {
294 if ( !
$GLOBALS[
"xoopsSecurity"]->check() ) {
297 if ( $groups_id > 0 && !in_array($groups_id, array(XOOPS_GROUP_ADMIN, XOOPS_GROUP_USERS, XOOPS_GROUP_ANONYMOUS))) {
310 $xoTheme->addStylesheet( XOOPS_URL .
'/modules/system/css/admin.css' );