|
1 <?php |
|
2 /*********************************************************************** |
|
3 |
|
4 Copyright (C) 2002-2008 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 // if (!defined('PUN_ROOT')) |
|
27 // define('PUN_ROOT', '../'); |
|
28 // require PUN_ROOT.'include/common.php'; |
|
29 require PUN_ROOT.'include/common_admin.php'; |
|
30 |
|
31 // import globals (I really hope this isn't dangerous) |
|
32 foreach ( $GLOBALS as $key => $_ ) |
|
33 { |
|
34 $$key =& $GLOBALS[$key]; |
|
35 } |
|
36 |
|
37 ($hook = get_hook('aop_start')) ? eval($hook) : null; |
|
38 |
|
39 if ($session->user_level < USER_LEVEL_ADMIN) |
|
40 message($lang_common['No permission']); |
|
41 |
|
42 // Load the admin.php language file |
|
43 require PUN_ROOT.'lang/'.$pun_user['language'].'/admin.php'; |
|
44 $GLOBALS['lang_admin'] = $lang_admin; |
|
45 |
|
46 $section = isset($_GET['section']) ? $_GET['section'] : null; |
|
47 |
|
48 |
|
49 if (isset($_POST['form_sent'])) |
|
50 { |
|
51 $form = array_map('trim', $_POST['form']); |
|
52 |
|
53 ($hook = get_hook('aop_form_submitted')) ? eval($hook) : null; |
|
54 |
|
55 // Validate input depending on section |
|
56 switch ($section) |
|
57 { |
|
58 case 'setup': |
|
59 { |
|
60 ($hook = get_hook('aop_setup_validation')) ? eval($hook) : null; |
|
61 |
|
62 if ($form['board_title'] == '') |
|
63 message($lang_admin['Error no board title']); |
|
64 |
|
65 // Clean default_lang, default_style, and sef |
|
66 $form['default_style'] = preg_replace('#[\.\\\/]#', '', $form['default_style']); |
|
67 $form['default_lang'] = preg_replace('#[\.\\\/]#', '', $form['default_lang']); |
|
68 $form['sef'] = preg_replace('#[\.\\\/]#', '', $form['sef']); |
|
69 |
|
70 // Make sure default_lang and default_style exist |
|
71 if (!file_exists(PUN_ROOT.'style/'.$form['default_style'].'/'.$form['default_style'].'.css')) |
|
72 message($lang_common['Bad request']); |
|
73 if (!file_exists(PUN_ROOT.'lang/'.$form['default_lang'].'/common.php')) |
|
74 message($lang_common['Bad request']); |
|
75 |
|
76 $form['timeout_visit'] = intval($form['timeout_visit']); |
|
77 $form['timeout_online'] = intval($form['timeout_online']); |
|
78 $form['redirect_delay'] = intval($form['redirect_delay']); |
|
79 |
|
80 if ($form['timeout_online'] >= $form['timeout_visit']) |
|
81 message($lang_admin['Error timeout value']); |
|
82 |
|
83 $form['disp_topics_default'] = (intval($form['disp_topics_default']) > 0) ? intval($form['disp_topics_default']) : 1; |
|
84 $form['disp_posts_default'] = (intval($form['disp_posts_default']) > 0) ? intval($form['disp_posts_default']) : 1; |
|
85 |
|
86 if ($form['additional_navlinks'] != '') |
|
87 $form['additional_navlinks'] = trim(pun_linebreaks($form['additional_navlinks'])); |
|
88 |
|
89 break; |
|
90 } |
|
91 |
|
92 case 'features': |
|
93 { |
|
94 ($hook = get_hook('aop_features_validation')) ? eval($hook) : null; |
|
95 |
|
96 if (!isset($form['search_all_forums']) || $form['search_all_forums'] != '1') $form['search_all_forums'] = '0'; |
|
97 if (!isset($form['ranks']) || $form['ranks'] != '1') $form['ranks'] = '0'; |
|
98 if (!isset($form['censoring']) || $form['censoring'] != '1') $form['censoring'] = '0'; |
|
99 if (!isset($form['quickjump']) || $form['quickjump'] != '1') $form['quickjump'] = '0'; |
|
100 if (!isset($form['show_version']) || $form['show_version'] != '1') $form['show_version'] = '0'; |
|
101 if (!isset($form['users_online']) || $form['users_online'] != '1') $form['users_online'] = '0'; |
|
102 |
|
103 if (!isset($form['quickpost']) || $form['quickpost'] != '1') $form['quickpost'] = '0'; |
|
104 if (!isset($form['subscriptions']) || $form['subscriptions'] != '1') $form['subscriptions'] = '0'; |
|
105 if (!isset($form['force_guest_email']) || $form['force_guest_email'] != '1') $form['force_guest_email'] = '0'; |
|
106 if (!isset($form['show_dot']) || $form['show_dot'] != '1') $form['show_dot'] = '0'; |
|
107 if (!isset($form['topic_views']) || $form['topic_views'] != '1') $form['topic_views'] = '0'; |
|
108 if (!isset($form['show_post_count']) || $form['show_post_count'] != '1') $form['show_post_count'] = '0'; |
|
109 if (!isset($form['show_user_info']) || $form['show_user_info'] != '1') $form['show_user_info'] = '0'; |
|
110 |
|
111 if (!isset($form['message_bbcode']) || $form['message_bbcode'] != '1') $form['message_bbcode'] = '0'; |
|
112 if (!isset($form['message_img_tag']) || $form['message_img_tag'] != '1') $form['message_img_tag'] = '0'; |
|
113 if (!isset($form['smilies']) || $form['smilies'] != '1') $form['smilies'] = '0'; |
|
114 if (!isset($form['make_links']) || $form['make_links'] != '1') $form['make_links'] = '0'; |
|
115 if (!isset($form['message_all_caps']) || $form['message_all_caps'] != '1') $form['message_all_caps'] = '0'; |
|
116 if (!isset($form['subject_all_caps']) || $form['subject_all_caps'] != '1') $form['subject_all_caps'] = '0'; |
|
117 $form['indent_num_spaces'] = intval($form['indent_num_spaces']); |
|
118 |
|
119 if (!isset($form['signatures']) || $form['signatures'] != '1') $form['signatures'] = '0'; |
|
120 if (!isset($form['sig_bbcode']) || $form['sig_bbcode'] != '1') $form['sig_bbcode'] = '0'; |
|
121 if (!isset($form['sig_img_tag']) || $form['sig_img_tag'] != '1') $form['sig_img_tag'] = '0'; |
|
122 if (!isset($form['sig_all_caps']) || $form['sig_all_caps'] != '1') $form['sig_all_caps'] = '0'; |
|
123 |
|
124 if (!isset($form['avatars']) || $form['avatars'] != '1') $form['avatars'] = '0'; |
|
125 |
|
126 // Clean avatars_dir |
|
127 $form['avatars_dir'] = str_replace("\0", '', $form['avatars_dir']); |
|
128 |
|
129 // Make sure avatars_dir doesn't end with a slash |
|
130 if (substr($form['avatars_dir'], -1) == '/') |
|
131 $form['avatars_dir'] = substr($form['avatars_dir'], 0, -1); |
|
132 |
|
133 $form['avatars_width'] = intval($form['avatars_width']); |
|
134 $form['avatars_height'] = intval($form['avatars_height']); |
|
135 $form['avatars_size'] = intval($form['avatars_size']); |
|
136 |
|
137 if (!isset($form['check_for_updates']) || $form['check_for_updates'] != '1') $form['check_for_updates'] = '0'; |
|
138 if (!isset($form['gzip']) || $form['gzip'] != '1') $form['gzip'] = '0'; |
|
139 |
|
140 if (!isset($form['announcement']) || $form['announcement'] != '1') $form['announcement'] = '0'; |
|
141 |
|
142 if ($form['announcement_message'] != '') |
|
143 $form['announcement_message'] = pun_linebreaks($form['announcement_message']); |
|
144 else |
|
145 $form['announcement_message'] = $lang_admin['Announcement message default']; |
|
146 |
|
147 break; |
|
148 } |
|
149 |
|
150 case 'email': |
|
151 { |
|
152 ($hook = get_hook('aop_email_validation')) ? eval($hook) : null; |
|
153 |
|
154 require PUN_ROOT.'include/email.php'; |
|
155 |
|
156 $form['admin_email'] = strtolower($form['admin_email']); |
|
157 if (!is_valid_email($form['admin_email'])) |
|
158 message($lang_admin['Error invalid admin e-mail']); |
|
159 |
|
160 $form['webmaster_email'] = strtolower($form['webmaster_email']); |
|
161 if (!is_valid_email($form['webmaster_email'])) |
|
162 message($lang_admin['Error invalid web e-mail']); |
|
163 |
|
164 if (!isset($form['smtp_ssl']) || $form['smtp_ssl'] != '1') $form['smtp_ssl'] = '0'; |
|
165 |
|
166 break; |
|
167 } |
|
168 |
|
169 case 'registration': |
|
170 { |
|
171 ($hook = get_hook('aop_registration_validation')) ? eval($hook) : null; |
|
172 |
|
173 if (!isset($form['regs_allow']) || $form['regs_allow'] != '1') $form['regs_allow'] = '0'; |
|
174 if (!isset($form['regs_verify']) || $form['regs_verify'] != '1') $form['regs_verify'] = '0'; |
|
175 if (!isset($form['allow_banned_email']) || $form['allow_banned_email'] != '1') $form['allow_banned_email'] = '0'; |
|
176 if (!isset($form['allow_dupe_email']) || $form['allow_dupe_email'] != '1') $form['allow_dupe_email'] = '0'; |
|
177 if (!isset($form['regs_report']) || $form['regs_report'] != '1') $form['regs_report'] = '0'; |
|
178 |
|
179 if (!isset($form['rules']) || $form['rules'] != '1') $form['rules'] = '0'; |
|
180 |
|
181 if ($form['rules_message'] != '') |
|
182 $form['rules_message'] = pun_linebreaks($form['rules_message']); |
|
183 else |
|
184 $form['rules_message'] = $lang_admin['Rules default']; |
|
185 |
|
186 break; |
|
187 } |
|
188 |
|
189 case 'maintenance': |
|
190 { |
|
191 ($hook = get_hook('aop_maintenance_validation')) ? eval($hook) : null; |
|
192 |
|
193 if (!isset($form['maintenance']) || $form['maintenance'] != '1') $form['maintenance'] = '0'; |
|
194 |
|
195 if ($form['maintenance_message'] != '') |
|
196 $form['maintenance_message'] = pun_linebreaks($form['maintenance_message']); |
|
197 else |
|
198 $form['maintenance_message'] = $lang_admin['Maintenance message default']; |
|
199 |
|
200 break; |
|
201 } |
|
202 |
|
203 default: |
|
204 { |
|
205 ($hook = get_hook('aop_new_section_validation')) ? eval($hook) : null; |
|
206 break; |
|
207 } |
|
208 } |
|
209 |
|
210 ($hook = get_hook('aop_pre_update_configuration')) ? eval($hook) : null; |
|
211 |
|
212 while (list($key, $input) = @each($form)) |
|
213 { |
|
214 // Only update permission values that have changed |
|
215 if (array_key_exists('p_'.$key, $pun_config) && $pun_config['p_'.$key] != $input) |
|
216 { |
|
217 $query = array( |
|
218 'UPDATE' => 'config', |
|
219 'SET' => 'conf_value='.$input, |
|
220 'WHERE' => 'conf_name=\'p_'.$pun_db->escape($key).'\'' |
|
221 ); |
|
222 |
|
223 ($hook = get_hook('aop_qr_update_permission_conf')) ? eval($hook) : null; |
|
224 $pun_db->query_build($query) or error(__FILE__, __LINE__); |
|
225 } |
|
226 |
|
227 // Only update option values that have changed |
|
228 if (array_key_exists('o_'.$key, $pun_config) && $pun_config['o_'.$key] != $input) |
|
229 { |
|
230 if ($input != '' || is_int($input)) |
|
231 $value = '\''.$pun_db->escape($input).'\''; |
|
232 else |
|
233 $value = 'NULL'; |
|
234 |
|
235 $query = array( |
|
236 'UPDATE' => 'config', |
|
237 'SET' => 'conf_value='.$value, |
|
238 'WHERE' => 'conf_name=\'o_'.$pun_db->escape($key).'\'' |
|
239 ); |
|
240 |
|
241 ($hook = get_hook('aop_qr_update_permission_option')) ? eval($hook) : null; |
|
242 $pun_db->query_build($query) or error(__FILE__, __LINE__); |
|
243 } |
|
244 } |
|
245 |
|
246 // Regenerate the config cache |
|
247 require_once PUN_ROOT.'include/cache.php'; |
|
248 generate_config_cache(); |
|
249 |
|
250 pun_redirect(pun_link($pun_url['admin_options_'.$section]), $lang_admin['Options updated'].' '.$lang_admin['Redirect']); |
|
251 } |
|
252 |
|
253 |
|
254 if (!$section || $section == 'setup') |
|
255 { |
|
256 // Setup the form |
|
257 $pun_page['fld_count'] = $pun_page['set_count'] = $pun_page['part_count'] = 0; |
|
258 |
|
259 // Setup breadcrumbs |
|
260 $pun_page['crumbs'] = array( |
|
261 array($pun_config['o_board_title'], pun_link($pun_url['index'])), |
|
262 array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), |
|
263 $lang_admin['Setup'] |
|
264 ); |
|
265 |
|
266 ($hook = get_hook('aop_setup_pre_header_load')) ? eval($hook) : null; |
|
267 |
|
268 define('PUN_PAGE_SECTION', 'options'); |
|
269 define('PUN_PAGE', 'admin-options-setup'); |
|
270 require PUN_ROOT.'header.php'; |
|
271 |
|
272 ?> |
|
273 <div id="pun-main" class="main sectioned admin"> |
|
274 |
|
275 |
|
276 <?php echo generate_admin_menu(); ?> |
|
277 |
|
278 <div class="main-head"> |
|
279 <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1> |
|
280 </div> |
|
281 |
|
282 <div class="main-content frm parted"> |
|
283 <div class="frm-head"> |
|
284 <h2><span><?php echo $lang_admin['Essentials head'] ?></span></h2> |
|
285 </div> |
|
286 <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_options_setup']) ?>"> |
|
287 <div class="hidden"> |
|
288 <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_options_setup'])) ?>" /> |
|
289 <input type="hidden" name="form_sent" value="1" /> |
|
290 </div> |
|
291 <?php ($hook = get_hook('aop_setup_pre_personal_part')) ? eval($hook) : null; ?> |
|
292 <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>"> |
|
293 <h3><span><?php printf($lang_admin['Essentials personal head'], $pun_page['part_count']) ?></span></h3> |
|
294 <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
|
295 <legend class="frm-legend"><strong><?php echo $lang_admin['Personalize legend'] ?></strong></legend> |
|
296 <div class="frm-fld text"> |
|
297 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
298 <span class="fld-label"><?php echo $lang_admin['Board title'] ?></span><br /> |
|
299 <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[board_title]" size="50" maxlength="255" value="<?php echo htmlspecialchars($pun_config['o_board_title']) ?>" /></span><br /> |
|
300 </label> |
|
301 </div> |
|
302 <div class="frm-fld text"> |
|
303 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
304 <span class="fld-label"><?php echo $lang_admin['Board description'] ?></span><br /> |
|
305 <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[board_desc]" size="50" maxlength="255" value="<?php echo htmlspecialchars($pun_config['o_board_desc']) ?>" /></span><br /> |
|
306 <span class="fld-help"><?php echo $lang_admin['Board description help'] ?></span> |
|
307 </label> |
|
308 </div> |
|
309 <div class="frm-fld select"> |
|
310 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
311 <span class="fld-label"><?php echo $lang_admin['Default style'] ?></span><br /> |
|
312 <span class="fld-input"><select id="fld<?php echo $pun_page['fld_count'] ?>" name="form[default_style]"> |
|
313 <?php |
|
314 |
|
315 $styles = array(); |
|
316 $d = dir(PUN_ROOT.'style'); |
|
317 while (($entry = $d->read()) !== false) |
|
318 { |
|
319 if ($entry != '.' && $entry != '..' && is_dir(PUN_ROOT.'style/'.$entry) && file_exists(PUN_ROOT.'style/'.$entry.'/'.$entry.'.css')) |
|
320 $styles[] = $entry; |
|
321 } |
|
322 $d->close(); |
|
323 |
|
324 @natcasesort($styles); |
|
325 |
|
326 while (list(, $temp) = @each($styles)) |
|
327 { |
|
328 if ($pun_config['o_default_style'] == $temp) |
|
329 echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'" selected="selected">'.str_replace('_', ' ', $temp).'</option>'."\n"; |
|
330 else |
|
331 echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'">'.str_replace('_', ' ', $temp).'</option>'."\n"; |
|
332 } |
|
333 |
|
334 ?> |
|
335 </select></span> |
|
336 </label> |
|
337 </div> |
|
338 <?php ($hook = get_hook('aop_setup_personal_end')) ? eval($hook) : null; ?> |
|
339 </fieldset> |
|
340 </div> |
|
341 <?php |
|
342 |
|
343 // Reset fieldset counter |
|
344 $pun_page['set_count'] = 0; |
|
345 |
|
346 ($hook = get_hook('aop_setup_pre_local_part')) ? eval($hook) : null; |
|
347 |
|
348 ?> |
|
349 <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>"> |
|
350 <h3><span><?php printf($lang_admin['Essentials local head'], $pun_page['part_count']) ?></span></h3> |
|
351 <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
|
352 <legend class="frm-legend"><strong><?php echo $lang_admin['Board defaults legend'] ?></strong></legend> |
|
353 <div class="frm-fld"> |
|
354 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
355 <span class="fld-label"><?php echo $lang_admin['Default language'] ?></span><br /> |
|
356 <span class="fld-input"><select id="fld<?php echo $pun_page['fld_count'] ?>" name="form[default_lang]"> |
|
357 <?php |
|
358 |
|
359 $languages = array(); |
|
360 $d = dir(PUN_ROOT.'lang'); |
|
361 while (($entry = $d->read()) !== false) |
|
362 { |
|
363 if ($entry != '.' && $entry != '..' && is_dir(PUN_ROOT.'lang/'.$entry) && file_exists(PUN_ROOT.'lang/'.$entry.'/common.php')) |
|
364 $languages[] = $entry; |
|
365 } |
|
366 $d->close(); |
|
367 |
|
368 @natcasesort($languages); |
|
369 |
|
370 while (list(, $temp) = @each($languages)) |
|
371 { |
|
372 if ($pun_config['o_default_lang'] == $temp) |
|
373 echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'" selected="selected">'.$temp.'</option>'."\n"; |
|
374 else |
|
375 echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'">'.$temp.'</option>'."\n"; |
|
376 } |
|
377 |
|
378 ?> |
|
379 </select></span> |
|
380 <span class="fld-help"><?php echo $lang_admin['Default language help'] ?></span> |
|
381 </label> |
|
382 </div> |
|
383 <div class="frm-fld select"> |
|
384 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
385 <span class="fld-label"><?php echo $lang_admin['Default timezone'] ?></span><br /> |
|
386 <span class="fld-input"><select id="fld<?php echo $pun_page['fld_count'] ?>" name="form[default_timezone]"> |
|
387 <option value="-12"<?php if ($pun_config['o_default_timezone'] == -12 ) echo ' selected="selected"' ?>>-12</option> |
|
388 <option value="-11"<?php if ($pun_config['o_default_timezone'] == -11) echo ' selected="selected"' ?>>-11</option> |
|
389 <option value="-10"<?php if ($pun_config['o_default_timezone'] == -10) echo ' selected="selected"' ?>>-10</option> |
|
390 <option value="-9.5"<?php if ($pun_config['o_default_timezone'] == -9.5) echo ' selected="selected"' ?>>-09.5</option> |
|
391 <option value="-9"<?php if ($pun_config['o_default_timezone'] == -9 ) echo ' selected="selected"' ?>>-09</option> |
|
392 <option value="-8.5"<?php if ($pun_config['o_default_timezone'] == -8.5) echo ' selected="selected"' ?>>-08.5</option> |
|
393 <option value="-8"<?php if ($pun_config['o_default_timezone'] == -8 ) echo ' selected="selected"' ?>>-08 PST</option> |
|
394 <option value="-7"<?php if ($pun_config['o_default_timezone'] == -7 ) echo ' selected="selected"' ?>>-07 MST</option> |
|
395 <option value="-6"<?php if ($pun_config['o_default_timezone'] == -6 ) echo ' selected="selected"' ?>>-06 CST</option> |
|
396 <option value="-5"<?php if ($pun_config['o_default_timezone'] == -5 ) echo ' selected="selected"' ?>>-05 EST</option> |
|
397 <option value="-4"<?php if ($pun_config['o_default_timezone'] == -4 ) echo ' selected="selected"' ?>>-04 AST</option> |
|
398 <option value="-3.5"<?php if ($pun_config['o_default_timezone'] == -3.5) echo ' selected="selected"' ?>>-03.5</option> |
|
399 <option value="-3"<?php if ($pun_config['o_default_timezone'] == -3 ) echo ' selected="selected"' ?>>-03 ADT</option> |
|
400 <option value="-2"<?php if ($pun_config['o_default_timezone'] == -2 ) echo ' selected="selected"' ?>>-02</option> |
|
401 <option value="-1"<?php if ($pun_config['o_default_timezone'] == -1) echo ' selected="selected"' ?>>-01</option> |
|
402 <option value="0"<?php if ($pun_config['o_default_timezone'] == 0) echo ' selected="selected"' ?>>00 GMT</option> |
|
403 <option value="1"<?php if ($pun_config['o_default_timezone'] == 1) echo ' selected="selected"' ?>>+01 CET</option> |
|
404 <option value="2"<?php if ($pun_config['o_default_timezone'] == 2 ) echo ' selected="selected"' ?>>+02</option> |
|
405 <option value="3"<?php if ($pun_config['o_default_timezone'] == 3 ) echo ' selected="selected"' ?>>+03</option> |
|
406 <option value="3.5"<?php if ($pun_config['o_default_timezone'] == 3.5) echo ' selected="selected"' ?>>+03.5</option> |
|
407 <option value="4"<?php if ($pun_config['o_default_timezone'] == 4 ) echo ' selected="selected"' ?>>+04</option> |
|
408 <option value="4.5"<?php if ($pun_config['o_default_timezone'] == 4.5) echo ' selected="selected"' ?>>+04.5</option> |
|
409 <option value="5"<?php if ($pun_config['o_default_timezone'] == 5 ) echo ' selected="selected"' ?>>+05</option> |
|
410 <option value="5.5"<?php if ($pun_config['o_default_timezone'] == 5.5) echo ' selected="selected"' ?>>+05.5</option> |
|
411 <option value="6"<?php if ($pun_config['o_default_timezone'] == 6 ) echo ' selected="selected"' ?>>+06</option> |
|
412 <option value="6.5"<?php if ($pun_config['o_default_timezone'] == 6.5) echo ' selected="selected"' ?>>+06.5</option> |
|
413 <option value="7"<?php if ($pun_config['o_default_timezone'] == 7 ) echo ' selected="selected"' ?>>+07</option> |
|
414 <option value="8"<?php if ($pun_config['o_default_timezone'] == 8 ) echo ' selected="selected"' ?>>+08</option> |
|
415 <option value="9"<?php if ($pun_config['o_default_timezone'] == 9 ) echo ' selected="selected"' ?>>+09</option> |
|
416 <option value="9.5"<?php if ($pun_config['o_default_timezone'] == 9.5) echo ' selected="selected"' ?>>+09.5</option> |
|
417 <option value="10"<?php if ($pun_config['o_default_timezone'] == 10) echo ' selected="selected"' ?>>+10</option> |
|
418 <option value="10.5"<?php if ($pun_config['o_default_timezone'] == 10.5) echo ' selected="selected"' ?>>+10.5</option> |
|
419 <option value="11"<?php if ($pun_config['o_default_timezone'] == 11) echo ' selected="selected"' ?>>+11</option> |
|
420 <option value="11.5"<?php if ($pun_config['o_default_timezone'] == 11.5) echo ' selected="selected"' ?>>+11.5</option> |
|
421 <option value="12"<?php if ($pun_config['o_default_timezone'] == 12 ) echo ' selected="selected"' ?>>+12</option> |
|
422 <option value="13"<?php if ($pun_config['o_default_timezone'] == 13 ) echo ' selected="selected"' ?>>+13</option> |
|
423 </select></span> |
|
424 </label> |
|
425 </div> |
|
426 <div class="frm-fld text"> |
|
427 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
428 <span class="fld-label"><?php echo $lang_admin['Time format'] ?></span><br /> |
|
429 <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[time_format]" size="25" maxlength="25" value="<?php echo htmlspecialchars($pun_config['o_time_format']) ?>" /></span><br /> |
|
430 <span class="fld-help">[<?php echo $lang_admin['Current format'].' '.gmdate($pun_config['o_time_format']) ?>]</span> |
|
431 </label> |
|
432 </div> |
|
433 <div class="frm-fld text"> |
|
434 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
435 <span class="fld-label"><?php echo $lang_admin['Date format'] ?></span><br /> |
|
436 <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[date_format]" size="25" maxlength="25" value="<?php echo htmlspecialchars($pun_config['o_date_format']) ?>" /></span><br /> |
|
437 <span class="fld-help">[<?php echo $lang_admin['Current format'].' '.gmdate($pun_config['o_date_format']) ?>]</span> |
|
438 </label> |
|
439 </div> |
|
440 <?php ($hook = get_hook('aop_setup_local_end')) ? eval($hook) : null; ?> |
|
441 </fieldset> |
|
442 </div> |
|
443 <?php |
|
444 |
|
445 // Reset fieldset counter |
|
446 $pun_page['set_count'] = 0; |
|
447 |
|
448 ($hook = get_hook('aop_setup_pre_timeouts_part')) ? eval($hook) : null; |
|
449 |
|
450 ?> |
|
451 <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>"> |
|
452 <h3><span><?php printf($lang_admin['Timeout part head'], $pun_page['part_count']) ?></span></h3> |
|
453 <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
|
454 <legend class="frm-legend"><strong><?php echo $lang_admin['Timeouts legend'] ?></strong></legend> |
|
455 <div class="frm-fld text"> |
|
456 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
457 <span class="fld-label"><?php echo $lang_admin['Visit timeout'] ?></span><br /> |
|
458 <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[timeout_visit]" size="5" maxlength="5" value="<?php echo $pun_config['o_timeout_visit'] ?>" /></span><br /> |
|
459 <span class="fld-extra"><?php echo $lang_admin['Visit timeout info'] ?></span> |
|
460 </label> |
|
461 </div> |
|
462 <div class="frm-fld text"> |
|
463 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
464 <span class="fld-label"><?php echo $lang_admin['Online timeout'] ?></span><br /> |
|
465 <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[timeout_online]" size="5" maxlength="5" value="<?php echo $pun_config['o_timeout_online'] ?>" /></span><br /> |
|
466 <span class="fld-extra"><?php echo $lang_admin['Online timeout info'] ?></span> |
|
467 </label> |
|
468 </div> |
|
469 <div class="frm-fld text"> |
|
470 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
471 <span class="fld-label"><?php echo $lang_admin['Redirect time'] ?></span><br /> |
|
472 <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[redirect_delay]" size="5" maxlength="5" value="<?php echo $pun_config['o_redirect_delay'] ?>" /></span><br /> |
|
473 <span class="fld-extra"><?php echo $lang_admin['Redirect time info'] ?></span> |
|
474 </label> |
|
475 </div> |
|
476 <?php ($hook = get_hook('aop_setup_timeouts_end')) ? eval($hook) : null; ?> |
|
477 </fieldset> |
|
478 </div> |
|
479 <?php |
|
480 |
|
481 // Reset fieldset counter |
|
482 $pun_page['set_count'] = 0; |
|
483 |
|
484 ($hook = get_hook('aop_setup_pre_pagination_part')) ? eval($hook) : null; |
|
485 |
|
486 ?> |
|
487 <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>"> |
|
488 <h3><span><?php printf($lang_admin['Pagination'], $pun_page['part_count']) ?></span></h3> |
|
489 <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
|
490 <legend class="frm-legend"><strong><?php echo $lang_admin['Updates legend'] ?></strong></legend> |
|
491 <div class="frm-fld text"> |
|
492 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
493 <span class="fld-label"><?php echo $lang_admin['Topics per page'] ?></span><br /> |
|
494 <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[disp_topics_default]" size="3" maxlength="3" value="<?php echo $pun_config['o_disp_topics_default'] ?>" /></span> |
|
495 </label> |
|
496 </div> |
|
497 <div class="frm-fld text"> |
|
498 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
499 <span class="fld-label"><?php echo $lang_admin['Posts per page'] ?></span><br /> |
|
500 <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[disp_posts_default]" size="3" maxlength="3" value="<?php echo $pun_config['o_disp_posts_default'] ?>" /></span> |
|
501 </label> |
|
502 </div> |
|
503 <div class="frm-fld text"> |
|
504 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
505 <span class="fld-label"><?php echo $lang_admin['Topic review'] ?></span><br /> |
|
506 <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[topic_review]" size="3" maxlength="3" value="<?php echo $pun_config['o_topic_review'] ?>" /></span> |
|
507 <span class="fld-extra"><?php echo $lang_admin['Topic review info'] ?></span> |
|
508 </label> |
|
509 </div> |
|
510 <?php ($hook = get_hook('aop_setup_pagination_end')) ? eval($hook) : null; ?> |
|
511 </fieldset> |
|
512 </div> |
|
513 <?php |
|
514 |
|
515 // Reset fieldset counter |
|
516 $pun_page['set_count'] = 0; |
|
517 |
|
518 ($hook = get_hook('aop_setup_pre_reports_part')) ? eval($hook) : null; |
|
519 |
|
520 ?> |
|
521 <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>"> |
|
522 <h3><span><?php printf($lang_admin['Report part head'], $pun_page['part_count']) ?></span></h3> |
|
523 <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
|
524 <legend class="frm-legend"><strong><?php echo $lang_admin['General features'] ?></strong></legend> |
|
525 <fieldset class="frm-group"> |
|
526 <legend><span><?php echo $lang_admin['Report method'] ?></span></legend> |
|
527 <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="radio" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[report_method]" value="0"<?php if ($pun_config['o_report_method'] == '0') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Report internal'] ?></label></div> |
|
528 <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="radio" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[report_method]" value="1"<?php if ($pun_config['o_report_method'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Report email'] ?></label></div> |
|
529 <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="radio" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[report_method]" value="2"<?php if ($pun_config['o_report_method'] == '2') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Report both'] ?></label></div> |
|
530 </fieldset> |
|
531 <?php ($hook = get_hook('aop_setup_reports_end')) ? eval($hook) : null; ?> |
|
532 </fieldset> |
|
533 </div> |
|
534 <?php |
|
535 |
|
536 // Reset fieldset counter |
|
537 $pun_page['set_count'] = 0; |
|
538 |
|
539 ($hook = get_hook('aop_setup_pre_url_scheme_part')) ? eval($hook) : null; |
|
540 |
|
541 ?> |
|
542 <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>"> |
|
543 <h3><span><?php printf($lang_admin['Essentials URL head'], $pun_page['part_count']) ?></span></h3> |
|
544 <div class="frm-info"> |
|
545 <p class="warn"><?php echo $lang_admin['URL scheme info'] ?></p> |
|
546 </div> |
|
547 <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
|
548 <legend class="frm-legend"><strong><?php echo $lang_admin['Addressing legend'] ?></strong></legend> |
|
549 <div class="frm-fld select"> |
|
550 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
551 <span class="fld-label"><?php echo $lang_admin['URL scheme'] ?></span><br /> |
|
552 <span class="fld-input"><select id="fld<?php echo $pun_page['fld_count'] ?>" name="form[sef]"> |
|
553 <?php |
|
554 |
|
555 $url_schemes = array(); |
|
556 $d = dir(PUN_ROOT.'include/url'); |
|
557 while (($entry = $d->read()) !== false) |
|
558 { |
|
559 if ($entry != '.' && $entry != '..' && substr($entry, strlen($entry)-4) == '.php') |
|
560 $url_schemes[] = $entry; |
|
561 } |
|
562 $d->close(); |
|
563 |
|
564 @natcasesort($url_schemes); |
|
565 |
|
566 while (list(, $temp) = @each($url_schemes)) |
|
567 { |
|
568 $temp = substr($temp,0,-4); |
|
569 if ($pun_config['o_sef'] == $temp) |
|
570 echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'" selected="selected">'.str_replace('_', ' ', $temp).'</option>'."\n"; |
|
571 else |
|
572 echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'">'.str_replace('_', ' ', $temp).'</option>'."\n"; |
|
573 } |
|
574 |
|
575 ?> |
|
576 </select></span> |
|
577 <span class="fld-help"><?php echo $lang_admin['URL scheme help'] ?></span> |
|
578 </label> |
|
579 </div> |
|
580 <?php ($hook = get_hook('aop_setup_url_scheme_end')) ? eval($hook) : null; ?> |
|
581 </fieldset> |
|
582 </div> |
|
583 <?php |
|
584 |
|
585 // Reset fieldset counter |
|
586 $pun_page['set_count'] = 0; |
|
587 |
|
588 ($hook = get_hook('aop_setup_pre_links_part')) ? eval($hook) : null; |
|
589 |
|
590 ?> |
|
591 <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>"> |
|
592 <h3><span><?php printf($lang_admin['Essentials links head'], $pun_page['part_count']) ?></span></h3> |
|
593 <div class="frm-info"> |
|
594 <p class="warn"><?php echo $lang_admin['Essentials links info'] ?></p> |
|
595 </div> |
|
596 <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
|
597 <legend class="frm-legend"><strong><?php echo $lang_admin['Board menu legend'] ?></strong></legend> |
|
598 <div class="frm-fld text textarea"> |
|
599 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
600 <span class="fld-label"><?php echo $lang_admin['Additional menu items'] ?></span><br /> |
|
601 <span class="fld-input"><textarea id="fld<?php echo $pun_page['fld_count'] ?>" name="form[additional_navlinks]" rows="3" cols="55"><?php echo htmlspecialchars($pun_config['o_additional_navlinks']) ?></textarea></span> |
|
602 </label> |
|
603 </div> |
|
604 <?php ($hook = get_hook('aop_setup_links_end')) ? eval($hook) : null; ?> |
|
605 </fieldset> |
|
606 </div> |
|
607 <div class="frm-buttons"> |
|
608 <span class="submit"><input type="submit" name="save" value="<?php echo $lang_admin['Save changes'] ?>" /></span> |
|
609 </div> |
|
610 </form> |
|
611 </div> |
|
612 |
|
613 </div> |
|
614 <?php |
|
615 |
|
616 } |
|
617 |
|
618 else if ($section == 'features') |
|
619 { |
|
620 // Setup the form |
|
621 $pun_page['fld_count'] = $pun_page['set_count'] = $pun_page['part_count'] = 0; |
|
622 |
|
623 // Setup breadcrumbs |
|
624 $pun_page['crumbs'] = array( |
|
625 array($pun_config['o_board_title'], pun_link($pun_url['index'])), |
|
626 array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), |
|
627 $lang_admin['Features'] |
|
628 ); |
|
629 |
|
630 ($hook = get_hook('aop_features_pre_header_load')) ? eval($hook) : null; |
|
631 |
|
632 define('PUN_PAGE_SECTION', 'options'); |
|
633 define('PUN_PAGE', 'admin-options-features'); |
|
634 require PUN_ROOT.'header.php'; |
|
635 |
|
636 ?> |
|
637 <div id="pun-main" class="main sectioned admin"> |
|
638 |
|
639 <?php echo generate_admin_menu(); ?> |
|
640 |
|
641 <div class="main-head"> |
|
642 <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1> |
|
643 </div> |
|
644 |
|
645 <div class="main-content frm parted"> |
|
646 <div class="frm-head"> |
|
647 <h2><span><?php echo $lang_admin['Features'] ?></span></h2> |
|
648 </div> |
|
649 <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_options_features']) ?>"> |
|
650 <div class="hidden"> |
|
651 <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_options_features'])) ?>" /> |
|
652 <input type="hidden" name="form_sent" value="1" /> |
|
653 </div> |
|
654 <?php ($hook = get_hook('aop_features_pre_general_part')) ? eval($hook) : null; ?> |
|
655 <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>"> |
|
656 <h3><span><?php printf($lang_admin['General part head'], $pun_page['part_count'], '<a href="'.pun_link($pun_url['admin_censoring']).'">'.strtolower($lang_admin['Censoring']).'</a>') ?></span></h3> |
|
657 <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
|
658 <legend class="frm-legend"><strong><?php echo $lang_admin['General features'] ?></strong></legend> |
|
659 <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Searching'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[search_all_forums]" value="1"<?php if ($pun_config['o_search_all_forums'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Search all forums'] ?></label></div> |
|
660 <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['User ranks'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[ranks]" value="1"<?php if ($pun_config['o_ranks'] == '1') echo ' checked="checked"' ?> /><?php echo $lang_admin['User ranks info'] ?></label></div> |
|
661 <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Censor words'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[censoring]" value="1"<?php if ($pun_config['o_censoring'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Censor words info'] ?></label></div> |
|
662 <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Quick jump'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[quickjump]" value="1"<?php if ($pun_config['o_quickjump'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Quick jump info'] ?></label></div> |
|
663 <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Show version'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[show_version]" value="1"<?php if ($pun_config['o_show_version'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Show version info'] ?></label></div> |
|
664 <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Online list'] ?></span> <input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[users_online]" value="1"<?php if ($pun_config['o_users_online'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Users online info'] ?></label></div> |
|
665 <?php ($hook = get_hook('aop_features_general_end')) ? eval($hook) : null; ?> |
|
666 </fieldset> |
|
667 </div> |
|
668 <?php |
|
669 |
|
670 // Reset fieldset counter |
|
671 $pun_page['set_count'] = 0; |
|
672 |
|
673 ($hook = get_hook('aop_features_pre_posting_part')) ? eval($hook) : null; |
|
674 |
|
675 ?> |
|
676 <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>"> |
|
677 <h3><span><?php printf($lang_admin['Posting part head'], $pun_page['part_count']) ?></span></h3> |
|
678 <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
|
679 <legend class="frm-legend"><span><?php echo $lang_admin['Posts'] ?></span></legend> |
|
680 <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Quick post'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[quickpost]" value="1"<?php if ($pun_config['o_quickpost'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Quick post info'] ?></label></div> |
|
681 <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Subscriptions'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[subscriptions]" value="1"<?php if ($pun_config['o_subscriptions'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Subscriptions info'] ?></label></div> |
|
682 <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Guest posting'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[force_guest_email]" value="1"<?php if ($pun_config['p_force_guest_email'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Require guest email'] ?></label></div> |
|
683 <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['User has posted'] ?></span> <input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[show_dot]" value="1"<?php if ($pun_config['o_show_dot'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['User has posted info'] ?></label></div> |
|
684 <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Topic views'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[topic_views]" value="1"<?php if ($pun_config['o_topic_views'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Topic views info'] ?></label></div> |
|
685 <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['User post count'] ?></span> <input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[show_post_count]" value="1"<?php if ($pun_config['o_show_post_count'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['User post count info'] ?></label></div> |
|
686 <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['User info'] ?></span> <input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[show_user_info]" value="1"<?php if ($pun_config['o_show_user_info'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['User info in posts'] ?></label></div> |
|
687 <?php ($hook = get_hook('aop_features_posting_end')) ? eval($hook) : null; ?> |
|
688 </fieldset> |
|
689 </div> |
|
690 <?php |
|
691 |
|
692 // Reset fieldset counter |
|
693 $pun_page['set_count'] = 0; |
|
694 |
|
695 ($hook = get_hook('aop_features_pre_message_part')) ? eval($hook) : null; |
|
696 |
|
697 ?> |
|
698 <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>"> |
|
699 <h3><span><?php printf($lang_admin['Message part head'], $pun_page['part_count']) ?></span></h3> |
|
700 <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
|
701 <legend class="frm-legend"><span><?php echo $lang_admin['Posts'] ?></span></legend> |
|
702 <fieldset class="frm-group"> |
|
703 <legend><span><?php echo $lang_admin['Post content'] ?></span></legend> |
|
704 <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[message_bbcode]" value="1"<?php if ($pun_config['p_message_bbcode'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow BBCode'] ?></label></div> |
|
705 <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[message_img_tag]" value="1"<?php if ($pun_config['p_message_img_tag'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow img'] ?></label></div> |
|
706 <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[smilies]" value="1"<?php if ($pun_config['o_smilies'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Smilies in posts'] ?></label></div> |
|
707 <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[make_links]" value="1"<?php if ($pun_config['o_make_links'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Make clickable links'] ?></label></div> |
|
708 </fieldset> |
|
709 <fieldset class="frm-group"> |
|
710 <legend><span><?php echo $lang_admin['Allow capitals'] ?></span></legend> |
|
711 <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[message_all_caps]" value="1"<?php if ($pun_config['p_message_all_caps'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['All caps message'] ?></label></div> |
|
712 <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[subject_all_caps]" value="1"<?php if ($pun_config['p_subject_all_caps'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['All caps subject'] ?></label></div> |
|
713 </fieldset> |
|
714 <div class="frm-fld text"> |
|
715 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
716 <span class="fld-label"><?php echo $lang_admin['Indent size'] ?></span><br /> |
|
717 <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[indent_num_spaces]" size="3" maxlength="3" value="<?php echo $pun_config['o_indent_num_spaces'] ?>" /></span><br /> |
|
718 <span class="fld-extra"><?php echo $lang_admin['Indent size info'] ?></span> |
|
719 </label> |
|
720 </div> |
|
721 <?php ($hook = get_hook('aop_features_message_end')) ? eval($hook) : null; ?> |
|
722 </fieldset> |
|
723 </div> |
|
724 <?php |
|
725 |
|
726 // Reset fieldset counter |
|
727 $pun_page['set_count'] = 0; |
|
728 |
|
729 ($hook = get_hook('aop_features_pre_sigs_part')) ? eval($hook) : null; |
|
730 |
|
731 ?> |
|
732 <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>"> |
|
733 <h3><span><?php printf($lang_admin['Sigs part head'], $pun_page['part_count']) ?></span></h3> |
|
734 <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
|
735 <legend class="frm-legend"><span><?php echo $lang_admin['Signatures'] ?></span></legend> |
|
736 <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Allow signatures'] ?></span> <input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[signatures]" value="1"<?php if ($pun_config['o_signatures'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow signatures info'] ?></label></div> |
|
737 <fieldset class="frm-group"> |
|
738 <legend><span><?php echo $lang_admin['Signature content'] ?></span></legend> |
|
739 <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[sig_bbcode]" value="1"<?php if ($pun_config['p_sig_bbcode'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['BBCode in sigs'] ?></label></div> |
|
740 <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[sig_img_tag]" value="1"<?php if ($pun_config['p_sig_img_tag'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Img in sigs'] ?></label></div> |
|
741 <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[smilies_sig]" value="1"<?php if ($pun_config['o_smilies_sig'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Smilies in signatures'] ?></label></div> |
|
742 <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[sig_all_caps]" value="1"<?php if ($pun_config['p_sig_all_caps'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['All caps sigs'] ?></label></div> |
|
743 </fieldset> |
|
744 <div class="frm-fld"> |
|
745 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
746 <span class="fld-label"><?php echo $lang_admin['Max sig length'] ?></span><br /> |
|
747 <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[sig_length]" size="5" maxlength="5" value="<?php echo $pun_config['p_sig_length'] ?>" /></span> |
|
748 <span class="fld-extra"><?php echo $lang_admin['Max sig length info'] ?></span> |
|
749 </label> |
|
750 </div> |
|
751 <div class="frm-fld"> |
|
752 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
753 <span class="fld-label"><?php echo $lang_admin['Max sig lines'] ?></span><br /> |
|
754 <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[sig_lines]" size="5" maxlength="3" value="<?php echo $pun_config['p_sig_lines'] ?>" /></span> |
|
755 <span class="fld-extra"><?php echo $lang_admin['Max sig lines info'] ?></span> |
|
756 </label> |
|
757 </div> |
|
758 <?php ($hook = get_hook('aop_features_sigs_end')) ? eval($hook) : null; ?> |
|
759 </fieldset> |
|
760 </div> |
|
761 <?php |
|
762 |
|
763 // Reset fieldset counter |
|
764 $pun_page['set_count'] = 0; |
|
765 |
|
766 ($hook = get_hook('aop_features_pre_avatars_part')) ? eval($hook) : null; |
|
767 |
|
768 ?> |
|
769 <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>"> |
|
770 <h3><span><?php printf($lang_admin['Avatars part head'], $pun_page['part_count']) ?></span></h3> |
|
771 <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
|
772 <legend class="frm-legend"><span><?php echo $lang_admin['Use avatars'] ?></span></legend> |
|
773 <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Allow avatars'] ?></span> <input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[avatars]" value="1"<?php if ($pun_config['o_avatars'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Use avatars info'] ?></label></div> |
|
774 <div class="frm-fld"> |
|
775 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
776 <span class="fld-label"><?php echo $lang_admin['Upload directory'] ?></span><br /> |
|
777 <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[avatars_dir]" size="35" maxlength="50" value="<?php echo htmlspecialchars($pun_config['o_avatars_dir']) ?>" /></span> |
|
778 <span class="fld-help"><?php echo $lang_admin['Upload directory info'] ?></span> |
|
779 </label> |
|
780 </div> |
|
781 <div class="frm-fld"> |
|
782 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
783 <span class="fld-label"><?php echo $lang_admin['Max width'] ?></span><br /> |
|
784 <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[avatars_width]" size="6" maxlength="5" value="<?php echo $pun_config['o_avatars_width'] ?>" /></span> |
|
785 <span class="fld-extra"><?php echo $lang_admin['Max width info'] ?></span> |
|
786 </label> |
|
787 </div> |
|
788 <div class="frm-fld"> |
|
789 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
790 <span class="fld-label"><?php echo $lang_admin['Max height'] ?></span><br /> |
|
791 <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[avatars_height]" size="6" maxlength="5" value="<?php echo $pun_config['o_avatars_height'] ?>" /></span> |
|
792 <span class="fld-extra"><?php echo $lang_admin['Max height info'] ?></span> |
|
793 </label> |
|
794 </div> |
|
795 <div class="frm-fld"> |
|
796 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
797 <span class="fld-label"><?php echo $lang_admin['Max size'] ?></span><br /> |
|
798 <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[avatars_size]" size="6" maxlength="6" value="<?php echo $pun_config['o_avatars_size'] ?>" /></span> |
|
799 <span class="fld-extra"><?php echo $lang_admin['Max size info'] ?></span> |
|
800 </label> |
|
801 </div> |
|
802 <?php ($hook = get_hook('aop_features_avatars_end')) ? eval($hook) : null; ?> |
|
803 </fieldset> |
|
804 </div> |
|
805 <?php |
|
806 |
|
807 // Reset fieldset counter |
|
808 $pun_page['set_count'] = 0; |
|
809 |
|
810 ($hook = get_hook('aop_features_pre_updates_part')) ? eval($hook) : null; |
|
811 |
|
812 ?> |
|
813 <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>"> |
|
814 <h3><span><?php printf($lang_admin['Essentials automatic head'], $pun_page['part_count']) ?></span></h3> |
|
815 <div class="frm-info"> |
|
816 <p><?php echo $lang_admin['Essentials automatic info'] ?></p> |
|
817 </div> |
|
818 <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
|
819 <legend class="frm-legend"><strong><?php echo $lang_admin['Updates legend'] ?></strong></legend> |
|
820 <?php if (function_exists('curl_init') || function_exists('fsockopen') || in_array(strtolower(@ini_get('allow_url_fopen')), array('on', 'true', '1'))): ?> <div class="radbox checkbox"> |
|
821 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Check for updates'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[check_for_updates]" value="1"<?php if ($pun_config['o_check_for_updates'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Auto check for updates'] ?></label> |
|
822 </div> |
|
823 <?php else: ?> <div class="frm-fld link"> |
|
824 <span class="fld-label"><?php echo $lang_admin['Check for updates'] ?></span> |
|
825 <span class="fld-input">[ <?php echo $lang_admin['Auto check disabled'] ?> ]</span> |
|
826 </div> |
|
827 <?php endif; ($hook = get_hook('aop_features_updates_end')) ? eval($hook) : null; ?> </fieldset> |
|
828 </div> |
|
829 <?php |
|
830 |
|
831 // Reset fieldset counter |
|
832 $pun_page['set_count'] = 0; |
|
833 |
|
834 ($hook = get_hook('aop_features_pre_gzip_part')) ? eval($hook) : null; |
|
835 |
|
836 ?> |
|
837 <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>"> |
|
838 <h3><span><?php printf($lang_admin['Essentials gzip head'], $pun_page['part_count']) ?></span></h3> |
|
839 <div class="frm-info"> |
|
840 <p><?php echo $lang_admin['GZip info'] ?></p> |
|
841 </div> |
|
842 <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
|
843 <legend class="frm-legend"><strong><?php echo $lang_admin['Compression legend'] ?></strong></legend> |
|
844 <div class="radbox checkbox"> |
|
845 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Enable gzip'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[gzip]" value="1"<?php if ($pun_config['o_gzip'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['GZip output'] ?></label> |
|
846 </div> |
|
847 <?php ($hook = get_hook('aop_features_gzip_end')) ? eval($hook) : null; ?> |
|
848 </fieldset> |
|
849 </div> |
|
850 <?php |
|
851 |
|
852 // Reset fieldset counter |
|
853 $pun_page['set_count'] = 0; |
|
854 |
|
855 ($hook = get_hook('aop_features_pre_announcement_part')) ? eval($hook) : null; |
|
856 |
|
857 ?> |
|
858 <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>"> |
|
859 <h3><span><?php printf($lang_admin['Announcement part head'], $pun_page['part_count']) ?></span></h3> |
|
860 <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
|
861 <legend class="frm-legend"><strong><?php echo $lang_admin['Announcement legend'] ?></strong></legend> |
|
862 <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Enable announcement'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[announcement]" value="1"<?php if ($pun_config['o_announcement'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Enable announcement info'] ?></label></div> |
|
863 <div class="frm-fld"> |
|
864 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
865 <span class="fld-label"><?php echo $lang_admin['Announcement heading'] ?></span><br /> |
|
866 <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[announcement_heading]" size="50" maxlength="255" value="<?php echo $pun_config['o_announcement_heading'] ?>" /></span> |
|
867 </label> |
|
868 </div> |
|
869 <div class="frm-fld text textarea"> |
|
870 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
871 <span class="fld-label"><?php echo $lang_admin['Announcement message'] ?></span><br /> |
|
872 <span class="fld-input"><textarea id="fld<?php echo $pun_page['fld_count'] ?>" name="form[announcement_message]" rows="5" cols="55"><?php echo htmlspecialchars($pun_config['o_announcement_message']) ?></textarea></span> |
|
873 <span class="fld-help"><?php echo $lang_admin['Announcement message help'] ?></span> |
|
874 </label> |
|
875 </div> |
|
876 <?php ($hook = get_hook('aop_features_announcement_end')) ? eval($hook) : null; ?> |
|
877 </fieldset> |
|
878 </div> |
|
879 <div class="frm-buttons"> |
|
880 <span class="submit"><input type="submit" name="save" value="<?php echo $lang_admin['Save changes'] ?>" /></span> |
|
881 </div> |
|
882 </form> |
|
883 </div> |
|
884 |
|
885 </div> |
|
886 <?php |
|
887 |
|
888 } |
|
889 |
|
890 else if ($section == 'registration') |
|
891 { |
|
892 // Setup the form |
|
893 $pun_page['part_count'] = $pun_page['fld_count'] = $pun_page['set_count'] = 0; |
|
894 |
|
895 // Setup breadcrumbs |
|
896 $pun_page['crumbs'] = array( |
|
897 array($pun_config['o_board_title'], pun_link($pun_url['index'])), |
|
898 array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), |
|
899 $lang_admin['Registration'] |
|
900 ); |
|
901 |
|
902 ($hook = get_hook('aop_registration_pre_header_load')) ? eval($hook) : null; |
|
903 |
|
904 define('PUN_PAGE_SECTION', 'options'); |
|
905 define('PUN_PAGE', 'admin-options-registration'); |
|
906 require PUN_ROOT.'header.php'; |
|
907 |
|
908 ?> |
|
909 <div id="pun-main" class="main sectioned admin"> |
|
910 |
|
911 <?php echo generate_admin_menu(); ?> |
|
912 |
|
913 <div class="main-head"> |
|
914 <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1> |
|
915 </div> |
|
916 |
|
917 <div class="main-content frm parted"> |
|
918 <div class="frm-head"> |
|
919 <h2><span><?php echo $lang_admin['Registration head'] ?></span></h2> |
|
920 </div> |
|
921 <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_options_registration']) ?>"> |
|
922 <div class="hidden"> |
|
923 <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_options_registration'])) ?>" /> |
|
924 <input type="hidden" name="form_sent" value="1" /> |
|
925 </div> |
|
926 <?php ($hook = get_hook('aop_registration_pre_new_regs_part')) ? eval($hook) : null; ?> |
|
927 <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>"> |
|
928 <h3><span><?php printf($lang_admin['Allow reg head'], $pun_page['part_count']) ?></span></h3> |
|
929 <div class="frm-info"> |
|
930 <p><?php echo $lang_admin['New reg info'] ?></p> |
|
931 </div> |
|
932 <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
|
933 <legend class="frm-legend"><span><?php echo $lang_admin['Registration legend'] ?></span></legend> |
|
934 <div class="radbox checkbox"> |
|
935 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Allow registrations'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[regs_allow]" value="1"<?php if ($pun_config['o_regs_allow'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow new registrations'] ?></label> |
|
936 </div> |
|
937 <div class="radbox checkbox"> |
|
938 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Verify registrations'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[regs_verify]" value="1"<?php if ($pun_config['o_regs_verify'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Enable verify registrations'] ?></label> |
|
939 </div> |
|
940 <fieldset class="frm-group"> |
|
941 <legend><span><?php echo $lang_admin['Registration e-mail'] ?></span></legend> |
|
942 <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[allow_banned_email]" value="1"<?php if ($pun_config['p_allow_banned_email'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow banned email'] ?></label></div> |
|
943 <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[allow_dupe_email]" value="1"<?php if ($pun_config['p_allow_dupe_email'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow dupe email'] ?></label></div> |
|
944 </fieldset> |
|
945 <div class="radbox checkbox"> |
|
946 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Report new registrations'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[regs_report]" value="1"<?php if ($pun_config['o_regs_report'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Report new registrations info'] ?></label> |
|
947 </div> |
|
948 <?php ($hook = get_hook('aop_registration_new_regs_end')) ? eval($hook) : null; ?> |
|
949 </fieldset> |
|
950 </div> |
|
951 <?php |
|
952 |
|
953 // Reset fieldset counter |
|
954 $pun_page['set_count'] = 0; |
|
955 |
|
956 ($hook = get_hook('aop_registration_pre_rules_part')) ? eval($hook) : null; |
|
957 |
|
958 ?> |
|
959 <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>"> |
|
960 <h3><span><?php printf($lang_admin['Rules part head'], $pun_page['part_count']) ?></span></h3> |
|
961 <div class="frm-info"> |
|
962 <p><?php echo $lang_admin['Rules info'] ?></p> |
|
963 </div> |
|
964 <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
|
965 <legend class="frm-legend"><span><?php echo $lang_admin['Rules legend'] ?></span></legend> |
|
966 <div class="radbox checkbox"> |
|
967 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Use rules'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[rules]" value="1"<?php if ($pun_config['o_rules'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Require rules'] ?></label> |
|
968 </div> |
|
969 <div class="frm-fld text textarea"> |
|
970 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
971 <span class="fld-label"><?php echo $lang_admin['Compose rules'] ?></span><br /> |
|
972 <span class="fld-input"><textarea id="fld<?php echo $pun_page['fld_count'] ?>" name="form[rules_message]" rows="10" cols="55"><?php echo htmlspecialchars($pun_config['o_rules_message']) ?></textarea></span> |
|
973 <span class="fld-help"><?php echo $lang_admin['Compose rules help'] ?></span> |
|
974 </label> |
|
975 </div> |
|
976 <?php ($hook = get_hook('aop_registration_rules_end')) ? eval($hook) : null; ?> |
|
977 </fieldset> |
|
978 <div class="frm-buttons"> |
|
979 <span class="submit"><input type="submit" name="save" value="<?php echo $lang_admin['Save changes'] ?>" /></span> |
|
980 </div> |
|
981 </div> |
|
982 </form> |
|
983 </div> |
|
984 |
|
985 </div> |
|
986 <?php |
|
987 |
|
988 } |
|
989 |
|
990 else if ($section == 'maintenance') |
|
991 { |
|
992 // Setup the form |
|
993 $pun_page['fld_count'] = $pun_page['set_count'] = 0; |
|
994 |
|
995 // Setup breadcrumbs |
|
996 $pun_page['crumbs'] = array( |
|
997 array($pun_config['o_board_title'], pun_link($pun_url['index'])), |
|
998 array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), |
|
999 $lang_admin['Maintenance mode'] |
|
1000 ); |
|
1001 |
|
1002 ($hook = get_hook('aop_maintenance_pre_header_load')) ? eval($hook) : null; |
|
1003 |
|
1004 define('PUN_PAGE_SECTION', 'management'); |
|
1005 define('PUN_PAGE', 'admin-options-maintenance'); |
|
1006 require PUN_ROOT.'header.php'; |
|
1007 |
|
1008 ?> |
|
1009 <div id="pun-main" class="main sectioned admin"> |
|
1010 |
|
1011 <?php echo generate_admin_menu(); ?> |
|
1012 |
|
1013 <div class="main-head"> |
|
1014 <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1> |
|
1015 </div> |
|
1016 |
|
1017 <div class="main-content frm"> |
|
1018 <div class="frm-head"> |
|
1019 <h2><span><?php echo $lang_admin['Maintenance head'] ?></span></h2> |
|
1020 </div> |
|
1021 <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_options_maintenance']) ?>"> |
|
1022 <div class="hidden"> |
|
1023 <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_options_maintenance'])) ?>" /> |
|
1024 <input type="hidden" name="form_sent" value="1" /> |
|
1025 </div> |
|
1026 <div class="frm-info"> |
|
1027 <p class="important"><?php echo $lang_admin['Maintenance mode info'] ?></p> |
|
1028 <p class="warn"><?php echo $lang_admin['Maintenance mode warn'] ?></p> |
|
1029 </div> |
|
1030 <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
|
1031 <legend class="frm-legend"><strong><?php echo $lang_admin['Board maintenance legend'] ?></strong></legend> |
|
1032 <div id="maintenance" class="radbox checkbox"> |
|
1033 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Maintenance mode'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[maintenance]" value="1"<?php if ($pun_config['o_maintenance'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Maintenance mode label'] ?></label> |
|
1034 </div> |
|
1035 <div class="frm-fld text textarea"> |
|
1036 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
1037 <span class="fld-label"><?php echo $lang_admin['Maintenance message'] ?></span><br /> |
|
1038 <span class="fld-input"><textarea id="fld<?php echo $pun_page['fld_count'] ?>" name="form[maintenance_message]" rows="5" cols="55"><?php echo htmlspecialchars($pun_config['o_maintenance_message']) ?></textarea></span> |
|
1039 <span class="fld-help"><?php echo $lang_admin['Maintenance message help'] ?></span> |
|
1040 </label> |
|
1041 </div> |
|
1042 <?php ($hook = get_hook('aop_maintenance_end')) ? eval($hook) : null; ?> |
|
1043 </fieldset> |
|
1044 <div class="frm-buttons"> |
|
1045 <span class="submit"><input type="submit" name="save" value="<?php echo $lang_admin['Save changes'] ?>" /></span> |
|
1046 </div> |
|
1047 </form> |
|
1048 </div> |
|
1049 |
|
1050 </div> |
|
1051 <?php |
|
1052 |
|
1053 } |
|
1054 |
|
1055 else if ($section == 'email') |
|
1056 { |
|
1057 // Setup the form |
|
1058 $pun_page['part_count'] = $pun_page['fld_count'] = $pun_page['set_count'] = 0; |
|
1059 |
|
1060 // Setup breadcrumbs |
|
1061 $pun_page['crumbs'] = array( |
|
1062 array($pun_config['o_board_title'], pun_link($pun_url['index'])), |
|
1063 array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), |
|
1064 $lang_admin['E-mail'] |
|
1065 ); |
|
1066 |
|
1067 ($hook = get_hook('aop_email_pre_header_load')) ? eval($hook) : null; |
|
1068 |
|
1069 define('PUN_PAGE_SECTION', 'options'); |
|
1070 define('PUN_PAGE', 'admin-options-email'); |
|
1071 require PUN_ROOT.'header.php'; |
|
1072 |
|
1073 ?> |
|
1074 <div id="pun-main" class="main sectioned admin"> |
|
1075 |
|
1076 <?php echo generate_admin_menu(); ?> |
|
1077 |
|
1078 <div class="main-head"> |
|
1079 <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1> |
|
1080 </div> |
|
1081 |
|
1082 <div class="main-content frm parted"> |
|
1083 <div class="frm-head"> |
|
1084 <h2><span><?php echo $lang_admin['E-mail head'] ?></span></h2> |
|
1085 </div> |
|
1086 <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_options_email']) ?>"> |
|
1087 <div class="hidden"> |
|
1088 <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_options_email'])) ?>" /> |
|
1089 <input type="hidden" name="form_sent" value="1" /> |
|
1090 </div> |
|
1091 <?php ($hook = get_hook('aop_email_pre_addresses_part')) ? eval($hook) : null; ?> |
|
1092 <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>"> |
|
1093 <h3><span><?php printf($lang_admin['Essentials mail head'], $pun_page['part_count']) ?></span></h3> |
|
1094 <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
|
1095 <legend class="frm-legend"><strong><?php echo $lang_admin['E-mail addresses legend'] ?></strong></legend> |
|
1096 <div class="frm-fld text"> |
|
1097 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
1098 <span class="fld-label"><?php echo $lang_admin['Admin e-mail'] ?></span><br /> |
|
1099 <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[admin_email]" size="50" maxlength="80" value="<?php echo $pun_config['o_admin_email'] ?>" /></span> |
|
1100 </label> |
|
1101 </div> |
|
1102 <div class="frm-fld text"> |
|
1103 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
1104 <span class="fld-label"><?php echo $lang_admin['Webmaster e-mail'] ?></span><br /> |
|
1105 <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[webmaster_email]" size="50" maxlength="80" value="<?php echo $pun_config['o_webmaster_email'] ?>" /></span> |
|
1106 <span class="fld-help"><?php echo $lang_admin['Webmaster e-mail help'] ?></span> |
|
1107 </label> |
|
1108 </div> |
|
1109 </fieldset> |
|
1110 <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
|
1111 <legend class="frm-legend"><strong><?php echo $lang_admin['Mail list legend'] ?></strong></legend> |
|
1112 <div class="frm-fld text textarea"> |
|
1113 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
1114 <span class="fld-label"><?php echo $lang_admin['Mailing list'] ?></span><br /> |
|
1115 <span class="fld-input"><textarea id="fld<?php echo $pun_page['fld_count'] ?>" name="form[mailing_list]" rows="5" cols="55"><?php echo htmlspecialchars($pun_config['o_mailing_list']) ?></textarea></span><br /> |
|
1116 <span class="fld-help"><?php echo $lang_admin['Mailing list help'] ?></span> |
|
1117 </label> |
|
1118 </div> |
|
1119 <?php ($hook = get_hook('aop_email_addresses_end')) ? eval($hook) : null; ?> |
|
1120 </fieldset> |
|
1121 </div> |
|
1122 <?php |
|
1123 |
|
1124 // Reset fieldset counter |
|
1125 $pun_page['set_count'] = 0; |
|
1126 |
|
1127 ($hook = get_hook('aop_email_pre_smtp_part')) ? eval($hook) : null; |
|
1128 |
|
1129 ?> |
|
1130 <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>"> |
|
1131 <h3><span><?php printf($lang_admin['Essentials e-mail head'], $pun_page['part_count']) ?></span></h3> |
|
1132 <div class="frm-info"> |
|
1133 <p><?php echo $lang_admin['SMTP server info'] ?></p> |
|
1134 </div> |
|
1135 <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>"> |
|
1136 <legend class="frm-legend"><strong><?php echo $lang_admin['E-mail server legend'] ?></strong></legend> |
|
1137 <div class="frm-fld text"> |
|
1138 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
1139 <span class="fld-label"><?php echo $lang_admin['SMTP server address'] ?></span><br /> |
|
1140 <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[smtp_host]" size="35" maxlength="100" value="<?php echo htmlspecialchars($pun_config['o_smtp_host']) ?>" /></span><br /> |
|
1141 <span class="fld-help"><?php echo $lang_admin['SMTP server address help'] ?></span> |
|
1142 </label> |
|
1143 </div> |
|
1144 <div class="frm-fld text"> |
|
1145 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
1146 <span class="fld-label"><?php echo $lang_admin['SMTP username'] ?></span><br /> |
|
1147 <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[smtp_user]" size="35" maxlength="50" value="<?php echo htmlspecialchars($pun_config['o_smtp_user']) ?>" /></span><br /> |
|
1148 <span class="fld-help"><?php echo $lang_admin['SMTP username help'] ?></span> |
|
1149 </label> |
|
1150 </div> |
|
1151 <div class="frm-fld text"> |
|
1152 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"> |
|
1153 <span class="fld-label"><?php echo $lang_admin['SMTP password'] ?></span><br /> |
|
1154 <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[smtp_pass]" size="35" maxlength="50" value="<?php echo htmlspecialchars($pun_config['o_smtp_pass']) ?>" /></span><br /> |
|
1155 <span class="fld-help"><?php echo $lang_admin['SMTP password help'] ?></span> |
|
1156 </label> |
|
1157 </div> |
|
1158 <div class="radbox checkbox"> |
|
1159 <label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['SMTP SSL'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[smtp_ssl]" value="1"<?php if ($pun_config['o_smtp_ssl'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['SMTP SSL info'] ?></label> |
|
1160 </div> |
|
1161 <?php ($hook = get_hook('aop_email_smtp_end')) ? eval($hook) : null; ?> |
|
1162 </fieldset> |
|
1163 </div> |
|
1164 <div class="frm-buttons"> |
|
1165 <span class="submit"><input type="submit" name="save" value="<?php echo $lang_admin['Save changes'] ?>" /></span> |
|
1166 </div> |
|
1167 </form> |
|
1168 </div> |
|
1169 |
|
1170 </div> |
|
1171 <?php |
|
1172 |
|
1173 } |
|
1174 |
|
1175 ($hook = get_hook('aop_new_section')) ? eval($hook) : null; |
|
1176 |
|
1177 require PUN_ROOT.'footer.php'; |