acl_get('a_group') ) { return; } $module['GROUP']['MANAGE'] = basename(__FILE__) . "$SID"; return; } define('IN_PHPBB', 1); // Include files $phpbb_root_path = '../'; require($phpbb_root_path . 'extension.inc'); require('pagestart.' . $phpEx); // Do we have general permissions? if (!$auth->acl_get('a_group') ) { trigger_error($user->lang['NO_ADMIN']); } // Check and set some common vars $action = (isset($_REQUEST['action']))? $_REQUEST['action'] : ((isset($_POST['addgroup'])) ? 'addgroup' : ''); $group_id = (isset($_REQUEST['g']))? intval($_REQUEST['g']) : ''; // Which page? page_header($user->lang['MANAGE']); switch ($action) { case 'edit': case 'addgroup': if (isset($_POST['submit'])) { $group_name = (!empty($_POST['group_name'])) ? $_POST['group_name'] : ''; $group_description = (!empty($_POST['group_description'])) ? $_POST['group_description'] : ''; $group_type = (!empty($_POST['group_type'])) ? $_POST['group_type'] : ''; $group_color = (!empty($_POST['group_color'])) ? $_POST['group_color'] : ''; $group_rank = (!empty($_POST['group_rank'])) ? $_POST['group_rank'] : ''; $force_color = (!empty($_POST['force_color'])) ? true : false; // Check data if ($group_color != '') { $color_sql = (!$force_color) ? "AND user_colour = ''" : ''; switch (SQL_LAYER) { case 'mysql': case 'mysql4': $sql = "SELECT user_id FROM " . USER_GROUP_TABLE . " WHERE group_id = $group_id"; $result = $db->sql_query($sql); if ($row = $db->sql_fetchrow($result)) { $user_id_sql = ''; do { $user_id_sql .= (($user_id_sql != '') ? ', ' : '') . $row['user_id']; } while ($row = $db->sql_fetchrow($result)); $sql = "UPDATE " . USERS_TABLE . " SET user_colour = '$group_color' WHERE user_id IN ($user_id_sql) $color_sql"; $db->sql_query($sql); } $db->sql_freeresult($result); unset($user_id_sql); break; default: $sql = "UPDATE " . USERS_TABLE . " SET user_colour = '$group_color' WHERE user_id IN ( SELECT user_id FROM " . USER_GROUP_TABLE . " WHERE group_id = $group_id) $color_sql"; $db->sql_query($sql); } trigger_error('Done'); } } if ($action == 'edit' && empty($_POST['submit'])) { $sql = "SELECT * FROM " . GROUPS_TABLE . " WHERE group_id = $group_id"; $result = $db->sql_query($sql); if (!extract($db->sql_fetchrow($result))) { trigger_error($user->lang['NO_GROUP']); } } ?>

lang['MANAGE'] . ' : ' . $group_name . ''; ?>

lang['GROUP_EDIT_EXPLAIN']; ?>

sql_query($sql); $rank_options = ''; if ($row = $db->sql_fetchrow($result)) { do { $selected = (!empty($group_rank) && $row['rank_id'] == $group_rank) ? ' selected="selected"' : ''; $rank_options .= ''; } while ($row = $db->sql_fetchrow($result)); } $type_open = ($group_type == GROUP_OPEN) ? ' checked="checked"' : ''; $type_closed = ($group_type == GROUP_CLOSED) ? ' checked="checked"' : ''; $type_hidden = ($group_type == GROUP_HIDDEN) ? ' checked="checked"' : ''; $type_free = ($group_type == GROUP_FREE) ? ' checked="checked"' : ''; $force_color_yes = (!isset($force_color) || $force_color) ? ' checked="checked"' : ''; $force_color_no = (isset($force_color) && !$force_color) ? ' checked="checked"' : ''; ?>
">
lang['GROUP_DETAILS']; ?>
lang['GROUP_NAME']; ?>: lang['G_' . $group_name])) ? $user->lang['G_' . $group_name] : $group_name; ?>
lang['GROUP_DESC']; ?>:
lang['GROUP_TYPE']; ?>:
lang['GROUP_TYPE_EXPLAIN']; ?>
/> lang['GROUP_OPEN']; ?>   /> lang['GROUP_REQUEST']; ?>   /> lang['GROUP_CLOSED']; ?>   /> lang['GROUP_HIDDEN']; ?>
lang['GROUP_SETTINGS_SAVE']; ?>
lang['GROUP_COLOR']; ?>:
lang['GROUP_COLOR_EXPLAIN'], '', ''); ?>
/> lang['FORCE_COLOR']; ?>   /> lang['USER_COLOR']; ?>
lang['GROUP_RANK']; ?>:
lang['GROUP_AVATAR']; ?>:
lang['GROUP_AVATAR_EXPLAIN']; ?>
 
 

lang['GROUP_SETTINGS']; ?>

lang['GROUP_SETTINGS_EXPLAIN']; ?>

">
lang['GROUP_SETTINGS']; ?>
lang['GROUP_LANG']; ?>:
lang['GROUP_TIMEZONE']; ?>:
lang['GROUP_DST']; ?>: lang['DISABLED']; ?>   lang['ENABLED']; ?>   lang['USER_DEFAULT']; ?>
 

lang['GROUP_MEMBERS']; ?>

lang['GROUP_LIST_EXPLAIN']; ?>

">
lang['']; ?>

lang['MANAGE']; ?>

lang['GROUP_MANAGE_EXPLAIN']; ?>

lang['USER_DEF_GROUPS']; ?>

lang['USER_DEF_GROUPS_EXPLAIN']; ?>

">sql_query($sql); $pending = array(); if ($row = $db->sql_fetchrow($result) ) { do { $pending[$row['group_id']][] = $row; } while ($row = $db->sql_fetchrow($result) ); } $db->sql_freeresult($result); $sql = "SELECT group_id, group_name, group_type FROM " . GROUPS_TABLE . " ORDER BY group_type ASC, group_name"; $result = $db->sql_query($sql); $special_toggle = false; if ($row = $db->sql_fetchrow($result) ) { do { if ($row['group_type'] == GROUP_SPECIAL && !$special_toggle) { $special_toggle = true; ?>
lang['MANAGE']; ?> lang['ACTION']; ?>

lang['SPECIAL_GROUPS']; ?>

lang['SPECIAL_GROUPS_EXPLAIN']; ?>

lang['G_' . $row['group_name']]))? $user->lang['G_' . $row['group_name']] : $row['group_name']; ?> sql_fetchrow($result) ); } $db->sql_freeresult($result); ?>
lang['MANAGE']; ?> lang['ACTION']; ?>
">  ">lang['ADD']; ?> | ">lang['EDIT']; ?> | ">lang['DELETE']; ?>