Ejemplo n.º 1
0
$numberOfRoles = $lists->getDataSetCount();
if ($numberOfRoles == 0) {
    if ($gValidLogin) {
        // If login valid, than show message for non available roles
        if ($getActiveRole == 0) {
            $gMessage->show($gL10n->get('LST_NO_ROLES_REMOVED'));
        } else {
            $gMessage->show($gL10n->get('LST_NO_RIGHTS_VIEW_LIST'));
        }
    } else {
        // forward to login page
        require_once '../../system/login_valid.php';
    }
}
// Get list configurations
$listConfigurations = $lists->getListConfigurations();
foreach ($listConfigurations as &$rowConfigurations) {
    if ($rowConfigurations[2] == 0) {
        $rowConfigurations[2] = $gL10n->get('LST_YOUR_LISTS');
    } else {
        $rowConfigurations[2] = $gL10n->get('LST_GENERAL_LISTS');
    }
}
// add list item for own list
$listConfigurations[] = array('mylist', $gL10n->get('LST_CREATE_OWN_LIST'), $gL10n->get('LST_CONFIGURATION'));
// Create role object
$role = new TableRoles($gDb);
foreach ($listsResult['recordset'] as $row) {
    // Put data to Roleobject
    $role->setArray($row);
    // if category is different than previous, close old and open new one