Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 192 lines (174 sloc) 11.01 kb
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
1 <?php
2
e5f7b2a @reines Updating copyright notices in all files
reines authored
3 /**
7c5edc2 @reines Updating copyright notices for 2012
reines authored
4 * Copyright (C) 2008-2012 FluxBB
e5f7b2a @reines Updating copyright notices in all files
reines authored
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 */
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
8
9 // Tell header.php to use the admin template
10 define('PUN_ADMIN_CONSOLE', 1);
11
f5ee836 @reines Changing PUN_ROOT to use absolute paths, this solves some issues with…
reines authored
12 define('PUN_ROOT', dirname(__FILE__).'/');
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
13 require PUN_ROOT.'include/common.php';
14 require PUN_ROOT.'include/common_admin.php';
15
16
5ca8498 @reines Updating trunk to version 1.4. These changes have all kindly been don…
reines authored
17 if ($pun_user['g_id'] != PUN_ADMIN)
543eaa0 @oldskool #620 - Added http status codes to various events
oldskool authored
18 message($lang_common['No permission'], false, '403 Forbidden');
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
19
de90cd5 @reines Merging the changes for localized admin panel.
reines authored
20 // Load the admin_permissions.php language file
21 require PUN_ROOT.'lang/'.$admin_language.'/admin_permissions.php';
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
22
23 if (isset($_POST['form_sent']))
24 {
25 confirm_referrer('admin_permissions.php');
26
27 $form = array_map('intval', $_POST['form']);
28
f74225d @reines Updating the coding style in a few places, replacing while (... = @ea…
reines authored
29 foreach ($form as $key => $input)
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
30 {
323c556 @oldskool #652 - Fix for other negative values on admin pages
oldskool authored
31 // Make sure the input is never a negative value
32 if($input < 0)
33 $input = 0;
34
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
35 // Only update values that have changed
36 if (array_key_exists('p_'.$key, $pun_config) && $pun_config['p_'.$key] != $input)
37 $db->query('UPDATE '.$db->prefix.'config SET conf_value='.$input.' WHERE conf_name=\'p_'.$db->escape($key).'\'') or error('Unable to update board config', __FILE__, __LINE__, $db->error());
38 }
39
40 // Regenerate the config cache
5ca8498 @reines Updating trunk to version 1.4. These changes have all kindly been don…
reines authored
41 if (!defined('FORUM_CACHE_FUNCTIONS_LOADED'))
42 require PUN_ROOT.'include/cache.php';
43
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
44 generate_config_cache();
45
de90cd5 @reines Merging the changes for localized admin panel.
reines authored
46 redirect('admin_permissions.php', $lang_admin_permissions['Perms updated redirect']);
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
47 }
48
de90cd5 @reines Merging the changes for localized admin panel.
reines authored
49 $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Permissions']);
a43f248 @Quy Changed prefix to PUN for consistency.
Quy authored
50 define('PUN_ACTIVE_PAGE', 'admin');
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
51 require PUN_ROOT.'header.php';
de90cd5 @reines Merging the changes for localized admin panel.
reines authored
52
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
53 generate_admin_menu('permissions');
54
55 ?>
56 <div class="blockform">
de90cd5 @reines Merging the changes for localized admin panel.
reines authored
57 <h2><span><?php echo $lang_admin_permissions['Permissions head'] ?></span></h2>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
58 <div class="box">
59 <form method="post" action="admin_permissions.php">
de90cd5 @reines Merging the changes for localized admin panel.
reines authored
60 <p class="submittop"><input type="submit" name="save" value="<?php echo $lang_admin_common['Save changes'] ?>" /></p>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
61 <div class="inform">
cd14ed3 @Quy Cleaned up whitespaces in some admin files.
Quy authored
62 <input type="hidden" name="form_sent" value="1" />
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
63 <fieldset>
de90cd5 @reines Merging the changes for localized admin panel.
reines authored
64 <legend><?php echo $lang_admin_permissions['Posting subhead'] ?></legend>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
65 <div class="infldset">
66 <table class="aligntop" cellspacing="0">
67 <tr>
de90cd5 @reines Merging the changes for localized admin panel.
reines authored
68 <th scope="row"><?php echo $lang_admin_permissions['BBCode label'] ?></th>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
69 <td>
672c69c @daris #717: Adding missing labels for radio buttons in admin panel
daris authored
70 <label class="conl"><input type="radio" name="form[message_bbcode]" value="1"<?php if ($pun_config['p_message_bbcode'] == '1') echo ' checked="checked"' ?> />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong></label>
71 <label class="conl"><input type="radio" name="form[message_bbcode]" value="0"<?php if ($pun_config['p_message_bbcode'] == '0') echo ' checked="checked"' ?> />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong></label>
4179643 @Quy #717: Applied clearb class to help text.
Quy authored
72 <span class="clearb"><?php echo $lang_admin_permissions['BBCode help'] ?></span>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
73 </td>
74 </tr>
75 <tr>
de90cd5 @reines Merging the changes for localized admin panel.
reines authored
76 <th scope="row"><?php echo $lang_admin_permissions['Image tag label'] ?></th>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
77 <td>
672c69c @daris #717: Adding missing labels for radio buttons in admin panel
daris authored
78 <label class="conl"><input type="radio" name="form[message_img_tag]" value="1"<?php if ($pun_config['p_message_img_tag'] == '1') echo ' checked="checked"' ?> />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong></label>
79 <label class="conl"><input type="radio" name="form[message_img_tag]" value="0"<?php if ($pun_config['p_message_img_tag'] == '0') echo ' checked="checked"' ?> />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong></label>
4179643 @Quy #717: Applied clearb class to help text.
Quy authored
80 <span class="clearb"><?php echo $lang_admin_permissions['Image tag help'] ?></span>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
81 </td>
82 </tr>
83 <tr>
de90cd5 @reines Merging the changes for localized admin panel.
reines authored
84 <th scope="row"><?php echo $lang_admin_permissions['All caps message label'] ?></th>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
85 <td>
672c69c @daris #717: Adding missing labels for radio buttons in admin panel
daris authored
86 <label class="conl"><input type="radio" name="form[message_all_caps]" value="1"<?php if ($pun_config['p_message_all_caps'] == '1') echo ' checked="checked"' ?> />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong></label>
87 <label class="conl"><input type="radio" name="form[message_all_caps]" value="0"<?php if ($pun_config['p_message_all_caps'] == '0') echo ' checked="checked"' ?> />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong></label>
4179643 @Quy #717: Applied clearb class to help text.
Quy authored
88 <span class="clearb"><?php echo $lang_admin_permissions['All caps message help'] ?></span>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
89 </td>
90 </tr>
91 <tr>
de90cd5 @reines Merging the changes for localized admin panel.
reines authored
92 <th scope="row"><?php echo $lang_admin_permissions['All caps subject label'] ?></th>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
93 <td>
672c69c @daris #717: Adding missing labels for radio buttons in admin panel
daris authored
94 <label class="conl"><input type="radio" name="form[subject_all_caps]" value="1"<?php if ($pun_config['p_subject_all_caps'] == '1') echo ' checked="checked"' ?> />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong></label>
95 <label class="conl"><input type="radio" name="form[subject_all_caps]" value="0"<?php if ($pun_config['p_subject_all_caps'] == '0') echo ' checked="checked"' ?> />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong></label>
4179643 @Quy #717: Applied clearb class to help text.
Quy authored
96 <span class="clearb"><?php echo $lang_admin_permissions['All caps subject help'] ?></span>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
97 </td>
98 </tr>
99 <tr>
de90cd5 @reines Merging the changes for localized admin panel.
reines authored
100 <th scope="row"><?php echo $lang_admin_permissions['Require e-mail label'] ?></th>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
101 <td>
672c69c @daris #717: Adding missing labels for radio buttons in admin panel
daris authored
102 <label class="conl"><input type="radio" name="form[force_guest_email]" value="1"<?php if ($pun_config['p_force_guest_email'] == '1') echo ' checked="checked"' ?> />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong></label>
103 <label class="conl"><input type="radio" name="form[force_guest_email]" value="0"<?php if ($pun_config['p_force_guest_email'] == '0') echo ' checked="checked"' ?> />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong></label>
4179643 @Quy #717: Applied clearb class to help text.
Quy authored
104 <span class="clearb"><?php echo $lang_admin_permissions['Require e-mail help'] ?></span>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
105 </td>
106 </tr>
107 </table>
108 </div>
109 </fieldset>
110 </div>
111 <div class="inform">
112 <fieldset>
de90cd5 @reines Merging the changes for localized admin panel.
reines authored
113 <legend><?php echo $lang_admin_permissions['Signatures subhead'] ?></legend>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
114 <div class="infldset">
115 <table class="aligntop" cellspacing="0">
116 <tr>
de90cd5 @reines Merging the changes for localized admin panel.
reines authored
117 <th scope="row"><?php echo $lang_admin_permissions['BBCode sigs label'] ?></th>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
118 <td>
672c69c @daris #717: Adding missing labels for radio buttons in admin panel
daris authored
119 <label class="conl"><input type="radio" name="form[sig_bbcode]" value="1"<?php if ($pun_config['p_sig_bbcode'] == '1') echo ' checked="checked"' ?> />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong></label>
120 <label class="conl"><input type="radio" name="form[sig_bbcode]" value="0"<?php if ($pun_config['p_sig_bbcode'] == '0') echo ' checked="checked"' ?> />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong></label>
4179643 @Quy #717: Applied clearb class to help text.
Quy authored
121 <span class="clearb"><?php echo $lang_admin_permissions['BBCode sigs help'] ?></span>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
122 </td>
123 </tr>
124 <tr>
de90cd5 @reines Merging the changes for localized admin panel.
reines authored
125 <th scope="row"><?php echo $lang_admin_permissions['Image tag sigs label'] ?></th>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
126 <td>
672c69c @daris #717: Adding missing labels for radio buttons in admin panel
daris authored
127 <label class="conl"><input type="radio" name="form[sig_img_tag]" value="1"<?php if ($pun_config['p_sig_img_tag'] == '1') echo ' checked="checked"' ?> />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong></label>
128 <label class="conl"><input type="radio" name="form[sig_img_tag]" value="0"<?php if ($pun_config['p_sig_img_tag'] == '0') echo ' checked="checked"' ?> />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong></label>
4179643 @Quy #717: Applied clearb class to help text.
Quy authored
129 <span class="clearb"><?php echo $lang_admin_permissions['Image tag sigs help'] ?></span>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
130 </td>
131 </tr>
132 <tr>
de90cd5 @reines Merging the changes for localized admin panel.
reines authored
133 <th scope="row"><?php echo $lang_admin_permissions['All caps sigs label'] ?></th>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
134 <td>
672c69c @daris #717: Adding missing labels for radio buttons in admin panel
daris authored
135 <label class="conl"><input type="radio" name="form[sig_all_caps]" value="1"<?php if ($pun_config['p_sig_all_caps'] == '1') echo ' checked="checked"' ?> />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong></label>
136 <label class="conl"><input type="radio" name="form[sig_all_caps]" value="0"<?php if ($pun_config['p_sig_all_caps'] == '0') echo ' checked="checked"' ?> />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong></label>
4179643 @Quy #717: Applied clearb class to help text.
Quy authored
137 <span class="clearb"><?php echo $lang_admin_permissions['All caps sigs help'] ?></span>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
138 </td>
139 </tr>
140 <tr>
de90cd5 @reines Merging the changes for localized admin panel.
reines authored
141 <th scope="row"><?php echo $lang_admin_permissions['Max sig length label'] ?></th>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
142 <td>
143 <input type="text" name="form[sig_length]" size="5" maxlength="5" value="<?php echo $pun_config['p_sig_length'] ?>" />
4179643 @Quy #717: Applied clearb class to help text.
Quy authored
144 <span class="clearb"><?php echo $lang_admin_permissions['Max sig length help'] ?></span>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
145 </td>
146 </tr>
147 <tr>
de90cd5 @reines Merging the changes for localized admin panel.
reines authored
148 <th scope="row"><?php echo $lang_admin_permissions['Max sig lines label'] ?></th>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
149 <td>
150 <input type="text" name="form[sig_lines]" size="3" maxlength="3" value="<?php echo $pun_config['p_sig_lines'] ?>" />
4179643 @Quy #717: Applied clearb class to help text.
Quy authored
151 <span class="clearb"><?php echo $lang_admin_permissions['Max sig lines help'] ?></span>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
152 </td>
153 </tr>
154 </table>
155 </div>
156 </fieldset>
157 </div>
158 <div class="inform">
159 <fieldset>
de90cd5 @reines Merging the changes for localized admin panel.
reines authored
160 <legend><?php echo $lang_admin_permissions['Registration subhead'] ?></legend>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
161 <div class="infldset">
162 <table class="aligntop" cellspacing="0">
163 <tr>
de90cd5 @reines Merging the changes for localized admin panel.
reines authored
164 <th scope="row"><?php echo $lang_admin_permissions['Banned e-mail label'] ?></th>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
165 <td>
672c69c @daris #717: Adding missing labels for radio buttons in admin panel
daris authored
166 <label class="conl"><input type="radio" name="form[allow_banned_email]" value="1"<?php if ($pun_config['p_allow_banned_email'] == '1') echo ' checked="checked"' ?> />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong></label>
167 <label class="conl"><input type="radio" name="form[allow_banned_email]" value="0"<?php if ($pun_config['p_allow_banned_email'] == '0') echo ' checked="checked"' ?> />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong></label>
4179643 @Quy #717: Applied clearb class to help text.
Quy authored
168 <span class="clearb"><?php echo $lang_admin_permissions['Banned e-mail help'] ?></span>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
169 </td>
170 </tr>
171 <tr>
de90cd5 @reines Merging the changes for localized admin panel.
reines authored
172 <th scope="row"><?php echo $lang_admin_permissions['Duplicate e-mail label'] ?></th>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
173 <td>
672c69c @daris #717: Adding missing labels for radio buttons in admin panel
daris authored
174 <label class="conl"><input type="radio" name="form[allow_dupe_email]" value="1"<?php if ($pun_config['p_allow_dupe_email'] == '1') echo ' checked="checked"' ?> />&#160;<strong><?php echo $lang_admin_common['Yes'] ?></strong></label>
175 <label class="conl"><input type="radio" name="form[allow_dupe_email]" value="0"<?php if ($pun_config['p_allow_dupe_email'] == '0') echo ' checked="checked"' ?> />&#160;<strong><?php echo $lang_admin_common['No'] ?></strong></label>
4179643 @Quy #717: Applied clearb class to help text.
Quy authored
176 <span class="clearb"><?php echo $lang_admin_permissions['Duplicate e-mail help'] ?></span>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
177 </td>
178 </tr>
179 </table>
180 </div>
181 </fieldset>
182 </div>
de90cd5 @reines Merging the changes for localized admin panel.
reines authored
183 <p class="submitend"><input type="submit" name="save" value="<?php echo $lang_admin_common['Save changes'] ?>" /></p>
9d65336 Initial import based on revision 1613 of PunBB.
Connor Dunn authored
184 </form>
185 </div>
186 </div>
187 <div class="clearer"></div>
188 </div>
189 <?php
190
191 require PUN_ROOT.'footer.php';
Something went wrong with that request. Please try again.