PUN_ADMIN) message($lang_common['No permission']); // Add/edit a group (stage 1) if (isset($_POST['add_group']) || isset($_GET['edit_group'])) { if (isset($_POST['add_group'])) { $base_group = intval($_POST['base_group']); $result = $db->query('SELECT * FROM '.$db->prefix.'groups WHERE g_id='.$base_group) or error('Impossible de retrouver les informations de groupes utilisateurs', __FILE__, __LINE__, $db->error()); $group = $db->fetch_assoc($result); $mode = 'add'; } else // We are editing a group { $group_id = intval($_GET['edit_group']); if ($group_id < 1) message($lang_common['Bad request']); $result = $db->query('SELECT * FROM '.$db->prefix.'groups WHERE g_id='.$group_id) or error('Impossible de retrouver les informations de groupes utilisateurs', __FILE__, __LINE__, $db->error()); if (!$db->num_rows($result)) message($lang_common['Bad request']); $group = $db->fetch_assoc($result); $mode = 'edit'; } $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Groupes'; $required_fields = array('req_title' => 'Nom groupe'); $focus_element = array('groups2', 'req_title'); require PUN_ROOT.'header.php'; generate_admin_menu('groups'); ?>