| fluxbb-1.4.0 to fluxbb-1.4.1 | Legend | |
|---|---|---|
| Lines removed | ||
| Lines changed | ||
| Lines added | ||
| a/admin_bans.php | b/admin_bans.php |
|---|---|
| 28: // If the ID of the user to ban was provided through GET (a link from profile.php) | 28: // If the ID of the user to ban was provided through GET (a link from profile.php) |
| 29: if (isset($_GET['add_ban'])) | 29: if (isset($_GET['add_ban'])) |
| 30: { | 30: { |
| 31: $add_ban = intval($_GET['add_ban']); | 31: $user_id = intval($_GET['add_ban']); |
| 32: if ($add_ban < 2) | 32: if ($user_id < 2) |
| 33: message($lang_common['Bad request']); | 33: message($lang_common['Bad request']); |
| 34: | 34: |
| 35: $user_id = $add_ban; | |
| 36: | |
| 37: $result = $db->query('SELECT group_id, username, email FROM '.$db->prefix.'users WHERE id='.$user_id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error()); | 35: $result = $db->query('SELECT group_id, username, email FROM '.$db->prefix.'users WHERE id='.$user_id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error()); |
| 38: if ($db->num_rows($result)) | 36: if ($db->num_rows($result)) |
| 39: list($group_id, $ban_user, $ban_email) = $db->fetch_row($result); | 37: list($group_id, $ban_user, $ban_email) = $db->fetch_row($result); |
| 121: <tr> | 119: <tr> |
| 122: <th scope="row"><?php echo $lang_admin_bans['E-mail label'] ?></th> | 120: <th scope="row"><?php echo $lang_admin_bans['E-mail label'] ?></th> |
| 123: <td> | 121: <td> |
| 124: <input type="text" name="ban_email" size="40" maxlength="80" value="<?php if (isset($ban_email)) echo strtolower($ban_email); ?>" tabindex="3" /> | 122: <input type="text" name="ban_email" size="40" maxlength="80" value="<?php if (isset($ban_email)) echo $ban_email; ?>" tabindex="3" /> |
| 125: <span><?php echo $lang_admin_bans['E-mail help'] ?></span> | 123: <span><?php echo $lang_admin_bans['E-mail help'] ?></span> |
| 126: </td> | 124: </td> |
| 127: </tr> | 125: </tr> |
| a/admin_censoring.php | b/admin_censoring.php |
|---|---|
| 14: require PUN_ROOT.'include/common_admin.php'; | 14: require PUN_ROOT.'include/common_admin.php'; |
| 15: | 15: |
| 16: | 16: |
| 17: if (!$pun_user['is_admmod']) | 17: if (!$pun_user['is_admmod'] || ($pun_user['g_moderator'] == '1' && $pun_config['o_censoring'] == '0')) |
| 18: message($lang_common['No permission']); | 18: message($lang_common['No permission']); |
| 19: | 19: |
| 20: // Load the admin_censoring.php language file | 20: // Load the admin_censoring.php language file |
| 82: <fieldset> | 82: <fieldset> |
| 83: <legend><?php echo $lang_admin_censoring['Add word subhead'] ?></legend> | 83: <legend><?php echo $lang_admin_censoring['Add word subhead'] ?></legend> |
| 84: <div class="infldset"> | 84: <div class="infldset"> |
| 85: <p><?php printf($lang_admin_censoring['Add word info'], '<a href="admin_options.php#censoring">'.$lang_admin_common['Options'].'</a>') ?></p> | 85: <p><?php echo $lang_admin_censoring['Add word info'].($pun_user['g_id'] != PUN_ADMIN ? '' : ' '.($pun_config['o_censoring'] == '1' ? sprintf($lang_admin_censoring['Censoring enabled'], '<a href="admin_options.php#censoring">'.$lang_admin_common['Options'].'</a>') : sprintf($lang_admin_censoring['Censoring disabled'], '<a href="admin_options.php#censoring">'.$lang_admin_common['Options'].'</a>'))) ?></p> |
| 86: <table cellspacing="0"> | 86: <table cellspacing="0"> |
| 87: <thead> | 87: <thead> |
| 88: <tr> | 88: <tr> |
| a/admin_index.php | b/admin_index.php |
|---|---|
| 85: if ($db_type == 'mysql' || $db_type == 'mysqli' || $db_type == 'mysql_innodb' || $db_type == 'mysqli_innodb') | 85: if ($db_type == 'mysql' || $db_type == 'mysqli' || $db_type == 'mysql_innodb' || $db_type == 'mysqli_innodb') |
| 86: { | 86: { |
| 87: // Calculate total db size/row count | 87: // Calculate total db size/row count |
| 88: $result = $db->query('SHOW TABLE STATUS FROM `'.$db_name.'`') or error('Unable to fetch table status', __FILE__, __LINE__, $db->error()); | 88: $result = $db->query('SHOW TABLE STATUS FROM `'.$db_name.'`LIKE \''.$db->prefix.'%\'') or error('Unable to fetch table status', __FILE__, __LINE__, $db->error()); |
| 89: | 89: |
| 90: $total_records = $total_size = 0; | 90: $total_records = $total_size = 0; |
| 91: while ($status = $db->fetch_assoc($result)) | 91: while ($status = $db->fetch_assoc($result)) |
| a/admin_ranks.php | b/admin_ranks.php |
|---|---|
| 118: <fieldset> | 118: <fieldset> |
| 119: <legend><?php echo $lang_admin_ranks['Add rank subhead'] ?></legend> | 119: <legend><?php echo $lang_admin_ranks['Add rank subhead'] ?></legend> |
| 120: <div class="infldset"> | 120: <div class="infldset"> |
| 121: <p><?php printf($lang_admin_ranks['Add rank info'], '<a href="admin_options.php#ranks">'.$lang_admin_common['Options'].'</a>') ?></p> | 121: <p><?php echo $lang_admin_ranks['Add rank info'].' '.($pun_config['o_ranks'] == '1' ? sprintf($lang_admin_ranks['Ranks enabled'], '<a href="admin_options.php#ranks">'.$lang_admin_common['Options'].'</a>') : sprintf($lang_admin_ranks['Ranks disabled'], '<a href="admin_options.php#ranks">'.$lang_admin_common['Options'].'</a>')) ?></p> |
| 122: <table cellspacing="0"> | 122: <table cellspacing="0"> |
| 123: <thead> | 123: <thead> |
| 124: <tr> | 124: <tr> |
| a/admin_reports.php | b/admin_reports.php |
|---|---|
| 60: $forum = ($cur_report['forum_name'] != '') ? '<span><a href="viewforum.php?id='.$cur_report['forum_id'].'">'.pun_htmlspecialchars($cur_report['forum_name']).'</a></span>' : '<span>'.$lang_admin_reports['Deleted'].'</span>'; | 60: $forum = ($cur_report['forum_name'] != '') ? '<span><a href="viewforum.php?id='.$cur_report['forum_id'].'">'.pun_htmlspecialchars($cur_report['forum_name']).'</a></span>' : '<span>'.$lang_admin_reports['Deleted'].'</span>'; |
| 61: $topic = ($cur_report['subject'] != '') ? '<span>» <a href="viewtopic.php?id='.$cur_report['topic_id'].'">'.pun_htmlspecialchars($cur_report['subject']).'</a></span>' : '<span>» '.$lang_admin_reports['Deleted'].'</span>'; | 61: $topic = ($cur_report['subject'] != '') ? '<span>» <a href="viewtopic.php?id='.$cur_report['topic_id'].'">'.pun_htmlspecialchars($cur_report['subject']).'</a></span>' : '<span>» '.$lang_admin_reports['Deleted'].'</span>'; |
| 62: $post = str_replace("\n", '<br />', pun_htmlspecialchars($cur_report['message'])); | 62: $post = str_replace("\n", '<br />', pun_htmlspecialchars($cur_report['message'])); |
| 63: $postid = ($cur_report['pid'] != '') ? '<span>» <a href="viewtopic.php?pid='.$cur_report['pid'].'#p'.$cur_report['pid'].'">Post #'.$cur_report['pid'].'</a></span>' : '<span>» '.$lang_admin_reports['Deleted'].'</span>'; | 63: $post_id = ($cur_report['pid'] != '') ? '<span>» <a href="viewtopic.php?pid='.$cur_report['pid'].'#p'.$cur_report['pid'].'">Post #'.$cur_report['pid'].'</a></span>' : '<span>» '.$lang_admin_reports['Deleted'].'</span>'; |
| 64: $report_location = array($forum, $topic, $postid); | 64: $report_location = array($forum, $topic, $post_id); |
| 65: | 65: |
| 66: ?> | 66: ?> |
| 67: <div class="inform"> | 67: <div class="inform"> |
| a/admin_users.php | b/admin_users.php |
|---|---|
| 123: | 123: |
| 124: if (isset($_GET['show_users'])) | 124: if (isset($_GET['show_users'])) |
| 125: { | 125: { |
| 126: $ip = $_GET['show_users']; | 126: $ip = trim($_GET['show_users']); |
| 127: | 127: |
| 128: if (!@preg_match('/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/', $ip) && !@preg_match('/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/', $ip)) | 128: if (!@preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $ip) && !@preg_match('/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/', $ip)) |
| 129: message($lang_admin_users['Bad IP message']); | 129: message($lang_admin_users['Bad IP message']); |
| 130: | 130: |
| 131: // Fetch user count | 131: // Fetch user count |
| a/db_update.php | b/db_update.php |
|---|---|
| 7: */ | 7: */ |
| 8: | 8: |
| 9: // The FluxBB version this script updates to | 9: // The FluxBB version this script updates to |
| 10: define('UPDATE_TO', '1.4.0'); | 10: define('UPDATE_TO', '1.4.1'); |
| 11: | 11: |
| 12: define('UPDATE_TO_DB_REVISION', 7); | 12: define('UPDATE_TO_DB_REVISION', 7); |
| 13: define('UPDATE_TO_SI_REVISION', 1); | 13: define('UPDATE_TO_SI_REVISION', 1); |
| 19: define('PUN_SEARCH_MIN_WORD', 3); | 19: define('PUN_SEARCH_MIN_WORD', 3); |
| 20: define('PUN_SEARCH_MAX_WORD', 20); | 20: define('PUN_SEARCH_MAX_WORD', 20); |
| 21: | 21: |
| 22: // The MySQL connection character set that was used for FluxBB 1.2 - in 99% of cases this should be detected automatically, | |
| 23: // but can be overridden using the below constant if required. | |
| 24: //define('FORUM_DEFAULT_CHARSET', 'latin1'); | |
| 25: | |
| 22: | 26: |
| 23: // The number of items to process per page view (lower this if the update script times out during UTF-8 conversion) | 27: // The number of items to process per page view (lower this if the update script times out during UTF-8 conversion) |
| 24: define('PER_PAGE', 300); | 28: define('PER_PAGE', 300); |
| 25: | 29: |
| 30: // Don't set to UTF-8 until after we've found out what the default character set is | |
| 31: define('FORUM_NO_SET_NAMES', 1); | |
| 32: | |
| 26: // Make sure we are running at least MIN_PHP_VERSION | 33: // Make sure we are running at least MIN_PHP_VERSION |
| 27: if (!function_exists('version_compare') || version_compare(PHP_VERSION, MIN_PHP_VERSION, '<')) | 34: if (!function_exists('version_compare') || version_compare(PHP_VERSION, MIN_PHP_VERSION, '<')) |
| 28: exit('You are running PHP version '.PHP_VERSION.'. FluxBB '.UPDATE_TO.' requires at least PHP '.MIN_PHP_VERSION.' to run properly. You must upgrade your PHP installation before you can continue.'); | 35: exit('You are running PHP version '.PHP_VERSION.'. FluxBB '.UPDATE_TO.' requires at least PHP '.MIN_PHP_VERSION.' to run properly. You must upgrade your PHP installation before you can continue.'); |
| 95: // Load DB abstraction layer and try to connect | 102: // Load DB abstraction layer and try to connect |
| 96: require PUN_ROOT.'include/dblayer/common_db.php'; | 103: require PUN_ROOT.'include/dblayer/common_db.php'; |
| 97: | 104: |
| 105: // Check what the default character set is - since 1.2 didn't specify any we will use whatever the default was (usually latin1) | |
| 106: $old_connection_charset = defined('FORUM_DEFAULT_CHARSET') ? FORUM_DEFAULT_CHARSET : $db->get_names(); | |
| 107: | |
| 108: // Set the connection to UTF-8 now | |
| 109: $db->set_names('utf8'); | |
| 110: | |
| 98: // Check current version | 111: // Check current version |
| 99: $result = $db->query('SELECT conf_value FROM '.$db->prefix.'config WHERE conf_name=\'o_cur_version\'') or error('Unable to fetch version info.', __FILE__, __LINE__, $db->error()); | 112: $result = $db->query('SELECT conf_value FROM '.$db->prefix.'config WHERE conf_name=\'o_cur_version\'') or error('Unable to fetch version info.', __FILE__, __LINE__, $db->error()); |
| 100: $cur_version = $db->result($result); | 113: $cur_version = $db->result($result); |
| 318: // | 331: // |
| 319: function convert_table_utf8($table, $callback, $old_charset, $key = null, $start_at = null) | 332: function convert_table_utf8($table, $callback, $old_charset, $key = null, $start_at = null) |
| 320: { | 333: { |
| 321: global $mysql, $db; | 334: global $mysql, $db, $old_connection_charset; |
| 322: | 335: |
| 323: $finished = true; | 336: $finished = true; |
| 324: $end_at = 0; | 337: $end_at = 0; |
| 337: alter_table_utf8($table.'_utf8'); | 350: alter_table_utf8($table.'_utf8'); |
| 338: } | 351: } |
| 339: | 352: |
| 340: // Change to latin1 mode so MySQL doesn't attempt to perform conversion on the data from the old table | 353: // Change to the old character set so MySQL doesn't attempt to perform conversion on the data from the old table |
| 341: $db->set_names('latin1'); | 354: $db->set_names($old_connection_charset); |
| 342: | 355: |
| 343: // Move & Convert everything | 356: // Move & Convert everything |
| 344: $result = $db->query('SELECT * FROM '.$table.($start_at === null ? '' : ' WHERE '.$key.'>'.$start_at).' ORDER BY '.$key.' ASC'.($start_at === null ? '' : ' LIMIT '.PER_PAGE), false) or error('Unable to select from old table', __FILE__, __LINE__, $db->error()); | 357: $result = $db->query('SELECT * FROM '.$table.($start_at === null ? '' : ' WHERE '.$key.'>'.$start_at).' ORDER BY '.$key.' ASC'.($start_at === null ? '' : ' LIMIT '.PER_PAGE), false) or error('Unable to select from old table', __FILE__, __LINE__, $db->error()); |
| 1402: // And the parser revision number | 1415: // And the parser revision number |
| 1403: $db->query('UPDATE '.$db->prefix.'config SET conf_value = \''.UPDATE_TO_PARSER_REVISION.'\' WHERE conf_name = \'o_parser_revision\'') or error('Unable to update parser revision number', __FILE__, __LINE__, $db->error()); | 1416: $db->query('UPDATE '.$db->prefix.'config SET conf_value = \''.UPDATE_TO_PARSER_REVISION.'\' WHERE conf_name = \'o_parser_revision\'') or error('Unable to update parser revision number', __FILE__, __LINE__, $db->error()); |
| 1404: | 1417: |
| 1418: // Check the default language still exists! | |
| 1419: if (!file_exists(PUN_ROOT.'lang/'.$pun_config['o_default_lang'].'/common.php')) | |
| 1420: $db->query('UPDATE '.$db->prefix.'config SET conf_value = \'English\' WHERE conf_name = \'o_default_lang\'') or error('Unable to update default language', __FILE__, __LINE__, $db->error()); | |
| 1421: | |
| 1422: // Check the default style still exists! | |
| 1423: if (!file_exists(PUN_ROOT.'style/'.$pun_config['o_default_style'].'.css')) | |
| 1424: $db->query('UPDATE '.$db->prefix.'config SET conf_value = \'Air\' WHERE conf_name = \'o_default_style\'') or error('Unable to update default style', __FILE__, __LINE__, $db->error()); | |
| 1425: | |
| 1405: // This feels like a good time to synchronize the forums | 1426: // This feels like a good time to synchronize the forums |
| 1406: $result = $db->query('SELECT id FROM '.$db->prefix.'forums') or error('Unable to fetch forum IDs', __FILE__, __LINE__, $db->error()); | 1427: $result = $db->query('SELECT id FROM '.$db->prefix.'forums') or error('Unable to fetch forum IDs', __FILE__, __LINE__, $db->error()); |
| 1407: | 1428: |
| 1454: $db->close(); | 1475: $db->close(); |
| 1455: | 1476: |
| 1456: if ($query_str != '') | 1477: if ($query_str != '') |
| a/delete.php | b/delete.php |
|---|---|
| 19: message($lang_common['Bad request']); | 19: message($lang_common['Bad request']); |
| 20: | 20: |
| 21: // Fetch some info about the post, the topic and the forum | 21: // Fetch some info about the post, the topic and the forum |
| 22: $result = $db->query('SELECT f.id AS fid, f.forum_name, f.moderators, f.redirect_url, fp.post_replies, fp.post_topics, t.id AS tid, t.subject, t.posted, t.first_post_id, t.closed, p.poster, p.poster_id, p.message, p.hide_smilies FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'topics AS t ON t.id=p.topic_id INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND p.id='.$id) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error()); | 22: $result = $db->query('SELECT f.id AS fid, f.forum_name, f.moderators, f.redirect_url, fp.post_replies, fp.post_topics, t.id AS tid, t.subject, t.first_post_id, t.closed, p.posted, p.poster, p.poster_id, p.message, p.hide_smilies FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'topics AS t ON t.id=p.topic_id INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND p.id='.$id) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error()); |
| 23: if (!$db->num_rows($result)) | 23: if (!$db->num_rows($result)) |
| 24: message($lang_common['Bad request']); | 24: message($lang_common['Bad request']); |
| 25: | 25: |
| a/include/common.php | b/include/common.php |
|---|---|
| 10: exit('The constant PUN_ROOT must be defined and point to a valid FluxBB installation root directory.'); | 10: exit('The constant PUN_ROOT must be defined and point to a valid FluxBB installation root directory.'); |
| 11: | 11: |
| 12: // Define the version and database revision that this code was written for | 12: // Define the version and database revision that this code was written for |
| 13: define('FORUM_VERSION', '1.4.0'); | 13: define('FORUM_VERSION', '1.4.1'); |
| 14: | 14: |
| 15: define('FORUM_DB_REVISION', 7); | 15: define('FORUM_DB_REVISION', 7); |
| 16: define('FORUM_SI_REVISION', 1); | 16: define('FORUM_SI_REVISION', 1); |
| a/include/common_admin.php | b/include/common_admin.php |
|---|---|
| 44: <?php if ($is_admin): ?> <li<?php if ($page == 'groups') echo ' class="isactive"'; ?>><a href="admin_groups.php"><?php echo $lang_admin_common['User groups'] ?></a></li> | 44: <?php if ($is_admin): ?> <li<?php if ($page == 'groups') echo ' class="isactive"'; ?>><a href="admin_groups.php"><?php echo $lang_admin_common['User groups'] ?></a></li> |
| 45: <?php endif; ?><?php if ($is_admin): ?> <li<?php if ($page == 'options') echo ' class="isactive"'; ?>><a href="admin_options.php"><?php echo $lang_admin_common['Options'] ?></a></li> | 45: <?php endif; ?><?php if ($is_admin): ?> <li<?php if ($page == 'options') echo ' class="isactive"'; ?>><a href="admin_options.php"><?php echo $lang_admin_common['Options'] ?></a></li> |
| 46: <?php endif; ?><?php if ($is_admin): ?> <li<?php if ($page == 'permissions') echo ' class="isactive"'; ?>><a href="admin_permissions.php"><?php echo $lang_admin_common['Permissions'] ?></a></li> | 46: <?php endif; ?><?php if ($is_admin): ?> <li<?php if ($page == 'permissions') echo ' class="isactive"'; ?>><a href="admin_permissions.php"><?php echo $lang_admin_common['Permissions'] ?></a></li> |
| 47: <?php endif; ?> <li<?php if ($page == 'censoring') echo ' class="isactive"'; ?>><a href="admin_censoring.php"><?php echo $lang_admin_common['Censoring'] ?></a></li> | 47: <?php endif; ?><?php if ($is_admin || $pun_config['o_censoring'] == '1'): ?> <li<?php if ($page == 'censoring') echo ' class="isactive"'; ?>><a href="admin_censoring.php"><?php echo $lang_admin_common['Censoring'] ?></a></li> |
| 48: <?php if ($is_admin): ?> <li<?php if ($page == 'ranks') echo ' class="isactive"'; ?>><a href="admin_ranks.php"><?php echo $lang_admin_common['Ranks'] ?></a></li> | 48: <?php endif; ?><?php if ($is_admin): ?> <li<?php if ($page == 'ranks') echo ' class="isactive"'; ?>><a href="admin_ranks.php"><?php echo $lang_admin_common['Ranks'] ?></a></li> |
| 49: <?php endif; ?><?php if ($is_admin || $pun_user['g_mod_ban_users'] == '1'): ?> <li<?php if ($page == 'bans') echo ' class="isactive"'; ?>><a href="admin_bans.php"><?php echo $lang_admin_common['Bans'] ?></a></li> | 49: <?php endif; ?><?php if ($is_admin || $pun_user['g_mod_ban_users'] == '1'): ?> <li<?php if ($page == 'bans') echo ' class="isactive"'; ?>><a href="admin_bans.php"><?php echo $lang_admin_common['Bans'] ?></a></li> |
| 50: <?php endif; ?><?php if ($is_admin): ?> <li<?php if ($page == 'prune') echo ' class="isactive"'; ?>><a href="admin_prune.php"><?php echo $lang_admin_common['Prune'] ?></a></li> | 50: <?php endif; ?><?php if ($is_admin): ?> <li<?php if ($page == 'prune') echo ' class="isactive"'; ?>><a href="admin_prune.php"><?php echo $lang_admin_common['Prune'] ?></a></li> |
| 51: <?php endif; ?><?php if ($is_admin): ?> <li<?php if ($page == 'maintenance') echo ' class="isactive"'; ?>><a href="admin_maintenance.php"><?php echo $lang_admin_common['Maintenance'] ?></a></li> | 51: <?php endif; ?><?php if ($is_admin): ?> <li<?php if ($page == 'maintenance') echo ' class="isactive"'; ?>><a href="admin_maintenance.php"><?php echo $lang_admin_common['Maintenance'] ?></a></li> |
| a/include/dblayer/mysql.php | b/include/dblayer/mysql.php |
|---|---|
| 179: return false; | 179: return false; |
| 180: } | 180: } |
| 181: | 181: |
| 182: function get_names() | |
| 183: { | |
| 184: $result = $this->query('SHOW VARIABLES LIKE \'character_set_connection\''); | |
| 185: return $this->result($result, 0, 1); | |
| 186: } | |
| 187: | |
| 188: | |
| 182: function set_names($names) | 189: function set_names($names) |
| 183: { | 190: { |
| 184: return $this->query('SET NAMES \''.$this->escape($names).'\''); | 191: return $this->query('SET NAMES \''.$this->escape($names).'\''); |
| 185: } | 192: } |
| 186: | 193: |
| 194: | |
| 187: function get_version() | 195: function get_version() |
| 188: { | 196: { |
| 189: $result = $this->query('SELECT VERSION()'); | 197: $result = $this->query('SELECT VERSION()'); |
| 194: ); | 202: ); |
| 195: } | 203: } |
| 196: | 204: |
| 205: | |
| 197: function table_exists($table_name, $no_prefix = false) | 206: function table_exists($table_name, $no_prefix = false) |
| 198: { | 207: { |
| 199: $result = $this->query('SHOW TABLES LIKE \''.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'\''); | 208: $result = $this->query('SHOW TABLES LIKE \''.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'\''); |
| a/include/dblayer/mysql_innodb.php | b/include/dblayer/mysql_innodb.php |
|---|---|
| 193: } | 193: } |
| 194: | 194: |
| 195: | 195: |
| 196: function get_names() | |
| 197: { | |
| 198: $result = $this->query('SHOW VARIABLES LIKE \'character_set_connection\''); | |
| 199: return $this->result($result, 0, 1); | |
| 200: } | |
| 201: | |
| 202: | |
| 196: function set_names($names) | 203: function set_names($names) |
| 197: { | 204: { |
| 198: return $this->query('SET NAMES \''.$this->escape($names).'\''); | 205: return $this->query('SET NAMES \''.$this->escape($names).'\''); |
| a/include/dblayer/mysqli.php | b/include/dblayer/mysqli.php |
|---|---|
| 94: { | 94: { |
| 95: if ($query_id) | 95: if ($query_id) |
| 96: { | 96: { |
| 97: if ($row) | 97: if ($row !== 0 && @mysqli_data_seek($query_id, $row) === false) |
| 98: @mysqli_data_seek($query_id, $row); | 98: return false; |
| 99: | 99: |
| 100: $cur_row = @mysqli_fetch_row($query_id); | 100: $cur_row = @mysqli_fetch_row($query_id); |
| 101: if ($cur_row === false) | |
| 102: return false; | |
| 103: | |
| 101: return $cur_row[$col]; | 104: return $cur_row[$col]; |
| 102: } | 105: } |
| 103: else | 106: else |
| 182: return false; | 185: return false; |
| 183: } | 186: } |
| 184: | 187: |
| 188: | |
| 189: function get_names() | |
| 190: { | |
| 191: $result = $this->query('SHOW VARIABLES LIKE \'character_set_connection\''); | |
| 192: return $this->result($result, 0, 1); | |
| 193: } | |
| 194: | |
| 195: | |
| 185: function set_names($names) | 196: function set_names($names) |
| 186: { | 197: { |
| 187: return $this->query('SET NAMES \''.$this->escape($names).'\''); | 198: return $this->query('SET NAMES \''.$this->escape($names).'\''); |
| a/include/dblayer/mysqli_innodb.php | b/include/dblayer/mysqli_innodb.php |
|---|---|
| 107: { | 107: { |
| 108: if ($query_id) | 108: if ($query_id) |
| 109: { | 109: { |
| 110: if ($row) | 110: if ($row !== 0 && @mysqli_data_seek($query_id, $row) === false) |
| 111: @mysqli_data_seek($query_id, $row); | 111: return false; |
| 112: | 112: |
| 113: $cur_row = @mysqli_fetch_row($query_id); | 113: $cur_row = @mysqli_fetch_row($query_id); |
| 114: if ($cur_row === false) | |
| 115: return false; | |
| 116: | |
| 114: return $cur_row[$col]; | 117: return $cur_row[$col]; |
| 115: } | 118: } |
| 116: else | 119: else |
| 196: } | 199: } |
| 197: | 200: |
| 198: | 201: |
| 202: function get_names() | |
| 203: { | |
| 204: $result = $this->query('SHOW VARIABLES LIKE \'character_set_connection\''); | |
| 205: return $this->result($result, 0, 1); | |
| 206: } | |
| 207: | |
| 208: | |
| 199: function set_names($names) | 209: function set_names($names) |
| 200: { | 210: { |
| 201: return $this->query('SET NAMES \''.$this->escape($names).'\''); | 211: return $this->query('SET NAMES \''.$this->escape($names).'\''); |
| a/include/dblayer/pgsql.php | b/include/dblayer/pgsql.php |
|---|---|
| 255: return false; | 255: return false; |
| 256: } | 256: } |
| 257: | 257: |
| 258: | |
| 259: function get_names() | |
| 260: { | |
| 261: $result = $this->query('SHOW client_encoding'); | |
| 262: return strtolower($this->result($result)); // MySQL returns lowercase so lets be consistent | |
| 263: } | |
| 264: | |
| 265: | |
| 258: function set_names($names) | 266: function set_names($names) |
| 259: { | 267: { |
| 260: return $this->query('SET NAMES \''.$this->escape($names).'\''); | 268: return $this->query('SET NAMES \''.$this->escape($names).'\''); |
| a/include/dblayer/sqlite.php | b/include/dblayer/sqlite.php |
|---|---|
| 127: { | 127: { |
| 128: if ($query_id) | 128: if ($query_id) |
| 129: { | 129: { |
| 130: if ($row != 0) | 130: if ($row !== 0 && @sqlite_seek($query_id, $row) === false) |
| 131: @sqlite_seek($query_id, $row); | 131: return false; |
| 132: | 132: |
| 133: $cur_row = @sqlite_current($query_id); | 133: $cur_row = @sqlite_current($query_id); |
| 134: if ($cur_row === false) | |
| 135: return false; | |
| 136: | |
| 134: return $cur_row[$col]; | 137: return $cur_row[$col]; |
| 135: } | 138: } |
| 136: else | 139: else |
| 241: return false; | 244: return false; |
| 242: } | 245: } |
| 243: | 246: |
| 247: | |
| 248: function get_names() | |
| 249: { | |
| 250: return ''; | |
| 251: } | |
| 252: | |
| 253: | |
| 244: function set_names($names) | 254: function set_names($names) |
| 245: { | 255: { |
| 246: return; | 256: return true; |
| 247: } | 257: } |
| 248: | 258: |
| 249: | 259: |
| a/include/functions.php | b/include/functions.php |
|---|---|
| 741: for ($i = 0; $i < $num_words; ++$i) | 741: for ($i = 0; $i < $num_words; ++$i) |
| 742: { | 742: { |
| 743: list($search_for[$i], $replace_with[$i]) = $db->fetch_row($result); | 743: list($search_for[$i], $replace_with[$i]) = $db->fetch_row($result); |
| 744: $search_for[$i] = '/\b('.str_replace('\*', '\w*?', preg_quote($search_for[$i], '/')).')\b/i'; | 744: $search_for[$i] = '/(?<=\W)('.str_replace('\*', '\w*?', preg_quote($search_for[$i], '/')).')(?=\W)/i'; |
| 745: } | 745: } |
| 746: } | 746: } |
| 747: | 747: |
| 1667: } | 1667: } |
| 1668: $d->close(); | 1668: $d->close(); |
| 1669: | 1669: |
| 1670: natcasesort($plugins); | |
| 1671: | |
| 1672: return $plugins; | 1670: return $plugins; |
| 1673: } | 1671: } |
| 1674: | 1672: |
| a/include/search_idx.php | b/include/search_idx.php |
|---|---|
| 48: function split_words($text, $idx) | 48: function split_words($text, $idx) |
| 49: { | 49: { |
| 50: // Remove BBCode | 50: // Remove BBCode |
| 51: $text = preg_replace('/\[\/?(b|u|i|h|colou?r|quote|code|img|url|email|list)(?:\=[^\]]*)?\]/', ' ', $text); | 51: $text = preg_replace('/\[\/?(b|u|s|ins|del|em|i|h|colou?r|quote|code|img|url|email|list)(?:\=[^\]]*)?\]/', ' ', $text); |
| 52: | 52: |
| 53: // Remove any apostrophes or dashes which aren't part of words | 53: // Remove any apostrophes or dashes which aren't part of words |
| 54: $text = substr(preg_replace('/((?<=\W)[\'\-]|[\'\-](?=\W))/', '', ' '.$text.' '), 1, -1); | 54: $text = substr(preg_replace('/((?<=\W)[\'\-]|[\'\-](?=\W))/', '', ' '.$text.' '), 1, -1); |
| a/install.php | b/install.php |
|---|---|
| 7: */ | 7: */ |
| 8: | 8: |
| 9: // The FluxBB version this script installs | 9: // The FluxBB version this script installs |
| 10: define('FORUM_VERSION', '1.4.0'); | 10: define('FORUM_VERSION', '1.4.1'); |
| 11: | 11: |
| 12: define('FORUM_DB_REVISION', 7); | 12: define('FORUM_DB_REVISION', 7); |
| 13: define('FORUM_SI_REVISION', 1); | 13: define('FORUM_SI_REVISION', 1); |
| a/lang/English/admin_censoring.php | b/lang/English/admin_censoring.php |
|---|---|
| 10: 'Word removed redirect' => 'Censor word removed. Redirecting …', | 10: 'Word removed redirect' => 'Censor word removed. Redirecting …', |
| 11: 'Censoring head' => 'Censoring', | 11: 'Censoring head' => 'Censoring', |
| 12: 'Add word subhead' => 'Add word', | 12: 'Add word subhead' => 'Add word', |
| 13: 'Add word info' => 'Enter a word that you want to censor and the replacement text for this word. Wildcards are accepted (i.e. *some* would match somewhere and lonesome). Censor words also affect usernames. New users will not be able to register with usernames containing any censored words. The search is case insensitive. <strong>Censor words must be enabled in %s for this to have any effect.</strong>', | 13: 'Add word info' => 'Enter a word that you want to censor and the replacement text for this word. Wildcards are accepted (i.e. *some* would match somewhere and lonesome). Censor words also affect usernames. New users will not be able to register with usernames containing any censored words. The search is case insensitive.', |
| 14: 'Censoring enabled' => '<strong>Censoring is enabled in %s.</strong>', | |
| 15: 'Censoring disabled' => '<strong>Censoring is disabled in %s.</strong>', | |
| 14: 'Censored word label' => 'Censored word', | 16: 'Censored word label' => 'Censored word', |
| 15: 'Replacement label' => 'Replacement word(s)', | 17: 'Replacement label' => 'Replacement word(s)', |
| 16: 'Action label' => 'Action', | 18: 'Action label' => 'Action', |
| a/lang/English/admin_prune.php | b/lang/English/admin_prune.php |
|---|---|
| 11: 'Days old label' => 'Days old', | 11: 'Days old label' => 'Days old', |
| 12: 'Days old help' => 'The number of days "old" a topic must be to be pruned. E.g. if you were to enter 30, every topic that didn\'t contain a post dated less than 30 days old would be deleted.', | 12: 'Days old help' => 'The number of days "old" a topic must be to be pruned. E.g. if you were to enter 30, every topic that didn\'t contain a post dated less than 30 days old would be deleted.', |
| 13: 'Prune sticky label' => 'Prune sticky topics', | 13: 'Prune sticky label' => 'Prune sticky topics', |
| 14: 'Prune sticky help' => 'When enabled sticky topics will also be pruned.', | 14: 'Prune sticky help' => 'When enabled, sticky topics will also be pruned.', |
| 15: 'Prune from label' => 'Prune from forum', | 15: 'Prune from label' => 'Prune from forum', |
| 16: 'All forums' => 'All forums', | 16: 'All forums' => 'All forums', |
| 17: 'Prune from help' => 'The forum from which you want to prune posts.', | 17: 'Prune from help' => 'The forum from which you want to prune posts.', |
| a/lang/English/admin_ranks.php | b/lang/English/admin_ranks.php |
|---|---|
| 11: 'Rank removed redirect' => 'Rank removed. Redirecting …', | 11: 'Rank removed redirect' => 'Rank removed. Redirecting …', |
| 12: 'Ranks head' => 'Ranks', | 12: 'Ranks head' => 'Ranks', |
| 13: 'Add rank subhead' => 'Add rank', | 13: 'Add rank subhead' => 'Add rank', |
| 14: 'Add rank info' => 'Enter a rank and the minimum number of posts a user must have made to attain the rank. Different ranks cannot have the same value for minimum posts. If a title is set for a user, the title will be displayed instead of any rank. <strong>User ranks must be enabled in %s for this to have any effect</strong>.', | 14: 'Add rank info' => 'Enter a rank and the minimum number of posts a user must have made to attain the rank. Different ranks cannot have the same value for minimum posts. If a title is set for a user, the title will be displayed instead of any rank.', |
| 15: 'Ranks enabled' => '<strong>User ranks is enabled in %s.</strong>', | |
| 16: 'Ranks disabled' => '<strong>User ranks is disabled in %s.</strong>', | |
| 15: 'Rank title label' => 'Rank title', | 17: 'Rank title label' => 'Rank title', |
| 16: 'Minimum posts label' => 'Minimum posts', | 18: 'Minimum posts label' => 'Minimum posts', |
| 17: 'Actions label' => 'Actions', | 19: 'Actions label' => 'Actions', |
| a/lang/English/prof_reg.php | b/lang/English/prof_reg.php |
|---|---|
| 31: 'Pass not match' => 'Passwords do not match.', | 31: 'Pass not match' => 'Passwords do not match.', |
| 32: 'Banned email' => 'The email address you entered is banned in this forum. Please choose another email address.', | 32: 'Banned email' => 'The email address you entered is banned in this forum. Please choose another email address.', |
| 33: 'Dupe email' => 'Someone else is already registered with that email address. Please choose another email address.', | 33: 'Dupe email' => 'Someone else is already registered with that email address. Please choose another email address.', |
| 34: 'Sig too long' => 'Signatures cannot be longer than', | 34: 'Sig too long' => 'Signatures cannot be longer than %1$s characters. Please reduce your signature by %2$s characters.', |
| 35: 'characters' => 'characters', | 35: 'Sig too many lines' => 'Signatures cannot have more than %s lines.', |
| 36: 'Sig too many lines' => 'Signatures cannot have more than', | |
| 37: 'lines' => 'lines', | |
| 38: 'Bad ICQ' => 'You entered an invalid ICQ UIN. Please go back and correct.', | 36: 'Bad ICQ' => 'You entered an invalid ICQ UIN. Please go back and correct.', |
| 39: | 37: |
| 40: 'UTC-12:00' => '(UTC-12:00) International Date Line West', | 38: 'UTC-12:00' => '(UTC-12:00) International Date Line West', |
| a/lang/English/profile.php | b/lang/English/profile.php |
|---|---|
| 69: | 69: |
| 70: // Profile display stuff | 70: // Profile display stuff |
| 71: 'Users profile' => '%s\'s profile', | 71: 'Users profile' => '%s\'s profile', |
| 72: 'Unknown' => '(Unknown)', // This is displayed when a user hasn't filled out profile field (e.g. Location) | |
| 73: 'Private' => '(Private)', // This is displayed when a user does not want to receive emails | |
| 74: 'No avatar' => '(No avatar)', | |
| 75: 'Username info' => 'Username: %s', | 72: 'Username info' => 'Username: %s', |
| 76: 'Email info' => 'Email: %s', | 73: 'Email info' => 'Email: %s', |
| 77: 'Posts info' => 'Posts: %s', | 74: 'Posts info' => 'Posts: %s', |
| a/plugins/AMP_Example.php | b/plugins/AMP_Example.php |
|---|---|
| 55: if (!defined('PUN')) | 55: if (!defined('PUN')) |
| 56: exit; | 56: exit; |
| 57: | 57: |
| 58: // Load the admin_bans.php language file | 58: // Load the admin_plugin_example.php language file |
| 59: require PUN_ROOT.'lang/'.$admin_language.'/admin_plugin_example.php'; | 59: require PUN_ROOT.'lang/'.$admin_language.'/admin_plugin_example.php'; |
| 60: | 60: |
| 61: // Tell admin_loader.php that this is indeed a plugin and that it is loaded | 61: // Tell admin_loader.php that this is indeed a plugin and that it is loaded |
| a/post.php | b/post.php |
|---|---|
| 39: $mods_array = ($cur_posting['moderators'] != '') ? unserialize($cur_posting['moderators']) : array(); | 39: $mods_array = ($cur_posting['moderators'] != '') ? unserialize($cur_posting['moderators']) : array(); |
| 40: $is_admmod = ($pun_user['g_id'] == PUN_ADMIN || ($pun_user['g_moderator'] == '1' && array_key_exists($pun_user['username'], $mods_array))) ? true : false; | 40: $is_admmod = ($pun_user['g_id'] == PUN_ADMIN || ($pun_user['g_moderator'] == '1' && array_key_exists($pun_user['username'], $mods_array))) ? true : false; |
| 41: | 41: |
| 42: if ($pun_config['o_censoring'] == '1') | 42: if ($tid && $pun_config['o_censoring'] == '1') |
| 43: $cur_posting['subject'] = censor_words($cur_posting['subject']); | 43: $cur_posting['subject'] = censor_words($cur_posting['subject']); |
| 44: | 44: |
| 45: // Do we have permission to post? | 45: // Do we have permission to post? |
| a/profile.php | b/profile.php |
|---|---|
| 774: | 774: |
| 775: // Validate signature | 775: // Validate signature |
| 776: if (pun_strlen($form['signature']) > $pun_config['p_sig_length']) | 776: if (pun_strlen($form['signature']) > $pun_config['p_sig_length']) |
| 777: message($lang_prof_reg['Sig too long'].' '.$pun_config['p_sig_length'].' '.$lang_prof_reg['characters'].'.'); | 777: message(sprintf($lang_prof_reg['Sig too long'], $pun_config['p_sig_length'], pun_strlen($form['signature']) - $pun_config['p_sig_length'])); |
| 778: else if (substr_count($form['signature'], "\n") > ($pun_config['p_sig_lines']-1)) | 778: else if (substr_count($form['signature'], "\n") > ($pun_config['p_sig_lines']-1)) |
| 779: message($lang_prof_reg['Sig too many lines'].' '.$pun_config['p_sig_lines'].' '.$lang_prof_reg['lines'].'.'); | 779: message(sprintf($lang_prof_reg['Sig too many lines'], $pun_config['p_sig_lines'])); |
| 780: else if ($form['signature'] && $pun_config['p_sig_all_caps'] == '0' && is_all_uppercase($form['signature']) && !$pun_user['is_admmod']) | 780: else if ($form['signature'] && $pun_config['p_sig_all_caps'] == '0' && is_all_uppercase($form['signature']) && !$pun_user['is_admmod']) |
| 781: $form['signature'] = utf8_ucwords(utf8_strtolower($form['signature'])); | 781: $form['signature'] = utf8_ucwords(utf8_strtolower($form['signature'])); |
| 782: | 782: |
| 934: ($pun_user['g_moderator'] == '1' && $pun_user['g_mod_edit_users'] == '0') || | 934: ($pun_user['g_moderator'] == '1' && $pun_user['g_mod_edit_users'] == '0') || |
| 935: ($pun_user['g_moderator'] == '1' && $user['g_moderator'] == '1'))) | 935: ($pun_user['g_moderator'] == '1' && $user['g_moderator'] == '1'))) |
| 936: { | 936: { |
| 937: $user_personal = array(); | |
| 938: | |
| 939: $user_personal[] = '<dt>'.$lang_common['Username'].'</dt>'; | |
| 940: $user_personal[] = '<dd>'.pun_htmlspecialchars($user['username']).'</dd>'; | |
| 941: | |
| 942: $user_title_field = get_title($user); | |
| 943: $user_personal[] = '<dt>'.$lang_common['Title'].'</dt>'; | |
| 944: $user_personal[] = '<dd>'.(($pun_config['o_censoring'] == '1') ? censor_words($user_title_field) : $user_title_field).'</dd>'; | |
| 945: | |
| 946: if ($user['realname'] != '') | |
| 947: { | |
| 948: $user_personal[] = '<dt>'.$lang_profile['Realname'].'</dt>'; | |
| 949: $user_personal[] = '<dd>'.pun_htmlspecialchars(($pun_config['o_censoring'] == '1') ? censor_words($user['realname']) : $user['realname']).'</dd>'; | |
| 950: } | |
| 951: | |
| 952: if ($user['location'] != '') | |
| 953: { | |
| 954: $user_personal[] = '<dt>'.$lang_profile['Location'].'</dt>'; | |
| 955: $user_personal[] = '<dd>'.pun_htmlspecialchars(($pun_config['o_censoring'] == '1') ? censor_words($user['location']) : $user['location']).'</dd>'; | |
| 956: } | |
| 957: | |
| 958: if ($user['url'] != '') | |
| 959: { | |
| 960: $user['url'] = pun_htmlspecialchars(($pun_config['o_censoring'] == '1') ? censor_words($user['url']) : $user['url']); | |
| 961: $user_personal[] = '<dt>'.$lang_profile['Website'].'</dt>'; | |
| 962: $user_personal[] = '<dd><span class="website"><a href="'.$user['url'].'">'.$user['url'].'</a></span></dd>'; | |
| 963: } | |
| 964: | |
| 937: if ($user['email_setting'] == '0' && !$pun_user['is_guest'] && $pun_user['g_send_email'] == '1') | 965: if ($user['email_setting'] == '0' && !$pun_user['is_guest'] && $pun_user['g_send_email'] == '1') |
| 938: $email_field = '<span class="email"><a href="mailto:'.$user['email'].'">'.$user['email'].'</a></span>'; | 966: $email_field = '<a href="mailto:'.$user['email'].'">'.$user['email'].'</a>'; |
| 939: else if ($user['email_setting'] == '1' && !$pun_user['is_guest'] && $pun_user['g_send_email'] == '1') | 967: else if ($user['email_setting'] == '1' && !$pun_user['is_guest'] && $pun_user['g_send_email'] == '1') |
| 940: $email_field = '<span class="email"><a href="misc.php?email='.$id.'">'.$lang_common['Send email'].'</a></span>'; | 968: $email_field = '<a href="misc.php?email='.$id.'">'.$lang_common['Send email'].'</a>'; |
| 941: else | 969: else |
| 942: $email_field = $lang_profile['Private']; | 970: $email_field = ''; |
| 971: if ($email_field != '') | |
| 972: { | |
| 973: $user_personal[] = '<dt>'.$lang_common['Email'].'</dt>'; | |
| 974: $user_personal[] = '<dd><span class="email">'.$email_field.'</span></dd>'; | |
| 975: } | |
| 943: | 976: |
| 944: $user_title_field = get_title($user); | 977: $user_messaging = array(); |
| 945: | 978: |
| 946: if ($user['url'] != '') | 979: if ($user['jabber'] != '') |
| 947: { | 980: { |
| 948: $user['url'] = pun_htmlspecialchars($user['url']); | 981: $user_messaging[] = '<dt>'.$lang_profile['Jabber'].'</dt>'; |
| 982: $user_messaging[] = '<dd>'.pun_htmlspecialchars(($pun_config['o_censoring'] == '1') ? censor_words($user['jabber']) : $user['jabber']).'</dd>'; | |
| 983: } | |
| 949: | 984: |
| 950: if ($pun_config['o_censoring'] == '1') | 985: if ($user['icq'] != '') |
| 951: $user['url'] = censor_words($user['url']); | 986: { |
| 987: $user_messaging[] = '<dt>'.$lang_profile['ICQ'].'</dt>'; | |
| 988: $user_messaging[] = '<dd>'.$user['icq'].'</dd>'; | |
| 989: } | |
| 952: | 990: |
| 953: $url = '<span class="website"><a href="'.$user['url'].'">'.$user['url'].'</a></span>'; | 991: if ($user['msn'] != '') |
| 992: { | |
| 993: $user_messaging[] = '<dt>'.$lang_profile['MSN'].'</dt>'; | |
| 994: $user_messaging[] = '<dd>'.pun_htmlspecialchars(($pun_config['o_censoring'] == '1') ? censor_words($user['msn']) : $user['msn']).'</dd>'; | |
| 954: } | 995: } |
| 955: else | 996: |
| 956: $url = $lang_profile['Unknown']; | 997: if ($user['aim'] != '') |
| 998: { | |
| 999: $user_messaging[] = '<dt>'.$lang_profile['AOL IM'].'</dt>'; | |
| 1000: $user_messaging[] = '<dd>'.pun_htmlspecialchars(($pun_config['o_censoring'] == '1') ? censor_words($user['aim']) : $user['aim']).'</dd>'; | |
| 1001: } | |
| 1002: | |
| 1003: if ($user['yahoo'] != '') | |
| 1004: { | |
| 1005: $user_messaging[] = '<dt>'.$lang_profile['Yahoo'].'</dt>'; | |
| 1006: $user_messaging[] = '<dd>'.pun_htmlspecialchars(($pun_config['o_censoring'] == '1') ? censor_words($user['yahoo']) : $user['yahoo']).'</dd>'; | |
| 1007: } | |
| 1008: | |
| 1009: $user_personality = array(); | |
| 957: | 1010: |
| 958: if ($pun_config['o_avatars'] == '1') | 1011: if ($pun_config['o_avatars'] == '1') |
| 959: { | 1012: { |
| 960: $avatar_field = generate_avatar_markup($id); | 1013: $avatar_field = generate_avatar_markup($id); |
| 961: if ($avatar_field == '') | 1014: if ($avatar_field != '') |
| 962: $avatar_field = $lang_profile['No avatar']; | 1015: { |
| 1016: $user_personality[] = '<dt>'.$lang_profile['Avatar'].'</dt>'; | |
| 1017: $user_personality[] = '<dd>'.$avatar_field.'</dd>'; | |
| 1018: } | |
| 963: } | 1019: } |
| 964: | 1020: |
| 1021: if ($pun_config['o_signatures'] == '1') | |
| 1022: { | |
| 1023: if (isset($parsed_signature)) | |
| 1024: { | |
| 1025: $user_personality[] = '<dt>'.$lang_profile['Signature'].'</dt>'; | |
| 1026: $user_personality[] = '<dd><div class="postsignature postmsg">'.$parsed_signature.'</div></dd>'; | |
| 1027: } | |
| 1028: } | |
| 1029: | |
| 1030: $user_activity = array(); | |
| 1031: | |
| 965: $posts_field = ''; | 1032: $posts_field = ''; |
| 966: if ($pun_config['o_show_post_count'] == '1' || $pun_user['is_admmod']) | 1033: if ($pun_config['o_show_post_count'] == '1' || $pun_user['is_admmod']) |
| 967: $posts_field = forum_number_format($user['num_posts']); | 1034: $posts_field = forum_number_format($user['num_posts']); |
| 968: if ($pun_user['g_search'] == '1') | 1035: if ($pun_user['g_search'] == '1' && $user['num_posts'] > 0) |
| 969: $posts_field .= (($posts_field != '') ? ' - ' : '').'<a href="search.php?action=show_user&user_id='.$id.'">'.$lang_profile['Show posts'].'</a>'; | 1036: $posts_field .= (($posts_field != '') ? ' - ' : '').'<a href="search.php?action=show_user&user_id='.$id.'">'.$lang_profile['Show posts'].'</a>'; |
| 1037: if ($posts_field != '') | |
| 1038: { | |
| 1039: $user_activity[] = '<dt>'.$lang_common['Posts'].'</dt>'; | |
| 1040: $user_activity[] = '<dd>'.$posts_field.'</dd>'; | |
| 1041: } | |
| 1042: | |
| 1043: if ($user['num_posts'] > 0) | |
| 1044: { | |
| 1045: $user_activity[] = '<dt>'.$lang_common['Last post'].'</dt>'; | |
| 1046: $user_activity[] = '<dd>'.$last_post.'</dd>'; | |
| 1047: } | |
| 1048: | |
| 1049: $user_activity[] = '<dt>'.$lang_common['Registered'].'</dt>'; | |
| 1050: $user_activity[] = '<dd>'.format_time($user['registered'], true).'</dd>'; | |
| 970: | 1051: |
| 971: $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), sprintf($lang_profile['Users profile'], pun_htmlspecialchars($user['username']))); | 1052: $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), sprintf($lang_profile['Users profile'], pun_htmlspecialchars($user['username']))); |
| 972: define('PUN_ALLOW_INDEX', 1); | 1053: define('PUN_ALLOW_INDEX', 1); |
| 983: <legend><?php echo $lang_profile['Section personal'] ?></legend> | 1064: <legend><?php echo $lang_profile['Section personal'] ?></legend> |
| 984: <div class="infldset"> | 1065: <div class="infldset"> |
| 985: <dl> | 1066: <dl> |
| 986: <dt><?php echo $lang_common['Username'] ?></dt> | 1067: <?php echo implode("\n\t\t\t\t\t\t\t", $user_personal)."\n" ?> |
| 987: <dd><?php echo pun_htmlspecialchars($user['username']) ?></dd> | |
| 988: <dt><?php echo $lang_common['Title'] ?></dt> | |
| 989: <dd><?php echo ($pun_config['o_censoring'] == '1') ? censor_words($user_title_field) : $user_title_field; ?></dd> | |
| 990: <dt><?php echo $lang_profile['Realname'] ?></dt> | |
| 991: <dd><?php echo ($user['realname'] !='') ? pun_htmlspecialchars(($pun_config['o_censoring'] == '1') ? censor_words($user['realname']) : $user['realname']) : $lang_profile['Unknown']; ?></dd> | |
| 992: <dt><?php echo $lang_profile['Location'] ?></dt> | |
| 993: <dd><?php echo ($user['location'] !='') ? pun_htmlspecialchars(($pun_config['o_censoring'] == '1') ? censor_words($user['location']) : $user['location']) : $lang_profile['Unknown']; ?></dd> | |
| 994: <dt><?php echo $lang_profile['Website'] ?></dt> | |
| 995: <dd><?php echo $url ?></dd> | |
| 996: <dt><?php echo $lang_common['Email'] ?></dt> | |
| 997: <dd><?php echo $email_field ?></dd> | |
| 998: </dl> | 1068: </dl> |
| 999: <div class="clearer"></div> | 1069: <div class="clearer"></div> |
| 1000: </div> | 1070: </div> |
| 1001: </fieldset> | 1071: </fieldset> |
| 1002: </div> | 1072: </div> |
| 1003: <div class="inform"> | 1073: <?php if (!empty($user_messaging)): ?> <div class="inform"> |
| 1004: <fieldset> | 1074: <fieldset> |
| 1005: <legend><?php echo $lang_profile['Section messaging'] ?></legend> | 1075: <legend><?php echo $lang_profile['Section messaging'] ?></legend> |
| 1006: <div class="infldset"> | 1076: <div class="infldset"> |
| 1007: <dl> | 1077: <dl> |
| 1008: <dt><?php echo $lang_profile['Jabber'] ?></dt> | 1078: <?php echo implode("\n\t\t\t\t\t\t\t", $user_messaging)."\n" ?> |
| 1009: <dd><?php echo ($user['jabber'] !='') ? pun_htmlspecialchars(($pun_config['o_censoring'] == '1') ? censor_words($user['jabber']) : $user['jabber']) : $lang_profile['Unknown']; ?></dd> | |
| 1010: <dt><?php echo $lang_profile['ICQ'] ?></dt> | |
| 1011: <dd><?php echo ($user['icq'] !='') ? $user['icq'] : $lang_profile['Unknown']; ?></dd> | |
| 1012: <dt><?php echo $lang_profile['MSN'] ?></dt> | |
| 1013: <dd><?php echo ($user['msn'] !='') ? pun_htmlspecialchars(($pun_config['o_censoring'] == '1') ? censor_words($user['msn']) : $user['msn']) : $lang_profile['Unknown']; ?></dd> | |
| 1014: <dt><?php echo $lang_profile['AOL IM'] ?></dt> | |
| 1015: <dd><?php echo ($user['aim'] !='') ? pun_htmlspecialchars(($pun_config['o_censoring'] == '1') ? censor_words($user['aim']) : $user['aim']) : $lang_profile['Unknown']; ?></dd> | |
| 1016: <dt><?php echo $lang_profile['Yahoo'] ?></dt> | |
| 1017: <dd><?php echo ($user['yahoo'] !='') ? pun_htmlspecialchars(($pun_config['o_censoring'] == '1') ? censor_words($user['yahoo']) : $user['yahoo']) : $lang_profile['Unknown']; ?></dd> | |
| 1018: </dl> | 1079: </dl> |
| 1019: <div class="clearer"></div> | 1080: <div class="clearer"></div> |
| 1020: </div> | 1081: </div> |
| 1021: </fieldset> | 1082: </fieldset> |
| 1022: </div> | 1083: </div> |
| 1023: <?php if ($pun_config['o_avatars'] == '1' || $pun_config['o_signatures'] == '1'): ?> <div class="inform"> | 1084: <?php endif; if (!empty($user_personality)): ?> <div class="inform"> |
| 1024: <fieldset> | 1085: <fieldset> |
| 1025: <legend><?php echo $lang_profile['Section personality'] ?></legend> | 1086: <legend><?php echo $lang_profile['Section personality'] ?></legend> |
| 1026: <div class="infldset"> | 1087: <div class="infldset"> |
| 1027: <dl> | 1088: <dl> |
| 1028: <?php if ($pun_config['o_avatars'] == '1'): ?> <dt><?php echo $lang_profile['Avatar'] ?></dt> | 1089: <?php echo implode("\n\t\t\t\t\t\t\t", $user_personality)."\n" ?> |
| 1029: <dd><?php echo $avatar_field ?></dd> | 1090: </dl> |
| 1030: <?php endif; if ($pun_config['o_signatures'] == '1'): ?> <dt><?php echo $lang_profile['Signature'] ?></dt> | |
| 1031: <dd><?php echo isset($parsed_signature) ? '<div class="postsignature postmsg">'.$parsed_signature.'</div>' : $lang_profile['No sig']; ?></dd> | |
| 1032: <?php endif; ?> </dl> | |
| 1033: <div class="clearer"></div> | 1091: <div class="clearer"></div> |
| 1034: </div> | 1092: </div> |
| 1035: </fieldset> | 1093: </fieldset> |
| 1039: <legend><?php echo $lang_profile['User activity'] ?></legend> | 1097: <legend><?php echo $lang_profile['User activity'] ?></legend> |
| 1040: <div class="infldset"> | 1098: <div class="infldset"> |
| 1041: <dl> | 1099: <dl> |
| 1042: <?php if ($posts_field != ''): ?> <dt><?php echo $lang_common['Posts'] ?></dt> | 1100: <?php echo implode("\n\t\t\t\t\t\t\t", $user_activity)."\n" ?> |
| 1043: <dd><?php echo $posts_field ?></dd> | |
| 1044: <?php endif; ?> <dt><?php echo $lang_common['Last post'] ?></dt> | |
| 1045: <dd><?php echo $last_post ?></dd> | |
| 1046: <dt><?php echo $lang_common['Registered'] ?></dt> | |
| 1047: <dd><?php echo format_time($user['registered'], true) ?></dd> | |
| 1048: </dl> | 1101: </dl> |
| 1049: <div class="clearer"></div> | 1102: <div class="clearer"></div> |
| 1050: </div> | 1103: </div> |
| a/search.php | b/search.php |
|---|---|
| 528: | 528: |
| 529: ?> | 529: ?> |
| 530: <div class="blockpost<?php echo ($post_count % 2 == 0) ? ' roweven' : ' rowodd' ?><?php if ($cur_search['pid'] == $cur_search['first_post_id']) echo ' firstpost' ?><?php if ($post_count == 1) echo ' blockpost1' ?><?php if ($item_status != '') echo ' '.$item_status ?>"> | 530: <div class="blockpost<?php echo ($post_count % 2 == 0) ? ' roweven' : ' rowodd' ?><?php if ($cur_search['pid'] == $cur_search['first_post_id']) echo ' firstpost' ?><?php if ($post_count == 1) echo ' blockpost1' ?><?php if ($item_status != '') echo ' '.$item_status ?>"> |
| 531: <h2><span><span class="conr">#<?php echo ($start_from + $post_count) ?></span> <span><?php if ($cur_search['pid'] != $cur_search['first_post_id']) echo $lang_topic['Re'].' ' ?><?php echo $forum ?></span> <span>» <a href="viewtopic.php?id=<?php echo $cur_search['tid'] ?>"><?php echo $cur_search['subject'] ?></a></span> <span>» <a href="viewtopic.php?pid=<?php echo $cur_search['pid'].'#p'.$cur_search['pid'] ?>"><?php echo format_time($cur_search['pposted']) ?></a></span></span></h2> | 531: <h2><span><span class="conr">#<?php echo ($start_from + $post_count) ?></span> <span><?php if ($cur_search['pid'] != $cur_search['first_post_id']) echo $lang_topic['Re'].' ' ?><?php echo $forum ?></span> <span>» <a href="viewtopic.php?id=<?php echo $cur_search['tid'] ?>"><?php echo pun_htmlspecialchars($cur_search['subject']) ?></a></span> <span>» <a href="viewtopic.php?pid=<?php echo $cur_search['pid'].'#p'.$cur_search['pid'] ?>"><?php echo format_time($cur_search['pposted']) ?></a></span></span></h2> |
| 532: <div class="box"> | 532: <div class="box"> |
| 533: <div class="inbox"> | 533: <div class="inbox"> |
| 534: <div class="postbody"> | 534: <div class="postbody"> |
| a/style/Air.css | b/style/Air.css |
|---|---|
| 279: #brdmenu a:link, #brdmenu a:visited { | 279: #brdmenu a:link, #brdmenu a:visited { |
| 280: border-right-style: solid; | 280: border-right-style: solid; |
| 281: border-width: 1px; | 281: border-width: 1px; |
| 282: display: inline-block; | 282: display: block; |
| 283: min-width: 60px; | 283: min-width: 60px; |
| 284: padding: 12px 16px 6px 8px; | 284: padding: 12px 16px 6px 8px; |
| 285: white-space: nowrap; | 285: white-space: nowrap; |
| 503: 4. MAIN TABLES | 503: 4. MAIN TABLES |
| 504: *****************************************************************/ | 504: *****************************************************************/ |
| 505: | 505: |
| 506: .pun #brdmain .blocktable { | |
| 507: position: relative; | |
| 508: } | |
| 509: | |
| 506: #punindex #brdmain .blocktable h2, #punsearch #vf h2 { | 510: #punindex #brdmain .blocktable h2, #punsearch #vf h2 { |
| 507: font: 1em/1.462em Arial, Helvetica, sans-serif; | 511: font: 1em/1.462em Arial, Helvetica, sans-serif; |
| 508: font-weight: bold; | 512: font-weight: bold; |
| 509: margin: 1px 1px 0 1px; | 513: margin: 1px 1px 0 1px; |
| 510: padding-left: 8px; | 514: padding-left: 8px; |
| 511: position: absolute; | 515: position: absolute; |
| 516: left: 0; | |
| 512: white-space: nowrap; | 517: white-space: nowrap; |
| 513: z-index: 100; | 518: z-index: 100; |
| 514: } | 519: } |
| 809: | 814: |
| 810: .pun .blockpost .postfootright li { | 815: .pun .blockpost .postfootright li { |
| 811: display: inline; | 816: display: inline; |
| 812: } | 817: } |
| 813: | 818: |
| 814: .pun .blockpost .postfootright li span { | 819: .pun .blockpost .postfootright li span { |
| 815: display: inline-block; | 820: display: inline-block; |
| 816: padding-left: 16px; | 821: padding-left: 16px; |
| 1598: | 1603: |
| 1599: .pun .inew .icon { | 1604: .pun .inew .icon { |
| 1600: border-color: #91b3d9 #87a8d1 #6c85bb #7292c3; | 1605: border-color: #91b3d9 #87a8d1 #6c85bb #7292c3; |
| 1601: } | 1606: } |
| 1602: | 1607: |
| a/style/Earth.css | b/style/Earth.css |
|---|---|
| 279: #brdmenu a:link, #brdmenu a:visited { | 279: #brdmenu a:link, #brdmenu a:visited { |
| 280: border-right-style: solid; | 280: border-right-style: solid; |
| 281: border-width: 1px; | 281: border-width: 1px; |
| 282: display: inline-block; | 282: display: block; |
| 283: min-width: 60px; | 283: min-width: 60px; |
| 284: padding: 12px 16px 6px 8px; | 284: padding: 12px 16px 6px 8px; |
| 285: white-space: nowrap; | 285: white-space: nowrap; |
| 503: 4. MAIN TABLES | 503: 4. MAIN TABLES |
| 504: *****************************************************************/ | 504: *****************************************************************/ |
| 505: | 505: |
| 506: .pun #brdmain .blocktable { | |
| 507: position: relative; | |
| 508: } | |
| 509: | |
| 506: #punindex #brdmain .blocktable h2, #punsearch #vf h2 { | 510: #punindex #brdmain .blocktable h2, #punsearch #vf h2 { |
| 507: font: 1em/1.462em Arial, Helvetica, sans-serif; | 511: font: 1em/1.462em Arial, Helvetica, sans-serif; |
| 508: font-weight: bold; | 512: font-weight: bold; |
| 509: margin: 1px 1px 0 1px; | 513: margin: 1px 1px 0 1px; |
| 510: padding-left: 8px; | 514: padding-left: 8px; |
| 511: position: absolute; | 515: position: absolute; |
| 516: left: 0; | |
| 512: white-space: nowrap; | 517: white-space: nowrap; |
| 513: z-index: 100; | 518: z-index: 100; |
| 514: } | 519: } |
| 809: | 814: |
| 810: .pun .blockpost .postfootright li { | 815: .pun .blockpost .postfootright li { |
| 811: display: inline; | 816: display: inline; |
| 812: } | 817: } |
| 813: | 818: |
| 814: .pun .blockpost .postfootright li span { | 819: .pun .blockpost .postfootright li span { |
| 815: display: inline-block; | 820: display: inline-block; |
| 816: padding-left: 16px; | 821: padding-left: 16px; |
| a/style/Fire.css | b/style/Fire.css |
|---|---|
| 279: #brdmenu a:link, #brdmenu a:visited { | 279: #brdmenu a:link, #brdmenu a:visited { |
| 280: border-right-style: solid; | 280: border-right-style: solid; |
| 281: border-width: 1px; | 281: border-width: 1px; |
| 282: display: inline-block; | 282: display: block; |
| 283: min-width: 60px; | 283: min-width: 60px; |
| 284: padding: 12px 16px 6px 8px; | 284: padding: 12px 16px 6px 8px; |
| 285: white-space: nowrap; | 285: white-space: nowrap; |
| 503: 4. MAIN TABLES | 503: 4. MAIN TABLES |
| 504: *****************************************************************/ | 504: *****************************************************************/ |
| 505: | 505: |
| 506: .pun #brdmain .blocktable { | |
| 507: position: relative; | |
| 508: } | |
| 509: | |
| 506: #punindex #brdmain .blocktable h2, #punsearch #vf h2 { | 510: #punindex #brdmain .blocktable h2, #punsearch #vf h2 { |
| 507: font: 1em/1.462em Arial, Helvetica, sans-serif; | 511: font: 1em/1.462em Arial, Helvetica, sans-serif; |
| 508: font-weight: bold; | 512: font-weight: bold; |
| 509: margin: 1px 1px 0 1px; | 513: margin: 1px 1px 0 1px; |
| 510: padding-left: 8px; | 514: padding-left: 8px; |
| 511: position: absolute; | 515: position: absolute; |
| 516: left: 0; | |
| 512: white-space: nowrap; | 517: white-space: nowrap; |
| 513: z-index: 100; | 518: z-index: 100; |
| 514: } | 519: } |
| 809: | 814: |
| 810: .pun .blockpost .postfootright li { | 815: .pun .blockpost .postfootright li { |
| 811: display: inline; | 816: display: inline; |
| 812: } | 817: } |
| 813: | 818: |
| 814: .pun .blockpost .postfootright li span { | 819: .pun .blockpost .postfootright li span { |
| 815: display: inline-block; | 820: display: inline-block; |
| 816: padding-left: 16px; | 821: padding-left: 16px; |