a/upload/admin_bans.php |
b/upload/admin_bans.php |
1: <?php | 1: <?php |
2: | 2: |
3: /*--- | 3: /** |
4: | 4: * Copyright (C) 2008-2010 FluxBB |
5: Copyright (C) 2008-2009 FluxBB.org | 5: * based on code by Rickard Andersson copyright (C) 2002-2008 PunBB |
6: based on code copyright (C) 2002-2005 Rickard Andersson | 6: * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
7: License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 7: */ |
8: | |
9: ---*/ | |
10: | 8: |
11: // Tell header.php to use the admin template | 9: // Tell header.php to use the admin template |
12: define('PUN_ADMIN_CONSOLE', 1); | 10: define('PUN_ADMIN_CONSOLE', 1); |
15: require PUN_ROOT.'include/common.php'; | 13: require PUN_ROOT.'include/common.php'; |
16: require PUN_ROOT.'include/common_admin.php'; | 14: require PUN_ROOT.'include/common_admin.php'; |
17: | 15: |
| 16: |
18: if ($pun_user['g_id'] != PUN_ADMIN && ($pun_user['g_moderator'] != '1' || $pun_user['g_mod_ban_users'] == '0')) | 17: if ($pun_user['g_id'] != PUN_ADMIN && ($pun_user['g_moderator'] != '1' || $pun_user['g_mod_ban_users'] == '0')) |
19: message($lang_common['No permission']); | 18: message($lang_common['No permission']); |
20: | 19: |
| 20: // Load the admin_bans.php language file |
| 21: require PUN_ROOT.'lang/'.$admin_language.'/admin_bans.php'; |
21: | 22: |
22: // Add/edit a ban (stage 1) | 23: // Add/edit a ban (stage 1) |
23: if (isset($_REQUEST['add_ban']) || isset($_GET['edit_ban'])) | 24: if (isset($_REQUEST['add_ban']) || isset($_GET['edit_ban'])) |
37: if ($db->num_rows($result)) | 38: if ($db->num_rows($result)) |
38: list($group_id, $ban_user, $ban_email) = $db->fetch_row($result); | 39: list($group_id, $ban_user, $ban_email) = $db->fetch_row($result); |
39: else | 40: else |
40: message('No user by that ID registered.'); | 41: message($lang_admin_bans['No user ID message']); |
41: } | 42: } |
42: else // Otherwise the username is in POST | 43: else // Otherwise the username is in POST |
43: { | 44: { |
44: $ban_user = trim($_POST['new_ban_user']); | 45: $ban_user = pun_trim($_POST['new_ban_user']); |
45: | 46: |
46: if ($ban_user != '') | 47: if ($ban_user != '') |
47: { | 48: { |
49: if ($db->num_rows($result)) | 50: if ($db->num_rows($result)) |
50: list($user_id, $group_id, $ban_user, $ban_email) = $db->fetch_row($result); | 51: list($user_id, $group_id, $ban_user, $ban_email) = $db->fetch_row($result); |
51: else | 52: else |
52: message('No user by that username registered. If you want to add a ban not tied to a specific username just leave the username blank.'); | 53: message($lang_admin_bans['No user message']); |
53: } | 54: } |
54: } | 55: } |
55: | 56: |
56: // Make sure we're not banning an admin | 57: // Make sure we're not banning an admin |
57: if (isset($group_id) && $group_id == PUN_ADMIN) | 58: if (isset($group_id) && $group_id == PUN_ADMIN) |
58: message('The user '.pun_htmlspecialchars($ban_user).' is an administrator and can\'t be banned. If you want to ban an administrator, you must first demote him/her to moderator or user.'); | 59: message(sprintf($lang_admin_bans['User is admin message'], pun_htmlspecialchars($ban_user))); |
59: | 60: |
60: // If we have a $user_id, we can try to find the last known IP of that user | 61: // If we have a $user_id, we can try to find the last known IP of that user |
61: if (isset($user_id)) | 62: if (isset($user_id)) |
83: $mode = 'edit'; | 84: $mode = 'edit'; |
84: } | 85: } |
85: | 86: |
86: $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Bans'; | 87: $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Bans']); |
87: $focus_element = array('bans2', 'ban_user'); | 88: $focus_element = array('bans2', 'ban_user'); |
| 89: define('PUN_ACTIVE_PAGE', 'admin'); |
88: require PUN_ROOT.'header.php'; | 90: require PUN_ROOT.'header.php'; |
89: | 91: |
90: generate_admin_menu('bans'); | 92: generate_admin_menu('bans'); |
91: | 93: |
92: | |
93: ?> | 94: ?> |
94: <div class="blockform"> | 95: <div class="blockform"> |
95: <h2><span>Ban advanced settings</span></h2> | 96: <h2><span><?php echo $lang_admin_bans['Ban advanced head'] ?></span></h2> |
96: <div class="box"> | 97: <div class="box"> |
97: <form id="bans2" method="post" action="admin_bans.php"> | 98: <form id="bans2" method="post" action="admin_bans.php"> |
98: <div class="inform"> | 99: <div class="inform"> |
99: <input type="hidden" name="mode" value="<?php echo $mode ?>" /> | 100: <input type="hidden" name="mode" value="<?php echo $mode ?>" /> |
100: <?php if ($mode == 'edit'): ?> <input type="hidden" name="ban_id" value="<?php echo $ban_id ?>" /> | 101: <?php if ($mode == 'edit'): ?> <input type="hidden" name="ban_id" value="<?php echo $ban_id ?>" /> |
101: <?php endif; ?> <fieldset> | 102: <?php endif; ?> <fieldset> |
102: <legend>Supplement ban with IP and email</legend> | 103: <legend><?php echo $lang_admin_bans['Ban advanced subhead'] ?></legend> |
103: <div class="infldset"> | 104: <div class="infldset"> |
104: <table class="aligntop" cellspacing="0"> | 105: <table class="aligntop" cellspacing="0"> |
105: <tr> | 106: <tr> |
106: <th scope="row">Username</th> | 107: <th scope="row"><?php echo $lang_admin_bans['Username label'] ?></th> |
107: <td> | 108: <td> |
108: <input type="text" name="ban_user" size="25" maxlength="25" value="<?php if (isset($ban_user)) echo pun_htmlspecialchars($ban_user); ?>" tabindex="1" /> | 109: <input type="text" name="ban_user" size="25" maxlength="25" value="<?php if (isset($ban_user)) echo pun_htmlspecialchars($ban_user); ?>" tabindex="1" /> |
109: <span>The username to ban.</span> | 110: <span><?php echo $lang_admin_bans['Username help'] ?></span> |
110: </td> | 111: </td> |
111: </tr> | 112: </tr> |
112: <tr> | 113: <tr> |
113: <th scope="row">IP-addresses</th> | 114: <th scope="row"><?php echo $lang_admin_bans['IP label'] ?></th> |
114: <td> | 115: <td> |
115: <input type="text" name="ban_ip" size="45" maxlength="255" value="<?php if (isset($ban_ip)) echo $ban_ip; ?>" tabindex="2" /> | 116: <input type="text" name="ban_ip" size="45" maxlength="255" value="<?php if (isset($ban_ip)) echo $ban_ip; ?>" tabindex="2" /> |
116: <span>The IP or IP-ranges you wish to ban (e.g. 150.11.110.1 or 150.11.110). Separate addresses with spaces. If an IP is entered already it is the last known IP of this user in the database.<?php if ($ban_user != '' && isset($user_id)) echo ' Click <a href="admin_users.php?ip_stats='.$user_id.'">here</a> to see IP statistics for this user.' ?></span> | 117: <span><?php echo $lang_admin_bans['IP help'] ?><?php if ($ban_user != '' && isset($user_id)) printf(' '.$lang_admin_bans['IP help link'], '<a href="admin_users.php?ip_stats='.$user_id.'">'.$lang_admin_common['here'].'</a>') ?></span> |
117: </td> | 118: </td> |
118: </tr> | 119: </tr> |
119: <tr> | 120: <tr> |
120: <th scope="row">Email/domain</th> | 121: <th scope="row"><?php echo $lang_admin_bans['E-mail label'] ?></th> |
121: <td> | 122: <td> |
122: <input type="text" name="ban_email" size="40" maxlength="50" value="<?php if (isset($ban_email)) echo strtolower($ban_email); ?>" tabindex="3" /> | 123: <input type="text" name="ban_email" size="40" maxlength="80" value="<?php if (isset($ban_email)) echo strtolower($ban_email); ?>" tabindex="3" /> |
123: <span>The email or email domain you wish to ban (e.g. someone@somewhere.com or somewhere.com). See "Allow banned email addresses" in Permissions for more info.</span> | 124: <span><?php echo $lang_admin_bans['E-mail help'] ?></span> |
124: </td> | 125: </td> |
125: </tr> | 126: </tr> |
126: </table> | 127: </table> |
127: <p class="topspace"><strong class="warntext">You should be very careful when banning an IP-range because of the possibility of multiple users matching the same partial IP.</strong></p> | 128: <p class="topspace"><strong class="warntext"><?php echo $lang_admin_bans['Ban IP range info'] ?></strong></p> |
128: </div> | 129: </div> |
129: </fieldset> | 130: </fieldset> |
130: </div> | 131: </div> |
131: <div class="inform"> | 132: <div class="inform"> |
132: <fieldset> | 133: <fieldset> |
133: <legend>Ban message and expiry</legend> | 134: <legend><?php echo $lang_admin_bans['Message expiry subhead'] ?></legend> |
134: <div class="infldset"> | 135: <div class="infldset"> |
135: <table class="aligntop" cellspacing="0"> | 136: <table class="aligntop" cellspacing="0"> |
136: <tr> | 137: <tr> |
137: <th scope="row">Ban message</th> | 138: <th scope="row"><?php echo $lang_admin_bans['Ban message label'] ?></th> |
138: <td> | 139: <td> |
139: <input type="text" name="ban_message" size="50" maxlength="255" value="<?php if (isset($ban_message)) echo pun_htmlspecialchars($ban_message); ?>" tabindex="4" /> | 140: <input type="text" name="ban_message" size="50" maxlength="255" value="<?php if (isset($ban_message)) echo pun_htmlspecialchars($ban_message); ?>" tabindex="4" /> |
140: <span>A message that will be displayed to the banned user when he/she visits the forums.</span> | 141: <span><?php echo $lang_admin_bans['Ban message help'] ?></span> |
141: </td> | 142: </td> |
142: </tr> | 143: </tr> |
143: <tr> | 144: <tr> |
144: <th scope="row">Expire date</th> | 145: <th scope="row"><?php echo $lang_admin_bans['Expire date label'] ?></th> |
145: <td> | 146: <td> |
146: <input type="text" name="ban_expire" size="17" maxlength="10" value="<?php if (isset($ban_expire)) echo $ban_expire; ?>" tabindex="5" /> | 147: <input type="text" name="ban_expire" size="17" maxlength="10" value="<?php if (isset($ban_expire)) echo $ban_expire; ?>" tabindex="5" /> |
147: <span>The date when this ban should be automatically removed (format: YYYY-MM-DD). Leave blank to remove manually.</span> | 148: <span><?php echo $lang_admin_bans['Expire date help'] ?></span> |
148: </td> | 149: </td> |
149: </tr> | 150: </tr> |
150: </table> | 151: </table> |
151: </div> | 152: </div> |
152: </fieldset> | 153: </fieldset> |
153: </div> | 154: </div> |
154: <p class="submitend"><input type="submit" name="add_edit_ban" value=" Save " tabindex="6" /></p> | 155: <p class="submitend"><input type="submit" name="add_edit_ban" value="<?php echo $lang_admin_common['Save'] ?>" tabindex="6" /></p> |
155: </form> | 156: </form> |
156: </div> | 157: </div> |
157: </div> | 158: </div> |
162: require PUN_ROOT.'footer.php'; | 163: require PUN_ROOT.'footer.php'; |
163: } | 164: } |
164: | 165: |
165: | |
166: // Add/edit a ban (stage 2) | 166: // Add/edit a ban (stage 2) |
167: else if (isset($_POST['add_edit_ban'])) | 167: else if (isset($_POST['add_edit_ban'])) |
168: { | 168: { |
169: confirm_referrer('admin_bans.php'); | 169: confirm_referrer('admin_bans.php'); |
170: | 170: |
171: $ban_user = trim($_POST['ban_user']); | 171: $ban_user = pun_trim($_POST['ban_user']); |
172: $ban_ip = trim($_POST['ban_ip']); | 172: $ban_ip = trim($_POST['ban_ip']); |
173: $ban_email = strtolower(trim($_POST['ban_email'])); | 173: $ban_email = strtolower(trim($_POST['ban_email'])); |
174: $ban_message = trim($_POST['ban_message']); | 174: $ban_message = pun_trim($_POST['ban_message']); |
175: $ban_expire = trim($_POST['ban_expire']); | 175: $ban_expire = trim($_POST['ban_expire']); |
176: | 176: |
177: if ($ban_user == '' && $ban_ip == '' && $ban_email == '') | 177: if ($ban_user == '' && $ban_ip == '' && $ban_email == '') |
178: message('You must enter either a username, an IP address or an email address (at least).'); | 178: message($lang_admin_bans['Must enter message']); |
179: else if (strtolower($ban_user) == 'guest') | 179: else if (strtolower($ban_user) == 'guest') |
180: message('The guest user cannot be banned.'); | 180: message($lang_admin_bans['Cannot ban guest message']); |
181: | 181: |
182: // Validate IP/IP range (it's overkill, I know) | 182: // Validate IP/IP range (it's overkill, I know) |
183: if ($ban_ip != '') | 183: if ($ban_ip != '') |
184: { | 184: { |
185: $ban_ip = preg_replace('/[\s]{2,}/', ' ', $ban_ip); | 185: $ban_ip = preg_replace('/\s{2,}/S', ' ', $ban_ip); |
186: $addresses = explode(' ', $ban_ip); | 186: $addresses = explode(' ', $ban_ip); |
187: $addresses = array_map('pun_trim', $addresses); | 187: $addresses = array_map('pun_trim', $addresses); |
188: | 188: |
197: $octets[$c] = ltrim($octets[$c], "0"); | 197: $octets[$c] = ltrim($octets[$c], "0"); |
198: | 198: |
199: if ($c > 7 || (!empty($octets[$c]) && !ctype_xdigit($octets[$c])) || intval($octets[$c], 16) > 65535) | 199: if ($c > 7 || (!empty($octets[$c]) && !ctype_xdigit($octets[$c])) || intval($octets[$c], 16) > 65535) |
200: message('You entered an invalid IP/IP-range.'); | 200: message($lang_admin_bans['Invalid IP message']); |
201: } | 201: } |
202: | 202: |
203: $cur_address = implode(':', $octets); | 203: $cur_address = implode(':', $octets); |
212: $octets[$c] = (strlen($octets[$c]) > 1) ? ltrim($octets[$c], "0") : $octets[$c]; | 212: $octets[$c] = (strlen($octets[$c]) > 1) ? ltrim($octets[$c], "0") : $octets[$c]; |
213: | 213: |
214: if ($c > 3 || preg_match('/[^0-9]/', $octets[$c]) || intval($octets[$c]) > 255) | 214: if ($c > 3 || preg_match('/[^0-9]/', $octets[$c]) || intval($octets[$c]) > 255) |
215: message('You entered an invalid IP/IP-range.'); | 215: message($lang_admin_bans['Invalid IP message']); |
216: } | 216: } |
217: | 217: |
218: $cur_address = implode('.', $octets); | 218: $cur_address = implode('.', $octets); |
227: if ($ban_email != '' && !is_valid_email($ban_email)) | 227: if ($ban_email != '' && !is_valid_email($ban_email)) |
228: { | 228: { |
229: if (!preg_match('/^[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/', $ban_email)) | 229: if (!preg_match('/^[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/', $ban_email)) |
230: message('The email address (e.g. user@domain.com) or partial email address domain (e.g. domain.com) you entered is invalid.'); | 230: message($lang_admin_bans['Invalid e-mail message']); |
231: } | 231: } |
232: | 232: |
233: if ($ban_expire != '' && $ban_expire != 'Never') | 233: if ($ban_expire != '' && $ban_expire != 'Never') |
235: $ban_expire = strtotime($ban_expire); | 235: $ban_expire = strtotime($ban_expire); |
236: | 236: |
237: if ($ban_expire == -1 || $ban_expire <= time()) | 237: if ($ban_expire == -1 || $ban_expire <= time()) |
238: message('You entered an invalid expire date. The format should be YYYY-MM-DD and the date must be at least one day in the future.'); | 238: message($lang_admin_bans['Invalid date message'].' '.$lang_admin_bans['Invalid date reasons']); |
239: } | 239: } |
240: else | 240: else |
241: $ban_expire = 'NULL'; | 241: $ban_expire = 'NULL'; |
256: | 256: |
257: generate_bans_cache(); | 257: generate_bans_cache(); |
258: | 258: |
259: redirect('admin_bans.php', 'Ban '.(($_POST['mode'] == 'edit') ? 'edited' : 'added').'. Redirecting …'); | 259: if ($_POST['mode'] == 'edit') |
| 260: redirect('admin_bans.php', $lang_admin_bans['Ban edited redirect']); |
| 261: else |
| 262: redirect('admin_bans.php', $lang_admin_bans['Ban added redirect']); |
260: } | 263: } |
261: | 264: |
262: | |
263: // Remove a ban | 265: // Remove a ban |
264: else if (isset($_GET['del_ban'])) | 266: else if (isset($_GET['del_ban'])) |
265: { | 267: { |
277: | 279: |
278: generate_bans_cache(); | 280: generate_bans_cache(); |
279: | 281: |
280: redirect('admin_bans.php', 'Ban removed. Redirecting …'); | 282: redirect('admin_bans.php', $lang_admin_bans['Ban removed redirect']); |
281: } | 283: } |
282: | 284: |
| 285: // Find bans |
| 286: else if (isset($_GET['find_ban'])) |
| 287: { |
| 288: $form = isset($_GET['form']) ? $_GET['form'] : array(); |
| 289: |
| 290: // trim() all elements in $form |
| 291: $form = array_map('pun_trim', $form); |
| 292: $conditions = $query_str = array(); |
| 293: |
| 294: $expire_after = isset($_GET['expire_after']) ? trim($_GET['expire_after']) : ''; |
| 295: $expire_before = isset($_GET['expire_before']) ? trim($_GET['expire_before']) : ''; |
| 296: $order_by = isset($_GET['order_by']) && in_array($_GET['order_by'], array('username', 'ip', 'email', 'expire')) ? $_GET['order_by'] : 'username'; |
| 297: $direction = isset($_GET['direction']) && $_GET['direction'] == 'DESC' ? 'DESC' : 'ASC'; |
| 298: |
| 299: $query_str[] = 'order_by='.$order_by; |
| 300: $query_str[] = 'direction='.$direction; |
| 301: |
| 302: // Try to convert date/time to timestamps |
| 303: if ($expire_after != '') |
| 304: { |
| 305: $query_str[] = 'expire_after='.$expire_after; |
| 306: |
| 307: $expire_after = strtotime($expire_after); |
| 308: if ($expire_after === false || $expire_after == -1) |
| 309: message($lang_admin_bans['Invalid date message']); |
| 310: |
| 311: $conditions[] = 'expire>'.$expire_after; |
| 312: } |
| 313: if ($expire_before != '') |
| 314: { |
| 315: $query_str[] = 'expire_before='.$expire_before; |
| 316: |
| 317: $expire_before = strtotime($expire_before); |
| 318: if ($expire_before === false || $expire_before == -1) |
| 319: message($lang_admin_bans['Invalid date message']); |
| 320: |
| 321: $conditions[] = 'expire<'.$expire_before; |
| 322: } |
| 323: |
| 324: $like_command = ($db_type == 'pgsql') ? 'ILIKE' : 'LIKE'; |
| 325: while (list($key, $input) = @each($form)) |
| 326: { |
| 327: if ($input != '' && in_array($key, array('username', 'ip', 'email', 'message'))) |
| 328: { |
| 329: $conditions[] = 'b.'.$db->escape($key).' '.$like_command.' \''.$db->escape(str_replace('*', '%', $input)).'\''; |
| 330: $query_str[] = 'form%5B'.$key.'%5D='.urlencode($input); |
| 331: } |
| 332: } |
| 333: |
| 334: // Fetch ban count |
| 335: $result = $db->query('SELECT COUNT(id) FROM '.$db->prefix.'bans as b WHERE b.id>0'.(!empty($conditions) ? ' AND '.implode(' AND ', $conditions) : '')) or error('Unable to fetch ban list', __FILE__, __LINE__, $db->error()); |
| 336: $num_bans = $db->result($result); |
| 337: |
| 338: // Determine the ban offset (based on $_GET['p']) |
| 339: $num_pages = ceil($num_bans / 50); |
| 340: |
| 341: $p = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : intval($_GET['p']); |
| 342: $start_from = 50 * ($p - 1); |
| 343: |
| 344: // Generate paging links |
| 345: $paging_links = '<span class="pages-label">'.$lang_common['Pages'].' </span>'.paginate($num_pages, $p, 'admin_bans.php?find_ban=&'.implode('&', $query_str)); |
| 346: |
| 347: $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Bans'], $lang_admin_bans['Results head']); |
| 348: define('PUN_ACTIVE_PAGE', 'admin'); |
| 349: require PUN_ROOT.'header.php'; |
| 350: |
| 351: ?> |
| 352: <div class="linkst"> |
| 353: <div class="inbox crumbsplus"> |
| 354: <ul class="crumbs"> |
| 355: <li><a href="admin_index.php"><?php echo $lang_admin_common['Admin'].' '.$lang_admin_common['Index'] ?></a></li> |
| 356: <li><span>» </span><a href="admin_bans.php"><?php echo $lang_admin_common['Bans'] ?></a></li> |
| 357: <li><span>» </span><strong><?php echo $lang_admin_bans['Results head'] ?></strong></li> |
| 358: </ul> |
| 359: <p class="pagelink"><?php echo $paging_links ?></p> |
| 360: <div class="clearer"></div> |
| 361: </div> |
| 362: </div> |
| 363: |
283: | 364: |
284: $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Bans'; | 365: <div id="bans1" class="blocktable"> |
| 366: <h2><span><?php echo $lang_admin_bans['Results head'] ?></span></h2> |
| 367: <div class="box"> |
| 368: <div class="inbox"> |
| 369: <table cellspacing="0"> |
| 370: <thead> |
| 371: <tr> |
| 372: <th class="tcl" scope="col"><?php echo $lang_admin_bans['Results username head'] ?></th> |
| 373: <th class="tc2" scope="col"><?php echo $lang_admin_bans['Results e-mail head'] ?></th> |
| 374: <th class="tc3" scope="col"><?php echo $lang_admin_bans['Results IP address head'] ?></th> |
| 375: <th class="tc4" scope="col"><?php echo $lang_admin_bans['Results expire head'] ?></th> |
| 376: <th class="tc5" scope="col"><?php echo $lang_admin_bans['Results message head'] ?></th> |
| 377: <th class="tc6" scope="col"><?php echo $lang_admin_bans['Results banned by head'] ?></th> |
| 378: <th class="tcr" scope="col"><?php echo $lang_admin_bans['Results actions head'] ?></th> |
| 379: </tr> |
| 380: </thead> |
| 381: <tbody> |
| 382: <?php |
| 383: |
| 384: $result = $db->query('SELECT b.id, b.username, b.ip, b.email, b.message, b.expire, b.ban_creator, u.username AS ban_creator_username FROM '.$db->prefix.'bans AS b LEFT JOIN '.$db->prefix.'users AS u ON b.ban_creator=u.id WHERE b.id>0'.(!empty($conditions) ? ' AND '.implode(' AND ', $conditions) : '').' ORDER BY '.$db->escape($order_by).' '.$db->escape($direction).' LIMIT '.$start_from.', 50') or error('Unable to fetch ban list', __FILE__, __LINE__, $db->error()); |
| 385: if ($db->num_rows($result)) |
| 386: { |
| 387: while ($ban_data = $db->fetch_assoc($result)) |
| 388: { |
| 389: |
| 390: $actions = '<a href="admin_bans.php?edit_ban='.$ban_data['id'].'">'.$lang_admin_common['Edit'].'</a> | <a href="admin_bans.php?del_ban='.$ban_data['id'].'">'.$lang_admin_common['Remove'].'</a>'; |
| 391: $expire = format_time($ban_data['expire'], true); |
| 392: |
| 393: ?> |
| 394: <tr> |
| 395: <td class="tcl"><?php echo ($ban_data['username'] != '') ? pun_htmlspecialchars($ban_data['username']) : ' ' ?></td> |
| 396: <td class="tc2"><?php echo ($ban_data['email'] != '') ? $ban_data['email'] : ' ' ?></td> |
| 397: <td class="tc3"><?php echo ($ban_data['ip'] != '') ? $ban_data['ip'] : ' ' ?></td> |
| 398: <td class="tc4"><?php echo $expire ?></td> |
| 399: <td class="tc5"><?php echo ($ban_data['message'] != '') ? pun_htmlspecialchars($ban_data['message']) : ' ' ?></td> |
| 400: <td class="tc6"><?php echo ($ban_data['ban_creator_username'] != '') ? '<a href="profile.php?id='.$ban_data['ban_creator'].'">'.pun_htmlspecialchars($ban_data['ban_creator_username']).'</a>' : $lang_admin_bans['Unknown'] ?></td> |
| 401: <td class="tcr"><?php echo $actions ?></td> |
| 402: </tr> |
| 403: <?php |
| 404: |
| 405: } |
| 406: } |
| 407: else |
| 408: echo "\t\t\t\t".'<tr><td class="tcl" colspan="7">'.$lang_admin_bans['No match'].'</td></tr>'."\n"; |
| 409: |
| 410: ?> |
| 411: </tbody> |
| 412: </table> |
| 413: </div> |
| 414: </div> |
| 415: </div> |
| 416: |
| 417: <div class="linksb"> |
| 418: <div class="inbox crumbsplus"> |
| 419: <p class="pagelink"><?php echo $paging_links ?></p> |
| 420: <ul class="crumbs"> |
| 421: <li><a href="admin_index.php"><?php echo $lang_admin_common['Admin'].' '.$lang_admin_common['Index'] ?></a></li> |
| 422: <li><span>» </span><a href="admin_bans.php"><?php echo $lang_admin_common['Bans'] ?></a></li> |
| 423: <li><span>» </span><strong><?php echo $lang_admin_bans['Results head'] ?></strong></li> |
| 424: </ul> |
| 425: <div class="clearer"></div> |
| 426: </div> |
| 427: </div> |
| 428: <?php |
| 429: |
| 430: require PUN_ROOT.'footer.php'; |
| 431: } |
| 432: |
| 433: $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Bans']); |
285: $focus_element = array('bans', 'new_ban_user'); | 434: $focus_element = array('bans', 'new_ban_user'); |
| 435: define('PUN_ACTIVE_PAGE', 'admin'); |
286: require PUN_ROOT.'header.php'; | 436: require PUN_ROOT.'header.php'; |
287: | 437: |
288: generate_admin_menu('bans'); | 438: generate_admin_menu('bans'); |
289: | 439: |
290: ?> | 440: ?> |
291: <div class="blockform"> | 441: <div class="blockform"> |
292: <h2><span>New ban</span></h2> | 442: <h2><span><?php echo $lang_admin_bans['New ban head'] ?></span></h2> |
293: <div class="box"> | 443: <div class="box"> |
294: <form id="bans" method="post" action="admin_bans.php?action=more"> | 444: <form id="bans" method="post" action="admin_bans.php?action=more"> |
295: <div class="inform"> | 445: <div class="inform"> |
296: <fieldset> | 446: <fieldset> |
297: <legend>Add ban</legend> | 447: <legend><?php echo $lang_admin_bans['Add ban subhead'] ?></legend> |
298: <div class="infldset"> | 448: <div class="infldset"> |
299: <table class="aligntop" cellspacing="0"> | 449: <table class="aligntop" cellspacing="0"> |
300: <tr> | 450: <tr> |
301: <th scope="row">Username<div><input type="submit" name="add_ban" value=" Add " tabindex="2" /></div></th> | 451: <th scope="row"><?php echo $lang_admin_bans['Username label'] ?><div><input type="submit" name="add_ban" value="<?php echo $lang_admin_common['Add'] ?>" tabindex="2" /></div></th> |
302: <td> | 452: <td> |
303: <input type="text" name="new_ban_user" size="25" maxlength="25" tabindex="1" /> | 453: <input type="text" name="new_ban_user" size="25" maxlength="25" tabindex="1" /> |
304: <span>The username to ban (case-insensitive). The next page will let you enter a custom IP and email. If you just want to ban a specific IP/IP-range or email just leave it blank.</span> | 454: <span><?php echo $lang_admin_bans['Username advanced help'] ?></span> |
305: </td> | 455: </td> |
306: </tr> | 456: </tr> |
307: </table> | 457: </table> |
311: </form> | 461: </form> |
312: </div> | 462: </div> |
313: | 463: |
314: <h2 class="block2"><span>Existing bans</span></h2> | 464: <h2><span><?php echo $lang_admin_bans['Ban search head'] ?></span></h2> |
315: <div class="box"> | 465: <div class="box"> |
316: <div class="fakeform"> | 466: <form id="find_band" method="get" action="admin_bans.php"> |
317: <?php | 467: <p class="submittop"><input type="submit" name="find_ban" value="<?php echo $lang_admin_bans['Submit search'] ?>" tabindex="3" /></p> |
318: | |
319: $result = $db->query('SELECT b.id, b.username, b.ip, b.email, b.message, b.expire, b.ban_creator, u.username AS ban_creator_username FROM '.$db->prefix.'bans AS b LEFT JOIN '.$db->prefix.'users AS u ON b.ban_creator=u.id ORDER BY b.id') or error('Unable to fetch ban list', __FILE__, __LINE__, $db->error()); | |
320: if ($db->num_rows($result)) | |
321: { | |
322: while ($cur_ban = $db->fetch_assoc($result)) | |
323: { | |
324: $expire = format_time($cur_ban['expire'], true); | |
325: | |
326: ?> | |
327: <div class="inform"> | 468: <div class="inform"> |
328: <fieldset> | 469: <fieldset> |
329: <legend>Ban expires: <?php echo $expire ?></legend> | 470: <legend><?php echo $lang_admin_bans['Ban search subhead'] ?></legend> |
330: <div class="infldset"> | 471: <div class="infldset"> |
331: <table cellspacing="0"> | 472: <p><?php echo $lang_admin_bans['Ban search info'] ?></p> |
332: <?php if ($cur_ban['username'] != ''): ?> <tr> | 473: <table class="aligntop" cellspacing="0"> |
333: <th>Username</th> | 474: <tr> |
334: <td><?php echo pun_htmlspecialchars($cur_ban['username']) ?></td> | 475: <th scope="row"><?php echo $lang_admin_bans['Username label'] ?></th> |
| 476: <td><input type="text" name="form[username]" size="25" maxlength="25" tabindex="4" /></td> |
335: </tr> | 477: </tr> |
336: <?php endif; ?><?php if ($cur_ban['email'] != ''): ?> <tr> | 478: <tr> |
337: <th>Email</th> | 479: <th scope="row"><?php echo $lang_admin_bans['IP label'] ?></th> |
338: <td><?php echo $cur_ban['email'] ?></td> | 480: <td><input type="text" name="form[ip]" size="30" maxlength="255" tabindex="5" /></td> |
339: </tr> | 481: </tr> |
340: <?php endif; ?><?php if ($cur_ban['ip'] != ''): ?> <tr> | 482: <tr> |
341: <th>IP/IP-ranges</th> | 483: <th scope="row"><?php echo $lang_admin_bans['E-mail label'] ?></th> |
342: <td><?php echo $cur_ban['ip'] ?></td> | 484: <td><input type="text" name="form[email]" size="30" maxlength="80" tabindex="6" /></td> |
343: </tr> | 485: </tr> |
344: <?php endif; ?><?php if ($cur_ban['message'] != ''): ?> <tr> | 486: <tr> |
345: <th>Reason</th> | 487: <th scope="row"><?php echo $lang_admin_bans['Message label'] ?></th> |
346: <td><?php echo pun_htmlspecialchars($cur_ban['message']) ?></td> | 488: <td><input type="text" name="form[message]" size="30" maxlength="255" tabindex="7" /></td> |
347: </tr> | 489: </tr> |
348: <?php endif; ?><?php if (!empty($cur_ban['ban_creator_username'])): ?> <tr> | 490: <tr> |
349: <th>Banned by</th> | 491: <th scope="row"><?php echo $lang_admin_bans['Expire after label'] ?></th> |
350: <td><a href="profile.php?id=<?php echo $cur_ban['ban_creator'] ?>"><?php echo pun_htmlspecialchars($cur_ban['ban_creator_username']) ?></a></td> | 492: <td><input type="text" name="expire_after" size="10" maxlength="10" tabindex="8" /> |
| 493: <span><?php echo $lang_admin_bans['Date help'] ?></span></td> |
| 494: </tr> |
| 495: <tr> |
| 496: <th scope="row"><?php echo $lang_admin_bans['Expire before label'] ?></th> |
| 497: <td><input type="text" name="expire_before" size="10" maxlength="10" tabindex="9" /> |
| 498: <span><?php echo $lang_admin_bans['Date help'] ?></span></td> |
351: </tr> | 499: </tr> |
352: <?php endif; ?> </table> | 500: <tr> |
353: <p class="linkactions"><a href="admin_bans.php?edit_ban=<?php echo $cur_ban['id'] ?>">Edit</a> - <a href="admin_bans.php?del_ban=<?php echo $cur_ban['id'] ?>">Remove</a></p> | 501: <th scope="row"><?php echo $lang_admin_bans['Order by label'] ?></th> |
| 502: <td> |
| 503: <select name="order_by" tabindex="10"> |
| 504: <option value="username" selected="selected"><?php echo $lang_admin_bans['Order by username'] ?></option> |
| 505: <option value="ip"><?php echo $lang_admin_bans['Order by ip'] ?></option> |
| 506: <option value="email"><?php echo $lang_admin_bans['Order by e-mail'] ?></option> |
| 507: <option value="expire"><?php echo $lang_admin_bans['Order by expire'] ?></option> |
| 508: </select> <select name="direction" tabindex="11"> |
| 509: <option value="ASC" selected="selected"><?php echo $lang_admin_bans['Ascending'] ?></option> |
| 510: <option value="DESC"><?php echo $lang_admin_bans['Descending'] ?></option> |
| 511: </select> |
| 512: </td> |
| 513: </tr> |
| 514: </table> |
354: </div> | 515: </div> |
355: </fieldset> | 516: </fieldset> |
356: </div> | 517: </div> |
357: <?php | 518: <p class="submitend"><input type="submit" name="find_ban" value="<?php echo $lang_admin_bans['Submit search'] ?>" tabindex="12" /></p> |
358: | 519: </form> |
359: } | |
360: } | |
361: else | |
362: echo "\t\t\t\t".'<p>No bans in list.</p>'."\n"; | |
363: | |
364: ?> | |
365: </div> | |
366: </div> | 520: </div> |
367: </div> | 521: </div> |
368: <div class="clearer"></div> | 522: <div class="clearer"></div> |
a/upload/admin_categories.php |
b/upload/admin_categories.php |
1: <?php | 1: <?php |
2: | 2: |
3: /*--- | 3: /** |
4: | 4: * Copyright (C) 2008-2010 FluxBB |
5: Copyright (C) 2008-2009 FluxBB.org | 5: * based on code by Rickard Andersson copyright (C) 2002-2008 PunBB |
6: based on code copyright (C) 2002-2005 Rickard Andersson | 6: * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
7: License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 7: */ |
8: | |
9: ---*/ | |
10: | 8: |
11: // Tell header.php to use the admin template | 9: // Tell header.php to use the admin template |
12: define('PUN_ADMIN_CONSOLE', 1); | 10: define('PUN_ADMIN_CONSOLE', 1); |
19: if ($pun_user['g_id'] != PUN_ADMIN) | 17: if ($pun_user['g_id'] != PUN_ADMIN) |
20: message($lang_common['No permission']); | 18: message($lang_common['No permission']); |
21: | 19: |
| 20: // Load the admin_categories.php language file |
| 21: require PUN_ROOT.'lang/'.$admin_language.'/admin_categories.php'; |
22: | 22: |
23: // Add a new category | 23: // Add a new category |
24: if (isset($_POST['add_cat'])) | 24: if (isset($_POST['add_cat'])) |
25: { | 25: { |
26: confirm_referrer('admin_categories.php'); | 26: confirm_referrer('admin_categories.php'); |
27: | 27: |
28: $new_cat_name = trim($_POST['new_cat_name']); | 28: $new_cat_name = pun_trim($_POST['new_cat_name']); |
29: if ($new_cat_name == '') | 29: if ($new_cat_name == '') |
30: message('You must enter a name for the category.'); | 30: message($lang_admin_categories['Must enter name message']); |
31: | 31: |
32: $db->query('INSERT INTO '.$db->prefix.'categories (cat_name) VALUES(\''.$db->escape($new_cat_name).'\')') or error('Unable to create category', __FILE__, __LINE__, $db->error()); | 32: $db->query('INSERT INTO '.$db->prefix.'categories (cat_name) VALUES(\''.$db->escape($new_cat_name).'\')') or error('Unable to create category', __FILE__, __LINE__, $db->error()); |
33: | 33: |
34: redirect('admin_categories.php', 'Category added. Redirecting …'); | 34: redirect('admin_categories.php', $lang_admin_categories['Category added redirect']); |
35: } | 35: } |
36: | 36: |
37: | |
38: // Delete a category | 37: // Delete a category |
39: else if (isset($_POST['del_cat']) || isset($_POST['del_cat_comply'])) | 38: else if (isset($_POST['del_cat']) || isset($_POST['del_cat_comply'])) |
40: { | 39: { |
83: | 82: |
84: generate_quickjump_cache(); | 83: generate_quickjump_cache(); |
85: | 84: |
86: redirect('admin_categories.php', 'Category deleted. Redirecting …'); | 85: redirect('admin_categories.php', $lang_admin_categories['Category deleted redirect']); |
87: } | 86: } |
88: else // If the user hasn't comfirmed the delete | 87: else // If the user hasn't comfirmed the delete |
89: { | 88: { |
90: $result = $db->query('SELECT cat_name FROM '.$db->prefix.'categories WHERE id='.$cat_to_delete) or error('Unable to fetch category info', __FILE__, __LINE__, $db->error()); | 89: $result = $db->query('SELECT cat_name FROM '.$db->prefix.'categories WHERE id='.$cat_to_delete) or error('Unable to fetch category info', __FILE__, __LINE__, $db->error()); |
91: $cat_name = $db->result($result); | 90: $cat_name = $db->result($result); |
92: | 91: |
93: $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Categories'; | 92: $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Categories']); |
| 93: define('PUN_ACTIVE_PAGE', 'admin'); |
94: require PUN_ROOT.'header.php'; | 94: require PUN_ROOT.'header.php'; |
95: | 95: |
96: generate_admin_menu('categories'); | 96: generate_admin_menu('categories'); |
97: | 97: |
98: ?> | 98: ?> |
99: <div class="blockform"> | 99: <div class="blockform"> |
100: <h2><span>Category delete</span></h2> | 100: <h2><span><?php echo $lang_admin_categories['Delete category head'] ?></span></h2> |
101: <div class="box"> | 101: <div class="box"> |
102: <form method="post" action="admin_categories.php"> | 102: <form method="post" action="admin_categories.php"> |
103: <div class="inform"> | 103: <div class="inform"> |
104: <input type="hidden" name="cat_to_delete" value="<?php echo $cat_to_delete ?>" /> | 104: <input type="hidden" name="cat_to_delete" value="<?php echo $cat_to_delete ?>" /> |
105: <fieldset> | 105: <fieldset> |
106: <legend>Confirm delete category</legend> | 106: <legend><?php echo $lang_admin_categories['Confirm delete subhead'] ?></legend> |
107: <div class="infldset"> | 107: <div class="infldset"> |
108: <p>Are you sure that you want to delete the category "<?php echo pun_htmlspecialchars($cat_name) ?>"?</p> | 108: <p><?php printf($lang_admin_categories['Confirm delete info'], pun_htmlspecialchars($cat_name)) ?></p> |
109: <p>WARNING! Deleting a category will delete all forums and posts (if any) in that category!</p> | 109: <p class="warntext"><?php echo $lang_admin_categories['Delete category warn'] ?></p> |
110: </div> | 110: </div> |
111: </fieldset> | 111: </fieldset> |
112: </div> | 112: </div> |
113: <p><input type="submit" name="del_cat_comply" value="Delete" /><a href="javascript:history.go(-1)">Go back</a></p> | 113: <p class="buttons"><input type="submit" name="del_cat_comply" value="<?php echo $lang_admin_common['Delete'] ?>" /><a href="javascript:history.go(-1)"><?php echo $lang_admin_common['Go back'] ?></a></p> |
114: </form> | 114: </form> |
115: </div> | 115: </div> |
116: </div> | 116: </div> |
122: } | 122: } |
123: } | 123: } |
124: | 124: |
125: | |
126: else if (isset($_POST['update'])) // Change position and name of the categories | 125: else if (isset($_POST['update'])) // Change position and name of the categories |
127: { | 126: { |
128: confirm_referrer('admin_categories.php'); | 127: confirm_referrer('admin_categories.php'); |
129: | 128: |
130: $cat_order = $_POST['cat_order']; | 129: $cat_order = array_map('trim', $_POST['cat_order']); |
131: $cat_name = $_POST['cat_name']; | 130: $cat_name = array_map('pun_trim', $_POST['cat_name']); |
132: | 131: |
133: $result = $db->query('SELECT id, disp_position FROM '.$db->prefix.'categories ORDER BY disp_position') or error('Unable to fetch category list', __FILE__, __LINE__, $db->error()); | 132: $result = $db->query('SELECT id, disp_position FROM '.$db->prefix.'categories ORDER BY disp_position') or error('Unable to fetch category list', __FILE__, __LINE__, $db->error()); |
134: $num_cats = $db->num_rows($result); | 133: $num_cats = $db->num_rows($result); |
136: for ($i = 0; $i < $num_cats; ++$i) | 135: for ($i = 0; $i < $num_cats; ++$i) |
137: { | 136: { |
138: if ($cat_name[$i] == '') | 137: if ($cat_name[$i] == '') |
139: message('You must enter a category name.'); | 138: message($lang_admin_categories['Must enter name message']); |
140: | 139: |
141: if (!@preg_match('#^\d+$#', $cat_order[$i])) | 140: if ($cat_order[$i] == '' || preg_match('/[^0-9]/', $cat_order[$i])) |
142: message('Position must be an integer value.'); | 141: message($lang_admin_categories['Must enter integer message']); |
143: | 142: |
144: list($cat_id, $position) = $db->fetch_row($result); | 143: list($cat_id, $position) = $db->fetch_row($result); |
145: | 144: |
152: | 151: |
153: generate_quickjump_cache(); | 152: generate_quickjump_cache(); |
154: | 153: |
155: redirect('admin_categories.php', 'Categories updated. Redirecting …'); | 154: redirect('admin_categories.php', $lang_admin_categories['Categories updated redirect']); |
156: } | 155: } |
157: | 156: |
158: | |
159: // Generate an array with all categories | 157: // Generate an array with all categories |
160: $result = $db->query('SELECT id, cat_name, disp_position FROM '.$db->prefix.'categories ORDER BY disp_position') or error('Unable to fetch category list', __FILE__, __LINE__, $db->error()); | 158: $result = $db->query('SELECT id, cat_name, disp_position FROM '.$db->prefix.'categories ORDER BY disp_position') or error('Unable to fetch category list', __FILE__, __LINE__, $db->error()); |
161: $num_cats = $db->num_rows($result); | 159: $num_cats = $db->num_rows($result); |
163: for ($i = 0; $i < $num_cats; ++$i) | 161: for ($i = 0; $i < $num_cats; ++$i) |
164: $cat_list[] = $db->fetch_row($result); | 162: $cat_list[] = $db->fetch_row($result); |
165: | 163: |
166: | 164: $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Categories']); |
167: $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Categories'; | 165: define('PUN_ACTIVE_PAGE', 'admin'); |
168: require PUN_ROOT.'header.php'; | 166: require PUN_ROOT.'header.php'; |
169: | 167: |
170: generate_admin_menu('categories'); | 168: generate_admin_menu('categories'); |
171: | 169: |
172: ?> | 170: ?> |
173: <div class="blockform"> | 171: <div class="blockform"> |
174: <h2><span>Add categories</span></h2> | 172: <h2><span><?php echo $lang_admin_categories['Add categories head'] ?></span></h2> |
175: <div class="box"> | 173: <div class="box"> |
176: <form method="post" action="admin_categories.php?action=foo"> | 174: <form method="post" action="admin_categories.php?action=foo"> |
177: <div class="inform"> | 175: <div class="inform"> |
178: <fieldset> | 176: <fieldset> |
179: <legend>Add categories</legend> | 177: <legend><?php echo $lang_admin_categories['Add categories subhead'] ?></legend> |
180: <div class="infldset"> | 178: <div class="infldset"> |
181: <table class="aligntop" cellspacing="0"> | 179: <table class="aligntop" cellspacing="0"> |
182: <tr> | 180: <tr> |
183: <th scope="row">Add a new category<div><input type="submit" name="add_cat" value="Add New" tabindex="2" /></div></th> | 181: <th scope="row"><?php echo $lang_admin_categories['Add category label'] ?><div><input type="submit" name="add_cat" value="<?php echo $lang_admin_categories['Add new submit'] ?>" tabindex="2" /></div></th> |
184: <td> | 182: <td> |
185: <input type="text" name="new_cat_name" size="35" maxlength="80" tabindex="1" /> | 183: <input type="text" name="new_cat_name" size="35" maxlength="80" tabindex="1" /> |
186: <span>The name of the new category you want to add. You can edit the name of the category later (see below). Go to <a href="admin_forums.php">Forums</a> to add forums to your new category.</span> | 184: <span><?php printf($lang_admin_categories['Add category help'], '<a href="admin_forums.php">'.$lang_admin_common['Forums'].'</a>') ?></span> |
187: </td> | 185: </td> |
188: </tr> | 186: </tr> |
189: </table> | 187: </table> |
190: </div> | 188: </div> |
191: </fieldset> | 189: </fieldset> |
192: </div> | 190: </div> |
193: </form> | 191: </form> |
194: </div> | 192: </div> |
195: | 193: |
196: <?php if ($num_cats): ?> <h2 class="block2"><span>Remove categories</span></h2> | 194: <?php if ($num_cats): ?> <h2 class="block2"><span><?php echo $lang_admin_categories['Delete categories head'] ?></span></h2> |
197: <div class="box"> | 195: <div class="box"> |
198: <form method="post" action="admin_categories.php?action=foo"> | 196: <form method="post" action="admin_categories.php?action=foo"> |
199: <div class="inform"> | 197: <div class="inform"> |
200: <fieldset> | 198: <fieldset> |
201: <legend>Delete categories</legend> | 199: <legend><?php echo $lang_admin_categories['Delete categories subhead'] ?></legend> |
202: <div class="infldset"> | 200: <div class="infldset"> |
203: <table class="aligntop" cellspacing="0"> | 201: <table class="aligntop" cellspacing="0"> |
204: <tr> | 202: <tr> |
205: <th scope="row">Delete a category<div><input type="submit" name="del_cat" value="Delete" tabindex="4" /></div></th> | 203: <th scope="row"><?php echo $lang_admin_categories['Delete category label'] ?><div><input type="submit" name="del_cat" value="<?php echo $lang_admin_common['Delete'] ?>" tabindex="4" /></div></th> |
206: <td> | 204: <td> |
207: <select name="cat_to_delete" tabindex="3"> | 205: <select name="cat_to_delete" tabindex="3"> |
208: <?php | 206: <?php |
209: | 207: |
210: while (list(, list($cat_id, $cat_name, ,)) = @each($cat_list)) | 208: foreach ($cat_list as $category) |
211: echo "\t\t\t\t\t\t\t\t\t\t".'<option value="'.$cat_id.'">'.pun_htmlspecialchars($cat_name).'</option>'."\n"; | 209: echo "\t\t\t\t\t\t\t\t\t\t\t".'<option value="'.$category[0].'">'.pun_htmlspecialchars($category[1]).'</option>'."\n"; |
212: | 210: |
213: ?> | 211: ?> |
214: </select> | 212: </select> |
215: <span>Select the name of the category you want to delete. You will be asked to confirm your choice of category for deletion before it is deleted.</span> | 213: <span><?php echo $lang_admin_categories['Delete category help'] ?></span> |
216: </td> | 214: </td> |
217: </tr> | 215: </tr> |
218: </table> | 216: </table> |
219: </div> | 217: </div> |
220: </fieldset> | 218: </fieldset> |
221: </div> | 219: </div> |
222: </form> | 220: </form> |
223: </div> | 221: </div> |
224: <?php endif; ?> | 222: <?php endif; ?> |
225: | 223: |
226: <?php if ($num_cats): ?> <h2 class="block2"><span>Edit categories</span></h2> | 224: <?php if ($num_cats): ?> <h2 class="block2"><span><?php echo $lang_admin_categories['Edit categories head'] ?></span></h2> |
227: <div class="box"> | 225: <div class="box"> |
228: <form method="post" action="admin_categories.php?action=foo"> | 226: <form method="post" action="admin_categories.php?action=foo"> |
229: <div class="inform"> | 227: <div class="inform"> |
230: <fieldset> | 228: <fieldset> |
231: <legend>Edit categories</legend> | 229: <legend><?php echo $lang_admin_categories['Edit categories subhead'] ?></legend> |
232: <div class="infldset"> | 230: <div class="infldset"> |
233: <table id="categoryedit" cellspacing="0" > | 231: <table id="categoryedit" cellspacing="0" > |
234: <thead> | 232: <thead> |
235: <tr> | 233: <tr> |
236: <th class="tcl" scope="col">Name</th> | 234: <th class="tcl" scope="col"><?php echo $lang_admin_categories['Category name label'] ?></th> |
237: <th scope="col">Position</th> | 235: <th scope="col"><?php echo $lang_admin_categories['Category position label'] ?></th> |
238: <th> </th> | 236: </tr> |
239: </tr> | 237: </thead> |
240: </thead> | 238: <tbody> |
241: <tbody> | |
242: <?php | 239: <?php |
243: | 240: |
244: @reset($cat_list); | 241: foreach ($cat_list as $i => $category) |
245: for ($i = 0; $i < $num_cats; ++$i) | |
246: { | 242: { |
247: list(, list($cat_id, $cat_name, $position)) = @each($cat_list); | |
248: | 243: |
249: ?> | 244: ?> |
250: <tr><td><input type="text" name="cat_name[<?php echo $i ?>]" value="<?php echo pun_htmlspecialchars($cat_name) ?>" size="35" maxlength="80" /></td><td><input type="text" name="cat_order[<?php echo $i ?>]" value="<?php echo $position ?>" size="3" maxlength="3" /></td><td> </td></tr> | 245: <tr> |
| 246: <td class="tcl"><input type="text" name="cat_name[<?php echo $i ?>]" value="<?php echo pun_htmlspecialchars($category[1]) ?>" size="35" maxlength="80" /></td> |
| 247: <td><input type="text" name="cat_order[<?php echo $i ?>]" value="<?php echo $category[2] ?>" size="3" maxlength="3" /></td> |
| 248: </tr> |
251: <?php | 249: <?php |
252: | 250: |
253: } | 251: } |
254: | 252: |
255: ?> | 253: ?> |
256: </tbody> | 254: </tbody> |
257: </table> | 255: </table> |
258: <div class="fsetsubmit"><input type="submit" name="update" value="Update" /></div> | 256: <div class="fsetsubmit"><input type="submit" name="update" value="<?php echo $lang_admin_common['Update'] ?>" /></div> |
259: </div> | 257: </div> |
260: </fieldset> | 258: </fieldset> |
261: </div> | 259: </div> |
262: </form> | 260: </form> |
263: </div> | 261: </div> |
264: <?php endif; ?> </div> | 262: <?php endif; ?> </div> |
265: <div class="clearer"></div> | 263: <div class="clearer"></div> |
a/upload/admin_forums.php |
b/upload/admin_forums.php |
1: <?php | 1: <?php |
2: | 2: |
3: /*--- | 3: /** |
4: | 4: * Copyright (C) 2008-2010 FluxBB |
5: Copyright (C) 2008-2009 FluxBB.org | 5: * based on code by Rickard Andersson copyright (C) 2002-2008 PunBB |
6: based on code copyright (C) 2002-2005 Rickard Andersson | 6: * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
7: License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 7: */ |
8: | |
9: ---*/ | |
10: | 8: |
11: // Tell header.php to use the admin template | 9: // Tell header.php to use the admin template |
12: define('PUN_ADMIN_CONSOLE', 1); | 10: define('PUN_ADMIN_CONSOLE', 1); |
19: if ($pun_user['g_id'] != PUN_ADMIN) | 17: if ($pun_user['g_id'] != PUN_ADMIN) |
20: message($lang_common['No permission']); | 18: message($lang_common['No permission']); |
21: | 19: |
| 20: // Load the admin_forums.php language file |
| 21: require PUN_ROOT.'lang/'.$admin_language.'/admin_forums.php'; |
22: | 22: |
23: // Add a "default" forum | 23: // Add a "default" forum |
24: if (isset($_POST['add_forum'])) | 24: if (isset($_POST['add_forum'])) |
37: | 37: |
38: generate_quickjump_cache(); | 38: generate_quickjump_cache(); |
39: | 39: |
40: redirect('admin_forums.php', 'Forum added. Redirecting …'); | 40: redirect('admin_forums.php', $lang_admin_forums['Forum added redirect']); |
41: } | 41: } |
42: | 42: |
43: | |
44: // Delete a forum | 43: // Delete a forum |
45: else if (isset($_GET['del_forum'])) | 44: else if (isset($_GET['del_forum'])) |
46: { | 45: { |
79: | 78: |
80: generate_quickjump_cache(); | 79: generate_quickjump_cache(); |
81: | 80: |
82: redirect('admin_forums.php', 'Forum deleted. Redirecting …'); | 81: redirect('admin_forums.php', $lang_admin_forums['Forum deleted redirect']); |
83: } | 82: } |
84: else // If the user hasn't confirmed the delete | 83: else // If the user hasn't confirmed the delete |
85: { | 84: { |
86: $result = $db->query('SELECT forum_name FROM '.$db->prefix.'forums WHERE id='.$forum_id) or error('Unable to fetch forum info', __FILE__, __LINE__, $db->error()); | 85: $result = $db->query('SELECT forum_name FROM '.$db->prefix.'forums WHERE id='.$forum_id) or error('Unable to fetch forum info', __FILE__, __LINE__, $db->error()); |
87: $forum_name = pun_htmlspecialchars($db->result($result)); | 86: $forum_name = pun_htmlspecialchars($db->result($result)); |
88: | 87: |
89: | 88: $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Forums']); |
90: $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Forums'; | 89: define('PUN_ACTIVE_PAGE', 'admin'); |
91: require PUN_ROOT.'header.php'; | 90: require PUN_ROOT.'header.php'; |
92: | 91: |
93: generate_admin_menu('forums'); | 92: generate_admin_menu('forums'); |
94: | 93: |
95: ?> | 94: ?> |
96: <div class="blockform"> | 95: <div class="blockform"> |
97: <h2><span>Confirm delete forum</span></h2> | 96: <h2><span><?php echo $lang_admin_forums['Confirm delete head'] ?></span></h2> |
98: <div class="box"> | 97: <div class="box"> |
99: <form method="post" action="admin_forums.php?del_forum=<?php echo $forum_id ?>"> | 98: <form method="post" action="admin_forums.php?del_forum=<?php echo $forum_id ?>"> |
100: <div class="inform"> | 99: <div class="inform"> |
101: <fieldset> | 100: <fieldset> |
102: <legend>Important! Read before deleting</legend> | 101: <legend><?php echo $lang_admin_forums['Confirm delete subhead'] ?></legend> |
103: <div class="infldset"> | 102: <div class="infldset"> |
104: <p>Are you sure that you want to delete the forum "<?php echo $forum_name ?>"?</p> | 103: <p><?php printf($lang_admin_forums['Confirm delete info'], $forum_name) ?></p> |
105: <p>WARNING! Deleting a forum will delete all posts (if any) in that forum!</p> | 104: <p class="warntext"><?php echo $lang_admin_forums['Confirm delete warn'] ?></p> |
106: </div> | 105: </div> |
107: </fieldset> | 106: </fieldset> |
108: </div> | 107: </div> |
109: <p><input type="submit" name="del_forum_comply" value="Delete" /><a href="javascript:history.go(-1)">Go back</a></p> | 108: <p class="buttons"><input type="submit" name="del_forum_comply" value="<?php echo $lang_admin_common['Delete'] ?>" /><a href="javascript:history.go(-1)"><?php echo $lang_admin_common['Go back'] ?></a></p> |
110: </form> | 109: </form> |
111: </div> | 110: </div> |
112: </div> | 111: </div> |
118: } | 117: } |
119: } | 118: } |
120: | 119: |
121: | |
122: // Update forum positions | 120: // Update forum positions |
123: else if (isset($_POST['update_positions'])) | 121: else if (isset($_POST['update_positions'])) |
124: { | 122: { |
125: confirm_referrer('admin_forums.php'); | 123: confirm_referrer('admin_forums.php'); |
126: | 124: |
127: while (list($forum_id, $disp_position) = @each($_POST['position'])) | 125: foreach ($_POST['position'] as $forum_id => $disp_position) |
128: { | 126: { |
129: if (!@preg_match('#^\d+$#', $disp_position)) | 127: $disp_position = trim($disp_position); |
130: message('Position must be a positive integer value.'); | 128: if ($disp_position == '' || preg_match('/[^0-9]/', $disp_position)) |
| 129: message($lang_admin_forums['Must be integer message']); |
131: | 130: |
132: $db->query('UPDATE '.$db->prefix.'forums SET disp_position='.$disp_position.' WHERE id='.intval($forum_id)) or error('Unable to update forum', __FILE__, __LINE__, $db->error()); | 131: $db->query('UPDATE '.$db->prefix.'forums SET disp_position='.$disp_position.' WHERE id='.intval($forum_id)) or error('Unable to update forum', __FILE__, __LINE__, $db->error()); |
133: } | 132: } |
138: | 137: |
139: generate_quickjump_cache(); | 138: generate_quickjump_cache(); |
140: | 139: |
141: redirect('admin_forums.php', 'Forums updated. Redirecting …'); | 140: redirect('admin_forums.php', $lang_admin_forums['Forums updated redirect']); |
142: } | 141: } |
143: | 142: |
144: | |
145: else if (isset($_GET['edit_forum'])) | 143: else if (isset($_GET['edit_forum'])) |
146: { | 144: { |
147: $forum_id = intval($_GET['edit_forum']); | 145: $forum_id = intval($_GET['edit_forum']); |
154: confirm_referrer('admin_forums.php'); | 152: confirm_referrer('admin_forums.php'); |
155: | 153: |
156: // Start with the forum details | 154: // Start with the forum details |
157: $forum_name = trim($_POST['forum_name']); | 155: $forum_name = pun_trim($_POST['forum_name']); |
158: $forum_desc = pun_linebreaks(trim($_POST['forum_desc'])); | 156: $forum_desc = pun_linebreaks(pun_trim($_POST['forum_desc'])); |
159: $cat_id = intval($_POST['cat_id']); | 157: $cat_id = intval($_POST['cat_id']); |
160: $sort_by = intval($_POST['sort_by']); | 158: $sort_by = intval($_POST['sort_by']); |
161: $redirect_url = isset($_POST['redirect_url']) ? trim($_POST['redirect_url']) : null; | 159: $redirect_url = isset($_POST['redirect_url']) ? trim($_POST['redirect_url']) : null; |
162: | 160: |
163: if ($forum_name == '') | 161: if ($forum_name == '') |
164: message('You must enter a forum name.'); | 162: message($lang_admin_forums['Must enter name message']); |
165: | 163: |
166: if ($cat_id < 1) | 164: if ($cat_id < 1) |
167: message($lang_common['Bad request']); | 165: message($lang_common['Bad request']); |
204: | 202: |
205: generate_quickjump_cache(); | 203: generate_quickjump_cache(); |
206: | 204: |
207: redirect('admin_forums.php', 'Forum updated. Redirecting …'); | 205: redirect('admin_forums.php', $lang_admin_forums['Forum updated redirect']); |
208: } | 206: } |
209: else if (isset($_POST['revert_perms'])) | 207: else if (isset($_POST['revert_perms'])) |
210: { | 208: { |
218: | 216: |
219: generate_quickjump_cache(); | 217: generate_quickjump_cache(); |
220: | 218: |
221: redirect('admin_forums.php?edit_forum='.$forum_id, 'Permissions reverted to defaults. Redirecting …'); | 219: redirect('admin_forums.php?edit_forum='.$forum_id, $lang_admin_forums['Perms reverted redirect']); |
222: } | 220: } |
223: | 221: |
224: | |
225: // Fetch forum info | 222: // Fetch forum info |
226: $result = $db->query('SELECT id, forum_name, forum_desc, redirect_url, num_topics, sort_by, cat_id FROM '.$db->prefix.'forums WHERE id='.$forum_id) or error('Unable to fetch forum info', __FILE__, __LINE__, $db->error()); | 223: $result = $db->query('SELECT id, forum_name, forum_desc, redirect_url, num_topics, sort_by, cat_id FROM '.$db->prefix.'forums WHERE id='.$forum_id) or error('Unable to fetch forum info', __FILE__, __LINE__, $db->error()); |
227: if (!$db->num_rows($result)) | 224: if (!$db->num_rows($result)) |
229: | 226: |
230: $cur_forum = $db->fetch_assoc($result); | 227: $cur_forum = $db->fetch_assoc($result); |
231: | 228: |
232: | 229: $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Forums']); |
233: $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Forums'; | 230: define('PUN_ACTIVE_PAGE', 'admin'); |
234: require PUN_ROOT.'header.php'; | 231: require PUN_ROOT.'header.php'; |
235: | 232: |
236: generate_admin_menu('forums'); | 233: generate_admin_menu('forums'); |
237: | 234: |
238: ?> | 235: ?> |
239: <div class="blockform"> | 236: <div class="blockform"> |
240: <h2><span>Edit forum</span></h2> | 237: <h2><span><?php echo $lang_admin_forums['Edit forum head'] ?></span></h2> |
241: <div class="box"> | 238: <div class="box"> |
242: <form id="edit_forum" method="post" action="admin_forums.php?edit_forum=<?php echo $forum_id ?>"> | 239: <form id="edit_forum" method="post" action="admin_forums.php?edit_forum=<?php echo $forum_id ?>"> |
243: <p class="submittop"><input type="submit" name="save" value="Save changes" tabindex="6" /></p> | 240: <p class="submittop"><input type="submit" name="save" value="<?php echo $lang_admin_common['Save changes'] ?>" tabindex="6" /></p> |
244: <div class="inform"> | 241: <div class="inform"> |
245: <fieldset> | 242: <fieldset> |
246: <legend>Edit forum details</legend> | 243: <legend><?php echo $lang_admin_forums['Edit details subhead'] ?></legend> |
247: <div class="infldset"> | 244: <div class="infldset"> |
248: <table class="aligntop" cellspacing="0"> | 245: <table class="aligntop" cellspacing="0"> |
249: <tr> | 246: <tr> |
250: <th scope="row">Forum name</th> | 247: <th scope="row"><?php echo $lang_admin_forums['Forum name label'] ?></th> |
251: <td><input type="text" name="forum_name" size="35" maxlength="80" value="<?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?>" tabindex="1" /></td> | 248: <td><input type="text" name="forum_name" size="35" maxlength="80" value="<?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?>" tabindex="1" /></td> |
252: </tr> | 249: </tr> |
253: <tr> | 250: <tr> |
254: <th scope="row">Description (HTML)</th> | 251: <th scope="row"><?php echo $lang_admin_forums['Forum description label'] ?></th> |
255: <td><textarea name="forum_desc" rows="3" cols="50" tabindex="2"><?php echo pun_htmlspecialchars($cur_forum['forum_desc']) ?></textarea></td> | 252: <td><textarea name="forum_desc" rows="3" cols="50" tabindex="2"><?php echo pun_htmlspecialchars($cur_forum['forum_desc']) ?></textarea></td> |
256: </tr> | 253: </tr> |
257: <tr> | 254: <tr> |
258: <th scope="row">Category</th> | 255: <th scope="row"><?php echo $lang_admin_forums['Category label'] ?></th> |
259: <td> | 256: <td> |
260: <select name="cat_id" tabindex="3"> | 257: <select name="cat_id" tabindex="3"> |
261: <?php | 258: <?php |
272: </td> | 269: </td> |
273: </tr> | 270: </tr> |
274: <tr> | 271: <tr> |
275: <th scope="row">Sort topics by</th> | 272: <th scope="row"><?php echo $lang_admin_forums['Sort by label'] ?></th> |
276: <td> | 273: <td> |
277: <select name="sort_by" tabindex="4"> | 274: <select name="sort_by" tabindex="4"> |
278: <option value="0"<?php if ($cur_forum['sort_by'] == '0') echo ' selected="selected"' ?>>Last post</option> | 275: <option value="0"<?php if ($cur_forum['sort_by'] == '0') echo ' selected="selected"' ?>><?php echo $lang_admin_forums['Last post'] ?></option> |
279: <option value="1"<?php if ($cur_forum['sort_by'] == '1') echo ' selected="selected"' ?>>Topic start</option> | 276: <option value="1"<?php if ($cur_forum['sort_by'] == '1') echo ' selected="selected"' ?>><?php echo $lang_admin_forums['Topic start'] ?></option> |
280: </select> | 277: </select> |
281: </td> | 278: </td> |
282: </tr> | 279: </tr> |
283: <tr> | 280: <tr> |
284: <th scope="row">Redirect URL</th> | 281: <th scope="row"><?php echo $lang_admin_forums['Redirect label'] ?></th> |
285: <td><?php echo ($cur_forum['num_topics']) ? 'Only available in empty forums' : '<input type="text" name="redirect_url" size="45" maxlength="100" value="'.pun_htmlspecialchars($cur_forum['redirect_url']).'" tabindex="5" />'; ?></td> | 282: <td><?php echo ($cur_forum['num_topics']) ? $lang_admin_forums['Redirect help'] : '<input type="text" name="redirect_url" size="45" maxlength="100" value="'.pun_htmlspecialchars($cur_forum['redirect_url']).'" tabindex="5" />'; ?></td> |
286: </tr> | 283: </tr> |
287: </table> | 284: </table> |
288: </div> | 285: </div> |
290: </div> | 287: </div> |
291: <div class="inform"> | 288: <div class="inform"> |
292: <fieldset> | 289: <fieldset> |
293: <legend>Edit group permissions for this forum</legend> | 290: <legend><?php echo $lang_admin_forums['Group permissions subhead'] ?></legend> |
294: <div class="infldset"> | 291: <div class="infldset"> |
295: <p>In this form, you can set the forum specific permissions for the different user groups. If you haven't made any changes to this forums group permissions, what you see below is the default based on settings in <a href="admin_groups.php">User groups</a>. Administrators always have full permissions and are thus excluded. Permission settings that differ from the default permissions for the user group are marked red. The "Read forum" permission checkbox will be disabled if the group in question lacks the "Read board" permission. For redirect forums, only the "Read forum" permission is editable.</p> | 292: <p><?php printf($lang_admin_forums['Group permissions info'], '<a href="admin_groups.php">'.$lang_admin_common['User groups'].'</a>') ?></p> |
296: <table id="forumperms" cellspacing="0"> | 293: <table id="forumperms" cellspacing="0"> |
297: <thead> | 294: <thead> |
298: <tr> | 295: <tr> |
299: <th class="atcl"> </th> | 296: <th class="atcl"> </th> |
300: <th>Read forum</th> | 297: <th><?php echo $lang_admin_forums['Read forum label'] ?></th> |
301: <th>Post replies</th> | 298: <th><?php echo $lang_admin_forums['Post replies label'] ?></th> |
302: <th>Post topics</th> | 299: <th><?php echo $lang_admin_forums['Post topics label'] ?></th> |
303: </tr> | 300: </tr> |
304: </thead> | 301: </thead> |
305: <tbody> | 302: <tbody> |
341: ?> | 338: ?> |
342: </tbody> | 339: </tbody> |
343: </table> | 340: </table> |
344: <div class="fsetsubmit"><input type="submit" name="revert_perms" value="Revert to default" /></div> | 341: <div class="fsetsubmit"><input type="submit" name="revert_perms" value="<?php echo $lang_admin_forums['Revert to default'] ?>" /></div> |
345: </div> | 342: </div> |
346: </fieldset> | 343: </fieldset> |
347: </div> | 344: </div> |
348: <p class="submitend"><input type="submit" name="save" value="Save changes" /></p> | 345: <p class="submitend"><input type="submit" name="save" value="<?php echo $lang_admin_common['Save changes'] ?>" /></p> |
349: </form> | 346: </form> |
350: </div> | 347: </div> |
351: </div> | 348: </div> |
357: require PUN_ROOT.'footer.php'; | 354: require PUN_ROOT.'footer.php'; |
358: } | 355: } |
359: | 356: |
360: | 357: $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Forums']); |
361: $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Forums'; | 358: define('PUN_ACTIVE_PAGE', 'admin'); |
362: require PUN_ROOT.'header.php'; | 359: require PUN_ROOT.'header.php'; |
363: | 360: |
364: generate_admin_menu('forums'); | 361: generate_admin_menu('forums'); |
365: | 362: |
366: ?> | 363: ?> |
367: <div class="blockform"> | 364: <div class="blockform"> |
368: <h2><span>Add forum</span></h2> | 365: <h2><span><?php echo $lang_admin_forums['Add forum head'] ?></span></h2> |
369: <div class="box"> | 366: <div class="box"> |
370: <form method="post" action="admin_forums.php?action=adddel"> | 367: <form method="post" action="admin_forums.php?action=adddel"> |
371: <div class="inform"> | 368: <div class="inform"> |
372: <fieldset> | 369: <fieldset> |
373: <legend>Create a new forum</legend> | 370: <legend><?php echo $lang_admin_forums['Create new subhead'] ?></legend> |
374: <div class="infldset"> | 371: <div class="infldset"> |
375: <table class="aligntop" cellspacing="0"> | 372: <table class="aligntop" cellspacing="0"> |
376: <tr> | 373: <tr> |
377: <th scope="row">Add forum to category<div><input type="submit" name="add_forum" value=" Add " tabindex="2" /></div></th> | 374: <th scope="row"><?php echo $lang_admin_forums['Add forum label'] ?><div><input type="submit" name="add_forum" value="<?php echo $lang_admin_forums['Add forum'] ?>" tabindex="2" /></div></th> |
378: <td> | 375: <td> |
379: <select name="add_to_cat" tabindex="1"> | 376: <select name="add_to_cat" tabindex="1"> |
380: <?php | 377: <?php |
383: if ($db->num_rows($result) > 0) | 380: if ($db->num_rows($result) > 0) |
384: { | 381: { |
385: while ($cur_cat = $db->fetch_assoc($result)) | 382: while ($cur_cat = $db->fetch_assoc($result)) |
386: echo "\t\t\t\t\t\t\t\t\t".'<option value="'.$cur_cat['id'].'">'.pun_htmlspecialchars($cur_cat['cat_name']).'</option>'."\n"; | 383: echo "\t\t\t\t\t\t\t\t\t\t\t".'<option value="'.$cur_cat['id'].'">'.pun_htmlspecialchars($cur_cat['cat_name']).'</option>'."\n"; |
387: } | 384: } |
388: else | 385: else |
389: echo "\t\t\t\t\t\t\t\t\t".'<option value="0" disabled="disabled">No categories exist</option>'."\n"; | 386: echo "\t\t\t\t\t\t\t\t\t\t\t".'<option value="0" disabled="disabled">'.$lang_admin_forums['No categories exist'].'</option>'."\n"; |
390: | 387: |
391: ?> | 388: ?> |
392: </select> | 389: </select> |
393: <span>Select the category to which you wish to add a new forum.</span> | 390: <span><?php echo $lang_admin_forums['Add forum help'] ?></span> |
394: </td> | 391: </td> |
395: </tr> | 392: </tr> |
396: </table> | 393: </table> |
408: { | 405: { |
409: | 406: |
410: ?> | 407: ?> |
411: <h2 class="block2"><span>Edit forums</span></h2> | 408: <h2 class="block2"><span><?php echo $lang_admin_forums['Edit forums head'] ?></span></h2> |
412: <div class="box"> | 409: <div class="box"> |
413: <form id="edforum" method="post" action="admin_forums.php?action=edit"> | 410: <form id="edforum" method="post" action="admin_forums.php?action=edit"> |
414: <p class="submittop"><input type="submit" name="update_positions" value="Update positions" tabindex="3" /></p> | 411: <p class="submittop"><input type="submit" name="update_positions" value="<?php echo $lang_admin_forums['Update positions'] ?>" tabindex="3" /></p> |
415: <?php | 412: <?php |
416: | 413: |
417: $tabindex_count = 4; | 414: $tabindex_count = 4; |
422: if ($cur_forum['cid'] != $cur_category) // A new category since last iteration? | 419: if ($cur_forum['cid'] != $cur_category) // A new category since last iteration? |
423: { | 420: { |
424: if ($cur_category != 0) | 421: if ($cur_category != 0) |
425: echo "\t\t\t\t\t\t\t".'</table>'."\n\t\t\t\t\t\t".'</div>'."\n\t\t\t\t\t".'</fieldset>'."\n\t\t\t\t".'</div>'."\n"; | 422: echo "\t\t\t\t\t\t\t".'</tbody>'."\n\t\t\t\t\t\t\t".'</table>'."\n\t\t\t\t\t\t".'</div>'."\n\t\t\t\t\t".'</fieldset>'."\n\t\t\t\t".'</div>'."\n"; |
426: | 423: |
427: ?> | 424: ?> |
428: <div class="inform"> | 425: <div class="inform"> |
429: <fieldset> | 426: <fieldset> |
430: <legend>Category: <?php echo pun_htmlspecialchars($cur_forum['cat_name']) ?></legend> | 427: <legend><?php echo $lang_admin_forums['Category subhead'] ?> <?php echo pun_htmlspecialchars($cur_forum['cat_name']) ?></legend> |
431: <div class="infldset"> | 428: <div class="infldset"> |
432: <table cellspacing="0"> | 429: <table cellspacing="0"> |
| 430: <thead> |
| 431: <tr> |
| 432: <th class="tcl"><?php echo $lang_admin_common['Action'] ?></th> |
| 433: <th class="tc2"><?php echo $lang_admin_forums['Position label'] ?></th> |
| 434: <th class="tcr"><?php echo $lang_admin_forums['Forum label'] ?></th> |
| 435: </tr> |
| 436: </thead> |
| 437: <tbody> |
433: <?php | 438: <?php |
434: | 439: |
435: $cur_category = $cur_forum['cid']; | 440: $cur_category = $cur_forum['cid']; |
437: | 442: |
438: ?> | 443: ?> |
439: <tr> | 444: <tr> |
440: <th><a href="admin_forums.php?edit_forum=<?php echo $cur_forum['fid'] ?>">Edit</a> - <a href="admin_forums.php?del_forum=<?php echo $cur_forum['fid'] ?>">Delete</a></th> | 445: <td class="tcl"><a href="admin_forums.php?edit_forum=<?php echo $cur_forum['fid'] ?>"><?php echo $lang_admin_forums['Edit link'] ?></a> | <a href="admin_forums.php?del_forum=<?php echo $cur_forum['fid'] ?>"><?php echo $lang_admin_forums['Delete link'] ?></a></td> |
441: <td>Position <input type="text" name="position[<?php echo $cur_forum['fid'] ?>]" size="3" maxlength="3" value="<?php echo $cur_forum['disp_position'] ?>" tabindex="<?php echo $tabindex_count ?>" /> | 446: <td class="tc2"><input type="text" name="position[<?php echo $cur_forum['fid'] ?>]" size="3" maxlength="3" value="<?php echo $cur_forum['disp_position'] ?>" tabindex="<?php echo $tabindex_count ?>" /></td> |
442: <strong><?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></strong></td> | 447: <td class="tcr"><strong><?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></strong></td> |
443: </tr> | 448: </tr> |
444: <?php | 449: <?php |
445: | 450: |
447: } | 452: } |
448: | 453: |
449: ?> | 454: ?> |
| 455: </tbody> |
450: </table> | 456: </table> |
451: </div> | 457: </div> |
452: </fieldset> | 458: </fieldset> |
453: </div> | 459: </div> |
454: <p class="submitend"><input type="submit" name="update_positions" value="Update positions" tabindex="<?php echo $tabindex_count ?>" /></p> | 460: <p class="submitend"><input type="submit" name="update_positions" value="<?php echo $lang_admin_forums['Update positions'] ?>" tabindex="<?php echo $tabindex_count ?>" /></p> |
455: </form> | 461: </form> |
456: </div> | 462: </div> |
457: <?php | 463: <?php |
a/upload/admin_groups.php |
b/upload/admin_groups.php |
1: <?php | 1: <?php |
2: | 2: |
3: /*--- | 3: /** |
4: | 4: * Copyright (C) 2008-2010 FluxBB |
5: Copyright (C) 2008-2009 FluxBB.org | 5: * based on code by Rickard Andersson copyright (C) 2002-2008 PunBB |
6: based on code copyright (C) 2002-2005 Rickard Andersson | 6: * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
7: License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 7: */ |
8: | |
9: ---*/ | |
10: | 8: |
11: // Tell header.php to use the admin template | 9: // Tell header.php to use the admin template |
12: define('PUN_ADMIN_CONSOLE', 1); | 10: define('PUN_ADMIN_CONSOLE', 1); |
19: if ($pun_user['g_id'] != PUN_ADMIN) | 17: if ($pun_user['g_id'] != PUN_ADMIN) |
20: message($lang_common['No permission']); | 18: message($lang_common['No permission']); |
21: | 19: |
| 20: // Load the admin_censoring.php language file |
| 21: require PUN_ROOT.'lang/'.$admin_language.'/admin_groups.php'; |
22: | 22: |
23: // Add/edit a group (stage 1) | 23: // Add/edit a group (stage 1) |
24: if (isset($_POST['add_group']) || isset($_GET['edit_group'])) | 24: if (isset($_POST['add_group']) || isset($_GET['edit_group'])) |
48: } | 48: } |
49: | 49: |
50: | 50: |
51: $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / User groups'; | 51: $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['User groups']); |
52: $required_fields = array('req_title' => 'Group title'); | 52: $required_fields = array('req_title' => $lang_admin_groups['Group title label']); |
53: $focus_element = array('groups2', 'req_title'); | 53: $focus_element = array('groups2', 'req_title'); |
| 54: define('PUN_ACTIVE_PAGE', 'admin'); |
54: require PUN_ROOT.'header.php'; | 55: require PUN_ROOT.'header.php'; |
55: | 56: |
56: generate_admin_menu('groups'); | 57: generate_admin_menu('groups'); |
57: | 58: |
58: ?> | 59: ?> |
59: <div class="blockform"> | 60: <div class="blockform"> |
60: <h2><span>Group settings</span></h2> | 61: <h2><span><?php echo $lang_admin_groups['Group settings head'] ?></span></h2> |
61: <div class="box"> | 62: <div class="box"> |
62: <form id="groups2" method="post" action="admin_groups.php" onsubmit="return process_form(this)"> | 63: <form id="groups2" method="post" action="admin_groups.php" onsubmit="return process_form(this)"> |
63: <p class="submittop"><input type="submit" name="add_edit_group" value=" Save " /></p> | 64: <p class="submittop"><input type="submit" name="add_edit_group" value="<?php echo $lang_admin_common['Save'] ?>" /></p> |
64: <div class="inform"> | 65: <div class="inform"> |
65: <input type="hidden" name="mode" value="<?php echo $mode ?>" /> | 66: <input type="hidden" name="mode" value="<?php echo $mode ?>" /> |
66: <?php if ($mode == 'edit'): ?> <input type="hidden" name="group_id" value="<?php echo $group_id ?>" /> | 67: <?php if ($mode == 'edit'): ?> <input type="hidden" name="group_id" value="<?php echo $group_id ?>" /> |
67: <?php endif; ?><?php if ($mode == 'add'): ?> <input type="hidden" name="base_group" value="<?php echo $base_group ?>" /> | 68: <?php endif; ?><?php if ($mode == 'add'): ?> <input type="hidden" name="base_group" value="<?php echo $base_group ?>" /> |
68: <?php endif; ?> <fieldset> | 69: <?php endif; ?> <fieldset> |
69: <legend>Setup group options and permissions</legend> | 70: <legend><?php echo $lang_admin_groups['Group settings subhead'] ?></legend> |
70: <div class="infldset"> | 71: <div class="infldset"> |
71: <p>Below options and permissions are the default permissions for the user group. These options apply if no forum specific permissions are in effect.</p> | 72: <p><?php echo $lang_admin_groups['Group settings info'] ?></p> |
72: <table class="aligntop" cellspacing="0"> | 73: <table class="aligntop" cellspacing="0"> |
73: <tr> | 74: <tr> |
74: <th scope="row">Group title</th> | 75: <th scope="row"><?php echo $lang_admin_groups['Group title label'] ?></th> |
75: <td> | 76: <td> |
76: <input type="text" name="req_title" size="25" maxlength="50" value="<?php if ($mode == 'edit') echo pun_htmlspecialchars($group['g_title']); ?>" tabindex="1" /> | 77: <input type="text" name="req_title" size="25" maxlength="50" value="<?php if ($mode == 'edit') echo pun_htmlspecialchars($group['g_title']); ?>" tabindex="1" /> |
77: </td> | 78: </td> |
78: </tr> | 79: </tr> |
79: <tr> | 80: <tr> |
80: <th scope="row">User title</th> | 81: <th scope="row"><?php echo $lang_admin_groups['User title label'] ?></th> |
81: <td> | 82: <td> |
82: <input type="text" name="user_title" size="25" maxlength="50" value="<?php echo pun_htmlspecialchars($group['g_user_title']) ?>" tabindex="2" /> | 83: <input type="text" name="user_title" size="25" maxlength="50" value="<?php echo pun_htmlspecialchars($group['g_user_title']) ?>" tabindex="2" /> |
83: <span>This title will override any rank users in this group have attained. Leave blank to use default title or rank.</span> | 84: <span><?php echo $lang_admin_groups['User title help'] ?></span> |
84: </td> | 85: </td> |
85: </tr> | 86: </tr> |
86: <?php if ($group['g_id'] != PUN_ADMIN): if ($group['g_id'] != PUN_GUEST): if ($mode != 'edit' || $pun_config['o_default_user_group'] != $group['g_id']): ?> <tr> | 87: <?php if ($group['g_id'] != PUN_ADMIN): if ($group['g_id'] != PUN_GUEST): if ($mode != 'edit' || $pun_config['o_default_user_group'] != $group['g_id']): ?> <tr> |
87: <th scope="row"> Allow users moderator privileges</th> | 88: <th scope="row"> <?php echo $lang_admin_groups['Mod privileges label'] ?></th> |
88: <td> | 89: <td> |
89: <input type="radio" name="moderator" value="1"<?php if ($group['g_moderator'] == '1') echo ' checked="checked"' ?> tabindex="3" /> <strong>Yes</strong> <input type="radio" name="moderator" value="0"<?php if ($group['g_moderator'] == '0') echo ' checked="checked"' ?> tabindex="4" /> <strong>No</strong> | 90: <input type="radio" name="moderator" value="1"<?php if ($group['g_moderator'] == '1') echo ' checked="checked"' ?> tabindex="3" /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="moderator" value="0"<?php if ($group['g_moderator'] == '0') echo ' checked="checked"' ?> tabindex="4" /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
90: <span>In order for a user in this group to have moderator abilities, he/she must be assigned to moderate one or more forums. This is done via the user administration page of the user's profile.</span> | 91: <span><?php echo $lang_admin_groups['Mod privileges help'] ?></span> |
91: </td> | 92: </td> |
92: </tr> | 93: </tr> |
93: <tr> | 94: <tr> |
94: <th scope="row">Allow moderators to edit user profiles</th> | 95: <th scope="row"><?php echo $lang_admin_groups['Edit profile label'] ?></th> |
95: <td> | 96: <td> |
96: <input type="radio" name="mod_edit_users" value="1"<?php if ($group['g_mod_edit_users'] == '1') echo ' checked="checked"' ?> tabindex="5" /> <strong>Yes</strong> <input type="radio" name="mod_edit_users" value="0"<?php if ($group['g_mod_edit_users'] == '0') echo ' checked="checked"' ?> tabindex="6" /> <strong>No</strong> | 97: <input type="radio" name="mod_edit_users" value="1"<?php if ($group['g_mod_edit_users'] == '1') echo ' checked="checked"' ?> tabindex="5" /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="mod_edit_users" value="0"<?php if ($group['g_mod_edit_users'] == '0') echo ' checked="checked"' ?> tabindex="6" /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
97: <span>If moderator privileges are enabled, allow users in this group to edit user profiles.</span> | 98: <span><?php echo $lang_admin_groups['Edit profile help'] ?></span> |
98: </td> | 99: </td> |
99: </tr> | 100: </tr> |
100: <tr> | 101: <tr> |
101: <th scope="row">Allow moderators to rename users</th> | 102: <th scope="row"><?php echo $lang_admin_groups['Rename users label'] ?></th> |
102: <td> | 103: <td> |
103: <input type="radio" name="mod_rename_users" value="1"<?php if ($group['g_mod_rename_users'] == '1') echo ' checked="checked"' ?> tabindex="5" /> <strong>Yes</strong> <input type="radio" name="mod_rename_users" value="0"<?php if ($group['g_mod_rename_users'] == '0') echo ' checked="checked"' ?> tabindex="6" /> <strong>No</strong> | 104: <input type="radio" name="mod_rename_users" value="1"<?php if ($group['g_mod_rename_users'] == '1') echo ' checked="checked"' ?> tabindex="5" /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="mod_rename_users" value="0"<?php if ($group['g_mod_rename_users'] == '0') echo ' checked="checked"' ?> tabindex="6" /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
104: <span>If moderator privileges are enabled, allow users in this group to rename users.</span> | 105: <span><?php echo $lang_admin_groups['Rename users help'] ?></span> |
105: </td> | 106: </td> |
106: </tr> | 107: </tr> |
107: <tr> | 108: <tr> |
108: <th scope="row">Allow moderators to change passwords</th> | 109: <th scope="row"><?php echo $lang_admin_groups['Change passwords label'] ?></th> |
109: <td> | 110: <td> |
110: <input type="radio" name="mod_change_passwords" value="1"<?php if ($group['g_mod_change_passwords'] == '1') echo ' checked="checked"' ?> tabindex="5" /> <strong>Yes</strong> <input type="radio" name="mod_change_passwords" value="0"<?php if ($group['g_mod_change_passwords'] == '0') echo ' checked="checked"' ?> tabindex="6" /> <strong>No</strong> | 111: <input type="radio" name="mod_change_passwords" value="1"<?php if ($group['g_mod_change_passwords'] == '1') echo ' checked="checked"' ?> tabindex="5" /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="mod_change_passwords" value="0"<?php if ($group['g_mod_change_passwords'] == '0') echo ' checked="checked"' ?> tabindex="6" /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
111: <span>If moderator privileges are enabled, allow users in this group to change user passwords.</span> | 112: <span><?php echo $lang_admin_groups['Change passwords help'] ?></span> |
112: </td> | 113: </td> |
113: </tr> | 114: </tr> |
114: <tr> | 115: <tr> |
115: <th scope="row">Allow moderators to ban users</th> | 116: <th scope="row"><?php echo $lang_admin_groups['Ban users label'] ?></th> |
116: <td> | 117: <td> |
117: <input type="radio" name="mod_ban_users" value="1"<?php if ($group['g_mod_ban_users'] == '1') echo ' checked="checked"' ?> tabindex="5" /> <strong>Yes</strong> <input type="radio" name="mod_ban_users" value="0"<?php if ($group['g_mod_ban_users'] == '0') echo ' checked="checked"' ?> tabindex="6" /> <strong>No</strong> | 118: <input type="radio" name="mod_ban_users" value="1"<?php if ($group['g_mod_ban_users'] == '1') echo ' checked="checked"' ?> tabindex="5" /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="mod_ban_users" value="0"<?php if ($group['g_mod_ban_users'] == '0') echo ' checked="checked"' ?> tabindex="6" /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
118: <span>If moderator privileges are enabled, allow users in this group to ban users.</span> | 119: <span><?php echo $lang_admin_groups['Ban users help'] ?></span> |
119: </td> | 120: </td> |
120: </tr> | 121: </tr> |
121: <?php endif; endif; ?> <tr> | 122: <?php endif; endif; ?> <tr> |
122: <th scope="row">Read board</th> | 123: <th scope="row"><?php echo $lang_admin_groups['Read board label'] ?></th> |
123: <td> | 124: <td> |
124: <input type="radio" name="read_board" value="1"<?php if ($group['g_read_board'] == '1') echo ' checked="checked"' ?> tabindex="3" /> <strong>Yes</strong> <input type="radio" name="read_board" value="0"<?php if ($group['g_read_board'] == '0') echo ' checked="checked"' ?> tabindex="4" /> <strong>No</strong> | 125: <input type="radio" name="read_board" value="1"<?php if ($group['g_read_board'] == '1') echo ' checked="checked"' ?> tabindex="3" /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="read_board" value="0"<?php if ($group['g_read_board'] == '0') echo ' checked="checked"' ?> tabindex="4" /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
125: <span>Allow users in this group to view the board. This setting applies to every aspect of the board and can therefore not be overridden by forum specific settings. If this is set to "No", users in this group will only be able to login/logout and register.</span> | 126: <span><?php echo $lang_admin_groups['Read board help'] ?></span> |
126: </td> | 127: </td> |
127: </tr> | 128: </tr> |
128: <tr> | 129: <tr> |
129: <th scope="row">View user information</th> | 130: <th scope="row"><?php echo $lang_admin_groups['View user info label'] ?></th> |
130: <td> | 131: <td> |
131: <input type="radio" name="view_users" value="1"<?php if ($group['g_view_users'] == '1') echo ' checked="checked"' ?> tabindex="3" /> <strong>Yes</strong> <input type="radio" name="view_users" value="0"<?php if ($group['g_view_users'] == '0') echo ' checked="checked"' ?> tabindex="4" /> <strong>No</strong> | 132: <input type="radio" name="view_users" value="1"<?php if ($group['g_view_users'] == '1') echo ' checked="checked"' ?> tabindex="3" /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="view_users" value="0"<?php if ($group['g_view_users'] == '0') echo ' checked="checked"' ?> tabindex="4" /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
132: <span>Allow users to view the user list and user profiles.</span> | 133: <span><?php echo $lang_admin_groups['View user info help'] ?></span> |
133: </td> | 134: </td> |
134: </tr> | 135: </tr> |
135: <tr> | 136: <tr> |
136: <th scope="row">Post replies</th> | 137: <th scope="row"><?php echo $lang_admin_groups['Post replies label'] ?></th> |
137: <td> | 138: <td> |
138: <input type="radio" name="post_replies" value="1"<?php if ($group['g_post_replies'] == '1') echo ' checked="checked"' ?> tabindex="5" /> <strong>Yes</strong> <input type="radio" name="post_replies" value="0"<?php if ($group['g_post_replies'] == '0') echo ' checked="checked"' ?> tabindex="6" /> <strong>No</strong> | 139: <input type="radio" name="post_replies" value="1"<?php if ($group['g_post_replies'] == '1') echo ' checked="checked"' ?> tabindex="5" /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="post_replies" value="0"<?php if ($group['g_post_replies'] == '0') echo ' checked="checked"' ?> tabindex="6" /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
139: <span>Allow users in this group to post replies in topics.</span> | 140: <span><?php echo $lang_admin_groups['Post replies help'] ?></span> |
140: </td> | 141: </td> |
141: </tr> | 142: </tr> |
142: <tr> | 143: <tr> |
143: <th scope="row">Post topics</th> | 144: <th scope="row"><?php echo $lang_admin_groups['Post topics label'] ?></th> |
144: <td> | 145: <td> |
145: <input type="radio" name="post_topics" value="1"<?php if ($group['g_post_topics'] == '1') echo ' checked="checked"' ?> tabindex="7" /> <strong>Yes</strong> <input type="radio" name="post_topics" value="0"<?php if ($group['g_post_topics'] == '0') echo ' checked="checked"' ?> tabindex="8" /> <strong>No</strong> | 146: <input type="radio" name="post_topics" value="1"<?php if ($group['g_post_topics'] == '1') echo ' checked="checked"' ?> tabindex="7" /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="post_topics" value="0"<?php if ($group['g_post_topics'] == '0') echo ' checked="checked"' ?> tabindex="8" /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
146: <span>Allow users in this group to post new topics.</span> | 147: <span><?php echo $lang_admin_groups['Post topics help'] ?></span> |
147: </td> | 148: </td> |
148: </tr> | 149: </tr> |
149: <?php if ($group['g_id'] != PUN_GUEST): ?> <tr> | 150: <?php if ($group['g_id'] != PUN_GUEST): ?> <tr> |
150: <th scope="row">Edit posts</th> | 151: <th scope="row"><?php echo $lang_admin_groups['Edit posts label'] ?></th> |
151: <td> | 152: <td> |
152: <input type="radio" name="edit_posts" value="1"<?php if ($group['g_edit_posts'] == '1') echo ' checked="checked"' ?> tabindex="11" /> <strong>Yes</strong> <input type="radio" name="edit_posts" value="0"<?php if ($group['g_edit_posts'] == '0') echo ' checked="checked"' ?> tabindex="12" /> <strong>No</strong> | 153: <input type="radio" name="edit_posts" value="1"<?php if ($group['g_edit_posts'] == '1') echo ' checked="checked"' ?> tabindex="11" /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="edit_posts" value="0"<?php if ($group['g_edit_posts'] == '0') echo ' checked="checked"' ?> tabindex="12" /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
153: <span>Allow users in this group to edit their own posts.</span> | 154: <span><?php echo $lang_admin_groups['Edit posts help'] ?></span> |
154: </td> | 155: </td> |
155: </tr> | 156: </tr> |
156: <tr> | 157: <tr> |
157: <th scope="row">Delete posts</th> | 158: <th scope="row"><?php echo $lang_admin_groups['Delete posts label'] ?></th> |
158: <td> | 159: <td> |
159: <input type="radio" name="delete_posts" value="1"<?php if ($group['g_delete_posts'] == '1') echo ' checked="checked"' ?> tabindex="13" /> <strong>Yes</strong> <input type="radio" name="delete_posts" value="0"<?php if ($group['g_delete_posts'] == '0') echo ' checked="checked"' ?> tabindex="14" /> <strong>No</strong> | 160: <input type="radio" name="delete_posts" value="1"<?php if ($group['g_delete_posts'] == '1') echo ' checked="checked"' ?> tabindex="13" /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="delete_posts" value="0"<?php if ($group['g_delete_posts'] == '0') echo ' checked="checked"' ?> tabindex="14" /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
160: <span>Allow users in this group to delete their own posts.</span> | 161: <span><?php echo $lang_admin_groups['Delete posts help'] ?></span> |
161: </td> | 162: </td> |
162: </tr> | 163: </tr> |
163: <tr> | 164: <tr> |
164: <th scope="row">Delete topics</th> | 165: <th scope="row"><?php echo $lang_admin_groups['Delete topics label'] ?></th> |
165: <td> | 166: <td> |
166: <input type="radio" name="delete_topics" value="1"<?php if ($group['g_delete_topics'] == '1') echo ' checked="checked"' ?> tabindex="15" /> <strong>Yes</strong> <input type="radio" name="delete_topics" value="0"<?php if ($group['g_delete_topics'] == '0') echo ' checked="checked"' ?> tabindex="16" /> <strong>No</strong> | 167: <input type="radio" name="delete_topics" value="1"<?php if ($group['g_delete_topics'] == '1') echo ' checked="checked"' ?> tabindex="15" /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="delete_topics" value="0"<?php if ($group['g_delete_topics'] == '0') echo ' checked="checked"' ?> tabindex="16" /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
167: <span>Allow users in this group to delete their own topics (including any replies).</span> | 168: <span><?php echo $lang_admin_groups['Delete topics help'] ?></span> |
168: </td> | 169: </td> |
169: </tr> | 170: </tr> |
170: <tr> | 171: <tr> |
171: <th scope="row">Set user title</th> | 172: <th scope="row"><?php echo $lang_admin_groups['Set own title label'] ?></th> |
172: <td> | 173: <td> |
173: <input type="radio" name="set_title" value="1"<?php if ($group['g_set_title'] == '1') echo ' checked="checked"' ?> tabindex="17" /> <strong>Yes</strong> <input type="radio" name="set_title" value="0"<?php if ($group['g_set_title'] == '0') echo ' checked="checked"' ?> tabindex="18" /> <strong>No</strong> | 174: <input type="radio" name="set_title" value="1"<?php if ($group['g_set_title'] == '1') echo ' checked="checked"' ?> tabindex="17" /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="set_title" value="0"<?php if ($group['g_set_title'] == '0') echo ' checked="checked"' ?> tabindex="18" /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
174: <span>Allow users in this group to set their own user title.</span> | 175: <span><?php echo $lang_admin_groups['Set own title help'] ?></span> |
175: </td> | 176: </td> |
176: </tr> | 177: </tr> |
177: <?php endif; ?> <tr> | 178: <?php endif; ?> <tr> |
178: <th scope="row">Use search</th> | 179: <th scope="row"><?php echo $lang_admin_groups['User search label'] ?></th> |
179: <td> | 180: <td> |
180: <input type="radio" name="search" value="1"<?php if ($group['g_search'] == '1') echo ' checked="checked"' ?> tabindex="19" /> <strong>Yes</strong> <input type="radio" name="search" value="0"<?php if ($group['g_search'] == '0') echo ' checked="checked"' ?> tabindex="20" /> <strong>No</strong> | 181: <input type="radio" name="search" value="1"<?php if ($group['g_search'] == '1') echo ' checked="checked"' ?> tabindex="19" /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="search" value="0"<?php if ($group['g_search'] == '0') echo ' checked="checked"' ?> tabindex="20" /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
181: <span>Allow users in this group to use the search feature.</span> | 182: <span><?php echo $lang_admin_groups['User search help'] ?></span> |
182: </td> | 183: </td> |
183: </tr> | 184: </tr> |
184: <tr> | 185: <tr> |
185: <th scope="row">Search user list</th> | 186: <th scope="row"><?php echo $lang_admin_groups['User list search label'] ?></th> |
186: <td> | 187: <td> |
187: <input type="radio" name="search_users" value="1"<?php if ($group['g_search_users'] == '1') echo ' checked="checked"' ?> tabindex="21" /> <strong>Yes</strong> <input type="radio" name="search_users" value="0"<?php if ($group['g_search_users'] == '0') echo ' checked="checked"' ?> tabindex="22" /> <strong>No</strong> | 188: <input type="radio" name="search_users" value="1"<?php if ($group['g_search_users'] == '1') echo ' checked="checked"' ?> tabindex="21" /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="search_users" value="0"<?php if ($group['g_search_users'] == '0') echo ' checked="checked"' ?> tabindex="22" /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
188: <span>Allow users in this group to freetext search for users in the user list.</span> | 189: <span><?php echo $lang_admin_groups['User list search help'] ?></span> |
189: </td> | 190: </td> |
190: </tr> | 191: </tr> |
191: <?php if ($group['g_id'] != PUN_GUEST): ?> <tr> | 192: <?php if ($group['g_id'] != PUN_GUEST): ?> <tr> |
192: <th scope="row">Send emails</th> | 193: <th scope="row"><?php echo $lang_admin_groups['Send e-mails label'] ?></th> |
193: <td> | 194: <td> |
194: <input type="radio" name="send_email" value="1"<?php if ($group['g_send_email'] == '1') echo ' checked="checked"' ?> tabindex="21" /> <strong>Yes</strong> <input type="radio" name="send_email" value="0"<?php if ($group['g_send_email'] == '0') echo ' checked="checked"' ?> tabindex="22" /> <strong>No</strong> | 195: <input type="radio" name="send_email" value="1"<?php if ($group['g_send_email'] == '1') echo ' checked="checked"' ?> tabindex="21" /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="send_email" value="0"<?php if ($group['g_send_email'] == '0') echo ' checked="checked"' ?> tabindex="22" /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
195: <span>Allow users in this group to send emails to other users.</span> | 196: <span><?php echo $lang_admin_groups['Send e-mails help'] ?></span> |
196: </td> | 197: </td> |
197: </tr> | 198: </tr> |
198: <?php endif; ?> <tr> | 199: <?php endif; ?> <tr> |
199: <th scope="row">Post flood interval</th> | 200: <th scope="row"><?php echo $lang_admin_groups['Post flood label'] ?></th> |
200: <td> | 201: <td> |
201: <input type="text" name="post_flood" size="5" maxlength="4" value="<?php echo $group['g_post_flood'] ?>" tabindex="24" /> | 202: <input type="text" name="post_flood" size="5" maxlength="4" value="<?php echo $group['g_post_flood'] ?>" tabindex="24" /> |
202: <span>Number of seconds that users in this group have to wait between posts. Set to 0 to disable.</span> | 203: <span><?php echo $lang_admin_groups['Post flood help'] ?></span> |
203: </td> | 204: </td> |
204: </tr> | 205: </tr> |
205: <tr> | 206: <tr> |
206: <th scope="row">Search flood interval</th> | 207: <th scope="row"><?php echo $lang_admin_groups['Search flood label'] ?></th> |
207: <td> | 208: <td> |
208: <input type="text" name="search_flood" size="5" maxlength="4" value="<?php echo $group['g_search_flood'] ?>" tabindex="25" /> | 209: <input type="text" name="search_flood" size="5" maxlength="4" value="<?php echo $group['g_search_flood'] ?>" tabindex="25" /> |
209: <span>Number of seconds that users in this group have to wait between searches. Set to 0 to disable.</span> | 210: <span><?php echo $lang_admin_groups['Search flood help'] ?></span> |
210: </td> | 211: </td> |
211: </tr> | 212: </tr> |
212: <?php if ($group['g_id'] != PUN_GUEST): ?> <tr> | 213: <?php if ($group['g_id'] != PUN_GUEST): ?> <tr> |
213: <th scope="row">Email flood interval</th> | 214: <th scope="row"><?php echo $lang_admin_groups['E-mail flood label'] ?></th> |
214: <td> | 215: <td> |
215: <input type="text" name="email_flood" size="5" maxlength="4" value="<?php echo $group['g_email_flood'] ?>" tabindex="26" /> | 216: <input type="text" name="email_flood" size="5" maxlength="4" value="<?php echo $group['g_email_flood'] ?>" tabindex="26" /> |
216: <span>Number of seconds that users in this group have to wait between emails. Set to 0 to disable.</span> | 217: <span><?php echo $lang_admin_groups['E-mail flood help'] ?></span> |
217: </td> | 218: </td> |
218: </tr> | 219: </tr> |
219: <?php endif; endif; ?> </table> | 220: <?php endif; endif; ?> </table> |
220: <?php if ($group['g_moderator'] == '1' ): ?> <p class="warntext">Please note that in order for a user in this group to have moderator abilities, he/she must be assigned to moderate one or more forums. This is done via the user administration page of the user's profile.</p> | 221: <?php if ($group['g_moderator'] == '1' ): ?> <p class="warntext"><?php echo $lang_admin_groups['Moderator info'] ?></p> |
221: <?php endif; ?> </div> | 222: <?php endif; ?> </div> |
222: </fieldset> | 223: </fieldset> |
223: </div> | 224: </div> |
224: <p class="submitend"><input type="submit" name="add_edit_group" value=" Save " tabindex="26" /></p> | 225: <p class="submitend"><input type="submit" name="add_edit_group" value="<?php echo $lang_admin_common['Save'] ?>" tabindex="26" /></p> |
225: </form> | 226: </form> |
226: </div> | 227: </div> |
227: </div> | 228: </div> |
241: // Is this the admin group? (special rules apply) | 242: // Is this the admin group? (special rules apply) |
242: $is_admin_group = (isset($_POST['group_id']) && $_POST['group_id'] == PUN_ADMIN) ? true : false; | 243: $is_admin_group = (isset($_POST['group_id']) && $_POST['group_id'] == PUN_ADMIN) ? true : false; |
243: | 244: |
244: $title = trim($_POST['req_title']); | 245: $title = pun_trim($_POST['req_title']); |
245: $user_title = trim($_POST['user_title']); | 246: $user_title = pun_trim($_POST['user_title']); |
246: $moderator = isset($_POST['moderator']) && $_POST['moderator'] == '1' ? '1' : '0'; | 247: $moderator = isset($_POST['moderator']) && $_POST['moderator'] == '1' ? '1' : '0'; |
247: $mod_edit_users = $moderator == '1' && isset($_POST['mod_edit_users']) && $_POST['mod_edit_users'] == '1' ? '1' : '0'; | 248: $mod_edit_users = $moderator == '1' && isset($_POST['mod_edit_users']) && $_POST['mod_edit_users'] == '1' ? '1' : '0'; |
248: $mod_rename_users = $moderator == '1' && isset($_POST['mod_rename_users']) && $_POST['mod_rename_users'] == '1' ? '1' : '0'; | 249: $mod_rename_users = $moderator == '1' && isset($_POST['mod_rename_users']) && $_POST['mod_rename_users'] == '1' ? '1' : '0'; |
264: $email_flood = isset($_POST['email_flood']) ? intval($_POST['email_flood']) : '0'; | 265: $email_flood = isset($_POST['email_flood']) ? intval($_POST['email_flood']) : '0'; |
265: | 266: |
266: if ($title == '') | 267: if ($title == '') |
267: message('You must enter a group title.'); | 268: message($lang_admin_groups['Must enter title message']); |
268: | 269: |
269: $user_title = ($user_title != '') ? '\''.$db->escape($user_title).'\'' : 'NULL'; | 270: $user_title = ($user_title != '') ? '\''.$db->escape($user_title).'\'' : 'NULL'; |
270: | 271: |
272: { | 273: { |
273: $result = $db->query('SELECT 1 FROM '.$db->prefix.'groups WHERE g_title=\''.$db->escape($title).'\'') or error('Unable to check group title collision', __FILE__, __LINE__, $db->error()); | 274: $result = $db->query('SELECT 1 FROM '.$db->prefix.'groups WHERE g_title=\''.$db->escape($title).'\'') or error('Unable to check group title collision', __FILE__, __LINE__, $db->error()); |
274: if ($db->num_rows($result)) | 275: if ($db->num_rows($result)) |
275: message('There is already a group with the title \''.pun_htmlspecialchars($title).'\'.'); | 276: message(sprintf($lang_admin_groups['Title already exists message'], pun_htmlspecialchars($title))); |
276: | 277: |
277: $db->query('INSERT INTO '.$db->prefix.'groups (g_title, g_user_title, g_moderator, g_mod_edit_users, g_mod_rename_users, g_mod_change_passwords, g_mod_ban_users, g_read_board, g_view_users, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_send_email, g_post_flood, g_search_flood, g_email_flood) VALUES(\''.$db->escape($title).'\', '.$user_title.', '.$moderator.', '.$mod_edit_users.', '.$mod_rename_users.', '.$mod_change_passwords.', '.$mod_ban_users.', '.$read_board.', '.$view_users.', '.$post_replies.', '.$post_topics.', '.$edit_posts.', '.$delete_posts.', '.$delete_topics.', '.$set_title.', '.$search.', '.$search_users.', '.$send_email.', '.$post_flood.', '.$search_flood.', '.$email_flood.')') or error('Unable to add group', __FILE__, __LINE__, $db->error()); | 278: $db->query('INSERT INTO '.$db->prefix.'groups (g_title, g_user_title, g_moderator, g_mod_edit_users, g_mod_rename_users, g_mod_change_passwords, g_mod_ban_users, g_read_board, g_view_users, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_send_email, g_post_flood, g_search_flood, g_email_flood) VALUES(\''.$db->escape($title).'\', '.$user_title.', '.$moderator.', '.$mod_edit_users.', '.$mod_rename_users.', '.$mod_change_passwords.', '.$mod_ban_users.', '.$read_board.', '.$view_users.', '.$post_replies.', '.$post_topics.', '.$edit_posts.', '.$delete_posts.', '.$delete_topics.', '.$set_title.', '.$search.', '.$search_users.', '.$send_email.', '.$post_flood.', '.$search_flood.', '.$email_flood.')') or error('Unable to add group', __FILE__, __LINE__, $db->error()); |
278: $new_group_id = $db->insert_id(); | 279: $new_group_id = $db->insert_id(); |
286: { | 287: { |
287: $result = $db->query('SELECT 1 FROM '.$db->prefix.'groups WHERE g_title=\''.$db->escape($title).'\' AND g_id!='.intval($_POST['group_id'])) or error('Unable to check group title collision', __FILE__, __LINE__, $db->error()); | 288: $result = $db->query('SELECT 1 FROM '.$db->prefix.'groups WHERE g_title=\''.$db->escape($title).'\' AND g_id!='.intval($_POST['group_id'])) or error('Unable to check group title collision', __FILE__, __LINE__, $db->error()); |
288: if ($db->num_rows($result)) | 289: if ($db->num_rows($result)) |
289: message('There is already a group with the title \''.pun_htmlspecialchars($title).'\'.'); | 290: message(sprintf($lang_admin_groups['Title already exists message'], pun_htmlspecialchars($title))); |
290: | 291: |
291: $db->query('UPDATE '.$db->prefix.'groups SET g_title=\''.$db->escape($title).'\', g_user_title='.$user_title.', g_moderator='.$moderator.', g_mod_edit_users='.$mod_edit_users.', g_mod_rename_users='.$mod_rename_users.', g_mod_change_passwords='.$mod_change_passwords.', g_mod_ban_users='.$mod_ban_users.', g_read_board='.$read_board.', g_view_users='.$view_users.', g_post_replies='.$post_replies.', g_post_topics='.$post_topics.', g_edit_posts='.$edit_posts.', g_delete_posts='.$delete_posts.', g_delete_topics='.$delete_topics.', g_set_title='.$set_title.', g_search='.$search.', g_search_users='.$search_users.', g_send_email='.$send_email.', g_post_flood='.$post_flood.', g_search_flood='.$search_flood.', g_email_flood='.$email_flood.' WHERE g_id='.intval($_POST['group_id'])) or error('Unable to update group', __FILE__, __LINE__, $db->error()); | 292: $db->query('UPDATE '.$db->prefix.'groups SET g_title=\''.$db->escape($title).'\', g_user_title='.$user_title.', g_moderator='.$moderator.', g_mod_edit_users='.$mod_edit_users.', g_mod_rename_users='.$mod_rename_users.', g_mod_change_passwords='.$mod_change_passwords.', g_mod_ban_users='.$mod_ban_users.', g_read_board='.$read_board.', g_view_users='.$view_users.', g_post_replies='.$post_replies.', g_post_topics='.$post_topics.', g_edit_posts='.$edit_posts.', g_delete_posts='.$delete_posts.', g_delete_topics='.$delete_topics.', g_set_title='.$set_title.', g_search='.$search.', g_search_users='.$search_users.', g_send_email='.$send_email.', g_post_flood='.$post_flood.', g_search_flood='.$search_flood.', g_email_flood='.$email_flood.' WHERE g_id='.intval($_POST['group_id'])) or error('Unable to update group', __FILE__, __LINE__, $db->error()); |
292: } | 293: } |
297: | 298: |
298: generate_quickjump_cache(); | 299: generate_quickjump_cache(); |
299: | 300: |
300: redirect('admin_groups.php', 'Group '.(($_POST['mode'] == 'edit') ? 'edited' : 'added').'. Redirecting …'); | 301: if ($_POST['mode'] == 'edit') |
| 302: redirect('admin_groups.php', $lang_admin_groups['Group edited redirect']); |
| 303: else |
| 304: redirect('admin_groups.php', $lang_admin_groups['Group added redirect']); |
301: } | 305: } |
302: | 306: |
303: | 307: |
325: | 329: |
326: generate_config_cache(); | 330: generate_config_cache(); |
327: | 331: |
328: redirect('admin_groups.php', 'Default group set. Redirecting …'); | 332: redirect('admin_groups.php', $lang_admin_groups['Default group redirect']); |
329: } | 333: } |
330: | 334: |
331: | 335: |
340: | 344: |
341: // Make sure we don't remove the default group | 345: // Make sure we don't remove the default group |
342: if ($group_id == $pun_config['o_default_user_group']) | 346: if ($group_id == $pun_config['o_default_user_group']) |
343: message('The default group cannot be removed. In order to delete this group, you must first setup a different group as the default.'); | 347: message($lang_admin_groups['Cannot remove default message']); |
344: | 348: |
345: // Check if this group has any members | 349: // Check if this group has any members |
346: $result = $db->query('SELECT g.g_title, COUNT(u.id) FROM '.$db->prefix.'groups AS g INNER JOIN '.$db->prefix.'users AS u ON g.g_id=u.group_id WHERE g.g_id='.$group_id.' GROUP BY g.g_id, g_title') or error('Unable to fetch group info', __FILE__, __LINE__, $db->error()); | 350: $result = $db->query('SELECT g.g_title, COUNT(u.id) FROM '.$db->prefix.'groups AS g INNER JOIN '.$db->prefix.'users AS u ON g.g_id=u.group_id WHERE g.g_id='.$group_id.' GROUP BY g.g_id, g_title') or error('Unable to fetch group info', __FILE__, __LINE__, $db->error()); |
366: | 370: |
367: generate_quickjump_cache(); | 371: generate_quickjump_cache(); |
368: | 372: |
369: redirect('admin_groups.php', 'Group removed. Redirecting …'); | 373: redirect('admin_groups.php', $lang_admin_groups['Group removed redirect']); |
370: } | 374: } |
371: else | 375: else |
372: { | 376: { |
373: $result = $db->query('SELECT g_title FROM '.$db->prefix.'groups WHERE g_id='.$group_id) or error('Unable to fetch group title', __FILE__, __LINE__, $db->error()); | 377: $result = $db->query('SELECT g_title FROM '.$db->prefix.'groups WHERE g_id='.$group_id) or error('Unable to fetch group title', __FILE__, __LINE__, $db->error()); |
374: $group_title = $db->result($result); | 378: $group_title = $db->result($result); |
375: | 379: |
376: $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / User groups'; | 380: $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['User groups']); |
| 381: define('PUN_ACTIVE_PAGE', 'admin'); |
377: require PUN_ROOT.'header.php'; | 382: require PUN_ROOT.'header.php'; |
378: | 383: |
379: generate_admin_menu('groups'); | 384: generate_admin_menu('groups'); |
380: | 385: |
381: ?> | 386: ?> |
382: <div class="blockform"> | 387: <div class="blockform"> |
383: <h2><span>Group delete</span></h2> | 388: <h2><span><?php echo $lang_admin_groups['Group delete head'] ?></span></h2> |
384: <div class="box"> | 389: <div class="box"> |
385: <form method="post" action="admin_groups.php?del_group=<?php echo $group_id ?>"> | 390: <form method="post" action="admin_groups.php?del_group=<?php echo $group_id ?>"> |
386: <div class="inform"> | 391: <div class="inform"> |
387: <input type="hidden" name="group_to_delete" value="<?php echo $group_id ?>" /> | 392: <input type="hidden" name="group_to_delete" value="<?php echo $group_id ?>" /> |
388: <fieldset> | 393: <fieldset> |
389: <legend>Confirm delete group</legend> | 394: <legend><?php echo $lang_admin_groups['Confirm delete subhead'] ?></legend> |
390: <div class="infldset"> | 395: <div class="infldset"> |
391: <p>Are you sure that you want to delete the group "<?php echo pun_htmlspecialchars($group_title) ?>"?</p> | 396: <p><?php printf($lang_admin_groups['Confirm delete info'], pun_htmlspecialchars($group_title)) ?></p> |
392: <p>WARNING! After you deleted a group you can not restore it.</p> | 397: <p class="warntext"><?php echo $lang_admin_groups['Confirm delete warn'] ?></p> |
393: </div> | 398: </div> |
394: </fieldset> | 399: </fieldset> |
395: </div> | 400: </div> |
396: <p><input type="submit" name="del_group_comply" value="Delete" /><a href="javascript:history.go(-1)">Go back</a></p> | 401: <p class="buttons"><input type="submit" name="del_group_comply" value="<?php echo $lang_admin_common['Delete'] ?>" /><a href="javascript:history.go(-1)"><?php echo $lang_admin_common['Go back'] ?></a></p> |
397: </form> | 402: </form> |
398: </div> | 403: </div> |
399: </div> | 404: </div> |
407: | 412: |
408: list($group_title, $group_members) = $db->fetch_row($result); | 413: list($group_title, $group_members) = $db->fetch_row($result); |
409: | 414: |
410: $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / User groups'; | 415: $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['User groups']); |
| 416: define('PUN_ACTIVE_PAGE', 'admin'); |
411: require PUN_ROOT.'header.php'; | 417: require PUN_ROOT.'header.php'; |
412: | 418: |
413: generate_admin_menu('groups'); | 419: generate_admin_menu('groups'); |
414: | 420: |
415: ?> | 421: ?> |
416: <div class="blockform"> | 422: <div class="blockform"> |
417: <h2><span>Remove group</span></h2> | 423: <h2><span><?php echo $lang_admin_groups['Delete group head'] ?></span></h2> |
418: <div class="box"> | 424: <div class="box"> |
419: <form id="groups" method="post" action="admin_groups.php?del_group=<?php echo $group_id ?>"> | 425: <form id="groups" method="post" action="admin_groups.php?del_group=<?php echo $group_id ?>"> |
420: <div class="inform"> | 426: <div class="inform"> |
421: <fieldset> | 427: <fieldset> |
422: <legend>Move users currently in group</legend> | 428: <legend><?php echo $lang_admin_groups['Move users subhead'] ?></legend> |
423: <div class="infldset"> | 429: <div class="infldset"> |
424: <p>The group "<?php echo pun_htmlspecialchars($group_title) ?>" currently has <?php echo $group_members ?> members. Please select a group to which these members will be assigned upon removal.</p> | 430: <p><?php printf($lang_admin_groups['Move users info'], pun_htmlspecialchars($group_title), forum_number_format($group_members)) ?></p> |
425: <label>Move users to | 431: <label><?php echo $lang_admin_groups['Move users label'] ?> |
426: <select name="move_to_group"> | 432: <select name="move_to_group"> |
427: <?php | 433: <?php |
428: | 434: |
438: | 444: |
439: ?> | 445: ?> |
440: </select> | 446: </select> |
441: </br></label> | 447: <br /></label> |
442: </div> | 448: </div> |
443: </fieldset> | 449: </fieldset> |
444: </div> | 450: </div> |
445: <p><input type="submit" name="del_group" value="Delete group" /></p> | 451: <p class="buttons"><input type="submit" name="del_group" value="<?php echo $lang_admin_groups['Delete group'] ?>" /><a href="javascript:history.go(-1)"><?php echo $lang_admin_common['Go back'] ?></a></p> |
446: </form> | 452: </form> |
447: </div> | 453: </div> |
448: </div> | 454: </div> |
454: } | 460: } |
455: | 461: |
456: | 462: |
457: $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / User groups'; | 463: $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['User groups']); |
| 464: define('PUN_ACTIVE_PAGE', 'admin'); |
458: require PUN_ROOT.'header.php'; | 465: require PUN_ROOT.'header.php'; |
459: | 466: |
460: generate_admin_menu('groups'); | 467: generate_admin_menu('groups'); |
461: | 468: |
462: ?> | 469: ?> |
463: <div class="blockform"> | 470: <div class="blockform"> |
464: <h2><span>Add/setup groups</span></h2> | 471: <h2><span><?php echo $lang_admin_groups['Add groups head'] ?></span></h2> |
465: <div class="box"> | 472: <div class="box"> |
466: <form id="groups" method="post" action="admin_groups.php?action=foo"> | 473: <form id="groups" method="post" action="admin_groups.php?action=foo"> |
467: <div class="inform"> | 474: <div class="inform"> |
468: <fieldset> | 475: <fieldset> |
469: <legend>Add new group</legend> | 476: <legend><?php echo $lang_admin_groups['Add group subhead'] ?></legend> |
470: <div class="infldset"> | 477: <div class="infldset"> |
471: <table class="aligntop" cellspacing="0"> | 478: <table class="aligntop" cellspacing="0"> |
472: <tr> | 479: <tr> |
473: <th scope="row">Base new group on<div><input type="submit" name="add_group" value=" Add " tabindex="2" /></div></th> | 480: <th scope="row"><?php echo $lang_admin_groups['New group label'] ?><div><input type="submit" name="add_group" value="<?php echo $lang_admin_common['Add'] ?>" tabindex="2" /></div></th> |
474: <td> | 481: <td> |
475: <select id="base_group" name="base_group" tabindex="1"> | 482: <select id="base_group" name="base_group" tabindex="1"> |
476: <?php | 483: <?php |
487: | 494: |
488: ?> | 495: ?> |
489: </select> | 496: </select> |
490: <span>Select a user group from which the new group will inherit its permission settings. The next page will let you fine-tune said settings.</span> | 497: <span><?php echo $lang_admin_groups['New group help'] ?></span> |
491: </td> | 498: </td> |
492: </tr> | 499: </tr> |
493: </table> | 500: </table> |
496: </div> | 503: </div> |
497: <div class="inform"> | 504: <div class="inform"> |
498: <fieldset> | 505: <fieldset> |
499: <legend>Set default group</legend> | 506: <legend><?php echo $lang_admin_groups['Default group subhead'] ?></legend> |
500: <div class="infldset"> | 507: <div class="infldset"> |
501: <table class="aligntop" cellspacing="0"> | 508: <table class="aligntop" cellspacing="0"> |
502: <tr> | 509: <tr> |
503: <th scope="row">Default group<div><input type="submit" name="set_default_group" value=" Save " tabindex="4" /></div></th> | 510: <th scope="row"><?php echo $lang_admin_groups['Default group label'] ?><div><input type="submit" name="set_default_group" value="<?php echo $lang_admin_common['Save'] ?>" tabindex="4" /></div></th> |
504: <td> | 511: <td> |
505: <select id="default_group" name="default_group" tabindex="3"> | 512: <select id="default_group" name="default_group" tabindex="3"> |
506: <?php | 513: <?php |
517: | 524: |
518: ?> | 525: ?> |
519: </select> | 526: </select> |
520: <span>This is the default user group, e.g. the group users are placed in when they register. For security reasons, users can't be placed in either the moderator or administrator user groups by default.</span> | 527: <span><?php echo $lang_admin_groups['Default group help'] ?></span> |
521: </td> | 528: </td> |
522: </tr> | 529: </tr> |
523: </table> | 530: </table> |
527: </form> | 534: </form> |
528: </div> | 535: </div> |
529: | 536: |
530: <h2 class="block2"><span>Existing groups</span></h2> | 537: <h2 class="block2"><span><?php echo $lang_admin_groups['Existing groups head'] ?></span></h2> |
531: <div class="box"> | 538: <div class="box"> |
532: <div class="fakeform"> | 539: <div class="fakeform"> |
533: <div class="inform"> | 540: <div class="inform"> |
534: <fieldset> | 541: <fieldset> |
535: <legend>Edit/remove groups</legend> | 542: <legend><?php echo $lang_admin_groups['Edit groups subhead'] ?></legend> |
536: <div class="infldset"> | 543: <div class="infldset"> |
537: <p>The pre-defined groups Guests, Administrators, Moderators and Members cannot be removed. They can however be edited. Please note though, that in some groups, some options are unavailable (e.g. the <em>edit posts</em> permission for guests). Administrators always have full permissions.</p> | 544: <p><?php echo $lang_admin_groups['Edit groups info'] ?></p> |
538: <table cellspacing="0"> | 545: <table cellspacing="0"> |
539: <?php | 546: <?php |
540: | 547: |
541: $result = $db->query('SELECT g_id, g_title FROM '.$db->prefix.'groups ORDER BY g_id') or error('Unable to fetch user group list', __FILE__, __LINE__, $db->error()); | 548: $result = $db->query('SELECT g_id, g_title FROM '.$db->prefix.'groups ORDER BY g_id') or error('Unable to fetch user group list', __FILE__, __LINE__, $db->error()); |
542: | 549: |
543: while ($cur_group = $db->fetch_assoc($result)) | 550: while ($cur_group = $db->fetch_assoc($result)) |
544: echo "\t\t\t\t\t\t\t\t".'<tr><th scope="row"><a href="admin_groups.php?edit_group='.$cur_group['g_id'].'">Edit</a>'.(($cur_group['g_id'] > PUN_MEMBER) ? ' - <a href="admin_groups.php?del_group='.$cur_group['g_id'].'">Remove</a>' : '').'</th><td>'.pun_htmlspecialchars($cur_group['g_title']).'</td></tr>'."\n"; | 551: echo "\t\t\t\t\t\t\t\t".'<tr><th scope="row"><a href="admin_groups.php?edit_group='.$cur_group['g_id'].'">'.$lang_admin_groups['Edit link'].'</a>'.(($cur_group['g_id'] > PUN_MEMBER) ? ' | <a href="admin_groups.php?del_group='.$cur_group['g_id'].'">'.$lang_admin_groups['Delete link'].'</a>' : '').'</th><td>'.pun_htmlspecialchars($cur_group['g_title']).'</td></tr>'."\n"; |
545: | 552: |
546: ?> | 553: ?> |
547: </table> | 554: </table> |
a/upload/admin_options.php |
b/upload/admin_options.php |
1: <?php | 1: <?php |
2: | 2: |
3: /*--- | 3: /** |
4: | 4: * Copyright (C) 2008-2010 FluxBB |
5: Copyright (C) 2008-2009 FluxBB.org | 5: * based on code by Rickard Andersson copyright (C) 2002-2008 PunBB |
6: based on code copyright (C) 2002-2005 Rickard Andersson | 6: * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
7: License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 7: */ |
8: | |
9: ---*/ | |
10: | 8: |
11: // Tell header.php to use the admin template | 9: // Tell header.php to use the admin template |
12: define('PUN_ADMIN_CONSOLE', 1); | 10: define('PUN_ADMIN_CONSOLE', 1); |
19: if ($pun_user['g_id'] != PUN_ADMIN) | 17: if ($pun_user['g_id'] != PUN_ADMIN) |
20: message($lang_common['No permission']); | 18: message($lang_common['No permission']); |
21: | 19: |
| 20: // Load the admin_options.php language file |
| 21: require PUN_ROOT.'lang/'.$admin_language.'/admin_options.php'; |
22: | 22: |
23: if (isset($_POST['form_sent'])) | 23: if (isset($_POST['form_sent'])) |
24: { | 24: { |
25: // Custom referrer check (so we can output a custom error message) | 25: // Custom referrer check (so we can output a custom error message) |
26: if (!preg_match('#^'.preg_quote(str_replace('www.', '', $pun_config['o_base_url']).'/admin_options.php', '#').'#i', str_replace('www.', '', (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '')))) | 26: if (!preg_match('#^'.preg_quote(str_replace('www.', '', $pun_config['o_base_url']).'/admin_options.php', '#').'#i', str_replace('www.', '', (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '')))) |
27: message('Bad HTTP_REFERER. If you have moved these forums from one location to another or switched domains, you need to update the Base URL manually in the database (look for o_base_url in the config table) and then clear the cache by deleting all .php files in the /cache directory.'); | 27: message($lang_admin_options['Bad HTTP Referer message']); |
28: | 28: |
29: $form = array_map('pun_trim', $_POST['form']); | 29: $form = array( |
| 30: 'board_title' => pun_trim($_POST['form']['board_title']), |
| 31: 'board_desc' => pun_trim($_POST['form']['board_desc']), |
| 32: 'base_url' => pun_trim($_POST['form']['base_url']), |
| 33: 'default_timezone' => floatval($_POST['form']['default_timezone']), |
| 34: 'default_dst' => $_POST['form']['default_dst'] != '1' ? '0' : '1', |
| 35: 'default_lang' => preg_replace('#[\.\\\/]#', '', pun_trim($_POST['form']['default_lang'])), |
| 36: 'default_style' => preg_replace('#[\.\\\/]#', '', pun_trim($_POST['form']['default_style'])), |
| 37: 'time_format' => pun_trim($_POST['form']['time_format']), |
| 38: 'date_format' => pun_trim($_POST['form']['date_format']), |
| 39: 'timeout_visit' => intval($_POST['form']['timeout_visit']), |
| 40: 'timeout_online' => intval($_POST['form']['timeout_online']), |
| 41: 'redirect_delay' => intval($_POST['form']['redirect_delay']), |
| 42: 'show_version' => $_POST['form']['show_version'] != '1' ? '0' : '1', |
| 43: 'show_user_info' => $_POST['form']['show_user_info'] != '1' ? '0' : '1', |
| 44: 'show_post_count' => $_POST['form']['show_post_count'] != '1' ? '0' : '1', |
| 45: 'smilies' => $_POST['form']['smilies'] != '1' ? '0' : '1', |
| 46: 'smilies_sig' => $_POST['form']['smilies_sig'] != '1' ? '0' : '1', |
| 47: 'make_links' => $_POST['form']['make_links'] != '1' ? '0' : '1', |
| 48: 'topic_review' => intval($_POST['form']['topic_review']), |
| 49: 'disp_topics_default' => intval($_POST['form']['disp_topics_default']), |
| 50: 'disp_posts_default' => intval($_POST['form']['disp_posts_default']), |
| 51: 'indent_num_spaces' => intval($_POST['form']['indent_num_spaces']), |
| 52: 'quote_depth' => intval($_POST['form']['quote_depth']), |
| 53: 'quickpost' => $_POST['form']['quickpost'] != '1' ? '0' : '1', |
| 54: 'users_online' => $_POST['form']['users_online'] != '1' ? '0' : '1', |
| 55: 'censoring' => $_POST['form']['censoring'] != '1' ? '0' : '1', |
| 56: 'signatures' => $_POST['form']['signatures'] != '1' ? '0' : '1', |
| 57: 'ranks' => $_POST['form']['ranks'] != '1' ? '0' : '1', |
| 58: 'show_dot' => $_POST['form']['show_dot'] != '1' ? '0' : '1', |
| 59: 'topic_views' => $_POST['form']['topic_views'] != '1' ? '0' : '1', |
| 60: 'quickjump' => $_POST['form']['quickjump'] != '1' ? '0' : '1', |
| 61: 'gzip' => $_POST['form']['gzip'] != '1' ? '0' : '1', |
| 62: 'search_all_forums' => $_POST['form']['search_all_forums'] != '1' ? '0' : '1', |
| 63: 'additional_navlinks' => pun_trim($_POST['form']['additional_navlinks']), |
| 64: 'feed_type' => intval($_POST['form']['feed_type']), |
| 65: 'report_method' => intval($_POST['form']['report_method']), |
| 66: 'mailing_list' => pun_trim($_POST['form']['mailing_list']), |
| 67: 'avatars' => $_POST['form']['avatars'] != '1' ? '0' : '1', |
| 68: 'avatars_dir' => pun_trim($_POST['form']['avatars_dir']), |
| 69: 'avatars_width' => intval($_POST['form']['avatars_width']), |
| 70: 'avatars_height' => intval($_POST['form']['avatars_height']), |
| 71: 'avatars_size' => intval($_POST['form']['avatars_size']), |
| 72: 'admin_email' => strtolower(pun_trim($_POST['form']['admin_email'])), |
| 73: 'webmaster_email' => strtolower(pun_trim($_POST['form']['webmaster_email'])), |
| 74: 'subscriptions' => $_POST['form']['subscriptions'] != '1' ? '0' : '1', |
| 75: 'smtp_host' => pun_trim($_POST['form']['smtp_host']), |
| 76: 'smtp_user' => pun_trim($_POST['form']['smtp_user']), |
| 77: 'smtp_pass' => pun_trim($_POST['form']['smtp_pass']), |
| 78: 'smtp_ssl' => $_POST['form']['smtp_ssl'] != '1' ? '0' : '1', |
| 79: 'regs_allow' => $_POST['form']['regs_allow'] != '1' ? '0' : '1', |
| 80: 'regs_verify' => $_POST['form']['regs_verify'] != '1' ? '0' : '1', |
| 81: 'regs_report' => $_POST['form']['regs_report'] != '1' ? '0' : '1', |
| 82: 'rules' => $_POST['form']['rules'] != '1' ? '0' : '1', |
| 83: 'rules_message' => pun_trim($_POST['form']['rules_message']), |
| 84: 'default_email_setting' => intval($_POST['form']['default_email_setting']), |
| 85: 'announcement' => $_POST['form']['announcement'] != '1' ? '0' : '1', |
| 86: 'announcement_message' => pun_trim($_POST['form']['announcement_message']), |
| 87: 'maintenance' => $_POST['form']['maintenance'] != '1' ? '0' : '1', |
| 88: 'maintenance_message' => pun_trim($_POST['form']['maintenance_message']), |
| 89: ); |
30: | 90: |
31: if ($form['board_title'] == '') | 91: if ($form['board_title'] == '') |
32: message('You must enter a board title.'); | 92: message($lang_admin_options['Must enter title message']); |
| 93: |
| 94: // Make sure base_url doesn't end with a slash |
| 95: if (substr($form['base_url'], -1) == '/') |
| 96: $form['base_url'] = substr($form['base_url'], 0, -1); |
| 97: |
| 98: if (!file_exists(PUN_ROOT.'lang/'.$form['default_lang'].'/common.php')) |
| 99: message($lang_common['Bad request']); |
| 100: if (!file_exists(PUN_ROOT.'style/'.$form['default_style'].'.css')) |
| 101: message($lang_common['Bad request']); |
| 102: |
| 103: if ($form['time_format'] == '') |
| 104: $form['time_format'] = 'H:i:s'; |
| 105: |
| 106: if ($form['date_format'] == '') |
| 107: $form['date_format'] = 'Y-m-d'; |
33: | 108: |
34: // Clean default_lang | |
35: $form['default_lang'] = preg_replace('#[\.\\\/]#', '', $form['default_lang']); | |
36: | 109: |
37: require PUN_ROOT.'include/email.php'; | 110: require PUN_ROOT.'include/email.php'; |
38: | 111: |
39: $form['admin_email'] = strtolower($form['admin_email']); | |
40: if (!is_valid_email($form['admin_email'])) | 112: if (!is_valid_email($form['admin_email'])) |
41: message('The admin email address you entered is invalid.'); | 113: message($lang_admin_options['Invalid e-mail message']); |
42: | 114: |
43: $form['webmaster_email'] = strtolower($form['webmaster_email']); | |
44: if (!is_valid_email($form['webmaster_email'])) | 115: if (!is_valid_email($form['webmaster_email'])) |
45: message('The webmaster email address you entered is invalid.'); | 116: message($lang_admin_options['Invalid webmaster e-mail message']); |
46: | 117: |
47: if ($form['mailing_list'] != '') | 118: if ($form['mailing_list'] != '') |
48: $form['mailing_list'] = strtolower(preg_replace('/[\s]/', '', $form['mailing_list'])); | 119: $form['mailing_list'] = strtolower(preg_replace('/\s/S', '', $form['mailing_list'])); |
49: | |
50: // Make sure base_url doesn't end with a slash | |
51: if (substr($form['base_url'], -1) == '/') | |
52: $form['base_url'] = substr($form['base_url'], 0, -1); | |
53: | |
54: // Clean avatars_dir | |
55: $form['avatars_dir'] = str_replace("\0", '', $form['avatars_dir']); | |
56: | 120: |
57: // Make sure avatars_dir doesn't end with a slash | 121: // Make sure avatars_dir doesn't end with a slash |
58: if (substr($form['avatars_dir'], -1) == '/') | 122: if (substr($form['avatars_dir'], -1) == '/') |
59: $form['avatars_dir'] = substr($form['avatars_dir'], 0, -1); | 123: $form['avatars_dir'] = substr($form['avatars_dir'], 0, -1); |
60: | 124: |
61: if ($form['additional_navlinks'] != '') | 125: if ($form['additional_navlinks'] != '') |
62: $form['additional_navlinks'] = trim(pun_linebreaks($form['additional_navlinks'])); | 126: $form['additional_navlinks'] = pun_trim(pun_linebreaks($form['additional_navlinks'])); |
63: | 127: |
64: if ($form['announcement_message'] != '') | 128: if ($form['announcement_message'] != '') |
65: $form['announcement_message'] = pun_linebreaks($form['announcement_message']); | 129: $form['announcement_message'] = pun_linebreaks($form['announcement_message']); |
66: else | 130: else |
67: { | 131: { |
68: $form['announcement_message'] = 'Enter your announcement here.'; | 132: $form['announcement_message'] = $lang_admin_options['Enter announcement here']; |
69: | 133: $form['announcement'] = '0'; |
70: if ($form['announcement'] == '1') | |
71: $form['announcement'] = '0'; | |
72: } | 134: } |
73: | 135: |
74: if ($form['rules_message'] != '') | 136: if ($form['rules_message'] != '') |
75: $form['rules_message'] = pun_linebreaks($form['rules_message']); | 137: $form['rules_message'] = pun_linebreaks($form['rules_message']); |
76: else | 138: else |
77: { | 139: { |
78: $form['rules_message'] = 'Enter your rules here.'; | 140: $form['rules_message'] = $lang_admin_options['Enter rules here']; |
79: | 141: $form['rules'] = '0'; |
80: if ($form['rules'] == '1') | |
81: $form['rules'] = '0'; | |
82: } | 142: } |
83: | 143: |
84: if ($form['maintenance_message'] != '') | 144: if ($form['maintenance_message'] != '') |
85: $form['maintenance_message'] = pun_linebreaks($form['maintenance_message']); | 145: $form['maintenance_message'] = pun_linebreaks($form['maintenance_message']); |
86: else | 146: else |
87: { | 147: { |
88: $form['maintenance_message'] = 'The forums are temporarily down for maintenance. Please try again in a few minutes.\n\n/Administrator'; | 148: $form['maintenance_message'] = $lang_admin_options['Default maintenance message']; |
89: | 149: $form['maintenance'] = '0'; |
90: if ($form['maintenance'] == '1') | |
91: $form['maintenance'] = '0'; | |
92: } | 150: } |
93: | 151: |
94: $form['timeout_visit'] = intval($form['timeout_visit']); | 152: // Make sure the number of displayed topics and posts is between 3 and 75 |
95: $form['timeout_online'] = intval($form['timeout_online']); | 153: if ($form['disp_topics_default'] < 3) |
96: $form['redirect_delay'] = intval($form['redirect_delay']); | 154: $form['disp_topics_default'] = 3; |
97: $form['topic_review'] = intval($form['topic_review']); | 155: else if ($form['disp_topics_default'] > 75) |
98: $form['disp_topics_default'] = intval($form['disp_topics_default']); | 156: $form['disp_topics_default'] = 75; |
99: $form['disp_posts_default'] = intval($form['disp_posts_default']); | 157: |
100: $form['indent_num_spaces'] = intval($form['indent_num_spaces']); | 158: if ($form['disp_posts_default'] < 3) |
101: $form['quote_depth'] = intval($form['quote_depth']); | 159: $form['disp_posts_default'] = 3; |
102: $form['avatars_width'] = intval($form['avatars_width']); | 160: else if ($form['disp_posts_default'] > 75) |
103: $form['avatars_height'] = intval($form['avatars_height']); | 161: $form['disp_posts_default'] = 75; |
104: $form['avatars_size'] = intval($form['avatars_size']); | 162: |
| 163: if ($form['feed_type'] < 0 || $form['feed_type'] > 2) |
| 164: message($lang_common['Bad request']); |
| 165: |
| 166: if ($form['report_method'] < 0 || $form['report_method'] > 2) |
| 167: message($lang_common['Bad request']); |
| 168: |
| 169: if ($form['default_email_setting'] < 0 || $form['default_email_setting'] > 2) |
| 170: message($lang_common['Bad request']); |
105: | 171: |
106: if ($form['timeout_online'] >= $form['timeout_visit']) | 172: if ($form['timeout_online'] >= $form['timeout_visit']) |
107: message('The value of "Timeout online" must be smaller than the value of "Timeout visit".'); | 173: message($lang_admin_options['Timeout error message']); |
108: | 174: |
109: while (list($key, $input) = @each($form)) | 175: foreach ($form as $key => $input) |
110: { | 176: { |
111: // Only update values that have changed | 177: // Only update values that have changed |
112: if (array_key_exists('o_'.$key, $pun_config) && $pun_config['o_'.$key] != $input) | 178: if (array_key_exists('o_'.$key, $pun_config) && $pun_config['o_'.$key] != $input) |
126: | 192: |
127: generate_config_cache(); | 193: generate_config_cache(); |
128: | 194: |
129: redirect('admin_options.php', 'Options updated. Redirecting …'); | 195: redirect('admin_options.php', $lang_admin_options['Options updated redirect']); |
130: } | 196: } |
131: | 197: |
132: | 198: $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Options']); |
133: $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Options'; | 199: define('PUN_ACTIVE_PAGE', 'admin'); |
134: $form_name = 'update_options'; | |
135: require PUN_ROOT.'header.php'; | 200: require PUN_ROOT.'header.php'; |
136: | 201: |
137: generate_admin_menu('options'); | 202: generate_admin_menu('options'); |
138: | 203: |
139: ?> | 204: ?> |
140: <div class="blockform"> | 205: <div class="blockform"> |
141: <h2><span>Options</span></h2> | 206: <h2><span><?php echo $lang_admin_options['Options head'] ?></span></h2> |
142: <div class="box"> | 207: <div class="box"> |
143: <form method="post" action="admin_options.php?action=foo"> | 208: <form method="post" action="admin_options.php?action=foo"> |
144: <p class="submittop"><input type="submit" name="save" value="Save changes" /></p> | 209: <p class="submittop"><input type="submit" name="save" value="<?php echo $lang_admin_common['Save changes'] ?>" /></p> |
145: <div class="inform"> | 210: <div class="inform"> |
146: <input type="hidden" name="form_sent" value="1" /> | 211: <input type="hidden" name="form_sent" value="1" /> |
147: <fieldset> | 212: <fieldset> |
148: <legend>Essentials</legend> | 213: <legend><?php echo $lang_admin_options['Essentials subhead'] ?></legend> |
149: <div class="infldset"> | 214: <div class="infldset"> |
150: <table class="aligntop" cellspacing="0"> | 215: <table class="aligntop" cellspacing="0"> |
151: <tr> | 216: <tr> |
152: <th scope="row">Board title</th> | 217: <th scope="row"><?php echo $lang_admin_options['Board title label'] ?></th> |
153: <td> | 218: <td> |
154: <input type="text" name="form[board_title]" size="50" maxlength="255" value="<?php echo pun_htmlspecialchars($pun_config['o_board_title']) ?>" /> | 219: <input type="text" name="form[board_title]" size="50" maxlength="255" value="<?php echo pun_htmlspecialchars($pun_config['o_board_title']) ?>" /> |
155: <span>The title of this bulletin board (shown at the top of every page). This field may <strong>not</strong> contain HTML.</span> | 220: <span><?php echo $lang_admin_options['Board title help'] ?></span> |
156: </td> | 221: </td> |
157: </tr> | 222: </tr> |
158: <tr> | 223: <tr> |
159: <th scope="row">Board description</th> | 224: <th scope="row"><?php echo $lang_admin_options['Board desc label'] ?></th> |
160: <td> | 225: <td> |
161: <input type="text" name="form[board_desc]" size="50" maxlength="255" value="<?php echo pun_htmlspecialchars($pun_config['o_board_desc']) ?>" /> | 226: <input type="text" name="form[board_desc]" size="50" maxlength="255" value="<?php echo pun_htmlspecialchars($pun_config['o_board_desc']) ?>" /> |
162: <span>A short description of this bulletin board (shown at the top of every page). This field may contain HTML.</span> | 227: <span><?php echo $lang_admin_options['Board desc help'] ?></span> |
163: </td> | 228: </td> |
164: </tr> | 229: </tr> |
165: <tr> | 230: <tr> |
166: <th scope="row">Base URL</th> | 231: <th scope="row"><?php echo $lang_admin_options['Base URL label'] ?></th> |
167: <td> | 232: <td> |
168: <input type="text" name="form[base_url]" size="50" maxlength="100" value="<?php echo $pun_config['o_base_url'] ?>" /> | 233: <input type="text" name="form[base_url]" size="50" maxlength="100" value="<?php echo $pun_config['o_base_url'] ?>" /> |
169: <span>The complete URL of the forum without trailing slash (i.e. http://www.mydomain.com/forums). This <strong>must</strong> be correct in order for all admin and moderator features to work. If you get "Bad referer" errors, it's probably incorrect.</span> | 234: <span><?php echo $lang_admin_options['Base URL help'] ?></span> |
170: </td> | 235: </td> |
171: </tr> | 236: </tr> |
172: <tr> | 237: <tr> |
173: <th scope="row">Default time zone</th> | 238: <th scope="row"><?php echo $lang_admin_options['Timezone label'] ?></th> |
174: <td> | 239: <td> |
175: <select name="form[default_timezone]"> | 240: <select name="form[default_timezone]"> |
176: <option value="-12"<?php if ($pun_config['o_default_timezone'] == -12 ) echo ' selected="selected"' ?>>-12</option> | 241: <option value="-12"<?php if ($pun_config['o_default_timezone'] == -12) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC-12:00'] ?></option> |
177: <option value="-11"<?php if ($pun_config['o_default_timezone'] == -11) echo ' selected="selected"' ?>>-11</option> | 242: <option value="-11"<?php if ($pun_config['o_default_timezone'] == -11) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC-11:00'] ?></option> |
178: <option value="-10"<?php if ($pun_config['o_default_timezone'] == -10) echo ' selected="selected"' ?>>-10</option> | 243: <option value="-10"<?php if ($pun_config['o_default_timezone'] == -10) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC-10:00'] ?></option> |
179: <option value="-9.5"<?php if ($pun_config['o_default_timezone'] == -9.5) echo ' selected="selected"' ?>>-09.5</option> | 244: <option value="-9.5"<?php if ($pun_config['o_default_timezone'] == -9.5) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC-09:30'] ?></option> |
180: <option value="-9"<?php if ($pun_config['o_default_timezone'] == -9 ) echo ' selected="selected"' ?>>-09</option> | 245: <option value="-9"<?php if ($pun_config['o_default_timezone'] == -9) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC-09:00'] ?></option> |
181: <option value="-8.5"<?php if ($pun_config['o_default_timezone'] == -8.5) echo ' selected="selected"' ?>>-08.5</option> | 246: <option value="-8.5"<?php if ($pun_config['o_default_timezone'] == -8.5) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC-08:30'] ?></option> |
182: <option value="-8"<?php if ($pun_config['o_default_timezone'] == -8 ) echo ' selected="selected"' ?>>-08 PST</option> | 247: <option value="-8"<?php if ($pun_config['o_default_timezone'] == -8) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC-08:00'] ?></option> |
183: <option value="-7"<?php if ($pun_config['o_default_timezone'] == -7 ) echo ' selected="selected"' ?>>-07 MST</option> | 248: <option value="-7"<?php if ($pun_config['o_default_timezone'] == -7) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC-07:00'] ?></option> |
184: <option value="-6"<?php if ($pun_config['o_default_timezone'] == -6 ) echo ' selected="selected"' ?>>-06 CST</option> | 249: <option value="-6"<?php if ($pun_config['o_default_timezone'] == -6) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC-06:00'] ?></option> |
185: <option value="-5"<?php if ($pun_config['o_default_timezone'] == -5 ) echo ' selected="selected"' ?>>-05 EST</option> | 250: <option value="-5"<?php if ($pun_config['o_default_timezone'] == -5) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC-05:00'] ?></option> |
186: <option value="-4"<?php if ($pun_config['o_default_timezone'] == -4 ) echo ' selected="selected"' ?>>-04 AST</option> | 251: <option value="-4"<?php if ($pun_config['o_default_timezone'] == -4) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC-04:00'] ?></option> |
187: <option value="-3.5"<?php if ($pun_config['o_default_timezone'] == -3.5) echo ' selected="selected"' ?>>-03.5</option> | 252: <option value="-3.5"<?php if ($pun_config['o_default_timezone'] == -3.5) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC-03:30'] ?></option> |
188: <option value="-3"<?php if ($pun_config['o_default_timezone'] == -3 ) echo ' selected="selected"' ?>>-03 ADT</option> | 253: <option value="-3"<?php if ($pun_config['o_default_timezone'] == -3) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC-03:00'] ?></option> |
189: <option value="-2"<?php if ($pun_config['o_default_timezone'] == -2 ) echo ' selected="selected"' ?>>-02</option> | 254: <option value="-2"<?php if ($pun_config['o_default_timezone'] == -2) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC-02:00'] ?></option> |
190: <option value="-1"<?php if ($pun_config['o_default_timezone'] == -1) echo ' selected="selected"' ?>>-01</option> | 255: <option value="-1"<?php if ($pun_config['o_default_timezone'] == -1) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC-01:00'] ?></option> |
191: <option value="0"<?php if ($pun_config['o_default_timezone'] == 0) echo ' selected="selected"' ?>>00 GMT</option> | 256: <option value="0"<?php if ($pun_config['o_default_timezone'] == 0) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC'] ?></option> |
192: <option value="1"<?php if ($pun_config['o_default_timezone'] == 1) echo ' selected="selected"' ?>>+01 CET</option> | 257: <option value="1"<?php if ($pun_config['o_default_timezone'] == 1) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC+01:00'] ?></option> |
193: <option value="2"<?php if ($pun_config['o_default_timezone'] == 2 ) echo ' selected="selected"' ?>>+02</option> | 258: <option value="2"<?php if ($pun_config['o_default_timezone'] == 2) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC+02:00'] ?></option> |
194: <option value="3"<?php if ($pun_config['o_default_timezone'] == 3 ) echo ' selected="selected"' ?>>+03</option> | 259: <option value="3"<?php if ($pun_config['o_default_timezone'] == 3) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC+03:00'] ?></option> |
195: <option value="3.5"<?php if ($pun_config['o_default_timezone'] == 3.5) echo ' selected="selected"' ?>>+03.5</option> | 260: <option value="3.5"<?php if ($pun_config['o_default_timezone'] == 3.5) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC+03:30'] ?></option> |
196: <option value="4"<?php if ($pun_config['o_default_timezone'] == 4 ) echo ' selected="selected"' ?>>+04</option> | 261: <option value="4"<?php if ($pun_config['o_default_timezone'] == 4) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC+04:00'] ?></option> |
197: <option value="4.5"<?php if ($pun_config['o_default_timezone'] == 4.5) echo ' selected="selected"' ?>>+04.5</option> | 262: <option value="4.5"<?php if ($pun_config['o_default_timezone'] == 4.5) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC+04:30'] ?></option> |
198: <option value="5"<?php if ($pun_config['o_default_timezone'] == 5 ) echo ' selected="selected"' ?>>+05</option> | 263: <option value="5"<?php if ($pun_config['o_default_timezone'] == 5) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC+05:00'] ?></option> |
199: <option value="5.5"<?php if ($pun_config['o_default_timezone'] == 5.5) echo ' selected="selected"' ?>>+05.5</option> | 264: <option value="5.5"<?php if ($pun_config['o_default_timezone'] == 5.5) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC+05:30'] ?></option> |
200: <option value="6"<?php if ($pun_config['o_default_timezone'] == 6 ) echo ' selected="selected"' ?>>+06</option> | 265: <option value="5.75"<?php if ($pun_config['o_default_timezone'] == 5.75) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC+05:45'] ?></option> |
201: <option value="6.5"<?php if ($pun_config['o_default_timezone'] == 6.5) echo ' selected="selected"' ?>>+06.5</option> | 266: <option value="6"<?php if ($pun_config['o_default_timezone'] == 6) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC+06:00'] ?></option> |
202: <option value="7"<?php if ($pun_config['o_default_timezone'] == 7 ) echo ' selected="selected"' ?>>+07</option> | 267: <option value="6.5"<?php if ($pun_config['o_default_timezone'] == 6.5) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC+06:30'] ?></option> |
203: <option value="8"<?php if ($pun_config['o_default_timezone'] == 8 ) echo ' selected="selected"' ?>>+08</option> | 268: <option value="7"<?php if ($pun_config['o_default_timezone'] == 7) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC+07:00'] ?></option> |
204: <option value="9"<?php if ($pun_config['o_default_timezone'] == 9 ) echo ' selected="selected"' ?>>+09</option> | 269: <option value="8"<?php if ($pun_config['o_default_timezone'] == 8) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC+08:00'] ?></option> |
205: <option value="9.5"<?php if ($pun_config['o_default_timezone'] == 9.5) echo ' selected="selected"' ?>>+09.5</option> | 270: <option value="8.75"<?php if ($pun_config['o_default_timezone'] == 8.75) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC+08:45'] ?></option> |
206: <option value="10"<?php if ($pun_config['o_default_timezone'] == 10) echo ' selected="selected"' ?>>+10</option> | 271: <option value="9"<?php if ($pun_config['o_default_timezone'] == 9) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC+09:00'] ?></option> |
207: <option value="10.5"<?php if ($pun_config['o_default_timezone'] == 10.5) echo ' selected="selected"' ?>>+10.5</option> | 272: <option value="9.5"<?php if ($pun_config['o_default_timezone'] == 9.5) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC+09:30'] ?></option> |
208: <option value="11"<?php if ($pun_config['o_default_timezone'] == 11) echo ' selected="selected"' ?>>+11</option> | 273: <option value="10"<?php if ($pun_config['o_default_timezone'] == 10) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC+10:00'] ?></option> |
209: <option value="11.5"<?php if ($pun_config['o_default_timezone'] == 11.5) echo ' selected="selected"' ?>>+11.5</option> | 274: <option value="10.5"<?php if ($pun_config['o_default_timezone'] == 10.5) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC+10:30'] ?></option> |
210: <option value="12"<?php if ($pun_config['o_default_timezone'] == 12 ) echo ' selected="selected"' ?>>+12</option> | 275: <option value="11"<?php if ($pun_config['o_default_timezone'] == 11) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC+11:00'] ?></option> |
211: <option value="13"<?php if ($pun_config['o_default_timezone'] == 13 ) echo ' selected="selected"' ?>>+13</option> | 276: <option value="11.5"<?php if ($pun_config['o_default_timezone'] == 11.5) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC+11:30'] ?></option> |
| 277: <option value="12"<?php if ($pun_config['o_default_timezone'] == 12) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC+12:00'] ?></option> |
| 278: <option value="12.75"<?php if ($pun_config['o_default_timezone'] == 12.75) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC+12:45'] ?></option> |
| 279: <option value="13"<?php if ($pun_config['o_default_timezone'] == 13) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC+13:00'] ?></option> |
| 280: <option value="14"<?php if ($pun_config['o_default_timezone'] == 14) echo ' selected="selected"' ?>><?php echo $lang_admin_options['UTC+14:00'] ?></option> |
212: </select> | 281: </select> |
213: <span>The default time zone for guests and users attempting to register for the board.</span> | 282: <span><?php echo $lang_admin_options['Timezone help'] ?></span> |
214: </td> | 283: </td> |
215: </tr> | 284: </tr> |
216: <tr> | 285: <tr> |
217: <th scope="row">Adjust for DST</th> | 286: <th scope="row"><?php echo $lang_admin_options['DST label'] ?></th> |
218: <td> | 287: <td> |
219: <input type="radio" name="form[default_dst]" value="1"<?php if ($pun_config['o_default_dst'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[default_dst]" value="0"<?php if ($pun_config['o_default_dst'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 288: <input type="radio" name="form[default_dst]" value="1"<?php if ($pun_config['o_default_dst'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[default_dst]" value="0"<?php if ($pun_config['o_default_dst'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
220: <span>Check if daylight savings is in effect (advances times by 1 hour).</span> | 289: <span><?php echo $lang_admin_options['DST help'] ?></span> |
221: </td> | 290: </td> |
222: </tr> | 291: </tr> |
223: <tr> | 292: <tr> |
224: <th scope="row">Default language</th> | 293: <th scope="row"><?php echo $lang_admin_options['Language label'] ?></th> |
225: <td> | 294: <td> |
226: <select name="form[default_lang]"> | 295: <select name="form[default_lang]"> |
227: <?php | 296: <?php |
230: $d = dir(PUN_ROOT.'lang'); | 299: $d = dir(PUN_ROOT.'lang'); |
231: while (($entry = $d->read()) !== false) | 300: while (($entry = $d->read()) !== false) |
232: { | 301: { |
233: if ($entry != '.' && $entry != '..' && is_dir(PUN_ROOT.'lang/'.$entry) && file_exists(PUN_ROOT.'lang/'.$entry.'/common.php')) | 302: if ($entry{0} != '.' && is_dir(PUN_ROOT.'lang/'.$entry) && file_exists(PUN_ROOT.'lang/'.$entry.'/common.php')) |
234: $languages[] = $entry; | 303: $languages[] = $entry; |
235: } | 304: } |
236: $d->close(); | 305: $d->close(); |
237: | 306: |
238: @natsort($languages); | 307: @natsort($languages); |
239: | 308: |
240: while (list(, $temp) = @each($languages)) | 309: foreach ($languages as $temp) |
241: { | 310: { |
242: if ($pun_config['o_default_lang'] == $temp) | 311: if ($pun_config['o_default_lang'] == $temp) |
243: echo "\t\t\t\t\t\t\t\t\t\t\t".'<option value="'.$temp.'" selected="selected">'.$temp.'</option>'."\n"; | 312: echo "\t\t\t\t\t\t\t\t\t\t\t".'<option value="'.$temp.'" selected="selected">'.$temp.'</option>'."\n"; |
247: | 316: |
248: ?> | 317: ?> |
249: </select> | 318: </select> |
250: <span>This is the default language style used if the visitor is a guest or a user that hasn't changed from the default in his/her profile. If you remove a language pack, this must be updated.</span> | 319: <span><?php echo $lang_admin_options['Language help'] ?></span> |
251: </td> | 320: </td> |
252: </tr> | 321: </tr> |
253: <tr> | 322: <tr> |
254: <th scope="row">Default style</th> | 323: <th scope="row"><?php echo $lang_admin_options['Default style label'] ?></th> |
255: <td> | 324: <td> |
256: <select name="form[default_style]"> | 325: <select name="form[default_style]"> |
257: <?php | 326: <?php |
267: | 336: |
268: @natsort($styles); | 337: @natsort($styles); |
269: | 338: |
270: while (list(, $temp) = @each($styles)) | 339: foreach ($styles as $temp) |
271: { | 340: { |
272: if ($pun_config['o_default_style'] == $temp) | 341: if ($pun_config['o_default_style'] == $temp) |
273: echo "\t\t\t\t\t\t\t\t\t".'<option value="'.$temp.'" selected="selected">'.str_replace('_', ' ', $temp).'</option>'."\n"; | 342: echo "\t\t\t\t\t\t\t\t\t\t\t".'<option value="'.$temp.'" selected="selected">'.str_replace('_', ' ', $temp).'</option>'."\n"; |
274: else | 343: else |
275: echo "\t\t\t\t\t\t\t\t\t".'<option value="'.$temp.'">'.str_replace('_', ' ', $temp).'</option>'."\n"; | 344: echo "\t\t\t\t\t\t\t\t\t\t\t".'<option value="'.$temp.'">'.str_replace('_', ' ', $temp).'</option>'."\n"; |
276: } | 345: } |
277: | 346: |
278: ?> | 347: ?> |
279: </select> | 348: </select> |
280: <span>This is the default style used for guests and users who haven't changed from the default in their profile.</span></td> | 349: <span><?php echo $lang_admin_options['Default style help'] ?></span> |
| 350: </td> |
281: </tr> | 351: </tr> |
282: </table> | 352: </table> |
283: </div> | 353: </div> |
285: </div> | 355: </div> |
286: <div class="inform"> | 356: <div class="inform"> |
287: <fieldset> | 357: <fieldset> |
288: <legend>Time and timeouts</legend> | 358: <legend><?php echo $lang_admin_options['Timeouts subhead'] ?></legend> |
289: <div class="infldset"> | 359: <div class="infldset"> |
290: <table class="aligntop" cellspacing="0"> | 360: <table class="aligntop" cellspacing="0"> |
291: <tr> | 361: <tr> |
292: <th scope="row">Time format</th> | 362: <th scope="row"><?php echo $lang_admin_options['Time format label'] ?></th> |
293: <td> | 363: <td> |
294: <input type="text" name="form[time_format]" size="25" maxlength="25" value="<?php echo pun_htmlspecialchars($pun_config['o_time_format']) ?>" /> | 364: <input type="text" name="form[time_format]" size="25" maxlength="25" value="<?php echo pun_htmlspecialchars($pun_config['o_time_format']) ?>" /> |
295: <span>[Current format: <?php echo date($pun_config['o_time_format']) ?>] See <a href="http://www.php.net/manual/en/function.date.php">here</a> for formatting options.</span> | 365: <span><?php printf($lang_admin_options['Time format help'], date($pun_config['o_time_format']), '<a href="http://www.php.net/manual/en/function.date.php">'.$lang_admin_options['PHP manual'].'</a>') ?></span> |
296: </td> | 366: </td> |
297: </tr> | 367: </tr> |
298: <tr> | 368: <tr> |
299: <th scope="row">Date format</th> | 369: <th scope="row"><?php echo $lang_admin_options['Date format label'] ?></th> |
300: <td> | 370: <td> |
301: <input type="text" name="form[date_format]" size="25" maxlength="25" value="<?php echo pun_htmlspecialchars($pun_config['o_date_format']) ?>" /> | 371: <input type="text" name="form[date_format]" size="25" maxlength="25" value="<?php echo pun_htmlspecialchars($pun_config['o_date_format']) ?>" /> |
302: <span>[Current format: <?php echo date($pun_config['o_date_format']) ?>] See <a href="http://www.php.net/manual/en/function.date.php">here</a> for formatting options.</span> | 372: <span><?php printf($lang_admin_options['Date format help'], date($pun_config['o_date_format']), '<a href="http://www.php.net/manual/en/function.date.php">'.$lang_admin_options['PHP manual'].'</a>') ?></span> |
303: </td> | 373: </td> |
304: </tr> | 374: </tr> |
305: <tr> | 375: <tr> |
306: <th scope="row">Visit timeout</th> | 376: <th scope="row"><?php echo $lang_admin_options['Visit timeout label'] ?></th> |
307: <td> | 377: <td> |
308: <input type="text" name="form[timeout_visit]" size="5" maxlength="5" value="<?php echo $pun_config['o_timeout_visit'] ?>" /> | 378: <input type="text" name="form[timeout_visit]" size="5" maxlength="5" value="<?php echo $pun_config['o_timeout_visit'] ?>" /> |
309: <span>Number of seconds a user must be idle before his/hers last visit data is updated (primarily affects new message indicators).</span> | 379: <span><?php echo $lang_admin_options['Visit timeout help'] ?></span> |
310: </td> | 380: </td> |
311: </tr> | 381: </tr> |
312: <tr> | 382: <tr> |
313: <th scope="row">Online timeout</th> | 383: <th scope="row"><?php echo $lang_admin_options['Online timeout label'] ?></th> |
314: <td> | 384: <td> |
315: <input type="text" name="form[timeout_online]" size="5" maxlength="5" value="<?php echo $pun_config['o_timeout_online'] ?>" /> | 385: <input type="text" name="form[timeout_online]" size="5" maxlength="5" value="<?php echo $pun_config['o_timeout_online'] ?>" /> |
316: <span>Number of seconds a user must be idle before being removed from the online users list.</span> | 386: <span><?php echo $lang_admin_options['Online timeout help'] ?></span> |
317: </td> | 387: </td> |
318: </tr> | 388: </tr> |
319: <tr> | 389: <tr> |
320: <th scope="row">Redirect time</th> | 390: <th scope="row"><?php echo $lang_admin_options['Redirect time label'] ?></th> |
321: <td> | 391: <td> |
322: <input type="text" name="form[redirect_delay]" size="3" maxlength="3" value="<?php echo $pun_config['o_redirect_delay'] ?>" /> | 392: <input type="text" name="form[redirect_delay]" size="3" maxlength="3" value="<?php echo $pun_config['o_redirect_delay'] ?>" /> |
323: <span>Number of seconds to wait when redirecting. If set to 0, no redirect page will be displayed (not recommended).</span> | 393: <span><?php echo $lang_admin_options['Redirect time help'] ?></span> |
324: </td> | 394: </td> |
325: </tr> | 395: </tr> |
326: </table> | 396: </table> |
329: </div> | 399: </div> |
330: <div class="inform"> | 400: <div class="inform"> |
331: <fieldset> | 401: <fieldset> |
332: <legend>Display</legend> | 402: <legend><?php echo $lang_admin_options['Display subhead'] ?></legend> |
333: <div class="infldset"> | 403: <div class="infldset"> |
334: <table class="aligntop" cellspacing="0"> | 404: <table class="aligntop" cellspacing="0"> |
335: <tr> | 405: <tr> |
336: <th scope="row">Version number</th> | 406: <th scope="row"><?php echo $lang_admin_options['Version number label'] ?></th> |
337: <td> | 407: <td> |
338: <input type="radio" name="form[show_version]" value="1"<?php if ($pun_config['o_show_version'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[show_version]" value="0"<?php if ($pun_config['o_show_version'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 408: <input type="radio" name="form[show_version]" value="1"<?php if ($pun_config['o_show_version'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[show_version]" value="0"<?php if ($pun_config['o_show_version'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
339: <span>Show version number in footer.</span> | 409: <span><?php echo $lang_admin_options['Version number help'] ?></span> |
340: </td> | 410: </td> |
341: </tr> | 411: </tr> |
342: <tr> | 412: <tr> |
343: <th scope="row">User info in posts</th> | 413: <th scope="row"><?php echo $lang_admin_options['Info in posts label'] ?></th> |
344: <td> | 414: <td> |
345: <input type="radio" name="form[show_user_info]" value="1"<?php if ($pun_config['o_show_user_info'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[show_user_info]" value="0"<?php if ($pun_config['o_show_user_info'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 415: <input type="radio" name="form[show_user_info]" value="1"<?php if ($pun_config['o_show_user_info'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[show_user_info]" value="0"<?php if ($pun_config['o_show_user_info'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
346: <span>Show information about the poster under the username in topic view. The information affected is location, register date, post count and the contact links (email and URL).</span> | 416: <span><?php echo $lang_admin_options['Info in posts help'] ?></span> |
347: </td> | 417: </td> |
348: </tr> | 418: </tr> |
349: <tr> | 419: <tr> |
350: <th scope="row">User post count</th> | 420: <th scope="row"><?php echo $lang_admin_options['Post count label'] ?></th> |
351: <td> | 421: <td> |
352: <input type="radio" name="form[show_post_count]" value="1"<?php if ($pun_config['o_show_post_count'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[show_post_count]" value="0"<?php if ($pun_config['o_show_post_count'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 422: <input type="radio" name="form[show_post_count]" value="1"<?php if ($pun_config['o_show_post_count'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[show_post_count]" value="0"<?php if ($pun_config['o_show_post_count'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
353: <span>Show the number of posts a user has made (affects topic view, profile and user list).</span> | 423: <span><?php echo $lang_admin_options['Post count help'] ?></span> |
354: </td> | 424: </td> |
355: </tr> | 425: </tr> |
356: <tr> | 426: <tr> |
357: <th scope="row">Smilies</th> | 427: <th scope="row"><?php echo $lang_admin_options['Smilies label'] ?></th> |
358: <td> | 428: <td> |
359: <input type="radio" name="form[smilies]" value="1"<?php if ($pun_config['o_smilies'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[smilies]" value="0"<?php if ($pun_config['o_smilies'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 429: <input type="radio" name="form[smilies]" value="1"<?php if ($pun_config['o_smilies'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[smilies]" value="0"<?php if ($pun_config['o_smilies'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
360: <span>Convert smilies to small icons.</span> | 430: <span><?php echo $lang_admin_options['Smilies help'] ?></span> |
361: </td> | 431: </td> |
362: </tr> | 432: </tr> |
363: <tr> | 433: <tr> |
364: <th scope="row">Smilies in signatures</th> | 434: <th scope="row"><?php echo $lang_admin_options['Smilies sigs label'] ?></th> |
365: <td> | 435: <td> |
366: <input type="radio" name="form[smilies_sig]" value="1"<?php if ($pun_config['o_smilies_sig'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[smilies_sig]" value="0"<?php if ($pun_config['o_smilies_sig'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 436: <input type="radio" name="form[smilies_sig]" value="1"<?php if ($pun_config['o_smilies_sig'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[smilies_sig]" value="0"<?php if ($pun_config['o_smilies_sig'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
367: <span>Convert smilies to small icons in user signatures.</span> | 437: <span><?php echo $lang_admin_options['Smilies sigs help'] ?></span> |
368: </td> | 438: </td> |
369: </tr> | 439: </tr> |
370: <tr> | 440: <tr> |
371: <th scope="row">Make clickable links</th> | 441: <th scope="row"><?php echo $lang_admin_options['Clickable links label'] ?></th> |
372: <td> | 442: <td> |
373: <input type="radio" name="form[make_links]" value="1"<?php if ($pun_config['o_make_links'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[make_links]" value="0"<?php if ($pun_config['o_make_links'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 443: <input type="radio" name="form[make_links]" value="1"<?php if ($pun_config['o_make_links'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[make_links]" value="0"<?php if ($pun_config['o_make_links'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
374: <span>When enabled, FluxBB will automatically detect any URLs in posts and make them clickable hyperlinks.</span> | 444: <span><?php echo $lang_admin_options['Clickable links help'] ?></span> |
375: </td> | 445: </td> |
376: </tr> | 446: </tr> |
377: <tr> | 447: <tr> |
378: <th scope="row">Topic review</th> | 448: <th scope="row"><?php echo $lang_admin_options['Topic review label'] ?></th> |
379: <td> | 449: <td> |
380: <input type="text" name="form[topic_review]" size="3" maxlength="3" value="<?php echo $pun_config['o_topic_review'] ?>" /> | 450: <input type="text" name="form[topic_review]" size="3" maxlength="3" value="<?php echo $pun_config['o_topic_review'] ?>" /> |
381: <span>Maximum number of posts to display when posting (newest first). 0 to disable.</span> | 451: <span><?php echo $lang_admin_options['Topic review help'] ?></span> |
382: </td> | 452: </td> |
383: </tr> | 453: </tr> |
384: <tr> | 454: <tr> |
385: <th scope="row">Topics per page default</th> | 455: <th scope="row"><?php echo $lang_admin_options['Topics per page label'] ?></th> |
386: <td> | 456: <td> |
387: <input type="text" name="form[disp_topics_default]" size="3" maxlength="3" value="<?php echo $pun_config['o_disp_topics_default'] ?>" /> | 457: <input type="text" name="form[disp_topics_default]" size="3" maxlength="3" value="<?php echo $pun_config['o_disp_topics_default'] ?>" /> |
388: <span>The default number of topics to display per page in a forum. Users can personalize this setting.</span> | 458: <span><?php echo $lang_admin_options['Topics per page help'] ?></span> |
389: </td> | 459: </td> |
390: </tr> | 460: </tr> |
391: <tr> | 461: <tr> |
392: <th scope="row">Posts per page default</th> | 462: <th scope="row"><?php echo $lang_admin_options['Posts per page label'] ?></th> |
393: <td> | 463: <td> |
394: <input type="text" name="form[disp_posts_default]" size="3" maxlength="3" value="<?php echo $pun_config['o_disp_posts_default'] ?>" /> | 464: <input type="text" name="form[disp_posts_default]" size="3" maxlength="3" value="<?php echo $pun_config['o_disp_posts_default'] ?>" /> |
395: <span>The default number of posts to display per page in a topic. Users can personalize this setting.</span> | 465: <span><?php echo $lang_admin_options['Posts per page help'] ?></span> |
396: </td> | 466: </td> |
397: </tr> | 467: </tr> |
398: <tr> | 468: <tr> |
399: <th scope="row">Indent size</th> | 469: <th scope="row"><?php echo $lang_admin_options['Indent label'] ?></th> |
400: <td> | 470: <td> |
401: <input type="text" name="form[indent_num_spaces]" size="3" maxlength="3" value="<?php echo $pun_config['o_indent_num_spaces'] ?>" /> | 471: <input type="text" name="form[indent_num_spaces]" size="3" maxlength="3" value="<?php echo $pun_config['o_indent_num_spaces'] ?>" /> |
402: <span>If set to 8, a regular tab will be used when displaying text within the [code][/code] tag. Otherwise this many spaces will be used to indent the text.</span> | 472: <span><?php echo $lang_admin_options['Indent help'] ?></span> |
403: </td> | 473: </td> |
404: </tr> | 474: </tr> |
405: <tr> | 475: <tr> |
406: <th scope="row">Maximum [quote] depth</th> | 476: <th scope="row"><?php echo $lang_admin_options['Quote depth label'] ?></th> |
407: <td> | 477: <td> |
408: <input type="text" name="form[quote_depth]" size="3" maxlength="3" value="<?php echo $pun_config['o_quote_depth'] ?>" /> | 478: <input type="text" name="form[quote_depth]" size="3" maxlength="3" value="<?php echo $pun_config['o_quote_depth'] ?>" /> |
409: <span>The maximum times a [quote] tag can go inside other [quote] tags, any tags deeper than this will be discarded.</span> | 479: <span><?php echo $lang_admin_options['Quote depth help'] ?></span> |
410: </td> | 480: </td> |
411: </tr> | 481: </tr> |
412: </table> | 482: </table> |
415: </div> | 485: </div> |
416: <div class="inform"> | 486: <div class="inform"> |
417: <fieldset> | 487: <fieldset> |
418: <legend>Features</legend> | 488: <legend><?php echo $lang_admin_options['Features subhead'] ?></legend> |
419: <div class="infldset"> | 489: <div class="infldset"> |
420: <table class="aligntop" cellspacing="0"> | 490: <table class="aligntop" cellspacing="0"> |
421: <tr> | 491: <tr> |
422: <th scope="row">Quick post</th> | 492: <th scope="row"><?php echo $lang_admin_options['Quick post label'] ?></th> |
423: <td> | 493: <td> |
424: <input type="radio" name="form[quickpost]" value="1"<?php if ($pun_config['o_quickpost'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[quickpost]" value="0"<?php if ($pun_config['o_quickpost'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 494: <input type="radio" name="form[quickpost]" value="1"<?php if ($pun_config['o_quickpost'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[quickpost]" value="0"<?php if ($pun_config['o_quickpost'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
425: <span>When enabled, FluxBB will add a quick post form at the bottom of topics. This way users can post directly from the topic view.</span> | 495: <span><?php echo $lang_admin_options['Quick post help'] ?></span> |
426: </td> | 496: </td> |
427: </tr> | 497: </tr> |
428: <tr> | 498: <tr> |
429: <th scope="row">Users online</th> | 499: <th scope="row"><?php echo $lang_admin_options['Users online label'] ?></th> |
430: <td> | 500: <td> |
431: <input type="radio" name="form[users_online]" value="1"<?php if ($pun_config['o_users_online'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[users_online]" value="0"<?php if ($pun_config['o_users_online'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 501: <input type="radio" name="form[users_online]" value="1"<?php if ($pun_config['o_users_online'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[users_online]" value="0"<?php if ($pun_config['o_users_online'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
432: <span>Display info on the index page about guests and registered users currently browsing the forums.</span> | 502: <span><?php echo $lang_admin_options['Users online help'] ?></span> |
433: </td> | 503: </td> |
434: </tr> | 504: </tr> |
435: <tr> | 505: <tr> |
436: <th scope="row"><a name="censoring">Censor words</a></th> | 506: <th scope="row"><a name="censoring"><?php echo $lang_admin_options['Censor words label'] ?></a></th> |
437: <td> | 507: <td> |
438: <input type="radio" name="form[censoring]" value="1"<?php if ($pun_config['o_censoring'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[censoring]" value="0"<?php if ($pun_config['o_censoring'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 508: <input type="radio" name="form[censoring]" value="1"<?php if ($pun_config['o_censoring'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[censoring]" value="0"<?php if ($pun_config['o_censoring'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
439: <span>Enable this to censor specific words in the forum. See <a href="admin_censoring.php">Censoring</a> for more info.</span> | 509: <span><?php printf($lang_admin_options['Censor words help'], '<a href="admin_censoring.php">'.$lang_admin_common['Censoring'].'</a>') ?></span> |
440: </td> | 510: </td> |
441: </tr> | 511: </tr> |
442: <tr> | 512: <tr> |
443: <th scope="row"><a name="signatures">Signatures</a></th> | 513: <th scope="row"><a name="signatures"><?php echo $lang_admin_options['Signatures label'] ?></a></th> |
444: <td> | 514: <td> |
445: <input type="radio" name="form[signatures]" value="1"<?php if ($pun_config['o_signatures'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[signatures]" value="0"<?php if ($pun_config['o_signatures'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 515: <input type="radio" name="form[signatures]" value="1"<?php if ($pun_config['o_signatures'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[signatures]" value="0"<?php if ($pun_config['o_signatures'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
446: <span>Allow users to attach a signature to their posts.</span> | 516: <span><?php echo $lang_admin_options['Signatures help'] ?></span> |
447: </td> | 517: </td> |
448: </tr> | 518: </tr> |
449: <tr> | 519: <tr> |
450: <th scope="row"><a name="ranks">User ranks</a></th> | 520: <th scope="row"><a name="ranks"><?php echo $lang_admin_options['User ranks label'] ?></a></th> |
451: <td> | 521: <td> |
452: <input type="radio" name="form[ranks]" value="1"<?php if ($pun_config['o_ranks'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[ranks]" value="0"<?php if ($pun_config['o_ranks'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 522: <input type="radio" name="form[ranks]" value="1"<?php if ($pun_config['o_ranks'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[ranks]" value="0"<?php if ($pun_config['o_ranks'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
453: <span>Enable this to use user ranks. See <a href="admin_ranks.php">Ranks</a> for more info.</span> | 523: <span><?php printf($lang_admin_options['User ranks help'], '<a href="admin_ranks.php">'.$lang_admin_common['Ranks'].'</a>') ?></span> |
454: </td> | 524: </td> |
455: </tr> | 525: </tr> |
456: <tr> | 526: <tr> |
457: <th scope="row">User has posted earlier</th> | 527: <th scope="row"><?php echo $lang_admin_options['User has posted label'] ?></th> |
458: <td> | 528: <td> |
459: <input type="radio" name="form[show_dot]" value="1"<?php if ($pun_config['o_show_dot'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[show_dot]" value="0"<?php if ($pun_config['o_show_dot'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 529: <input type="radio" name="form[show_dot]" value="1"<?php if ($pun_config['o_show_dot'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[show_dot]" value="0"<?php if ($pun_config['o_show_dot'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
460: <span>This feature displays a dot in front of topics in viewforum.php in case the currently logged in user has posted in that topic earlier. Disable if you are experiencing high server load.</span> | 530: <span><?php echo $lang_admin_options['User has posted help'] ?></span> |
461: </td> | 531: </td> |
462: </tr> | 532: </tr> |
463: <tr> | 533: <tr> |
464: <th scope="row">Topic views</th> | 534: <th scope="row"><?php echo $lang_admin_options['Topic views label'] ?></th> |
465: <td> | 535: <td> |
466: <input type="radio" name="form[topic_views]" value="1"<?php if ($pun_config['o_topic_views'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[topic_views]" value="0"<?php if ($pun_config['o_topic_views'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 536: <input type="radio" name="form[topic_views]" value="1"<?php if ($pun_config['o_topic_views'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[topic_views]" value="0"<?php if ($pun_config['o_topic_views'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
467: <span>Keep track of the number of views a topic has. Disable if you are experiencing high server load in a busy forum.</span> | 537: <span><?php echo $lang_admin_options['Topic views help'] ?></span> |
468: </td> | 538: </td> |
469: </tr> | 539: </tr> |
470: <tr> | 540: <tr> |
471: <th scope="row">Quick jump</th> | 541: <th scope="row"><?php echo $lang_admin_options['Quick jump label'] ?></th> |
472: <td> | 542: <td> |
473: <input type="radio" name="form[quickjump]" value="1"<?php if ($pun_config['o_quickjump'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[quickjump]" value="0"<?php if ($pun_config['o_quickjump'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 543: <input type="radio" name="form[quickjump]" value="1"<?php if ($pun_config['o_quickjump'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[quickjump]" value="0"<?php if ($pun_config['o_quickjump'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
474: <span>Enable the quick jump (jump to forum) drop list.</span> | 544: <span><?php echo $lang_admin_options['Quick jump help'] ?></span> |
475: </td> | 545: </td> |
476: </tr> | 546: </tr> |
477: <tr> | 547: <tr> |
478: <th scope="row">GZip output</th> | 548: <th scope="row"><?php echo $lang_admin_options['GZip label'] ?></th> |
479: <td> | 549: <td> |
480: <input type="radio" name="form[gzip]" value="1"<?php if ($pun_config['o_gzip'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[gzip]" value="0"<?php if ($pun_config['o_gzip'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 550: <input type="radio" name="form[gzip]" value="1"<?php if ($pun_config['o_gzip'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[gzip]" value="0"<?php if ($pun_config['o_gzip'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
481: <span>If enabled, FluxBB will gzip the output sent to browsers. This will reduce bandwidth usage, but use a little more CPU. This feature requires that PHP is configured with zlib (--with-zlib). Note: If you already have one of the Apache modules mod_gzip or mod_deflate set up to compress PHP scripts, you should disable this feature.</span> | 551: <span><?php echo $lang_admin_options['GZip help'] ?></span> |
482: </td> | 552: </td> |
483: </tr> | 553: </tr> |
484: <tr> | 554: <tr> |
485: <th scope="row">Search all forums</th> | 555: <th scope="row"><?php echo $lang_admin_options['Search all label'] ?></th> |
486: <td> | 556: <td> |
487: <input type="radio" name="form[search_all_forums]" value="1"<?php if ($pun_config['o_search_all_forums'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[search_all_forums]" value="0"<?php if ($pun_config['o_search_all_forums'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 557: <input type="radio" name="form[search_all_forums]" value="1"<?php if ($pun_config['o_search_all_forums'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[search_all_forums]" value="0"<?php if ($pun_config['o_search_all_forums'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
488: <span>When disabled, searches will only be allowed in one forum at a time. Disable if server load is high due to excessive searching.</span> | 558: <span><?php echo $lang_admin_options['Search all help'] ?></span> |
489: </td> | 559: </td> |
490: </tr> | 560: </tr> |
491: <tr> | 561: <tr> |
492: <th scope="row">Additional menu items</th> | 562: <th scope="row"><?php echo $lang_admin_options['Menu items label'] ?></th> |
493: <td> | 563: <td> |
494: <textarea name="form[additional_navlinks]" rows="3" cols="55"><?php echo pun_htmlspecialchars($pun_config['o_additional_navlinks']) ?></textarea> | 564: <textarea name="form[additional_navlinks]" rows="3" cols="55"><?php echo pun_htmlspecialchars($pun_config['o_additional_navlinks']) ?></textarea> |
495: <span>By entering HTML hyperlinks into this textbox, any number of items can be added to the navigation menu at the top of all pages. The format for adding new links is X = <a href="URL">LINK</a> where X is the position at which the link should be inserted (e.g. 0 to insert at the beginning and 2 to insert after "User list"). Separate entries with a linebreak.</span> | 565: <span><?php echo $lang_admin_options['Menu items help'] ?></span> |
| 566: </td> |
| 567: </tr> |
| 568: <tr> |
| 569: <th scope="row"><?php echo $lang_admin_options['Default feed label'] ?></th> |
| 570: <td> |
| 571: <input type="radio" name="form[feed_type]" value="0"<?php if ($pun_config['o_feed_type'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_options['None'] ?></strong> <input type="radio" name="form[feed_type]" value="1"<?php if ($pun_config['o_feed_type'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_options['RSS'] ?></strong> <input type="radio" name="form[feed_type]" value="2"<?php if ($pun_config['o_feed_type'] == '2') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_options['Atom'] ?></strong> |
| 572: <span><?php echo $lang_admin_options['Default feed help'] ?></span> |
496: </td> | 573: </td> |
497: </tr> | 574: </tr> |
498: </table> | 575: </table> |
501: </div> | 578: </div> |
502: <div class="inform"> | 579: <div class="inform"> |
503: <fieldset> | 580: <fieldset> |
504: <legend>Reports</legend> | 581: <legend><?php echo $lang_admin_options['Reports subhead'] ?></legend> |
505: <div class="infldset"> | 582: <div class="infldset"> |
506: <table class="aligntop" cellspacing="0"> | 583: <table class="aligntop" cellspacing="0"> |
507: <tr> | 584: <tr> |
508: <th scope="row">Report method</th> | 585: <th scope="row"><?php echo $lang_admin_options['Reporting method label'] ?></th> |
509: <td> | 586: <td> |
510: <input type="radio" name="form[report_method]" value="0"<?php if ($pun_config['o_report_method'] == '0') echo ' checked="checked"' ?> /> Internal <input type="radio" name="form[report_method]" value="1"<?php if ($pun_config['o_report_method'] == '1') echo ' checked="checked"' ?> /> Email <input type="radio" name="form[report_method]" value="2"<?php if ($pun_config['o_report_method'] == '2') echo ' checked="checked"' ?> /> Both | 587: <input type="radio" name="form[report_method]" value="0"<?php if ($pun_config['o_report_method'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_options['Internal'] ?></strong> <input type="radio" name="form[report_method]" value="1"<?php if ($pun_config['o_report_method'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_options['By e-mail'] ?></strong> <input type="radio" name="form[report_method]" value="2"<?php if ($pun_config['o_report_method'] == '2') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_options['Both'] ?></strong> |
511: <span>Select the method for handling topic/post reports. You can choose whether topic/post reports should be handled by the internal report system, emailed to the addresses on the mailing list (see below) or both.</span> | 588: <span><?php echo $lang_admin_options['Reporting method help'] ?></span> |
512: </td> | 589: </td> |
513: </tr> | 590: </tr> |
514: <tr> | 591: <tr> |
515: <th scope="row">Mailing list</th> | 592: <th scope="row"><?php echo $lang_admin_options['Mailing list label'] ?></th> |
516: <td> | 593: <td> |
517: <textarea name="form[mailing_list]" rows="5" cols="55"><?php echo pun_htmlspecialchars($pun_config['o_mailing_list']) ?></textarea> | 594: <textarea name="form[mailing_list]" rows="5" cols="55"><?php echo pun_htmlspecialchars($pun_config['o_mailing_list']) ?></textarea> |
518: <span>A comma separated list of subscribers. The people on this list are the recipients of reports.</span> | 595: <span><?php echo $lang_admin_options['Mailing list help'] ?></span> |
519: </td> | 596: </td> |
520: </tr> | 597: </tr> |
521: </table> | 598: </table> |
524: </div> | 601: </div> |
525: <div class="inform"> | 602: <div class="inform"> |
526: <fieldset> | 603: <fieldset> |
527: <legend>Avatars</legend> | 604: <legend><?php echo $lang_admin_options['Avatars subhead'] ?></legend> |
528: <div class="infldset"> | 605: <div class="infldset"> |
529: <table class="aligntop" cellspacing="0"> | 606: <table class="aligntop" cellspacing="0"> |
530: <tr> | 607: <tr> |
531: <th scope="row">Use avatars</th> | 608: <th scope="row"><?php echo $lang_admin_options['Use avatars label'] ?></th> |
532: <td> | 609: <td> |
533: <input type="radio" name="form[avatars]" value="1"<?php if ($pun_config['o_avatars'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[avatars]" value="0"<?php if ($pun_config['o_avatars'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 610: <input type="radio" name="form[avatars]" value="1"<?php if ($pun_config['o_avatars'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[avatars]" value="0"<?php if ($pun_config['o_avatars'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
534: <span>When enabled, users will be able to upload an avatar which will be displayed under their title/rank.</span> | 611: <span><?php echo $lang_admin_options['Use avatars help'] ?></span> |
535: </td> | 612: </td> |
536: </tr> | 613: </tr> |
537: <tr> | 614: <tr> |
538: <th scope="row">Upload directory</th> | 615: <th scope="row"><?php echo $lang_admin_options['Upload directory label'] ?></th> |
539: <td> | 616: <td> |
540: <input type="text" name="form[avatars_dir]" size="35" maxlength="50" value="<?php echo pun_htmlspecialchars($pun_config['o_avatars_dir']) ?>" /> | 617: <input type="text" name="form[avatars_dir]" size="35" maxlength="50" value="<?php echo pun_htmlspecialchars($pun_config['o_avatars_dir']) ?>" /> |
541: <span>The upload directory for avatars (relative to the FluxBB root directory). PHP must have write permissions to this directory.</span> | 618: <span><?php echo $lang_admin_options['Upload directory help'] ?></span> |
542: </td> | 619: </td> |
543: </tr> | 620: </tr> |
544: <tr> | 621: <tr> |
545: <th scope="row">Max width</th> | 622: <th scope="row"><?php echo $lang_admin_options['Max width label'] ?></th> |
546: <td> | 623: <td> |
547: <input type="text" name="form[avatars_width]" size="5" maxlength="5" value="<?php echo $pun_config['o_avatars_width'] ?>" /> | 624: <input type="text" name="form[avatars_width]" size="5" maxlength="5" value="<?php echo $pun_config['o_avatars_width'] ?>" /> |
548: <span>The maximum allowed width of avatars in pixels (60 is recommended).</span> | 625: <span><?php echo $lang_admin_options['Max width help'] ?></span> |
549: </td> | 626: </td> |
550: </tr> | 627: </tr> |
551: <tr> | 628: <tr> |
552: <th scope="row">Max height</th> | 629: <th scope="row"><?php echo $lang_admin_options['Max height label'] ?></th> |
553: <td> | 630: <td> |
554: <input type="text" name="form[avatars_height]" size="5" maxlength="5" value="<?php echo $pun_config['o_avatars_height'] ?>" /> | 631: <input type="text" name="form[avatars_height]" size="5" maxlength="5" value="<?php echo $pun_config['o_avatars_height'] ?>" /> |
555: <span>The maximum allowed height of avatars in pixels (60 is recommended).</span> | 632: <span><?php echo $lang_admin_options['Max height help'] ?></span> |
556: </td> | 633: </td> |
557: </tr> | 634: </tr> |
558: <tr> | 635: <tr> |
559: <th scope="row">Max size</th> | 636: <th scope="row"><?php echo $lang_admin_options['Max size label'] ?></th> |
560: <td> | 637: <td> |
561: <input type="text" name="form[avatars_size]" size="6" maxlength="6" value="<?php echo $pun_config['o_avatars_size'] ?>" /> | 638: <input type="text" name="form[avatars_size]" size="6" maxlength="6" value="<?php echo $pun_config['o_avatars_size'] ?>" /> |
562: <span>The maximum allowed size of avatars in bytes (10240 is recommended).</span> | 639: <span><?php echo $lang_admin_options['Max size help'] ?></span> |
563: </td> | 640: </td> |
564: </tr> | 641: </tr> |
565: </table> | 642: </table> |
568: </div> | 645: </div> |
569: <div class="inform"> | 646: <div class="inform"> |
570: <fieldset> | 647: <fieldset> |
571: <legend>Email</legend> | 648: <legend><?php echo $lang_admin_options['E-mail subhead'] ?></legend> |
572: <div class="infldset"> | 649: <div class="infldset"> |
573: <table class="aligntop" cellspacing="0"> | 650: <table class="aligntop" cellspacing="0"> |
574: <tr> | 651: <tr> |
575: <th scope="row">Admin email</th> | 652: <th scope="row"><?php echo $lang_admin_options['Admin e-mail label'] ?></th> |
576: <td> | 653: <td> |
577: <input type="text" name="form[admin_email]" size="50" maxlength="50" value="<?php echo $pun_config['o_admin_email'] ?>" /> | 654: <input type="text" name="form[admin_email]" size="50" maxlength="80" value="<?php echo $pun_config['o_admin_email'] ?>" /> |
578: <span>The email address of the forum administrator.</span> | 655: <span><?php echo $lang_admin_options['Admin e-mail help'] ?></span> |
579: </td> | 656: </td> |
580: </tr> | 657: </tr> |
581: <tr> | 658: <tr> |
582: <th scope="row">Webmaster email</th> | 659: <th scope="row"><?php echo $lang_admin_options['Webmaster e-mail label'] ?></th> |
583: <td> | 660: <td> |
584: <input type="text" name="form[webmaster_email]" size="50" maxlength="50" value="<?php echo $pun_config['o_webmaster_email'] ?>" /> | 661: <input type="text" name="form[webmaster_email]" size="50" maxlength="80" value="<?php echo $pun_config['o_webmaster_email'] ?>" /> |
585: <span>This is the address that all emails sent by the forum will be addressed from.</span> | 662: <span><?php echo $lang_admin_options['Webmaster e-mail help'] ?></span> |
586: </td> | 663: </td> |
587: </tr> | 664: </tr> |
588: <tr> | 665: <tr> |
589: <th scope="row">Subscriptions</th> | 666: <th scope="row"><?php echo $lang_admin_options['Subscriptions label'] ?></th> |
590: <td> | 667: <td> |
591: <input type="radio" name="form[subscriptions]" value="1"<?php if ($pun_config['o_subscriptions'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[subscriptions]" value="0"<?php if ($pun_config['o_subscriptions'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 668: <input type="radio" name="form[subscriptions]" value="1"<?php if ($pun_config['o_subscriptions'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[subscriptions]" value="0"<?php if ($pun_config['o_subscriptions'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
592: <span>Enable users to subscribe to topics (receive email when someone replies).</span> | 669: <span><?php echo $lang_admin_options['Subscriptions help'] ?></span> |
593: </td> | 670: </td> |
594: </tr> | 671: </tr> |
595: <tr> | 672: <tr> |
596: <th scope="row">SMTP server address</th> | 673: <th scope="row"><?php echo $lang_admin_options['SMTP address label'] ?></th> |
597: <td> | 674: <td> |
598: <input type="text" name="form[smtp_host]" size="30" maxlength="100" value="<?php echo pun_htmlspecialchars($pun_config['o_smtp_host']) ?>" /> | 675: <input type="text" name="form[smtp_host]" size="30" maxlength="100" value="<?php echo pun_htmlspecialchars($pun_config['o_smtp_host']) ?>" /> |
599: <span>The address of an external SMTP server to send emails with. You can specify a custom port number if the SMTP server doesn't run on the default port 25 (example: mail.myhost.com:3580). Leave blank to use the local mail program.</span> | 676: <span><?php echo $lang_admin_options['SMTP address help'] ?></span> |
600: </td> | 677: </td> |
601: </tr> | 678: </tr> |
602: <tr> | 679: <tr> |
603: <th scope="row">SMTP username</th> | 680: <th scope="row"><?php echo $lang_admin_options['SMTP username label'] ?></th> |
604: <td> | 681: <td> |
605: <input type="text" name="form[smtp_user]" size="25" maxlength="50" value="<?php echo pun_htmlspecialchars($pun_config['o_smtp_user']) ?>" /> | 682: <input type="text" name="form[smtp_user]" size="25" maxlength="50" value="<?php echo pun_htmlspecialchars($pun_config['o_smtp_user']) ?>" /> |
606: <span>Username for SMTP server. Only enter a username if it is required by the SMTP server (most servers <strong>do not</strong> require authentication).</span> | 683: <span><?php echo $lang_admin_options['SMTP username help'] ?></span> |
607: </td> | 684: </td> |
608: </tr> | 685: </tr> |
609: <tr> | 686: <tr> |
610: <th scope="row">SMTP password</th> | 687: <th scope="row"><?php echo $lang_admin_options['SMTP password label'] ?></th> |
611: <td> | 688: <td> |
612: <input type="text" name="form[smtp_pass]" size="25" maxlength="50" value="<?php echo pun_htmlspecialchars($pun_config['o_smtp_pass']) ?>" /> | 689: <input type="text" name="form[smtp_pass]" size="25" maxlength="50" value="<?php echo pun_htmlspecialchars($pun_config['o_smtp_pass']) ?>" /> |
613: <span>Password for SMTP server. Only enter a password if it is required by the SMTP server (most servers <strong>do not</strong> require authentication).</span> | 690: <span><?php echo $lang_admin_options['SMTP password help'] ?></span> |
614: </td> | 691: </td> |
615: </tr> | 692: </tr> |
616: <tr> | 693: <tr> |
617: <th scope="row">Encrypt SMTP using SSL</th> | 694: <th scope="row"><?php echo $lang_admin_options['SMTP SSL label'] ?></th> |
618: <td> | 695: <td> |
619: <input type="radio" name="form[smtp_ssl]" value="1"<?php if ($pun_config['o_smtp_ssl'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[smtp_ssl]" value="0"<?php if ($pun_config['o_smtp_ssl'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 696: <input type="radio" name="form[smtp_ssl]" value="1"<?php if ($pun_config['o_smtp_ssl'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[smtp_ssl]" value="0"<?php if ($pun_config['o_smtp_ssl'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
620: <span>Encrypts the connection to the SMTP server using SSL. Should only be used if your SMTP server requires it and your version of PHP supports SSL.</span> | 697: <span><?php echo $lang_admin_options['SMTP SSL help'] ?></span> |
621: </td> | 698: </td> |
622: </tr> | 699: </tr> |
623: </table> | 700: </table> |
626: </div> | 703: </div> |
627: <div class="inform"> | 704: <div class="inform"> |
628: <fieldset> | 705: <fieldset> |
629: <legend>Registration</legend> | 706: <legend><?php echo $lang_admin_options['Registration subhead'] ?></legend> |
630: <div class="infldset"> | 707: <div class="infldset"> |
631: <table class="aligntop" cellspacing="0"> | 708: <table class="aligntop" cellspacing="0"> |
632: <tr> | 709: <tr> |
633: <th scope="row">Allow new registrations</th> | 710: <th scope="row"><?php echo $lang_admin_options['Allow new label'] ?></th> |
634: <td> | 711: <td> |
635: <input type="radio" name="form[regs_allow]" value="1"<?php if ($pun_config['o_regs_allow'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[regs_allow]" value="0"<?php if ($pun_config['o_regs_allow'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 712: <input type="radio" name="form[regs_allow]" value="1"<?php if ($pun_config['o_regs_allow'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[regs_allow]" value="0"<?php if ($pun_config['o_regs_allow'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
636: <span>Controls whether this forum accepts new registrations. Disable only under special circumstances.</span> | 713: <span><?php echo $lang_admin_options['Allow new help'] ?></span> |
637: </td> | 714: </td> |
638: </tr> | 715: </tr> |
639: <tr> | 716: <tr> |
640: <th scope="row">Verify registrations</th> | 717: <th scope="row"><?php echo $lang_admin_options['Verify label'] ?></th> |
641: <td> | 718: <td> |
642: <input type="radio" name="form[regs_verify]" value="1"<?php if ($pun_config['o_regs_verify'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[regs_verify]" value="0"<?php if ($pun_config['o_regs_verify'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 719: <input type="radio" name="form[regs_verify]" value="1"<?php if ($pun_config['o_regs_verify'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[regs_verify]" value="0"<?php if ($pun_config['o_regs_verify'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
643: <span>When enabled, users are emailed a random password when they register. They can then log in and change the password in their profile if they see fit. This feature also requires users to verify new email addresses if they choose to change from the one they registered with. This is an effective way of avoiding registration abuse and making sure that all users have "correct" email addresses in their profiles.</span> | 720: <span><?php echo $lang_admin_options['Verify help'] ?></span> |
644: </td> | 721: </td> |
645: </tr> | 722: </tr> |
646: <tr> | 723: <tr> |
647: <th scope="row">Report new registrations</th> | 724: <th scope="row"><?php echo $lang_admin_options['Report new label'] ?></th> |
648: <td> | 725: <td> |
649: <input type="radio" name="form[regs_report]" value="1"<?php if ($pun_config['o_regs_report'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[regs_report]" value="0"<?php if ($pun_config['o_regs_report'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 726: <input type="radio" name="form[regs_report]" value="1"<?php if ($pun_config['o_regs_report'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[regs_report]" value="0"<?php if ($pun_config['o_regs_report'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
650: <span>If enabled, FluxBB will notify users on the mailing list (see above) when a new user registers in the forums.</span> | 727: <span><?php echo $lang_admin_options['Report new help'] ?></span> |
651: </td> | 728: </td> |
652: </tr> | 729: </tr> |
653: <tr> | 730: <tr> |
654: <th scope="row">Use forum rules</th> | 731: <th scope="row"><?php echo $lang_admin_options['Use rules label'] ?></th> |
655: <td> | 732: <td> |
656: <input type="radio" name="form[rules]" value="1"<?php if ($pun_config['o_rules'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[rules]" value="0"<?php if ($pun_config['o_rules'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 733: <input type="radio" name="form[rules]" value="1"<?php if ($pun_config['o_rules'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[rules]" value="0"<?php if ($pun_config['o_rules'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
657: <span>When enabled, users must agree to a set of rules when registering (enter text below). The rules will always be available through a link in the navigation table at the top of every page.</span> | 734: <span><?php echo $lang_admin_options['Use rules help'] ?></span> |
658: </td> | 735: </td> |
659: </tr> | 736: </tr> |
660: <tr> | 737: <tr> |
661: <th scope="row">Rules</th> | 738: <th scope="row"><?php echo $lang_admin_options['Rules label'] ?></th> |
662: <td> | 739: <td> |
663: <textarea name="form[rules_message]" rows="10" cols="55"><?php echo pun_htmlspecialchars($pun_config['o_rules_message']) ?></textarea> | 740: <textarea name="form[rules_message]" rows="10" cols="55"><?php echo pun_htmlspecialchars($pun_config['o_rules_message']) ?></textarea> |
664: <span>Here you can enter any rules or other information that the user must review and accept when registering. If you enabled rules above you have to enter something here, otherwise it will be disabled. This text will not be parsed like regular posts and thus may contain HTML.</span> | 741: <span><?php echo $lang_admin_options['Rules help'] ?></span> |
665: </td> | 742: </td> |
666: </tr> | 743: </tr> |
667: <tr> | 744: <tr> |
668: <th scope="row">Default email setting</th> | 745: <th scope="row"><?php echo $lang_admin_options['E-mail default label'] ?></th> |
669: <td> | 746: <td> |
670: <span>Choose the default privacy setting for new user registrations.</span> | 747: <span><?php echo $lang_admin_options['E-mail default help'] ?></span> |
671: <input type="radio" name="form[default_email_setting]" value="0"<?php if ($pun_config['o_default_email_setting'] == '0') echo ' checked="checked"' ?> /> Display email address to other users.<br /> | 748: <input type="radio" name="form[default_email_setting]" value="0"<?php if ($pun_config['o_default_email_setting'] == '0') echo ' checked="checked"' ?> /> <?php echo $lang_admin_options['Display e-mail label'] ?><br /> |
672: <input type="radio" name="form[default_email_setting]" value="1"<?php if ($pun_config['o_default_email_setting'] == '1') echo ' checked="checked"' ?> /> Hide email address but allow form email.<br /> | 749: <input type="radio" name="form[default_email_setting]" value="1"<?php if ($pun_config['o_default_email_setting'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin_options['Hide allow form label'] ?><br /> |
673: <input type="radio" name="form[default_email_setting]" value="2"<?php if ($pun_config['o_default_email_setting'] == '2') echo ' checked="checked"' ?> /> Hide email address and disallow form email.<br /> | 750: <input type="radio" name="form[default_email_setting]" value="2"<?php if ($pun_config['o_default_email_setting'] == '2') echo ' checked="checked"' ?> /> <?php echo $lang_admin_options['Hide both label'] ?><br /> |
674: </td> | 751: </td> |
675: </tr> | 752: </tr> |
676: </table> | 753: </table> |
679: </div> | 756: </div> |
680: <div class="inform"> | 757: <div class="inform"> |
681: <fieldset> | 758: <fieldset> |
682: <legend>Announcement</legend> | 759: <legend><?php echo $lang_admin_options['Announcement subhead'] ?></legend> |
683: <div class="infldset"> | 760: <div class="infldset"> |
684: <table class="aligntop" cellspacing="0"> | 761: <table class="aligntop" cellspacing="0"> |
685: <tr> | 762: <tr> |
686: <th scope="row">Display announcement</th> | 763: <th scope="row"><?php echo $lang_admin_options['Display announcement label'] ?></th> |
687: <td> | 764: <td> |
688: <input type="radio" name="form[announcement]" value="1"<?php if ($pun_config['o_announcement'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[announcement]" value="0"<?php if ($pun_config['o_announcement'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 765: <input type="radio" name="form[announcement]" value="1"<?php if ($pun_config['o_announcement'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[announcement]" value="0"<?php if ($pun_config['o_announcement'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
689: <span>Enable this to display the below message in the forums.</span> | 766: <span><?php echo $lang_admin_options['Display announcement help'] ?></span> |
690: </td> | 767: </td> |
691: </tr> | 768: </tr> |
692: <tr> | 769: <tr> |
693: <th scope="row">Announcement message</th> | 770: <th scope="row"><?php echo $lang_admin_options['Announcement message label'] ?></th> |
694: <td> | 771: <td> |
695: <textarea name="form[announcement_message]" rows="5" cols="55"><?php echo pun_htmlspecialchars($pun_config['o_announcement_message']) ?></textarea> | 772: <textarea name="form[announcement_message]" rows="5" cols="55"><?php echo pun_htmlspecialchars($pun_config['o_announcement_message']) ?></textarea> |
696: <span>This text will not be parsed like regular posts and thus may contain HTML.</span> | 773: <span><?php echo $lang_admin_options['Announcement message help'] ?></span> |
697: </td> | 774: </td> |
698: </tr> | 775: </tr> |
699: </table> | 776: </table> |
702: </div> | 779: </div> |
703: <div class="inform"> | 780: <div class="inform"> |
704: <fieldset> | 781: <fieldset> |
705: <legend>Maintenance</legend> | 782: <legend><?php echo $lang_admin_options['Maintenance subhead'] ?></legend> |
706: <div class="infldset"> | 783: <div class="infldset"> |
707: <table class="aligntop" cellspacing="0"> | 784: <table class="aligntop" cellspacing="0"> |
708: <tr> | 785: <tr> |
709: <th scope="row"><a name="maintenance">Maintenance mode</a></th> | 786: <th scope="row"><a name="maintenance"><?php echo $lang_admin_options['Maintenance mode label'] ?></a></th> |
710: <td> | 787: <td> |
711: <input type="radio" name="form[maintenance]" value="1"<?php if ($pun_config['o_maintenance'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[maintenance]" value="0"<?php if ($pun_config['o_maintenance'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong> | 788: <input type="radio" name="form[maintenance]" value="1"<?php if ($pun_config['o_maintenance'] == '1') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['Yes'] ?></strong> <input type="radio" name="form[maintenance]" value="0"<?php if ($pun_config['o_maintenance'] == '0') echo ' checked="checked"' ?> /> <strong><?php echo $lang_admin_common['No'] ?></strong> |
712: <span>When enabled, the board will only be available to administrators. This should be used if the board needs to taken down temporarily for maintenance. WARNING! Do not log out when the board is in maintenance mode. You will not be able to login again.</span> | 789: <span><?php echo $lang_admin_options['Maintenance mode help'] ?></span> |
713: </td> | 790: </td> |
714: </tr> | 791: </tr> |
715: <tr> | 792: <tr> |
716: <th scope="row">Maintenance message</th> | 793: <th scope="row"><?php echo $lang_admin_options['Maintenance message label'] ?></th> |
717: <td> | 794: <td> |
718: <textarea name="form[maintenance_message]" rows="5" cols="55"><?php echo pun_htmlspecialchars($pun_config['o_maintenance_message']) ?></textarea> | 795: <textarea name="form[maintenance_message]" rows="5" cols="55"><?php echo pun_htmlspecialchars($pun_config['o_maintenance_message']) ?></textarea> |
719: <span>The message that will be displayed to users when the board is in maintenance mode. If left blank a default message will be used. This text will not be parsed like regular posts and thus may contain HTML.</span> | 796: <span><?php echo $lang_admin_options['Maintenance message help'] ?></span> |
720: </td> | 797: </td> |
721: </tr> | 798: </tr> |
722: </table> | 799: </table> |
723: </div> | 800: </div> |
724: </fieldset> | 801: </fieldset> |
725: </div> | 802: </div> |
726: <p class="submitend"><input type="submit" name="save" value="Save changes" /></p> | 803: <p class="submitend"><input type="submit" name="save" value="<?php echo $lang_admin_common['Save changes'] ?>" /></p> |
727: </form> | 804: </form> |
728: </div> | 805: </div> |
729: </div> | 806: </div> |