} $member_handler =& xoops_gethandler('member'); $size = count($uids); for ($i = 0; $i < $size; $i++) { $member_handler->addUserToGroup($groupid, $uids[$i]); } redirect_header("admin.php?fct=groups&op=modify&g_id=" . $groupid . "", 0, _MD_AM_DBUPDATED); break; case "delUser": if (!$GLOBALS['xoopsSecurity']->check()) { redirect_header("admin.php?fct=groups&op=adminMain", 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); } if (intval($groupid) > 0) { $member_handler =& xoops_gethandler('member'); $memstart = isset($memstart) ? intval($memstart) : 0; if ($groupid == XOOPS_GROUP_ADMIN) { if ($member_handler->getUserCountByGroup($groupid) > count($uids)) { $member_handler->removeUsersFromGroup($groupid, $uids); } } else { $member_handler->removeUsersFromGroup($groupid, $uids); } redirect_header('admin.php?fct=groups&op=modify&g_id=' . $groupid . '&memstart=' . $memstart, 0, _MD_AM_DBUPDATED); } break; case "display": default: displayGroups(); break; } }
break; case $_GET['add']: $contactForm->success("Added new item successfully"); break; case $_GET['delete']: $contactForm->success("Deleted item successfully"); break; } if ($_GET['action'] == editGroup && $_SESSION['access'] >= 50 || $_GET['action'] == showGroup) { //get the new group type corresponding to the ID $group = new Contact($_GET['groupID']); //if this is an update then update the contact if (isset($_POST['updateGroup'])) { updateGroup($group); } else { displayGroups($group); } } else { if ($_GET['action'] == editContacts && $_SESSION['access'] >= 50 || $_GET['action'] == showContacts) { //get the new group type corresponding to the ID $contact = new Person($_GET['contactID']); //if this is an update then update the contact if (isset($_POST['updateContact'])) { updateContact($contact); } else { if (isset($_POST['updateContactType'])) { $contactType = new PersonType($_GET['contactTypeID']); updateContactType($contactType); } else { displayContacts($contact); }
break; case "--version": case "-V": case "-H": case "--help": display_help(); exit(0); default: echo "ERROR: Invalid Argument: ($arg)\n\n"; display_help(); exit(1); } } if ($displayGroups) { displayGroups($quietMode); exit(1); } if ($displayUsers) { displayUsers($quietMode); exit(1); } if ($displayTrees) { displayTrees($quietMode); exit(1); } if ($displayHosts) { $hosts = getHosts();