define(ROOT_PATH, '../'); include_once ROOT_PATH . 'includes/common.inc.php'; include_once ROOT_PATH . 'includes/template.inc.php'; include_once ROOT_PATH . 'classes/group.inc.php'; include_once ROOT_PATH . 'modules/authorisation/interface.inc.php'; //check if User is allowed to view this file // if ($userdata['user_level'] != 1) // { // error_report(AUTH_ERROR, 'no_admin' , __LINE__, __FILE__,$sql); // } $usergroup = $_GET['usergroup']; if (!isset($usergroup)) { $usergroup = 1; } $sel_group = new usergroup(); $sel_group->generate_from_id($usergroup); // if (isset($del_usergroup)) // { // // $del_group = new usergroup(); // $del_group->generate_from_id($del_usergroup); // $del_group->delete(); // // } // // // // // if (isset($HTTP_POST_VARS['new_usergroup'])) // { //
$usergroups[] = $group; } foreach ($HTTP_SESSION_VARS['default_usergroup_ids'] as $key => $group_ids) { $group_obj = new usergroup(); if ($group_obj->generate_from_id($group_ids) == OP_SUCCESSFUL) { $group['id'] = $group_obj->id; $group['name'] = $group_obj->get_name(); $default_usergroups[] = $group; } else { // delete unproper entries unset($HTTP_SESSION_VARS['default_usergroup_ids'][$key]); } } foreach ($HTTP_SESSION_VARS['registered_users_usergroup_ids'] as $key => $group_ids) { $group_obj = new usergroup(); if ($group_obj->generate_from_id($group_ids) == OP_SUCCESSFUL) { $group['id'] = $group_obj->id; $group['name'] = $group_obj->get_name(); $registered_users_usergroups[] = $group; } else { // delete unproper entries unset($HTTP_SESSION_VARS['registered_users_usergroup_ids'][$key]); } } $smarty->assign('default_usergroup_ids', $default_usergroups); $smarty->assign('registered_users_usergroup_ids', $registered_users_usergroups); @$smarty->assign('not_default_usergroup_ids', array_minus_array($usergroups, $default_usergroups)); @$smarty->assign('not_registered_users_usergroup_ids', array_minus_array($usergroups, $registered_users_usergroups)); $smarty->assign('installed_templates', get_installed_templates()); $smarty->assign('installed_language', get_installed_languages()); $smarty->assign('config_vars', $config_vars);