Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/rsr.v5.1.dev/web/punbb/admin_groups.php

    r3 r1  
    11<?php
    2 
    3 /**
    4  * Copyright (C) 2008-2011 FluxBB
    5  * based on code by Rickard Andersson copyright (C) 2002-2008 PunBB
    6  * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
    7  */
     2/***********************************************************************
     3
     4  Copyright (C) 2002-2005  Rickard Andersson (rickard@punbb.org)
     5
     6  This file is part of PunBB.
     7
     8  PunBB is free software; you can redistribute it and/or modify it
     9  under the terms of the GNU General Public License as published
     10  by the Free Software Foundation; either version 2 of the License,
     11  or (at your option) any later version.
     12
     13  PunBB is distributed in the hope that it will be useful, but
     14  WITHOUT ANY WARRANTY; without even the implied warranty of
     15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16  GNU General Public License for more details.
     17
     18  You should have received a copy of the GNU General Public License
     19  along with this program; if not, write to the Free Software
     20  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
     21  MA  02111-1307  USA
     22
     23************************************************************************/
     24
    825
    926// Tell header.php to use the admin template
    1027define('PUN_ADMIN_CONSOLE', 1);
    1128
    12 define('PUN_ROOT', dirname(__FILE__).'/');
     29define('PUN_ROOT', './');
    1330require PUN_ROOT.'include/common.php';
    1431require PUN_ROOT.'include/common_admin.php';
    1532
    1633
    17 if ($pun_user['g_id'] != PUN_ADMIN)
     34if ($pun_user['g_id'] > PUN_ADMIN)
    1835        message($lang_common['No permission']);
    1936
    20 // Load the admin_censoring.php language file
    21 require PUN_ROOT.'lang/'.$admin_language.'/admin_groups.php';
    2237
    2338// Add/edit a group (stage 1)
     
    2843                $base_group = intval($_POST['base_group']);
    2944
    30                 $result = $db->query('SELECT * FROM '.$db->prefix.'groups WHERE g_id='.$base_group) or error('Unable to fetch user group info', __FILE__, __LINE__, $db->error());
     45                $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());
    3146                $group = $db->fetch_assoc($result);
    3247
    3348                $mode = 'add';
    3449        }
    35         else // We are editing a group
     50        else    // We are editing a group
    3651        {
    3752                $group_id = intval($_GET['edit_group']);
     
    3954                        message($lang_common['Bad request']);
    4055
    41                 $result = $db->query('SELECT * FROM '.$db->prefix.'groups WHERE g_id='.$group_id) or error('Unable to fetch user group info', __FILE__, __LINE__, $db->error());
     56                $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());
    4257                if (!$db->num_rows($result))
    4358                        message($lang_common['Bad request']);
     
    4964
    5065
    51         $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['User groups']);
    52         $required_fields = array('req_title' => $lang_admin_groups['Group title label']);
     66        $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Groupes';
     67        $required_fields = array('req_title' => 'Nom groupe');
    5368        $focus_element = array('groups2', 'req_title');
    54         define('PUN_ACTIVE_PAGE', 'admin');
    5569        require PUN_ROOT.'header.php';
    5670
     
    5973?>
    6074        <div class="blockform">
    61                 <h2><span><?php echo $lang_admin_groups['Group settings head'] ?></span></h2>
     75                <h2><span>Réglages du groupe</span></h2>
    6276                <div class="box">
    6377                        <form id="groups2" method="post" action="admin_groups.php" onsubmit="return process_form(this)">
    64                                 <p class="submittop"><input type="submit" name="add_edit_group" value="<?php echo $lang_admin_common['Save'] ?>" /></p>
     78                                <p class="submittop"><input type="submit" name="add_edit_group" value=" Enregistrer " /></p>
    6579                                <div class="inform">
    6680                                        <input type="hidden" name="mode" value="<?php echo $mode ?>" />
    67 <?php if ($mode == 'edit'): ?>                                  <input type="hidden" name="group_id" value="<?php echo $group_id ?>" />
    68 <?php endif; ?><?php if ($mode == 'add'): ?>                                    <input type="hidden" name="base_group" value="<?php echo $base_group ?>" />
     81<?php if ($mode == 'edit'): ?>                          <input type="hidden" name="group_id" value="<?php echo $group_id ?>" />
     82<?php endif; ?><?php if ($mode == 'add'): ?>                            <input type="hidden" name="base_group" value="<?php echo $base_group ?>" />
    6983<?php endif; ?>                                 <fieldset>
    70                                                 <legend><?php echo $lang_admin_groups['Group settings subhead'] ?></legend>
     84                                                <legend>Réglages des options et des permissions de groupe</legend>
    7185                                                <div class="infldset">
    72                                                         <p><?php echo $lang_admin_groups['Group settings info'] ?></p>
     86                                                        <p>Les options et permissions ci-dessous sont les permissions par défaut pour le groupe. Ces options s'appliquent s'il n'y a pas de réglages de permissions spécifiques à un forum.</p>
    7387                                                        <table class="aligntop" cellspacing="0">
    7488                                                                <tr>
    75                                                                         <th scope="row"><?php echo $lang_admin_groups['Group title label'] ?></th>
     89                                                                        <th scope="row">Nom groupe</th>
    7690                                                                        <td>
    7791                                                                                <input type="text" name="req_title" size="25" maxlength="50" value="<?php if ($mode == 'edit') echo pun_htmlspecialchars($group['g_title']); ?>" tabindex="1" />
     
    7993                                                                </tr>
    8094                                                                <tr>
    81                                                                         <th scope="row"><?php echo $lang_admin_groups['User title label'] ?></th>
     95                                                                        <th scope="row">Titre utilisateur</th>
    8296                                                                        <td>
    8397                                                                                <input type="text" name="user_title" size="25" maxlength="50" value="<?php echo pun_htmlspecialchars($group['g_user_title']) ?>" tabindex="2" />
    84                                                                                 <span><?php echo $lang_admin_groups['User title help'] ?></span>
    85                                                                         </td>
    86                                                                 </tr>
    87 <?php if ($group['g_id'] != PUN_ADMIN): if ($group['g_id'] != PUN_GUEST): if ($mode != 'edit' || $pun_config['o_default_user_group'] != $group['g_id']): ?>                                                             <tr>
    88                                                                         <th scope="row"> <?php echo $lang_admin_groups['Mod privileges label'] ?></th>
    89                                                                         <td>
    90                                                                                 <input type="radio" name="moderator" value="1"<?php if ($group['g_moderator'] == '1') echo ' checked="checked"' ?> tabindex="3" />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong>&#160;&#160;&#160;<input type="radio" name="moderator" value="0"<?php if ($group['g_moderator'] == '0') echo ' checked="checked"' ?> tabindex="4" />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong>
    91                                                                                 <span><?php echo $lang_admin_groups['Mod privileges help'] ?></span>
    92                                                                         </td>
    93                                                                 </tr>
    94                                                                 <tr>
    95                                                                         <th scope="row"><?php echo $lang_admin_groups['Edit profile label'] ?></th>
    96                                                                         <td>
    97                                                                                 <input type="radio" name="mod_edit_users" value="1"<?php if ($group['g_mod_edit_users'] == '1') echo ' checked="checked"' ?> tabindex="5" />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong>&#160;&#160;&#160;<input type="radio" name="mod_edit_users" value="0"<?php if ($group['g_mod_edit_users'] == '0') echo ' checked="checked"' ?> tabindex="6" />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong>
    98                                                                                 <span><?php echo $lang_admin_groups['Edit profile help'] ?></span>
    99                                                                         </td>
    100                                                                 </tr>
    101                                                                 <tr>
    102                                                                         <th scope="row"><?php echo $lang_admin_groups['Rename users label'] ?></th>
    103                                                                         <td>
    104                                                                                 <input type="radio" name="mod_rename_users" value="1"<?php if ($group['g_mod_rename_users'] == '1') echo ' checked="checked"' ?> tabindex="7" />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong>&#160;&#160;&#160;<input type="radio" name="mod_rename_users" value="0"<?php if ($group['g_mod_rename_users'] == '0') echo ' checked="checked"' ?> tabindex="8" />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong>
    105                                                                                 <span><?php echo $lang_admin_groups['Rename users help'] ?></span>
    106                                                                         </td>
    107                                                                 </tr>
    108                                                                 <tr>
    109                                                                         <th scope="row"><?php echo $lang_admin_groups['Change passwords label'] ?></th>
    110                                                                         <td>
    111                                                                                 <input type="radio" name="mod_change_passwords" value="1"<?php if ($group['g_mod_change_passwords'] == '1') echo ' checked="checked"' ?> tabindex="9" />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong>&#160;&#160;&#160;<input type="radio" name="mod_change_passwords" value="0"<?php if ($group['g_mod_change_passwords'] == '0') echo ' checked="checked"' ?> tabindex="10" />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong>
    112                                                                                 <span><?php echo $lang_admin_groups['Change passwords help'] ?></span>
    113                                                                         </td>
    114                                                                 </tr>
    115                                                                 <tr>
    116                                                                         <th scope="row"><?php echo $lang_admin_groups['Ban users label'] ?></th>
    117                                                                         <td>
    118                                                                                 <input type="radio" name="mod_ban_users" value="1"<?php if ($group['g_mod_ban_users'] == '1') echo ' checked="checked"' ?> tabindex="11" />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong>&#160;&#160;&#160;<input type="radio" name="mod_ban_users" value="0"<?php if ($group['g_mod_ban_users'] == '0') echo ' checked="checked"' ?> tabindex="12" />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong>
    119                                                                                 <span><?php echo $lang_admin_groups['Ban users help'] ?></span>
    120                                                                         </td>
    121                                                                 </tr>
    122 <?php endif; endif; ?>                                                          <tr>
    123                                                                         <th scope="row"><?php echo $lang_admin_groups['Read board label'] ?></th>
    124                                                                         <td>
    125                                                                                 <input type="radio" name="read_board" value="1"<?php if ($group['g_read_board'] == '1') echo ' checked="checked"' ?> tabindex="13" />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong>&#160;&#160;&#160;<input type="radio" name="read_board" value="0"<?php if ($group['g_read_board'] == '0') echo ' checked="checked"' ?> tabindex="14" />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong>
    126                                                                                 <span><?php echo $lang_admin_groups['Read board help'] ?></span>
    127                                                                         </td>
    128                                                                 </tr>
    129                                                                 <tr>
    130                                                                         <th scope="row"><?php echo $lang_admin_groups['View user info label'] ?></th>
    131                                                                         <td>
    132                                                                                 <input type="radio" name="view_users" value="1"<?php if ($group['g_view_users'] == '1') echo ' checked="checked"' ?> tabindex="15" />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong>&#160;&#160;&#160;<input type="radio" name="view_users" value="0"<?php if ($group['g_view_users'] == '0') echo ' checked="checked"' ?> tabindex="16" />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong>
    133                                                                                 <span><?php echo $lang_admin_groups['View user info help'] ?></span>
    134                                                                         </td>
    135                                                                 </tr>
    136                                                                 <tr>
    137                                                                         <th scope="row"><?php echo $lang_admin_groups['Post replies label'] ?></th>
    138                                                                         <td>
    139                                                                                 <input type="radio" name="post_replies" value="1"<?php if ($group['g_post_replies'] == '1') echo ' checked="checked"' ?> tabindex="17" />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong>&#160;&#160;&#160;<input type="radio" name="post_replies" value="0"<?php if ($group['g_post_replies'] == '0') echo ' checked="checked"' ?> tabindex="18" />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong>
    140                                                                                 <span><?php echo $lang_admin_groups['Post replies help'] ?></span>
    141                                                                         </td>
    142                                                                 </tr>
    143                                                                 <tr>
    144                                                                         <th scope="row"><?php echo $lang_admin_groups['Post topics label'] ?></th>
    145                                                                         <td>
    146                                                                                 <input type="radio" name="post_topics" value="1"<?php if ($group['g_post_topics'] == '1') echo ' checked="checked"' ?> tabindex="19" />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong>&#160;&#160;&#160;<input type="radio" name="post_topics" value="0"<?php if ($group['g_post_topics'] == '0') echo ' checked="checked"' ?> tabindex="20" />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong>
    147                                                                                 <span><?php echo $lang_admin_groups['Post topics help'] ?></span>
     98                                                                                <span>Ce titre remplacera n'importe quel nom de rang que les utilisateurs de ce groupe auront atteint. Laissez vide pour utiliser le titre par défaut ou le rang.</span>
     99                                                                        </td>
     100                                                                </tr>
     101<?php if ($group['g_id'] != PUN_ADMIN): ?>                                                              <tr>
     102                                                                        <th scope="row">Lire forums</th>
     103                                                                        <td>
     104                                                                                <input type="radio" name="read_board" value="1"<?php if ($group['g_read_board'] == '1') echo ' checked="checked"' ?> tabindex="3" />&#160;<strong>Oui</strong>&#160;&#160;&#160;<input type="radio" name="read_board" value="0"<?php if ($group['g_read_board'] == '0') echo ' checked="checked"' ?> tabindex="4" />&#160;<strong>Non</strong>
     105                                                                                <span>Autoriser les utilisateurs de ce groupe à voir les forums. Ce réglage s'applique à tous les aspects des forums et ne peut être outrepassé par les permissions spécifiques aux forums. Avec cette option à non les utilisateurs de ce groupe ne pourront que s'identifier/se déconnecter.</span>
     106                                                                        </td>
     107                                                                </tr>
     108                                                                <tr>
     109                                                                        <th scope="row">Écrire des réponses</th>
     110                                                                        <td>
     111                                                                                <input type="radio" name="post_replies" value="1"<?php if ($group['g_post_replies'] == '1') echo ' checked="checked"' ?> tabindex="5" />&#160;<strong>Oui</strong>&#160;&#160;&#160;<input type="radio" name="post_replies" value="0"<?php if ($group['g_post_replies'] == '0') echo ' checked="checked"' ?> tabindex="6" />&#160;<strong>Non</strong>
     112                                                                                <span>Autoriser les utilisateurs de ce groupe à écrire des réponses aux discussions.</span>
     113                                                                        </td>
     114                                                                </tr>
     115                                                                <tr>
     116                                                                        <th scope="row">Lancer des discussions</th>
     117                                                                        <td>
     118                                                                                <input type="radio" name="post_topics" value="1"<?php if ($group['g_post_topics'] == '1') echo ' checked="checked"' ?> tabindex="7" />&#160;<strong>Oui</strong>&#160;&#160;&#160;<input type="radio" name="post_topics" value="0"<?php if ($group['g_post_topics'] == '0') echo ' checked="checked"' ?> tabindex="8" />&#160;<strong>Non</strong>
     119                                                                                <span>Autoriser les utilisateurs de ce groupe à lancer des nouveaux sujets.</span>
    148120                                                                        </td>
    149121                                                                </tr>
    150122<?php if ($group['g_id'] != PUN_GUEST): ?>                                                              <tr>
    151                                                                         <th scope="row"><?php echo $lang_admin_groups['Edit posts label'] ?></th>
    152                                                                         <td>
    153                                                                                 <input type="radio" name="edit_posts" value="1"<?php if ($group['g_edit_posts'] == '1') echo ' checked="checked"' ?> tabindex="21" />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong>&#160;&#160;&#160;<input type="radio" name="edit_posts" value="0"<?php if ($group['g_edit_posts'] == '0') echo ' checked="checked"' ?> tabindex="22" />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong>
    154                                                                                 <span><?php echo $lang_admin_groups['Edit posts help'] ?></span>
    155                                                                         </td>
    156                                                                 </tr>
    157                                                                 <tr>
    158                                                                         <th scope="row"><?php echo $lang_admin_groups['Delete posts label'] ?></th>
    159                                                                         <td>
    160                                                                                 <input type="radio" name="delete_posts" value="1"<?php if ($group['g_delete_posts'] == '1') echo ' checked="checked"' ?> tabindex="23" />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong>&#160;&#160;&#160;<input type="radio" name="delete_posts" value="0"<?php if ($group['g_delete_posts'] == '0') echo ' checked="checked"' ?> tabindex="24" />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong>
    161                                                                                 <span><?php echo $lang_admin_groups['Delete posts help'] ?></span>
    162                                                                         </td>
    163                                                                 </tr>
    164                                                                 <tr>
    165                                                                         <th scope="row"><?php echo $lang_admin_groups['Delete topics label'] ?></th>
    166                                                                         <td>
    167                                                                                 <input type="radio" name="delete_topics" value="1"<?php if ($group['g_delete_topics'] == '1') echo ' checked="checked"' ?> tabindex="25" />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong>&#160;&#160;&#160;<input type="radio" name="delete_topics" value="0"<?php if ($group['g_delete_topics'] == '0') echo ' checked="checked"' ?> tabindex="26" />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong>
    168                                                                                 <span><?php echo $lang_admin_groups['Delete topics help'] ?></span>
    169                                                                         </td>
    170                                                                 </tr>
    171                                                                 <tr>
    172                                                                         <th scope="row"><?php echo $lang_admin_groups['Set own title label'] ?></th>
    173                                                                         <td>
    174                                                                                 <input type="radio" name="set_title" value="1"<?php if ($group['g_set_title'] == '1') echo ' checked="checked"' ?> tabindex="27" />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong>&#160;&#160;&#160;<input type="radio" name="set_title" value="0"<?php if ($group['g_set_title'] == '0') echo ' checked="checked"' ?> tabindex="28" />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong>
    175                                                                                 <span><?php echo $lang_admin_groups['Set own title help'] ?></span>
     123                                                                        <th scope="row">Modifier messages</th>
     124                                                                        <td>
     125                                                                                <input type="radio" name="edit_posts" value="1"<?php if ($group['g_edit_posts'] == '1') echo ' checked="checked"' ?> tabindex="11" />&#160;<strong>Oui</strong>&#160;&#160;&#160;<input type="radio" name="edit_posts" value="0"<?php if ($group['g_edit_posts'] == '0') echo ' checked="checked"' ?> tabindex="12" />&#160;<strong>Non</strong>
     126                                                                                <span>Autoriser les utilisateurs de ce groupe à modifier leurs propres messages.</span>
     127                                                                        </td>
     128                                                                </tr>
     129                                                                <tr>
     130                                                                        <th scope="row">Effacer les messages</th>
     131                                                                        <td>
     132                                                                                <input type="radio" name="delete_posts" value="1"<?php if ($group['g_delete_posts'] == '1') echo ' checked="checked"' ?> tabindex="13" />&#160;<strong>Oui</strong>&#160;&#160;&#160;<input type="radio" name="delete_posts" value="0"<?php if ($group['g_delete_posts'] == '0') echo ' checked="checked"' ?> tabindex="14" />&#160;<strong>Non</strong>
     133                                                                                <span>Autoriser les utilisateurs de ce groupe à effacer leurs propres messages.</span>
     134                                                                        </td>
     135                                                                </tr>
     136                                                                <tr>
     137                                                                        <th scope="row">Effacer les discussions</th>
     138                                                                        <td>
     139                                                                                <input type="radio" name="delete_topics" value="1"<?php if ($group['g_delete_topics'] == '1') echo ' checked="checked"' ?> tabindex="15" />&#160;<strong>Oui</strong>&#160;&#160;&#160;<input type="radio" name="delete_topics" value="0"<?php if ($group['g_delete_topics'] == '0') echo ' checked="checked"' ?> tabindex="16" />&#160;<strong>Non</strong>
     140                                                                                <span>Autoriser les utilisateurs de ce groupe à effacer leurs propres sujets (y compris toutes les réponses).</span>
     141                                                                        </td>
     142                                                                </tr>
     143                                                                <tr>
     144                                                                        <th scope="row">Titre personnalisé</th>
     145                                                                        <td>
     146                                                                                <input type="radio" name="set_title" value="1"<?php if ($group['g_set_title'] == '1') echo ' checked="checked"' ?> tabindex="17" />&#160;<strong>Oui</strong>&#160;&#160;&#160;<input type="radio" name="set_title" value="0"<?php if ($group['g_set_title'] == '0') echo ' checked="checked"' ?> tabindex="18" />
     147                                                                                &#160;<strong>Non</strong>
     148                                                                                <span>Autoriser les utilisateurs de ce groupe à modifier leur propre titre utilisateur.</span>
    176149                                                                        </td>
    177150                                                                </tr>
    178151<?php endif; ?>                                                         <tr>
    179                                                                         <th scope="row"><?php echo $lang_admin_groups['User search label'] ?></th>
    180                                                                         <td>
    181                                                                                 <input type="radio" name="search" value="1"<?php if ($group['g_search'] == '1') echo ' checked="checked"' ?> tabindex="29" />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong>&#160;&#160;&#160;<input type="radio" name="search" value="0"<?php if ($group['g_search'] == '0') echo ' checked="checked"' ?> tabindex="30" />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong>
    182                                                                                 <span><?php echo $lang_admin_groups['User search help'] ?></span>
    183                                                                         </td>
    184                                                                 </tr>
    185                                                                 <tr>
    186                                                                         <th scope="row"><?php echo $lang_admin_groups['User list search label'] ?></th>
    187                                                                         <td>
    188                                                                                 <input type="radio" name="search_users" value="1"<?php if ($group['g_search_users'] == '1') echo ' checked="checked"' ?> tabindex="31" />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong>&#160;&#160;&#160;<input type="radio" name="search_users" value="0"<?php if ($group['g_search_users'] == '0') echo ' checked="checked"' ?> tabindex="32" />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong>
    189                                                                                 <span><?php echo $lang_admin_groups['User list search help'] ?></span>
     152                                                                        <th scope="row">Utiliser la recherche</th>
     153                                                                        <td>
     154                                                                                <input type="radio" name="search" value="1"<?php if ($group['g_search'] == '1') echo ' checked="checked"' ?> tabindex="19" />&#160;<strong>Oui</strong>&#160;&#160;&#160;<input type="radio" name="search" value="0"<?php if ($group['g_search'] == '0') echo ' checked="checked"' ?> tabindex="20" />&#160;<strong>Non</strong>
     155                                                                                <span>Autoriser les utilisateurs de ce groupe à utiliser la fonction de recherche sur les forums.</span>
     156                                                                        </td>
     157                                                                </tr>
     158                                                                <tr>
     159                                                                        <th scope="row">Recherche d'utilisateur</th>
     160                                                                        <td>
     161                                                                                <input type="radio" name="search_users" value="1"<?php if ($group['g_search_users'] == '1') echo ' checked="checked"' ?> tabindex="21" />&#160;<strong>Oui</strong>&#160;&#160;&#160;<input type="radio" name="search_users" value="0"<?php if ($group['g_search_users'] == '0') echo ' checked="checked"' ?> tabindex="22" />&#160;<strong>Non</strong>
     162                                                                                <span>Autoriser les utilisateurs de ce groupe à utiliser       un texte libre pour rechercher dans la liste des utilisateurs.</span>
    190163                                                                        </td>
    191164                                                                </tr>
    192165<?php if ($group['g_id'] != PUN_GUEST): ?>                                                              <tr>
    193                                                                         <th scope="row"><?php echo $lang_admin_groups['Send e-mails label'] ?></th>
    194                                                                         <td>
    195                                                                                 <input type="radio" name="send_email" value="1"<?php if ($group['g_send_email'] == '1') echo ' checked="checked"' ?> tabindex="33" />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong>&#160;&#160;&#160;<input type="radio" name="send_email" value="0"<?php if ($group['g_send_email'] == '0') echo ' checked="checked"' ?> tabindex="34" />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong>
    196                                                                                 <span><?php echo $lang_admin_groups['Send e-mails help'] ?></span>
    197                                                                         </td>
    198                                                                 </tr>
    199 <?php endif; ?>                                                         <tr>
    200                                                                         <th scope="row"><?php echo $lang_admin_groups['Post flood label'] ?></th>
    201                                                                         <td>
    202                                                                                 <input type="text" name="post_flood" size="5" maxlength="4" value="<?php echo $group['g_post_flood'] ?>" tabindex="35" />
    203                                                                                 <span><?php echo $lang_admin_groups['Post flood help'] ?></span>
    204                                                                         </td>
    205                                                                 </tr>
    206                                                                 <tr>
    207                                                                         <th scope="row"><?php echo $lang_admin_groups['Search flood label'] ?></th>
    208                                                                         <td>
    209                                                                                 <input type="text" name="search_flood" size="5" maxlength="4" value="<?php echo $group['g_search_flood'] ?>" tabindex="36" />
    210                                                                                 <span><?php echo $lang_admin_groups['Search flood help'] ?></span>
    211                                                                         </td>
    212                                                                 </tr>
    213 <?php if ($group['g_id'] != PUN_GUEST): ?>                                                              <tr>
    214                                                                         <th scope="row"><?php echo $lang_admin_groups['E-mail flood label'] ?></th>
    215                                                                         <td>
    216                                                                                 <input type="text" name="email_flood" size="5" maxlength="4" value="<?php echo $group['g_email_flood'] ?>" tabindex="37" />
    217                                                                                 <span><?php echo $lang_admin_groups['E-mail flood help'] ?></span>
    218                                                                         </td>
    219                                                                 </tr>
    220                                                                 <tr>
    221                                                                         <th scope="row"><?php echo $lang_admin_groups['Report flood label'] ?></th>
    222                                                                         <td>
    223                                                                                 <input type="text" name="report_flood" size="5" maxlength="4" value="<?php echo $group['g_report_flood'] ?>" tabindex="38" />
    224                                                                                 <span><?php echo $lang_admin_groups['Report flood help'] ?></span>
    225                                                                         </td>
    226                                                                 </tr>
    227 <?php endif; endif; ?>                                                  </table>
    228 <?php if ($group['g_moderator'] == '1' ): ?>                                                    <p class="warntext"><?php echo $lang_admin_groups['Moderator info'] ?></p>
     166                                                                        <th scope="row">Intervalle pour modifier le sujet d'une discussion</th>
     167                                                                        <td>
     168                                                                                <input type="text" name="edit_subjects_interval" size="5" maxlength="5" value="<?php echo $group['g_edit_subjects_interval'] ?>" tabindex="23" />
     169                                                                                <span>Nombre de secondes aprÚs que le message ait été envoyé pendant lesquelles les utilisateurs de ce groupe pourront modifier le sujet d'une discussion qu'ils viennent de lancer. Mettre à 0 pour permettre la modification du sujet des discussions sans restriction dans le temps.</span>
     170                                                                        </td>
     171                                                                </tr>
     172                                                                <tr>
     173                                                                        <th scope="row">Intervalle de contrÃŽle de flood sur les messages</th>
     174                                                                        <td>
     175                                                                                <input type="text" name="post_flood" size="5" maxlength="4" value="<?php echo $group['g_post_flood'] ?>" tabindex="24" />
     176                                                                                <span>Nombre de secondes pendant lesquelles les utilisateurs de ce groupe devront patienter entre deux messages. Mettre à 0 pour désactiver le contrÃŽle de flood sur les messages.</span>
     177                                                                        </td>
     178                                                                </tr>
     179                                                                <tr>
     180                                                                        <th scope="row">Intervalle de contrÃŽle de flood sur les recherches</th>
     181                                                                        <td>
     182                                                                                <input type="text" name="search_flood" size="5" maxlength="4" value="<?php echo $group['g_search_flood'] ?>" tabindex="25" />
     183                                                                                <span>Nombre de secondes pendant lesquelles les utilisateurs de ce groupe devront patienter entre deux recherches. Mettre à 0 pour désactiver le contrÃŽle de flood sur les recherches.</span>
     184                                                                        </td>
     185                                                                </tr>
     186<?php endif; ?><?php endif; ?>                                                  </table>
     187<?php if ($group['g_id'] == PUN_MOD ): ?>                                                       <p class="warntext">Pour qu'un utilisateur de ce groupe acquiÚre les compétences de modérateur, il devra nécessairement être désigné comme modérateur d'un ou de plusieurs forums. Ceci est possible depuis la page d'administration du profil de l'utilisateur.</p>
    229188<?php endif; ?>                                         </div>
    230189                                        </fieldset>
    231190                                </div>
    232                                 <p class="submitend"><input type="submit" name="add_edit_group" value="<?php echo $lang_admin_common['Save'] ?>" tabindex="39" /></p>
     191                                <p class="submitend"><input type="submit" name="add_edit_group" value=" Enregistrer " tabindex="26" /></p>
    233192                        </form>
    234193                </div>
     
    250209        $is_admin_group = (isset($_POST['group_id']) && $_POST['group_id'] == PUN_ADMIN) ? true : false;
    251210
    252         $title = pun_trim($_POST['req_title']);
    253         $user_title = pun_trim($_POST['user_title']);
    254         $moderator = isset($_POST['moderator']) && $_POST['moderator'] == '1' ? '1' : '0';
    255         $mod_edit_users = $moderator == '1' && isset($_POST['mod_edit_users']) && $_POST['mod_edit_users'] == '1' ? '1' : '0';
    256         $mod_rename_users = $moderator == '1' && isset($_POST['mod_rename_users']) && $_POST['mod_rename_users'] == '1' ? '1' : '0';
    257         $mod_change_passwords = $moderator == '1' && isset($_POST['mod_change_passwords']) && $_POST['mod_change_passwords'] == '1' ? '1' : '0';
    258         $mod_ban_users = $moderator == '1' && isset($_POST['mod_ban_users']) && $_POST['mod_ban_users'] == '1' ? '1' : '0';
     211        $title = trim($_POST['req_title']);
     212        $user_title = trim($_POST['user_title']);
    259213        $read_board = isset($_POST['read_board']) ? intval($_POST['read_board']) : '1';
    260         $view_users = (isset($_POST['view_users']) && $_POST['view_users'] == '1') || $is_admin_group ? '1' : '0';
    261214        $post_replies = isset($_POST['post_replies']) ? intval($_POST['post_replies']) : '1';
    262215        $post_topics = isset($_POST['post_topics']) ? intval($_POST['post_topics']) : '1';
     
    267220        $search = isset($_POST['search']) ? intval($_POST['search']) : '1';
    268221        $search_users = isset($_POST['search_users']) ? intval($_POST['search_users']) : '1';
    269         $send_email = (isset($_POST['send_email']) && $_POST['send_email'] == '1') || $is_admin_group ? '1' : '0';
     222        $edit_subjects_interval = isset($_POST['edit_subjects_interval']) ? intval($_POST['edit_subjects_interval']) : '0';
    270223        $post_flood = isset($_POST['post_flood']) ? intval($_POST['post_flood']) : '0';
    271224        $search_flood = isset($_POST['search_flood']) ? intval($_POST['search_flood']) : '0';
    272         $email_flood = isset($_POST['email_flood']) ? intval($_POST['email_flood']) : '0';
    273         $report_flood = isset($_POST['report_flood']) ? intval($_POST['report_flood']) : '0';
    274225
    275226        if ($title == '')
    276                 message($lang_admin_groups['Must enter title message']);
     227                message('Vous devez saisir un nom de groupe.');
    277228
    278229        $user_title = ($user_title != '') ? '\''.$db->escape($user_title).'\'' : 'NULL';
     
    280231        if ($_POST['mode'] == 'add')
    281232        {
    282                 $result = $db->query('SELECT 1 FROM '.$db->prefix.'groups WHERE g_title=\''.$db->escape($title).'\'') or error('Unable to check group title collision', __FILE__, __LINE__, $db->error());
     233                $result = $db->query('SELECT 1 FROM '.$db->prefix.'groups WHERE g_title=\''.$db->escape($title).'\'') or error('Impossible de vérifier si un groupe porte déjà ce nom', __FILE__, __LINE__, $db->error());
    283234                if ($db->num_rows($result))
    284                         message(sprintf($lang_admin_groups['Title already exists message'], pun_htmlspecialchars($title)));
    285 
    286                 $db->query('INSERT INTO '.$db->prefix.'groups (g_title, g_user_title, g_moderator, g_mod_edit_users, g_mod_rename_users, g_mod_change_passwords, g_mod_ban_users, g_read_board, g_view_users, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_send_email, g_post_flood, g_search_flood, g_email_flood, g_report_flood) VALUES(\''.$db->escape($title).'\', '.$user_title.', '.$moderator.', '.$mod_edit_users.', '.$mod_rename_users.', '.$mod_change_passwords.', '.$mod_ban_users.', '.$read_board.', '.$view_users.', '.$post_replies.', '.$post_topics.', '.$edit_posts.', '.$delete_posts.', '.$delete_topics.', '.$set_title.', '.$search.', '.$search_users.', '.$send_email.', '.$post_flood.', '.$search_flood.', '.$email_flood.', '.$report_flood.')') or error('Unable to add group', __FILE__, __LINE__, $db->error());
     235                        message('Il existe déjà un groupe nommé \''.pun_htmlspecialchars($title).'\'.');
     236
     237                $db->query('INSERT INTO '.$db->prefix.'groups (g_title, g_user_title, g_read_board, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood) VALUES(\''.$db->escape($title).'\', '.$user_title.', '.$read_board.', '.$post_replies.', '.$post_topics.', '.$edit_posts.', '.$delete_posts.', '.$delete_topics.', '.$set_title.', '.$search.', '.$search_users.', '.$edit_subjects_interval.', '.$post_flood.', '.$search_flood.')') or error('Impossible d\'ajouter le groupe', __FILE__, __LINE__, $db->error());
    287238                $new_group_id = $db->insert_id();
    288239
    289240                // Now lets copy the forum specific permissions from the group which this group is based on
    290                 $result = $db->query('SELECT forum_id, read_forum, post_replies, post_topics FROM '.$db->prefix.'forum_perms WHERE group_id='.intval($_POST['base_group'])) or error('Unable to fetch group forum permission list', __FILE__, __LINE__, $db->error());
     241                $result = $db->query('SELECT forum_id, read_forum, post_replies, post_topics FROM '.$db->prefix.'forum_perms WHERE group_id='.intval($_POST['base_group'])) or error('Impossible de retrouver la liste des permissions de groupes du forum', __FILE__, __LINE__, $db->error());
    291242                while ($cur_forum_perm = $db->fetch_assoc($result))
    292                         $db->query('INSERT INTO '.$db->prefix.'forum_perms (group_id, forum_id, read_forum, post_replies, post_topics) VALUES('.$new_group_id.', '.$cur_forum_perm['forum_id'].', '.$cur_forum_perm['read_forum'].', '.$cur_forum_perm['post_replies'].', '.$cur_forum_perm['post_topics'].')') or error('Unable to insert group forum permissions', __FILE__, __LINE__, $db->error());
     243                        $db->query('INSERT INTO '.$db->prefix.'forum_perms (group_id, forum_id, read_forum, post_replies, post_topics) VALUES('.$new_group_id.', '.$cur_forum_perm['forum_id'].', '.$cur_forum_perm['read_forum'].', '.$cur_forum_perm['post_replies'].', '.$cur_forum_perm['post_topics'].')') or error('Impossible d\'insérer les permissions de groupes du forum', __FILE__, __LINE__, $db->error());
    293244        }
    294245        else
    295246        {
    296                 $result = $db->query('SELECT 1 FROM '.$db->prefix.'groups WHERE g_title=\''.$db->escape($title).'\' AND g_id!='.intval($_POST['group_id'])) or error('Unable to check group title collision', __FILE__, __LINE__, $db->error());
     247                $result = $db->query('SELECT 1 FROM '.$db->prefix.'groups WHERE g_title=\''.$db->escape($title).'\' AND g_id!='.intval($_POST['group_id'])) or error('impossible de vérifier une éventuelle collision des titres de groupes', __FILE__, __LINE__, $db->error());
    297248                if ($db->num_rows($result))
    298                         message(sprintf($lang_admin_groups['Title already exists message'], pun_htmlspecialchars($title)));
    299 
    300                 $db->query('UPDATE '.$db->prefix.'groups SET g_title=\''.$db->escape($title).'\', g_user_title='.$user_title.', g_moderator='.$moderator.', g_mod_edit_users='.$mod_edit_users.', g_mod_rename_users='.$mod_rename_users.', g_mod_change_passwords='.$mod_change_passwords.', g_mod_ban_users='.$mod_ban_users.', g_read_board='.$read_board.', g_view_users='.$view_users.', g_post_replies='.$post_replies.', g_post_topics='.$post_topics.', g_edit_posts='.$edit_posts.', g_delete_posts='.$delete_posts.', g_delete_topics='.$delete_topics.', g_set_title='.$set_title.', g_search='.$search.', g_search_users='.$search_users.', g_send_email='.$send_email.', g_post_flood='.$post_flood.', g_search_flood='.$search_flood.', g_email_flood='.$email_flood.', g_report_flood='.$report_flood.' WHERE g_id='.intval($_POST['group_id'])) or error('Unable to update group', __FILE__, __LINE__, $db->error());
    301         }
    302 
    303         // Regenerate the quick jump cache
    304         if (!defined('FORUM_CACHE_FUNCTIONS_LOADED'))
    305                 require PUN_ROOT.'include/cache.php';
    306 
    307         $group_id = $_POST['mode'] == 'add' ? $new_group_id : intval($_POST['group_id']);
    308         generate_quickjump_cache($group_id);
    309 
    310         if ($_POST['mode'] == 'edit')
    311                 redirect('admin_groups.php', $lang_admin_groups['Group edited redirect']);
    312         else
    313                 redirect('admin_groups.php', $lang_admin_groups['Group added redirect']);
     249                        message('Il existe déjà un groupe nommé \''.pun_htmlspecialchars($title).'\'.');
     250
     251                $db->query('UPDATE '.$db->prefix.'groups SET g_title=\''.$db->escape($title).'\', g_user_title='.$user_title.', g_read_board='.$read_board.', g_post_replies='.$post_replies.', g_post_topics='.$post_topics.', g_edit_posts='.$edit_posts.', g_delete_posts='.$delete_posts.', g_delete_topics='.$delete_topics.', g_set_title='.$set_title.', g_search='.$search.', g_search_users='.$search_users.', g_edit_subjects_interval='.$edit_subjects_interval.', g_post_flood='.$post_flood.', g_search_flood='.$search_flood.' WHERE g_id='.intval($_POST['group_id'])) or error('Impossible de modifier le groupe', __FILE__, __LINE__, $db->error());
     252        }
     253
     254        // Regenerate the quickjump cache
     255        require_once PUN_ROOT.'include/cache.php';
     256        generate_quickjump_cache();
     257
     258        redirect('admin_groups.php', 'Groupe '.(($_POST['mode'] == 'edit') ? 'modifié' : 'ajouté').'. Redirection ...');
    314259}
    315260
     
    321266
    322267        $group_id = intval($_POST['default_group']);
    323 
    324         // Make sure it's not the admin or guest groups
    325         if ($group_id == PUN_ADMIN || $group_id == PUN_GUEST)
     268        if ($group_id < 1)
    326269                message($lang_common['Bad request']);
    327270
    328         // Make sure it's not a moderator group
    329         $result = $db->query('SELECT 1 FROM '.$db->prefix.'groups WHERE g_id='.$group_id.' AND g_moderator=0') or error('Unable to check group moderator status', __FILE__, __LINE__, $db->error());
    330         if (!$db->num_rows($result))
    331                 message($lang_common['Bad request']);
    332 
    333         $db->query('UPDATE '.$db->prefix.'config SET conf_value='.$group_id.' WHERE conf_name=\'o_default_user_group\'') or error('Unable to update board config', __FILE__, __LINE__, $db->error());
     271        $db->query('UPDATE '.$db->prefix.'config SET conf_value='.$group_id.' WHERE conf_name=\'o_default_user_group\'') or error('Impossible de modifier la configuration des forums', __FILE__, __LINE__, $db->error());
    334272
    335273        // Regenerate the config cache
    336         if (!defined('FORUM_CACHE_FUNCTIONS_LOADED'))
    337                 require PUN_ROOT.'include/cache.php';
    338 
     274        require_once PUN_ROOT.'include/cache.php';
    339275        generate_config_cache();
    340276
    341         redirect('admin_groups.php', $lang_admin_groups['Default group redirect']);
     277        redirect('admin_groups.php', 'Groupe par défaut réglé. Redirection ...');
    342278}
    343279
     
    348284        confirm_referrer('admin_groups.php');
    349285
    350         $group_id = isset($_POST['group_to_delete']) ? intval($_POST['group_to_delete']) : intval($_GET['del_group']);
     286        $group_id = intval($_GET['del_group']);
    351287        if ($group_id < 5)
    352288                message($lang_common['Bad request']);
     
    354290        // Make sure we don't remove the default group
    355291        if ($group_id == $pun_config['o_default_user_group'])
    356                 message($lang_admin_groups['Cannot remove default message']);
     292                message('Le groupe par défaut ne peut être supprimé. Vous devez d\'abord définir un groupe par défaut différent.');
     293
    357294
    358295        // Check if this group has any members
    359         $result = $db->query('SELECT g.g_title, COUNT(u.id) FROM '.$db->prefix.'groups AS g INNER JOIN '.$db->prefix.'users AS u ON g.g_id=u.group_id WHERE g.g_id='.$group_id.' GROUP BY g.g_id, g_title') or error('Unable to fetch group info', __FILE__, __LINE__, $db->error());
     296        $result = $db->query('SELECT g.g_title, COUNT(u.id) FROM '.$db->prefix.'groups AS g INNER JOIN '.$db->prefix.'users AS u ON g.g_id=u.group_id WHERE g.g_id='.$group_id.' GROUP BY g.g_id, g_title') or error('Impossible de retrouver les informations du groupe', __FILE__, __LINE__, $db->error());
    360297
    361298        // If the group doesn't have any members or if we've already selected a group to move the members to
    362299        if (!$db->num_rows($result) || isset($_POST['del_group']))
    363300        {
    364                 if (isset($_POST['del_group_comply']) || isset($_POST['del_group']))
     301                if (isset($_POST['del_group']))
    365302                {
    366                         if (isset($_POST['del_group']))
    367                         {
    368                                 $move_to_group = intval($_POST['move_to_group']);
    369                                 $db->query('UPDATE '.$db->prefix.'users SET group_id='.$move_to_group.' WHERE group_id='.$group_id) or error('Unable to move users into group', __FILE__, __LINE__, $db->error());
    370                         }
    371 
    372                         // Delete the group and any forum specific permissions
    373                         $db->query('DELETE FROM '.$db->prefix.'groups WHERE g_id='.$group_id) or error('Unable to delete group', __FILE__, __LINE__, $db->error());
    374                         $db->query('DELETE FROM '.$db->prefix.'forum_perms WHERE group_id='.$group_id) or error('Unable to delete group forum permissions', __FILE__, __LINE__, $db->error());
    375 
    376                         redirect('admin_groups.php', $lang_admin_groups['Group removed redirect']);
     303                        $move_to_group = intval($_POST['move_to_group']);
     304                        $db->query('UPDATE '.$db->prefix.'users SET group_id='.$move_to_group.' WHERE group_id='.$group_id) or error('Impossible de déplacer les utilisateurs dans le groupe', __FILE__, __LINE__, $db->error());
    377305                }
     306
     307                // Delete the group and any forum specific permissions
     308                $db->query('DELETE FROM '.$db->prefix.'groups WHERE g_id='.$group_id) or error('Impossible de supprimer le groupe', __FILE__, __LINE__, $db->error());
     309                $db->query('DELETE FROM '.$db->prefix.'forum_perms WHERE group_id='.$group_id) or error('Impossible de supprimer les permissions de groupe du forum', __FILE__, __LINE__, $db->error());
     310
     311                // Regenerate the quickjump cache
     312                require_once PUN_ROOT.'include/cache.php';
     313                generate_quickjump_cache();
     314
     315                redirect('admin_groups.php', 'Groupe supprimé. Redirection ...');
     316        }
     317
     318
     319        list($group_title, $group_members) = $db->fetch_row($result);
     320
     321        $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Groupes';
     322        require PUN_ROOT.'header.php';
     323
     324        generate_admin_menu('groups');
     325
     326?>
     327        <div class="blockform">
     328                <h2><span>Supprimer groupe</span></h2>
     329                <div class="box">
     330                        <form id="groups" method="post" action="admin_groups.php?del_group=<?php echo $group_id ?>">
     331                                <div class="inform">
     332                                        <fieldset>
     333                                                <legend>Déplacer les utilisateur de ce groupe</legend>
     334                                                <div class="infldset">
     335                                                        <p>Il y a actuellement <?php echo $group_members ?> membres dans le groupe "<?php echo pun_htmlspecialchars($group_title) ?>". Veuillez sélectionner un groupe dans lequel ces utilisateurs seront déplacés.</p>
     336                                                        <label>Déplacer les utilisateurs dans
     337                                                        <select name="move_to_group">
     338<?php
     339
     340        $result = $db->query('SELECT g_id, g_title FROM '.$db->prefix.'groups WHERE g_id!='.PUN_GUEST.' AND g_id!='.$group_id.' ORDER BY g_title') or error('Impossible de retrouver la liste des groupes', __FILE__, __LINE__, $db->error());
     341
     342        while ($cur_group = $db->fetch_assoc($result))
     343        {
     344                if ($cur_group['g_id'] == PUN_MEMBER)   // Pre-select the pre-defined Members group
     345                        echo "\t\t\t\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'" selected="selected">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";
    378346                else
    379                 {
    380                         $result = $db->query('SELECT g_title FROM '.$db->prefix.'groups WHERE g_id='.$group_id) or error('Unable to fetch group title', __FILE__, __LINE__, $db->error());
    381                         $group_title = $db->result($result);
    382 
    383                         $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['User groups']);
    384                         define('PUN_ACTIVE_PAGE', 'admin');
    385                         require PUN_ROOT.'header.php';
    386 
    387                         generate_admin_menu('groups');
    388 
    389 ?>
    390         <div class="blockform">
    391                 <h2><span><?php echo $lang_admin_groups['Group delete head'] ?></span></h2>
    392                 <div class="box">
    393                         <form method="post" action="admin_groups.php?del_group=<?php echo $group_id ?>">
    394                                 <div class="inform">
    395                                 <input type="hidden" name="group_to_delete" value="<?php echo $group_id ?>" />
    396                                         <fieldset>
    397                                                 <legend><?php echo $lang_admin_groups['Confirm delete subhead'] ?></legend>
    398                                                 <div class="infldset">
    399                                                         <p><?php printf($lang_admin_groups['Confirm delete info'], pun_htmlspecialchars($group_title)) ?></p>
    400                                                         <p class="warntext"><?php echo $lang_admin_groups['Confirm delete warn'] ?></p>
     347                        echo "\t\t\t\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";
     348        }
     349
     350?>
     351                                                        </select>
     352                                                        </br></label>
    401353                                                </div>
    402354                                        </fieldset>
    403355                                </div>
    404                                 <p class="buttons"><input type="submit" name="del_group_comply" value="<?php echo $lang_admin_common['Delete'] ?>" tabindex="1" /><a href="javascript:history.go(-1)" tabindex="2"><?php echo $lang_admin_common['Go back'] ?></a></p>
     356                                <p><input type="submit" name="del_group" value=" Supprimer groupe " /></p>
    405357                        </form>
    406358                </div>
     
    410362<?php
    411363
    412                         require PUN_ROOT.'footer.php';
    413                 }
    414         }
    415 
    416         list($group_title, $group_members) = $db->fetch_row($result);
    417 
    418         $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['User groups']);
    419         define('PUN_ACTIVE_PAGE', 'admin');
    420         require PUN_ROOT.'header.php';
    421 
    422         generate_admin_menu('groups');
     364        require PUN_ROOT.'footer.php';
     365}
     366
     367
     368$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Groupes';
     369require PUN_ROOT.'header.php';
     370
     371generate_admin_menu('groups');
    423372
    424373?>
    425374        <div class="blockform">
    426                 <h2><span><?php echo $lang_admin_groups['Delete group head'] ?></span></h2>
     375                <h2><span>Ajouter/régler groupes</span></h2>
    427376                <div class="box">
    428                         <form id="groups" method="post" action="admin_groups.php?del_group=<?php echo $group_id ?>">
     377                        <form id="groups" method="post" action="admin_groups.php?action=foo">
    429378                                <div class="inform">
    430379                                        <fieldset>
    431                                                 <legend><?php echo $lang_admin_groups['Move users subhead'] ?></legend>
    432                                                 <div class="infldset">
    433                                                         <p><?php printf($lang_admin_groups['Move users info'], pun_htmlspecialchars($group_title), forum_number_format($group_members)) ?></p>
    434                                                         <label><?php echo $lang_admin_groups['Move users label'] ?>
    435                                                         <select name="move_to_group">
    436 <?php
    437 
    438         $result = $db->query('SELECT g_id, g_title FROM '.$db->prefix.'groups WHERE g_id!='.PUN_GUEST.' AND g_id!='.$group_id.' ORDER BY g_title') or error('Unable to fetch user group list', __FILE__, __LINE__, $db->error());
    439 
    440         while ($cur_group = $db->fetch_assoc($result))
    441         {
    442                 if ($cur_group['g_id'] == PUN_MEMBER) // Pre-select the pre-defined Members group
    443                         echo "\t\t\t\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'" selected="selected">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";
    444                 else
    445                         echo "\t\t\t\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";
    446         }
    447 
    448 ?>
    449                                                         </select>
    450                                                         <br /></label>
    451                                                 </div>
    452                                         </fieldset>
    453                                 </div>
    454                                 <p class="buttons"><input type="submit" name="del_group" value="<?php echo $lang_admin_groups['Delete group'] ?>" /><a href="javascript:history.go(-1)"><?php echo $lang_admin_common['Go back'] ?></a></p>
    455                         </form>
    456                 </div>
    457         </div>
    458         <div class="clearer"></div>
    459 </div>
    460 <?php
    461 
    462         require PUN_ROOT.'footer.php';
    463 }
    464 
    465 
    466 $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['User groups']);
    467 define('PUN_ACTIVE_PAGE', 'admin');
    468 require PUN_ROOT.'header.php';
    469 
    470 generate_admin_menu('groups');
    471 
    472 ?>
    473         <div class="blockform">
    474                 <h2><span><?php echo $lang_admin_groups['Add groups head'] ?></span></h2>
    475                 <div class="box">
    476                         <form id="groups" method="post" action="admin_groups.php">
    477                                 <div class="inform">
    478                                         <fieldset>
    479                                                 <legend><?php echo $lang_admin_groups['Add group subhead'] ?></legend>
     380                                                <legend>Ajouter un groupe</legend>
    480381                                                <div class="infldset">
    481382                                                        <table class="aligntop" cellspacing="0">
    482383                                                                <tr>
    483                                                                         <th scope="row"><?php echo $lang_admin_groups['New group label'] ?><div><input type="submit" name="add_group" value="<?php echo $lang_admin_common['Add'] ?>" tabindex="2" /></div></th>
     384                                                                        <th scope="row">Nouveau groupe basé sur le groupe<div><input type="submit" name="add_group" value=" Ajouter " tabindex="2" /></div></th>
    484385                                                                        <td>
    485386                                                                                <select id="base_group" name="base_group" tabindex="1">
    486387<?php
    487388
    488 $result = $db->query('SELECT g_id, g_title FROM '.$db->prefix.'groups WHERE g_id!='.PUN_ADMIN.' AND g_id!='.PUN_GUEST.' ORDER BY g_title') or error('Unable to fetch user group list', __FILE__, __LINE__, $db->error());
     389$result = $db->query('SELECT g_id, g_title FROM '.$db->prefix.'groups WHERE g_id>'.PUN_GUEST.' ORDER BY g_title') or error('Impossible de retrouver la liste des groupes', __FILE__, __LINE__, $db->error());
    489390
    490391while ($cur_group = $db->fetch_assoc($result))
     
    498399?>
    499400                                                                                </select>
    500                                                                                 <span><?php echo $lang_admin_groups['New group help'] ?></span>
     401                                                                                <span>Choisissez un groupe d'utilisateurs duquel le nouveau groupe héritera les propriétés. La page suivante vous permettra d'affiner ces réglages.</span>
    501402                                                                        </td>
    502403                                                                </tr>
     
    507408                                <div class="inform">
    508409                                        <fieldset>
    509                                                 <legend><?php echo $lang_admin_groups['Default group subhead'] ?></legend>
     410                                                <legend>Définir le groupe par défaut</legend>
    510411                                                <div class="infldset">
    511412                                                        <table class="aligntop" cellspacing="0">
    512413                                                                <tr>
    513                                                                         <th scope="row"><?php echo $lang_admin_groups['Default group label'] ?><div><input type="submit" name="set_default_group" value="<?php echo $lang_admin_common['Save'] ?>" tabindex="4" /></div></th>
     414                                                                        <th scope="row">Groupe par défaut<div><input type="submit" name="set_default_group" value=" Enregistrer " tabindex="4" /></div></th>
    514415                                                                        <td>
    515416                                                                                <select id="default_group" name="default_group" tabindex="3">
    516417<?php
    517418
    518 $result = $db->query('SELECT g_id, g_title FROM '.$db->prefix.'groups WHERE g_id>'.PUN_GUEST.' AND g_moderator=0 ORDER BY g_title') or error('Unable to fetch user group list', __FILE__, __LINE__, $db->error());
     419$result = $db->query('SELECT g_id, g_title FROM '.$db->prefix.'groups WHERE g_id>'.PUN_GUEST.' ORDER BY g_title') or error('Impossible de retrouver la liste des groupes', __FILE__, __LINE__, $db->error());
    519420
    520421while ($cur_group = $db->fetch_assoc($result))
     
    528429?>
    529430                                                                                </select>
    530                                                                                 <span><?php echo $lang_admin_groups['Default group help'] ?></span>
     431                                                                                <span>Choisissez le groupe que vous voulez définir par défaut. C'est à dire le groupe où les utilisateurs seront placés quand ils s'inscriront. Pour des raisons de sécurité, par défaut les utilisateurs ne peuvent être mis ni dans le groupe modérateur ni dans le groupe administrateur.</span>
    531432                                                                        </td>
    532433                                                                </tr>
     
    538439                </div>
    539440
    540                 <h2 class="block2"><span><?php echo $lang_admin_groups['Existing groups head'] ?></span></h2>
     441                <h2 class="block2"><span>Groupes existants</span></h2>
    541442                <div class="box">
    542443                        <div class="fakeform">
    543444                                <div class="inform">
    544445                                        <fieldset>
    545                                                 <legend><?php echo $lang_admin_groups['Edit groups subhead'] ?></legend>
     446                                                <legend>Modifier/supprimer les groupes</legend>
    546447                                                <div class="infldset">
    547                                                         <p><?php echo $lang_admin_groups['Edit groups info'] ?></p>
     448                                                        <p>Les groupes pré-définis Invités, Administrateurs, Modérateurs et Membres ne peuvent être supprimés. Il peuvent par contre être modifiés. Mais suivant le groupe certaines options ne sont pas disponibles (<abbr title="exemple">ex.</abbr> la permission <em>modifier messages</em> pour les invités). Les Administrateurs ont toujours toutes les permisssions.</p>
    548449                                                        <table cellspacing="0">
    549450<?php
    550451
    551 $cur_index = 5;
    552 
    553 $result = $db->query('SELECT g_id, g_title FROM '.$db->prefix.'groups ORDER BY g_id') or error('Unable to fetch user group list', __FILE__, __LINE__, $db->error());
     452$result = $db->query('SELECT g_id, g_title FROM '.$db->prefix.'groups ORDER BY g_id') or error('Impossible de retrouver la liste des groupes', __FILE__, __LINE__, $db->error());
    554453
    555454while ($cur_group = $db->fetch_assoc($result))
    556         echo "\t\t\t\t\t\t\t\t".'<tr><th scope="row"><a href="admin_groups.php?edit_group='.$cur_group['g_id'].'" tabindex="'.$cur_index++.'">'.$lang_admin_groups['Edit link'].'</a>'.(($cur_group['g_id'] > PUN_MEMBER) ? ' | <a href="admin_groups.php?del_group='.$cur_group['g_id'].'" tabindex="'.$cur_index++.'">'.$lang_admin_groups['Delete link'].'</a>' : '').'</th><td>'.pun_htmlspecialchars($cur_group['g_title']).'</td></tr>'."\n";
     455        echo "\t\t\t\t\t\t\t\t".'<tr><th scope="row"><a href="admin_groups.php?edit_group='.$cur_group['g_id'].'">Modifier</a>'.(($cur_group['g_id'] > PUN_MEMBER) ? ' - <a href="admin_groups.php?del_group='.$cur_group['g_id'].'">Supprimer</a>' : '').'</th><td>'.pun_htmlspecialchars($cur_group['g_title']).'</td></tr>'."\n";
    557456
    558457?>
Note: See TracChangeset for help on using the changeset viewer.