Пример #1
0
    } else {
        if ($EXTERN_ALLOW_ACCESS_WITHOUT_CONFIG) {
            // use default configuraion
            $default = 'DEFAULT';
            $config_id = '';
        } else {
            echo $EXTERN_ERROR_MESSAGE;
            exit;
        }
    }
}

// if there is no global_id or global_name, take the DEFAULT global configuration
if ($global_name) {
    // check for valid configuration name and convert it into a config_id
    if (!$global_id = ExternConfig::GetConfigurationByName($range_id, $type, $config_name)) {
        echo $EXTERN_ERROR_MESSAGE;
        exit;
    }
}
elseif (!$global_id) {
    // check for standard configuration
    if ($id = ExternConfig::GetGlobalConfiguration($range_id))
        $global_id = $id;
    else {
        // use no global configuration
        $global_id = NULL;
    }
}

// sem == -1: show data from last semester