Пример #1
0
    $gMessage->show($gL10n->get('SYS_DELETE_DATA'));
} elseif ($getMode === 5) {
    // Rolle wieder aktiv setzen
    $return_code = $role->setActive();
    if ($return_code < 0) {
        $gMessage->show($gL10n->get('SYS_NO_RIGHTS'));
    }
    $gMessage->setForwardUrl($gNavigation->getUrl());
    $gMessage->show($gL10n->get('ROL_ROLE_SET_MODE', $role->getValue('rol_name'), $gL10n->get('SYS_ACTIVE')));
} elseif ($getMode === 6) {
    // Fragen, ob die inaktive Rolle geloescht werden soll
    $gMessage->setForwardYesNo($g_root_path . '/adm_program/modules/roles/roles_function.php?rol_id=' . $getRoleId . '&amp;mode=4');
    $gMessage->show($gL10n->get('ROL_ROLE_DELETE_DESC', $role->getValue('rol_name')));
} elseif ($getMode === 7) {
    $role->setValue('rol_visible', 0);
    $role->save();
    $gMessage->setForwardUrl($gNavigation->getUrl(), 2000);
    $gMessage->show($gL10n->get('ROL_ROLE_SET_MODE', $role->getValue('rol_name'), $gL10n->get('SYS_INVISIBLE')));
} elseif ($getMode === 8) {
    $role->setValue('rol_visible', 1);
    $role->save();
    $gMessage->setForwardUrl($gNavigation->getUrl(), 2000);
    $gMessage->show($gL10n->get('ROL_ROLE_SET_MODE', $role->getValue('rol_name'), $gL10n->get('SYS_VISIBLE')));
} elseif ($getMode === 9) {
    if ($role->hasFormerMembers()) {
        echo '1';
    } else {
        echo '0';
    }
    exit;
}
Пример #2
0
     $sql = 'SELECT rol_id, rol_name
               FROM ' . TBL_ROLES . '
         INNER JOIN ' . TBL_CATEGORIES . '
                 ON cat_id = rol_cat_id
              WHERE rol_id IN (' . $sqlRoleIds . ')
                    ' . $sqlParticipationRoles . '
           ORDER BY rol_name ASC';
     $rolesStatement = $gDb->query($sql);
     $rolesArray = $rolesStatement->fetchAll();
     foreach ($rolesArray as $roleArray) {
         // Rollenobjekt anlegen
         $role = new TableRoles($gDb);
         $role->setArray($roleArray);
         $list[] = array('groupID: ' . $roleArray['rol_id'], $roleArray['rol_name'], $gL10n->get('SYS_ROLES') . ' (' . $gL10n->get('LST_ACTIVE_MEMBERS') . ')');
         $listRoleIdsArray[] = $roleArray['rol_id'];
         if ($role->hasFormerMembers() > 0 && $gPreferences['mail_show_former'] == 1) {
             // list role with former members
             $listFormer[] = array('groupID: ' . $roleArray['rol_id'] . '-1', $roleArray['rol_name'] . ' ' . '(' . $gL10n->get('SYS_FORMER_PL') . ')', $gL10n->get('SYS_ROLES') . ' (' . $gL10n->get('LST_FORMER_MEMBERS') . ')');
             // list role with active and former members
             $listActiveAndFormer[] = array('groupID: ' . $roleArray['rol_id'] . '-2', $roleArray['rol_name'] . ' ' . '(' . $gL10n->get('MSG_ACTIVE_FORMER_SHORT') . ')', $gL10n->get('SYS_ROLES') . ' (' . $gL10n->get('LST_ACTIVE_FORMER_MEMBERS') . ')');
         }
     }
     $list = array_merge($list, $listFormer, $listActiveAndFormer);
     $listVisibleRoleArray = array_intersect($listRoleIdsArray, $gCurrentUser->getAllVisibleRoles());
 }
 if ($getRoleId === 0 && count($listVisibleRoleArray) > 0) {
     // if no special role was preselected then list users
     $sql = 'SELECT usr_id, first_name.usd_value as first_name, last_name.usd_value as last_name,
                    rol_mail_this_role, rol_id, mem_begin, mem_end
               FROM ' . TBL_MEMBERS . '
         INNER JOIN ' . TBL_ROLES . '
Пример #3
0
    $gMessage->show($gL10n->get('SYS_DELETE_DATA'));
} elseif ($getMode == 5) {
    // Rolle wieder aktiv setzen
    $return_code = $role->setActive();
    if ($return_code < 0) {
        $gMessage->show($gL10n->get('SYS_NO_RIGHTS'));
    }
    $gMessage->setForwardUrl($gNavigation->getUrl());
    $gMessage->show($gL10n->get('ROL_ROLE_SET_MODE', $role->getValue('rol_name'), $gL10n->get('SYS_ACTIVE')));
} elseif ($getMode == 6) {
    // Fragen, ob die inaktive Rolle geloescht werden soll
    $gMessage->setForwardYesNo($g_root_path . '/adm_program/modules/roles/roles_function.php?rol_id=' . $getRoleId . '&amp;mode=4');
    $gMessage->show($gL10n->get('ROL_ROLE_DELETE_DESC', $role->getValue('rol_name')));
} elseif ($getMode == 7) {
    $role->setValue('rol_visible', 0);
    $role->save();
    $gMessage->setForwardUrl($gNavigation->getUrl(), 2000);
    $gMessage->show($gL10n->get('ROL_ROLE_SET_MODE', $role->getValue('rol_name'), $gL10n->get('SYS_INVISIBLE')));
} elseif ($getMode == 8) {
    $role->setValue('rol_visible', 1);
    $role->save();
    $gMessage->setForwardUrl($gNavigation->getUrl(), 2000);
    $gMessage->show($gL10n->get('ROL_ROLE_SET_MODE', $role->getValue('rol_name'), $gL10n->get('SYS_VISIBLE')));
} elseif ($getMode == 9) {
    if ($role->hasFormerMembers() == true) {
        echo '1';
    } else {
        echo '0';
    }
    exit;
}
Пример #4
0
         $act_number = '-1';
     } elseif ($act_or === 2) {
         $act_group = $gL10n->get('SYS_ROLES') . ' (' . $gL10n->get('LST_ACTIVE_FORMER_MEMBERS') . ')';
         $act_group_short = '(' . $gL10n->get('MSG_ACTIVE_FORMER_SHORT') . ')';
         $act_number = '-2';
     } else {
         $act_group = $gL10n->get('SYS_ROLES') . ' (' . $gL10n->get('LST_ACTIVE_MEMBERS') . ')';
         $act_number = '';
     }
     // list array with all roles where user is allowed to send mail to
     $send_roles = $gCurrentUser->getAllMailRoles();
     foreach ($send_roles as &$allowed_role) {
         // Rollenobjekt anlegen
         $role = new TableRoles($gDb);
         $role->readDataById($allowed_role);
         if ($act_number == '' || $role->hasFormerMembers($allowed_role) > 0 && $gPreferences['mail_show_former'] == 1) {
             $list[] = array('groupID: ' . $allowed_role . $act_number, $role->getValue('rol_name') . ' ' . $act_group_short, $act_group);
             $list_rol_id_array[] = $allowed_role;
         }
     }
 }
 foreach (array_unique($list_rol_id_array) as $key) {
     if (isset($list_rol_id)) {
         $list_rol_id .= ", '" . $key . "'";
     } else {
         $list_rol_id = "'" . $key . "'";
     }
 }
 // select Users
 $sql = 'SELECT usr_id, first_name.usd_value as first_name, last_name.usd_value as last_name,
                rol_mail_this_role, rol_id, mem_begin, mem_end