22 include_once dirname(dirname(dirname(__DIR__))) .
'/include/cp_header.php';
25 $xoops->loadLocale(
'system');
27 $modid = isset($_POST[
'modid']) ? intval($_POST[
'modid']) : 0;
30 if ($modid <= 1 || !$xoops->isUser() || !
$xoops->user->isAdmin(
$modid)) {
42 if (is_array($_POST[
'perms']) && !empty($_POST[
'perms'])) {
44 foreach ($_POST[
'perms'] as $perm_name => $perm_data) {
45 if (!
$xoops->security()->check(
true,
false, $perm_name)) {
51 if (!array_key_exists(
'groups', $perm_data)){
54 foreach ($perm_data[
'groups'] as $group_id => $item_ids) {
55 foreach ($item_ids as $item_id => $selected) {
58 if ($perm_data[
'parents'][$item_id] !=
'') {
59 $parent_ids = explode(
':', $perm_data[
'parents'][$item_id]);
60 foreach ($parent_ids as
$pid) {
61 if ($pid != 0 && !in_array($pid, array_keys($item_ids))) {
69 $gperm->setVar(
'gperm_groupid', $group_id);
70 $gperm->setVar(
'gperm_name', $perm_name);
71 $gperm->setVar(
'gperm_modid',
$modid);
72 $gperm->setVar(
'gperm_itemid', $item_id);
86 if (
$module->getVar(
'hasadmin')) {
87 $adminindex = isset($_POST[
'redirect_url']) ? $_POST[
'redirect_url'] :
$module->getInfo(
'adminindex');
const SF_ADDED_PERMISSION_FOR_GROUP
if($modid<=1||!$xoops->isUser()||!$xoops->user->isAdmin($modid)) $module
const EF_COULD_NOT_RESET_GROUP_PERMISSION_FOR_MODULE
if(is_array($_POST['perms'])&&!empty($_POST['perms'])) $backlink
const E_NO_ACCESS_PERMISSION
const EF_COULD_NOT_ADD_PERMISSION_FOR_GROUP
if(!is_object($module)||!$module->getVar('isactive')) $msg
const E_ALL_PARENT_ITEMS_MUST_BE_SELECTED