punbb-1.3.2/admin/bans.php |
punbb-1.3.5/admin/bans.php |
4: * | 4: * |
5: * Allows administrators and moderators to create, modify, and delete bans. | 5: * Allows administrators and moderators to create, modify, and delete bans. |
6: * | 6: * |
7: * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org | 7: * @copyright (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org |
8: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 8: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
9: * @package PunBB | 9: * @package PunBB |
10: */ | 10: */ |
24: require FORUM_ROOT.'lang/'.$forum_user['language'].'/admin_common.php'; | 24: require FORUM_ROOT.'lang/'.$forum_user['language'].'/admin_common.php'; |
25: require FORUM_ROOT.'lang/'.$forum_user['language'].'/admin_bans.php'; | 25: require FORUM_ROOT.'lang/'.$forum_user['language'].'/admin_bans.php'; |
26: | 26: |
27: | |
28: // Add/edit a ban (stage 1) | 27: // Add/edit a ban (stage 1) |
29: if (isset($_REQUEST['add_ban']) || isset($_GET['edit_ban'])) | 28: if (isset($_REQUEST['add_ban']) || isset($_GET['edit_ban'])) |
30: { | 29: { |
157: <h2 class="hn"><span><?php echo $lang_admin_bans['Ban advanced heading'] ?></span></h2> | 156: <h2 class="hn"><span><?php echo $lang_admin_bans['Ban advanced heading'] ?></span></h2> |
158: </div> | 157: </div> |
159: <div class="main-content main-frm"> | 158: <div class="main-content main-frm"> |
160: <div class="ct-box"> | 159: <div class="ct-box warn-box"> |
161: <p class="warn"><?php echo $lang_admin_bans['Ban IP warning'] ?></p> | 160: <p class="warn"><?php echo $lang_admin_bans['Ban IP warning'] ?></p> |
162: </div> | 161: </div> |
163: <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo forum_link($forum_url['admin_bans']) ?>"> | 162: <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo forum_link($forum_url['admin_bans']) ?>"> |
164: <div class="hidden"> | 163: <div class="hidden"> |
165: <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(forum_link($forum_url['admin_bans'])) ?>" /> | 164: <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(forum_link($forum_url['admin_bans'])) ?>" /> |
166: <input type="hidden" name="mode" value="<?php echo $mode ?>" /> | 165: <input type="hidden" name="mode" value="<?php echo $mode ?>" /> |
167: <?php if ($mode == 'edit'): ?> <input type="hidden" name="ban_id" value="<?php echo $ban_id ?>" /> | 166: <?php if ($mode == 'edit'): ?> |
168: <?php endif; ?> </div> | 167: <input type="hidden" name="ban_id" value="<?php echo $ban_id ?>" /> |
| 168: <?php endif; ?> |
| 169: </div> |
169: <?php ($hook = get_hook('aba_add_edit_ban_pre_criteria_fieldset')) ? eval($hook) : null; ?> | 170: <?php ($hook = get_hook('aba_add_edit_ban_pre_criteria_fieldset')) ? eval($hook) : null; ?> |
170: <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>"> | 171: <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>"> |
171: <legend class="group-legend"><span><?php echo $lang_admin_bans['Ban criteria legend'] ?></span></legend> | 172: <legend class="group-legend"><span><?php echo $lang_admin_bans['Ban criteria legend'] ?></span></legend> |
398: $forum_page['crumbs'][] = array($lang_admin_common['Bans'], forum_link($forum_url['admin_bans'])); | 399: $forum_page['crumbs'][] = array($lang_admin_common['Bans'], forum_link($forum_url['admin_bans'])); |
399: | 400: |
400: | 401: |
| 402: // Fetch user count |
| 403: $query = array( |
| 404: 'SELECT' => 'COUNT(id)', |
| 405: 'FROM' => 'bans' |
| 406: ); |
| 407: |
| 408: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
| 409: $forum_page['num_bans'] = $forum_db->result($result); |
| 410: $forum_page['num_pages'] = ceil($forum_page['num_bans'] / $forum_user['disp_topics']); |
| 411: $forum_page['page'] = (!isset($_GET['p']) || !is_numeric($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : intval($_GET['p']); |
| 412: $forum_page['start_from'] = $forum_user['disp_topics'] * ($forum_page['page'] - 1); |
| 413: $forum_page['finish_at'] = min(($forum_page['start_from'] + $forum_user['disp_topics']), ($forum_page['num_bans'])); |
| 414: |
| 415: // Generate paging |
| 416: $forum_page['page_post']['paging']='<p class="paging"><span class="pages">'.$lang_common['Pages'].'</span> '.paginate($forum_page['num_pages'], $forum_page['page'], $forum_url['admin_bans'], $lang_common['Paging separator'], null, true).'</p>'; |
| 417: |
| 418: // Navigation links for header and page numbering for title/meta description |
| 419: if ($forum_page['page'] < $forum_page['num_pages']) |
| 420: { |
| 421: $forum_page['nav']['last'] = '<link rel="last" href="'.forum_sublink($forum_url['admin_bans'], $forum_url['page'], $forum_page['num_pages']).'" title="'.$lang_common['Page'].' '.$forum_page['num_pages'].'" />'; |
| 422: $forum_page['nav']['next'] = '<link rel="next" href="'.forum_sublink($forum_url['admin_bans'], $forum_url['page'], ($forum_page['page'] + 1)).'" title="'.$lang_common['Page'].' '.($forum_page['page'] + 1).'" />'; |
| 423: } |
| 424: if ($forum_page['page'] > 1) |
| 425: { |
| 426: $forum_page['nav']['prev'] = '<link rel="prev" href="'.forum_sublink($forum_url['admin_bans'], $forum_url['page'], ($forum_page['page'] - 1)).'" title="'.$lang_common['Page'].' '.($forum_page['page'] - 1).'" />'; |
| 427: $forum_page['nav']['first'] = '<link rel="first" href="'.forum_link($forum_url['admin_bans']).'" title="'.$lang_common['Page'].' 1" />'; |
| 428: } |
| 429: |
401: ($hook = get_hook('aba_pre_header_load')) ? eval($hook) : null; | 430: ($hook = get_hook('aba_pre_header_load')) ? eval($hook) : null; |
402: | 431: |
403: define('FORUM_PAGE_SECTION', 'users'); | 432: define('FORUM_PAGE_SECTION', 'users'); |
447: <div class="main-content main-frm"> | 476: <div class="main-content main-frm"> |
448: <?php | 477: <?php |
449: | 478: |
450: if (!empty($forum_bans)) | 479: if ($forum_page['num_bans'] > 0) |
451: { | 480: { |
452: | 481: |
453: ?> | 482: ?> |
454: <div class="ct-group"> | 483: <div class="ct-group"> |
455: <?php | 484: <?php |
456: | 485: |
| 486: // Grab the bans |
| 487: $query = array( |
| 488: 'SELECT' => 'b.*, u.username AS ban_creator_username', |
| 489: 'FROM' => 'bans AS b', |
| 490: 'JOINS' => array( |
| 491: array( |
| 492: 'LEFT JOIN' => 'users AS u', |
| 493: 'ON' => 'u.id=b.ban_creator' |
| 494: ) |
| 495: ), |
| 496: 'ORDER BY' => 'b.id', |
| 497: 'LIMIT' => $forum_page['start_from'].', '.$forum_page['finish_at'] |
| 498: ); |
| 499: |
| 500: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
| 501: |
457: $forum_page['item_num'] = 0; | 502: $forum_page['item_num'] = 0; |
458: foreach ($forum_bans as $ban_key => $cur_ban) | 503: while ($cur_ban = $forum_db->fetch_assoc($result)) |
459: { | 504: { |
460: $forum_page['ban_info'] = array(); | 505: $forum_page['ban_info'] = array(); |
461: $forum_page['ban_creator'] = ($cur_ban['ban_creator_username'] != '') ? '<a href="'.forum_link($forum_url['user'], $cur_ban['ban_creator']).'">'.forum_htmlencode($cur_ban['ban_creator_username']).'</a>' : $lang_admin_common['Unknown']; | 506: $forum_page['ban_creator'] = ($cur_ban['ban_creator_username'] != '') ? '<a href="'.forum_link($forum_url['user'], $cur_ban['ban_creator']).'">'.forum_htmlencode($cur_ban['ban_creator_username']).'</a>' : $lang_admin_common['Unknown']; |
484: <h3 class=""><span><?php printf($lang_admin_bans['Current ban head'], $forum_page['ban_creator']) ?></span></h3> | 529: <h3 class=""><span><?php printf($lang_admin_bans['Current ban head'], $forum_page['ban_creator']) ?></span></h3> |
485: <p><?php printf($lang_admin_bans['Edit or remove'], '<a href="'.forum_link($forum_url['admin_bans']).'?edit_ban='.$cur_ban['id'].'">'.$lang_admin_bans['Edit ban'].'</a>', '<a href="'.forum_link($forum_url['admin_bans']).'?del_ban='.$cur_ban['id'].'&csrf_token='.generate_form_token('del_ban'.$cur_ban['id']).'">'.$lang_admin_bans['Remove ban'].'</a>') ?></p> | 530: <p><?php printf($lang_admin_bans['Edit or remove'], '<a href="'.forum_link($forum_url['admin_bans']).'?edit_ban='.$cur_ban['id'].'">'.$lang_admin_bans['Edit ban'].'</a>', '<a href="'.forum_link($forum_url['admin_bans']).'?del_ban='.$cur_ban['id'].'&csrf_token='.generate_form_token('del_ban'.$cur_ban['id']).'">'.$lang_admin_bans['Remove ban'].'</a>') ?></p> |
486: </div> | 531: </div> |
487: <?php if (!empty($forum_page['ban_info'])): ?> <ul> | 532: <?php if (!empty($forum_page['ban_info'])): ?> |
| 533: <ul> |
488: <?php echo implode("\n", $forum_page['ban_info'])."\n" ?> | 534: <?php echo implode("\n", $forum_page['ban_info'])."\n" ?> |
489: </ul> | 535: </ul> |
490: <?php endif; ?> </div> | 536: <?php endif; ?> |
| 537: </div> |
491: </div> | 538: </div> |
492: <?php | 539: <?php |
493: | 540: |
punbb-1.3.2/admin/db_update.php |
punbb-1.3.5/admin/db_update.php |
4: * | 4: * |
5: * Updates the database to the latest version. | 5: * Updates the database to the latest version. |
6: * | 6: * |
7: * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org | 7: * @copyright (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org |
8: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 8: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
9: * @package PunBB | 9: * @package PunBB |
10: */ | 10: */ |
11: | 11: |
12: | 12: |
13: define('UPDATE_TO', '1.3.2'); | 13: define('UPDATE_TO', '1.3.5'); |
14: define('UPDATE_TO_DB_REVISION', 3); | 14: define('UPDATE_TO_DB_REVISION', 4); |
15: | 15: |
16: // The number of items to process per pageview (lower this if the update script times out during UTF-8 conversion) | 16: // The number of items to process per pageview (lower this if the update script times out during UTF-8 conversion) |
17: define('PER_PAGE', 300); | 17: define('PER_PAGE', 300); |
39: exit('Cannot find config.php, are you sure it exists?'); | 39: exit('Cannot find config.php, are you sure it exists?'); |
40: | 40: |
41: // Enable debug mode | 41: // Enable debug mode |
42: define('FORUM_DEBUG', 1); | 42: if (!defined('FORUM_DEBUG')) |
| 43: define('FORUM_DEBUG', 1); |
43: | 44: |
44: // Turn on full PHP error reporting | 45: // Turn on full PHP error reporting |
45: error_reporting(E_ALL); | 46: error_reporting(E_ALL); |
46: | 47: |
47: // Turn off magic_quotes_runtime | 48: // Turn off magic_quotes_runtime |
48: set_magic_quotes_runtime(0); | 49: if (get_magic_quotes_runtime()) |
| 50: @ini_set('magic_quotes_runtime', false); |
49: | 51: |
50: // Turn off PHP time limit | 52: // Turn off PHP time limit |
51: @set_time_limit(0); | 53: @set_time_limit(0); |
284: $seems_utf8 = true; | 286: $seems_utf8 = true; |
285: | 287: |
286: $query = array( | 288: $query = array( |
287: 'SELECT' => 'MIN(id), MAX(id)', | 289: 'SELECT' => 'MIN(id), MAX(id), COUNT(id)', |
288: 'FROM' => 'posts' | 290: 'FROM' => 'posts' |
289: ); | 291: ); |
290: | 292: |
291: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); | 293: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
292: list($min_id, $max_id) = $forum_db->fetch_row($result); | 294: list($min_id, $max_id, $count_id) = $forum_db->fetch_row($result); |
| 295: |
| 296: if ($count_id == 0) |
| 297: return false; |
293: | 298: |
294: // Get a random soup of data and check if it appears to be UTF-8 | 299: // Get a random soup of data and check if it appears to be UTF-8 |
295: for ($i = 0; $i < 100; ++$i) | 300: for ($i = 0; $i < 100; ++$i) |
408: <div id="brd-main" class="main basic"> | 413: <div id="brd-main" class="main basic"> |
409: | 414: |
410: <div class="main-head"> | 415: <div class="main-head"> |
411: <h1 class="hn"><span>PunBB Database Update : Perform update of database tables</span></h1> | 416: <h1 class="hn"><span>PunBB Database Update: Perform update of database tables</span></h1> |
412: </div> | 417: </div> |
413: | 418: |
414: <div class="main-content frm"> | 419: <div class="main-content frm"> |
416: <ul class="spaced"> | 421: <ul class="spaced"> |
417: <li class="warn"><span><strong>WARNING!</strong> This script will update your PunBB forum database. The update procedure might take anything from a few seconds to a few minutes (or in extreme cases, hours) depending on the speed of the server, the size of the forum database and the number of changes required.</span></li> | 422: <li class="warn"><span><strong>WARNING!</strong> This script will update your PunBB forum database. The update procedure might take anything from a few seconds to a few minutes (or in extreme cases, hours) depending on the speed of the server, the size of the forum database and the number of changes required.</span></li> |
418: <li><span>Do not forget to make a backup of the database before continuing.</span></li> | 423: <li><span>Do not forget to make a backup of the database before continuing.</span></li> |
419: <li><span> Did you read the update instructions in the documentation? If not, start there.</span></li> | 424: <li><span>Did you read the update instructions in the documentation? If not, start there.</span></li> |
420: <?php | 425: <?php |
421: | 426: |
422: if (strpos($cur_version, '1.2') === 0 && (!$db_seems_utf8 || isset($_GET['force']))) | 427: if (strpos($cur_version, '1.2') === 0 && (!$db_seems_utf8 || isset($_GET['force']))) |
725: | 730: |
726: // Make all IP fields VARCHAR(39) to support IPv6 | 731: // Make all IP fields VARCHAR(39) to support IPv6 |
727: $forum_db->alter_field('posts', 'poster_ip', 'VARCHAR(39)', true); | 732: $forum_db->alter_field('posts', 'poster_ip', 'VARCHAR(39)', true); |
728: $forum_db->alter_field('user', 'registration_ip', 'VARCHAR(39)', false, '0.0.0.0'); | 733: $forum_db->alter_field('users', 'registration_ip', 'VARCHAR(39)', false, '0.0.0.0'); |
729: | 734: |
730: // Add the DST option to the users table | 735: // Add the DST option to the users table |
731: $forum_db->add_field('users', 'dst', 'TINYINT(1)', false, 0, 'timezone'); | 736: $forum_db->add_field('users', 'dst', 'TINYINT(1)', false, 0, 'timezone'); |
1165: } | 1170: } |
1166: } | 1171: } |
1167: | 1172: |
| 1173: // Add the index for the post time |
| 1174: if (!$forum_db->index_exists('posts', 'posted_idx')) |
| 1175: $forum_db->add_index('posts', 'posted_idx', array('posted')); |
| 1176: |
1168: // Move any users with the old unverified status to their new group | 1177: // Move any users with the old unverified status to their new group |
1169: $query = array( | 1178: $query = array( |
1170: 'UPDATE' => 'users', | 1179: 'UPDATE' => 'users', |
1203: } | 1212: } |
1204: | 1213: |
1205: // Should we do charset conversion or not? | 1214: // Should we do charset conversion or not? |
1206: if (strpos($cur_version, '1.2') === 0 && isset($_GET['convert_charset'])) | 1215: if (strpos($cur_version, '1.3') === 0) |
| 1216: $query_str = '?stage=finish'; |
| 1217: elseif (strpos($cur_version, '1.2') === 0 && isset($_GET['convert_charset'])) |
1207: $query_str = '?stage=conv_misc&req_old_charset='.$old_charset.'&req_per_page='.PER_PAGE; | 1218: $query_str = '?stage=conv_misc&req_old_charset='.$old_charset.'&req_per_page='.PER_PAGE; |
1208: else | 1219: else |
1209: $query_str = '?stage=conv_tables'; | 1220: $query_str = '?stage=conv_tables'; |
1991: <div class="main-content frm"> | 2002: <div class="main-content frm"> |
1992: <div class="ct-box info-box"> | 2003: <div class="ct-box info-box"> |
1993: <p>Your forum database was updated successfully.</p> | 2004: <p>Your forum database was updated successfully.</p> |
1994: <?php if (isset($new_config) && !$written): ?> <p>In order to complete the process, you must now update your config.php script. <strong>Copy and paste the text in the text box below into the file called config.php in the root directory of your PunBB installation</strong>. The file already exists, so you must edit/overwrite the contents of the old file. You may then <a href="<?php echo $base_url ?>/index.php">go to the forum index</a> once config.php has been updated.</p> | 2005: <?php if (isset($new_config) && !$written): ?> |
1995: <?php else: ?> <p>You may <a href="<?php echo $base_url ?>/index.php">go to the forum index</a> now.</p> | 2006: <p>In order to complete the process, you must now update your config.php script. <strong>Copy and paste the text in the text box below into the file called config.php in the root directory of your PunBB installation</strong>. The file already exists, so you must edit/overwrite the contents of the old file. You may then <a href="<?php echo $base_url ?>/index.php">go to the forum index</a> once config.php has been updated.</p> |
| 2007: <?php else: ?> |
| 2008: <p>You may <a href="<?php echo $base_url ?>/index.php">go to the forum index</a> now.</p> |
1996: <?php endif; ?> </div> | 2009: <?php endif; ?> </div> |
1997: <?php if (isset($new_config) && !$written): ?> <form class="frm-form" action="foo"> | 2010: <?php if (isset($new_config) && !$written): ?> |
| 2011: <form class="frm-form" action="foo"> |
1998: <fieldset class="frm-group group1"> | 2012: <fieldset class="frm-group group1"> |
1999: <legend class="group-legend"><span>New config.php contents</span></legend> | 2013: <legend class="group-legend"><span>New config.php contents</span></legend> |
2000: <div class="txt-set set1"> | 2014: <div class="txt-set set1"> |
punbb-1.3.2/admin/install.php |
punbb-1.3.5/admin/install.php |
4: * | 4: * |
5: * Used to actually install PunBB. | 5: * Used to actually install PunBB. |
6: * | 6: * |
7: * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org | 7: * @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org |
8: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 8: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
9: * @package PunBB | 9: * @package PunBB |
10: */ | 10: */ |
11: | 11: |
12: | 12: |
13: define('FORUM_VERSION', '1.3.2'); | 13: define('FORUM_VERSION', '1.3.5'); |
14: define('FORUM_DB_REVISION', 3); | 14: define('FORUM_DB_REVISION', 4); |
15: define('MIN_PHP_VERSION', '4.3.0'); | 15: define('MIN_PHP_VERSION', '4.3.0'); |
16: define('MIN_MYSQL_VERSION', '4.1.2'); | 16: define('MIN_MYSQL_VERSION', '4.1.2'); |
17: | 17: |
57: return '<?php'."\n\n".'$db_type = \''.$db_type."';\n".'$db_host = \''.$db_host."';\n".'$db_name = \''.addslashes($db_name)."';\n".'$db_username = \''.addslashes($db_username)."';\n".'$db_password = \''.addslashes($db_password)."';\n".'$db_prefix = \''.addslashes($db_prefix)."';\n".'$p_connect = false;'."\n\n".'$base_url = \''.$base_url.'\';'."\n\n".'$cookie_name = '."'".$cookie_name."';\n".'$cookie_domain = '."'';\n".'$cookie_path = '."'/';\n".'$cookie_secure = 0;'."\n\ndefine('FORUM', 1);"; | 57: return '<?php'."\n\n".'$db_type = \''.$db_type."';\n".'$db_host = \''.$db_host."';\n".'$db_name = \''.addslashes($db_name)."';\n".'$db_username = \''.addslashes($db_username)."';\n".'$db_password = \''.addslashes($db_password)."';\n".'$db_prefix = \''.addslashes($db_prefix)."';\n".'$p_connect = false;'."\n\n".'$base_url = \''.$base_url.'\';'."\n\n".'$cookie_name = '."'".$cookie_name."';\n".'$cookie_domain = '."'';\n".'$cookie_path = '."'/';\n".'$cookie_secure = 0;'."\n\ndefine('FORUM', 1);"; |
58: } | 58: } |
59: | 59: |
60: $language = isset($_GET['lang']) ? preg_replace('#[\.\\\/]#', '', $_GET['lang']) : 'English'; | 60: $language = isset($_GET['lang']) ? $_GET['lang'] : (isset($_POST['req_language']) ? forum_trim($_POST['req_language']) : 'English'); |
| 61: $language = preg_replace('#[\.\\\/]#', '', $language); |
61: if (!file_exists(FORUM_ROOT.'lang/'.$language.'/install.php')) | 62: if (!file_exists(FORUM_ROOT.'lang/'.$language.'/install.php')) |
62: exit('The language pack you have chosen doesn\'t seem to exist or is corrupt. Please recheck and try again.'); | 63: exit('The language pack you have chosen doesn\'t seem to exist or is corrupt. Please recheck and try again.'); |
63: | 64: |
64: // Load the language file | 65: // Load the language files |
65: require FORUM_ROOT.'lang/'.$language.'/install.php'; | 66: require FORUM_ROOT.'lang/'.$language.'/install.php'; |
66: | 67: require FORUM_ROOT.'lang/'.$language.'/admin_settings.php'; |
67: | 68: |
68: if (isset($_POST['generate_config'])) | 69: if (isset($_POST['generate_config'])) |
69: { | 70: { |
83: exit; | 84: exit; |
84: } | 85: } |
85: | 86: |
| 87: header('Content-Type: text/html; charset=utf-8'); |
86: | 88: |
87: if (!isset($_POST['form_sent'])) | 89: if (!isset($_POST['form_sent'])) |
88: { | 90: { |
90: $dual_mysql = false; | 92: $dual_mysql = false; |
91: $db_extensions = array(); | 93: $db_extensions = array(); |
92: if (function_exists('mysqli_connect')) | 94: if (function_exists('mysqli_connect')) |
| 95: { |
93: $db_extensions[] = array('mysqli', 'MySQL Improved'); | 96: $db_extensions[] = array('mysqli', 'MySQL Improved'); |
| 97: } |
| 98: |
94: if (function_exists('mysql_connect')) | 99: if (function_exists('mysql_connect')) |
95: { | 100: { |
96: $db_extensions[] = array('mysql', 'MySQL Standard'); | 101: $db_extensions[] = array('mysql', 'MySQL Standard'); |
214: <div class="sf-set set1"> | 219: <div class="sf-set set1"> |
215: <div class="sf-box text required"> | 220: <div class="sf-box text required"> |
216: <label for="fld2"><span><?php echo $lang_install['Database server'] ?> <em><?php echo $lang_install['Required'] ?></em></span> <small><?php echo $lang_install['Database server help'] ?></small></label><br /> | 221: <label for="fld2"><span><?php echo $lang_install['Database server'] ?> <em><?php echo $lang_install['Required'] ?></em></span> <small><?php echo $lang_install['Database server help'] ?></small></label><br /> |
217: <span class="fld-input"><input id="fld2" type="text" name="req_db_host" value="localhost" size="50" maxlength="100" /></span> | 222: <span class="fld-input"><input id="fld2" type="text" name="req_db_host" value="localhost" size="35" maxlength="100" /></span> |
218: </div> | 223: </div> |
219: </div> | 224: </div> |
220: <div class="sf-set set2"> | 225: <div class="sf-set set2"> |
274: <div class="sf-set set4"> | 279: <div class="sf-set set4"> |
275: <div class="sf-box text required"> | 280: <div class="sf-box text required"> |
276: <label for="fld10"><span><?php echo $lang_install['Admin e-mail'] ?> <em><?php echo $lang_install['Required'] ?></em></span> <small><?php echo $lang_install['E-mail address help'] ?></small></label><br /> | 281: <label for="fld10"><span><?php echo $lang_install['Admin e-mail'] ?> <em><?php echo $lang_install['Required'] ?></em></span> <small><?php echo $lang_install['E-mail address help'] ?></small></label><br /> |
277: <span class="fld-input"><input id="fld10" type="text" name="req_email" size="50" maxlength="80" /></span> | 282: <span class="fld-input"><input id="fld10" type="text" name="req_email" size="35" maxlength="80" /></span> |
278: </div> | 283: </div> |
279: </div> | 284: </div> |
280: </fieldset> | 285: </fieldset> |
295: <div class="sf-set set1"> | 300: <div class="sf-set set1"> |
296: <div class="sf-box text"> | 301: <div class="sf-box text"> |
297: <label for="fld11"><span><?php echo $lang_install['Board title'] ?></span></label><br /> | 302: <label for="fld11"><span><?php echo $lang_install['Board title'] ?></span></label><br /> |
298: <span class="fld-input"><input id="fld11" type="text" name="board_title" size="50" maxlength="255" /></span> | 303: <span class="fld-input"><input id="fld11" type="text" name="board_title" size="35" maxlength="255" /></span> |
299: </div> | 304: </div> |
300: </div> | 305: </div> |
301: <div class="sf-set set2"> | 306: <div class="sf-set set2"> |
302: <div class="sf-box text"> | 307: <div class="sf-box text"> |
303: <label for="fld12"><span><?php echo $lang_install['Board description'] ?></span></label><br /> | 308: <label for="fld12"><span><?php echo $lang_install['Board description'] ?></span></label><br /> |
304: <span class="fld-input"><input id="fld12" type="text" name="board_descrip" size="50" maxlength="255" /></span> | 309: <span class="fld-input"><input id="fld12" type="text" name="board_descrip" size="35" maxlength="255" /></span> |
305: </div> | 310: </div> |
306: </div> | 311: </div> |
307: <div class="sf-set set3"> | 312: <div class="sf-set set3"> |
308: <div class="sf-box text required"> | 313: <div class="sf-box text required"> |
309: <label for="fld13"><span><?php echo $lang_install['Base URL'] ?> <em><?php echo $lang_install['Required'] ?></em></span> <small><?php echo $lang_install['Base URL help'] ?></small></label><br /> | 314: <label for="fld13"><span><?php echo $lang_install['Base URL'] ?> <em><?php echo $lang_install['Required'] ?></em></span> <small><?php echo $lang_install['Base URL help'] ?></small></label><br /> |
310: <span class="fld-input"><input id="fld13" type="text" name="req_base_url" value="<?php echo $base_url_guess ?>" size="60" maxlength="100" /></span> | 315: <span class="fld-input"><input id="fld13" type="text" name="req_base_url" value="<?php echo $base_url_guess ?>" size="35" maxlength="100" /></span> |
311: </div> | 316: </div> |
312: </div> | 317: </div> |
313: <?php | 318: <?php |
459: break; | 464: break; |
460: | 465: |
461: default: | 466: default: |
462: error(sprintf($lang_install['No such database type'], $db_type)); | 467: error(sprintf($lang_install['No such database type'], forum_htmlencode($db_type))); |
463: } | 468: } |
464: | 469: |
465: // Create the database object (and connect/select db) | 470: // Create the database object (and connect/select db) |
471: { | 476: { |
472: $mysql_info = $forum_db->get_version(); | 477: $mysql_info = $forum_db->get_version(); |
473: if (version_compare($mysql_info['version'], MIN_MYSQL_VERSION, '<')) | 478: if (version_compare($mysql_info['version'], MIN_MYSQL_VERSION, '<')) |
474: error(sprintf($lang_install['Invalid MySQL version'], $mysql_version, MIN_MYSQL_VERSION)); | 479: error(sprintf($lang_install['Invalid MySQL version'], forum_htmlencode($mysql_info['version']), MIN_MYSQL_VERSION)); |
475: } | 480: } |
476: | 481: |
477: // Validate prefix | 482: // Validate prefix |
1018: 'PRIMARY KEY' => array('id'), | 1023: 'PRIMARY KEY' => array('id'), |
1019: 'INDEXES' => array( | 1024: 'INDEXES' => array( |
1020: 'topic_id_idx' => array('topic_id'), | 1025: 'topic_id_idx' => array('topic_id'), |
1021: 'multi_idx' => array('poster_id', 'topic_id') | 1026: 'multi_idx' => array('poster_id', 'topic_id'), |
| 1027: 'posted_idx' => array('posted') |
1022: ) | 1028: ) |
1023: ); | 1029: ); |
1024: | 1030: |
1600: 'o_date_format' => "'Y-m-d'", | 1606: 'o_date_format' => "'Y-m-d'", |
1601: 'o_check_for_updates' => "'$check_for_updates'", | 1607: 'o_check_for_updates' => "'$check_for_updates'", |
1602: 'o_check_for_versions' => "'$check_for_updates'", | 1608: 'o_check_for_versions' => "'$check_for_updates'", |
1603: 'o_timeout_visit' => "'1800'", | 1609: 'o_timeout_visit' => "'5400'", |
1604: 'o_timeout_online' => "'300'", | 1610: 'o_timeout_online' => "'300'", |
1605: 'o_redirect_delay' => "'1'", | 1611: 'o_redirect_delay' => "'1'", |
1606: 'o_show_version' => "'0'", | 1612: 'o_show_version' => "'0'", |
1653: 'o_rules' => "'0'", | 1659: 'o_rules' => "'0'", |
1654: 'o_rules_message' => "'".$lang_install['Default rules']."'", | 1660: 'o_rules_message' => "'".$lang_install['Default rules']."'", |
1655: 'o_maintenance' => "'0'", | 1661: 'o_maintenance' => "'0'", |
1656: 'o_maintenance_message' => "'".$lang_install['Default maint message']."'", | 1662: 'o_maintenance_message' => "'".$lang_admin_settings['Maintenance message default']."'", |
1657: 'o_default_dst' => "'0'", | 1663: 'o_default_dst' => "'0'", |
1658: 'p_message_bbcode' => "'1'", | 1664: 'p_message_bbcode' => "'1'", |
1659: 'p_message_img_tag' => "'1'", | 1665: 'p_message_img_tag' => "'1'", |
1744: | 1750: |
1745: | 1751: |
1746: $alerts = array(); | 1752: $alerts = array(); |
| 1753: |
1747: // Check if the cache directory is writable | 1754: // Check if the cache directory is writable |
1748: if (!is_writable('./cache/')) | 1755: if (!is_writable(FORUM_ROOT.'cache/')) |
1749: $alerts[] = '<li>'.$lang_install['No cache write'].'</li>'; | 1756: $alerts[] = '<li><span>'.$lang_install['No cache write'].'</span></li>'; |
1750: | 1757: |
1751: // Check if default avatar directory is writable | 1758: // Check if default avatar directory is writable |
1752: if (!is_writable('./img/avatars/')) | 1759: if (!is_writable(FORUM_ROOT.'img/avatars/')) |
1753: $alerts[] = '<li>'.$lang_install['No avatar write'].'</li>'; | 1760: $alerts[] = '<li><span>'.$lang_install['No avatar write'].'</span></li>'; |
1754: | 1761: |
1755: // Check if we disabled uploading avatars because file_uploads was disabled | 1762: // Check if we disabled uploading avatars because file_uploads was disabled |
1756: if ($avatars == '0') | 1763: if ($avatars == '0') |
1757: $alerts[] = '<li>'.$lang_install['File upload alert'].'</li>'; | 1764: $alerts[] = '<li><span>'.$lang_install['File upload alert'].'</span></li>'; |
1758: | 1765: |
1759: // Add some random bytes at the end of the cookie name to prevent collisions | 1766: // Add some random bytes at the end of the cookie name to prevent collisions |
1760: $cookie_name = 'forum_cookie_'.random_key(6, false, true); | 1767: $cookie_name = 'forum_cookie_'.random_key(6, false, true); |
1841: <p><?php echo $lang_install['Success welcome'] ?></p> | 1848: <p><?php echo $lang_install['Success welcome'] ?></p> |
1842: </div> | 1849: </div> |
1843: | 1850: |
1844: <?php | |
1845: ?> | |
1846: | |
1847: <div id="brd-main" class="main basic"> | 1851: <div id="brd-main" class="main basic"> |
1848: | 1852: |
1849: <div class="main-head"> | 1853: <div class="main-head"> |
1851: </div> | 1855: </div> |
1852: | 1856: |
1853: <div class="main-content main-frm"> | 1857: <div class="main-content main-frm"> |
1854: <?php | 1858: <?php if (!empty($alerts)): ?> |
| 1859: <div class="ct-box error-box"> |
| 1860: <p class="warn"><strong><?php echo $lang_install['Warning'] ?></strong></p> |
| 1861: <ul> |
| 1862: <?php echo implode("\n\t\t\t\t", $alerts)."\n" ?> |
| 1863: </ul> |
| 1864: </div> |
| 1865: <?php endif; |
1855: | 1866: |
1856: if (!$written) | 1867: if (!$written) |
1857: { | 1868: { |
1861: <p class="warn"><?php echo $lang_install['No write info 1'] ?></p> | 1872: <p class="warn"><?php echo $lang_install['No write info 1'] ?></p> |
1862: <p class="warn"><?php printf($lang_install['No write info 2'], '<a href="'.FORUM_ROOT.'index.php">'.$lang_install['Go to index'].'</a>') ?></p> | 1873: <p class="warn"><?php printf($lang_install['No write info 2'], '<a href="'.FORUM_ROOT.'index.php">'.$lang_install['Go to index'].'</a>') ?></p> |
1863: </div> | 1874: </div> |
1864: <?php if (!empty($alerts)): ?> | |
1865: <div class="ct-box error-box"> | |
1866: <p class="warn"><strong><?php echo $lang_install['Warning'] ?></strong></p> | |
1867: <ul> | |
1868: <?php echo implode("\n\t\t\t\t", $alerts)."\n" ?> | |
1869: </ul> | |
1870: </div> | |
1871: <?php endif; ?> | |
1872: <form class="frm-form" method="post" accept-charset="utf-8" action="install.php"> | 1875: <form class="frm-form" method="post" accept-charset="utf-8" action="install.php"> |
1873: <div class="hidden"> | 1876: <div class="hidden"> |
1874: <input type="hidden" name="generate_config" value="1" /> | 1877: <input type="hidden" name="generate_config" value="1" /> |
punbb-1.3.2/admin/users.php |
punbb-1.3.5/admin/users.php |
4: * | 4: * |
5: * Allows administrators or moderators to search the existing users based on various criteria. | 5: * Allows administrators or moderators to search the existing users based on various criteria. |
6: * | 6: * |
7: * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org | 7: * @copyright (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org |
8: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 8: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
9: * @package PunBB | 9: * @package PunBB |
10: */ | 10: */ |
812: } | 812: } |
813: | 813: |
814: | 814: |
815: else if (isset($_POST['find_user'])) | 815: else if (isset($_GET['find_user'])) |
816: { | 816: { |
817: $form = $_POST['form']; | 817: $form = isset($_GET['form']) ? $_GET['form'] : array(); |
818: $form['username'] = $_POST['username']; | 818: |
| 819: // trim() all elements in $form |
| 820: $form = array_map('forum_trim', $form); |
| 821: $conditions = $query_str = array(); |
819: | 822: |
820: //Check up for order_by and direction values | 823: //Check up for order_by and direction values |
821: $order_by = isset($_POST['order_by']) ? forum_trim($_POST['order_by']) : null; | 824: $order_by = isset($_GET['order_by']) ? forum_trim($_GET['order_by']) : null; |
822: $direction = isset($_POST['direction']) ? forum_trim($_POST['direction']) : null; | 825: $direction = isset($_GET['direction']) ? forum_trim($_GET['direction']) : null; |
823: if ($order_by == null || $direction == null) | 826: if ($order_by == null || $direction == null) |
824: message($lang_common['Bad request']); | 827: message($lang_common['Bad request']); |
| 828: |
825: if (!in_array($order_by, array('username', 'email', 'num_posts', 'num_posts', 'registered')) || !in_array($direction, array('ASC', 'DESC'))) | 829: if (!in_array($order_by, array('username', 'email', 'num_posts', 'num_posts', 'registered')) || !in_array($direction, array('ASC', 'DESC'))) |
826: message($lang_common['Bad request']); | 830: message($lang_common['Bad request']); |
827: | 831: |
828: ($hook = get_hook('aus_find_user_selected')) ? eval($hook) : null; | 832: ($hook = get_hook('aus_find_user_selected')) ? eval($hook) : null; |
829: | 833: |
830: // forum_trim() all elements in $form | 834: $query_str[] = 'order_by='.$order_by; |
831: $form = array_map('trim', $form); | 835: $query_str[] = 'direction='.$direction; |
832: $conditions = array(); | 836: |
833: | 837: $posts_greater = isset($_GET['posts_greater']) ? forum_trim($_GET['posts_greater']) : ''; |
834: $posts_greater = forum_trim($_POST['posts_greater']); | 838: $posts_less = isset($_GET['posts_less']) ? forum_trim($_GET['posts_less']) : ''; |
835: $posts_less = forum_trim($_POST['posts_less']); | 839: $last_post_after = isset($_GET['last_post_after']) ? forum_trim($_GET['last_post_after']) : ''; |
836: $last_post_after = forum_trim($_POST['last_post_after']); | 840: $last_post_before = isset($_GET['last_post_before']) ? forum_trim($_GET['last_post_before']) : ''; |
837: $last_post_before = forum_trim($_POST['last_post_before']); | 841: $registered_after = isset($_GET['registered_after']) ? forum_trim($_GET['registered_after']) : ''; |
838: $registered_after = forum_trim($_POST['registered_after']); | 842: $registered_before = isset($_GET['registered_before']) ? forum_trim($_GET['registered_before']) : ''; |
839: $registered_before = forum_trim($_POST['registered_before']); | 843: $user_group = isset($_GET['user_group']) ? intval($_GET['user_group']) : -1; |
840: $user_group = $_POST['user_group']; | 844: |
| 845: $query_str[] = 'user_group='.$user_group; |
841: | 846: |
842: if ((!empty($posts_greater) || !empty($posts_less)) && !ctype_digit($posts_greater.$posts_less)) | 847: if ((!empty($posts_greater) || !empty($posts_less)) && !ctype_digit($posts_greater.$posts_less)) |
843: message($lang_admin_users['Non numeric value message']); | 848: message($lang_admin_users['Non numeric value message']); |
844: | 849: |
845: // Try to convert date/time to timestamps | 850: // Try to convert date/time to timestamps |
846: if ($last_post_after != '') | 851: if ($last_post_after != '') |
847: $last_post_after = strtotime($last_post_after); | 852: { |
848: if ($last_post_before != '') | 853: $query_str[] = 'last_post_after='.$last_post_after; |
849: $last_post_before = strtotime($last_post_before); | |
850: if ($registered_after != '') | |
851: $registered_after = strtotime($registered_after); | |
852: if ($registered_before != '') | |
853: $registered_before = strtotime($registered_before); | |
854: | 854: |
855: if ($last_post_after == -1 || $last_post_before == -1 || $registered_after == -1 || $registered_before == -1) | 855: $last_post_after = strtotime($last_post_after); |
856: message($lang_admin_users['Invalid date/time message']); | 856: if ($last_post_after === false || $last_post_after == -1) |
| 857: message($lang_admin_users['Invalid date/time message']); |
857: | 858: |
858: if ($last_post_after != '') | |
859: $conditions[] = 'u.last_post>'.$last_post_after; | 859: $conditions[] = 'u.last_post>'.$last_post_after; |
| 860: } |
860: if ($last_post_before != '') | 861: if ($last_post_before != '') |
| 862: { |
| 863: $query_str[] = 'last_post_before='.$last_post_before; |
| 864: |
| 865: $last_post_before = strtotime($last_post_before); |
| 866: if ($last_post_before === false || $last_post_before == -1) |
| 867: message($lang_admin_users['Invalid date/time message']); |
| 868: |
861: $conditions[] = 'u.last_post<'.$last_post_before; | 869: $conditions[] = 'u.last_post<'.$last_post_before; |
| 870: } |
862: if ($registered_after != '') | 871: if ($registered_after != '') |
| 872: { |
| 873: $query_str[] = 'registered_after='.$registered_after; |
| 874: |
| 875: $registered_after = strtotime($registered_after); |
| 876: if ($registered_after === false || $registered_after == -1) |
| 877: message($lang_admin_users['Invalid date/time message']); |
| 878: |
863: $conditions[] = 'u.registered>'.$registered_after; | 879: $conditions[] = 'u.registered>'.$registered_after; |
| 880: } |
864: if ($registered_before != '') | 881: if ($registered_before != '') |
| 882: { |
| 883: $query_str[] = 'registered_before='.$registered_before; |
| 884: |
| 885: $registered_before = strtotime($registered_before); |
| 886: if ($registered_before === false || $registered_before == -1) |
| 887: message($lang_admin_users['Invalid date/time message']); |
| 888: |
865: $conditions[] = 'u.registered<'.$registered_before; | 889: $conditions[] = 'u.registered<'.$registered_before; |
| 890: } |
866: | 891: |
867: $like_command = ($db_type == 'pgsql') ? 'ILIKE' : 'LIKE'; | 892: $like_command = ($db_type == 'pgsql') ? 'ILIKE' : 'LIKE'; |
868: foreach ($form as $key => $input) | 893: foreach ($form as $key => $input) |
869: { | 894: { |
870: if ($input != '' && in_array($key, array('username', 'email', 'title', 'realname', 'url', 'jabber', 'icq', 'msn', 'aim', 'yahoo', 'location', 'signature', 'admin_note'))) | 895: if ($input != '' && in_array($key, array('username', 'email', 'title', 'realname', 'url', 'jabber', 'icq', 'msn', 'aim', 'yahoo', 'location', 'signature', 'admin_note'))) |
| 896: { |
871: $conditions[] = 'u.'.$forum_db->escape($key).' '.$like_command.' \''.$forum_db->escape(str_replace('*', '%', $input)).'\''; | 897: $conditions[] = 'u.'.$forum_db->escape($key).' '.$like_command.' \''.$forum_db->escape(str_replace('*', '%', $input)).'\''; |
| 898: $query_str[] = 'form%5B'.$key.'%5D='.urlencode($input); |
| 899: } |
872: } | 900: } |
873: | 901: |
874: if ($posts_greater != '') | 902: if ($posts_greater != '') |
| 903: { |
| 904: $query_str[] = 'posts_greater='.$posts_greater; |
875: $conditions[] = 'u.num_posts>'.$posts_greater; | 905: $conditions[] = 'u.num_posts>'.$posts_greater; |
| 906: } |
876: if ($posts_less != '') | 907: if ($posts_less != '') |
| 908: { |
| 909: $query_str[] = 'posts_less='.$posts_less; |
877: $conditions[] = 'u.num_posts<'.$posts_less; | 910: $conditions[] = 'u.num_posts<'.$posts_less; |
| 911: } |
878: | 912: |
879: if ($user_group != 'all') | 913: if ($user_group > -1) |
880: $conditions[] = 'u.group_id='.intval($user_group); | 914: $conditions[] = 'u.group_id='.intval($user_group); |
881: | 915: |
882: if (empty($conditions)) | 916: if (empty($conditions)) |
883: message($lang_admin_users['No search terms message']); | 917: message($lang_admin_users['No search terms message']); |
884: | 918: |
885: | |
886: // Load the misc.php language file | 919: // Load the misc.php language file |
887: require FORUM_ROOT.'lang/'.$forum_user['language'].'/misc.php'; | 920: require FORUM_ROOT.'lang/'.$forum_user['language'].'/misc.php'; |
888: | 921: |
889: // Find any users matching the conditions | 922: // Fetch user count |
890: $query = array( | 923: $query = array( |
891: 'SELECT' => 'u.id, u.username, u.email, u.title, u.num_posts, u.admin_note, g.g_id, g.g_user_title', | 924: 'SELECT' => 'COUNT(id)', |
892: 'FROM' => 'users AS u', | 925: 'FROM' => 'users AS u', |
893: 'JOINS' => array( | 926: 'JOINS' => array( |
894: array( | 927: array( |
896: 'ON' => 'g.g_id=u.group_id' | 929: 'ON' => 'g.g_id=u.group_id' |
897: ) | 930: ) |
898: ), | 931: ), |
899: 'WHERE' => 'u.id>1 AND '.implode(' AND ', $conditions), | 932: 'WHERE' => 'u.id>1 AND '.implode(' AND ', $conditions) |
900: 'ORDER BY' => $order_by.' '.$direction | |
901: ); | 933: ); |
902: | 934: |
903: ($hook = get_hook('aus_find_user_qr_find_users')) ? eval($hook) : null; | 935: ($hook = get_hook('aus_find_user_qr_count_find_users')) ? eval($hook) : null; |
904: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); | |
905: $forum_page['num_users'] = $forum_db->num_rows($result); | |
906: | 936: |
| 937: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
| 938: $forum_page['num_users'] = $forum_db->result($result); |
| 939: $forum_page['num_pages'] = ceil($forum_page['num_users'] / $forum_user['disp_topics']); |
| 940: $forum_page['page'] = (!isset($_GET['p']) || !is_numeric($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : $_GET['p']; |
| 941: $forum_page['start_from'] = $forum_user['disp_topics'] * ($forum_page['page'] - 1); |
| 942: $forum_page['finish_at'] = min(($forum_page['start_from'] + $forum_user['disp_topics']), ($forum_page['num_users'])); |
907: | 943: |
908: // Setup breadcrumbs | 944: // Setup breadcrumbs |
909: $forum_page['crumbs'] = array( | 945: $forum_page['crumbs'] = array( |
915: $forum_page['crumbs'][] = array($lang_admin_common['Searches'], forum_link($forum_url['admin_users'])); | 951: $forum_page['crumbs'][] = array($lang_admin_common['Searches'], forum_link($forum_url['admin_users'])); |
916: $forum_page['crumbs'][] = $lang_admin_users['User search results']; | 952: $forum_page['crumbs'][] = $lang_admin_users['User search results']; |
917: | 953: |
| 954: // Generate paging |
| 955: $forum_page['page_post']['paging'] = '<p class="paging"><span class="pages">'.$lang_common['Pages'].'</span> '.paginate($forum_page['num_pages'], $forum_page['page'], $forum_url['admin_users'].'?find_user=&'.implode('&', $query_str), $lang_common['Paging separator'], null, true).'</p>'; |
| 956: |
918: ($hook = get_hook('aus_find_user_pre_header_load')) ? eval($hook) : null; | 957: ($hook = get_hook('aus_find_user_pre_header_load')) ? eval($hook) : null; |
919: | 958: |
920: define('FORUM_PAGE_SECTION', 'users'); | 959: define('FORUM_PAGE_SECTION', 'users'); |
961: <tbody> | 1000: <tbody> |
962: <?php | 1001: <?php |
963: | 1002: |
| 1003: // Find any users matching the conditions |
| 1004: $query = array( |
| 1005: 'SELECT' => 'u.id, u.username, u.email, u.title, u.num_posts, u.admin_note, g.g_id, g.g_user_title', |
| 1006: 'FROM' => 'users AS u', |
| 1007: 'JOINS' => array( |
| 1008: array( |
| 1009: 'LEFT JOIN' => 'groups AS g', |
| 1010: 'ON' => 'g.g_id=u.group_id' |
| 1011: ) |
| 1012: ), |
| 1013: 'WHERE' => 'u.id>1 AND '.implode(' AND ', $conditions), |
| 1014: 'ORDER BY' => $order_by.' '.$direction, |
| 1015: 'LIMIT' => $forum_page['start_from'].', '.$forum_page['finish_at'] |
| 1016: ); |
| 1017: |
| 1018: ($hook = get_hook('aus_find_user_qr_find_users')) ? eval($hook) : null; |
| 1019: |
| 1020: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
| 1021: |
964: if ($forum_page['num_users'] > 0) | 1022: if ($forum_page['num_users'] > 0) |
965: { | 1023: { |
966: $forum_page['item_count'] = 0; | 1024: $forum_page['item_count'] = 0; |
1081: | 1139: |
1082: // Setup form | 1140: // Setup form |
1083: $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0; | 1141: $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0; |
1084: $forum_page['form_action'] = ''; | |
1085: | 1142: |
1086: // Setup breadcrumbs | 1143: // Setup breadcrumbs |
1087: $forum_page['crumbs'] = array( | 1144: $forum_page['crumbs'] = array( |
1108: <h2 class="hn"><span><?php echo $lang_admin_users['Search head'] ?></span></h2> | 1165: <h2 class="hn"><span><?php echo $lang_admin_users['Search head'] ?></span></h2> |
1109: </div> | 1166: </div> |
1110: <div class="main-content main-frm"> | 1167: <div class="main-content main-frm"> |
1111: <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo forum_link($forum_url['admin_users']) ?>?action=find_user"> | 1168: <form class="frm-form" method="get" accept-charset="utf-8" action="<?php echo forum_link($forum_url['admin_users']) ?>"> |
1112: <div class="hidden"> | 1169: <div class="hidden"> |
1113: <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(forum_link($forum_url['admin_users']).'?action=find_user') ?>" /> | 1170: <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(forum_link($forum_url['admin_users']).'?action=find_user') ?>" /> |
1114: </div> | 1171: </div> |
1122: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 1179: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
1123: <div class="sf-box text"> | 1180: <div class="sf-box text"> |
1124: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['Username label'] ?></span></label><br /> | 1181: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['Username label'] ?></span></label><br /> |
1125: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="username" size="25" maxlength="25" /></span> | 1182: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[username]" size="35" maxlength="25" /></span> |
1126: </div> | 1183: </div> |
1127: </div> | 1184: </div> |
1128: <?php ($hook = get_hook('aus_search_form_pre_user_title')) ? eval($hook) : null; ?> | 1185: <?php ($hook = get_hook('aus_search_form_pre_user_title')) ? eval($hook) : null; ?> |
1129: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 1186: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
1130: <div class="sf-box text"> | 1187: <div class="sf-box text"> |
1131: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['Title label'] ?></span></label><br /> | 1188: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['Title label'] ?></span></label><br /> |
1132: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[title]" size="30" maxlength="50" /></span> | 1189: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[title]" size="35" maxlength="50" /></span> |
1133: </div> | 1190: </div> |
1134: </div> | 1191: </div> |
1135: <?php ($hook = get_hook('aus_search_form_pre_realname')) ? eval($hook) : null; ?> | 1192: <?php ($hook = get_hook('aus_search_form_pre_realname')) ? eval($hook) : null; ?> |
1136: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 1193: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
1137: <div class="sf-box text"> | 1194: <div class="sf-box text"> |
1138: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['Real name label'] ?></span></label><br /> | 1195: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['Real name label'] ?></span></label><br /> |
1139: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[realname]" size="30" maxlength="40" /></span> | 1196: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[realname]" size="35" maxlength="40" /></span> |
1140: </div> | 1197: </div> |
1141: </div> | 1198: </div> |
1142: <?php ($hook = get_hook('aus_search_form_pre_location')) ? eval($hook) : null; ?> | 1199: <?php ($hook = get_hook('aus_search_form_pre_location')) ? eval($hook) : null; ?> |
1143: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 1200: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
1144: <div class="sf-box text"> | 1201: <div class="sf-box text"> |
1145: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['Location label'] ?></span></label><br /> | 1202: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['Location label'] ?></span></label><br /> |
1146: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[location]" size="30" maxlength="30" /></span> | 1203: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[location]" size="35" maxlength="30" /></span> |
1147: </div> | 1204: </div> |
1148: </div> | 1205: </div> |
1149: <?php ($hook = get_hook('aus_search_form_pre_signature')) ? eval($hook) : null; ?> | 1206: <?php ($hook = get_hook('aus_search_form_pre_signature')) ? eval($hook) : null; ?> |
1157: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 1214: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
1158: <div class="sf-box text"> | 1215: <div class="sf-box text"> |
1159: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['Admin note label'] ?></span></label><br /> | 1216: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['Admin note label'] ?></span></label><br /> |
1160: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[admin_note]" size="30" maxlength="30" /></span> | 1217: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[admin_note]" size="35" maxlength="30" /></span> |
1161: </div> | 1218: </div> |
1162: </div> | 1219: </div> |
1163: <?php ($hook = get_hook('aus_search_form_pre_user_details_fieldset_end')) ? eval($hook) : null; ?> | 1220: <?php ($hook = get_hook('aus_search_form_pre_user_details_fieldset_end')) ? eval($hook) : null; ?> |
1171: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 1228: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
1172: <div class="sf-box text"> | 1229: <div class="sf-box text"> |
1173: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['E-mail address label'] ?></span></label><br /> | 1230: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['E-mail address label'] ?></span></label><br /> |
1174: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[email]" size="30" maxlength="80" /></span> | 1231: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[email]" size="35" maxlength="80" /></span> |
1175: </div> | 1232: </div> |
1176: </div> | 1233: </div> |
1177: <?php ($hook = get_hook('aus_search_form_pre_website')) ? eval($hook) : null; ?> <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 1234: <?php ($hook = get_hook('aus_search_form_pre_website')) ? eval($hook) : null; ?> <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
1183: <?php ($hook = get_hook('aus_search_form_pre_jabber')) ? eval($hook) : null; ?> <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 1240: <?php ($hook = get_hook('aus_search_form_pre_jabber')) ? eval($hook) : null; ?> <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
1184: <div class="sf-box text"> | 1241: <div class="sf-box text"> |
1185: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['Jabber label'] ?></span></label><br /> | 1242: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['Jabber label'] ?></span></label><br /> |
1186: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[jabber]" size="30" maxlength="80" /></span> | 1243: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[jabber]" size="35" maxlength="80" /></span> |
1187: </div> | 1244: </div> |
1188: </div> | 1245: </div> |
1189: <?php ($hook = get_hook('aus_search_form_pre_icq')) ? eval($hook) : null; ?> <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 1246: <?php ($hook = get_hook('aus_search_form_pre_icq')) ? eval($hook) : null; ?> <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
1195: <?php ($hook = get_hook('aus_search_form_pre_msn')) ? eval($hook) : null; ?> <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 1252: <?php ($hook = get_hook('aus_search_form_pre_msn')) ? eval($hook) : null; ?> <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
1196: <div class="sf-box text"> | 1253: <div class="sf-box text"> |
1197: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['MSN Messenger label'] ?></span></label><br /> | 1254: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['MSN Messenger label'] ?></span></label><br /> |
1198: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[msn]" size="30" maxlength="80" /></span> | 1255: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[msn]" size="35" maxlength="80" /></span> |
1199: </div> | 1256: </div> |
1200: </div> | 1257: </div> |
1201: <?php ($hook = get_hook('aus_search_form_pre_aim')) ? eval($hook) : null; ?> <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 1258: <?php ($hook = get_hook('aus_search_form_pre_aim')) ? eval($hook) : null; ?> <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
1304: <div class="sf-box select"> | 1361: <div class="sf-box select"> |
1305: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['User group label'] ?></span></label><br /> | 1362: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['User group label'] ?></span></label><br /> |
1306: <span class="fld-input"><select id="fld<?php echo $forum_page['fld_count'] ?>" name="user_group"> | 1363: <span class="fld-input"><select id="fld<?php echo $forum_page['fld_count'] ?>" name="user_group"> |
1307: <option value="all" selected="selected"><?php echo $lang_admin_users['All groups'] ?></option> | 1364: <option value="-1" selected="selected"><?php echo $lang_admin_users['All groups'] ?></option> |
1308: <option value="<?php echo FORUM_UNVERIFIED ?>"><?php echo $lang_admin_users['Unverified users'] ?></option> | 1365: <option value="<?php echo FORUM_UNVERIFIED ?>"><?php echo $lang_admin_users['Unverified users'] ?></option> |
1309: <?php | 1366: <?php |
1310: | 1367: |
punbb-1.3.2/extern.php |
punbb-1.3.5/extern.php |
5: * Allows forum content to be syndicated outside of the site in various formats | 5: * Allows forum content to be syndicated outside of the site in various formats |
6: * (ie: RSS, Atom, XML, HTML). | 6: * (ie: RSS, Atom, XML, HTML). |
7: * | 7: * |
8: * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org | 8: * @copyright (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org |
9: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 9: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
10: * @package PunBB | 10: * @package PunBB |
11: */ | 11: */ |
120: else | 120: else |
121: echo "\t\t".'<generator>PunBB</generator>'."\n"; | 121: echo "\t\t".'<generator>PunBB</generator>'."\n"; |
122: | 122: |
123: foreach ($feed['items'] as $item) | 123: ($hook = get_hook('ex_add_new_rss_info')) ? eval($hook) : null; |
124: | 124: |
| 125: foreach ($feed['items'] as $item) |
125: { | 126: { |
126: echo "\t\t".'<item>'."\n"; | 127: echo "\t\t".'<item>'."\n"; |
127: echo "\t\t\t".'<title><![CDATA['.escape_cdata($item['title']).']]></title>'."\n"; | 128: echo "\t\t\t".'<title><![CDATA['.escape_cdata($item['title']).']]></title>'."\n"; |
128: echo "\t\t\t".'<link>'.$item['link'].'</link>'."\n"; | 129: echo "\t\t\t".'<link>'.$item['link'].'</link>'."\n"; |
129: echo "\t\t\t".'<description><![CDATA['.escape_cdata($item['description']).']]></description>'."\n"; | 130: echo "\t\t\t".'<description><![CDATA['.escape_cdata($item['description']).']]></description>'."\n"; |
130: echo "\t\t\t".'<author><![CDATA['.(isset($item['author']['email']) ? escape_cdata($item['author']['email']) : 'dummy@example.com').' ('.escape_cdata($item['author']['name']).')]]></author>'."\n"; | 131: echo "\t\t\t".'<author><![CDATA['.(isset($item['author']['email']) ? escape_cdata($item['author']['email']) : 'null@example.com').' ('.escape_cdata($item['author']['name']).')]]></author>'."\n"; |
131: echo "\t\t\t".'<pubDate>'.gmdate('r', $item['pubdate']).'</pubDate>'."\n"; | 132: echo "\t\t\t".'<pubDate>'.gmdate('r', $item['pubdate']).'</pubDate>'."\n"; |
132: echo "\t\t\t".'<guid>'.$item['link'].'</guid>'."\n"; | 133: echo "\t\t\t".'<guid>'.$item['link'].'</guid>'."\n"; |
133: | 134: |
| 135: ($hook = get_hook('ex_add_new_rss_item_info')) ? eval($hook) : null; |
| 136: |
134: echo "\t\t".'</item>'."\n"; | 137: echo "\t\t".'</item>'."\n"; |
135: } | 138: } |
136: | 139: |
164: else | 167: else |
165: echo "\t".'<generator>PunBB</generator>'."\n"; | 168: echo "\t".'<generator>PunBB</generator>'."\n"; |
166: | 169: |
| 170: ($hook = get_hook('ex_add_new_atom_info')) ? eval($hook) : null; |
| 171: |
167: echo "\t".'<id>'.$feed['link'].'</id>'."\n"; | 172: echo "\t".'<id>'.$feed['link'].'</id>'."\n"; |
168: | 173: |
169: $content_tag = ($feed['type'] == 'posts') ? 'content' : 'summary'; | 174: $content_tag = ($feed['type'] == 'posts') ? 'content' : 'summary'; |
186: echo "\t\t\t".'</author>'."\n"; | 191: echo "\t\t\t".'</author>'."\n"; |
187: echo "\t\t\t".'<updated>'.gmdate('Y-m-d\TH:i:s\Z', $item['pubdate']).'</updated>'."\n"; | 192: echo "\t\t\t".'<updated>'.gmdate('Y-m-d\TH:i:s\Z', $item['pubdate']).'</updated>'."\n"; |
188: | 193: |
| 194: ($hook = get_hook('ex_add_new_atom_item_info')) ? eval($hook) : null; |
| 195: |
189: echo "\t\t\t".'<id>'.$item['link'].'</id>'."\n"; | 196: echo "\t\t\t".'<id>'.$item['link'].'</id>'."\n"; |
190: echo "\t\t".'</entry>'."\n"; | 197: echo "\t\t".'</entry>'."\n"; |
191: } | 198: } |
202: global $lang_common, $forum_config; | 209: global $lang_common, $forum_config; |
203: | 210: |
204: // Send XML/no cache headers | 211: // Send XML/no cache headers |
205: header('Content-Type: text/xml; charset=utf-8'); | 212: header('Content-Type: application/xml; charset=utf-8'); |
206: header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); | 213: header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); |
207: header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); | 214: header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); |
208: header('Pragma: public'); | 215: header('Pragma: public'); |
211: echo '<source>'."\n"; | 218: echo '<source>'."\n"; |
212: echo "\t".'<url>'.$feed['link'].'</url>'."\n"; | 219: echo "\t".'<url>'.$feed['link'].'</url>'."\n"; |
213: | 220: |
| 221: ($hook = get_hook('ex_add_new_xml_info')) ? eval($hook) : null; |
| 222: |
214: $forum_tag = ($feed['type'] == 'posts') ? 'post' : 'topic'; | 223: $forum_tag = ($feed['type'] == 'posts') ? 'post' : 'topic'; |
215: | 224: |
216: foreach ($feed['items'] as $item) | 225: foreach ($feed['items'] as $item) |
232: echo "\t\t".'</author>'."\n"; | 241: echo "\t\t".'</author>'."\n"; |
233: echo "\t\t".'<posted>'.gmdate('r', $item['pubdate']).'</posted>'."\n"; | 242: echo "\t\t".'<posted>'.gmdate('r', $item['pubdate']).'</posted>'."\n"; |
234: | 243: |
| 244: ($hook = get_hook('ex_add_new_xml_item_info')) ? eval($hook) : null; |
| 245: |
235: echo "\t".'</'.$forum_tag.'>'."\n"; | 246: echo "\t".'</'.$forum_tag.'>'."\n"; |
236: } | 247: } |
237: | 248: |
247: | 258: |
248: // Send the Content-type header in case the web server is setup to send something else | 259: // Send the Content-type header in case the web server is setup to send something else |
249: header('Content-type: text/html; charset=utf-8'); | 260: header('Content-type: text/html; charset=utf-8'); |
| 261: header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); |
| 262: header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); |
| 263: header('Pragma: public'); |
250: | 264: |
251: foreach ($feed['items'] as $item) | 265: foreach ($feed['items'] as $item) |
252: { | 266: { |
269: if ($show < 1 || $show > 50) | 283: if ($show < 1 || $show > 50) |
270: $show = 15; | 284: $show = 15; |
271: | 285: |
| 286: ($hook = get_hook('ex_set_syndication_type')) ? eval($hook) : null; |
| 287: |
272: // Was a topic ID supplied? | 288: // Was a topic ID supplied? |
273: if (isset($_GET['tid'])) | 289: if (isset($_GET['tid'])) |
274: { | 290: { |
276: | 292: |
277: // Fetch topic subject | 293: // Fetch topic subject |
278: $query = array( | 294: $query = array( |
279: 'SELECT' => 't.subject, t.num_replies, t.first_post_id', | 295: 'SELECT' => 't.subject, t.first_post_id', |
280: 'FROM' => 'topics AS t', | 296: 'FROM' => 'topics AS t', |
281: 'JOINS' => array( | 297: 'JOINS' => array( |
282: array( | 298: array( |
297: | 313: |
298: $cur_topic = $forum_db->fetch_assoc($result); | 314: $cur_topic = $forum_db->fetch_assoc($result); |
299: | 315: |
| 316: if (!defined('FORUM_PARSER_LOADED')) |
| 317: require FORUM_ROOT.'include/parser.php'; |
| 318: |
300: if ($forum_config['o_censoring'] == '1') | 319: if ($forum_config['o_censoring'] == '1') |
301: $cur_topic['subject'] = censor_words($cur_topic['subject']); | 320: $cur_topic['subject'] = censor_words($cur_topic['subject']); |
302: | 321: |
303: // Setup the feed | 322: // Setup the feed |
304: $feed = array( | 323: $feed = array( |
305: 'title' => $forum_config['o_board_title'].' - '.$cur_topic['subject'], | 324: 'title' => $forum_config['o_board_title'].$lang_common['Title separator'].$cur_topic['subject'], |
306: 'link' => forum_link($forum_url['topic'], array($tid, sef_friendly($cur_topic['subject']))), | 325: 'link' => forum_link($forum_url['topic'], array($tid, sef_friendly($cur_topic['subject']))), |
307: 'description' => sprintf($lang_common['RSS description topic'], $cur_topic['subject']), | 326: 'description' => sprintf($lang_common['RSS description topic'], $cur_topic['subject']), |
308: 'items' => array(), | 327: 'items' => array(), |
311: | 330: |
312: // Fetch $show posts | 331: // Fetch $show posts |
313: $query = array( | 332: $query = array( |
314: 'SELECT' => 'p.id, p.poster, p.message, p.posted, p.poster_id, u.email_setting, u.email, p.poster_email', | 333: 'SELECT' => 'p.id, p.poster, p.message, p.hide_smilies, p.posted, p.poster_id, u.email_setting, u.email, p.poster_email', |
315: 'FROM' => 'posts AS p', | 334: 'FROM' => 'posts AS p', |
316: 'JOINS' => array( | 335: 'JOINS' => array( |
317: array( | 336: array( |
318: 'INNER JOIN' => 'users AS u', | 337: 'INNER JOIN' => 'users AS u', |
319: 'ON' => 'u.id = p.poster_id' | 338: 'ON' => 'u.id = p.poster_id' |
320: ) | 339: ) |
321: ), | 340: ), |
322: 'WHERE' => 'p.topic_id='.$tid, | 341: 'WHERE' => 'p.topic_id='.$tid, |
323: 'ORDER BY' => 'p.posted DESC', | 342: 'ORDER BY' => 'p.posted DESC', |
324: 'LIMIT' => $show | 343: 'LIMIT' => $show |
325: ); | 344: ); |
326: | |
327: ($hook = get_hook('ex_qr_get_posts')) ? eval($hook) : null; | 345: ($hook = get_hook('ex_qr_get_posts')) ? eval($hook) : null; |
328: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); | 346: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
| 347: |
329: while ($cur_post = $forum_db->fetch_assoc($result)) | 348: while ($cur_post = $forum_db->fetch_assoc($result)) |
330: { | 349: { |
331: if ($forum_config['o_censoring'] == '1') | 350: if ($forum_config['o_censoring'] == '1') |
332: $cur_post['message'] = censor_words($cur_post['message']); | 351: $cur_post['message'] = censor_words($cur_post['message']); |
333: | 352: |
| 353: $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']); |
| 354: |
334: $item = array( | 355: $item = array( |
335: 'id' => $cur_post['id'], | 356: 'id' => $cur_post['id'], |
336: 'title' => $cur_topic['first_post_id'] == $cur_post['id'] ? $cur_topic['subject'] : $lang_common['RSS reply'].$cur_topic['subject'], | 357: 'title' => $cur_topic['first_post_id'] == $cur_post['id'] ? $cur_topic['subject'] : $lang_common['RSS reply'].$cur_topic['subject'], |
344: | 365: |
345: if ($cur_post['poster_id'] > 1) | 366: if ($cur_post['poster_id'] > 1) |
346: { | 367: { |
347: if ($cur_post['email_setting'] == '0') | 368: if ($cur_post['email_setting'] == '0' && !$forum_user['is_guest']) |
348: $item['author']['email'] = $cur_post['email']; | 369: $item['author']['email'] = $cur_post['email']; |
349: | 370: |
350: $item['author']['uri'] = forum_link($forum_url['user'], $cur_post['poster_id']); | 371: $item['author']['uri'] = forum_link($forum_url['user'], $cur_post['poster_id']); |
351: } | 372: } |
352: else if ($cur_post['poster_email'] != '') | 373: else if ($cur_post['poster_email'] != '' && !$forum_user['is_guest']) |
353: $item['author']['email'] = $cur_post['poster_email']; | 374: $item['author']['email'] = $cur_post['poster_email']; |
354: | 375: |
355: $feed['items'][] = $item; | 376: $feed['items'][] = $item; |
364: } | 385: } |
365: else | 386: else |
366: { | 387: { |
| 388: $forum_name = ''; |
| 389: |
| 390: if (!defined('FORUM_PARSER_LOADED')) |
| 391: require FORUM_ROOT.'include/parser.php'; |
| 392: |
367: // Were any forum ID's supplied? | 393: // Were any forum ID's supplied? |
368: if (isset($_GET['fid']) && is_scalar($_GET['fid']) && $_GET['fid'] != '') | 394: if (isset($_GET['fid']) && is_scalar($_GET['fid']) && $_GET['fid'] != '') |
369: { | 395: { |
372: | 398: |
373: if (!empty($fids)) | 399: if (!empty($fids)) |
374: $forum_sql = ' AND t.forum_id IN('.implode(',', $fids).')'; | 400: $forum_sql = ' AND t.forum_id IN('.implode(',', $fids).')'; |
| 401: |
| 402: if (count($fids) == 1) |
| 403: { |
| 404: // Fetch forum name |
| 405: $query = array( |
| 406: 'SELECT' => 'f.forum_name', |
| 407: 'FROM' => 'forums AS f', |
| 408: 'JOINS' => array( |
| 409: array( |
| 410: 'LEFT JOIN' => 'forum_perms AS fp', |
| 411: 'ON' => '(fp.forum_id=f.id AND fp.group_id='.$forum_user['g_id'].')' |
| 412: ) |
| 413: ), |
| 414: 'WHERE' => '(fp.read_forum IS NULL OR fp.read_forum=1) AND f.id='.$fids[0] |
| 415: ); |
| 416: |
| 417: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
| 418: if ($forum_db->num_rows($result)) |
| 419: $forum_name = $lang_common['Title separator'].$forum_db->result($result); |
| 420: } |
375: } | 421: } |
376: | 422: |
377: // Any forum ID's to exclude? | 423: // Any forum ID's to exclude? |
386: | 432: |
387: // Setup the feed | 433: // Setup the feed |
388: $feed = array( | 434: $feed = array( |
389: 'title' => $forum_config['o_board_title'], | 435: 'title' => $forum_config['o_board_title'].$forum_name, |
390: 'link' => forum_link($forum_url['index']), | 436: 'link' => forum_link($forum_url['index']), |
391: 'description' => sprintf($lang_common['RSS description'], $forum_config['o_board_title']), | 437: 'description' => sprintf($lang_common['RSS description'], $forum_config['o_board_title']), |
392: 'items' => array(), | 438: 'items' => array(), |
395: | 441: |
396: // Fetch $show topics | 442: // Fetch $show topics |
397: $query = array( | 443: $query = array( |
398: 'SELECT' => 't.id, t.poster, t.subject, t.last_post, t.last_poster, p.message, u.email_setting, u.email, p.poster_id, p.poster_email', | 444: 'SELECT' => 't.id, t.poster, t.posted, t.subject, p.message, p.hide_smilies, u.email_setting, u.email, p.poster_id, p.poster_email', |
399: 'FROM' => 'topics AS t', | 445: 'FROM' => 'topics AS t', |
400: 'JOINS' => array( | 446: 'JOINS' => array( |
401: array( | 447: array( |
402: 'INNER JOIN' => 'posts AS p', | 448: 'INNER JOIN' => 'posts AS p', |
403: 'ON' => 'p.id=t.first_post_id' | 449: 'ON' => 'p.id = t.first_post_id' |
404: ), | 450: ), |
405: array( | 451: array( |
406: 'INNER JOIN' => 'users AS u', | 452: 'INNER JOIN' => 'users AS u', |
407: 'ON' => 'u.id = p.poster_id' | 453: 'ON' => 'u.id = p.poster_id' |
408: ), | 454: ), |
409: array( | 455: array( |
410: 'LEFT JOIN' => 'forum_perms AS fp', | 456: 'LEFT JOIN' => 'forum_perms AS fp', |
411: 'ON' => '(fp.forum_id=t.forum_id AND fp.group_id='.$forum_user['g_id'].')' | 457: 'ON' => '(fp.forum_id = t.forum_id AND fp.group_id = '.$forum_user['g_id'].')' |
412: ) | 458: ) |
413: ), | 459: ), |
414: 'WHERE' => '(fp.read_forum IS NULL OR fp.read_forum=1) AND t.moved_to IS NULL', | 460: 'WHERE' => '(fp.read_forum IS NULL OR fp.read_forum = 1) AND t.moved_to IS NULL', |
415: 'ORDER BY' => 't.last_post DESC', | 461: 'ORDER BY' => 't.posted DESC', |
416: 'LIMIT' => $show | 462: 'LIMIT' => $show |
417: ); | 463: ); |
418: | 464: |
429: $cur_topic['message'] = censor_words($cur_topic['message']); | 475: $cur_topic['message'] = censor_words($cur_topic['message']); |
430: } | 476: } |
431: | 477: |
| 478: $cur_topic['message'] = parse_message($cur_topic['message'], $cur_topic['hide_smilies']); |
| 479: |
432: $item = array( | 480: $item = array( |
433: 'id' => $cur_topic['id'], | 481: 'id' => $cur_topic['id'], |
434: 'title' => $cur_topic['subject'], | 482: 'title' => $cur_topic['subject'], |
435: 'link' => forum_link($forum_url['topic_new_posts'], array($cur_topic['id'], sef_friendly($cur_topic['subject']))), | 483: 'link' => forum_link($forum_url['topic_new_posts'], array($cur_topic['id'], sef_friendly($cur_topic['subject']))), |
436: 'description' => $cur_topic['message'], | 484: 'description' => $cur_topic['message'], |
437: 'author' => array( | 485: 'author' => array( |
438: 'name' => $cur_topic['last_poster'] | 486: 'name' => $cur_topic['poster'] |
439: ), | 487: ), |
440: 'pubdate' => $cur_topic['last_post'] | 488: 'pubdate' => $cur_topic['posted'] |
441: ); | 489: ); |
442: | 490: |
443: if ($cur_topic['poster_id'] > 1) | 491: if ($cur_topic['poster_id'] > 1) |
444: { | 492: { |
445: if ($cur_topic['email_setting'] == '0') | 493: if ($cur_topic['email_setting'] == '0' && !$forum_user['is_guest']) |
446: $item['author']['email'] = $cur_topic['email']; | 494: $item['author']['email'] = $cur_topic['email']; |
447: | 495: |
448: $item['author']['uri'] = forum_link($forum_url['user'], $cur_topic['poster_id']); | 496: $item['author']['uri'] = forum_link($forum_url['user'], $cur_topic['poster_id']); |
449: } | 497: } |
450: else if ($cur_topic['poster_email'] != '') | 498: else if ($cur_topic['poster_email'] != '' && !$forum_user['is_guest']) |
451: $item['author']['email'] = $cur_topic['poster_email']; | 499: $item['author']['email'] = $cur_topic['poster_email']; |
452: | 500: |
453: $feed['items'][] = $item; | 501: $feed['items'][] = $item; |
487: { | 535: { |
488: if ($forum_user_online['user_id'] > 1) | 536: if ($forum_user_online['user_id'] > 1) |
489: { | 537: { |
490: $users[] = '<a href="'.forum_link($forum_url['user'], $forum_user_online['user_id']).'">'.forum_htmlencode($forum_user_online['ident']).'</a>'; | 538: $users[] = $forum_user['g_view_users'] == '1' ?'<a href="'.forum_link($forum_url['user'], $forum_user_online['user_id']).'">'.forum_htmlencode($forum_user_online['ident']).'</a>' : forum_htmlencode($forum_user_online['ident']); |
491: ++$num_users; | 539: ++$num_users; |
492: } | 540: } |
493: else | 541: else |
495: } | 543: } |
496: | 544: |
497: ($hook = get_hook('ex_pre_online_output')) ? eval($hook) : null; | 545: ($hook = get_hook('ex_pre_online_output')) ? eval($hook) : null; |
| 546: // Send the Content-type header in case the web server is setup to send something else |
| 547: header('Content-type: text/html; charset=utf-8'); |
| 548: header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); |
| 549: header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); |
| 550: header('Pragma: public'); |
| 551: |
498: | 552: |
499: echo $lang_index['Guests online'].': '.forum_number_format($num_guests).'<br />'."\n"; | 553: echo $lang_index['Guests online'].': '.forum_number_format($num_guests).'<br />'."\n"; |
500: | 554: |
501: if ($_GET['action'] == 'online_full') | 555: if ($_GET['action'] == 'online_full' && !empty($users)) |
502: echo $lang_index['Users online'].': '.implode(', ', $users).'<br />'."\n"; | 556: echo $lang_index['Users online'].': '.implode($lang_index['Online list separator'], $users).'<br />'."\n"; |
503: else | 557: else |
504: echo $lang_index['Users online'].': '.forum_number_format($num_users).'<br />'."\n"; | 558: echo $lang_index['Users online'].': '.forum_number_format($num_users).'<br />'."\n"; |
505: | 559: |
544: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); | 598: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
545: list($stats['total_topics'], $stats['total_posts']) = $forum_db->fetch_row($result); | 599: list($stats['total_topics'], $stats['total_posts']) = $forum_db->fetch_row($result); |
546: | 600: |
| 601: // Send the Content-type header in case the web server is setup to send something else |
| 602: header('Content-type: text/html; charset=utf-8'); |
| 603: header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); |
| 604: header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); |
| 605: header('Pragma: public'); |
| 606: |
547: ($hook = get_hook('ex_pre_stats_output')) ? eval($hook) : null; | 607: ($hook = get_hook('ex_pre_stats_output')) ? eval($hook) : null; |
548: | 608: |
549: echo sprintf($lang_index['No of users'], forum_number_format($stats['total_users'])).'<br />'."\n"; | 609: echo sprintf($lang_index['No of users'], forum_number_format($stats['total_users'])).'<br />'."\n"; |
punbb-1.3.2/include/functions.php |
punbb-1.3.5/include/functions.php |
2: /** | 2: /** |
3: * Loads common functions used throughout the site. | 3: * Loads common functions used throughout the site. |
4: * | 4: * |
5: * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org | 5: * @copyright (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org |
6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
7: * @package PunBB | 7: * @package PunBB |
8: */ | 8: */ |
404: if ($type == FORUM_FT_DATETIME || $type == FORUM_FT_TIME) | 404: if ($type == FORUM_FT_DATETIME || $type == FORUM_FT_TIME) |
405: $formatted_time .= gmdate($time_format, $timestamp); | 405: $formatted_time .= gmdate($time_format, $timestamp); |
406: | 406: |
| 407: ($hook = get_hook('fn_format_time_end')) ? eval($hook) : null; |
| 408: |
407: return $formatted_time; | 409: return $formatted_time; |
408: } | 410: } |
409: | 411: |
555: | 557: |
556: | 558: |
557: // Generate a string with numbered links (for multipage scripts) | 559: // Generate a string with numbered links (for multipage scripts) |
558: function paginate($num_pages, $cur_page, $link, $separator, $args = null) | 560: function paginate($num_pages, $cur_page, $link, $separator, $args = null, $is_default_scheme = null) |
559: { | 561: { |
560: global $forum_url, $lang_common; | 562: global $forum_url, $lang_common; |
561: | 563: |
| 564: if ($is_default_scheme == null) |
| 565: $forum_url_page = $forum_url['page']; |
| 566: else |
| 567: { |
| 568: $forum_url_page = '&p=$1'; |
| 569: unset($forum_url['insertion_find']); |
| 570: } |
| 571: |
562: $pages = array(); | 572: $pages = array(); |
563: $link_to_all = false; | 573: $link_to_all = false; |
564: | 574: |
574: } | 584: } |
575: | 585: |
576: if ($num_pages <= 1) | 586: if ($num_pages <= 1) |
577: $pages = array('<strong class="first-item">1</strong>'); | 587: $pages = array('<strong class="first-item">'.forum_number_format(1).'</strong>'); |
578: else | 588: else |
579: { | 589: { |
580: // Add a previous page link | 590: // Add a previous page link |
581: if ($num_pages > 1 && $cur_page > 1) | 591: if ($num_pages > 1 && $cur_page > 1) |
582: $pages[] = '<a'.(empty($pages) ? ' class="first-item"' : '').' href="'.forum_sublink($link, $forum_url['page'], ($cur_page - 1), $args).'">'.$lang_common['Previous'].'</a>'; | 592: $pages[] = '<a'.(empty($pages) ? ' class="first-item"' : '').' href="'.forum_sublink($link, $forum_url_page, ($cur_page - 1), $args).'">'.$lang_common['Previous'].'</a>'; |
583: | 593: |
584: if ($cur_page > 3) | 594: if ($cur_page > 3) |
585: { | 595: { |
586: $pages[] = '<a'.(empty($pages) ? ' class="first-item"' : '').' href="'.forum_sublink($link, $forum_url['page'], 1, $args).'">1</a>'; | 596: $pages[] = '<a'.(empty($pages) ? ' class="first-item"' : '').' href="'.forum_sublink($link, $forum_url_page, 1, $args).'">'.forum_number_format(1).'</a>'; |
587: | 597: |
588: if ($cur_page > 5) | 598: if ($cur_page > 5) |
589: $pages[] = '<span>'.$lang_common['Spacer'].'</span>'; | 599: $pages[] = '<span>'.$lang_common['Spacer'].'</span>'; |
594: if ($current < 1 || $current > $num_pages) | 604: if ($current < 1 || $current > $num_pages) |
595: continue; | 605: continue; |
596: else if ($current != $cur_page || $link_to_all) | 606: else if ($current != $cur_page || $link_to_all) |
597: $pages[] = '<a'.(empty($pages) ? ' class="first-item" ' : '').' href="'.forum_sublink($link, $forum_url['page'], $current, $args).'">'.forum_number_format($current).'</a>'; | 607: $pages[] = '<a'.(empty($pages) ? ' class="first-item" ' : '').' href="'.forum_sublink($link, $forum_url_page, $current, $args).'">'.forum_number_format($current).'</a>'; |
598: else | 608: else |
599: $pages[] = '<strong'.(empty($pages) ? ' class="first-item"' : '').'>'.forum_number_format($current).'</strong>'; | 609: $pages[] = '<strong'.(empty($pages) ? ' class="first-item"' : '').'>'.forum_number_format($current).'</strong>'; |
600: | 610: |
603: if ($cur_page != ($num_pages-3) && $cur_page != ($num_pages-4)) | 613: if ($cur_page != ($num_pages-3) && $cur_page != ($num_pages-4)) |
604: $pages[] = '<span>'.$lang_common['Spacer'].'</span>'; | 614: $pages[] = '<span>'.$lang_common['Spacer'].'</span>'; |
605: | 615: |
606: $pages[] = '<a'.(empty($pages) ? ' class="first-item" ' : '').' href="'.forum_sublink($link, $forum_url['page'], $num_pages, $args).'">'.forum_number_format($num_pages).'</a>'; | 616: $pages[] = '<a'.(empty($pages) ? ' class="first-item" ' : '').' href="'.forum_sublink($link, $forum_url_page, $num_pages, $args).'">'.forum_number_format($num_pages).'</a>'; |
607: } | 617: } |
608: | 618: |
609: // Add a next page link | 619: // Add a next page link |
610: if ($num_pages > 1 && !$link_to_all && $cur_page < $num_pages) | 620: if ($num_pages > 1 && !$link_to_all && $cur_page < $num_pages) |
611: $pages[] = '<a'.(empty($pages) ? ' class="first-item" ' : '').' href="'.forum_sublink($link, $forum_url['page'], ($cur_page + 1), $args).'">'.$lang_common['Next'].'</a>'; | 621: $pages[] = '<a'.(empty($pages) ? ' class="first-item" ' : '').' href="'.forum_sublink($link, $forum_url_page, ($cur_page + 1), $args).'">'.$lang_common['Next'].'</a>'; |
612: } | 622: } |
613: | 623: |
614: ($hook = get_hook('fn_paginate_end')) ? eval($hook) : null; | 624: ($hook = get_hook('fn_paginate_end')) ? eval($hook) : null; |
631: <div id="brd-debug" class="main"> | 641: <div id="brd-debug" class="main"> |
632: | 642: |
633: <div class="main-head"> | 643: <div class="main-head"> |
634: <h2><span><?php echo $lang_common['Debug table'] ?></span></h2> | 644: <h2 class="hn"><span><?php echo $lang_common['Debug table'] ?></span></h2> |
635: </div> | 645: </div> |
636: | 646: |
637: <div class="main-content debug"> | 647: <div class="main-content debug"> |
749: global $forum_config, $forum_user; | 759: global $forum_config, $forum_user; |
750: static $lang_url_replace, $forum_reserved_strings; | 760: static $lang_url_replace, $forum_reserved_strings; |
751: | 761: |
752: if (!isset($lang_replace)) | 762: if (!isset($lang_url_replace)) |
753: require FORUM_ROOT.'lang/'.$forum_user['language'].'/url_replace.php'; | 763: require FORUM_ROOT.'lang/'.$forum_user['language'].'/url_replace.php'; |
754: | 764: |
755: if (!isset($forum_reserved_strings)) | 765: if (!isset($forum_reserved_strings)) |
772: foreach ($forum_reserved_strings as $match => $replace) | 782: foreach ($forum_reserved_strings as $match => $replace) |
773: if ($str == $match) | 783: if ($str == $match) |
774: return $replace; | 784: return $replace; |
| 785: else if ($match != '') |
| 786: $str = str_replace($match, $replace, $str); |
775: | 787: |
776: return $str; | 788: return $str; |
777: } | 789: } |
937: function get_scheme_packs() | 949: function get_scheme_packs() |
938: { | 950: { |
939: $schemes = array(); | 951: $schemes = array(); |
940: | 952: |
941: if($handle = opendir(FORUM_ROOT.'include/url')) | 953: if($handle = opendir(FORUM_ROOT.'include/url')) |
942: { | 954: { |
943: while (false !== ($dirname = readdir($handle))) | 955: while (false !== ($dirname = readdir($handle))) |
959: function get_style_packs() | 971: function get_style_packs() |
960: { | 972: { |
961: $styles = array(); | 973: $styles = array(); |
962: | 974: |
963: if($handle = opendir(FORUM_ROOT.'style')) | 975: if($handle = opendir(FORUM_ROOT.'style')) |
964: { | 976: { |
965: while (false !== ($dirname = readdir($handle))) | 977: while (false !== ($dirname = readdir($handle))) |
1360: | 1372: |
1361: $forum_user = $forum_db->fetch_assoc($result); | 1373: $forum_user = $forum_db->fetch_assoc($result); |
1362: | 1374: |
1363: // Update online list | 1375: if (!defined('FORUM_QUIET_VISIT')) |
1364: if (!$forum_user['logged']) | |
1365: { | 1376: { |
1366: $forum_user['logged'] = time(); | 1377: // Update online list |
1367: $forum_user['csrf_token'] = random_key(40, false, true); | 1378: if (!$forum_user['logged']) |
1368: $forum_user['prev_url'] = get_current_url(255); | 1379: { |
| 1380: $forum_user['logged'] = time(); |
| 1381: $forum_user['csrf_token'] = random_key(40, false, true); |
| 1382: $forum_user['prev_url'] = get_current_url(255); |
1369: | 1383: |
1370: // REPLACE INTO avoids a user having two rows in the online table | 1384: // REPLACE INTO avoids a user having two rows in the online table |
1371: $query = array( | 1385: $query = array( |
1372: 'REPLACE' => 'user_id, ident, logged, csrf_token', | 1386: 'REPLACE' => 'user_id, ident, logged, csrf_token', |
1373: 'INTO' => 'online', | 1387: 'INTO' => 'online', |
1374: 'VALUES' => '1, \''.$forum_db->escape($remote_addr).'\', '.$forum_user['logged'].', \''.$forum_user['csrf_token'].'\'', | 1388: 'VALUES' => '1, \''.$forum_db->escape($remote_addr).'\', '.$forum_user['logged'].', \''.$forum_user['csrf_token'].'\'', |
1375: 'UNIQUE' => 'user_id=1 AND ident=\''.$forum_db->escape($remote_addr).'\'' | 1389: 'UNIQUE' => 'user_id=1 AND ident=\''.$forum_db->escape($remote_addr).'\'' |
1376: ); | 1390: ); |
1377: | 1391: |
1378: if ($forum_user['prev_url'] != null) | 1392: if ($forum_user['prev_url'] != null) |
1379: { | 1393: { |
1380: $query['REPLACE'] .= ', prev_url'; | 1394: $query['REPLACE'] .= ', prev_url'; |
1381: $query['VALUES'] .= ', \''.$forum_db->escape($forum_user['prev_url']).'\''; | 1395: $query['VALUES'] .= ', \''.$forum_db->escape($forum_user['prev_url']).'\''; |
1382: } | 1396: } |
1383: | 1397: |
1384: ($hook = get_hook('fn_set_default_user_qr_add_online_guest_user')) ? eval($hook) : null; | 1398: ($hook = get_hook('fn_set_default_user_qr_add_online_guest_user')) ? eval($hook) : null; |
1385: $forum_db->query_build($query) or error(__FILE__, __LINE__); | 1399: $forum_db->query_build($query) or error(__FILE__, __LINE__); |
1386: } | 1400: } |
1387: else | 1401: else |
1388: { | 1402: { |
1389: $query = array( | 1403: $query = array( |
1390: 'UPDATE' => 'online', | 1404: 'UPDATE' => 'online', |
1391: 'SET' => 'logged='.time(), | 1405: 'SET' => 'logged='.time(), |
1392: 'WHERE' => 'ident=\''.$forum_db->escape($remote_addr).'\'' | 1406: 'WHERE' => 'ident=\''.$forum_db->escape($remote_addr).'\'' |
1393: ); | 1407: ); |
1394: | 1408: |
1395: $current_url = get_current_url(255); | 1409: $current_url = get_current_url(255); |
1396: if ($current_url != null) | 1410: if ($current_url != null) |
1397: $query['SET'] .= ', prev_url=\''.$forum_db->escape($current_url).'\''; | 1411: $query['SET'] .= ', prev_url=\''.$forum_db->escape($current_url).'\''; |
1398: | 1412: |
1399: ($hook = get_hook('fn_set_default_user_qr_update_online_guest_user')) ? eval($hook) : null; | 1413: ($hook = get_hook('fn_set_default_user_qr_update_online_guest_user')) ? eval($hook) : null; |
1400: $forum_db->query_build($query) or error(__FILE__, __LINE__); | 1414: $forum_db->query_build($query) or error(__FILE__, __LINE__); |
| 1415: } |
1401: } | 1416: } |
1402: | 1417: |
1403: $forum_user['disp_topics'] = $forum_config['o_disp_topics_default']; | 1418: $forum_user['disp_topics'] = $forum_config['o_disp_topics_default']; |
1408: $forum_user['style'] = $forum_config['o_default_style']; | 1423: $forum_user['style'] = $forum_config['o_default_style']; |
1409: $forum_user['is_guest'] = true; | 1424: $forum_user['is_guest'] = true; |
1410: $forum_user['is_admmod'] = false; | 1425: $forum_user['is_admmod'] = false; |
| 1426: |
| 1427: ($hook = get_hook('fn_set_default_user_end')) ? eval($hook) : null; |
1411: } | 1428: } |
1412: | 1429: |
1413: | 1430: |
1452: if ($cur_ban['username'] != '' && utf8_strtolower($forum_user['username']) == utf8_strtolower($cur_ban['username'])) | 1469: if ($cur_ban['username'] != '' && utf8_strtolower($forum_user['username']) == utf8_strtolower($cur_ban['username'])) |
1453: $is_banned = true; | 1470: $is_banned = true; |
1454: | 1471: |
| 1472: if ($cur_ban['email'] != '' && $forum_user['email'] == $cur_ban['email']) |
| 1473: $is_banned = true; |
| 1474: |
1455: if ($cur_ban['ip'] != '') | 1475: if ($cur_ban['ip'] != '') |
1456: { | 1476: { |
1457: $cur_ban_ips = explode(' ', $cur_ban['ip']); | 1477: $cur_ban_ips = explode(' ', $cur_ban['ip']); |
1534: else | 1554: else |
1535: { | 1555: { |
1536: // If the entry is older than "o_timeout_visit", update last_visit for the user in question, then delete him/her from the online list | 1556: // If the entry is older than "o_timeout_visit", update last_visit for the user in question, then delete him/her from the online list |
1537: if ($cur_user['idle'] != '0') | 1557: if ($cur_user['logged'] < ($now - $forum_config['o_timeout_visit'])) |
1538: { | 1558: { |
1539: $query = array( | 1559: $query = array( |
1540: 'UPDATE' => 'users', | 1560: 'UPDATE' => 'users', |
2772: | 2792: |
2773: | 2793: |
2774: // START SUBST - <!-- forum_head --> | 2794: // START SUBST - <!-- forum_head --> |
| 2795: |
2775: ob_start(); | 2796: ob_start(); |
2776: | 2797: |
2777: ?> | 2798: require FORUM_ROOT.'style/'.$forum_user['style'].'/'.$forum_user['style'].'.php'; |
2778: <title><?php echo $lang_common['Maintenance'].' - '.forum_htmlencode($forum_config['o_board_title']) ?></title> | |
2779: <link rel="stylesheet" type="text/css" media="screen" href="<?php echo $base_url ?>/style/<?php echo $forum_user['style'] ?>/<?php echo $forum_user['style'].'.css' ?>" /> | |
2780: <link rel="stylesheet" type="text/css" media="screen" href="<?php echo $base_url ?>/style/<?php echo $forum_user['style'] ?>/<?php echo $forum_user['style'].'_cs.css' ?>" /> | |
2781: <!--[if lte IE 6]><link rel="stylesheet" type="text/css" href="<?php echo $base_url ?>/style/<?php echo $forum_user['style'] ?>/<?php echo $forum_user['style'].'_fix.css' ?>" /><![endif]--> | |
2782: <!--[if IE 7]><link rel="stylesheet" type="text/css" href="<?php echo $base_url ?>/style/<?php echo $forum_user['style'] ?>/<?php echo $forum_user['style'].'_fix7.css' ?>" /><![endif]--> | |
2783: <?php | |
2784: | 2799: |
2785: $tpl_temp = forum_trim(ob_get_contents()); | 2800: $tpl_temp = forum_trim(ob_get_contents()); |
2786: $tpl_maint = str_replace('<!-- forum_head -->', $tpl_temp, $tpl_maint); | 2801: $tpl_maint = str_replace('<!-- forum_head -->', $tpl_temp, $tpl_maint); |
2792: ob_start(); | 2807: ob_start(); |
2793: | 2808: |
2794: ?> | 2809: ?> |
2795: <div id="brd-main" class="main basic"> | |
2796: | |
2797: <div class="main-head"> | 2810: <div class="main-head"> |
2798: <h1 class="hn"><span><?php echo $lang_common['Maintenance mode'] ?></span></h1> | 2811: <h1 class="hn"><span><?php echo $lang_common['Maintenance mode'] ?></span></h1> |
2799: </div> | 2812: </div> |
2802: <?php echo $message."\n" ?> | 2815: <?php echo $message."\n" ?> |
2803: </div> | 2816: </div> |
2804: </div> | 2817: </div> |
2805: | |
2806: </div> | |
2807: <?php | 2818: <?php |
2808: | 2819: |
2809: $tpl_temp = "\t".forum_trim(ob_get_contents()); | 2820: $tpl_temp = "\t".forum_trim(ob_get_contents()); |
2887: // START SUBST - <!-- forum_head --> | 2898: // START SUBST - <!-- forum_head --> |
2888: | 2899: |
2889: $forum_head['refresh'] = '<meta http-equiv="refresh" content="'.$forum_config['o_redirect_delay'].';URL='.str_replace(array('<', '>', '"'), array('<', '>', '"'), $destination_url).'" />'; | 2900: $forum_head['refresh'] = '<meta http-equiv="refresh" content="'.$forum_config['o_redirect_delay'].';URL='.str_replace(array('<', '>', '"'), array('<', '>', '"'), $destination_url).'" />'; |
2890: $forum_head['title'] = '<title>'.$lang_common['Redirecting'].' - '.forum_htmlencode($forum_config['o_board_title']).'</title>'; | 2901: $forum_head['title'] = '<title>'.$lang_common['Redirecting'].$lang_common['Title separator'].forum_htmlencode($forum_config['o_board_title']).'</title>'; |
2891: | 2902: |
2892: ob_start(); | 2903: ob_start(); |
2893: | 2904: |
2966: // Display a simple error message | 2977: // Display a simple error message |
2967: function error() | 2978: function error() |
2968: { | 2979: { |
| 2980: global $forum_config; |
| 2981: |
2969: if (!headers_sent()) | 2982: if (!headers_sent()) |
2970: { | 2983: { |
| 2984: // if no HTTP responce code is set we send 503 |
| 2985: if (!defined('FORUM_HTTP_RESPONSE_CODE_SET')) |
| 2986: header('HTTP/1.1 503 Service Temporarily Unavailable'); |
2971: header('Content-type: text/html; charset=utf-8'); | 2987: header('Content-type: text/html; charset=utf-8'); |
2972: header('HTTP/1.1 503 Service Temporarily Unavailable'); | |
2973: } | 2988: } |
2974: | 2989: |
2975: global $forum_config; | |
2976: | |
2977: /* | 2990: /* |
2978: Parse input parameters. Possible function signatures: | 2991: Parse input parameters. Possible function signatures: |
2979: error('Error message.'); | 2992: error('Error message.'); |
3006: while (@ob_end_clean()); | 3019: while (@ob_end_clean()); |
3007: | 3020: |
3008: // "Restart" output buffering if we are using ob_gzhandler (since the gzip header is already sent) | 3021: // "Restart" output buffering if we are using ob_gzhandler (since the gzip header is already sent) |
3009: if (!empty($forum_config['o_gzip']) && extension_loaded('zlib') && (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false || strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') !== false)) | 3022: if (!empty($forum_config['o_gzip']) && extension_loaded('zlib') && !empty($_SERVER['HTTP_ACCEPT_ENCODING']) && (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false || strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') !== false)) |
3010: ob_start('ob_gzhandler'); | 3023: ob_start('ob_gzhandler'); |
3011: | 3024: |
3012: ?> | 3025: ?> |
3057: | 3070: |
3058: exit; | 3071: exit; |
3059: } | 3072: } |
| 3073: |
| 3074: // Check the text is CAPSED |
| 3075: function check_is_all_caps($text) |
| 3076: { |
| 3077: return (bool)/**/(utf8_strtoupper($text) == $text && utf8_strtolower($text) != $text); |
| 3078: } |
3060: | 3079: |
punbb-1.3.2/include/parser.php |
punbb-1.3.5/include/parser.php |
2: /** | 2: /** |
3: * Loads various functions used to parse posts. | 3: * Loads various functions used to parse posts. |
4: * | 4: * |
5: * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org | 5: * @copyright (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org |
6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
7: * @package PunBB | 7: * @package PunBB |
8: */ | 8: */ |
44: if (strpos($text, '[code]') !== false && strpos($text, '[/code]') !== false) | 44: if (strpos($text, '[code]') !== false && strpos($text, '[/code]') !== false) |
45: { | 45: { |
46: list($inside, $outside) = split_text($text, '[code]', '[/code]', $errors); | 46: list($inside, $outside) = split_text($text, '[code]', '[/code]', $errors); |
47: $text = implode("\0", $outside); | 47: $text = implode("\xc1", $outside); |
48: } | 48: } |
49: | 49: |
50: // Tidy up lists | 50: // Tidy up lists |
51: $pattern = array('/\[list(?:=([1a\*]))?\]((?>(?:(?!\[list(?:=(?:[1a\*]))\]|\[\/list\]).+?)|(?R))*)\[\/list\]/ems'); | 51: $pattern = array('%\[list(?:=([1a*]))?+\]((?:(?>.*?(?=\[list(?:=[1a*])?+\]|\[/list\]))|(?R))*)\[/list\]%ise'); |
52: $replace = array('preparse_list_tag(\'$2\', \'$1\', $errors)'); | 52: $replace = array('preparse_list_tag(\'$2\', \'$1\', $errors)'); |
53: $text = preg_replace($pattern, $replace, $text); | 53: $text = preg_replace($pattern, $replace, $text); |
54: | 54: |
60: // If we split up the message before we have to concatenate it together again (code tags) | 60: // If we split up the message before we have to concatenate it together again (code tags) |
61: if (isset($inside)) | 61: if (isset($inside)) |
62: { | 62: { |
63: $outside = explode("\0", $text); | 63: $outside = explode("\xc1", $text); |
64: $text = ''; | 64: $text = ''; |
65: | 65: |
66: $num_tokens = count($outside); | 66: $num_tokens = count($outside); |
520: | 520: |
521: if (strpos($content,'[list') !== false) | 521: if (strpos($content,'[list') !== false) |
522: { | 522: { |
523: $pattern = array('/\[list(?:=([1a\*]))?\]((?>(?:(?!\[list(?:=(?:[1a\*]))\]|\[\/list\]).+?)|(?R))*)\[\/list\]/ems'); | 523: $pattern = array('%\[list(?:=([1a*]))?+\]((?:(?>.*?(?=\[list(?:=[1a*])?+\]|\[/list\]))|(?R))*)\[/list\]%ise'); |
524: $replace = array('preparse_list_tag(\'$2\', \'$1\', $errors)'); | 524: $replace = array('preparse_list_tag(\'$2\', \'$1\', $errors)'); |
525: $content = preg_replace($pattern, $replace, $content); | 525: $content = preg_replace($pattern, $replace, $content); |
526: } | 526: } |
592: | 592: |
593: // Ok, not very pretty :-) | 593: // Ok, not very pretty :-) |
594: if (!$bbcode) | 594: if (!$bbcode) |
595: $link = ($link == '' || $link == $url) ? ((utf8_strlen($url) > 55) ? utf8_substr($url, 0 , 39).' … '.utf8_substr($url, -10) : $url) : stripslashes($link); | 595: $link = ($link == '' || $link == $url) ? ((utf8_strlen($url) > 55) ? utf8_substr($url, 0 , 39).' … '.utf8_substr($url, -10) : $url) : stripslashes($link); |
596: | 596: |
597: $return = ($hook = get_hook('ps_handle_url_tag_end')) ? eval($hook) : null; | 597: $return = ($hook = get_hook('ps_handle_url_tag_end')) ? eval($hook) : null; |
598: if ($return != null) | 598: if ($return != null) |
649: | 649: |
650: if (strpos($content,'[list') !== false) | 650: if (strpos($content,'[list') !== false) |
651: { | 651: { |
652: $pattern = array('/\[list(?:=([1a\*]))?\]((?>(?:(?!\[list(?:=(?:[1a\*]))\]|\[\/list\]).+?)|(?R))*)\[\/list\]/ems'); | 652: $pattern = array('%\[list(?:=([1a*]))?+\]((?:(?>.*?(?=\[list(?:=[1a*])?+\]|\[/list\]))|(?R))*)\[/list\]%ise'); |
653: $replace = array('handle_list_tag(\'$2\', \'$1\')'); | 653: $replace = array('handle_list_tag(\'$2\', \'$1\')'); |
654: $content = preg_replace($pattern, $replace, $content); | 654: $content = preg_replace($pattern, $replace, $content); |
655: } | 655: } |
688: | 688: |
689: if (!$is_signature) | 689: if (!$is_signature) |
690: { | 690: { |
691: $pattern[] = '/\[list(?:=([1a\*]))?\]((?>(?:(?!\[list(?:=(?:[1a\*]))\]|\[\/list\]).+?)|(?R))*)\[\/list\]/ems'; | 691: $pattern[] = '%\[list(?:=([1a*]))?+\]((?:(?>.*?(?=\[list(?:=[1a*])?+\]|\[/list\]))|(?R))*)\[/list\]%ise'; |
692: $replace[] = 'handle_list_tag(\'$2\', \'$1\')'; | 692: $replace[] = 'handle_list_tag(\'$2\', \'$1\')'; |
693: } | 693: } |
694: | 694: |
752: { | 752: { |
753: $text = ' '.$text; | 753: $text = ' '.$text; |
754: | 754: |
755: $text = preg_replace('#(?<=[\s\]\)])(<)?(\[)?(\()?([\'"]?)(https?|ftp|news){1}://([\w\-]+\.([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^\s\[]*[^\s.,?!\[;:-]?)?)\4(?(3)(\)))(?(2)(\]))(?(1)(>))(?![^\s]*\[/(?:url|img)\])#ie', 'stripslashes(\'$1$2$3$4\').handle_url_tag(\'$5://$6\', \'$5://$6\', true).stripslashes(\'$4$10$11$12\')', $text); | 755: $text = preg_replace('#(?<=[\s\]\)])(<)?(\[)?(\()?([\'"]?)(https?|ftp|news){1}://([\w\-]+\.([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^\s\[]*[^\s.,?!\[;:-])?)\4(?(3)(\)))(?(2)(\]))(?(1)(>))(?![^\s]*\[/(?:url|img)\])#ie', 'stripslashes(\'$1$2$3$4\').handle_url_tag(\'$5://$6\', \'$5://$6\', true).stripslashes(\'$4$10$11$12\')', $text); |
756: $text = preg_replace('#(?<=[\s\]\)])(<)?(\[)?(\()?([\'"]?)(www|ftp)\.(([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^\s\[]*[^\s.,?!\[;:-])?)\4(?(3)(\)))(?(2)(\]))(?(1)(>))(?![^\s]*\[/(?:url|img)\])#ie', 'stripslashes(\'$1$2$3$4\').handle_url_tag(\'$5.$6\', \'$5.$6\', true).stripslashes(\'$4$10$11$12\')', $text); | 756: $text = preg_replace('#(?<=[\s\]\)])(<)?(\[)?(\()?([\'"]?)(www|ftp)\.(([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^\s\[]*[^\s.,?!\[;:-])?)\4(?(3)(\)))(?(2)(\]))(?(1)(>))(?![^\s]*\[/(?:url|img)\])#ie', 'stripslashes(\'$1$2$3$4\').handle_url_tag(\'$5.$6\', \'$5.$6\', true).stripslashes(\'$4$10$11$12\')', $text); |
757: | 757: |
758: return substr($text, 1); | 758: return substr($text, 1); |
766: { | 766: { |
767: global $forum_config, $base_url, $smilies; | 767: global $forum_config, $base_url, $smilies; |
768: | 768: |
| 769: $return = ($hook = get_hook('ps_do_smilies_start')) ? eval($hook) : null; |
| 770: if ($return != null) |
| 771: return $return; |
| 772: |
769: $text = ' '.$text.' '; | 773: $text = ' '.$text.' '; |
770: | 774: |
771: foreach ($smilies as $smiley_text => $smiley_img) | 775: foreach ($smilies as $smiley_text => $smiley_img) |
774: $text = preg_replace("#(?<=[>\s])".preg_quote($smiley_text, '#')."(?=\W)#m", '<img src="'.$base_url.'/img/smilies/'.$smiley_img.'" width="15" height="15" alt="'.substr($smiley_img, 0, strrpos($smiley_img, '.')).'" />', $text); | 778: $text = preg_replace("#(?<=[>\s])".preg_quote($smiley_text, '#')."(?=\W)#m", '<img src="'.$base_url.'/img/smilies/'.$smiley_img.'" width="15" height="15" alt="'.substr($smiley_img, 0, strrpos($smiley_img, '.')).'" />', $text); |
775: } | 779: } |
776: | 780: |
| 781: $return = ($hook = get_hook('ps_do_smilies_end')) ? eval($hook) : null; |
| 782: |
777: return substr($text, 1, -1); | 783: return substr($text, 1, -1); |
778: } | 784: } |
779: | 785: |
807: if (strpos($text, '[code]') !== false && strpos($text, '[/code]') !== false) | 813: if (strpos($text, '[code]') !== false && strpos($text, '[/code]') !== false) |
808: { | 814: { |
809: list($inside, $outside) = split_text($text, '[code]', '[/code]', $errors); | 815: list($inside, $outside) = split_text($text, '[code]', '[/code]', $errors); |
810: $text = implode("\0", $outside); | 816: $text = implode("\xc1", $outside); |
811: } | 817: } |
812: | 818: |
813: $return = ($hook = get_hook('ps_parse_message_post_split')) ? eval($hook) : null; | 819: $return = ($hook = get_hook('ps_parse_message_post_split')) ? eval($hook) : null; |
836: // If we split up the message before we have to concatenate it together again (code tags) | 842: // If we split up the message before we have to concatenate it together again (code tags) |
837: if (isset($inside)) | 843: if (isset($inside)) |
838: { | 844: { |
839: $outside = explode("\0", $text); | 845: $outside = explode("\xc1", $text); |
840: $text = ''; | 846: $text = ''; |
841: | 847: |
842: $num_tokens = count($outside); | 848: $num_tokens = count($outside); |
punbb-1.3.2/lang/English/admin_settings.php |
punbb-1.3.5/lang/English/admin_settings.php |
24: 'Setup timeouts' => 'Default timeouts and redirect delay', | 24: 'Setup timeouts' => 'Default timeouts and redirect delay', |
25: 'Setup timeouts legend' => 'Timeout defaults', | 25: 'Setup timeouts legend' => 'Timeout defaults', |
26: 'Visit timeout label' => 'Visit timeout', | 26: 'Visit timeout label' => 'Visit timeout', |
27: 'Visit timeout help' => 'Seconds idle before last visit data is updated', | 27: 'Visit timeout help' => 'Seconds idle before user is logged out', |
28: 'Online timeout label' => 'Online timeout', | 28: 'Online timeout label' => 'Online timeout', |
29: 'Online timeout help' => 'Seconds idle before being removed from the online users list', | 29: 'Online timeout help' => 'Seconds idle before being removed from the online users list', |
30: 'Redirect time label' => 'Redirect wait', | 30: 'Redirect time label' => 'Redirect wait', |
51: 'Setup links legend' => 'Menu items', | 51: 'Setup links legend' => 'Menu items', |
52: 'Enter links label' => 'Enter your links', | 52: 'Enter links label' => 'Enter your links', |
53: 'Error no board title' => 'You must enter a board title.', | 53: 'Error no board title' => 'You must enter a board title.', |
54: 'Error timeout value' => 'The value of "Timeout online" must be smaller than the value of "Timeout visit".', | 54: 'Error timeout value' => 'The value of "Online timeout" must be smaller than the value of "Visit timeout".', |
55: | 55: |
56: | 56: |
57: // Features section | 57: // Features section |
78: 'Guest posting' => 'Guest posting', | 78: 'Guest posting' => 'Guest posting', |
79: 'Guest posting label' => 'Guests must supply e-mail addresses when posting.', | 79: 'Guest posting label' => 'Guests must supply e-mail addresses when posting.', |
80: 'User has posted' => 'User has posted', | 80: 'User has posted' => 'User has posted', |
81: 'User has posted label' => 'Display a dot in front of topics to indicate to a user that they have posted in that topic earlier. Disable if you are experiencing high server load.', | 81: 'User has posted label' => 'Display a dot in front of topics to indicate to a user that they have posted in that topic earlier. Disable if you are experiencing high server load. Ignore for SQLite.', |
82: 'Topic views' => 'Topic views', | 82: 'Topic views' => 'Topic views', |
83: 'Topic views label' => 'Keep track of the number of views a topic has. Disable if you are experiencing high server load in a busy forum.', | 83: 'Topic views label' => 'Keep track of the number of views a topic has. Disable if you are experiencing high server load in a busy forum.', |
84: 'User post count' => 'User post count', | 84: 'User post count' => 'User post count', |
164: 'Allow form e-mail label' => 'Hide e-mail address but allow e-mail via the forum.', | 164: 'Allow form e-mail label' => 'Hide e-mail address but allow e-mail via the forum.', |
165: 'Disallow form e-mail label' => 'Hide e-mail address and disallow e-mail via the forum.', | 165: 'Disallow form e-mail label' => 'Hide e-mail address and disallow e-mail via the forum.', |
166: 'Registration rules' => 'Forum rules (enable and compose forum rules)', | 166: 'Registration rules' => 'Forum rules (enable and compose forum rules)', |
167: 'Registration rules info' => 'You may require new users to agree to a set of rules when registering. The rules will always be available through a link in the navigation table at the top of every page. You may enable the use of rules and then compose your rules below.', | 167: 'Registration rules info' => 'You may require new users to agree to a set of rules when registering. The rules will always be available through a link in the navigation menu at the top of every page. You may enable the use of rules and then compose your rules below.', |
168: 'Registration rules legend' => 'Forum rules', | 168: 'Registration rules legend' => 'Forum rules', |
169: 'Require rules' => 'Require agreement', | 169: 'Require rules' => 'Use rules', |
170: 'Require rules label' => 'Users must agree to forum rules before registering.', | 170: 'Require rules label' => 'Users must agree to forum rules before registering.', |
171: 'Compose rules label' => 'Compose rules', | 171: 'Compose rules label' => 'Compose rules', |
172: 'Compose rules help' => 'You may use HTML as text is not parsed. Leaving empty disables the use of rules.', | 172: 'Compose rules help' => 'You may use HTML as text is not parsed.', |
173: 'Rules default' => 'Enter your rules here.', | 173: 'Rules default' => 'Enter your rules here.', |
174: | 174: |
175: // Email section | 175: // Email section |
196: | 196: |
197: // Maintenance section | 197: // Maintenance section |
198: 'Maintenance head' => 'Setup maintenance message and activate maintenance mode', | 198: 'Maintenance head' => 'Setup maintenance message and activate maintenance mode', |
199: 'Maintenance mode info' => '<strong>IMPORTANT!</strong> Putting the board into maintenance mode means it will only be available to administrators. This should be used if the board needs to taken down temporarily for maintenance.', | 199: 'Maintenance mode info' => '<strong>IMPORTANT!</strong> Putting the board into maintenance mode means it will only be available to administrators. This should be used if the board needs to be taken down temporarily for maintenance.', |
200: 'Maintenance mode warn' => '<strong>WARNING!</strong> DO NOT LOGOUT when the board is in maintenance mode. You will not be able to login again.', | 200: 'Maintenance mode warn' => '<strong>WARNING!</strong> DO NOT LOGOUT when the board is in maintenance mode. You will not be able to login again.', |
201: 'Maintenance legend' => 'Maintenance', | 201: 'Maintenance legend' => 'Maintenance', |
202: 'Maintenance mode' => 'Maintenance mode', | 202: 'Maintenance mode' => 'Maintenance mode', |
punbb-1.3.2/lang/English/common.php |
punbb-1.3.5/lang/English/common.php |
8: 'lang_identifier' => 'en', | 8: 'lang_identifier' => 'en', |
9: | 9: |
10: // Number formatting | 10: // Number formatting |
11: 'lang_decimal_point' => '.', | 11: 'lang_decimal_point' => '.', |
12: 'lang_thousands_sep' => ',', | 12: 'lang_thousands_sep' => ',', |
13: | 13: |
14: // Notices | 14: // Notices |
15: 'Bad request' => 'Bad request. The link you followed is incorrect or outdated.', | 15: 'Bad request' => 'Bad request. The link you followed is incorrect or outdated.', |
50: 'Unanswered topics title' => 'Find topics which have not been replied to.', | 50: 'Unanswered topics title' => 'Find topics which have not been replied to.', |
51: 'Username' => 'Username', | 51: 'Username' => 'Username', |
52: 'Registered' => 'Registered', | 52: 'Registered' => 'Registered', |
53: 'Write message' => 'Write message:', | 53: 'Write message' => 'Write message', |
54: 'Forum' => 'Forum', | 54: 'Forum' => 'Forum', |
55: 'Posts' => 'Posts', | 55: 'Posts' => 'Posts', |
56: 'Pages' => 'Pages', | 56: 'Pages' => 'Pages', |
85: 'Item info single' => '%s [ %s ]', | 85: 'Item info single' => '%s [ %s ]', |
86: 'Item info plural' => '%s [ %s to %s of %s ]', // e.g. Topics [ 10 to 20 of 30 ] | 86: 'Item info plural' => '%s [ %s to %s of %s ]', // e.g. Topics [ 10 to 20 of 30 ] |
87: 'Info separator' => ' ', // e.g. 1 Page | 10 Topics | 87: 'Info separator' => ' ', // e.g. 1 Page | 10 Topics |
88: 'Powered by' => 'Powered by <strong>%s</strong>', | 88: 'Powered by' => 'Powered by <strong>%s</strong>, supported by <strong>%s</strong>.', |
89: 'Maintenance' => 'Maintenance', | 89: 'Maintenance' => 'Maintenance', |
| 90: 'Installed extension' => 'The %s official extension is installed. Copyright © 2003–2011 <a href="http://punbb.informer.com/">PunBB</a>.', |
| 91: 'Installed extensions' => 'Currently installed <span id="extensions-used" title="%s">%s official extensions</span>. Copyright © 2003–2011 <a href="http://punbb.informer.com/">PunBB</a>.', |
90: | 92: |
91: // CSRF confirmation form | 93: // CSRF confirmation form |
92: 'Confirm' => 'Confirm', // Button | 94: 'Confirm' => 'Confirm', // Button |
146: 'Jump to' => 'Jump to forum:', | 148: 'Jump to' => 'Jump to forum:', |
147: | 149: |
148: // For extern.php RSS feed | 150: // For extern.php RSS feed |
149: 'ATOM Feed' => 'Atom', | |
150: 'RSS Feed' => 'RSS', | |
151: 'RSS description' => 'The most recent topics at %s.', | 151: 'RSS description' => 'The most recent topics at %s.', |
152: 'RSS description topic' => 'The most recent posts in %s.', | 152: 'RSS description topic' => 'The most recent posts in %s.', |
153: 'RSS reply' => 'Re: ', // The topic subject will be appended to this string (to signify a reply) | 153: 'RSS reply' => 'Re: ', // The topic subject will be appended to this string (to signify a reply) |
154: | 154: |
155: // Accessibility | 155: // Accessibility |
156: 'Skip to content' => 'Skip to forum content', | 156: 'Skip to content' => 'Skip to forum content', |
157: | 157: |
158: // Debug information | 158: // Debug information |
159: 'Querytime' => 'Generated in %1$s seconds, %2$s queries executed', | 159: 'Querytime' => 'Generated in %1$s seconds, %2$s queries executed', |
160: 'Debug table' => 'Debug information', | 160: 'Debug table' => 'Debug information', |
161: 'Debug summary' => 'Database query performance information', | 161: 'Debug summary' => 'Database query performance information', |
162: 'Query times' => 'Time (s)', | 162: 'Query times' => 'Time (s)', |
163: 'Query' => 'Query', | 163: 'Query' => 'Query', |
164: 'Total query time' => 'Total query time', | 164: 'Total query time' => 'Total query time', |
165: | 165: |
166: ); | 166: ); |
punbb-1.3.2/lang/English/install.php |
punbb-1.3.5/lang/English/install.php |
21: 'Table prefix' => 'Table prefix', | 21: 'Table prefix' => 'Table prefix', |
22: 'Database type info' => 'PunBB currently supports MySQL, PostgreSQL and SQLite. If your database of choice is missing from the drop-down menu below, it means this PHP environment does not have support for that particular database. More information regarding support for particular versions of each database can be found in the FAQ.', | 22: 'Database type info' => 'PunBB currently supports MySQL, PostgreSQL and SQLite. If your database of choice is missing from the drop-down menu below, it means this PHP environment does not have support for that particular database. More information regarding support for particular versions of each database can be found in the FAQ.', |
23: 'Mysql type info' => 'PunBB has detected that your PHP environment supports two different ways of communicating with MySQL. The two options are called "<em>standard</em>" and "<em>improved</em>". If you are uncertain which one to use, start by trying improved and if that fails, try standard.', | 23: 'Mysql type info' => 'PunBB has detected that your PHP environment supports two different ways of communicating with MySQL. The two options are called "<em>standard</em>" and "<em>improved</em>". If you are uncertain which one to use, start by trying improved and if that fails, try standard.', |
24: 'MySQL InnoDB info' => 'PunBB has detected that your MySQL server might support <a href="http://dev.mysql.com/doc/refman/5.0/en/innodb-overview.html">InnoDB</a>. This would be a good choice if you are planning to run a large forum. If you are uncertain, it is recommended to not use InnoDB.', | |
25: 'Database server info' => 'Enter the address of the database server (example: <em>localhost</em>, <em>mysql1.example.com</em> or <em>208.77.188.166</em>). You can specify a custom port number if your database doesn\'t run on the default port (example: <em>localhost:3580</em>). For SQLite support, just enter anything or leave it at \'localhost\'.', | 24: 'Database server info' => 'Enter the address of the database server (example: <em>localhost</em>, <em>mysql1.example.com</em> or <em>208.77.188.166</em>). You can specify a custom port number if your database doesn\'t run on the default port (example: <em>localhost:3580</em>). For SQLite support, just enter anything or leave it at \'localhost\'.', |
26: 'Database name info' => 'Enter the name of the database that PunBB will be installed into. The database must exist. For SQLite, this is the relative path to the database file. If the SQLite database file does not exist, PunBB will attempt to create it.', | 25: 'Database name info' => 'Enter the name of the database that PunBB will be installed into. The database must exist. For SQLite, this is the relative path to the database file. If the SQLite database file does not exist, PunBB will attempt to create it.', |
27: 'Database username info' => 'Enter the username and password used for connecting to the selected database. Ignore for SQLite.', | 26: 'Database username info' => 'Enter the username and password used for connecting to the selected database. Ignore for SQLite.', |
78: 'Invalid table prefix' => 'The table prefix \'%s\' contains illegal characters or is too long. The prefix may contain the letters a to z, any numbers and the underscore character. They must however not start with a number. The maximum length is 40 characters. Please choose a different prefix.', | 77: 'Invalid table prefix' => 'The table prefix \'%s\' contains illegal characters or is too long. The prefix may contain the letters a to z, any numbers and the underscore character. They must however not start with a number. The maximum length is 40 characters. Please choose a different prefix.', |
79: 'SQLite prefix collision' => 'The table prefix \'sqlite_\' is reserved for use by the SQLite engine. Please choose a different prefix.', | 78: 'SQLite prefix collision' => 'The table prefix \'sqlite_\' is reserved for use by the SQLite engine. Please choose a different prefix.', |
80: 'PunBB already installed' => 'A table called "%1$susers" is already present in the database "%2$s". This could mean that PunBB is already installed or that another piece of software is installed and is occupying one or more of the table names PunBB requires. If you want to install multiple copies of PunBB in the same database, you must choose a different table prefix.', | 79: 'PunBB already installed' => 'A table called "%1$susers" is already present in the database "%2$s". This could mean that PunBB is already installed or that another piece of software is installed and is occupying one or more of the table names PunBB requires. If you want to install multiple copies of PunBB in the same database, you must choose a different table prefix.', |
81: 'InnoDB not enabled' => 'InnoDB does not seem to be enabled. Please choose a database layer that does not have InnoDB support, or enable InnoDB on your MySQL server.', | 80: 'Invalid language' => 'The language pack you have chosen doesn\'t seem to exist or is corrupt. Please recheck and try again.', |
82: | 81: |
83: // Used in the install | 82: // Used in the install |
| 83: 'Default language' => 'Default language', |
| 84: 'Default language help' => '(If you remove a language pack you must update this setting)', |
84: 'Default announce heading' => 'Sample announcement', | 85: 'Default announce heading' => 'Sample announcement', |
85: 'Default announce message' => '<p>Enter your announcement here.</p>', | 86: 'Default announce message' => '<p>Enter your announcement here.</p>', |
86: 'Default maint message' => "The forums are temporarily down for maintenance. Please try again in a few minutes.<br />\\n<br />\\n/Administrator", | |
87: 'Default rules' => 'Enter your rules here.', | 87: 'Default rules' => 'Enter your rules here.', |
88: 'Default category name' => 'Test category', | 88: 'Default category name' => 'Test category', |
89: 'Default forum name' => 'Test forum', | 89: 'Default forum name' => 'Test forum', |
punbb-1.3.2/lang/English/profile.php |
punbb-1.3.5/lang/English/profile.php |
44: 'Too wide or high' => 'The file you tried to upload is wider and/or higher than the maximum allowed %sx%s pixels.', | 44: 'Too wide or high' => 'The file you tried to upload is wider and/or higher than the maximum allowed %sx%s pixels.', |
45: 'Unknown failure' => 'An unknown error occurred. Please try again.', | 45: 'Unknown failure' => 'An unknown error occurred. Please try again.', |
46: 'Avatar' => 'Avatar', | 46: 'Avatar' => 'Avatar', |
47: 'Current avatar' => 'Current Avatar', | 47: 'Current avatar' => 'Current avatar', |
48: 'No avatar info' => 'No avatar is currently uploaded.', | 48: 'No avatar info' => 'No avatar is currently uploaded.', |
49: 'Avatar info replace' => 'Uploading a new avatar will replace your existing avatar.', | 49: 'Avatar info replace' => 'Uploading a new avatar will replace your existing avatar.', |
50: 'Avatar info none' => 'To display an avatar you first need to upload one.', | 50: 'Avatar info none' => 'To display an avatar you first need to upload one.', |
51: 'Avatar info type' => 'The allowed image file types are gif, jpeg and png.', | 51: 'Avatar info type' => 'The allowed image file types are gif, jpeg and png.', |
52: 'Avatar info size' => 'The maximum image size allowed is %sx%s pixels and %s bytes (%s KB).', | 52: 'Avatar info size' => 'The maximum image size allowed is %sx%s pixels and %s bytes (%s KB).', |
53: 'Delete avatar info' => 'Delete avatar to cease displaying any avatar.', | 53: 'Delete avatar info' => 'Delete avatar to stop displaying any avatar.', |
54: 'Upload avatar file' => 'Upload avatar file', | 54: 'Upload avatar file' => 'Upload avatar file', |
55: 'Avatar upload help' => 'Select file then update your profile to install.', | 55: 'Avatar upload help' => 'Select file then update your profile to install.', |
56: 'No upload warn' => '<strong>IMPORTANT! </strong> You must choose a file to upload before updating your profile.', | 56: 'No upload warn' => '<strong>IMPORTANT! </strong> You must choose a file to upload before updating your profile.', |
183: 'Change e-mail errors' => '<strong>Warning!</strong> The following errors must be corrected before your e-mail address can be updated:', | 183: 'Change e-mail errors' => '<strong>Warning!</strong> The following errors must be corrected before your e-mail address can be updated:', |
184: 'E-mail key bad' => 'The specified e-mail activation key was incorrect or has expired. Please re-request change of e-mail address. If that fails, contact the forum administrator at %s.', | 184: 'E-mail key bad' => 'The specified e-mail activation key was incorrect or has expired. Please re-request change of e-mail address. If that fails, contact the forum administrator at %s.', |
185: 'E-mail updated' => 'Your e-mail address has been updated.', | 185: 'E-mail updated' => 'Your e-mail address has been updated.', |
| 186: 'E-mail updated redirect' => 'Your e-mail address has been updated. Redirecting…', |
186: 'Wrong password' => 'The password you entered was incorrect.', | 187: 'Wrong password' => 'The password you entered was incorrect.', |
187: 'Activate e-mail sent' => 'An email has been sent to the specified address with instructions on how to activate the new e-mail address. If it doesn\'t arrive you can contact the forum administrator at %s.', | 188: 'Activate e-mail sent' => 'An email has been sent to the specified address with instructions on how to activate the new e-mail address. If it doesn\'t arrive you can contact the forum administrator at %s.', |
188: 'Change your e-mail' => 'Change your e-mail address', | 189: 'Change your e-mail' => 'Change your e-mail address', |
215: 'Reg complete' => 'Registration complete. Logging in and redirecting…', | 216: 'Reg complete' => 'Registration complete. Logging in and redirecting…', |
216: 'Register errors' => '<strong>Warning!</strong> The following errors must be corrected before you can register:', | 217: 'Register errors' => '<strong>Warning!</strong> The following errors must be corrected before you can register:', |
217: 'E-mail info' => '<strong>Important!</strong> An e-mail will be sent to your new address with an activation link. You must click the link in the e-mail you receive to activate the new address. You must therefore ensure that you enter a valid and current e-mail address.', | 218: 'E-mail info' => '<strong>Important!</strong> An e-mail will be sent to your new address with an activation link. You must click the link in the e-mail you receive to activate the new address. You must therefore ensure that you enter a valid and current e-mail address.', |
218: 'Reg e-mail info' => '<strong>Important!</strong> An e-mail with an activation link will be sent to the address you provide. You must click the link in the e-mail in order to activate your new account. You must therefore ensure that you enter a valid and current e-mail address.', | 219: 'Reg e-mail info' => '<strong>Important!</strong> An e-mail with an activation link will be sent to the address you provide. You must click the link in the e-mail in order to activate your new account. It must be done in 72 hours after registration, or else your account will be deleted.', |
219: 'Register at' => 'Register at %s', | 220: 'Register at' => 'Register at %s', |
220: 'Register intro' => 'Registration enables you to use features not available when browsing the board as a guest. The fields below only make up a small part of all the settings you can alter in your profile. If you have any questions regarding this forum you should ask an administrator. Please complete the form below in order to register.', | 221: 'Register intro' => 'Registration enables you to use features not available when browsing the board as a guest. The fields below only make up a small part of all the settings you can alter in your profile. If you have any questions regarding this forum you should ask an administrator. Please complete the form below in order to register.', |
221: 'Username' => 'Username', | 222: 'Username' => 'Username', |
252: 'Username too short' => 'Usernames must be at least 2 characters long. Please choose another (longer) username.', | 253: 'Username too short' => 'Usernames must be at least 2 characters long. Please choose another (longer) username.', |
253: 'Signature quote/code' => 'The quote and code BBCodes are not allowed in signatures.', | 254: 'Signature quote/code' => 'The quote and code BBCodes are not allowed in signatures.', |
254: 'Invalid e-mail' => 'The e-mail address you entered is invalid.', | 255: 'Invalid e-mail' => 'The e-mail address you entered is invalid.', |
| 256: 'Signature quote/code/list' => 'Signature may not contain of the text formatting tags (BBCode) [quote], [code] or [list]. Please choose another tags or delete it.', |
255: | 257: |
256: ); | 258: ); |
punbb-1.3.2/lang/English/topic.php |
punbb-1.3.5/lang/English/topic.php |
8: 'Search replies' => '(%s replies, posted in %s)', | 8: 'Search replies' => '(%s replies, posted in %s)', |
9: 'Post reply' => 'Post reply', | 9: 'Post reply' => 'Post reply', |
10: 'Topic closed' => '[ Closed ]', | 10: 'Topic closed' => '[ Closed ]', |
| 11: 'Topic closed info' => 'This topic is closed', |
11: 'No permission' => 'Sorry! no permission to post a reply', | 12: 'No permission' => 'Sorry! no permission to post a reply', |
12: 'Topic title' => 'Topic: %s', | 13: 'Topic title' => 'Topic: %s', |
13: 'Reply title' => 'Re: %s', | 14: 'Reply title' => 'Re: %s', |
14: 'Login to post' => 'You must %1$s or %2$s to post a reply', | 15: 'Login to post' => 'You must %1$s or %2$s to post a reply', |
15: 'From' => 'From:', // User location | 16: 'From' => 'From:', // User location |
16: 'Registered' => 'Registered:', | 17: 'Registered' => 'Registered:', |
17: 'Note' => 'Note:', // Admin note | 18: 'Note' => 'Note:', // Admin note |
18: 'IP' => 'IP:', | 19: 'IP' => 'IP:', |
19: 'Posts' => 'Posts', | 20: 'Posts' => 'Posts', |
20: 'Posts info' => 'Posts:', | 21: 'Posts info' => 'Posts:', |
32: 'Unsubscribe' => 'Unsubscribe', | 33: 'Unsubscribe' => 'Unsubscribe', |
33: 'Subscribe' => 'Subscribe', | 34: 'Subscribe' => 'Subscribe', |
34: 'Subscribe info' => 'Receive email notification of new posts.', | 35: 'Subscribe info' => 'Receive email notification of new posts.', |
35: 'RSS topic feed' => 'RSS Topic Feed', | 36: 'RSS topic feed' => 'RSS topic feed', |
36: 'Quick post' => 'Quick reply to this topic', | 37: 'Quick post' => 'Quick reply to this topic', |
37: 'Post' => 'Post', | 38: 'Post' => 'Post', |
38: 'Permalink post' => 'Permanent link to this post', | 39: 'Permalink post' => 'Permanent link to this post', |
40: 'Go to profile' => 'Go to %s\'s profile', | 41: 'Go to profile' => 'Go to %s\'s profile', |
41: 'Move' => 'Move topic', | 42: 'Move' => 'Move topic', |
42: 'Topic options' => 'Topic options', | 43: 'Topic options' => 'Topic options', |
43: 'Open' => 'Open topic', | 44: 'Open' => 'Open topic', |
44: 'Close' => 'Close topic', | 45: 'Close' => 'Close topic', |
45: 'Unstick' => 'Unstick topic', | 46: 'Unstick' => 'Unstick topic', |
46: 'Stick' => 'Stick topic', | 47: 'Stick' => 'Stick topic', |
47: 'Moderate topic' => 'Moderate topic', | 48: 'Moderate topic' => 'Moderate topic', |
48: 'Required warn' => 'You cannot submit or preview an empty message.', | 49: 'Required warn' => 'You cannot submit or preview an empty message.', |
49: | 50: |
punbb-1.3.2/misc.php |
punbb-1.3.5/misc.php |
2: /** | 2: /** |
3: * Provides various features for forum users (ie: display rules, send emails through the forum, mark a forum as read, etc). | 3: * Provides various features for forum users (ie: display rules, send emails through the forum, mark a forum as read, etc). |
4: * | 4: * |
5: * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org | 5: * @copyright (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org |
6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
7: * @package PunBB | 7: * @package PunBB |
8: */ | 8: */ |
106: if ($forum_user['is_guest']) | 106: if ($forum_user['is_guest']) |
107: message($lang_common['No permission']); | 107: message($lang_common['No permission']); |
108: | 108: |
109: $fid = intval($_GET['fid']); | 109: $fid = isset($_GET['fid']) ? intval($_GET['fid']) : 0; |
110: if ($fid < 1) | 110: if ($fid < 1) |
111: message($lang_common['Bad request']); | 111: message($lang_common['Bad request']); |
112: | 112: |
113: // We validate the CSRF token. If it's set in POST and we're at this point, the token is valid. | 113: // We validate the CSRF token. If it's set in POST and we're at this point, the token is valid. |
114: // If it's in GET, we need to make sure it's valid. | 114: // If it's in GET, we need to make sure it's valid. |
115: if (!isset($_POST['csrf_token']) && (!isset($_GET['csrf_token']) || $_GET['csrf_token'] !== generate_form_token('markforumread'.intval($_GET['fid']).$forum_user['id']))) | 115: if (!isset($_POST['csrf_token']) && (!isset($_GET['csrf_token']) || $_GET['csrf_token'] !== generate_form_token('markforumread'.$fid.$forum_user['id']))) |
116: csrf_confirm_form(); | 116: csrf_confirm_form(); |
117: | 117: |
118: ($hook = get_hook('mi_markforumread_selected')) ? eval($hook) : null; | 118: ($hook = get_hook('mi_markforumread_selected')) ? eval($hook) : null; |
154: message($lang_common['No permission']); | 154: message($lang_common['No permission']); |
155: | 155: |
156: $recipient_id = intval($_GET['email']); | 156: $recipient_id = intval($_GET['email']); |
| 157: |
157: if ($recipient_id < 2) | 158: if ($recipient_id < 2) |
158: message($lang_common['Bad request']); | 159: message($lang_common['Bad request']); |
159: | 160: |
170: ); | 171: ); |
171: | 172: |
172: ($hook = get_hook('mi_email_qr_get_form_email_data')) ? eval($hook) : null; | 173: ($hook = get_hook('mi_email_qr_get_form_email_data')) ? eval($hook) : null; |
| 174: |
173: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); | 175: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
| 176: |
174: if (!$forum_db->num_rows($result)) | 177: if (!$forum_db->num_rows($result)) |
175: message($lang_common['Bad request']); | 178: message($lang_common['Bad request']); |
176: | 179: |
179: if ($email_setting == 2 && !$forum_user['is_admmod']) | 182: if ($email_setting == 2 && !$forum_user['is_admmod']) |
180: message($lang_misc['Form e-mail disabled']); | 183: message($lang_misc['Form e-mail disabled']); |
181: | 184: |
| 185: if ($recipient_email == '') |
| 186: message($lang_common['Bad request']); |
182: | 187: |
183: if (isset($_POST['form_sent'])) | 188: if (isset($_POST['form_sent'])) |
184: { | 189: { |
367: { | 372: { |
368: ($hook = get_hook('mi_report_form_submitted')) ? eval($hook) : null; | 373: ($hook = get_hook('mi_report_form_submitted')) ? eval($hook) : null; |
369: | 374: |
| 375: // Start with a clean slate |
| 376: $errors = array(); |
| 377: |
370: // Flood protection | 378: // Flood protection |
371: if ($forum_user['last_email_sent'] != '' && (time() - $forum_user['last_email_sent']) < $forum_user['g_email_flood'] && (time() - $forum_user['last_email_sent']) >= 0) | 379: if ($forum_user['last_email_sent'] != '' && (time() - $forum_user['last_email_sent']) < $forum_user['g_email_flood'] && (time() - $forum_user['last_email_sent']) >= 0) |
372: message(sprintf($lang_misc['Report flood'], $forum_user['g_email_flood'])); | 380: message(sprintf($lang_misc['Report flood'], $forum_user['g_email_flood'])); |
376: if ($reason == '') | 384: if ($reason == '') |
377: message($lang_misc['No reason']); | 385: message($lang_misc['No reason']); |
378: | 386: |
379: // Get some info about the topic we're reporting | 387: if (strlen($reason) > FORUM_MAX_POSTSIZE_BYTES) |
380: $query = array( | |
381: 'SELECT' => 't.id, t.subject, t.forum_id', | |
382: 'FROM' => 'posts AS p', | |
383: 'JOINS' => array( | |
384: array( | |
385: 'INNER JOIN' => 'topics AS t', | |
386: 'ON' => 't.id=p.topic_id' | |
387: ) | |
388: ), | |
389: 'WHERE' => 'p.id='.$post_id | |
390: ); | |
391: | |
392: ($hook = get_hook('mi_report_qr_get_topic_data')) ? eval($hook) : null; | |
393: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); | |
394: if (!$forum_db->num_rows($result)) | |
395: message($lang_common['Bad request']); | |
396: | |
397: list($topic_id, $subject, $forum_id) = $forum_db->fetch_row($result); | |
398: | |
399: ($hook = get_hook('mi_report_pre_reports_sent')) ? eval($hook) : null; | |
400: | |
401: // Should we use the internal report handling? | |
402: if ($forum_config['o_report_method'] == 0 || $forum_config['o_report_method'] == 2) | |
403: { | 388: { |
| 389: $errors[] = sprintf($lang_misc['Too long reason'], forum_number_format(strlen($reason)), forum_number_format(FORUM_MAX_POSTSIZE_BYTES)); |
| 390: } |
| 391: |
| 392: if (empty($errors)) { |
| 393: // Get some info about the topic we're reporting |
404: $query = array( | 394: $query = array( |
405: 'INSERT' => 'post_id, topic_id, forum_id, reported_by, created, message', | 395: 'SELECT' => 't.id, t.subject, t.forum_id', |
406: 'INTO' => 'reports', | 396: 'FROM' => 'posts AS p', |
407: 'VALUES' => $post_id.', '.$topic_id.', '.$forum_id.', '.$forum_user['id'].', '.time().', \''.$forum_db->escape($reason).'\'' | 397: 'JOINS' => array( |
| 398: array( |
| 399: 'INNER JOIN' => 'topics AS t', |
| 400: 'ON' => 't.id=p.topic_id' |
| 401: ) |
| 402: ), |
| 403: 'WHERE' => 'p.id='.$post_id |
408: ); | 404: ); |
409: | 405: |
410: ($hook = get_hook('mi_report_add_report')) ? eval($hook) : null; | 406: ($hook = get_hook('mi_report_qr_get_topic_data')) ? eval($hook) : null; |
411: $forum_db->query_build($query) or error(__FILE__, __LINE__); | 407: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
412: } | 408: if (!$forum_db->num_rows($result)) |
| 409: message($lang_common['Bad request']); |
413: | 410: |
414: // Should we e-mail the report? | 411: list($topic_id, $subject, $forum_id) = $forum_db->fetch_row($result); |
415: if ($forum_config['o_report_method'] == 1 || $forum_config['o_report_method'] == 2) | 412: |
416: { | 413: ($hook = get_hook('mi_report_pre_reports_sent')) ? eval($hook) : null; |
417: // We send it to the complete mailing-list in one swoop | 414: |
418: if ($forum_config['o_mailing_list'] != '') | 415: // Should we use the internal report handling? |
| 416: if ($forum_config['o_report_method'] == 0 || $forum_config['o_report_method'] == 2) |
419: { | 417: { |
420: $mail_subject = 'Report('.$forum_id.') - \''.$subject.'\''; | 418: $query = array( |
421: $mail_message = 'User \''.$forum_user['username'].'\' has reported the following message:'."\n".forum_link($forum_url['post'], $post_id)."\n\n".'Reason:'."\n".$reason; | 419: 'INSERT' => 'post_id, topic_id, forum_id, reported_by, created, message', |
| 420: 'INTO' => 'reports', |
| 421: 'VALUES' => $post_id.', '.$topic_id.', '.$forum_id.', '.$forum_user['id'].', '.time().', \''.$forum_db->escape($reason).'\'' |
| 422: ); |
422: | 423: |
423: if (!defined('FORUM_EMAIL_FUNCTIONS_LOADED')) | 424: ($hook = get_hook('mi_report_add_report')) ? eval($hook) : null; |
424: require FORUM_ROOT.'include/email.php'; | 425: $forum_db->query_build($query) or error(__FILE__, __LINE__); |
| 426: } |
425: | 427: |
426: ($hook = get_hook('mi_report_modify_message')) ? eval($hook) : null; | 428: // Should we e-mail the report? |
| 429: if ($forum_config['o_report_method'] == 1 || $forum_config['o_report_method'] == 2) |
| 430: { |
| 431: // We send it to the complete mailing-list in one swoop |
| 432: if ($forum_config['o_mailing_list'] != '') |
| 433: { |
| 434: $mail_subject = 'Report('.$forum_id.') - \''.$subject.'\''; |
| 435: $mail_message = 'User \''.$forum_user['username'].'\' has reported the following message:'."\n".forum_link($forum_url['post'], $post_id)."\n\n".'Reason:'."\n".$reason; |
| 436: |
| 437: if (!defined('FORUM_EMAIL_FUNCTIONS_LOADED')) |
| 438: require FORUM_ROOT.'include/email.php'; |
427: | 439: |
428: forum_mail($forum_config['o_mailing_list'], $mail_subject, $mail_message); | 440: ($hook = get_hook('mi_report_modify_message')) ? eval($hook) : null; |
| 441: |
| 442: forum_mail($forum_config['o_mailing_list'], $mail_subject, $mail_message); |
| 443: } |
429: } | 444: } |
430: } | |
431: | 445: |
432: // Set last_email_sent time to prevent flooding | 446: // Set last_email_sent time to prevent flooding |
433: $query = array( | 447: $query = array( |
434: 'UPDATE' => 'users', | 448: 'UPDATE' => 'users', |
435: 'SET' => 'last_email_sent='.time(), | 449: 'SET' => 'last_email_sent='.time(), |
436: 'WHERE' => 'id='.$forum_user['id'] | 450: 'WHERE' => 'id='.$forum_user['id'] |
437: ); | 451: ); |
438: | 452: |
439: ($hook = get_hook('mi_report_qr_update_last_email_sent')) ? eval($hook) : null; | 453: ($hook = get_hook('mi_report_qr_update_last_email_sent')) ? eval($hook) : null; |
440: $forum_db->query_build($query) or error(__FILE__, __LINE__); | 454: $forum_db->query_build($query) or error(__FILE__, __LINE__); |
441: | 455: |
442: ($hook = get_hook('mi_report_pre_redirect')) ? eval($hook) : null; | 456: ($hook = get_hook('mi_report_pre_redirect')) ? eval($hook) : null; |
443: | 457: |
444: redirect(forum_link($forum_url['post'], $post_id), $lang_misc['Report redirect']); | 458: redirect(forum_link($forum_url['post'], $post_id), $lang_misc['Report redirect']); |
| 459: } |
445: } | 460: } |
446: | 461: |
447: // Setup form | 462: // Setup form |
480: <div id="req-msg" class="req-warn ct-box error-box"> | 495: <div id="req-msg" class="req-warn ct-box error-box"> |
481: <p class="important"><?php printf($lang_common['Required warn'], '<em>'.$lang_common['Required'].'</em>') ?></p> | 496: <p class="important"><?php printf($lang_common['Required warn'], '<em>'.$lang_common['Required'].'</em>') ?></p> |
482: </div> | 497: </div> |
| 498: <?php |
| 499: // If there were any errors, show them |
| 500: if (!empty($errors)) { |
| 501: $forum_page['errors'] = array(); |
| 502: foreach ($errors as $cur_error) { |
| 503: $forum_page['errors'][] = '<li class="warn"><span>'.$cur_error.'</span></li>'; |
| 504: } |
| 505: |
| 506: ($hook = get_hook('mi_pre_report_errors')) ? eval($hook) : null; |
| 507: ?> |
| 508: <div class="ct-box error-box"> |
| 509: <h2 class="warn hn"><?php echo $lang_misc['Report errors'] ?></h2> |
| 510: <ul class="error-list"> |
| 511: <?php echo implode("\n\t\t\t\t", $forum_page['errors'])."\n" ?> |
| 512: </ul> |
| 513: </div> |
| 514: <?php |
| 515: } |
| 516: ?> |
483: <form id="afocus" class="frm-form" method="post" accept-charset="utf-8" action="<?php echo $forum_page['form_action'] ?>"> | 517: <form id="afocus" class="frm-form" method="post" accept-charset="utf-8" action="<?php echo $forum_page['form_action'] ?>"> |
484: <div class="hidden"> | 518: <div class="hidden"> |
485: <?php echo implode("\n\t\t\t\t", $forum_page['hidden_fields'])."\n" ?> | 519: <?php echo implode("\n\t\t\t\t", $forum_page['hidden_fields'])."\n" ?> |
528: | 562: |
529: // We validate the CSRF token. If it's set in POST and we're at this point, the token is valid. | 563: // We validate the CSRF token. If it's set in POST and we're at this point, the token is valid. |
530: // If it's in GET, we need to make sure it's valid. | 564: // If it's in GET, we need to make sure it's valid. |
531: if (!isset($_POST['csrf_token']) && (!isset($_GET['csrf_token']) || $_GET['csrf_token'] !== generate_form_token('subscribe'.intval($_GET['subscribe']).$forum_user['id']))) | 565: if (!isset($_POST['csrf_token']) && (!isset($_GET['csrf_token']) || $_GET['csrf_token'] !== generate_form_token('subscribe'.$topic_id.$forum_user['id']))) |
532: csrf_confirm_form(); | 566: csrf_confirm_form(); |
533: | 567: |
534: ($hook = get_hook('mi_subscribe_selected')) ? eval($hook) : null; | 568: ($hook = get_hook('mi_subscribe_selected')) ? eval($hook) : null; |
590: | 624: |
591: // We validate the CSRF token. If it's set in POST and we're at this point, the token is valid. | 625: // We validate the CSRF token. If it's set in POST and we're at this point, the token is valid. |
592: // If it's in GET, we need to make sure it's valid. | 626: // If it's in GET, we need to make sure it's valid. |
593: if (!isset($_POST['csrf_token']) && (!isset($_GET['csrf_token']) || $_GET['csrf_token'] !== generate_form_token('unsubscribe'.intval($_GET['unsubscribe']).$forum_user['id']))) | 627: if (!isset($_POST['csrf_token']) && (!isset($_GET['csrf_token']) || $_GET['csrf_token'] !== generate_form_token('unsubscribe'.$topic_id.$forum_user['id']))) |
594: csrf_confirm_form(); | 628: csrf_confirm_form(); |
595: | 629: |
596: ($hook = get_hook('mi_unsubscribe_selected')) ? eval($hook) : null; | 630: ($hook = get_hook('mi_unsubscribe_selected')) ? eval($hook) : null; |
punbb-1.3.2/moderate.php |
punbb-1.3.5/moderate.php |
2: /** | 2: /** |
3: * Provides various mass-moderation tools to moderators. | 3: * Provides various mass-moderation tools to moderators. |
4: * | 4: * |
5: * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org | 5: * @copyright (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org |
6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
7: * @package PunBB | 7: * @package PunBB |
8: */ | 8: */ |
63: | 63: |
64: // Get some info about the forum we're moderating | 64: // Get some info about the forum we're moderating |
65: $query = array( | 65: $query = array( |
66: 'SELECT' => 'f.forum_name, f.redirect_url, f.num_topics, f.moderators', | 66: 'SELECT' => 'f.forum_name, f.redirect_url, f.num_topics, f.moderators, f.sort_by', |
67: 'FROM' => 'forums AS f', | 67: 'FROM' => 'forums AS f', |
68: 'JOINS' => array( | 68: 'JOINS' => array( |
69: array( | 69: array( |
373: <?php ($hook = get_hook('mr_confirm_split_posts_pre_subject')) ? eval($hook) : null; ?> | 373: <?php ($hook = get_hook('mr_confirm_split_posts_pre_subject')) ? eval($hook) : null; ?> |
374: <div class="sf-box text required"> | 374: <div class="sf-box text required"> |
375: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_misc['New subject'] ?> <em><?php echo $lang_common['Required'] ?></em></span></label><br /> | 375: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_misc['New subject'] ?> <em><?php echo $lang_common['Required'] ?></em></span></label><br /> |
376: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="new_subject" value="" size="80" maxlength="70" /></span> | 376: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="new_subject" value="" size="70" maxlength="70" /></span> |
377: </div> | 377: </div> |
378: <?php ($hook = get_hook('mr_confirm_split_posts_pre_confirm_checkbox')) ? eval($hook) : null; ?> | 378: <?php ($hook = get_hook('mr_confirm_split_posts_pre_confirm_checkbox')) ? eval($hook) : null; ?> |
379: <div class="sf-box checkbox"> | 379: <div class="sf-box checkbox"> |
416: | 416: |
417: // Determine the post offset (based on $_GET['p']) | 417: // Determine the post offset (based on $_GET['p']) |
418: $forum_page['num_pages'] = ceil(($cur_topic['num_replies'] + 1) / $forum_user['disp_posts']); | 418: $forum_page['num_pages'] = ceil(($cur_topic['num_replies'] + 1) / $forum_user['disp_posts']); |
419: $forum_page['page'] = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : intval($_GET['p']); | 419: $forum_page['page'] = (!isset($_GET['p']) || !is_numeric($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : intval($_GET['p']); |
420: $forum_page['start_from'] = $forum_user['disp_posts'] * ($forum_page['page'] - 1); | 420: $forum_page['start_from'] = $forum_user['disp_posts'] * ($forum_page['page'] - 1); |
421: $forum_page['finish_at'] = min(($forum_page['start_from'] + $forum_user['disp_posts']), ($cur_topic['num_replies'] + 1)); | 421: $forum_page['finish_at'] = min(($forum_page['start_from'] + $forum_user['disp_posts']), ($cur_topic['num_replies'] + 1)); |
422: $forum_page['items_info'] = generate_items_info($lang_misc['Posts'], ($forum_page['start_from'] + 1), ($cur_topic['num_replies'] + 1)); | 422: $forum_page['items_info'] = generate_items_info($lang_misc['Posts'], ($forum_page['start_from'] + 1), ($cur_topic['num_replies'] + 1)); |
521: | 521: |
522: $forum_page['post_ident'] = array(); | 522: $forum_page['post_ident'] = array(); |
523: $forum_page['message'] = array(); | 523: $forum_page['message'] = array(); |
524: $forum_page['author_title'] = ''; | |
525: $forum_page['user_ident'] = array(); | 524: $forum_page['user_ident'] = array(); |
526: $cur_post['username'] = $cur_post['poster']; | 525: $cur_post['username'] = $cur_post['poster']; |
527: | 526: |
1039: </div> | 1038: </div> |
1040: <?php ($hook = get_hook('mr_merge_topics_pre_fieldset')) ? eval($hook) : null; ?> | 1039: <?php ($hook = get_hook('mr_merge_topics_pre_fieldset')) ? eval($hook) : null; ?> |
1041: <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>"> | 1040: <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>"> |
1042: <legend class="group-legend"><strong><?php echo $lang_misc['Merge topic'] ?></strong></legend> | 1041: <legend class="group-legend"><strong><?php echo $lang_misc['Merge topics'] ?></strong></legend> |
1043: <?php ($hook = get_hook('mr_merge_topics_pre_redirect_checkbox')) ? eval($hook) : null; ?> | 1042: <?php ($hook = get_hook('mr_merge_topics_pre_redirect_checkbox')) ? eval($hook) : null; ?> |
1044: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 1043: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
1045: <div class="sf-box checkbox"> | 1044: <div class="sf-box checkbox"> |
1424: // Determine the topic offset (based on $_GET['p']) | 1423: // Determine the topic offset (based on $_GET['p']) |
1425: $forum_page['num_pages'] = ceil($cur_forum['num_topics'] / $forum_user['disp_topics']); | 1424: $forum_page['num_pages'] = ceil($cur_forum['num_topics'] / $forum_user['disp_topics']); |
1426: | 1425: |
1427: $forum_page['page'] = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : $_GET['p']; | 1426: $forum_page['page'] = (!isset($_GET['p']) || !is_numeric($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : $_GET['p']; |
1428: $forum_page['start_from'] = $forum_user['disp_topics'] * ($forum_page['page'] - 1); | 1427: $forum_page['start_from'] = $forum_user['disp_topics'] * ($forum_page['page'] - 1); |
1429: $forum_page['finish_at'] = min(($forum_page['start_from'] + $forum_user['disp_topics']), ($cur_forum['num_topics'])); | 1428: $forum_page['finish_at'] = min(($forum_page['start_from'] + $forum_user['disp_topics']), ($cur_forum['num_topics'])); |
1430: $forum_page['items_info'] = generate_items_info($lang_misc['Topics'], ($forum_page['start_from'] + 1), $cur_forum['num_topics']); | 1429: $forum_page['items_info'] = generate_items_info($lang_misc['Topics'], ($forum_page['start_from'] + 1), $cur_forum['num_topics']); |
1434: 'SELECT' => 't.id, t.poster, t.subject, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to', | 1433: 'SELECT' => 't.id, t.poster, t.subject, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to', |
1435: 'FROM' => 'topics AS t', | 1434: 'FROM' => 'topics AS t', |
1436: 'WHERE' => 'forum_id='.$fid, | 1435: 'WHERE' => 'forum_id='.$fid, |
1437: 'ORDER BY' => 't.sticky DESC, last_post DESC', | 1436: 'ORDER BY' => 't.sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 't.posted' : 't.last_post').' DESC', |
1438: 'LIMIT' => $forum_page['start_from'].', '.$forum_user['disp_topics'] | 1437: 'LIMIT' => $forum_page['start_from'].', '.$forum_user['disp_topics'] |
1439: ); | 1438: ); |
1440: | 1439: |
1535: ++$forum_page['item_count']; | 1534: ++$forum_page['item_count']; |
1536: | 1535: |
1537: // Start from scratch | 1536: // Start from scratch |
1538: $forum_page['item_subject'] = $forum_page['item_body'] = $forum_page['item_status'] = $forum_page['item_nav'] = $forum_page['item_title'] = $forum_page['item_subject_status'] = array(); | 1537: $forum_page['item_subject'] = $forum_page['item_body'] = $forum_page['item_status'] = $forum_page['item_nav'] = $forum_page['item_title'] = $forum_page['item_title_status'] = array(); |
1539: $forum_page['item_indicator'] = ''; | |
1540: | 1538: |
1541: if ($forum_config['o_censoring'] == '1') | 1539: if ($forum_config['o_censoring'] == '1') |
1542: $cur_topic['subject'] = censor_words($cur_topic['subject']); | 1540: $cur_topic['subject'] = censor_words($cur_topic['subject']); |
1543: | 1541: |
| 1542: $forum_page['item_subject']['starter'] = '<span class="item-starter">'.sprintf($lang_forum['Topic starter'], forum_htmlencode($cur_topic['poster'])).'</span>'; |
| 1543: |
1544: if ($cur_topic['moved_to'] != null) | 1544: if ($cur_topic['moved_to'] != null) |
1545: { | 1545: { |
1546: $forum_page['item_status']['moved'] = 'moved'; | 1546: $forum_page['item_status']['moved'] = 'moved'; |
1547: $forum_page['item_title']['link'] = '<a href="'.forum_link($forum_url['topic'], array($cur_topic['moved_to'], sef_friendly($cur_topic['subject']))).'"><span>'.$lang_forum['Moved'].'</span> '.forum_htmlencode($cur_topic['subject']).'</a>'; | 1547: $forum_page['item_title']['link'] = '<span class="item-status"><em class="moved">'.sprintf($lang_forum['Item status'], $lang_forum['Moved']).'</em></span> <a href="'.forum_link($forum_url['topic'], array($cur_topic['moved_to'], sef_friendly($cur_topic['subject']))).'">'.forum_htmlencode($cur_topic['subject']).'</a>'; |
1548: | 1548: |
1549: // Combine everything to produce the Topic heading | 1549: // Combine everything to produce the Topic heading |
1550: $forum_page['item_body']['subject']['title'] = '<h3 class="hn"><span class="item-num">'.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span> <strong>'.$forum_page['item_title']['link'].'</strong></h3>'; | 1550: $forum_page['item_body']['subject']['title'] = '<h3 class="hn"><span class="item-num">'.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span> <strong>'.$forum_page['item_title']['link'].'</strong></h3>'; |
1573: $forum_page['item_status']['posted'] = 'posted'; | 1573: $forum_page['item_status']['posted'] = 'posted'; |
1574: } | 1574: } |
1575: | 1575: |
| 1576: if ($cur_topic['sticky'] == '1') |
| 1577: { |
| 1578: $forum_page['item_title_status']['sticky'] = '<em class="sticky">'.$lang_forum['Sticky'].'</em>'; |
| 1579: $forum_page['item_status']['sticky'] = 'sticky'; |
| 1580: } |
| 1581: |
| 1582: if ($cur_topic['closed'] == '1') |
| 1583: { |
| 1584: $forum_page['item_title_status']['closed'] = '<em class="closed">'.$lang_forum['Closed'].'</em>'; |
| 1585: $forum_page['item_status']['closed'] = 'closed'; |
| 1586: } |
| 1587: |
| 1588: ($hook = get_hook('mr_topic_loop_normal_topic_pre_item_title_status_merge')) ? eval($hook) : null; |
| 1589: |
| 1590: if (!empty($forum_page['item_title_status'])) |
| 1591: $forum_page['item_title']['status'] = '<span class="item-status">'.sprintf($lang_forum['Item status'], implode(', ', $forum_page['item_title_status'])).'</span>'; |
| 1592: |
1576: $forum_page['item_title']['link'] = '<strong><a href="'.forum_link($forum_url['topic'], array($cur_topic['id'], sef_friendly($cur_topic['subject']))).'">'.forum_htmlencode($cur_topic['subject']).'</a></strong>'; | 1593: $forum_page['item_title']['link'] = '<strong><a href="'.forum_link($forum_url['topic'], array($cur_topic['id'], sef_friendly($cur_topic['subject']))).'">'.forum_htmlencode($cur_topic['subject']).'</a></strong>'; |
1577: | 1594: |
| 1595: ($hook = get_hook('mr_topic_loop_normal_topic_pre_item_title_merge')) ? eval($hook) : null; |
| 1596: |
| 1597: $forum_page['item_body']['subject']['title'] = '<h3 class="hn"><span class="item-num">'.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span> '.implode(' ', $forum_page['item_title']).'</h3>'; |
| 1598: |
| 1599: |
| 1600: if (empty($forum_page['item_status'])) |
| 1601: $forum_page['item_status']['normal'] = 'normal'; |
| 1602: |
1578: $forum_page['item_pages'] = ceil(($cur_topic['num_replies'] + 1) / $forum_user['disp_posts']); | 1603: $forum_page['item_pages'] = ceil(($cur_topic['num_replies'] + 1) / $forum_user['disp_posts']); |
1579: | 1604: |
1580: if ($forum_page['item_pages'] > 1) | 1605: if ($forum_page['item_pages'] > 1) |
1587: $forum_page['item_status']['new'] = 'new'; | 1612: $forum_page['item_status']['new'] = 'new'; |
1588: } | 1613: } |
1589: | 1614: |
1590: if (!empty($forum_page['item_nav'])) | 1615: ($hook = get_hook('mr_topic_loop_normal_topic_pre_item_nav_merge')) ? eval($hook) : null; |
1591: $forum_page['item_title']['nav'] = '<span class="item-nav">'.sprintf($lang_forum['Topic navigation'], implode('  ', $forum_page['item_nav'])).'</span>'; | |
1592: | |
1593: ($hook = get_hook('mr_topic_actions_moved_row_pre_item_title_merge')) ? eval($hook) : null; | |
1594: | 1616: |
1595: $forum_page['item_body']['subject']['title'] = '<h3 class="hn"><span class="item-num">'.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span> '.implode(' ', $forum_page['item_title']).'</h3>'; | 1617: if (!empty($forum_page['item_nav'])) |
| 1618: $forum_page['item_subject']['nav'] = '<span class="item-nav">'.sprintf($lang_forum['Topic navigation'], implode('  ', $forum_page['item_nav'])).'</span>'; |
1596: | 1619: |
1597: // Assemble the Topic subject | 1620: // Assemble the Topic subject |
1598: | 1621: |
1599: if ($cur_topic['sticky'] == '1') | |
1600: { | |
1601: $forum_page['item_subject_status']['sticky'] = $lang_forum['Sticky']; | |
1602: $forum_page['item_status']['sticky'] = 'sticky'; | |
1603: } | |
1604: | |
1605: if ($cur_topic['closed'] == '1') | |
1606: { | |
1607: $forum_page['item_subject_status']['closed'] = $lang_forum['Closed']; | |
1608: $forum_page['item_status']['closed'] = 'closed'; | |
1609: } | |
1610: | |
1611: ($hook = get_hook('mr_topic_actions_moved_row_pre_item_subject_status_merge')) ? eval($hook) : null; | |
1612: | |
1613: if (!empty($forum_page['item_subject_status'])) | |
1614: $forum_page['item_subject']['status'] = '<span class="item-status">'.sprintf($lang_forum['Item status'], implode(' ', $forum_page['item_subject_status'])).'</span>'; | |
1615: | |
1616: if (empty($forum_page['item_status'])) | |
1617: $forum_page['item_status']['normal'] = 'normal'; | |
1618: | |
1619: $forum_page['item_body']['info']['replies'] = '<li class="info-replies"><strong>'.forum_number_format($cur_topic['num_replies']).'</strong> <span class="label">'.(($cur_topic['num_replies'] == 1) ? $lang_forum['Reply'] : $lang_forum['Replies']).'</span></li>'; | 1622: $forum_page['item_body']['info']['replies'] = '<li class="info-replies"><strong>'.forum_number_format($cur_topic['num_replies']).'</strong> <span class="label">'.(($cur_topic['num_replies'] == 1) ? $lang_forum['Reply'] : $lang_forum['Replies']).'</span></li>'; |
1620: | 1623: |
1621: if ($forum_config['o_topic_views'] == '1') | 1624: if ($forum_config['o_topic_views'] == '1') |
1627: ($hook = get_hook('mr_topic_actions_normal_row_pre_output')) ? eval($hook) : null; | 1630: ($hook = get_hook('mr_topic_actions_normal_row_pre_output')) ? eval($hook) : null; |
1628: } | 1631: } |
1629: | 1632: |
1630: $forum_page['item_subject']['starter'] = '<span class="item-starter">'.sprintf($lang_forum['Topic starter'], '<cite>'.forum_htmlencode($cur_topic['poster']).'</cite>').'</span>'; | 1633: $forum_page['item_body']['subject']['desc'] = '<p>'.implode(' ', $forum_page['item_subject']).'</p>'; |
1631: $forum_page['item_body']['subject']['desc'] = implode(' ', $forum_page['item_subject']); | 1634: |
| 1635: ($hook = get_hook('mr_topic_actions_row_pre_item_status_merge')) ? eval($hook) : null; |
1632: | 1636: |
1633: $forum_page['item_style'] = (($forum_page['item_count'] % 2 != 0) ? ' odd' : ' even').(($forum_page['item_count'] == 1) ? ' main-first-item' : '').((!empty($forum_page['item_status'])) ? ' '.implode(' ', $forum_page['item_status']) : ''); | 1637: $forum_page['item_style'] = (($forum_page['item_count'] % 2 != 0) ? ' odd' : ' even').(($forum_page['item_count'] == 1) ? ' main-first-item' : '').((!empty($forum_page['item_status'])) ? ' '.implode(' ', $forum_page['item_status']) : ''); |
1634: | 1638: |
punbb-1.3.2/post.php |
punbb-1.3.5/post.php |
2: /** | 2: /** |
3: * Adds a new post to the specified topic or a new topic to the specified forum. | 3: * Adds a new post to the specified topic or a new topic to the specified forum. |
4: * | 4: * |
5: * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org | 5: * @copyright (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org |
6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
7: * @package PunBB | 7: * @package PunBB |
8: */ | 8: */ |
124: $errors[] = $lang_post['No subject']; | 124: $errors[] = $lang_post['No subject']; |
125: else if (utf8_strlen($subject) > 70) | 125: else if (utf8_strlen($subject) > 70) |
126: $errors[] = $lang_post['Too long subject']; | 126: $errors[] = $lang_post['Too long subject']; |
127: else if ($forum_config['p_subject_all_caps'] == '0' && utf8_strtoupper($subject) == $subject && !$forum_page['is_admmod']) | 127: else if ($forum_config['p_subject_all_caps'] == '0' && check_is_all_caps($subject) && !$forum_page['is_admmod']) |
128: $errors[] = $lang_post['All caps subject']; | 128: $errors[] = $lang_post['All caps subject']; |
129: } | 129: } |
130: | 130: |
153: | 153: |
154: if (!is_valid_email($email)) | 154: if (!is_valid_email($email)) |
155: $errors[] = $lang_post['Invalid e-mail']; | 155: $errors[] = $lang_post['Invalid e-mail']; |
| 156: |
| 157: if (is_banned_email($email)) |
| 158: $errors[] = $lang_profile['Banned e-mail']; |
156: } | 159: } |
157: } | 160: } |
158: | 161: |
165: | 168: |
166: if (strlen($message) > FORUM_MAX_POSTSIZE_BYTES) | 169: if (strlen($message) > FORUM_MAX_POSTSIZE_BYTES) |
167: $errors[] = sprintf($lang_post['Too long message'], forum_number_format(strlen($message)), forum_number_format(FORUM_MAX_POSTSIZE_BYTES)); | 170: $errors[] = sprintf($lang_post['Too long message'], forum_number_format(strlen($message)), forum_number_format(FORUM_MAX_POSTSIZE_BYTES)); |
168: else if ($forum_config['p_message_all_caps'] == '0' && utf8_strtoupper($message) == $message && !$forum_page['is_admmod']) | 171: else if ($forum_config['p_message_all_caps'] == '0' && check_is_all_caps($message) && !$forum_page['is_admmod']) |
169: $errors[] = $lang_post['All caps message']; | 172: $errors[] = $lang_post['All caps message']; |
170: | 173: |
171: // Validate BBCode syntax | 174: // Validate BBCode syntax |
262: | 265: |
263: list($q_poster, $q_message) = $forum_db->fetch_row($result); | 266: list($q_poster, $q_message) = $forum_db->fetch_row($result); |
264: | 267: |
| 268: ($hook = get_hook('po_modify_quote_info')) ? eval($hook) : null; |
| 269: |
265: if ($forum_config['p_message_bbcode'] == '1') | 270: if ($forum_config['p_message_bbcode'] == '1') |
266: { | 271: { |
267: // If username contains a square bracket, we add "" or '' around it (so we know when it starts and ends) | 272: // If username contains a square bracket, we add "" or '' around it (so we know when it starts and ends) |
462: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 467: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
463: <div class="sf-box text required longtext"> | 468: <div class="sf-box text required longtext"> |
464: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_post['Topic subject'] ?> <em><?php echo $lang_common['Required'] ?></em></span></label><br /> | 469: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_post['Topic subject'] ?> <em><?php echo $lang_common['Required'] ?></em></span></label><br /> |
465: <span class="fld-input"><input id="fld<?php echo $forum_page['fld_count'] ?>" type="text" name="req_subject" value="<?php if (isset($_POST['req_subject'])) echo forum_htmlencode($subject); ?>" size="80" maxlength="70" /></span> | 470: <span class="fld-input"><input id="fld<?php echo $forum_page['fld_count'] ?>" type="text" name="req_subject" value="<?php if (isset($_POST['req_subject'])) echo forum_htmlencode($subject); ?>" size="70" maxlength="70" /></span> |
466: </div> | 471: </div> |
467: </div> | 472: </div> |
468: <?php | 473: <?php |
543: if (!defined('FORUM_PARSER_LOADED')) | 548: if (!defined('FORUM_PARSER_LOADED')) |
544: require FORUM_ROOT.'include/parser.php'; | 549: require FORUM_ROOT.'include/parser.php'; |
545: | 550: |
| 551: // Get the amount of posts in the topic |
| 552: $query = array( |
| 553: 'SELECT' => 'count(p.id)', |
| 554: 'FROM' => 'posts AS p', |
| 555: 'WHERE' => 'topic_id='.$tid |
| 556: ); |
| 557: |
| 558: ($hook = get_hook('po_topic_review_qr_get_post_count')) ? eval($hook) : null; |
| 559: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
| 560: $forum_page['total_post_count'] = $forum_db->result($result, 0); |
| 561: |
546: // Get posts to display in topic review | 562: // Get posts to display in topic review |
547: $query = array( | 563: $query = array( |
548: 'SELECT' => 'p.id, p.poster, p.message, p.hide_smilies, p.posted', | 564: 'SELECT' => 'p.id, p.poster, p.message, p.hide_smilies, p.posted', |
549: 'FROM' => 'posts AS p', | 565: 'FROM' => 'posts AS p', |
550: 'WHERE' => 'topic_id='.$tid, | 566: 'WHERE' => 'topic_id='.$tid, |
551: 'ORDER BY' => 'id DESC', | 567: 'ORDER BY' => 'id DESC', |
552: 'LIMIT' => $forum_config['o_topic_review'] | 568: 'LIMIT' => $forum_config['o_topic_review'] |
553: ); | 569: ); |
554: | 570: |
555: ($hook = get_hook('po_topic_review_qr_get_topic_review_posts')) ? eval($hook) : null; | 571: ($hook = get_hook('po_topic_review_qr_get_topic_review_posts')) ? eval($hook) : null; |
564: | 580: |
565: $forum_page['item_count'] = 0; | 581: $forum_page['item_count'] = 0; |
566: $forum_page['item_total'] = $forum_db->num_rows($result); | 582: $forum_page['item_total'] = $forum_db->num_rows($result); |
567: $forum_page['author_title'] = ''; | |
568: | 583: |
569: while ($cur_post = $forum_db->fetch_assoc($result)) | 584: while ($cur_post = $forum_db->fetch_assoc($result)) |
570: { | 585: { |
571: ++$forum_page['item_count']; | 586: ++$forum_page['item_count']; |
572: | 587: |
573: // Generate the post heading | |
574: $forum_page['post_ident'] = array( | |
575: 'num' => '<span class="post-num">'.forum_number_format($forum_page['item_count']).'</span>', | |
576: 'link' => '<span class="post-link">'.sprintf($lang_post['Post posted'], '<a class="permalink" rel="bookmark" title="'.$lang_post['Permalink post'].'" href="'.forum_link($forum_url['post'], $cur_post['id']).'">'.format_time($cur_post['posted']).'</a>').'</span>' | |
577: ); | |
578: | |
579: ($hook = get_hook('po_topic_review_pre_item_indent_merge')) ? eval($hook) : null; | |
580: | |
581: $forum_page['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']); | 588: $forum_page['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']); |
582: | 589: |
583: // Generate the post heading | 590: // Generate the post heading |
584: $forum_page['post_ident'] = array(); | 591: $forum_page['post_ident'] = array(); |
585: $forum_page['post_ident']['num'] = '<span class="post-num">'.forum_number_format($forum_page['item_count']).'</span>'; | 592: $forum_page['post_ident']['num'] = '<span class="post-num">'.forum_number_format($forum_page['total_post_count'] - $forum_page['item_count'] + 1).'</span>'; |
586: $forum_page['post_ident']['byline'] = '<span class="post-byline">'.sprintf($lang_post['Post byline'], '<strong>'.forum_htmlencode($cur_post['poster']).'</strong>').'</span>'; | 593: $forum_page['post_ident']['byline'] = '<span class="post-byline">'.sprintf($lang_post['Post byline'], '<strong>'.forum_htmlencode($cur_post['poster']).'</strong>').'</span>'; |
587: $forum_page['post_ident']['link'] = '<span class="post-link"><a class="permalink" rel="bookmark" title="'.$lang_post['Permalink post'].'" href="'.forum_link($forum_url['post'], $cur_post['id']).'">'.format_time($cur_post['posted']).'</a></span>'; | 594: $forum_page['post_ident']['link'] = '<span class="post-link"><a class="permalink" rel="bookmark" title="'.$lang_post['Permalink post'].'" href="'.forum_link($forum_url['post'], $cur_post['id']).'">'.format_time($cur_post['posted']).'</a></span>'; |
588: | 595: |
punbb-1.3.2/profile.php |
punbb-1.3.5/profile.php |
2: /** | 2: /** |
3: * Allows users to view and edit their details. | 3: * Allows users to view and edit their details. |
4: * | 4: * |
5: * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org | 5: * @copyright (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org |
6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
7: * @package PunBB | 7: * @package PunBB |
8: */ | 8: */ |
176: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 176: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
177: <div class="sf-box text required"> | 177: <div class="sf-box text required"> |
178: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['New password'] ?> <em><?php echo $lang_common['Required'] ?></em></span> <small><?php echo $lang_profile['Password help'] ?></small></label><br /> | 178: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['New password'] ?> <em><?php echo $lang_common['Required'] ?></em></span> <small><?php echo $lang_profile['Password help'] ?></small></label><br /> |
179: <span class="fld-input"><input type="password" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_new_password1" size="35" value="<?php echo(isset($_POST['req_new_password1']) ? ($_POST['req_new_password1']) : ''); ?>"/></span><br /> | 179: <span class="fld-input"><input type="password" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_new_password1" size="35" value="<?php echo(isset($_POST['req_new_password1']) ? forum_htmlencode($_POST['req_new_password1']) : ''); ?>"/></span><br /> |
180: </div> | 180: </div> |
181: </div> | 181: </div> |
182: <?php ($hook = get_hook('pf_change_pass_key_pre_new_password_confirm')) ? eval($hook) : null; ?> | 182: <?php ($hook = get_hook('pf_change_pass_key_pre_new_password_confirm')) ? eval($hook) : null; ?> |
183: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 183: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
184: <div class="sf-box text required"> | 184: <div class="sf-box text required"> |
185: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Confirm new password'] ?> <em><?php echo $lang_common['Required'] ?></em></span> <small><?php echo $lang_profile['Confirm password help'] ?></small></label><br /> | 185: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Confirm new password'] ?> <em><?php echo $lang_common['Required'] ?></em></span> <small><?php echo $lang_profile['Confirm password help'] ?></small></label><br /> |
186: <span class="fld-input"><input type="password" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_new_password2" size="35" value="<?php echo(isset($_POST['req_new_password2']) ? ($_POST['req_new_password2']) : ''); ?>"/></span><br /> | 186: <span class="fld-input"><input type="password" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_new_password2" size="35" value="<?php echo(isset($_POST['req_new_password2']) ? forum_htmlencode($_POST['req_new_password2']) : ''); ?>"/></span><br /> |
187: </div> | 187: </div> |
188: </div> | 188: </div> |
189: <?php ($hook = get_hook('pf_change_pass_key_pre_fieldset_end')) ? eval($hook) : null; ?> | 189: <?php ($hook = get_hook('pf_change_pass_key_pre_fieldset_end')) ? eval($hook) : null; ?> |
336: <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>"> | 336: <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>"> |
337: <legend class="group-legend"><strong><?php echo $lang_common['Required information'] ?></strong></legend> | 337: <legend class="group-legend"><strong><?php echo $lang_common['Required information'] ?></strong></legend> |
338: <?php ($hook = get_hook('pf_change_pass_normal_pre_old_password')) ? eval($hook) : null; ?> | 338: <?php ($hook = get_hook('pf_change_pass_normal_pre_old_password')) ? eval($hook) : null; ?> |
339: <?php if (!$forum_user['is_admmod']): ?> | 339: <?php if (!$forum_user['is_admmod'] || $forum_user['id'] == $id): ?> |
340: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 340: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
341: <div class="sf-box text required"> | 341: <div class="sf-box text required"> |
342: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Old password'] ?> <em><?php echo $lang_common['Required'] ?></em></span> <small><?php echo $lang_profile['Old password help'] ?></small></label><br /> | 342: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Old password'] ?> <em><?php echo $lang_common['Required'] ?></em></span> <small><?php echo $lang_profile['Old password help'] ?></small></label><br /> |
343: <span class="fld-input"><input type="password" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_old_password" size="35" value="<?php echo(isset($_POST['req_old_password']) ? ($_POST['req_old_password']) : ''); ?>"/></span> | 343: <span class="fld-input"><input type="password" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_old_password" size="35" value="<?php echo(isset($_POST['req_old_password']) ? forum_htmlencode($_POST['req_old_password']) : ''); ?>"/></span> |
344: </div> | 344: </div> |
345: </div> | 345: </div> |
346: <?php endif; ($hook = get_hook('pf_change_pass_normal_pre_new_password')) ? eval($hook) : null; ?> | 346: <?php endif; ($hook = get_hook('pf_change_pass_normal_pre_new_password')) ? eval($hook) : null; ?> |
347: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 347: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
348: <div class="sf-box text required"> | 348: <div class="sf-box text required"> |
349: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['New password'] ?> <em><?php echo $lang_common['Required'] ?></em></span> <small><?php echo $lang_profile['Password help'] ?></small></label><br /> | 349: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['New password'] ?> <em><?php echo $lang_common['Required'] ?></em></span> <small><?php echo $lang_profile['Password help'] ?></small></label><br /> |
350: <span class="fld-input"><input type="password" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_new_password1" size="35" value="<?php echo(isset($_POST['req_new_password1']) ? ($_POST['req_new_password1']) : ''); ?>"/></span><br /> | 350: <span class="fld-input"><input type="password" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_new_password1" size="35" value="<?php echo(isset($_POST['req_new_password1']) ? forum_htmlencode($_POST['req_new_password1']) : ''); ?>"/></span><br /> |
351: </div> | 351: </div> |
352: </div> | 352: </div> |
353: <?php ($hook = get_hook('pf_change_pass_normal_pre_new_password_confirm')) ? eval($hook) : null; ?> | 353: <?php ($hook = get_hook('pf_change_pass_normal_pre_new_password_confirm')) ? eval($hook) : null; ?> |
354: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 354: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
355: <div class="sf-box text required"> | 355: <div class="sf-box text required"> |
356: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Confirm new password'] ?> <em><?php echo $lang_common['Required'] ?></em></span> <small><?php echo $lang_profile['Confirm password help'] ?></small></label><br /> | 356: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Confirm new password'] ?> <em><?php echo $lang_common['Required'] ?></em></span> <small><?php echo $lang_profile['Confirm password help'] ?></small></label><br /> |
357: <span class="fld-input"><input type="password" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_new_password2" size="35" value="<?php echo(isset($_POST['req_new_password2']) ? ($_POST['req_new_password2']) : ''); ?>"/></span><br /> | 357: <span class="fld-input"><input type="password" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_new_password2" size="35" value="<?php echo(isset($_POST['req_new_password2']) ? forum_htmlencode($_POST['req_new_password2']) : ''); ?>"/></span><br /> |
358: </div> | 358: </div> |
359: </div> | 359: </div> |
360: <?php ($hook = get_hook('pf_change_pass_normal_pre_fieldset_end')) ? eval($hook) : null; ?> | 360: <?php ($hook = get_hook('pf_change_pass_normal_pre_fieldset_end')) ? eval($hook) : null; ?> |
430: if (!is_valid_email($new_email)) | 430: if (!is_valid_email($new_email)) |
431: $errors[] = $lang_common['Invalid e-mail']; | 431: $errors[] = $lang_common['Invalid e-mail']; |
432: | 432: |
433: // Check it it's a banned e-mail address | 433: // Check if it's a banned e-mail address |
434: if (is_banned_email($new_email)) | 434: if (is_banned_email($new_email)) |
435: { | 435: { |
436: ($hook = get_hook('pf_change_email_normal_banned_email')) ? eval($hook) : null; | 436: ($hook = get_hook('pf_change_email_normal_banned_email')) ? eval($hook) : null; |
476: // Did everything go according to plan? | 476: // Did everything go according to plan? |
477: if (empty($errors)) | 477: if (empty($errors)) |
478: { | 478: { |
| 479: if ($forum_config['o_regs_verify'] != '1') |
| 480: { |
| 481: // We have no confirmed e-mail so we change e-mail right now |
| 482: $query = array( |
| 483: 'UPDATE' => 'users', |
| 484: 'SET' => 'email=\''.$forum_db->escape($new_email).'\'', |
| 485: 'WHERE' => 'id='.$id |
| 486: ); |
| 487: |
| 488: ($hook = get_hook('pf_change_email_key_qr_update_email')) ? eval($hook) : null; |
| 489: $forum_db->query_build($query) or error(__FILE__, __LINE__); |
| 490: |
| 491: redirect(forum_link($forum_url['profile_about'], $id), $lang_profile['E-mail updated redirect']); |
| 492: } |
| 493: |
| 494: // We have a confirmed e-mail so we going to send an activation link |
| 495: |
479: $new_email_key = random_key(8, true); | 496: $new_email_key = random_key(8, true); |
480: | 497: |
481: // Save new e-mail and activation key | 498: // Save new e-mail and activation key |
593: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 610: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
594: <div class="sf-box text required"> | 611: <div class="sf-box text required"> |
595: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Password'] ?> <em><?php echo $lang_common['Required'] ?></em></span></label><br /> | 612: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Password'] ?> <em><?php echo $lang_common['Required'] ?></em></span></label><br /> |
596: <span class="fld-input"><input type="password" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_password" size="25" value="<?php echo(isset($_POST['req_password']) ? ($_POST['req_password']) : ''); ?>"/></span> | 613: <span class="fld-input"><input type="password" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_password" size="25" value="<?php echo(isset($_POST['req_password']) ? forum_htmlencode($_POST['req_password']) : ''); ?>"/></span> |
597: </div> | 614: </div> |
598: </div> | 615: </div> |
599: <?php ($hook = get_hook('pf_change_email_normal_pre_fieldset_end')) ? eval($hook) : null; ?> | 616: <?php ($hook = get_hook('pf_change_email_normal_pre_fieldset_end')) ? eval($hook) : null; ?> |
889: $form['num_posts'] = intval($_POST['num_posts']); | 906: $form['num_posts'] = intval($_POST['num_posts']); |
890: } | 907: } |
891: | 908: |
892: if ($forum_config['o_regs_verify'] == '0' || $forum_user['is_admmod']) | 909: if ($forum_user['is_admmod']) |
893: { | 910: { |
894: if (!defined('FORUM_EMAIL_FUNCTIONS_LOADED')) | 911: if (!defined('FORUM_EMAIL_FUNCTIONS_LOADED')) |
895: require FORUM_ROOT.'include/email.php'; | 912: require FORUM_ROOT.'include/email.php'; |
940: $form['dst'] = (isset($form['dst'])) ? 1 : 0; | 957: $form['dst'] = (isset($form['dst'])) ? 1 : 0; |
941: $form['time_format'] = (isset($form['time_format'])) ? intval($form['time_format']) : 0; | 958: $form['time_format'] = (isset($form['time_format'])) ? intval($form['time_format']) : 0; |
942: $form['date_format'] = (isset($form['date_format'])) ? intval($form['date_format']) : 0; | 959: $form['date_format'] = (isset($form['date_format'])) ? intval($form['date_format']) : 0; |
| 960: $form['timezone'] = (isset($form['timezone'])) ? floatval($form['timezone']) : $forum_config['o_default_timezone']; |
| 961: |
| 962: // Validate timezone |
| 963: if (($form['timezone'] > 14.0) || ($form['timezone'] < -12.0)) { |
| 964: message($lang_common['Bad request']); |
| 965: } |
943: | 966: |
944: $form['email_setting'] = intval($form['email_setting']); | 967: $form['email_setting'] = intval($form['email_setting']); |
945: if ($form['email_setting'] < 0 && $form['email_setting'] > 2) $form['email_setting'] = 1; | 968: if ($form['email_setting'] < 0 || $form['email_setting'] > 2) $form['email_setting'] = 1; |
946: | 969: |
947: if ($forum_config['o_subscriptions'] == '1') | 970: if ($forum_config['o_subscriptions'] == '1') |
948: { | 971: { |
995: if (substr_count($form['signature'], "\n") > ($forum_config['p_sig_lines'] - 1)) | 1018: if (substr_count($form['signature'], "\n") > ($forum_config['p_sig_lines'] - 1)) |
996: $errors[] = sprintf($lang_profile['Sig too many lines'], forum_number_format($forum_config['p_sig_lines'])); | 1019: $errors[] = sprintf($lang_profile['Sig too many lines'], forum_number_format($forum_config['p_sig_lines'])); |
997: | 1020: |
998: if ($form['signature'] != '' && $forum_config['p_sig_all_caps'] == '0' && utf8_strtoupper($form['signature']) == $form['signature'] && !$forum_user['is_admmod']) | 1021: if ($form['signature'] != '' && $forum_config['p_sig_all_caps'] == '0' && check_is_all_caps($form['signature']) && !$forum_user['is_admmod']) |
999: $form['signature'] = utf8_ucwords(utf8_strtolower($form['signature'])); | 1022: $form['signature'] = utf8_ucwords(utf8_strtolower($form['signature'])); |
1000: | 1023: |
1001: // Validate BBCode syntax | 1024: // Validate BBCode syntax |
1284: $forum_user['g_id'] != FORUM_ADMIN && | 1307: $forum_user['g_id'] != FORUM_ADMIN && |
1285: ($forum_user['g_moderator'] != '1' || $forum_user['g_mod_edit_users'] == '0' || $user['g_id'] == FORUM_ADMIN || $user['g_moderator'] == '1')) | 1308: ($forum_user['g_moderator'] != '1' || $forum_user['g_mod_edit_users'] == '0' || $user['g_id'] == FORUM_ADMIN || $user['g_moderator'] == '1')) |
1286: { | 1309: { |
1287: ($hook = get_hook('pf_view_details_selected')) ? eval($hook) : null; | |
1288: | |
1289: // Setup user identification | 1310: // Setup user identification |
1290: $forum_page['user_ident'] = array(); | 1311: $forum_page['user_ident'] = array(); |
1291: | 1312: |
1292: ($hook = get_hook('pf_view_details_selected')) ? eval($hook) : null; | 1313: ($hook = get_hook('pf_view_details_selected')) ? eval($hook) : null; |
1293: | 1314: |
1294: $forum_page['user_ident']['username'] = '<li class="username'.(($user['realname'] =='') ? ' fn nickname' : ' nickname').'"><strong>'.forum_htmlencode($user['username']).'</strong></li>'; | 1315: $forum_page['user_ident']['username'] = '<li class="username'.(($user['realname'] =='') ? ' fn nickname' : ' nickname').'"><strong>'.forum_htmlencode($user['username']).'</strong></li>'; |
1295: $forum_page['user_ident']['usertitle'] = '<li class="usertitle"><span>'.get_title($user).'</span></li>'; | |
1296: | 1316: |
1297: if ($forum_config['o_avatars'] == '1') | 1317: if ($forum_config['o_avatars'] == '1') |
1298: { | 1318: { |
1302: $forum_page['user_ident']['avatar'] = '<li class="useravatar">'.$forum_page['avatar_markup'].'</li>'; | 1322: $forum_page['user_ident']['avatar'] = '<li class="useravatar">'.$forum_page['avatar_markup'].'</li>'; |
1303: } | 1323: } |
1304: | 1324: |
| 1325: $forum_page['user_ident']['usertitle'] = '<li class="usertitle"><span>'.get_title($user).'</span></li>'; |
| 1326: |
1305: // Setup user information | 1327: // Setup user information |
1306: $forum_page['user_info'] = array(); | 1328: $forum_page['user_info'] = array(); |
1307: | 1329: |
1407: </ul> | 1429: </ul> |
1408: </div> | 1430: </div> |
1409: </div> | 1431: </div> |
1410: <?php ($hook = get_hook('pf_view_details_pre_user_activity_info')) ? eval($hook) : null; ?> | 1432: <?php endif; ($hook = get_hook('pf_view_details_pre_user_activity_info')) ? eval($hook) : null; ?> |
1411: <?php endif; if (!empty($forum_page['user_activity'])): ?> | 1433: <?php if (!empty($forum_page['user_activity'])): ?> |
1412: <div class="ct-set data-set set<?php echo ++$forum_page['item_count'] ?>"> | 1434: <div class="ct-set data-set set<?php echo ++$forum_page['item_count'] ?>"> |
1413: <div class="ct-box data-box"> | 1435: <div class="ct-box data-box"> |
1414: <h3 class="ct-legend hn"><span><?php echo $lang_profile['Posts and topics'] ?></span></h3> | 1436: <h3 class="ct-legend hn"><span><?php echo $lang_profile['Posts and topics'] ?></span></h3> |
1417: </ul> | 1439: </ul> |
1418: </div> | 1440: </div> |
1419: </div> | 1441: </div> |
1420: <?php ($hook = get_hook('pf_view_details_pre_user_sig_info')) ? eval($hook) : null; ?> | 1442: <?php endif; ($hook = get_hook('pf_view_details_pre_user_sig_info')) ? eval($hook) : null; ?> |
1421: <?php endif; if (isset($forum_page['sig_demo'])): ?> | 1443: <?php if (isset($forum_page['sig_demo'])): ?> |
1422: <div class="ct-set data-set set<?php echo ++$forum_page['item_count'] ?>"> | 1444: <div class="ct-set data-set set<?php echo ++$forum_page['item_count'] ?>"> |
1423: <div class="ct-box data-box"> | 1445: <div class="ct-box data-box"> |
1424: <h3 class="ct-legend hn"><span><?php echo $lang_profile['Current signature'] ?></span></h3> | 1446: <h3 class="ct-legend hn"><span><?php echo $lang_profile['Current signature'] ?></span></h3> |
1486: ($hook = get_hook('pf_change_details_about_selected')) ? eval($hook) : null; | 1508: ($hook = get_hook('pf_change_details_about_selected')) ? eval($hook) : null; |
1487: | 1509: |
1488: $forum_page['user_ident']['username'] = '<li class="username'.(($user['realname'] =='') ? ' fn nickname' : ' nickname').'"><strong>'.forum_htmlencode($user['username']).'</strong></li>'; | 1510: $forum_page['user_ident']['username'] = '<li class="username'.(($user['realname'] =='') ? ' fn nickname' : ' nickname').'"><strong>'.forum_htmlencode($user['username']).'</strong></li>'; |
1489: $forum_page['user_ident']['usertitle'] = '<li class="usertitle"><span>'.get_title($user).'</span></li>'; | |
1490: | 1511: |
1491: if ($forum_config['o_avatars'] == '1') | 1512: if ($forum_config['o_avatars'] == '1') |
1492: { | 1513: { |
1496: $forum_page['user_ident']['avatar'] = '<li class="useravatar">'.$forum_page['avatar_markup'].'</li>'; | 1517: $forum_page['user_ident']['avatar'] = '<li class="useravatar">'.$forum_page['avatar_markup'].'</li>'; |
1497: } | 1518: } |
1498: | 1519: |
| 1520: $forum_page['user_ident']['usertitle'] = '<li class="usertitle"><span>'.get_title($user).'</span></li>'; |
| 1521: |
1499: // Create array for private information | 1522: // Create array for private information |
1500: $forum_page['user_private'] = array(); | 1523: $forum_page['user_private'] = array(); |
1501: | 1524: |
1549: | 1572: |
1550: // Setup user messaging | 1573: // Setup user messaging |
1551: if ($user['jabber'] !='') | 1574: if ($user['jabber'] !='') |
1552: $forum_page['user_contact']['jabber'] = '<li><span><strong>'.$lang_profile['Jabber'].':</strong> '.forum_htmlencode(($forum_config['o_censoring'] == '1') ? censor_words($user['jabber']) : $user['jabber']).'</span></li>'; | 1575: $forum_page['user_contact']['jabber'] = '<li><span>'.$lang_profile['Jabber'].': <strong>'.forum_htmlencode(($forum_config['o_censoring'] == '1') ? censor_words($user['jabber']) : $user['jabber']).'</strong></span></li>'; |
1553: if ($user['icq'] !='') | 1576: if ($user['icq'] !='') |
1554: $forum_page['user_contact']['icq'] = '<li><span><strong>'.$lang_profile['ICQ'].':</strong> '.forum_htmlencode($user['icq']).'</span></li>'; | 1577: $forum_page['user_contact']['icq'] = '<li><span>'.$lang_profile['ICQ'].': <strong>'.forum_htmlencode($user['icq']).'</strong></span></li>'; |
1555: if ($user['msn'] !='') | 1578: if ($user['msn'] !='') |
1556: $forum_page['user_contact']['msn'] = '<li><span><strong>'.$lang_profile['MSN'].':</strong> '.forum_htmlencode(($forum_config['o_censoring'] == '1') ? censor_words($user['msn']) : $user['msn']).'</span></li>'; | 1579: $forum_page['user_contact']['msn'] = '<li><span>'.$lang_profile['MSN'].': <strong>'.forum_htmlencode(($forum_config['o_censoring'] == '1') ? censor_words($user['msn']) : $user['msn']).'</strong></span></li>'; |
1557: if ($user['aim'] !='') | 1580: if ($user['aim'] !='') |
1558: $forum_page['user_contact']['aim'] = '<li><span><strong>'.$lang_profile['AOL IM'].':</strong> '.forum_htmlencode(($forum_config['o_censoring'] == '1') ? censor_words($user['aim']) : $user['aim']).'</span></li>'; | 1581: $forum_page['user_contact']['aim'] = '<li><span>'.$lang_profile['AOL IM'].': <strong>'.forum_htmlencode(($forum_config['o_censoring'] == '1') ? censor_words($user['aim']) : $user['aim']).'</strong></span></li>'; |
1559: if ($user['yahoo'] !='') | 1582: if ($user['yahoo'] !='') |
1560: $forum_page['user_contact']['yahoo'] = '<li><span><strong>'.$lang_profile['Yahoo'].':</strong> '.forum_htmlencode(($forum_config['o_censoring'] == '1') ? censor_words($user['yahoo']) : $user['yahoo']).'</span></li>'; | 1583: $forum_page['user_contact']['yahoo'] = '<li><span>'.$lang_profile['Yahoo'].': <strong>'.forum_htmlencode(($forum_config['o_censoring'] == '1') ? censor_words($user['yahoo']) : $user['yahoo']).'</strong></span></li>'; |
1561: | 1584: |
1562: // Setup signature demo | 1585: // Setup signature demo |
1563: if ($forum_config['o_signatures'] == '1' && isset($parsed_signature)) | 1586: if ($forum_config['o_signatures'] == '1' && isset($parsed_signature)) |
1580: if ($forum_page['own_profile'] || $forum_user['g_id'] == FORUM_ADMIN || ($forum_user['g_moderator'] == '1' && $forum_user['g_mod_change_passwords'] == '1')) | 1603: if ($forum_page['own_profile'] || $forum_user['g_id'] == FORUM_ADMIN || ($forum_user['g_moderator'] == '1' && $forum_user['g_mod_change_passwords'] == '1')) |
1581: $forum_page['user_options']['change_password'] = '<span'.(empty($forum_page['user_options']) ? ' class="first-item"' : '').'><a href="'.forum_link($forum_url['change_password'], $id).'">'.(($forum_page['own_profile']) ? $lang_profile['Change your password'] : sprintf($lang_profile['Change user password'], forum_htmlencode($user['username']))).'</a></span>'; | 1604: $forum_page['user_options']['change_password'] = '<span'.(empty($forum_page['user_options']) ? ' class="first-item"' : '').'><a href="'.forum_link($forum_url['change_password'], $id).'">'.(($forum_page['own_profile']) ? $lang_profile['Change your password'] : sprintf($lang_profile['Change user password'], forum_htmlencode($user['username']))).'</a></span>'; |
1582: | 1605: |
1583: if (!$forum_user['is_admmod'] && $forum_config['o_regs_verify'] == '1') | 1606: if (!$forum_user['is_admmod']) |
1584: $forum_page['user_options']['change_email'] = '<span'.(empty($forum_page['user_options']) ? ' class="first-item"' : '').'><a href="'.forum_link($forum_url['change_email'], $id).'">'.(($forum_page['own_profile']) ? $lang_profile['Change your e-mail'] : sprintf($lang_profile['Change user e-mail'], forum_htmlencode($user['username']))).'</a></span>'; | 1607: $forum_page['user_options']['change_email'] = '<span'.(empty($forum_page['user_options']) ? ' class="first-item"' : '').'><a href="'.forum_link($forum_url['change_email'], $id).'">'.(($forum_page['own_profile']) ? $lang_profile['Change your e-mail'] : sprintf($lang_profile['Change user e-mail'], forum_htmlencode($user['username']))).'</a></span>'; |
1585: | 1608: |
1586: $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0; | 1609: $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0; |
1690: $forum_page['hidden_fields']['old_username'] = '<input type="hidden" name="old_username" value="'.forum_htmlencode($user['username']).'" />'; | 1713: $forum_page['hidden_fields']['old_username'] = '<input type="hidden" name="old_username" value="'.forum_htmlencode($user['username']).'" />'; |
1691: | 1714: |
1692: // Does the form have required fields | 1715: // Does the form have required fields |
1693: $forum_page['has_required'] = ((($forum_user['is_admmod'] && ($forum_user['g_id'] == FORUM_ADMIN || $forum_user['g_mod_rename_users'] == '1')) || ($forum_user['is_admmod'] || $forum_config['o_regs_verify'] != '1')) ? true : false); | 1716: $forum_page['has_required'] = ((($forum_user['is_admmod'] && ($forum_user['g_id'] == FORUM_ADMIN || $forum_user['g_mod_rename_users'] == '1')) || $forum_user['is_admmod']) ? true : false); |
1694: | 1717: |
1695: ($hook = get_hook('pf_change_details_identity_pre_header_load')) ? eval($hook) : null; | 1718: ($hook = get_hook('pf_change_details_identity_pre_header_load')) ? eval($hook) : null; |
1696: | 1719: |
1750: </div> | 1773: </div> |
1751: </div> | 1774: </div> |
1752: <?php endif; ($hook = get_hook('pf_change_details_identity_pre_email')) ? eval($hook) : null; ?> | 1775: <?php endif; ($hook = get_hook('pf_change_details_identity_pre_email')) ? eval($hook) : null; ?> |
1753: <?php if ($forum_user['is_admmod'] || $forum_config['o_regs_verify'] != '1'): ?> | 1776: <?php if ($forum_user['is_admmod']): ?> |
1754: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 1777: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
1755: <div class="sf-box text required"> | 1778: <div class="sf-box text required"> |
1756: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['E-mail'] ?> <em><?php echo $lang_common['Required'] ?></em></span> <small><?php echo $lang_profile['E-mail help'] ?></small></label><br /> | 1779: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['E-mail'] ?> <em><?php echo $lang_common['Required'] ?></em></span> <small><?php echo $lang_profile['E-mail help'] ?></small></label><br /> |
1811: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 1834: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
1812: <div class="sf-box text"> | 1835: <div class="sf-box text"> |
1813: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Website'] ?></span></label><br /> | 1836: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Website'] ?></span></label><br /> |
1814: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[url]" value="<?php echo(isset($form['url']) ? forum_htmlencode($form['url']) : forum_htmlencode($user['url'])) ?>" size="50" maxlength="80" /></span> | 1837: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[url]" value="<?php echo(isset($form['url']) ? forum_htmlencode($form['url']) : forum_htmlencode($user['url'])) ?>" size="35" maxlength="80" /></span> |
1815: </div> | 1838: </div> |
1816: </div> | 1839: </div> |
1817: <?php ($hook = get_hook('pf_change_details_identity_pre_jabber')) ? eval($hook) : null; ?> | 1840: <?php ($hook = get_hook('pf_change_details_identity_pre_jabber')) ? eval($hook) : null; ?> |
1818: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 1841: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
1819: <div class="sf-box text"> | 1842: <div class="sf-box text"> |
1820: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Jabber'] ?></span></label><br /> | 1843: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Jabber'] ?></span></label><br /> |
1821: <span class="fld-input"><input id="fld<?php echo $forum_page['fld_count'] ?>" type="text" name="form[jabber]" value="<?php echo(isset($form['jabber']) ? forum_htmlencode($form['jabber']) : forum_htmlencode($user['jabber'])) ?>" size="40" maxlength="80" /></span> | 1844: <span class="fld-input"><input id="fld<?php echo $forum_page['fld_count'] ?>" type="text" name="form[jabber]" value="<?php echo(isset($form['jabber']) ? forum_htmlencode($form['jabber']) : forum_htmlencode($user['jabber'])) ?>" size="35" maxlength="80" /></span> |
1822: </div> | 1845: </div> |
1823: </div> | 1846: </div> |
1824: <?php ($hook = get_hook('pf_change_details_identity_pre_icq')) ? eval($hook) : null; ?> | 1847: <?php ($hook = get_hook('pf_change_details_identity_pre_icq')) ? eval($hook) : null; ?> |
1832: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 1855: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
1833: <div class="sf-box text"> | 1856: <div class="sf-box text"> |
1834: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['MSN'] ?></span></label><br /> | 1857: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['MSN'] ?></span></label><br /> |
1835: <span class="fld-input"><input id="fld<?php echo $forum_page['fld_count'] ?>" type="text" name="form[msn]" value="<?php echo(isset($form['msn']) ? forum_htmlencode($form['msn']) : forum_htmlencode($user['msn'])) ?>" size="40" maxlength="80" /></span> | 1858: <span class="fld-input"><input id="fld<?php echo $forum_page['fld_count'] ?>" type="text" name="form[msn]" value="<?php echo(isset($form['msn']) ? forum_htmlencode($form['msn']) : forum_htmlencode($user['msn'])) ?>" size="35" maxlength="80" /></span> |
1836: </div> | 1859: </div> |
1837: </div> | 1860: </div> |
1838: <?php ($hook = get_hook('pf_change_details_identity_pre_aim')) ? eval($hook) : null; ?> | 1861: <?php ($hook = get_hook('pf_change_details_identity_pre_aim')) ? eval($hook) : null; ?> |
2239: $forum_page['crumbs'] = array( | 2262: $forum_page['crumbs'] = array( |
2240: array($forum_config['o_board_title'], forum_link($forum_url['index'])), | 2263: array($forum_config['o_board_title'], forum_link($forum_url['index'])), |
2241: array(sprintf($lang_profile['Users profile'], $user['username']), forum_link($forum_url['user'], $id)), | 2264: array(sprintf($lang_profile['Users profile'], $user['username']), forum_link($forum_url['user'], $id)), |
2242: array($lang_profile['Section signature'],forum_link($forum_url['profile_signature'], $id)) | 2265: array($lang_profile['Section signature'], forum_link($forum_url['profile_signature'], $id)) |
2243: ); | 2266: ); |
2244: | 2267: |
2245: // Setup the form | 2268: // Setup the form |
2532: | 2555: |
2533: echo "\t\t\t".implode("\n\t\t\t", $forum_page['user_management'])."\n"; | 2556: echo "\t\t\t".implode("\n\t\t\t", $forum_page['user_management'])."\n"; |
2534: | 2557: |
2535: ($hook = get_hook('pf_change_details_admin_pre_group_membership')) ? eval($hook) : null; | 2558: ($hook = get_hook('pf_change_details_admin_pre_membership')) ? eval($hook) : null; |
2536: | 2559: |
2537: if ($forum_user['g_moderator'] != '1' && !$forum_page['own_profile']) | 2560: if ($forum_user['g_moderator'] != '1' && !$forum_page['own_profile']) |
2538: { | 2561: { |
punbb-1.3.2/search.php |
punbb-1.3.5/search.php |
2: /** | 2: /** |
3: * Allows users to search the forum based on various criteria. | 3: * Allows users to search the forum based on various criteria. |
4: * | 4: * |
5: * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org | 5: * @copyright (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org |
6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
7: * @package PunBB | 7: * @package PunBB |
8: */ | 8: */ |
42: // We aren't just grabbing a cached search | 42: // We aren't just grabbing a cached search |
43: else if (isset($_GET['action'])) | 43: else if (isset($_GET['action'])) |
44: { | 44: { |
45: $action = (isset($_GET['action'])) ? $_GET['action'] : null; | 45: $action = $_GET['action']; |
46: | 46: |
47: // Validate action | 47: // Validate action |
48: if (!validate_search_action($action)) | 48: if (!validate_search_action($action)) |
191: <div class="main-subhead"> | 191: <div class="main-subhead"> |
192: <p class="item-summary forum-noview"><span><?php printf($lang_forum['Search subtitle'], implode(' ', $forum_page['item_header']['subject']), implode(', ', $forum_page['item_header']['info'])) ?></span></p> | 192: <p class="item-summary forum-noview"><span><?php printf($lang_forum['Search subtitle'], implode(' ', $forum_page['item_header']['subject']), implode(', ', $forum_page['item_header']['info'])) ?></span></p> |
193: </div> | 193: </div> |
194: <div class="main-content main-forum forum-noview"> | 194: <div class="main-content main-forum forum-forums"> |
195: <?php | 195: <?php |
196: | 196: |
197: } | 197: } |
237: { | 237: { |
238: // Generate the result heading | 238: // Generate the result heading |
239: $forum_page['post_ident'] = array(); | 239: $forum_page['post_ident'] = array(); |
240: $forum_page['post_ident']['num'] = '<span class="post-num">'.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span>'; | 240: $forum_page['post_ident']['num'] = '<span class="post-num">'.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span>'; |
241: $forum_page['post_ident']['byline'] = '<span class="post-byline">'.sprintf((($cur_set['pid'] == $cur_set['first_post_id']) ? $lang_topic['Topic byline'] : $lang_topic['Reply byline']), '<strong>'.forum_htmlencode($cur_set['pposter']).'</strong>').'</span>'; | 241: $forum_page['post_ident']['byline'] = '<span class="post-byline">'.sprintf((($cur_set['pid'] == $cur_set['first_post_id']) ? $lang_topic['Topic byline'] : $lang_topic['Reply byline']), '<strong>'.forum_htmlencode($cur_set['pposter']).'</strong>').'</span>'; |
242: $forum_page['post_ident']['link'] = '<span class="post-link"><a class="permalink" rel="bookmark" title="'.$lang_topic['Permalink post'].'" href="'.forum_link($forum_url['post'], $cur_set['pid']).'">'.format_time($cur_set['pposted']).'</a></span>'; | 242: $forum_page['post_ident']['link'] = '<span class="post-link"><a class="permalink" rel="bookmark" title="'.$lang_topic['Permalink post'].'" href="'.forum_link($forum_url['post'], $cur_set['pid']).'">'.format_time($cur_set['pposted']).'</a></span>'; |
243: | 243: |
305: { | 305: { |
306: // Start from scratch | 306: // Start from scratch |
307: $forum_page['item_subject'] = $forum_page['item_body'] = $forum_page['item_status'] = $forum_page['item_nav'] = $forum_page['item_title'] = $forum_page['item_title_status'] = array(); | 307: $forum_page['item_subject'] = $forum_page['item_body'] = $forum_page['item_status'] = $forum_page['item_nav'] = $forum_page['item_title'] = $forum_page['item_title_status'] = array(); |
308: $forum_page['item_indicator'] = ''; | |
309: | 308: |
310: // Assemble the Topic heading | 309: // Assemble the Topic heading |
311: | 310: |
335: | 334: |
336: $forum_page['item_title']['link'] = '<a href="'.forum_link($forum_url['topic'], array($cur_set['tid'], sef_friendly($cur_set['subject']))).'">'.forum_htmlencode($cur_set['subject']).'</a>'; | 335: $forum_page['item_title']['link'] = '<a href="'.forum_link($forum_url['topic'], array($cur_set['tid'], sef_friendly($cur_set['subject']))).'">'.forum_htmlencode($cur_set['subject']).'</a>'; |
337: | 336: |
| 337: ($hook = get_hook('se_results_topics_row_pre_item_title_merge')) ? eval($hook) : null; |
| 338: |
| 339: $forum_page['item_body']['subject']['title'] = '<h3 class="hn"><span class="item-num">'.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span> '.implode(' ', $forum_page['item_title']).'</h3>'; |
| 340: |
338: $forum_page['item_pages'] = ceil(($cur_set['num_replies'] + 1) / $forum_user['disp_posts']); | 341: $forum_page['item_pages'] = ceil(($cur_set['num_replies'] + 1) / $forum_user['disp_posts']); |
339: | 342: |
340: if ($forum_page['item_pages'] > 1) | 343: if ($forum_page['item_pages'] > 1) |
349: | 352: |
350: ($hook = get_hook('se_results_topics_row_pre_item_nav_merge')) ? eval($hook) : null; | 353: ($hook = get_hook('se_results_topics_row_pre_item_nav_merge')) ? eval($hook) : null; |
351: | 354: |
352: if (!empty($forum_page['item_nav'])) | 355: $forum_page['item_subject']['starter'] = '<span class="item-starter">'.sprintf($lang_forum['Topic starter'], forum_htmlencode($cur_set['poster'])).'</span>'; |
353: $forum_page['item_title']['nav'] = '<span class="item-nav">'.sprintf($lang_forum['Topic navigation'], implode('  ', $forum_page['item_nav'])).'</span>'; | |
354: | 356: |
355: ($hook = get_hook('se_results_topics_row_pre_item_title_merge')) ? eval($hook) : null; | 357: if (!empty($forum_page['item_nav'])) |
356: | 358: $forum_page['item_subject']['nav'] = '<span class="item-nav">'.sprintf($lang_forum['Topic navigation'], implode('  ', $forum_page['item_nav'])).'</span>'; |
357: $forum_page['item_body']['subject']['title'] = '<h3 class="hn"><span class="item-num">'.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span> '.implode(' ', $forum_page['item_title']).'</h3>'; | |
358: | |
359: $forum_page['item_subject']['starter'] = '<span class="item-starter">'.sprintf($lang_forum['Topic starter'], '<cite>'.forum_htmlencode($cur_set['poster']).'</cite>').'</span>'; | |
360: | 359: |
361: ($hook = get_hook('se_results_topics_row_pre_item_subject_merge')) ? eval($hook) : null; | 360: ($hook = get_hook('se_results_topics_row_pre_item_subject_merge')) ? eval($hook) : null; |
362: | 361: |
363: $forum_page['item_body']['subject']['desc'] = implode(' ', $forum_page['item_subject']); | 362: $forum_page['item_body']['subject']['desc'] = '<p>'.implode(' ', $forum_page['item_subject']).'</p>'; |
364: | 363: |
365: if (empty($forum_page['item_status'])) | 364: if (empty($forum_page['item_status'])) |
366: $forum_page['item_status']['normal'] = 'normal'; | 365: $forum_page['item_status']['normal'] = 'normal'; |
369: | 368: |
370: $forum_page['item_style'] = (($forum_page['item_count'] % 2 != 0) ? ' odd' : ' even').(($forum_page['item_count'] == 1) ? ' main-first-item' : '').((!empty($forum_page['item_status'])) ? ' '.implode(' ', $forum_page['item_status']) : ''); | 369: $forum_page['item_style'] = (($forum_page['item_count'] % 2 != 0) ? ' odd' : ' even').(($forum_page['item_count'] == 1) ? ' main-first-item' : '').((!empty($forum_page['item_status'])) ? ' '.implode(' ', $forum_page['item_status']) : ''); |
371: | 370: |
372: $forum_page['item_body']['info']['forum'] = '<li class="info-forum"><strong>'.$cur_set['forum_name'].'</strong> <span class="label">'.(($cur_set['num_replies'] == 1) ? $lang_forum['Reply'] : $lang_forum['Replies']).'</span></li>'; | 371: $forum_page['item_body']['info']['forum'] = '<li class="info-forum"><span class="label">'.$lang_search['Posted in'].'</span><a href="'.forum_link($forum_url['forum'], array($cur_set['forum_id'], sef_friendly($cur_set['forum_name']))).'">'.$cur_set['forum_name'].'</a></li>'; |
373: $forum_page['item_body']['info']['replies'] = '<li class="info-replies"><strong>'.forum_number_format($cur_set['num_replies']).'</strong> <span class="label">'.(($cur_set['num_replies'] == 1) ? $lang_forum['Reply'] : $lang_forum['Replies']).'</span></li>'; | 372: $forum_page['item_body']['info']['replies'] = '<li class="info-replies"><strong>'.forum_number_format($cur_set['num_replies']).'</strong> <span class="label">'.(($cur_set['num_replies'] == 1) ? $lang_forum['Reply'] : $lang_forum['Replies']).'</span></li>'; |
374: $forum_page['item_body']['info']['lastpost'] = '<li class="info-lastpost"><span class="label">'.$lang_forum['Last post'].'</span> <strong><a href="'.forum_link($forum_url['post'], $cur_set['last_post_id']).'">'.format_time($cur_set['last_post']).'</a></strong> <cite>'.sprintf($lang_forum['by poster'], forum_htmlencode($cur_set['last_poster'])).'</cite></li>'; | 373: $forum_page['item_body']['info']['lastpost'] = '<li class="info-lastpost"><span class="label">'.$lang_forum['Last post'].'</span> <strong><a href="'.forum_link($forum_url['post'], $cur_set['last_post_id']).'">'.format_time($cur_set['last_post']).'</a></strong> <cite>'.sprintf($lang_forum['by poster'], forum_htmlencode($cur_set['last_poster'])).'</cite></li>'; |
375: | 374: |
393: ?> | 392: ?> |
394: </div> | 393: </div> |
395: | 394: |
396: <div class="main-foot"> | 395: <div class="main-foot"> |
397: <?php | 396: <?php |
398: | 397: |
399: if (!empty($forum_page['main_foot_options'])) | 398: if (!empty($forum_page['main_foot_options'])) |
400: echo "\n\t\t\t".'<p class="options">'.implode(' ', $forum_page['main_foot_options']).'</p>'; | 399: echo "\n\t\t\t".'<p class="options">'.implode(' ', $forum_page['main_foot_options']).'</p>'; |
401: | 400: |
402: ?> | 401: ?> |
403: <p><?php echo $forum_page['items_info'] ?></p> | 402: <h2 class="hn"><span><?php echo $forum_page['items_info'] ?></span></h2> |
404: </div> | 403: </div> |
405: <?php | 404: <?php |
406: | 405: |
494: <span class="fld-input"><input id="fld<?php echo $forum_page['fld_count'] ?>" type="text" name="author" size="25" maxlength="25" /></span> | 493: <span class="fld-input"><input id="fld<?php echo $forum_page['fld_count'] ?>" type="text" name="author" size="25" maxlength="25" /></span> |
495: </div> | 494: </div> |
496: </div> | 495: </div> |
| 496: <?php ($hook = get_hook('se_pre_search_in')) ? eval($hook) : null; ?> |
| 497: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
| 498: <div class="sf-box select"> |
| 499: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_search['Search in'] ?></span></label><br /> |
| 500: <span class="fld-input"><select id="fld<?php echo $forum_page['fld_count'] ?>" name="search_in"> |
| 501: <option value="all"><?php echo $lang_search['Message and subject'] ?></option> |
| 502: <option value="message"><?php echo $lang_search['Message only'] ?></option> |
| 503: <option value="topic"><?php echo $lang_search['Topic only'] ?></option> |
| 504: </select></span> |
| 505: </div> |
| 506: </div> |
497: <?php ($hook = get_hook('se_pre_forum_fieldset')) ? eval($hook) : null; ?> | 507: <?php ($hook = get_hook('se_pre_forum_fieldset')) ? eval($hook) : null; ?> |
498: <fieldset class="mf-set set<?php echo ++$forum_page['item_count'] ?>"> | 508: <fieldset class="mf-set set<?php echo ++$forum_page['item_count'] ?>"> |
499: <legend><span><?php echo $lang_search['Forum search'] ?> <em><?php echo ($forum_config['o_search_all_forums'] == '1' || $forum_user['is_admmod']) ? $lang_search['Forum search default'] : $lang_search['Forum search require'] ?></em></span></legend> | 509: <legend><span><?php echo $lang_search['Forum search'] ?> <em><?php echo ($forum_config['o_search_all_forums'] == '1' || $forum_user['is_admmod']) ? $lang_search['Forum search default'] : $lang_search['Forum search require'] ?></em></span></legend> |
523: ($hook = get_hook('se_qr_get_cats_and_forums')) ? eval($hook) : null; | 533: ($hook = get_hook('se_qr_get_cats_and_forums')) ? eval($hook) : null; |
524: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); | 534: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
525: | 535: |
526: $cur_category = 0; | 536: if ($forum_db->num_rows($result) > 0) |
527: while ($cur_forum = $forum_db->fetch_assoc($result)) | |
528: { | 537: { |
529: ($hook = get_hook('se_forum_loop_start')) ? eval($hook) : null; | 538: $cur_category = 0; |
530: | 539: while ($cur_forum = $forum_db->fetch_assoc($result)) |
531: if ($cur_forum['cid'] != $cur_category) // A new category since last iteration? | |
532: { | 540: { |
533: if ($cur_category) | 541: ($hook = get_hook('se_forum_loop_start')) ? eval($hook) : null; |
534: echo "\t\t\t\t\t\t\t".'</fieldset>'."\n"; | 542: |
| 543: if ($cur_forum['cid'] != $cur_category) // A new category since last iteration? |
| 544: { |
| 545: if ($cur_category) |
| 546: echo "\t\t\t\t\t\t\t".'</fieldset>'."\n"; |
| 547: |
| 548: echo "\t\t\t\t\t\t\t".'<fieldset>'."\n\t\t\t\t\t\t\t\t".'<legend><span>'.forum_htmlencode($cur_forum['cat_name']).':</span></legend>'."\n"; |
| 549: $cur_category = $cur_forum['cid']; |
| 550: } |
535: | 551: |
536: echo "\t\t\t\t\t\t\t".'<fieldset>'."\n\t\t\t\t\t\t\t\t".'<legend><span>'.forum_htmlencode($cur_forum['cat_name']).':</span></legend>'."\n"; | 552: echo "\t\t\t\t\t\t\t\t".'<div class="checklist-item"><span class="fld-input"><input type="checkbox" id="fld'.(++$forum_page['fld_count']).'" name="forum[]" value="'.$cur_forum['fid'].'" /></span> <label for="fld'.$forum_page['fld_count'].'">'.forum_htmlencode($cur_forum['forum_name']).'</label></div>'."\n"; |
537: $cur_category = $cur_forum['cid']; | |
538: } | 553: } |
539: | 554: |
540: echo "\t\t\t\t\t\t\t\t".'<div class="checklist-item"><span class="fld-input"><input type="checkbox" id="fld'.(++$forum_page['fld_count']).'" name="forum[]" value="'.$cur_forum['fid'].'" /></span> <label for="fld'.$forum_page['fld_count'].'">'.forum_htmlencode($cur_forum['forum_name']).'</label></div>'."\n"; | 555: echo "\t\t\t\t\t\t\t".'</fieldset>'."\n"; |
541: } | 556: } |
542: | 557: |
543: ?> | 558: ?> |
544: </fieldset> | |
545: </div> | 559: </div> |
546: </div> | 560: </div> |
547: <?php ($hook = get_hook('se_pre_forum_fieldset_end')) ? eval($hook) : null; ?> | 561: <?php ($hook = get_hook('se_pre_forum_fieldset_end')) ? eval($hook) : null; ?> |
punbb-1.3.2/style/Oxygen/Oxygen.css |
punbb-1.3.5/style/Oxygen/Oxygen.css |
83: line-height: 0.0; | 83: line-height: 0.0; |
84: overflow:hidden; | 84: overflow:hidden; |
85: visibility: hidden; | 85: visibility: hidden; |
86: clear: both; | 86: clear: both; |
87: } | 87: } |
88: | 88: |
89: /* Hidden items | 89: /* Hidden items |
112: .brd .main-head .hn small, | 112: .brd .main-head .hn small, |
113: .brd .entry-title, | 113: .brd .entry-title, |
114: .brd .menu-page .main-head { | 114: .brd .menu-page .main-head { |
115: font-size: 0; | 115: font-size: 0; |
116: left: -999em; | 116: left: -999em; |
117: text-indent: -999em; | 117: text-indent: -999em; |
118: position:absolute; | 118: position:absolute; |
119: line-height: 0em; | 119: line-height: 0em; |
120: visibility: hidden; | 120: visibility: hidden; |
121: } | 121: } |
122: | 122: |
123: | 123: |
124: /************************************************************* | 124: /************************************************************* |
211: border-bottom-width: 1px; | 211: border-bottom-width: 1px; |
212: } | 212: } |
213: | 213: |
214: .brd .main-head { | 214: .brd .main-head, .brd .main-foot { |
215: border-style: solid; | 215: border-style: solid; |
216: border-width: 1px; | 216: border-width: 1px; |
217: padding: 0 1.417em; | 217: padding: 0 1.417em; |
218: } | 218: } |
219: | 219: |
220: .brd .main-head .hn, .brd .main-foot .hn{ | 220: .brd .main-head .hn, .brd .main-foot .hn { |
221: font-size: 1.084em; | 221: font-size: 1.084em; |
222: padding-right: 10em; | 222: padding-right: 10em; |
223: } | 223: } |
225: .brd h2.main-subhead { | 225: .brd h2.main-subhead { |
226: border-style: solid; | 226: border-style: solid; |
227: border-width: 1px; | 227: border-width: 1px; |
228: padding: 0 1.417em; | |
229: font-size: 1.084em; | 228: font-size: 1.084em; |
230: padding: 0.462em 10em 0.426em 1.417em; | 229: padding: 0.462em 10em 0.426em 1.417em; |
231: } | 230: } |
249: position: relative; | 248: position: relative; |
250: } | 249: } |
251: | 250: |
252: .brd .main-head, | |
253: .brd .main-foot { | |
254: padding: 0 1.5em; | |
255: border-style: none; | |
256: border-width: 1px; | |
257: } | |
258: | |
259: .brd .main-foot { | 251: .brd .main-foot { |
260: margin-top: -1em; | 252: margin-top: -1em; |
261: } | 253: } |
306: } | 298: } |
307: | 299: |
308: .brd .extension .options, .brd .hotfix .options { | 300: .brd .extension .options, .brd .hotfix .options { |
309: border-top-style:dashed; | 301: border-top-style: dashed; |
310: border-top-width:1px; | 302: border-top-width: 1px; |
311: } | 303: } |
312: | 304: |
313: /* Content Containers | 305: /* Content Containers |
314: -------------------------------------------------------------*/ | 306: -------------------------------------------------------------*/ |
605: border-bottom: none; | 597: border-bottom: none; |
606: } | 598: } |
607: | 599: |
| 600: #brd-admin-bans #brd-pagepost-end { |
| 601: margin-top: -1em; |
| 602: } |
608: .brd .paging { | 603: .brd .paging { |
609: float: left; | 604: float: left; |
610: } | 605: } |
646: font-weight: normal; | 641: font-weight: normal; |
647: } | 642: } |
648: | 643: |
649: .brd .crumbs span, .brd crumbs span * { | 644: .brd .crumbs span, .brd .crumbs span * { |
650: white-space: nowrap; | 645: white-space: nowrap; |
651: } | 646: } |
652: | 647: |
653: .brd .crumbs { | 648: .brd .crumbs { |
654: margin: 0.5em 0em; | 649: margin: 0.5em 0em; |
655: padding: 0em 1.5em; | 650: padding: 0em 1.417em; |
656: font-size: 1.084em; | 651: font-size: 1.084em; |
657: } | 652: } |
658: | 653: |
669: } | 664: } |
670: | 665: |
671: #brd-stats ul li.st-users { | 666: #brd-stats ul li.st-users { |
672: float: left; | 667: float: left; |
673: clear: both; | 668: clear: both; |
674: white-space: nowrap; | 669: white-space: nowrap; |
675: } | 670: } |
676: | 671: |
677: #brd-stats ul li.st-activity { | 672: #brd-stats ul li.st-activity { |
678: text-align: right; | 673: text-align: right; |
679: display: block; | 674: display: block; |
680: white-space: nowrap; | 675: white-space: nowrap; |
681: } | 676: } |
682: | 677: |
683: #brd-stats li strong { | 678: #brd-stats li strong { |
684: font-weight: bold; | 679: font-weight: bold; |
685: } | 680: } |
686: | 681: |
687: #brd-online { | 682: #brd-online { |
688: padding-top: 0.5em; | 683: padding-top: 0.5em; |
695: } | 690: } |
696: | 691: |
697: #brd-online .hn { | 692: #brd-online .hn { |
698: float: left; | 693: float: left; |
699: margin-right: 0.5em; | 694: margin-right: 0.5em; |
700: } | 695: } |
701: | 696: |
702: /* Footer | 697: /* Footer |
703: -------------------------------------------------------------*/ | 698: -------------------------------------------------------------*/ |
704: | 699: |
705: #brd-about p { | |
706: float: left; | |
707: margin: 0 1em; | |
708: } | |
709: | |
710: #brd-about #qjump { | 700: #brd-about #qjump { |
711: float: left; | 701: float: left; |
712: padding: 0.5em 0; | 702: padding: 0.5em 0; |
719: | 709: |
720: #brd-about #copyright { | 710: #brd-about #copyright { |
721: text-align: right; | 711: text-align: right; |
722: float: right; | |
723: margin: 0; | 712: margin: 0; |
724: } | 713: } |
725: | 714: |
726: #brd-about #querytime { | 715: #querytime { |
727: text-align: center; | 716: text-align: center; |
728: font-size: 0.9em; | 717: font-size: 0.9em; |
729: } | 718: } |
730: | 719: |
| 720: #extensions-used { |
| 721: border-bottom: 1px dotted; |
| 722: } |
| 723: |
731: /* Main and Content Options | 724: /* Main and Content Options |
732: -------------------------------------------------------------*/ | 725: -------------------------------------------------------------*/ |
733: | 726: |
734: .brd p.options { | 727: .brd p.options { |
735: border-top: none; | 728: border-top: none; |
736: float:right; | 729: float: right; |
737: } | 730: } |
738: | 731: |
739: .brd .main-modoptions .options { | 732: .brd .main-modoptions .options { |
851: | 844: |
852: .brd .main-content .main-item p, | 845: .brd .main-content .main-item p, |
853: .brd .main-content .main-item .hn { | 846: .brd .main-content .main-item .hn { |
854: padding: 0; | 847: padding: 0; |
855: } | 848: } |
856: | 849: |
857: .brd .main-content .main-item .hn .item-status { | 850: .brd .main-content .main-item .hn .item-status { |
858: font-weight:normal; | 851: font-weight: normal; |
859: } | 852: } |
860: | 853: |
861: .brd .main-content .main-item .hn .item-status em { | 854: .brd .main-content .main-item .hn .item-status em { |
862: font-style:normal; | 855: font-style: normal; |
863: } | 856: } |
864: | 857: |
865: .brd .main-content .main-item .item-subject, | 858: .brd .main-content .main-item .item-subject, |
866: .brd .main-content .main-item li { | 859: .brd .main-content .main-item li { |
867: float: left; | 860: float: left; |
868: border-left-style: solid; | 861: border-left-style: solid; |
869: border-left-width: 1px; | 862: border-left-width: 1px; |
870: margin: 0 -2px -9.7em 0; | 863: margin: 0 -2px -9.7em 0; |
871: position: relative; | 864: position: relative; |
872: padding-top: 0.6em; | 865: padding-top: 0.6em; |
873: padding-bottom: 10.4em; | 866: padding-bottom: 10.4em; |
874: } | 867: } |
875: | 868: |
876: .brd .main-content .main-item .item-subject { | 869: .brd .main-content .main-item .item-subject { |
877: overflow: hidden; | 870: overflow: hidden; |
878: width: 100%; | 871: width: 100%; |
879: } | 872: } |
880: | 873: |
881: .brd .main-content .main-item li.info-topics, | 874: .brd .main-content .main-item li.info-topics, |
882: .brd .main-content .main-item li.info-forum, | 875: .brd .main-content .main-item li.info-forum, |
883: .brd .main-content .main-item li.info-posts, | 876: .brd .main-content .main-item li.info-posts, |
884: .brd .main-content .main-item li.info-views, | 877: .brd .main-content .main-item li.info-views, |
885: .brd .main-content .main-item li.info-replies { | 878: .brd .main-content .main-item li.info-replies { |
886: width: 7em; | 879: width: 7em; |
887: text-align:center; | 880: text-align: center; |
888: } | 881: } |
889: | 882: |
890: .brd .main-content .main-item li.info-forum { | 883: .brd .main-content .main-item li.info-forum { |
891: width: 20em; | 884: width: 20em; |
892: } | 885: } |
893: | 886: |
894: .brd .main-content .main-item li.info-lastpost { | 887: .brd .main-content .main-item li.info-lastpost { |
895: width: 20em; | 888: width: 20em; |
896: } | 889: } |
897: | 890: |
898: .brd .main-content .main-item li.info-lastpost cite { | 891: .brd .main-content .main-item li.info-lastpost cite { |
899: overflow: hidden; | 892: overflow: hidden; |
924: } | 917: } |
925: | 918: |
926: .brd .forum-noview .main-item { | 919: .brd .forum-noview .main-item { |
927: padding-right: 48em; | 920: padding-right: 28em; |
928: } | 921: } |
929: | 922: |
930: .brd .forum-noview .main-item ul { | 923: .brd .forum-noview .main-item ul { |
| 924: width: 27em; |
| 925: right: -28em; |
| 926: margin-left: -27em; |
| 927: } |
| 928: |
| 929: .brd .forum-forums .main-item { |
| 930: padding-right: 48em; |
| 931: } |
| 932: |
| 933: .brd .forum-forums .main-item ul { |
931: width: 47em; | 934: width: 47em; |
932: right: -48em; | 935: right: -48em; |
933: margin-left: -47em; | 936: margin-left: -47em; |
934: } | 937: } |
935: | 938: |
936: .brd .main-content .main-item .item-subject span.modlist { | 939: .brd .main-content .main-item .item-subject span.modlist { |
937: display: block; | 940: display: block; |
938: } | 941: } |
939: | 942: |
940: .brd .main-content .main-item .hn strong { | 943: .brd .main-content .main-item .hn strong { |
941: font-size: 1em; | 944: font-size: 1em; |
942: } | 945: } |
943: | 946: |
944: .brd .main-content .main-item .hn strong span { | 947: .brd .main-content .main-item .hn strong span { |
945: font-weight: normal; | 948: font-weight: normal; |
948: #brd-index .main-content .main-item .hn span { | 951: #brd-index .main-content .main-item .hn span { |
949: font-size: 1.084em; | 952: font-size: 1.084em; |
950: font-weight: bold; | 953: font-weight: bold; |
951: } | 954: } |
952: #brd-index .main-content .main-item .hn small { | 955: #brd-index .main-content .main-item .hn small { |
953: font-size: 1em; | 956: font-size: 1em; |
954: } | 957: } |
967: font-style: normal; | 970: font-style: normal; |
968: } | 971: } |
969: | 972: |
970: .brd .main-content .main-item .item-subject .hn { | 973: .brd .main-content .main-item .item-subject .hn, |
971: display:inline; | |
972: margin: 0 0 0 1.5em; | |
973: } | |
974: | |
975: .brd .main-content .main-item .item-subject p { | 974: .brd .main-content .main-item .item-subject p { |
976: margin: 0 0 0 1.5em; | 975: margin: 0 0 0 1.5em; |
977: } | 976: } |
978: | 977: |
979: .brd .main-content .main-item li.info-lastpost cite, | 978: .brd .main-content .main-item li.info-lastpost cite, |
980: .brd .main-content .main-item li.info-lastpost span { | 979: .brd .main-content .main-item li.info-lastpost span, |
981: display: block; | 980: .brd .main-content .main-item li.info-forum a { |
982: padding: 0 1em; | 981: display: block; |
983: font-style: normal; | 982: padding: 0 1em; |
984: font-weight: normal; | 983: font-style: normal; |
985: } | 984: font-weight: normal; |
| 985: } |
986: | 986: |
987: .brd .main-content .main-item li.info-lastpost strong { | 987: .brd .main-content .main-item li.info-lastpost strong { |
988: padding: 0 0 0 1em; | 988: padding: 0 0 0 1em; |
989: font-style: normal; | 989: font-style: normal; |
990: font-weight: normal; | 990: font-weight: normal; |
991: } | 991: } |
992: | 992: |
993: .brd .main-content .main-item li.info-select { | 993: .brd .main-content .main-item li.info-select { |
994: position: absolute; | 994: position: absolute; |
995: right: 0; | 995: right: 0; |
996: top: 0; | 996: top: 0; |
997: padding: 0.3em; | 997: padding: 0.3em; |
998: border-style: none none solid solid; | 998: border-style: none none solid solid; |
999: border-width: 1px; | 999: border-width: 1px; |
1000: } | 1000: } |
1001: | 1001: |
1002: .brd .main-content .main-item .icon { | 1002: .brd .main-content .main-item .icon { |
1003: border-style: solid; | 1003: border-style: solid; |
1004: border-width: 0.5833em; | 1004: border-width: 0.5833em; |
1005: height: 0; | 1005: height: 0; |
1006: width: 0; | 1006: width: 0; |
1007: float: left; | 1007: float: left; |
1008: margin-top: 0.667em; | 1008: margin-top: 0.667em; |
1009: margin-left: -2.417em; | 1009: margin-left: -2.417em; |
1010: } | 1010: } |
1011: | 1011: |
1012: .brd .main-content .main-item .hn .posted-mark { | 1012: .brd .main-content .main-item .hn .posted-mark { |
1013: position: absolute; | 1013: position: absolute; |
1014: font-size: 2em; | 1014: font-size: 2em; |
1015: width: 1em; | 1015: width: 1em; |
1016: left: -0.5em; | 1016: left: -0.5em; |
1017: top: 0; | 1017: top: 0; |
1018: } | 1018: } |
1019: | 1019: |
1020: /************************************************************* | 1020: /************************************************************* |
1021: F - MAIN CONTENT - FORMS | 1021: F - MAIN CONTENT - FORMS |
1160: | 1160: |
1161: .brd .mf-box .mf-item { | 1161: .brd .mf-box .mf-item { |
1162: position: relative; | 1162: position: relative; |
1163: top: -0.15em; | 1163: top: -0.166em; |
1164: padding: 0.25em 0; | 1164: padding: 0.25em 0; |
1165: } | 1165: } |
1166: | 1166: |
1210: } | 1210: } |
1211: | 1211: |
1212: .brd .mf-set .mf-yesno .mf-item { | 1212: .brd .mf-set .mf-yesno .mf-item { |
1213: width: 10em; | 1213: width: 11em; |
1214: float: left; | 1214: float: left; |
1215: } | 1215: } |
1216: | 1216: |
1281: text-align:left; | 1281: text-align:left; |
1282: } | 1282: } |
1283: | 1283: |
| 1284: .brd .checklist legend span { |
| 1285: width: auto; |
| 1286: max-width: 25em; |
| 1287: } |
| 1288: |
| 1289: |
1284: .brd .checklist .checklist-item { | 1290: .brd .checklist .checklist-item { |
1285: position: relative; | 1291: position: relative; |
1286: height: auto; | 1292: height: auto; |
1291: padding: 0 0 0 2.25em; | 1297: padding: 0 0 0 2.25em; |
1292: float: none; | 1298: float: none; |
1293: height: 100%; | 1299: height: 100%; |
1294: background-color: #fff; | |
1295: } | 1300: } |
1296: | 1301: |
1297: .brd .checklist .checklist-item .fld-input { | 1302: .brd .checklist .checklist-item .fld-input { |
1332: text-align: left; | 1337: text-align: left; |
1333: position: relative; | 1338: position: relative; |
1334: margin: 0 1em 0 -1px; | 1339: margin: 0 1em 0 -1px; |
1335: padding: 2px 1em; | 1340: padding: 2px 1.25em; |
1336: font-size: 0.917em; | 1341: font-size: 0.917em; |
1337: z-index: 100; | 1342: z-index: 100; |
1338: } | 1343: } |
1370: width: 100%; | 1375: width: 100%; |
1371: position: relative; | 1376: position: relative; |
1372: } | 1377: } |
1373: | 1378: |
1374: .brd .txt-set .required label span em { | 1379: .brd .txt-set .required label span em { |
1375: margin-bottom: -1.2em; | 1380: margin-bottom: -1.2em; |
1376: } | 1381: } |
1377: | 1382: |
1378: .brd .req-error { | 1383: .brd .req-error { |
1379: display: block; | 1384: display: block; |
1380: } | 1385: } |
1419: margin-left: 18em; | 1424: margin-left: 18em; |
1420: border-style: none none none solid; | 1425: border-style: none none none solid; |
1421: border-width: 1px; | 1426: border-width: 1px; |
1422: zoom: 1; | |
1423: } | 1427: } |
1424: | 1428: |
1425: .brd .posthead .hn { | 1429: .brd .posthead .hn { |
1631: padding: 1em 0.75em; | 1635: padding: 1em 0.75em; |
1632: } | 1636: } |
1633: | 1637: |
1634: .brd .entry-content .codebox code { | 1638: .brd .entry-content .codebox code, #brd-debug table .tcl, #brd-debug table .tcr { |
1635: font-family: monospace; | 1639: font-family: monospace; |
1636: } | 1640: } |
1637: | 1641: |
1714: text-align: center; | 1718: text-align: center; |
1715: } | 1719: } |
1716: | 1720: |
1717: #brd-debug table .tc0 { | 1721: #brd-debug table .tc1 { |
1718: white-space:normal; | 1722: white-space: normal; |
1719: width: 15%; | 1723: width: 10%; |
1720: } | 1724: } |
1721: | 1725: |
1722: #brd-debug table .tc1 { | 1726: #brd-debug table .tcr { |
1723: white-space: normal; | 1727: white-space: normal; |
1724: width: 90%; | 1728: width: 90%; |
1725: } | 1729: } |
punbb-1.3.2/userlist.php |
punbb-1.3.5/userlist.php |
2: /** | 2: /** |
3: * Provides a list of forum users that can be sorted based on various criteria. | 3: * Provides a list of forum users that can be sorted based on various criteria. |
4: * | 4: * |
5: * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org | 5: * @copyright (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org |
6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
7: * @package PunBB | 7: * @package PunBB |
8: */ | 8: */ |
27: $forum_page['username'] = (isset($_GET['username']) && $_GET['username'] != '-' && $forum_user['g_search_users'] == '1') ? $_GET['username'] : ''; | 27: $forum_page['username'] = (isset($_GET['username']) && $_GET['username'] != '-' && $forum_user['g_search_users'] == '1') ? $_GET['username'] : ''; |
28: $forum_page['show_group'] = (!isset($_GET['show_group']) || intval($_GET['show_group']) < -1 && intval($_GET['show_group']) > 2) ? -1 : intval($_GET['show_group']); | 28: $forum_page['show_group'] = (!isset($_GET['show_group']) || intval($_GET['show_group']) < -1 && intval($_GET['show_group']) > 2) ? -1 : intval($_GET['show_group']); |
29: $forum_page['sort_by'] = (!isset($_GET['sort_by']) || $_GET['sort_by'] != 'username' && $_GET['sort_by'] != 'registered' && ($_GET['sort_by'] != 'num_posts' || !$forum_page['show_post_count'])) ? 'username' : $_GET['sort_by']; | 29: $forum_page['sort_by'] = (!isset($_GET['sort_by']) || $_GET['sort_by'] != 'username' && $_GET['sort_by'] != 'registered' && ($_GET['sort_by'] != 'num_posts' || !$forum_page['show_post_count'])) ? 'username' : $_GET['sort_by']; |
30: $forum_page['sort_dir'] = (!isset($_GET['sort_dir']) || $_GET['sort_dir'] != 'ASC' && $_GET['sort_dir'] != 'DESC') ? 'ASC' : strtoupper($_GET['sort_dir']); | 30: $forum_page['sort_dir'] = (!isset($_GET['sort_dir']) || strtoupper($_GET['sort_dir']) != 'ASC' && strtoupper($_GET['sort_dir']) != 'DESC') ? 'ASC' : strtoupper($_GET['sort_dir']); |
31: | 31: |
32: | 32: |
33: // Create any SQL for the WHERE clause | 33: // Create any SQL for the WHERE clause |
42: | 42: |
43: // Fetch user count | 43: // Fetch user count |
44: $query = array( | 44: $query = array( |
45: 'SELECT' => 'COUNT(u.id) - 1', | 45: 'SELECT' => 'COUNT(u.id)', |
46: 'FROM' => 'users AS u', | 46: 'FROM' => 'users AS u', |
47: 'WHERE' => 'u.group_id != '.FORUM_UNVERIFIED | 47: 'WHERE' => 'u.id > 1 AND u.group_id != '.FORUM_UNVERIFIED |
48: ); | 48: ); |
49: | 49: |
50: if (!empty($where_sql)) | 50: if (!empty($where_sql)) |
56: | 56: |
57: // Determine the user offset (based on $_GET['p']) | 57: // Determine the user offset (based on $_GET['p']) |
58: $forum_page['num_pages'] = ceil($forum_page['num_users'] / 50); | 58: $forum_page['num_pages'] = ceil($forum_page['num_users'] / 50); |
59: $forum_page['page'] = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : intval($_GET['p']); | 59: $forum_page['page'] = (!isset($_GET['p']) || !is_numeric($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : intval($_GET['p']); |
60: $forum_page['start_from'] = 50 * ($forum_page['page'] - 1); | 60: $forum_page['start_from'] = 50 * ($forum_page['page'] - 1); |
61: $forum_page['finish_at'] = min(($forum_page['start_from'] + 50), ($forum_page['num_users'])); | 61: $forum_page['finish_at'] = min(($forum_page['start_from'] + 50), ($forum_page['num_users'])); |
62: | 62: |
68: $forum_page['items_info'] = $lang_ul['Users']; | 68: $forum_page['items_info'] = $lang_ul['Users']; |
69: | 69: |
70: // Generate paging links | 70: // Generate paging links |
71: $forum_page['page_post']['paging'] = '<p class="paging"><span class="pages">'.$lang_common['Pages'].'</span> '.paginate($forum_page['num_pages'], $forum_page['page'], $forum_url['users_browse'], $lang_common['Paging separator'], array($forum_page['show_group'], $forum_page['sort_by'], strtoupper($forum_page['sort_dir']), ($forum_page['username'] != '') ? urlencode($forum_page['username']) : '-')).'</p>'; | 71: $forum_page['page_post']['paging'] = '<p class="paging"><span class="pages">'.$lang_common['Pages'].'</span> '.paginate($forum_page['num_pages'], $forum_page['page'], $forum_url['users_browse'], $lang_common['Paging separator'], array($forum_page['show_group'], $forum_page['sort_by'], $forum_page['sort_dir'], ($forum_page['username'] != '') ? urlencode($forum_page['username']) : '-')).'</p>'; |
72: | 72: |
73: // Navigation links for header and page numbering for title/meta description | 73: // Navigation links for header and page numbering for title/meta description |
74: if ($forum_page['page'] < $forum_page['num_pages']) | 74: if ($forum_page['page'] < $forum_page['num_pages']) |
75: { | 75: { |
76: $forum_page['nav']['last'] = '<link rel="last" href="'.forum_sublink($forum_url['users_browse'], $forum_url['page'], $forum_page['num_pages'], array($forum_page['show_group'], $forum_page['sort_by'], strtoupper($forum_page['sort_dir']), ($forum_page['username'] != '') ? urlencode($forum_page['username']) : '-')).'" title="'.$lang_common['Page'].' '.$forum_page['num_pages'].'" />'; | 76: $forum_page['nav']['last'] = '<link rel="last" href="'.forum_sublink($forum_url['users_browse'], $forum_url['page'], $forum_page['num_pages'], array($forum_page['show_group'], $forum_page['sort_by'], $forum_page['sort_dir'], ($forum_page['username'] != '') ? urlencode($forum_page['username']) : '-')).'" title="'.$lang_common['Page'].' '.$forum_page['num_pages'].'" />'; |
77: $forum_page['nav']['next'] = '<link rel="next" href="'.forum_sublink($forum_url['users_browse'], $forum_url['page'], ($forum_page['page'] + 1), array($forum_page['show_group'], $forum_page['sort_by'], strtoupper($forum_page['sort_dir']), ($forum_page['username'] != '') ? urlencode($forum_page['username']) : '-')).'" title="'.$lang_common['Page'].' '.($forum_page['page'] + 1).'" />'; | 77: $forum_page['nav']['next'] = '<link rel="next" href="'.forum_sublink($forum_url['users_browse'], $forum_url['page'], ($forum_page['page'] + 1), array($forum_page['show_group'], $forum_page['sort_by'], $forum_page['sort_dir'], ($forum_page['username'] != '') ? urlencode($forum_page['username']) : '-')).'" title="'.$lang_common['Page'].' '.($forum_page['page'] + 1).'" />'; |
78: } | 78: } |
79: if ($forum_page['page'] > 1) | 79: if ($forum_page['page'] > 1) |
80: { | 80: { |
81: $forum_page['nav']['prev'] = '<link rel="prev" href="'.forum_sublink($forum_url['users_browse'], $forum_url['page'], ($forum_page['page'] - 1), array($forum_page['show_group'], $forum_page['sort_by'], strtoupper($forum_page['sort_dir']), ($forum_page['username'] != '') ? urlencode($forum_page['username']) : '-')).'" title="'.$lang_common['Page'].' '.($forum_page['page'] - 1).'" />'; | 81: $forum_page['nav']['prev'] = '<link rel="prev" href="'.forum_sublink($forum_url['users_browse'], $forum_url['page'], ($forum_page['page'] - 1), array($forum_page['show_group'], $forum_page['sort_by'], $forum_page['sort_dir'], ($forum_page['username'] != '') ? urlencode($forum_page['username']) : '-')).'" title="'.$lang_common['Page'].' '.($forum_page['page'] - 1).'" />'; |
82: $forum_page['nav']['first'] = '<link rel="first" href="'.forum_link($forum_url['users_browse'], array($forum_page['show_group'], $forum_page['sort_by'], strtoupper($forum_page['sort_dir']), ($forum_page['username'] != '') ? urlencode($forum_page['username']) : '-')).'" title="'.$lang_common['Page'].' 1" />'; | 82: $forum_page['nav']['first'] = '<link rel="first" href="'.forum_link($forum_url['users_browse'], array($forum_page['show_group'], $forum_page['sort_by'], $forum_page['sort_dir'], ($forum_page['username'] != '') ? urlencode($forum_page['username']) : '-')).'" title="'.$lang_common['Page'].' 1" />'; |
83: } | 83: } |
84: | 84: |
85: // Setup main options | 85: // Setup main options |
121: <?php | 121: <?php |
122: | 122: |
123: if (!empty($forum_page['main_head_options'])) | 123: if (!empty($forum_page['main_head_options'])) |
124: echo "\n\t\t\t".'<p class="options">'.implode(' ', $forum_page['main_head_options']).'</p>'; | 124: echo "\t\t".'<p class="options">'.implode(' ', $forum_page['main_head_options']).'</p>'."\n"; |
125: | 125: |
126: ?> | 126: ?> |
127: <h2 class="hn"><span><?php echo $forum_page['items_info'] ?></span></h2> | 127: <h2 class="hn"><span><?php echo $forum_page['items_info'] ?></span></h2> |
133: <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>"> | 133: <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>"> |
134: <legend class="group-legend"><strong><?php echo $lang_ul['User find legend'] ?></strong></legend> | 134: <legend class="group-legend"><strong><?php echo $lang_ul['User find legend'] ?></strong></legend> |
135: <?php ($hook = get_hook('ul_pre_username')) ? eval($hook) : null; ?> | 135: <?php ($hook = get_hook('ul_pre_username')) ? eval($hook) : null; ?> |
136: <?php if ($forum_user['g_search_users'] == '1'): ?> <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 136: <?php if ($forum_user['g_search_users'] == '1'): ?> |
| 137: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
137: <div class="sf-box text"> | 138: <div class="sf-box text"> |
138: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_ul['Search for username'] ?></span> <small><?php echo $lang_ul['Username help'] ?></small></label><br /> | 139: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_ul['Search for username'] ?></span> <small><?php echo $lang_ul['Username help'] ?></small></label><br /> |
139: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="username" value="<?php echo forum_htmlencode($forum_page['username']) ?>" size="35" maxlength="25" /></span> | 140: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="username" value="<?php echo forum_htmlencode($forum_page['username']) ?>" size="35" maxlength="25" /></span> |
180: <span class="fld-input"><select id="fld<?php echo $forum_page['fld_count'] ?>" name="sort_by"> | 181: <span class="fld-input"><select id="fld<?php echo $forum_page['fld_count'] ?>" name="sort_by"> |
181: <option value="username"<?php if ($forum_page['sort_by'] == 'username') echo ' selected="selected"' ?>><?php echo $lang_ul['Username'] ?></option> | 182: <option value="username"<?php if ($forum_page['sort_by'] == 'username') echo ' selected="selected"' ?>><?php echo $lang_ul['Username'] ?></option> |
182: <option value="registered"<?php if ($forum_page['sort_by'] == 'registered') echo ' selected="selected"' ?>><?php echo $lang_ul['Registered'] ?></option> | 183: <option value="registered"<?php if ($forum_page['sort_by'] == 'registered') echo ' selected="selected"' ?>><?php echo $lang_ul['Registered'] ?></option> |
183: <?php if ($forum_page['show_post_count']): ?> &nbs |