source: trunk/web/punbb/admin_permissions.php @ 1

Last change on this file since 1 was 1, checked in by dj3c1t, 12 years ago

import initial

File size: 12.4 KB
Line 
1<?php
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
25
26// Tell header.php to use the admin template
27define('PUN_ADMIN_CONSOLE', 1);
28
29define('PUN_ROOT', './');
30require PUN_ROOT.'include/common.php';
31require PUN_ROOT.'include/common_admin.php';
32
33
34if ($pun_user['g_id'] > PUN_ADMIN)
35        message($lang_common['No permission']);
36
37
38if (isset($_POST['form_sent']))
39{
40        confirm_referrer('admin_permissions.php');
41
42        $form = array_map('intval', $_POST['form']);
43
44        while (list($key, $input) = @each($form))
45        {
46                // Only update values that have changed
47                if (array_key_exists('p_'.$key, $pun_config) && $pun_config['p_'.$key] != $input)
48                        $db->query('UPDATE '.$db->prefix.'config SET conf_value='.$input.' WHERE conf_name=\'p_'.$db->escape($key).'\'') or error('Impossible de mettre à jour la configuration des forums', __FILE__, __LINE__, $db->error());
49        }
50
51        // Regenerate the config cache
52        require_once PUN_ROOT.'include/cache.php';
53        generate_config_cache();
54
55        redirect('admin_permissions.php', 'Permissions modifiées. Redirection ...');
56}
57
58
59$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Permissions';
60require PUN_ROOT.'header.php';
61generate_admin_menu('permissions');
62
63?>
64        <div class="blockform">
65                <h2><span>Permissions</span></h2>
66                <div class="box">
67                        <form method="post" action="admin_permissions.php">
68                                <p class="submittop"><input type="submit" name="save" value=" Enregistrer " /></p>
69                                <div class="inform">
70                                <input type="hidden" name="form_sent" value="1" />
71                                        <fieldset>
72                                                <legend>Écriture</legend>
73                                                <div class="infldset">
74                                                        <table class="aligntop" cellspacing="0">
75                                                                <tr>
76                                                                        <th scope="row">BBCode</th>
77                                                                        <td>
78                                                                                <input type="radio" name="form[message_bbcode]" value="1"<?php if ($pun_config['p_message_bbcode'] == '1') echo ' checked="checked"' ?> />&#160;<strong>Oui</strong>&#160;&#160;&#160;<input type="radio" name="form[message_bbcode]" value="0"<?php if ($pun_config['p_message_bbcode'] == '0') echo ' checked="checked"' ?> />&#160;<strong>Non</strong>
79                                                                                <span>Autoriser l'utilisaton du BBCode dans les messages (recommandé).</span>
80                                                                        </td>
81                                                                </tr>
82                                                                <tr>
83                                                                        <th scope="row">Balise Image</th>
84                                                                        <td>
85                                                                                <input type="radio" name="form[message_img_tag]" value="1"<?php if ($pun_config['p_message_img_tag'] == '1') echo ' checked="checked"' ?> />&#160;<strong>Oui</strong>&#160;&#160;&#160;<input type="radio" name="form[message_img_tag]" value="0"<?php if ($pun_config['p_message_img_tag'] == '0') echo ' checked="checked"' ?> />&#160;<strong>Non</strong>
86                                                                                <span>Autoriser l'utilisation de la balise BBCode [img][/img] dans les messages.</span>
87                                                                        </td>
88                                                                </tr>
89                                                                <tr>
90                                                                        <th scope="row">Message tout en majuscules</th>
91                                                                        <td>
92                                                                                <input type="radio" name="form[message_all_caps]" value="1"<?php if ($pun_config['p_message_all_caps'] == '1') echo ' checked="checked"' ?> />&#160;<strong>Oui</strong>&#160;&#160;&#160;<input type="radio" name="form[message_all_caps]" value="0"<?php if ($pun_config['p_message_all_caps'] == '0') echo ' checked="checked"' ?> />&#160;<strong>Non</strong>
93                                                                                <span>Autoriser les messages qui ne contiennent que des lettres en majuscules.</span>
94                                                                        </td>
95                                                                </tr>
96                                                                <tr>
97                                                                        <th scope="row">Sujet tout en majuscules</th>
98                                                                        <td>
99                                                                                <input type="radio" name="form[subject_all_caps]" value="1"<?php if ($pun_config['p_subject_all_caps'] == '1') echo ' checked="checked"' ?> />&#160;<strong>Oui</strong>&#160;&#160;&#160;<input type="radio" name="form[subject_all_caps]" value="0"<?php if ($pun_config['p_subject_all_caps'] == '0') echo ' checked="checked"' ?> />&#160;<strong>Non</strong>
100                                                                                <span>Autoriser les sujets qui ne contiennent que des lettres en majuscules.</span>
101                                                                        </td>
102                                                                </tr>
103                                                                <tr>
104                                                                        <th scope="row">E-mail invité obligatoire</th>
105                                                                        <td>
106                                                                                <input type="radio" name="form[force_guest_email]" value="1"<?php if ($pun_config['p_force_guest_email'] == '1') echo ' checked="checked"' ?> />&#160;<strong>Oui</strong>&#160;&#160;&#160;<input type="radio" name="form[force_guest_email]" value="0"<?php if ($pun_config['p_force_guest_email'] == '0') echo ' checked="checked"' ?> />&#160;<strong>Non</strong>
107                                                                                <span>Obliger les invités à donner une adresse e-mail pour écrire un message.</span>
108                                                                        </td>
109                                                                </tr>
110                                                        </table>
111                                                </div>
112                                        </fieldset>
113                                </div>
114                                <div class="inform">
115                                        <fieldset>
116                                                <legend>Signatures</legend>
117                                                <div class="infldset">
118                                                        <table class="aligntop" cellspacing="0">
119                                                                <tr>
120                                                                        <th scope="row">BBCode dans les signatures</th>
121                                                                        <td>
122                                                                                <input type="radio" name="form[sig_bbcode]" value="1"<?php if ($pun_config['p_sig_bbcode'] == '1') echo ' checked="checked"' ?> />&#160;<strong>Oui</strong>&#160;&#160;&#160;<input type="radio" name="form[sig_bbcode]" value="0"<?php if ($pun_config['p_sig_bbcode'] == '0') echo ' checked="checked"' ?> />&#160;<strong>Non</strong>
123                                                                                <span>Autoriser l'utilisation du BBCodes dans les signatures des utilisateurs.</span>
124                                                                        </td>
125                                                                </tr>
126                                                                <tr>
127                                                                        <th scope="row">Balise image dans les signatures</th>
128                                                                        <td>
129                                                                                <input type="radio" name="form[sig_img_tag]" value="1"<?php if ($pun_config['p_sig_img_tag'] == '1') echo ' checked="checked"' ?> />&#160;<strong>Oui</strong>&#160;&#160;&#160;<input type="radio" name="form[sig_img_tag]" value="0"<?php if ($pun_config['p_sig_img_tag'] == '0') echo ' checked="checked"' ?> />&#160;<strong>Non</strong>
130                                                                                <span>Autoriser l'utilisation de la balise BBCode [img][/img] dans la signature des utilisateurs (non recommandé).</span>
131                                                                        </td>
132                                                                </tr>
133                                                                <tr>
134                                                                        <th scope="row">Signature tout en majuscules</th>
135                                                                        <td>
136                                                                                <input type="radio" name="form[sig_all_caps]" value="1"<?php if ($pun_config['p_sig_all_caps'] == '1') echo ' checked="checked"' ?> />&#160;<strong>Oui</strong>&#160;&#160;&#160;<input type="radio" name="form[sig_all_caps]" value="0"<?php if ($pun_config['p_sig_all_caps'] == '0') echo ' checked="checked"' ?> />&#160;<strong>Non</strong>
137                                                                                <span>Autoriser les signatures qui ne contiennent que des lettres en majuscules.</span>
138                                                                        </td>
139                                                                </tr>
140                                                                <tr>
141                                                                        <th scope="row">Longueur maximum des signatures</th>
142                                                                        <td>
143                                                                                <input type="text" name="form[sig_length]" size="5" maxlength="5" value="<?php echo $pun_config['p_sig_length'] ?>" />
144                                                                                <span>Le nombre maximum de caractÚres qu'une signature d'utilisateur puisse contenir.</span>
145                                                                        </td>
146                                                                </tr>
147                                                                <tr>
148                                                                        <th scope="row">Nombre maximum de lignes dans les signatures</th>
149                                                                        <td>
150                                                                                <input type="text" name="form[sig_lines]" size="3" maxlength="3" value="<?php echo $pun_config['p_sig_lines'] ?>" />
151                                                                                <span>Le nombre maximum de lignes qu'une signature d'utilisateur puisse contenir.</span>
152                                                                        </td>
153                                                                </tr>
154                                                        </table>
155                                                </div>
156                                        </fieldset>
157                                </div>
158                                <div class="inform">
159                                        <fieldset>
160                                                <legend>Modérateurs</legend>
161                                                <div class="infldset">
162                                                        <table class="aligntop" cellspacing="0">
163                                                                <tr>
164                                                                        <th scope="row">Modifier les profils utilisateurs</th>
165                                                                        <td>
166                                                                                <input type="radio" name="form[mod_edit_users]" value="1"<?php if ($pun_config['p_mod_edit_users'] == '1') echo ' checked="checked"' ?> />&#160;<strong>Oui</strong>&#160;&#160;&#160;<input type="radio" name="form[mod_edit_users]" value="0"<?php if ($pun_config['p_mod_edit_users'] == '0') echo ' checked="checked"' ?> />&#160;<strong>Non</strong>
167                                                                                <span>Autoriser les modérateurs à modifier les profils des utilisateurs.</span>
168                                                                        </td>
169                                                                </tr>
170                                                                <tr>
171                                                                        <th scope="row">Renommer utilisateurs</th>
172                                                                        <td>
173                                                                                <input type="radio" name="form[mod_rename_users]" value="1"<?php if ($pun_config['p_mod_rename_users'] == '1') echo ' checked="checked"' ?> />&#160;<strong>Oui</strong>&#160;&#160;&#160;<input type="radio" name="form[mod_rename_users]" value="0"<?php if ($pun_config['p_mod_rename_users'] == '0') echo ' checked="checked"' ?> />&#160;<strong>Non</strong>
174                                                                                <span>Autoriser les modérateurs à renommer les utilisateurs. A l'exception des autres modérateurs et des administrateurs.</span>
175                                                                        </td>
176                                                                </tr>
177                                                                <tr>
178                                                                        <th scope="row">Changer les mots de passe des utilisateurs</th>
179                                                                        <td>
180                                                                                <input type="radio" name="form[mod_change_passwords]" value="1"<?php if ($pun_config['p_mod_change_passwords'] == '1') echo ' checked="checked"' ?> />&#160;<strong>Oui</strong>&#160;&#160;&#160;<input type="radio" name="form[mod_change_passwords]" value="0"<?php if ($pun_config['p_mod_change_passwords'] == '0') echo ' checked="checked"' ?> />&#160;<strong>Non</strong>
181                                                                                <span>Autoriser les modérateurs à changer les mots de passe des utilisateurs. A l'exception des autres modérateurs et des administrateurs.</span>
182                                                                        </td>
183                                                                </tr>
184                                                                <tr>
185                                                                        <th scope="row">Bannir utilisateurs</th>
186                                                                        <td>
187                                                                                <input type="radio" name="form[mod_ban_users]" value="1"<?php if ($pun_config['p_mod_ban_users'] == '1') echo ' checked="checked"' ?> />&#160;<strong>Oui</strong>&#160;&#160;&#160;<input type="radio" name="form[mod_ban_users]" value="0"<?php if ($pun_config['p_mod_ban_users'] == '0') echo ' checked="checked"' ?> />&#160;<strong>Non</strong>
188                                                                                <span>Autoriser les modérateurs à bannir les utilisateurs (et modifier/supprimer les bannissements en cours).</span>
189                                                                        </td>
190                                                                </tr>
191                                                        </table>
192                                                </div>
193                                        </fieldset>
194                                </div>
195                                <div class="inform">
196                                        <fieldset>
197                                                <legend>Inscriptions</legend>
198                                                <div class="infldset">
199                                                        <table class="aligntop" cellspacing="0">
200                                                                <tr>
201                                                                        <th scope="row">Autoriser les adresses e-mail bannies</th>
202                                                                        <td>
203                                                                                <input type="radio" name="form[allow_banned_email]" value="1"<?php if ($pun_config['p_allow_banned_email'] == '1') echo ' checked="checked"' ?> />&#160;<strong>Oui</strong>&#160;&#160;&#160;<input type="radio" name="form[allow_banned_email]" value="0"<?php if ($pun_config['p_allow_banned_email'] == '0') echo ' checked="checked"' ?> />
204                                                                                &#160;<strong>Non</strong>
205                                                                                <span>Autoriser les utilisateurs à s'inscrire (ou changer d'adresse) avec une adresse/un domaine e-mail bannis. Si vous laissez cette option à son réglage par défaut (oui) ceci sera possible mais une alerte par e-mail sera envoyée à la liste d'adresses e-mail des forums (une maniÚre efficace pour détecter les inscriptions multiples).</span>
206                                                                        </td>
207                                                                </tr>
208                                                                <tr>
209                                                                        <th scope="row">Autoriser les adresses e-mail en double</th>
210                                                                        <td>
211                                                                                <input type="radio" name="form[allow_dupe_email]" value="1"<?php if ($pun_config['p_allow_dupe_email'] == '1') echo ' checked="checked"' ?> />&#160;<strong>Oui</strong>&#160;&#160;&#160;<input type="radio" name="form[allow_dupe_email]" value="0"<?php if ($pun_config['p_allow_dupe_email'] == '0') echo ' checked="checked"' ?> />
212                                                                                &#160;<strong>Non</strong>
213                                                                                <span>Autoriser les utilisateurs à s'inscrire avec une adresse e-mail déjà utilisée par un autre nom d'utilisateur. Si autorisé une alerte e-mail sera envoyée à la liste d'adresses e-mail des forums lorsqu'un doublon sera détecté.</span>
214                                                                        </td>
215                                                                </tr>
216                                                        </table>
217                                                </div>
218                                        </fieldset>
219                                </div>
220                                <p class="submitend"><input type="submit" name="save" value=" Enregistrer " /></p>
221                        </form>
222                </div>
223        </div>
224        <div class="clearer"></div>
225</div>
226<?php
227
228require PUN_ROOT.'footer.php';
Note: See TracBrowser for help on using the repository browser.