punbb-1.3/admin/bans.php |
punbb-1.3.4/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: */ |
134: // Setup breadcrumbs | 134: // Setup breadcrumbs |
135: $forum_page['crumbs'] = array( | 135: $forum_page['crumbs'] = array( |
136: array($forum_config['o_board_title'], forum_link($forum_url['index'])), | 136: array($forum_config['o_board_title'], forum_link($forum_url['index'])), |
137: array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])), | 137: array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])) |
138: array($lang_admin_common['Users'], forum_link($forum_url['admin_users'])), | |
139: array($lang_admin_common['Bans'], forum_link($forum_url['admin_bans'])), | |
140: $lang_admin_bans['Ban advanced'] | |
141: ); | 138: ); |
| 139: if ($forum_user['g_id'] == FORUM_ADMIN) |
| 140: $forum_page['crumbs'][] = array($lang_admin_common['Users'], forum_link($forum_url['admin_users'])); |
| 141: $forum_page['crumbs'][] = array($lang_admin_common['Bans'], forum_link($forum_url['admin_bans'])); |
| 142: $forum_page['crumbs'][] = $lang_admin_bans['Ban advanced']; |
142: | 143: |
143: ($hook = get_hook('aba_add_edit_ban_pre_header_load')) ? eval($hook) : null; | 144: ($hook = get_hook('aba_add_edit_ban_pre_header_load')) ? eval($hook) : null; |
144: | 145: |
156: <h2 class="hn"><span><?php echo $lang_admin_bans['Ban advanced heading'] ?></span></h2> | 157: <h2 class="hn"><span><?php echo $lang_admin_bans['Ban advanced heading'] ?></span></h2> |
157: </div> | 158: </div> |
158: <div class="main-content main-frm"> | 159: <div class="main-content main-frm"> |
159: <div class="ct-box"> | 160: <div class="ct-box warn-box"> |
160: <p class="warn"><?php echo $lang_admin_bans['Ban IP warning'] ?></p> | 161: <p class="warn"><?php echo $lang_admin_bans['Ban IP warning'] ?></p> |
161: </div> | 162: </div> |
162: <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo forum_link($forum_url['admin_bans']) ?>"> | 163: <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo forum_link($forum_url['admin_bans']) ?>"> |
163: <div class="hidden"> | 164: <div class="hidden"> |
164: <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(forum_link($forum_url['admin_bans'])) ?>" /> | 165: <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(forum_link($forum_url['admin_bans'])) ?>" /> |
165: <input type="hidden" name="mode" value="<?php echo $mode ?>" /> | 166: <input type="hidden" name="mode" value="<?php echo $mode ?>" /> |
166: <?php if ($mode == 'edit'): ?> <input type="hidden" name="ban_id" value="<?php echo $ban_id ?>" /> | 167: <?php if ($mode == 'edit'): ?> |
167: <?php endif; ?> </div> | 168: <input type="hidden" name="ban_id" value="<?php echo $ban_id ?>" /> |
| 169: <?php endif; ?> |
| 170: </div> |
168: <?php ($hook = get_hook('aba_add_edit_ban_pre_criteria_fieldset')) ? eval($hook) : null; ?> | 171: <?php ($hook = get_hook('aba_add_edit_ban_pre_criteria_fieldset')) ? eval($hook) : null; ?> |
169: <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>"> | 172: <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>"> |
170: <legend class="group-legend"><span><?php echo $lang_admin_bans['Ban criteria legend'] ?></span></legend> | 173: <legend class="group-legend"><span><?php echo $lang_admin_bans['Ban criteria legend'] ?></span></legend> |
390: // Setup breadcrumbs | 393: // Setup breadcrumbs |
391: $forum_page['crumbs'] = array( | 394: $forum_page['crumbs'] = array( |
392: array($forum_config['o_board_title'], forum_link($forum_url['index'])), | 395: array($forum_config['o_board_title'], forum_link($forum_url['index'])), |
393: array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])), | 396: array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])) |
394: array($lang_admin_common['Users'], forum_link($forum_url['admin_users'])), | |
395: array($lang_admin_common['Bans'], forum_link($forum_url['admin_bans'])) | |
396: ); | 397: ); |
| 398: if ($forum_user['g_id'] == FORUM_ADMIN) |
| 399: $forum_page['crumbs'][] = array($lang_admin_common['Users'], forum_link($forum_url['admin_users'])); |
| 400: $forum_page['crumbs'][] = array($lang_admin_common['Bans'], forum_link($forum_url['admin_bans'])); |
| 401: |
397: | 402: |
398: ($hook = get_hook('aba_pre_header_load')) ? eval($hook) : null; | 403: ($hook = get_hook('aba_pre_header_load')) ? eval($hook) : null; |
399: | 404: |
481: <h3 class=""><span><?php printf($lang_admin_bans['Current ban head'], $forum_page['ban_creator']) ?></span></h3> | 486: <h3 class=""><span><?php printf($lang_admin_bans['Current ban head'], $forum_page['ban_creator']) ?></span></h3> |
482: <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> | 487: <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> |
483: </div> | 488: </div> |
484: <?php if (!empty($forum_page['ban_info'])): ?> <ul> | 489: <?php if (!empty($forum_page['ban_info'])): ?> |
| 490: <ul> |
485: <?php echo implode("\n", $forum_page['ban_info'])."\n" ?> | 491: <?php echo implode("\n", $forum_page['ban_info'])."\n" ?> |
486: </ul> | 492: </ul> |
487: <?php endif; ?> </div> | 493: <?php endif; ?> |
| 494: </div> |
488: </div> | 495: </div> |
489: <?php | 496: <?php |
490: | 497: |
punbb-1.3/admin/db_update.php |
punbb-1.3.4/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'); | 13: define('UPDATE_TO', '1.3.4'); |
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); |
284: $seems_utf8 = true; | 285: $seems_utf8 = true; |
285: | 286: |
286: $query = array( | 287: $query = array( |
287: 'SELECT' => 'MIN(id), MAX(id)', | 288: 'SELECT' => 'MIN(id), MAX(id), COUNT(id)', |
288: 'FROM' => 'posts' | 289: 'FROM' => 'posts' |
289: ); | 290: ); |
290: | 291: |
291: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); | 292: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
292: list($min_id, $max_id) = $forum_db->fetch_row($result); | 293: list($min_id, $max_id, $count_id) = $forum_db->fetch_row($result); |
| 294: |
| 295: if ($count_id == 0) |
| 296: return false; |
293: | 297: |
294: // Get a random soup of data and check if it appears to be UTF-8 | 298: // Get a random soup of data and check if it appears to be UTF-8 |
295: for ($i = 0; $i < 100; ++$i) | 299: for ($i = 0; $i < 100; ++$i) |
408: <div id="brd-main" class="main basic"> | 412: <div id="brd-main" class="main basic"> |
409: | 413: |
410: <div class="main-head"> | 414: <div class="main-head"> |
411: <h1 class="hn"><span>PunBB Database Update : Perform update of database tables</span></h1> | 415: <h1 class="hn"><span>PunBB Database Update: Perform update of database tables</span></h1> |
412: </div> | 416: </div> |
413: | 417: |
414: <div class="main-content frm"> | 418: <div class="main-content frm"> |
416: <ul class="spaced"> | 420: <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> | 421: <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> | 422: <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> | 423: <li><span>Did you read the update instructions in the documentation? If not, start there.</span></li> |
420: <?php | 424: <?php |
421: | 425: |
422: if (strpos($cur_version, '1.2') === 0 && (!$db_seems_utf8 || isset($_GET['force']))) | 426: if (strpos($cur_version, '1.2') === 0 && (!$db_seems_utf8 || isset($_GET['force']))) |
725: | 729: |
726: // Make all IP fields VARCHAR(39) to support IPv6 | 730: // Make all IP fields VARCHAR(39) to support IPv6 |
727: $forum_db->alter_field('posts', 'poster_ip', 'VARCHAR(39)', true); | 731: $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'); | 732: $forum_db->alter_field('users', 'registration_ip', 'VARCHAR(39)', false, '0.0.0.0'); |
729: | 733: |
730: // Add the DST option to the users table | 734: // Add the DST option to the users table |
731: $forum_db->add_field('users', 'dst', 'TINYINT(1)', false, 0, 'timezone'); | 735: $forum_db->add_field('users', 'dst', 'TINYINT(1)', false, 0, 'timezone'); |
1222: $forum_db->set_names('utf8'); | 1226: $forum_db->set_names('utf8'); |
1223: | 1227: |
1224: // Convert config | 1228: // Convert config |
1225: echo 'Converting configuration …'."<br />\n"; | 1229: echo 'Converting configuration…'."<br />\n"; |
1226: foreach ($forum_config as $conf_name => $conf_value) | 1230: foreach ($forum_config as $conf_name => $conf_value) |
1227: { | 1231: { |
1228: if (convert_to_utf8($conf_value, $old_charset)) | 1232: if (convert_to_utf8($conf_value, $old_charset)) |
1238: } | 1242: } |
1239: | 1243: |
1240: // Convert categories | 1244: // Convert categories |
1241: echo 'Converting categories …'."<br />\n"; | 1245: echo 'Converting categories…'."<br />\n"; |
1242: $query = array( | 1246: $query = array( |
1243: 'SELECT' => 'id, cat_name', | 1247: 'SELECT' => 'id, cat_name', |
1244: 'FROM' => 'categories', | 1248: 'FROM' => 'categories', |
1261: } | 1265: } |
1262: | 1266: |
1263: // Convert forums | 1267: // Convert forums |
1264: echo 'Converting forums …'."<br />\n"; | 1268: echo 'Converting forums…'."<br />\n"; |
1265: $query = array( | 1269: $query = array( |
1266: 'SELECT' => 'id, forum_name, forum_desc, moderators', | 1270: 'SELECT' => 'id, forum_name, forum_desc, moderators', |
1267: 'FROM' => 'forums', | 1271: 'FROM' => 'forums', |
1295: } | 1299: } |
1296: | 1300: |
1297: // Convert groups | 1301: // Convert groups |
1298: echo 'Converting groups …'."<br />\n"; | 1302: echo 'Converting groups…'."<br />\n"; |
1299: $query = array( | 1303: $query = array( |
1300: 'SELECT' => 'g_id, g_title, g_user_title', | 1304: 'SELECT' => 'g_id, g_title, g_user_title', |
1301: 'FROM' => 'groups', | 1305: 'FROM' => 'groups', |
1320: } | 1324: } |
1321: | 1325: |
1322: // Convert ranks | 1326: // Convert ranks |
1323: echo 'Converting ranks …'."<br />\n"; | 1327: echo 'Converting ranks…'."<br />\n"; |
1324: $query = array( | 1328: $query = array( |
1325: 'SELECT' => 'id, rank', | 1329: 'SELECT' => 'id, rank', |
1326: 'FROM' => 'ranks', | 1330: 'FROM' => 'ranks', |
1343: } | 1347: } |
1344: | 1348: |
1345: // Convert censor words | 1349: // Convert censor words |
1346: echo 'Converting censor words …'."<br />\n"; | 1350: echo 'Converting censor words…'."<br />\n"; |
1347: $query = array( | 1351: $query = array( |
1348: 'SELECT' => 'id, search_for, replace_with', | 1352: 'SELECT' => 'id, search_for, replace_with', |
1349: 'FROM' => 'censoring', | 1353: 'FROM' => 'censoring', |
1408: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); | 1412: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
1409: while ($cur_item = $forum_db->fetch_assoc($result)) | 1413: while ($cur_item = $forum_db->fetch_assoc($result)) |
1410: { | 1414: { |
1411: echo 'Converting report '.$cur_item['id'].' …<br />'."\n"; | 1415: echo 'Converting report '.$cur_item['id'].'…<br />'."\n"; |
1412: if (convert_to_utf8($cur_item['message'], $old_charset)) | 1416: if (convert_to_utf8($cur_item['message'], $old_charset)) |
1413: { | 1417: { |
1414: $query = array( | 1418: $query = array( |
1477: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); | 1481: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
1478: while ($cur_item = $forum_db->fetch_assoc($result)) | 1482: while ($cur_item = $forum_db->fetch_assoc($result)) |
1479: { | 1483: { |
1480: echo 'Converting search word '.$cur_item['id'].' …<br />'."\n"; | 1484: echo 'Converting search word '.$cur_item['id'].'…<br />'."\n"; |
1481: if (convert_to_utf8($cur_item['word'], $old_charset)) | 1485: if (convert_to_utf8($cur_item['word'], $old_charset)) |
1482: { | 1486: { |
1483: $query = array( | 1487: $query = array( |
1535: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); | 1539: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
1536: while ($cur_item = $forum_db->fetch_assoc($result)) | 1540: while ($cur_item = $forum_db->fetch_assoc($result)) |
1537: { | 1541: { |
1538: echo 'Converting user '.$cur_item['id'].' …<br />'."\n"; | 1542: echo 'Converting user '.$cur_item['id'].'…<br />'."\n"; |
1539: if (convert_to_utf8($cur_item['username'], $old_charset) | convert_to_utf8($cur_item['title'], $old_charset) | convert_to_utf8($cur_item['realname'], $old_charset) | convert_to_utf8($cur_item['location'], $old_charset) | convert_to_utf8($cur_item['signature'], $old_charset) | convert_to_utf8($cur_item['admin_note'], $old_charset)) | 1543: if (convert_to_utf8($cur_item['username'], $old_charset) | convert_to_utf8($cur_item['title'], $old_charset) | convert_to_utf8($cur_item['realname'], $old_charset) | convert_to_utf8($cur_item['location'], $old_charset) | convert_to_utf8($cur_item['signature'], $old_charset) | convert_to_utf8($cur_item['admin_note'], $old_charset)) |
1540: { | 1544: { |
1541: $cur_item['title'] = $cur_item['title'] != '' ? '\''.$forum_db->escape($cur_item['title']).'\'' : 'NULL'; | 1545: $cur_item['title'] = $cur_item['title'] != '' ? '\''.$forum_db->escape($cur_item['title']).'\'' : 'NULL'; |
1610: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); | 1614: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
1611: while ($cur_item = $forum_db->fetch_assoc($result)) | 1615: while ($cur_item = $forum_db->fetch_assoc($result)) |
1612: { | 1616: { |
1613: echo 'Converting topic '.$cur_item['id'].' …<br />'."\n"; | 1617: echo 'Converting topic '.$cur_item['id'].'…<br />'."\n"; |
1614: if (convert_to_utf8($cur_item['poster'], $old_charset) | convert_to_utf8($cur_item['subject'], $old_charset) | convert_to_utf8($cur_item['last_poster'], $old_charset)) | 1618: if (convert_to_utf8($cur_item['poster'], $old_charset) | convert_to_utf8($cur_item['subject'], $old_charset) | convert_to_utf8($cur_item['last_poster'], $old_charset)) |
1615: { | 1619: { |
1616: $query = array( | 1620: $query = array( |
1679: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); | 1683: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
1680: while ($cur_item = $forum_db->fetch_assoc($result)) | 1684: while ($cur_item = $forum_db->fetch_assoc($result)) |
1681: { | 1685: { |
1682: echo 'Converting post '.$cur_item['id'].' …<br />'."\n"; | 1686: echo 'Converting post '.$cur_item['id'].'…<br />'."\n"; |
1683: if (convert_to_utf8($cur_item['poster'], $old_charset) | convert_to_utf8($cur_item['message'], $old_charset) | convert_to_utf8($cur_item['edited_by'], $old_charset)) | 1687: if (convert_to_utf8($cur_item['poster'], $old_charset) | convert_to_utf8($cur_item['message'], $old_charset) | convert_to_utf8($cur_item['edited_by'], $old_charset)) |
1684: { | 1688: { |
1685: $cur_item['edited_by'] = $cur_item['edited_by'] != '' ? '\''.$forum_db->escape($cur_item['edited_by']).'\'' : 'NULL'; | 1689: $cur_item['edited_by'] = $cur_item['edited_by'] != '' ? '\''.$forum_db->escape($cur_item['edited_by']).'\'' : 'NULL'; |
1716: // Do the cumbersome charset conversion of MySQL tables/columns | 1720: // Do the cumbersome charset conversion of MySQL tables/columns |
1717: if ($db_type == 'mysql' || $db_type == 'mysqli') | 1721: if ($db_type == 'mysql' || $db_type == 'mysqli') |
1718: { | 1722: { |
1719: echo 'Converting table '.$forum_db->prefix.'bans …<br />'."\n"; flush(); | 1723: echo 'Converting table '.$forum_db->prefix.'bans…<br />'."\n"; flush(); |
1720: convert_table_utf8($forum_db->prefix.'bans'); | 1724: convert_table_utf8($forum_db->prefix.'bans'); |
1721: echo 'Converting table '.$forum_db->prefix.'categories …<br />'."\n"; flush(); | 1725: echo 'Converting table '.$forum_db->prefix.'categories…<br />'."\n"; flush(); |
1722: convert_table_utf8($forum_db->prefix.'categories'); | 1726: convert_table_utf8($forum_db->prefix.'categories'); |
1723: echo 'Converting table '.$forum_db->prefix.'censoring …<br />'."\n"; flush(); | 1727: echo 'Converting table '.$forum_db->prefix.'censoring…<br />'."\n"; flush(); |
1724: convert_table_utf8($forum_db->prefix.'censoring'); | 1728: convert_table_utf8($forum_db->prefix.'censoring'); |
1725: echo 'Converting table '.$forum_db->prefix.'config …<br />'."\n"; flush(); | 1729: echo 'Converting table '.$forum_db->prefix.'config…<br />'."\n"; flush(); |
1726: convert_table_utf8($forum_db->prefix.'config'); | 1730: convert_table_utf8($forum_db->prefix.'config'); |
1727: echo 'Converting table '.$forum_db->prefix.'extension_hooks …<br />'."\n"; flush(); | 1731: echo 'Converting table '.$forum_db->prefix.'extension_hooks…<br />'."\n"; flush(); |
1728: convert_table_utf8($forum_db->prefix.'extension_hooks'); | 1732: convert_table_utf8($forum_db->prefix.'extension_hooks'); |
1729: echo 'Converting table '.$forum_db->prefix.'extensions …<br />'."\n"; flush(); | 1733: echo 'Converting table '.$forum_db->prefix.'extensions…<br />'."\n"; flush(); |
1730: convert_table_utf8($forum_db->prefix.'extensions'); | 1734: convert_table_utf8($forum_db->prefix.'extensions'); |
1731: echo 'Converting table '.$forum_db->prefix.'forum_perms …<br />'."\n"; flush(); | 1735: echo 'Converting table '.$forum_db->prefix.'forum_perms…<br />'."\n"; flush(); |
1732: convert_table_utf8($forum_db->prefix.'forum_perms'); | 1736: convert_table_utf8($forum_db->prefix.'forum_perms'); |
1733: echo 'Converting table '.$forum_db->prefix.'forums …<br />'."\n"; flush(); | 1737: echo 'Converting table '.$forum_db->prefix.'forums…<br />'."\n"; flush(); |
1734: convert_table_utf8($forum_db->prefix.'forums'); | 1738: convert_table_utf8($forum_db->prefix.'forums'); |
1735: echo 'Converting table '.$forum_db->prefix.'groups …<br />'."\n"; flush(); | 1739: echo 'Converting table '.$forum_db->prefix.'groups…<br />'."\n"; flush(); |
1736: convert_table_utf8($forum_db->prefix.'groups'); | 1740: convert_table_utf8($forum_db->prefix.'groups'); |
1737: echo 'Converting table '.$forum_db->prefix.'online …<br />'."\n"; flush(); | 1741: echo 'Converting table '.$forum_db->prefix.'online…<br />'."\n"; flush(); |
1738: convert_table_utf8($forum_db->prefix.'online'); | 1742: convert_table_utf8($forum_db->prefix.'online'); |
1739: echo 'Converting table '.$forum_db->prefix.'posts …<br />'."\n"; flush(); | 1743: echo 'Converting table '.$forum_db->prefix.'posts…<br />'."\n"; flush(); |
1740: convert_table_utf8($forum_db->prefix.'posts'); | 1744: convert_table_utf8($forum_db->prefix.'posts'); |
1741: echo 'Converting table '.$forum_db->prefix.'ranks …<br />'."\n"; flush(); | 1745: echo 'Converting table '.$forum_db->prefix.'ranks…<br />'."\n"; flush(); |
1742: convert_table_utf8($forum_db->prefix.'ranks'); | 1746: convert_table_utf8($forum_db->prefix.'ranks'); |
1743: echo 'Converting table '.$forum_db->prefix.'reports …<br />'."\n"; flush(); | 1747: echo 'Converting table '.$forum_db->prefix.'reports…<br />'."\n"; flush(); |
1744: convert_table_utf8($forum_db->prefix.'reports'); | 1748: convert_table_utf8($forum_db->prefix.'reports'); |
1745: echo 'Converting table '.$forum_db->prefix.'search_cache …<br />'."\n"; flush(); | 1749: echo 'Converting table '.$forum_db->prefix.'search_cache…<br />'."\n"; flush(); |
1746: convert_table_utf8($forum_db->prefix.'search_cache'); | 1750: convert_table_utf8($forum_db->prefix.'search_cache'); |
1747: echo 'Converting table '.$forum_db->prefix.'search_matches …<br />'."\n"; flush(); | 1751: echo 'Converting table '.$forum_db->prefix.'search_matches…<br />'."\n"; flush(); |
1748: convert_table_utf8($forum_db->prefix.'search_matches'); | 1752: convert_table_utf8($forum_db->prefix.'search_matches'); |
1749: echo 'Converting table '.$forum_db->prefix.'search_words …<br />'."\n"; flush(); | 1753: echo 'Converting table '.$forum_db->prefix.'search_words…<br />'."\n"; flush(); |
1750: convert_table_utf8($forum_db->prefix.'search_words'); | 1754: convert_table_utf8($forum_db->prefix.'search_words'); |
1751: echo 'Converting table '.$forum_db->prefix.'subscriptions …<br />'."\n"; flush(); | 1755: echo 'Converting table '.$forum_db->prefix.'subscriptions…<br />'."\n"; flush(); |
1752: convert_table_utf8($forum_db->prefix.'subscriptions'); | 1756: convert_table_utf8($forum_db->prefix.'subscriptions'); |
1753: echo 'Converting table '.$forum_db->prefix.'topics …<br />'."\n"; flush(); | 1757: echo 'Converting table '.$forum_db->prefix.'topics…<br />'."\n"; flush(); |
1754: convert_table_utf8($forum_db->prefix.'topics'); | 1758: convert_table_utf8($forum_db->prefix.'topics'); |
1755: echo 'Converting table '.$forum_db->prefix.'users …<br />'."\n"; flush(); | 1759: echo 'Converting table '.$forum_db->prefix.'users…<br />'."\n"; flush(); |
1756: convert_table_utf8($forum_db->prefix.'users'); | 1760: convert_table_utf8($forum_db->prefix.'users'); |
1757: } | 1761: } |
1758: | 1762: |
1794: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); | 1798: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
1795: while ($cur_item = $forum_db->fetch_assoc($result)) | 1799: while ($cur_item = $forum_db->fetch_assoc($result)) |
1796: { | 1800: { |
1797: echo 'Preparsing post '.$cur_item['id'].' …<br />'."\n"; | 1801: echo 'Preparsing post '.$cur_item['id'].'…<br />'."\n"; |
1798: $preparse_errors = array(); | 1802: $preparse_errors = array(); |
1799: | 1803: |
1800: $query = array( | 1804: $query = array( |
1847: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); | 1851: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
1848: while ($cur_item = $forum_db->fetch_assoc($result)) | 1852: while ($cur_item = $forum_db->fetch_assoc($result)) |
1849: { | 1853: { |
1850: echo 'Preparsing signature '.$cur_item['id'].' …<br />'."\n"; | 1854: echo 'Preparsing signature '.$cur_item['id'].'…<br />'."\n"; |
1851: $preparse_errors = array(); | 1855: $preparse_errors = array(); |
1852: | 1856: |
1853: $query = array( | 1857: $query = array( |
1991: <div class="main-content frm"> | 1995: <div class="main-content frm"> |
1992: <div class="ct-box info-box"> | 1996: <div class="ct-box info-box"> |
1993: <p>Your forum database was updated successfully.</p> | 1997: <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> | 1998: <?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> | 1999: <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> |
| 2000: <?php else: ?> |
| 2001: <p>You may <a href="<?php echo $base_url ?>/index.php">go to the forum index</a> now.</p> |
1996: <?php endif; ?> </div> | 2002: <?php endif; ?> </div> |
1997: <?php if (isset($new_config) && !$written): ?> <form class="frm-form" action="foo"> | 2003: <?php if (isset($new_config) && !$written): ?> |
| 2004: <form class="frm-form" action="foo"> |
1998: <fieldset class="frm-group group1"> | 2005: <fieldset class="frm-group group1"> |
1999: <legend class="group-legend"><span>New config.php contents</span></legend> | 2006: <legend class="group-legend"><span>New config.php contents</span></legend> |
2000: <div class="txt-set set1"> | 2007: <div class="txt-set set1"> |
punbb-1.3/admin/install.php |
punbb-1.3.4/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-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('FORUM_VERSION', '1.3'); | 13: define('FORUM_VERSION', '1.3.4'); |
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: |
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: { |
147: if (count($languages) > 1) | 149: if (count($languages) > 1) |
148: { | 150: { |
149: | 151: |
150: ?> | 152: ?> <form class="frm-form" method="get" accept-charset="utf-8" action="install.php"> |
151: <form class="frm-form" method="get" accept-charset="utf-8" action="install.php"> | |
152: <div class="main-subhead"> | 153: <div class="main-subhead"> |
153: <h2 class="hn"><span><?php echo $lang_install['Choose language'] ?></span></h2> | 154: <h2 class="hn"><span><?php echo $lang_install['Choose language'] ?></span></h2> |
154: </div> | 155: </div> |
164: foreach ($languages as $lang) | 165: foreach ($languages as $lang) |
165: echo "\t\t\t\t\t".'<option value="'.$lang.'"'.($language == $lang ? ' selected="selected"' : '').'>'.$lang.'</option>'."\n"; | 166: echo "\t\t\t\t\t".'<option value="'.$lang.'"'.($language == $lang ? ' selected="selected"' : '').'>'.$lang.'</option>'."\n"; |
166: | 167: |
167: ?> | 168: ?> </select></span> |
168: </select></span> | |
169: </div> | 169: </div> |
170: </div> | 170: </div> |
171: </fieldset> | 171: </fieldset> |
178: | 178: |
179: } | 179: } |
180: | 180: |
181: ?> | 181: ?> <form class="frm-form" method="post" accept-charset="utf-8" action="install.php"> |
182: <form class="frm-form" method="post" accept-charset="utf-8" action="install.php"> | |
183: <div class="hidden"> | 182: <div class="hidden"> |
184: <input type="hidden" name="form_sent" value="1" /> | 183: <input type="hidden" name="form_sent" value="1" /> |
185: </div> | 184: </div> |
211: foreach ($db_extensions as $db_type) | 210: foreach ($db_extensions as $db_type) |
212: echo "\t\t\t\t\t".'<option value="'.$db_type[0].'">'.$db_type[1].'</option>'."\n"; | 211: echo "\t\t\t\t\t".'<option value="'.$db_type[0].'">'.$db_type[1].'</option>'."\n"; |
213: | 212: |
214: ?> | 213: ?> </select></span> |
215: </select></span> | |
216: </div> | 214: </div> |
217: </div> | 215: </div> |
218: <div class="sf-set set1"> | 216: <div class="sf-set set1"> |
318: | 316: |
319: if (count($languages) > 1) | 317: if (count($languages) > 1) |
320: { | 318: { |
321: ?> | 319: |
322: <div class="sf-set set4"> | 320: ?> <div class="sf-set set4"> |
323: <div class="sf-box text"> | 321: <div class="sf-box text"> |
324: <label for="fld14"><span><?php echo $lang_install['Default language'] ?></span> <small><?php echo $lang_install['Default language help'] ?></small></label><br /> | 322: <label for="fld14"><span><?php echo $lang_install['Default language'] ?></span> <small><?php echo $lang_install['Default language help'] ?></small></label><br /> |
325: <span class="fld-input"><select id="fld14" name="req_language"> | 323: <span class="fld-input"><select id="fld14" name="req_language"> |
328: foreach ($languages as $lang) | 326: foreach ($languages as $lang) |
329: echo "\t\t\t\t\t".'<option value="'.$lang.'"'.($language == $lang ? ' selected="selected"' : '').'>'.$lang.'</option>'."\n"; | 327: echo "\t\t\t\t\t".'<option value="'.$lang.'"'.($language == $lang ? ' selected="selected"' : '').'>'.$lang.'</option>'."\n"; |
330: | 328: |
331: ?> | 329: ?> </select></span> |
332: </select></span> | |
333: </div> | 330: </div> |
334: </div> | 331: </div> |
335: <?php | 332: <?php |
| 333: |
336: } | 334: } |
337: else | 335: else |
338: { | 336: { |
339: ?> | 337: |
340: <div class="hidden"> | 338: ?> <div class="hidden"> |
341: <input type="hidden" name="req_language" value="<?php echo $languages[0]; ?>" /> | 339: <input type="hidden" name="req_language" value="<?php echo $languages[0]; ?>" /> |
342: </div> | 340: </div> |
343: <?php | 341: <?php |
344: } | 342: } |
345: | 343: |
346: ?> | 344: if (file_exists(FORUM_ROOT.'extensions/pun_repository/manifest.xml')) |
347: <div class="sf-set set5"> | 345: { |
| 346: |
| 347: ?> <div class="sf-set set5"> |
348: <div class="sf-box checkbox"> | 348: <div class="sf-box checkbox"> |
349: <span class="fld-input"><input id="fld15" type="checkbox" name="install_pun_repository" value="1" checked="checked" /></span> | 349: <span class="fld-input"><input id="fld15" type="checkbox" name="install_pun_repository" value="1" checked="checked" /></span> |
350: <label for="fld15"><span><?php echo $lang_install['Pun repository'] ?></span> <?php echo $lang_install['Pun repository help'] ?></label><br /> | 350: <label for="fld15"><span><?php echo $lang_install['Pun repository'] ?></span> <?php echo $lang_install['Pun repository help'] ?></label><br /> |
351: </div> | 351: </div> |
352: </div> | 352: </div> |
| 353: <?php |
| 354: |
| 355: } |
| 356: |
| 357: ?> |
353: </fieldset> | 358: </fieldset> |
354: <div class="frm-buttons"> | 359: <div class="frm-buttons"> |
355: <span class="submit"><input type="submit" name="start" value="<?php echo $lang_install['Start install'] ?>" /></span> | 360: <span class="submit"><input type="submit" name="start" value="<?php echo $lang_install['Start install'] ?>" /></span> |
456: break; | 461: break; |
457: | 462: |
458: default: | 463: default: |
459: error(sprintf($lang_install['No such database type'], $db_type)); | 464: error(sprintf($lang_install['No such database type'], forum_htmlencode($db_type))); |
460: } | 465: } |
461: | 466: |
462: // Create the database object (and connect/select db) | 467: // Create the database object (and connect/select db) |
1743: $alerts = array(); | 1748: $alerts = array(); |
1744: // Check if the cache directory is writable | 1749: // Check if the cache directory is writable |
1745: if (!is_writable('./cache/')) | 1750: if (!is_writable('./cache/')) |
1746: $alerts[] = '<li>'.$lang_install['No cache write'].'</li>'; | 1751: $alerts[] = '<li><span>'.$lang_install['No cache write'].'</span></li>'; |
1747: | 1752: |
1748: // Check if default avatar directory is writable | 1753: // Check if default avatar directory is writable |
1749: if (!is_writable('./img/avatars/')) | 1754: if (!is_writable('./img/avatars/')) |
1750: $alerts[] = '<li>'.$lang_install['No avatar write'].'</li>'; | 1755: $alerts[] = '<li><span>'.$lang_install['No avatar write'].'</span></li>'; |
1751: | 1756: |
1752: // Check if we disabled uploading avatars because file_uploads was disabled | 1757: // Check if we disabled uploading avatars because file_uploads was disabled |
1753: if ($avatars == '0') | 1758: if ($avatars == '0') |
1754: $alerts[] = '<li>'.$lang_install['File upload alert'].'</li>'; | 1759: $alerts[] = '<li><span>'.$lang_install['File upload alert'].'</span></li>'; |
1755: | 1760: |
1756: // Add some random bytes at the end of the cookie name to prevent collisions | 1761: // Add some random bytes at the end of the cookie name to prevent collisions |
1757: $cookie_name = 'forum_cookie_'.random_key(6, false, true); | 1762: $cookie_name = 'forum_cookie_'.random_key(6, false, true); |
1819: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | 1824: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
1820: <title>PunBB Installation</title> | 1825: <title>PunBB Installation</title> |
1821: <link rel="stylesheet" type="text/css" href="<?php echo FORUM_ROOT ?>style/Oxygen/Oxygen.css" /> | 1826: <link rel="stylesheet" type="text/css" href="<?php echo FORUM_ROOT ?>style/Oxygen/Oxygen.css" /> |
1822: <link rel="stylesheet" type="text/css" href="<?php echo FORUM_ROOT ?>style/Oxygen/Oxygen_forms.css" /> | |
1823: <link rel="stylesheet" type="text/css" href="<?php echo FORUM_ROOT ?>style/Oxygen/Oxygen_cs.css" /> | 1827: <link rel="stylesheet" type="text/css" href="<?php echo FORUM_ROOT ?>style/Oxygen/Oxygen_cs.css" /> |
1824: <!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="<?php echo FORUM_ROOT ?>style/Oxygen/Oxygen_ie.css" /><![endif]--> | 1828: <!--[if lte IE 6]><link rel="stylesheet" type="text/css" href="<?php echo FORUM_ROOT ?>style/Oxygen/Oxygen_ie6.css" /><![endif]--> |
| 1829: <!--[if IE 7]><link rel="stylesheet" type="text/css" href="<?php echo FORUM_ROOT ?>style/Oxygen/Oxygen_ie7.css" /><![endif]--> |
1825: </head> | 1830: </head> |
1826: | 1831: |
1827: <body> | 1832: <body> |
1854: { | 1859: { |
1855: | 1860: |
1856: ?> | 1861: ?> |
1857: <div class="ct-box warn-box"> | 1862: <div class="ct-box info-box"> |
1858: <p class="warn"><?php echo $lang_install['No write info 1'] ?></p> | 1863: <p class="warn"><?php echo $lang_install['No write info 1'] ?></p> |
1859: <p class="warn"><?php printf($lang_install['No write info 2'], '<a href="'.FORUM_ROOT.'index.php">'.$lang_install['Go to index'].'</a>') ?></p> | 1864: <p class="warn"><?php printf($lang_install['No write info 2'], '<a href="'.FORUM_ROOT.'index.php">'.$lang_install['Go to index'].'</a>') ?></p> |
1860: </div> | 1865: </div> |
1861: <?php if (!empty($alerts)): ?> <div class="ct-box error-box"> | 1866: <?php if (!empty($alerts)): ?> |
1862: <?php echo $lang_install['Warning'] ?></p> | 1867: <div class="ct-box error-box"> |
| 1868: <p class="warn"><strong><?php echo $lang_install['Warning'] ?></strong></p> |
1863: <ul> | 1869: <ul> |
1864: <?php echo implode("\n\t\t\t\t", $alerts)."\n" ?> | 1870: <?php echo implode("\n\t\t\t\t", $alerts)."\n" ?> |
1865: </ul> | 1871: </ul> |
1866: </div> | 1872: </div> |
1867: <?php endif; ?> <form class="frm-form" method="post" accept-charset="utf-8" action="install.php"> | 1873: <?php endif; ?> |
| 1874: <form class="frm-form" method="post" accept-charset="utf-8" action="install.php"> |
1868: <div class="hidden"> | 1875: <div class="hidden"> |
1869: <input type="hidden" name="generate_config" value="1" /> | 1876: <input type="hidden" name="generate_config" value="1" /> |
1870: <input type="hidden" name="db_type" value="<?php echo $db_type; ?>" /> | 1877: <input type="hidden" name="db_type" value="<?php echo $db_type; ?>" /> |
punbb-1.3/admin/users.php |
punbb-1.3.4/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: */ |
50: // Setup breadcrumbs | 50: // Setup breadcrumbs |
51: $forum_page['crumbs'] = array( | 51: $forum_page['crumbs'] = array( |
52: array($forum_config['o_board_title'], forum_link($forum_url['index'])), | 52: array($forum_config['o_board_title'], forum_link($forum_url['index'])), |
53: array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])), | 53: array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])) |
54: array($lang_admin_common['Users'], forum_link($forum_url['admin_users'])), | |
55: array($lang_admin_common['Searches'], forum_link($forum_url['admin_users'])), | |
56: $lang_admin_users['User search results'] | |
57: ); | 54: ); |
| 55: if ($forum_user['g_id'] == FORUM_ADMIN) |
| 56: $forum_page['crumbs'][] = array($lang_admin_common['Users'], forum_link($forum_url['admin_users'])); |
| 57: $forum_page['crumbs'][] = array($lang_admin_common['Searches'], forum_link($forum_url['admin_users'])); |
| 58: $forum_page['crumbs'][] = $lang_admin_users['User search results']; |
58: | 59: |
59: ($hook = get_hook('aus_ip_stats_pre_header_load')) ? eval($hook) : null; | 60: ($hook = get_hook('aus_ip_stats_pre_header_load')) ? eval($hook) : null; |
60: | 61: |
198: // Setup breadcrumbs | 199: // Setup breadcrumbs |
199: $forum_page['crumbs'] = array( | 200: $forum_page['crumbs'] = array( |
200: array($forum_config['o_board_title'], forum_link($forum_url['index'])), | 201: array($forum_config['o_board_title'], forum_link($forum_url['index'])), |
201: array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])), | 202: array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])) |
202: array($lang_admin_common['Users'], forum_link($forum_url['admin_users'])), | |
203: array($lang_admin_common['Searches'], forum_link($forum_url['admin_users'])), | |
204: $lang_admin_users['User search results'] | |
205: ); | 203: ); |
| 204: if ($forum_user['g_id'] == FORUM_ADMIN) |
| 205: $forum_page['crumbs'][] = array($lang_admin_common['Users'], forum_link($forum_url['admin_users'])); |
| 206: $forum_page['crumbs'][] = array($lang_admin_common['Searches'], forum_link($forum_url['admin_users'])); |
| 207: $forum_page['crumbs'][] = $lang_admin_users['User search results']; |
206: | 208: |
207: ($hook = get_hook('aus_show_users_pre_header_load')) ? eval($hook) : null; | 209: ($hook = get_hook('aus_show_users_pre_header_load')) ? eval($hook) : null; |
208: | 210: |
605: // Setup breadcrumbs | 607: // Setup breadcrumbs |
606: $forum_page['crumbs'] = array( | 608: $forum_page['crumbs'] = array( |
607: array($forum_config['o_board_title'], forum_link($forum_url['index'])), | 609: array($forum_config['o_board_title'], forum_link($forum_url['index'])), |
608: array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])), | 610: array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])) |
609: array($lang_admin_common['Users'], forum_link($forum_url['admin_users'])), | |
610: array($lang_admin_common['Searches'], forum_link($forum_url['admin_users'])), | |
611: $lang_admin_users['Ban users'] | |
612: ); | 611: ); |
| 612: if ($forum_user['g_id'] == FORUM_ADMIN) |
| 613: $forum_page['crumbs'][] = array($lang_admin_common['Users'], forum_link($forum_url['admin_users'])); |
| 614: $forum_page['crumbs'][] = array($lang_admin_common['Searches'], forum_link($forum_url['admin_users'])); |
| 615: $forum_page['crumbs'][] = $lang_admin_users['Ban users']; |
613: | 616: |
614: ($hook = get_hook('aus_ban_users_pre_header_load')) ? eval($hook) : null; | 617: ($hook = get_hook('aus_ban_users_pre_header_load')) ? eval($hook) : null; |
615: | 618: |
814: $form = $_POST['form']; | 817: $form = $_POST['form']; |
815: $form['username'] = $_POST['username']; | 818: $form['username'] = $_POST['username']; |
816: | 819: |
| 820: //Check up for order_by and direction values |
| 821: $order_by = isset($_POST['order_by']) ? forum_trim($_POST['order_by']) : null; |
| 822: $direction = isset($_POST['direction']) ? forum_trim($_POST['direction']) : null; |
| 823: if ($order_by == null || $direction == null) |
| 824: message($lang_common['Bad request']); |
| 825: 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']); |
| 827: |
817: ($hook = get_hook('aus_find_user_selected')) ? eval($hook) : null; | 828: ($hook = get_hook('aus_find_user_selected')) ? eval($hook) : null; |
818: | 829: |
819: // forum_trim() all elements in $form | 830: // forum_trim() all elements in $form |
826: $last_post_before = forum_trim($_POST['last_post_before']); | 837: $last_post_before = forum_trim($_POST['last_post_before']); |
827: $registered_after = forum_trim($_POST['registered_after']); | 838: $registered_after = forum_trim($_POST['registered_after']); |
828: $registered_before = forum_trim($_POST['registered_before']); | 839: $registered_before = forum_trim($_POST['registered_before']); |
829: $order_by = $_POST['order_by']; | |
830: $direction = $_POST['direction']; | |
831: $user_group = $_POST['user_group']; | 840: $user_group = $_POST['user_group']; |
832: | 841: |
833: if ((!empty($posts_greater) || !empty($posts_less)) && !ctype_digit($posts_greater.$posts_less)) | 842: if ((!empty($posts_greater) || !empty($posts_less)) && !ctype_digit($posts_greater.$posts_less)) |
888: ) | 897: ) |
889: ), | 898: ), |
890: 'WHERE' => 'u.id>1 AND '.implode(' AND ', $conditions), | 899: 'WHERE' => 'u.id>1 AND '.implode(' AND ', $conditions), |
891: 'ORDER BY' => $forum_db->escape($order_by).' '.$forum_db->escape($direction) | 900: 'ORDER BY' => $order_by.' '.$direction |
892: ); | 901: ); |
893: | 902: |
894: ($hook = get_hook('aus_find_user_qr_find_users')) ? eval($hook) : null; | 903: ($hook = get_hook('aus_find_user_qr_find_users')) ? eval($hook) : null; |
899: // Setup breadcrumbs | 908: // Setup breadcrumbs |
900: $forum_page['crumbs'] = array( | 909: $forum_page['crumbs'] = array( |
901: array($forum_config['o_board_title'], forum_link($forum_url['index'])), | 910: array($forum_config['o_board_title'], forum_link($forum_url['index'])), |
902: array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])), | 911: array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])) |
903: array($lang_admin_common['Users'], forum_link($forum_url['admin_users'])), | |
904: array($lang_admin_common['Searches'], forum_link($forum_url['admin_users'])), | |
905: $lang_admin_users['User search results'] | |
906: ); | 912: ); |
| 913: if ($forum_user['g_id'] == FORUM_ADMIN) |
| 914: $forum_page['crumbs'][] = array($lang_admin_common['Users'], forum_link($forum_url['admin_users'])); |
| 915: $forum_page['crumbs'][] = array($lang_admin_common['Searches'], forum_link($forum_url['admin_users'])); |
| 916: $forum_page['crumbs'][] = $lang_admin_users['User search results']; |
907: | 917: |
908: ($hook = get_hook('aus_find_user_pre_header_load')) ? eval($hook) : null; | 918: ($hook = get_hook('aus_find_user_pre_header_load')) ? eval($hook) : null; |
909: | 919: |
1071: | 1081: |
1072: // Setup form | 1082: // Setup form |
1073: $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0; | 1083: $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0; |
1074: $forum_page['form_action'] = ''; | |
1075: | 1084: |
1076: // Setup breadcrumbs | 1085: // Setup breadcrumbs |
1077: $forum_page['crumbs'] = array( | 1086: $forum_page['crumbs'] = array( |
1078: array($forum_config['o_board_title'], forum_link($forum_url['index'])), | 1087: array($forum_config['o_board_title'], forum_link($forum_url['index'])), |
1079: array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])), | 1088: array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])) |
1080: array($lang_admin_common['Users'], forum_link($forum_url['admin_users'])), | |
1081: array($lang_admin_common['Searches'], forum_link($forum_url['admin_users'])), | |
1082: ); | 1089: ); |
| 1090: if ($forum_user['g_id'] == FORUM_ADMIN) |
| 1091: $forum_page['crumbs'][] = array($lang_admin_common['Users'], forum_link($forum_url['admin_users'])); |
| 1092: $forum_page['crumbs'][] = array($lang_admin_common['Searches'], forum_link($forum_url['admin_users'])); |
1083: | 1093: |
1084: ($hook = get_hook('aus_search_form_pre_header_load')) ? eval($hook) : null; | 1094: ($hook = get_hook('aus_search_form_pre_header_load')) ? eval($hook) : null; |
1085: | 1095: |
punbb-1.3/extern.php |
punbb-1.3.4/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"; |
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: { |
253: if (utf8_strlen($item['title']) > FORUM_EXTERN_MAX_SUBJECT_LENGTH) | 267: if (utf8_strlen($item['title']) > FORUM_EXTERN_MAX_SUBJECT_LENGTH) |
254: $subject_truncated = forum_htmlencode(forum_trim(utf8_substr($item['title'], 0, (FORUM_EXTERN_MAX_SUBJECT_LENGTH - 5)))).' …'; | 268: $subject_truncated = forum_htmlencode(forum_trim(utf8_substr($item['title'], 0, (FORUM_EXTERN_MAX_SUBJECT_LENGTH - 5)))).'…'; |
255: else | 269: else |
256: $subject_truncated = forum_htmlencode($item['title']); | 270: $subject_truncated = forum_htmlencode($item['title']); |
257: | 271: |
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( |
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.subject, t.last_post, t.last_poster, 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( |
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['last_poster'] |
439: ), | 487: ), |
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/include/functions.php |
punbb-1.3.4/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: */ |
448: else | 448: else |
449: { | 449: { |
450: $links['search'] = '<li id="navsearch"'.((FORUM_PAGE == 'search') ? ' class="isactive"' : '').'><a href="'.forum_link($forum_url['search']).'">'.$lang_common['Search'].'</a></li>'; | 450: $links['search'] = '<li id="navsearch"'.((FORUM_PAGE == 'search') ? ' class="isactive"' : '').'><a href="'.forum_link($forum_url['search']).'">'.$lang_common['Search'].'</a></li>'; |
451: $links['profile'] = '<li id="navprofile"'.((FORUM_PAGE == 'editprofile' || FORUM_PAGE == 'viewprofile') ? ' class="isactive"' : '').'><a href="'.forum_link($forum_url['user'], $forum_user['id']).'">'.$lang_common['Profile'].'</a></li>'; | 451: $links['profile'] = '<li id="navprofile"'.((substr(FORUM_PAGE, 0, 7) == 'profile') ? ' class="isactive"' : '').'><a href="'.forum_link($forum_url['user'], $forum_user['id']).'">'.$lang_common['Profile'].'</a></li>'; |
452: $links['logout'] = '<li id="navlogout"><a href="'.forum_link($forum_url['logout'], array($forum_user['id'], generate_form_token('logout'.$forum_user['id']))).'">'.$lang_common['Logout'].'</a></li>'; | 452: $links['logout'] = '<li id="navlogout"><a href="'.forum_link($forum_url['logout'], array($forum_user['id'], generate_form_token('logout'.$forum_user['id']))).'">'.$lang_common['Logout'].'</a></li>'; |
453: $links['admin'] = '<li id="navadmin"'.((substr(FORUM_PAGE, 0, 5) == 'admin') ? ' class="isactive"' : '').'><a href="'.forum_link($forum_url['admin_index']).'">'.$lang_common['Admin'].'</a></li>'; | 453: $links['admin'] = '<li id="navadmin"'.((substr(FORUM_PAGE, 0, 5) == 'admin') ? ' class="isactive"' : '').'><a href="'.forum_link($forum_url['admin_index']).'">'.$lang_common['Admin'].'</a></li>'; |
454: } | 454: } |
631: <div id="brd-debug" class="main"> | 631: <div id="brd-debug" class="main"> |
632: | 632: |
633: <div class="main-head"> | 633: <div class="main-head"> |
634: <h2><span><?php echo $lang_common['Debug table'] ?></span></h2> | 634: <h2 class="hn"><span><?php echo $lang_common['Debug table'] ?></span></h2> |
635: </div> | 635: </div> |
636: | 636: |
637: <div class="main-content debug"> | 637: <div class="main-content debug"> |
937: function get_scheme_packs() | 937: function get_scheme_packs() |
938: { | 938: { |
939: $schemes = array(); | 939: $schemes = array(); |
940: | 940: |
941: foreach (glob(FORUM_ROOT.'include/url/*') as $dirname) | 941: if($handle = opendir(FORUM_ROOT.'include/url')) |
942: if (is_dir($dirname) && file_exists($dirname.'/forum_urls.php')) | 942: { |
943: $schemes[] = basename($dirname); | 943: while (false !== ($dirname = readdir($handle))) |
| 944: { |
| 945: $dirname = FORUM_ROOT.'include/url/'.$dirname; |
| 946: if (is_dir($dirname) && file_exists($dirname.'/forum_urls.php')) |
| 947: $schemes[] = basename($dirname); |
| 948: } |
| 949: closedir($handle); |
| 950: } |
944: | 951: |
945: ($hook = get_hook('fn_get_scheme_packs_end')) ? eval($hook) : null; | 952: ($hook = get_hook('fn_get_scheme_packs_end')) ? eval($hook) : null; |
946: | 953: |
952: function get_style_packs() | 959: function get_style_packs() |
953: { | 960: { |
954: $styles = array(); | 961: $styles = array(); |
955: | 962: |
956: foreach (glob(FORUM_ROOT.'style/*') as $dirname) | 963: if($handle = opendir(FORUM_ROOT.'style')) |
957: { | 964: { |
958: $tempname = basename($dirname); | 965: while (false !== ($dirname = readdir($handle))) |
959: if (is_dir($dirname) && file_exists($dirname.'/'.$tempname.'.php')) | 966: { |
960: $styles[] = $tempname; | 967: $dirname = FORUM_ROOT.'style/'.$dirname; |
| 968: $tempname = basename($dirname); |
| 969: if (is_dir($dirname) && file_exists($dirname.'/'.$tempname.'.php')) |
| 970: $styles[] = $tempname; |
| 971: } |
| 972: closedir($handle); |
961: } | 973: } |
962: | 974: |
963: ($hook = get_hook('fn_get_style_packs_end')) ? eval($hook) : null; | 975: ($hook = get_hook('fn_get_style_packs_end')) ? eval($hook) : null; |
971: { | 983: { |
972: $languages = array(); | 984: $languages = array(); |
973: | 985: |
974: foreach (glob(FORUM_ROOT.'lang/*') as $dirname) | 986: if($handle = opendir(FORUM_ROOT.'lang')) |
975: if (is_dir($dirname) && file_exists($dirname.'/common.php')) | 987: { |
976: $languages[] = basename($dirname); | 988: while (false !== ($dirname = readdir($handle))) |
| 989: { |
| 990: $dirname = FORUM_ROOT.'lang/'.$dirname; |
| 991: if (is_dir($dirname) && file_exists($dirname.'/common.php')) |
| 992: $languages[] = basename($dirname); |
| 993: } |
| 994: closedir($handle); |
| 995: } |
977: | 996: |
978: ($hook = get_hook('fn_get_language_packs_end')) ? eval($hook) : null; | 997: ($hook = get_hook('fn_get_language_packs_end')) ? eval($hook) : null; |
979: | 998: |
1341: | 1360: |
1342: $forum_user = $forum_db->fetch_assoc($result); | 1361: $forum_user = $forum_db->fetch_assoc($result); |
1343: | 1362: |
1344: // Update online list | 1363: if (!defined('FORUM_QUIET_VISIT')) |
1345: if (!$forum_user['logged']) | |
1346: { | 1364: { |
1347: $forum_user['logged'] = time(); | 1365: // Update online list |
1348: $forum_user['csrf_token'] = random_key(40, false, true); | 1366: if (!$forum_user['logged']) |
1349: $forum_user['prev_url'] = get_current_url(255); | 1367: { |
| 1368: $forum_user['logged'] = time(); |
| 1369: $forum_user['csrf_token'] = random_key(40, false, true); |
| 1370: $forum_user['prev_url'] = get_current_url(255); |
1350: | 1371: |
1351: // REPLACE INTO avoids a user having two rows in the online table | 1372: // REPLACE INTO avoids a user having two rows in the online table |
1352: $query = array( | 1373: $query = array( |
1353: 'REPLACE' => 'user_id, ident, logged, csrf_token', | 1374: 'REPLACE' => 'user_id, ident, logged, csrf_token', |
1354: 'INTO' => 'online', | 1375: 'INTO' => 'online', |
1355: 'VALUES' => '1, \''.$forum_db->escape($remote_addr).'\', '.$forum_user['logged'].', \''.$forum_user['csrf_token'].'\'', | 1376: 'VALUES' => '1, \''.$forum_db->escape($remote_addr).'\', '.$forum_user['logged'].', \''.$forum_user['csrf_token'].'\'', |
1356: 'UNIQUE' => 'user_id=1 AND ident=\''.$forum_db->escape($remote_addr).'\'' | 1377: 'UNIQUE' => 'user_id=1 AND ident=\''.$forum_db->escape($remote_addr).'\'' |
1357: ); | 1378: ); |
1358: | 1379: |
1359: if ($forum_user['prev_url'] != null) | 1380: if ($forum_user['prev_url'] != null) |
1360: { | 1381: { |
1361: $query['REPLACE'] .= ', prev_url'; | 1382: $query['REPLACE'] .= ', prev_url'; |
1362: $query['VALUES'] .= ', \''.$forum_db->escape($forum_user['prev_url']).'\''; | 1383: $query['VALUES'] .= ', \''.$forum_db->escape($forum_user['prev_url']).'\''; |
1363: } | 1384: } |
1364: | 1385: |
1365: ($hook = get_hook('fn_set_default_user_qr_add_online_guest_user')) ? eval($hook) : null; | 1386: ($hook = get_hook('fn_set_default_user_qr_add_online_guest_user')) ? eval($hook) : null; |
1366: $forum_db->query_build($query) or error(__FILE__, __LINE__); | 1387: $forum_db->query_build($query) or error(__FILE__, __LINE__); |
1367: } | 1388: } |
1368: else | 1389: else |
1369: { | 1390: { |
1370: $query = array( | 1391: $query = array( |
1371: 'UPDATE' => 'online', | 1392: 'UPDATE' => 'online', |
1372: 'SET' => 'logged='.time(), | 1393: 'SET' => 'logged='.time(), |
1373: 'WHERE' => 'ident=\''.$forum_db->escape($remote_addr).'\'' | 1394: 'WHERE' => 'ident=\''.$forum_db->escape($remote_addr).'\'' |
1374: ); | 1395: ); |
1375: | 1396: |
1376: $current_url = get_current_url(255); | 1397: $current_url = get_current_url(255); |
1377: if ($current_url != null) | 1398: if ($current_url != null) |
1378: $query['SET'] .= ', prev_url=\''.$forum_db->escape($current_url).'\''; | 1399: $query['SET'] .= ', prev_url=\''.$forum_db->escape($current_url).'\''; |
1379: | 1400: |
1380: ($hook = get_hook('fn_set_default_user_qr_update_online_guest_user')) ? eval($hook) : null; | 1401: ($hook = get_hook('fn_set_default_user_qr_update_online_guest_user')) ? eval($hook) : null; |
1381: $forum_db->query_build($query) or error(__FILE__, __LINE__); | 1402: $forum_db->query_build($query) or error(__FILE__, __LINE__); |
| 1403: } |
1382: } | 1404: } |
1383: | 1405: |
1384: $forum_user['disp_topics'] = $forum_config['o_disp_topics_default']; | 1406: $forum_user['disp_topics'] = $forum_config['o_disp_topics_default']; |
1389: $forum_user['style'] = $forum_config['o_default_style']; | 1411: $forum_user['style'] = $forum_config['o_default_style']; |
1390: $forum_user['is_guest'] = true; | 1412: $forum_user['is_guest'] = true; |
1391: $forum_user['is_admmod'] = false; | 1413: $forum_user['is_admmod'] = false; |
| 1414: |
| 1415: ($hook = get_hook('fn_set_default_user_end')) ? eval($hook) : null; |
1392: } | 1416: } |
1393: | 1417: |
1394: | 1418: |
2572: if (isset($_POST['confirm_cancel'])) | 2596: if (isset($_POST['confirm_cancel'])) |
2573: redirect(forum_htmlencode($_POST['prev_url']), $lang_common['Cancel redirect']); | 2597: redirect(forum_htmlencode($_POST['prev_url']), $lang_common['Cancel redirect']); |
2574: | 2598: |
2575: // A helper function for csrf_confirm_form. It takes a multi-dimensional array and returns it as a | 2599: // A helper function for csrf_confirm_form. It takes a multi-dimensional array and returns it as a |
2576: // single-dimensional array suitable for use in hidden fields. | 2600: // single-dimensional array suitable for use in hidden fields. |
2577: function _csrf_confirm_form($key, $values) | 2601: function _csrf_confirm_form($key, $values) |
2578: { | 2602: { |
2579: $fields = array(); | 2603: $fields = array(); |
2580: | 2604: |
2756: ob_start(); | 2780: ob_start(); |
2757: | 2781: |
2758: ?> | 2782: ?> |
2759: <title><?php echo $lang_common['Maintenance'].' - '.forum_htmlencode($forum_config['o_board_title']) ?></title> | 2783: <title><?php echo $lang_common['Maintenance'].$lang_common['Title separator'].forum_htmlencode($forum_config['o_board_title']) ?></title> |
2760: <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' ?>" /> | 2784: <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' ?>" /> |
2761: <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' ?>" /> | 2785: <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' ?>" /> |
2762: <!--[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]--> | 2786: <!--[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]--> |
2773: ob_start(); | 2797: ob_start(); |
2774: | 2798: |
2775: ?> | 2799: ?> |
2776: <div id="brd-main" class="main basic"> | 2800: <div id="brd-maint" class="main basic"> |
2777: | 2801: |
2778: <div class="main-head"> | 2802: <div class="main-head"> |
2779: <h1 class="hn"><span><?php echo $lang_common['Maintenance mode'] ?></span></h1> | 2803: <h1 class="hn"><span><?php echo $lang_common['Maintenance mode'] ?></span></h1> |
2868: // START SUBST - <!-- forum_head --> | 2892: // START SUBST - <!-- forum_head --> |
2869: | 2893: |
2870: $forum_head['refresh'] = '<meta http-equiv="refresh" content="'.$forum_config['o_redirect_delay'].';URL='.str_replace(array('<', '>', '"'), array('<', '>', '"'), $destination_url).'" />'; | 2894: $forum_head['refresh'] = '<meta http-equiv="refresh" content="'.$forum_config['o_redirect_delay'].';URL='.str_replace(array('<', '>', '"'), array('<', '>', '"'), $destination_url).'" />'; |
2871: $forum_head['title'] = '<title>'.$lang_common['Redirecting'].' - '.forum_htmlencode($forum_config['o_board_title']).'</title>'; | 2895: $forum_head['title'] = '<title>'.$lang_common['Redirecting'].$lang_common['Title separator'].forum_htmlencode($forum_config['o_board_title']).'</title>'; |
2872: | 2896: |
2873: ob_start(); | 2897: ob_start(); |
2874: | 2898: |
2947: // Display a simple error message | 2971: // Display a simple error message |
2948: function error() | 2972: function error() |
2949: { | 2973: { |
| 2974: global $forum_config; |
| 2975: |
2950: if (!headers_sent()) | 2976: if (!headers_sent()) |
2951: { | 2977: { |
| 2978: // if no HTTP responce code is set we send 503 |
| 2979: if (!defined('FORUM_HTTP_RESPONSE_CODE_SET')) |
| 2980: header('HTTP/1.1 503 Service Temporarily Unavailable'); |
2952: header('Content-type: text/html; charset=utf-8'); | 2981: header('Content-type: text/html; charset=utf-8'); |
2953: header('HTTP/1.1 503 Service Temporarily Unavailable'); | |
2954: } | 2982: } |
2955: | 2983: |
2956: global $forum_config; | |
2957: | |
2958: /* | 2984: /* |
2959: Parse input parameters. Possible function signatures: | 2985: Parse input parameters. Possible function signatures: |
2960: error('Error message.'); | 2986: error('Error message.'); |
2987: while (@ob_end_clean()); | 3013: while (@ob_end_clean()); |
2988: | 3014: |
2989: // "Restart" output buffering if we are using ob_gzhandler (since the gzip header is already sent) | 3015: // "Restart" output buffering if we are using ob_gzhandler (since the gzip header is already sent) |
2990: if (!empty($forum_config['o_gzip']) && extension_loaded('zlib') && (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false || strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') !== false)) | 3016: 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)) |
2991: ob_start('ob_gzhandler'); | 3017: ob_start('ob_gzhandler'); |
2992: | 3018: |
2993: ?> | 3019: ?> |
punbb-1.3/lang/English/common.php |
punbb-1.3.4/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.', |
76: 'Paging separator' => ' ', //The character or text that separates page numbers for page navigation generally | 76: 'Paging separator' => ' ', //The character or text that separates page numbers for page navigation generally |
77: 'Previous' => 'Previous', | 77: 'Previous' => 'Previous', |
78: 'Next' => 'Next', | 78: 'Next' => 'Next', |
79: 'Cancel redirect' => 'Operation cancelled. Redirecting …', | 79: 'Cancel redirect' => 'Operation cancelled. Redirecting…', |
80: 'No confirm redirect' => 'No confirmation provided. Operation cancelled. Redirecting …', | 80: 'No confirm redirect' => 'No confirmation provided. Operation cancelled. Redirecting…', |
81: 'Please confirm' => 'Please confirm:', | 81: 'Please confirm' => 'Please confirm:', |
82: 'Help page' => 'Help with: %s', | 82: 'Help page' => 'Help with: %s', |
83: 'Re' => 'Re:', | 83: 'Re' => 'Re:', |
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: | 90: |
91: // CSRF confirmation form | 91: // CSRF confirmation form |
133: // Alerts | 133: // Alerts |
134: 'New alerts' => 'New Alerts', | 134: 'New alerts' => 'New Alerts', |
135: 'Maintenance alert' => '<strong>WARNING! Maintenance mode enabled.</strong> This board is currently in maintenance mode. <em>DO NOT</em> logout, if you do you will not be able to login again.', | 135: 'Maintenance alert' => '<strong>WARNING! Maintenance mode enabled.</strong> This board is currently in maintenance mode. <em>DO NOT</em> logout, if you do you will not be able to login again.', |
136: 'Updates' => 'PunBB updates', | 136: 'Updates' => 'PunBB updates:', |
137: 'Updates failed' => 'The latest attempt at checking for updates against the punbb.informer.com updates service failed. This probably just means that the service is temporarily overloaded or out of order. However, if this alert does not disappear within a day or two, you should disable the automatic check for updates and check for updates manually in the future.', | 137: 'Updates failed' => 'The latest attempt at checking for updates against the punbb.informer.com updates service failed. This probably just means that the service is temporarily overloaded or out of order. However, if this alert does not disappear within a day or two, you should disable the automatic check for updates and check for updates manually in the future.', |
138: 'Updates version n hf' => 'A newer version of PunBB, version %s, is available for download at <a href="http://punbb.informer.com/">punbb.informer.com</a>. Furthermore, one or more hotfix extensions are available for install on the Extensions tab of the admin interface.', | 138: 'Updates version n hf' => 'A newer version of PunBB, version %s, is available for download at <a href="http://punbb.informer.com/">punbb.informer.com</a>. Furthermore, one or more hotfixes are available for install on the <a href="%s">Manage hotfixes</a> tab of the admin interface.', |
139: 'Updates version' => 'A newer version of PunBB, version %s, is available for download at <a href="http://punbb.informer.com/">punbb.informer.com</a>.', | 139: 'Updates version' => 'A newer version of PunBB, version %s, is available for download at <a href="http://punbb.informer.com/">punbb.informer.com</a>.', |
140: 'Updates hf' => 'One or more hotfix extensions are available for install on the Extensions tab of the admin interface.', | 140: 'Updates hf' => 'One or more hotfixes are available for install on the <a href="%s">Manage hotfixes</a> tab of the admin interface.', |
141: 'Database mismatch' => 'Database version mismatch', | 141: 'Database mismatch' => 'Database version mismatch', |
142: 'Database mismatch alert' => 'Your PunBB database is meant to be used in conjunction with a newer version of the PunBB code. This mismatch can lead to your forum not working properly. It is suggested that you upgrade your forum to the newest version of PunBB.', | 142: 'Database mismatch alert' => 'Your PunBB database is meant to be used in conjunction with a newer version of the PunBB code. This mismatch can lead to your forum not working properly. It is suggested that you upgrade your forum to the newest version of PunBB.', |
143: | 143: |
146: 'Jump to' => 'Jump to forum:', | 146: 'Jump to' => 'Jump to forum:', |
147: | 147: |
148: // For extern.php RSS feed | 148: // For extern.php RSS feed |
149: 'ATOM Feed' => 'Atom', | |
150: 'RSS Feed' => 'RSS', | |
151: 'RSS description' => 'The most recent topics at %s.', | 149: 'RSS description' => 'The most recent topics at %s.', |
152: 'RSS description topic' => 'The most recent posts in %s.', | 150: '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) | 151: 'RSS reply' => 'Re: ', // The topic subject will be appended to this string (to signify a reply) |
154: | 152: |
155: // Accessibility | 153: // Accessibility |
156: 'Skip to content' => 'Skip to forum content', | 154: 'Skip to content' => 'Skip to forum content', |
157: | 155: |
158: // Debug information | 156: // Debug information |
159: 'Querytime' => 'Generated in %1$s seconds, %2$s queries executed', | 157: 'Querytime' => 'Generated in %1$s seconds, %2$s queries executed', |
160: 'Debug table' => 'Debug information', | 158: 'Debug table' => 'Debug information', |
161: 'Debug summary' => 'Database query performance information', | 159: 'Debug summary' => 'Database query performance information', |
162: 'Query times' => 'Time (s)', | 160: 'Query times' => 'Time (s)', |
163: 'Query' => 'Query', | 161: 'Query' => 'Query', |
164: 'Total query time' => 'Total query time', | 162: 'Total query time' => 'Total query time', |
165: | 163: |
166: ); | 164: ); |
punbb-1.3/lang/English/install.php |
punbb-1.3.4/lang/English/install.php |
4: $lang_install = array( | 4: $lang_install = array( |
5: | 5: |
6: // Install Form | 6: // Install Form |
7: 'Install PunBB' => 'Install PunBB %s', | 7: 'Install PunBB' => 'Install PunBB %s', |
| 8: 'Choose language' => 'Change installer language', |
| 9: 'Choose language help' => 'You can change the language of this install script if you find it easier to follow the instructions in your own language. Just choose your language from the list of installed ones below.', |
| 10: 'Installer language' => 'Installer language:', |
| 11: 'Choose language legend' => 'Installer language', |
8: 'Install intro' => 'In order to install PunBB you must complete the form set out below. Please read the instructions provided before completing the form. If you encounter any difficulties with the installation, please refer to the documentation supplied as part of PunBB\'s download package.', | 12: 'Install intro' => 'In order to install PunBB you must complete the form set out below. Please read the instructions provided before completing the form. If you encounter any difficulties with the installation, please refer to the documentation supplied as part of PunBB\'s download package.', |
9: 'Part1' => 'Part 1 - Database setup', | 13: 'Part1' => 'Part 1 - Database setup', |
10: 'Part1 intro' => 'Please enter the requested information in order to setup your database for PunBB. You must know all the information asked for before proceeding with the installation. Help with completing this part of the form is set out below.', | 14: 'Part1 intro' => 'Please enter the requested information in order to setup your database for PunBB. You must know all the information asked for before proceeding with the installation. Help with completing this part of the form is set out below.', |
17: 'Table prefix' => 'Table prefix', | 21: 'Table prefix' => 'Table prefix', |
18: '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.', |
19: '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.', |
20: '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.', | |
21: '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\'.', |
22: '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.', |
23: '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.', |
74: '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.', |
75: '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.', |
76: '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.', |
77: '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.', |
78: | 81: |
79: // 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)', |
80: 'Default announce heading' => 'Sample announcement', | 85: 'Default announce heading' => 'Sample announcement', |
81: 'Default announce message' => '<p>Enter your announcement here.</p>', | 86: 'Default announce message' => '<p>Enter your announcement here.</p>', |
82: 'Default maint message' => "The forums are temporarily down for maintenance. Please try again in a few minutes.<br />\\n<br />\\n/Administrator", | 87: 'Default maint message' => "The forums are temporarily down for maintenance. Please try again in a few minutes.<br />\\n<br />\\n/Administrator", |
punbb-1.3/lang/English/misc.php |
punbb-1.3.4/lang/English/misc.php |
3: // Language definitions used in various scripts | 3: // Language definitions used in various scripts |
4: $lang_misc = array( | 4: $lang_misc = array( |
5: | 5: |
6: 'Mark read redirect' => 'All topics and forums have been marked as read. Redirecting …', | 6: 'Mark read redirect' => 'All topics and forums have been marked as read. Redirecting…', |
7: 'Mark forum read redirect' => 'All topics in the specified forum have been marked as read. Redirecting …', | 7: 'Mark forum read redirect' => 'All topics in the specified forum have been marked as read. Redirecting…', |
8: | 8: |
9: // Send e-mail | 9: // Send e-mail |
10: 'Form e-mail disabled' => 'The user you are trying to send an e-mail to has disabled form e-mail.', | 10: 'Form e-mail disabled' => 'The user you are trying to send an e-mail to has disabled form e-mail.', |
13: 'No e-mail message' => 'You must enter a message.', | 13: 'No e-mail message' => 'You must enter a message.', |
14: 'Too long e-mail message' => 'Your message length is %s bytes. This exceeds the %s bytes limit.', | 14: 'Too long e-mail message' => 'Your message length is %s bytes. This exceeds the %s bytes limit.', |
15: 'Email flood' => 'At least %s seconds have to pass between sent emails. Please wait a while and try sending again.', | 15: 'Email flood' => 'At least %s seconds have to pass between sent emails. Please wait a while and try sending again.', |
16: 'E-mail sent redirect' => 'E-mail sent. Redirecting …', | 16: 'E-mail sent redirect' => 'E-mail sent. Redirecting…', |
17: 'E-mail subject' => 'Subject', | 17: 'E-mail subject' => 'Subject', |
18: 'E-mail message' => 'Message', | 18: 'E-mail message' => 'Message', |
19: 'E-mail disclosure note' => '<strong>Important!</strong> When you send an e-mail using this form your e-mail address will be disclosed to the recipient.', | 19: 'E-mail disclosure note' => '<strong>Important!</strong> When you send an e-mail using this form your e-mail address will be disclosed to the recipient.', |
23: // Report | 23: // Report |
24: 'No reason' => 'You must enter a reason.', | 24: 'No reason' => 'You must enter a reason.', |
25: 'Report flood' => 'At least %s seconds have to pass between reports. Please wait a while and try sending again.', | 25: 'Report flood' => 'At least %s seconds have to pass between reports. Please wait a while and try sending again.', |
26: 'Report redirect' => 'Post reported. Redirecting …', | 26: 'Report redirect' => 'Post reported. Redirecting…', |
27: 'Report post' => 'Report post', | 27: 'Report post' => 'Report post', |
28: 'Reason' => 'Reason', | 28: 'Reason' => 'Reason', |
29: 'Reason help' => 'Enter a short reason why you are reporting this post.', | 29: 'Reason help' => 'Enter a short reason why you are reporting this post.', |
30: | 30: |
31: // Subscriptions | 31: // Subscriptions |
32: 'Already subscribed' => 'You are already subscribed to this topic.', | 32: 'Already subscribed' => 'You are already subscribed to this topic.', |
33: 'Subscribe redirect' => 'Your subscription has been added. Redirecting …', | 33: 'Subscribe redirect' => 'Your subscription has been added. Redirecting…', |
34: 'Not subscribed' => 'You are not subscribed to this topic.', | 34: 'Not subscribed' => 'You are not subscribed to this topic.', |
35: 'Unsubscribe redirect' => 'Your subscription has been removed. Redirecting …', | 35: 'Unsubscribe redirect' => 'Your subscription has been removed. Redirecting…', |
36: | 36: |
37: // General forum and topic moderation | 37: // General forum and topic moderation |
38: 'Moderate forum' => 'Moderate forum', | 38: 'Moderate forum' => 'Moderate forum', |
49: 'Show more users' => 'Show more users for this IP', | 49: 'Show more users' => 'Show more users for this IP', |
50: | 50: |
51: // Moderate forum | 51: // Moderate forum |
52: 'Moderate forum head' => 'Moderate : %s', | 52: 'Moderate forum head' => 'Moderate: %s', |
53: 'Topics' => 'Topics', | 53: 'Topics' => 'Topics', |
54: 'Move topic' => 'Move topic', | 54: 'Move topic' => 'Move topic', |
55: 'Move topics' => 'Move topics', | 55: 'Move topics' => 'Move topics', |
63: 'Leave redirect' => 'Leave a redirect topic in the forum from which the topic was moved.', | 63: 'Leave redirect' => 'Leave a redirect topic in the forum from which the topic was moved.', |
64: 'Leave redirects' => 'Leave redirect topics in the forum from which topics were moved.', | 64: 'Leave redirects' => 'Leave redirect topics in the forum from which topics were moved.', |
65: 'Leave merge redirects' => 'Leave redirect topics for those topics which were merged.', | 65: 'Leave merge redirects' => 'Leave redirect topics for those topics which were merged.', |
66: 'Move topic redirect' => 'Topic moved. Redirecting …', | 66: 'Move topic redirect' => 'Topic moved. Redirecting…', |
67: 'Move topics redirect' => 'Topics moved. Redirecting …', | 67: 'Move topics redirect' => 'Topics moved. Redirecting…', |
68: 'Merge topics redirect' => 'Topics merged. Redirecting …', | 68: 'Merge topics redirect' => 'Topics merged. Redirecting…', |
69: 'Delete topic comply' => 'Are you sure you want to delete the selected topic?', | 69: 'Delete topic comply' => 'Are you sure you want to delete the selected topic?', |
70: 'Delete topics comply' => 'Are you sure you want to delete all the selected topics?', | 70: 'Delete topics comply' => 'Are you sure you want to delete all the selected topics?', |
71: 'Delete topic redirect' => 'Topic deleted. Redirecting …', | 71: 'Delete topic redirect' => 'Topic deleted. Redirecting…', |
72: 'Delete topics redirect' => 'Topics deleted. Redirecting …', | 72: 'Delete topics redirect' => 'Topics deleted. Redirecting…', |
73: 'Open topic redirect' => 'Topic opened. Redirecting …', | 73: 'Open topic redirect' => 'Topic opened. Redirecting…', |
74: 'Open topics redirect' => 'Topics opened. Redirecting …', | 74: 'Open topics redirect' => 'Topics opened. Redirecting…', |
75: 'Close topic redirect' => 'Topic closed. Redirecting …', | 75: 'Close topic redirect' => 'Topic closed. Redirecting…', |
76: 'Close topics redirect' => 'Topics closed. Redirecting …', | 76: 'Close topics redirect' => 'Topics closed. Redirecting…', |
77: 'No topics selected' => 'You must select at least one topic.', | 77: 'No topics selected' => 'You must select at least one topic.', |
78: 'Stick topic redirect' => 'Topic is now sticky. Redirecting …', | 78: 'Stick topic redirect' => 'Topic is now sticky. Redirecting…', |
79: 'Unstick topic redirect' => 'Topic no longer sticky. Redirecting …', | 79: 'Unstick topic redirect' => 'Topic no longer sticky. Redirecting…', |
80: 'Merge error' => 'You should select more than 1 topic to merge.', | 80: 'Merge error' => 'You should select more than 1 topic to merge.', |
81: | 81: |
82: // Moderate topic | 82: // Moderate topic |
84: 'Delete posts' => 'Delete selected posts', | 84: 'Delete posts' => 'Delete selected posts', |
85: 'Split posts' => 'Split selected posts', | 85: 'Split posts' => 'Split selected posts', |
86: 'Delete whole topic' => 'Delete whole topic', | 86: 'Delete whole topic' => 'Delete whole topic', |
87: 'Moderate topic head' => 'Moderate topic : %s', | 87: 'Moderate topic head' => 'Moderate topic: %s', |
88: 'New subject' => 'New topic subject:', | 88: 'New subject' => 'New topic subject:', |
89: 'Select post' => 'Select post', // Label for checkbox | 89: 'Select post' => 'Select post', // Label for checkbox |
90: 'Confirm post delete' => 'Confirm deletion of all selected posts', | 90: 'Confirm post delete' => 'Confirm deletion of all selected posts', |
92: 'Confirm topic split' => 'Confirm splitting of all selected posts into a new topic', | 92: 'Confirm topic split' => 'Confirm splitting of all selected posts into a new topic', |
93: 'Confirm topic merge' => 'Confirm merging of all selected topics into one topic', | 93: 'Confirm topic merge' => 'Confirm merging of all selected topics into one topic', |
94: 'Confirm post split' => 'Confirm splitting of all selected posts', | 94: 'Confirm post split' => 'Confirm splitting of all selected posts', |
95: 'Delete posts redirect' => 'Posts deleted. Redirecting …', | 95: 'Delete posts redirect' => 'Posts deleted. Redirecting…', |
96: 'Split posts redirect' => 'Posts split into a new topic. Redirecting …', | 96: 'Split posts redirect' => 'Posts split into a new topic. Redirecting…', |
97: 'No posts selected' => 'You must select at least one post.' | 97: 'No posts selected' => 'You must select at least one post.' |
98: | 98: |
99: ); | 99: ); |
punbb-1.3/lang/English/profile.php |
punbb-1.3.4/lang/English/profile.php |
3: $lang_profile = array( | 3: $lang_profile = array( |
4: | 4: |
5: // Navigation and sections | 5: // Navigation and sections |
6: 'Profile redirect' => 'Profile updated. Redirecting …', | 6: 'Profile redirect' => 'Profile updated. Redirecting…', |
7: 'Instructions' => 'You will be redirected back to this page', | 7: 'Instructions' => 'You will be redirected back to this page', |
8: 'Update profile' => 'Update profile', | 8: 'Update profile' => 'Update profile', |
9: 'Subform heading' => '%1$s : %2$s', | |
10: | 9: |
11: // Administration stuff | 10: // Administration stuff |
12: 'User delete redirect' => 'User deleted. Redirecting …', | 11: 'User delete redirect' => 'User deleted. Redirecting…', |
13: 'Section admin' => 'Administration', | 12: 'Section admin' => 'Administration', |
14: 'Delete user' => 'Delete user', | 13: 'Delete user' => 'Delete user', |
15: 'Delete warning' => '<strong>Warning!</strong> Once deleted a user and/or their posts cannot be restored.', | 14: 'Delete warning' => '<strong>Warning!</strong> Once deleted a user and/or their posts cannot be restored.', |
16: 'Delete posts info' => '<strong>Warning!</strong> If you choose not to delete this user\'s posts they can only be deleted manually at a later time.', | 15: 'Delete posts info' => '<strong>Warning!</strong> If you choose not to delete this user\'s posts they can only be deleted manually at a later time.', |
17: 'Delete posts' => 'Delete posts', | 16: 'Delete posts' => 'Delete posts', |
18: 'Delete posts label' => 'Delete any posts and topics %s has made.', | 17: 'Delete posts label' => 'Delete any posts and topics %s has made.', |
19: 'Group membership redirect' => 'Group membership updated. Redirecting …', | 18: 'Group membership redirect' => 'Group membership updated. Redirecting…', |
20: 'Moderate forums redirect' => 'Forum moderator rights updated. Redirecting …', | 19: 'Moderate forums redirect' => 'Forum moderator rights updated. Redirecting…', |
21: 'Ban redirect' => 'Redirecting …', | 20: 'Ban redirect' => 'Redirecting…', |
22: 'Ban user' => 'Ban user', | 21: 'Ban user' => 'Ban user', |
23: 'Ban user info' => 'Ban this user via the administration console.', | 22: 'Ban user info' => 'Ban this user via the administration console.', |
24: 'Delete user info' => 'Permanently delete this user and, optionally, all their posts.', | 23: 'Delete user info' => 'Permanently delete this user and, optionally, all their posts.', |
33: // Avatar stuff | 32: // Avatar stuff |
34: 'Avatar welcome' => 'Set an avatar image to enhance your forum identity', | 33: 'Avatar welcome' => 'Set an avatar image to enhance your forum identity', |
35: 'Avatar welcome user' => 'Set an avatar image to enhance %s\'s forum identity', | 34: 'Avatar welcome user' => 'Set an avatar image to enhance %s\'s forum identity', |
36: 'Avatar deleted redirect' => 'Avatar deleted. Redirecting …', | 35: 'Avatar deleted redirect' => 'Avatar deleted. Redirecting…', |
37: 'Avatars disabled' => 'The administrator has disabled avatar support.', | 36: 'Avatars disabled' => 'The administrator has disabled avatar support.', |
38: 'No file' => 'You did not select a file for upload.', | 37: 'No file' => 'You did not select a file for upload.', |
39: 'Too large ini' => 'The selected file was too large to upload. The server didn\'t allow the upload.', | 38: 'Too large ini' => 'The selected file was too large to upload. The server didn\'t allow the upload.', |
45: '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.', |
46: 'Unknown failure' => 'An unknown error occurred. Please try again.', | 45: 'Unknown failure' => 'An unknown error occurred. Please try again.', |
47: 'Avatar' => 'Avatar', | 46: 'Avatar' => 'Avatar', |
48: 'Current avatar' => 'Current Avatar', | 47: 'Current avatar' => 'Current avatar', |
49: 'No avatar info' => 'No avatar is currently uploaded.', | 48: 'No avatar info' => 'No avatar is currently uploaded.', |
50: '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.', |
51: '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.', |
52: '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.', |
53: '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).', |
54: 'Delete avatar info' => 'Delete avatar to cease displaying any avatar.', | 53: 'Delete avatar info' => 'Delete avatar to stop displaying any avatar.', |
55: 'Upload avatar file' => 'Upload avatar file', | 54: 'Upload avatar file' => 'Upload avatar file', |
56: 'Avatar upload help' => 'Select file then update your profile to install.', | 55: 'Avatar upload help' => 'Select file then update your profile to install.', |
57: '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.', |
170: 'Change pass errors' => '<strong>Warning!</strong> The following errors must be corrected before your password can be updated:', | 169: 'Change pass errors' => '<strong>Warning!</strong> The following errors must be corrected before your password can be updated:', |
171: 'Pass logout' => 'A user is currently logged in. Please logout and try again.', | 170: 'Pass logout' => 'A user is currently logged in. Please logout and try again.', |
172: 'Pass key bad' => 'The specified password activation key was incorrect or has expired. Please re-request a new password. If that fails, contact the forum administrator at %s.', | 171: 'Pass key bad' => 'The specified password activation key was incorrect or has expired. Please re-request a new password. If that fails, contact the forum administrator at %s.', |
173: 'Pass updated' => 'Password updated. Login with your new password. Redirecting …', | 172: 'Pass updated' => 'Password updated. Login with your new password. Redirecting…', |
174: 'Change your password' => 'Change your password', | 173: 'Change your password' => 'Change your password', |
175: 'Change user password' => 'Change %s\'s password', | 174: 'Change user password' => 'Change %s\'s password', |
176: 'Old password' => 'Old password', | 175: 'Old password' => 'Old password', |
178: 'New password' => 'New password', | 177: 'New password' => 'New password', |
179: 'Confirm new password' => 'Confirm new password', | 178: 'Confirm new password' => 'Confirm new password', |
180: 'Wrong old password' => 'The old password you entered was incorrect.', | 179: 'Wrong old password' => 'The old password you entered was incorrect.', |
181: 'Pass updated redirect' => 'Password updated. Redirecting …', | 180: 'Pass updated redirect' => 'Password updated. Redirecting…', |
182: | 181: |
183: // Change E-mail stuff | 182: // Change E-mail stuff |
184: '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:', |
185: '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.', |
186: '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…', |
187: 'Wrong password' => 'The password you entered was incorrect.', | 187: 'Wrong password' => 'The password you entered was incorrect.', |
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: '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.', |
189: 'Change your e-mail' => 'Change your e-mail address', | 189: 'Change your e-mail' => 'Change your e-mail address', |
202: | 202: |
203: // Registration stuff (some of these also used by profile) | 203: // Registration stuff (some of these also used by profile) |
204: 'No new regs' => 'This forum is not accepting new registrations.', | 204: 'No new regs' => 'This forum is not accepting new registrations.', |
205: 'Reg cancel redirect' => 'Registration cancelled. Redirecting …', | 205: 'Reg cancel redirect' => 'Registration cancelled. Redirecting…', |
206: 'Agreement' => 'Agreement', | 206: 'Agreement' => 'Agreement', |
207: 'Agreement label' => 'I agree to the rules set out above and wish to register.', | 207: 'Agreement label' => 'I agree to the rules set out above and wish to register.', |
208: 'Agree' => 'Agree', | 208: 'Agree' => 'Agree', |
213: 'Banned e-mail' => 'The e-mail address you entered is banned in this forum. Please choose another e-mail address.', | 213: 'Banned e-mail' => 'The e-mail address you entered is banned in this forum. Please choose another e-mail address.', |
214: 'Dupe e-mail' => 'Someone else is already registered with that e-mail address. Please choose another e-mail address.', | 214: 'Dupe e-mail' => 'Someone else is already registered with that e-mail address. Please choose another e-mail address.', |
215: 'Reg e-mail' => 'Thank you for registering. An email has been sent to the specified address with instructions on how to activate your new account. If it doesn\'t arrive you can contact the forum administrator at %s.', | 215: 'Reg e-mail' => 'Thank you for registering. An email has been sent to the specified address with instructions on how to activate your new account. If it doesn\'t arrive you can contact the forum administrator at %s.', |
216: 'Reg complete' => 'Registration complete. Logging in and redirecting …', | 216: 'Reg complete' => 'Registration complete. Logging in and redirecting…', |
217: '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:', |
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: '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.', |
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. 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. You must therefore ensure that you enter a valid and current e-mail address.', |
punbb-1.3/moderate.php |
punbb-1.3.4/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: */ |
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: |
755: message($lang_misc['No topics selected']); | 754: message($lang_misc['No topics selected']); |
756: | 755: |
757: if (count($topics) == 1) | 756: if (count($topics) == 1) |
| 757: { |
758: $topics = $topics[0]; | 758: $topics = $topics[0]; |
| 759: $action = 'single'; |
| 760: } |
| 761: else |
| 762: $action = 'multiple'; |
759: } | 763: } |
760: else | 764: else |
761: { | 765: { |
764: message($lang_common['Bad request']); | 768: message($lang_common['Bad request']); |
765: | 769: |
766: $action = 'single'; | 770: $action = 'single'; |
767: | 771: } |
| 772: if ($action == 'single') |
| 773: { |
768: // Fetch the topic subject | 774: // Fetch the topic subject |
769: $query = array( | 775: $query = array( |
770: 'SELECT' => 't.subject', | 776: 'SELECT' => 't.subject', |
815: | 821: |
816: $forum_page['hidden_fields'] = array( | 822: $forum_page['hidden_fields'] = array( |
817: 'csrf_token' => '<input type="hidden" name="csrf_token" value="'.generate_form_token($forum_page['form_action']).'" />', | 823: 'csrf_token' => '<input type="hidden" name="csrf_token" value="'.generate_form_token($forum_page['form_action']).'" />', |
818: 'topics' => '<input type="hidden" name="topics" value="'.$topics.'" />' | 824: 'topics' => '<input type="hidden" name="topics" value="'.($action == 'single' ? $topics : implode(',', $topics)).'" />' |
819: ); | 825: ); |
820: | 826: |
821: // Setup breadcrumbs | 827: // Setup breadcrumbs |
921: message($lang_misc['No topics selected']); | 927: message($lang_misc['No topics selected']); |
922: | 928: |
923: if (count($topics) == 1) | 929: if (count($topics) == 1) |
924: message($lang_misc['Merge error']); | 930: message($lang_misc['Merge error']); |
925: | 931: |
926: if (isset($_POST['merge_topics_comply'])) | 932: if (isset($_POST['merge_topics_comply'])) |
927: { | 933: { |
1011: $lang_misc['Merge topics'] | 1017: $lang_misc['Merge topics'] |
1012: ); | 1018: ); |
1013: | 1019: |
1014: // Setup main heading | |
1015: $forum_page['main_title'] = end($forum_page['crumbs']); | |
1016: | |
1017: ($hook = get_hook('mr_merge_topics_pre_header_load')) ? eval($hook) : null; | 1020: ($hook = get_hook('mr_merge_topics_pre_header_load')) ? eval($hook) : null; |
1018: | 1021: |
1019: define('FORUM_PAGE', 'dialogue'); | 1022: define('FORUM_PAGE', 'dialogue'); |
1035: </div> | 1038: </div> |
1036: <?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; ?> |
1037: <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>"> | 1040: <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>"> |
1038: <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> |
1039: <?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; ?> |
1040: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 1043: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
1041: <div class="sf-box checkbox"> | 1044: <div class="sf-box checkbox"> |
1420: // Determine the topic offset (based on $_GET['p']) | 1423: // Determine the topic offset (based on $_GET['p']) |
1421: $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']); |
1422: | 1425: |
1423: $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']; |
1424: $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); |
1425: $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'])); |
1426: $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']); |
1531: ++$forum_page['item_count']; | 1534: ++$forum_page['item_count']; |
1532: | 1535: |
1533: // Start from scratch | 1536: // Start from scratch |
1534: $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(); |
1535: $forum_page['item_indicator'] = ''; | |
1536: | 1538: |
1537: if ($forum_config['o_censoring'] == '1') | 1539: if ($forum_config['o_censoring'] == '1') |
1538: $cur_topic['subject'] = censor_words($cur_topic['subject']); | 1540: $cur_topic['subject'] = censor_words($cur_topic['subject']); |
1539: | 1541: |
| 1542: $forum_page['item_subject']['starter'] = '<span class="item-starter">'.sprintf($lang_forum['Topic starter'], forum_htmlencode($cur_topic['poster'])).'</span>'; |
| 1543: |
1540: if ($cur_topic['moved_to'] != null) | 1544: if ($cur_topic['moved_to'] != null) |
1541: { | 1545: { |
1542: $forum_page['item_status']['moved'] = 'moved'; | 1546: $forum_page['item_status']['moved'] = 'moved'; |
1543: $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>'; |
1544: | 1548: |
1545: // Combine everything to produce the Topic heading | 1549: // Combine everything to produce the Topic heading |
1546: $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>'; |
1552: | 1556: |
1553: $forum_page['item_body']['info']['replies'] = '<li class="info-replies"><span class="label">'.$lang_forum['No replies info'].'</span></li>'; | 1557: $forum_page['item_body']['info']['replies'] = '<li class="info-replies"><span class="label">'.$lang_forum['No replies info'].'</span></li>'; |
1554: $forum_page['item_body']['info']['lastpost'] = '<li class="info-lastpost"><span class="label">'.$lang_forum['No lastpost info'].'</span></li>'; | 1558: $forum_page['item_body']['info']['lastpost'] = '<li class="info-lastpost"><span class="label">'.$lang_forum['No lastpost info'].'</span></li>'; |
1555: $forum_page['item_body']['info']['select'] = '<li class="info-select"><input id="fld'.++$forum_page['fld_count'].'" type="checkbox" name="topics[]" value="'.$cur_topic['id'].'" /> <label for="fld'.$forum_page['fld_count'].'">'.sprintf($lang_forum['Select topic'], $cur_topic['subject']).'</label></li>'; | 1559: $forum_page['item_body']['info']['select'] = '<li class="info-select"><input id="fld'.++$forum_page['fld_count'].'" type="checkbox" name="topics[]" value="'.$cur_topic['id'].'" /> <label for="fld'.$forum_page['fld_count'].'">'.sprintf($lang_forum['Select topic'], forum_htmlencode($cur_topic['subject'])).'</label></li>'; |
1556: | 1560: |
1557: ($hook = get_hook('mr_topic_actions_moved_row_pre_output')) ? eval($hook) : null; | 1561: ($hook = get_hook('mr_topic_actions_moved_row_pre_output')) ? eval($hook) : null; |
1558: } | 1562: } |
1569: $forum_page['item_status']['posted'] = 'posted'; | 1573: $forum_page['item_status']['posted'] = 'posted'; |
1570: } | 1574: } |
1571: | 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: |
1572: $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>'; |
1573: | 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: |
1574: $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']); |
1575: | 1604: |
1576: if ($forum_page['item_pages'] > 1) | 1605: if ($forum_page['item_pages'] > 1) |
1583: $forum_page['item_status']['new'] = 'new'; | 1612: $forum_page['item_status']['new'] = 'new'; |
1584: } | 1613: } |
1585: | 1614: |
1586: if (!empty($forum_page['item_nav'])) | 1615: ($hook = get_hook('mr_topic_loop_normal_topic_pre_item_nav_merge')) ? eval($hook) : null; |
1587: $forum_page['item_title']['nav'] = '<span class="item-nav">'.sprintf($lang_forum['Topic navigation'], implode('  ', $forum_page['item_nav'])).'</span>'; | |
1588: | |
1589: ($hook = get_hook('mr_topic_actions_moved_row_pre_item_title_merge')) ? eval($hook) : null; | |
1590: | 1616: |
1591: $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>'; |
1592: | 1619: |
1593: // Assemble the Topic subject | 1620: // Assemble the Topic subject |
1594: | 1621: |
1595: if ($cur_topic['sticky'] == '1') | 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>'; |
1596: { | |
1597: $forum_page['item_subject_status']['sticky'] = $lang_forum['Sticky']; | |
1598: $forum_page['item_status']['sticky'] = 'sticky'; | |
1599: } | |
1600: | |
1601: if ($cur_topic['closed'] == '1') | |
1602: { | |
1603: $forum_page['item_subject_status']['closed'] = $lang_forum['Closed']; | |
1604: $forum_page['item_status']['closed'] = 'closed'; | |
1605: } | |
1606: | |
1607: ($hook = get_hook('mr_topic_actions_moved_row_pre_item_subject_status_merge')) ? eval($hook) : null; | |
1608: | |
1609: if (!empty($forum_page['item_subject_status'])) | |
1610: $forum_page['item_subject']['status'] = '<span class="item-status">'.sprintf($lang_forum['Item status'], implode(' ', $forum_page['item_subject_status'])).'</span>'; | |
1611: | |
1612: if (empty($forum_page['item_status'])) | |
1613: $forum_page['item_status']['normal'] = 'normal'; | |
1614: | 1623: |
1615: if ($forum_config['o_topic_views'] == '1') | 1624: if ($forum_config['o_topic_views'] == '1') |
1616: $forum_page['item_body']['info']['views'] = '<li class="info-views"><strong>'.forum_number_format($cur_topic['num_views']).'</strong> <span class="label">'.(($cur_topic['num_views'] == 1) ? $lang_forum['View'] : $lang_forum['Views']).'</span></li>'; | 1625: $forum_page['item_body']['info']['views'] = '<li class="info-views"><strong>'.forum_number_format($cur_topic['num_views']).'</strong> <span class="label">'.(($cur_topic['num_views'] == 1) ? $lang_forum['View'] : $lang_forum['Views']).'</span></li>'; |
1617: | 1626: |
1618: $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>'; | |
1619: $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_topic['last_post_id']).'">'.format_time($cur_topic['last_post']).'</a></strong> <cite>'.sprintf($lang_forum['by poster'], forum_htmlencode($cur_topic['last_poster'])).'</cite></li>'; | 1627: $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_topic['last_post_id']).'">'.format_time($cur_topic['last_post']).'</a></strong> <cite>'.sprintf($lang_forum['by poster'], forum_htmlencode($cur_topic['last_poster'])).'</cite></li>'; |
1620: $forum_page['item_body']['info']['select'] = '<li class="info-select"><input id="fld'.++$forum_page['fld_count'].'" type="checkbox" name="topics[]" value="'.$cur_topic['id'].'" /> <label for="fld'.$forum_page['fld_count'].'">'.sprintf($lang_forum['Select topic'], $cur_topic['subject']).'</label></li>'; | 1628: $forum_page['item_body']['info']['select'] = '<li class="info-select"><input id="fld'.++$forum_page['fld_count'].'" type="checkbox" name="topics[]" value="'.$cur_topic['id'].'" /> <label for="fld'.$forum_page['fld_count'].'">'.sprintf($lang_forum['Select topic'], forum_htmlencode($cur_topic['subject'])).'</label></li>'; |
1621: | 1629: |
1622: ($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; |
1623: } | 1631: } |
1624: | 1632: |
1625: $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>'; |
1626: $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; |
1627: | 1636: |
1628: $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']) : ''); |
1629: | 1638: |
punbb-1.3/post.php |
punbb-1.3.4/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: */ |
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: |
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) |
426: <?php ($hook = get_hook('po_pre_guest_username')) ? eval($hook) : null; ?> | 431: <?php ($hook = get_hook('po_pre_guest_username')) ? eval($hook) : null; ?> |
427: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 432: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
428: <div class="sf-box text required"> | 433: <div class="sf-box text required"> |
429: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><em><?php echo $lang_common['Required'] ?></em> <?php echo $lang_post['Guest name'] ?></span></label><br /> | 434: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_post['Guest name'] ?> <em><?php echo $lang_common['Required'] ?></em></span></label><br /> |
430: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_username" value="<?php if (isset($_POST['req_username'])) echo forum_htmlencode($username); ?>" size="35" maxlength="25" /></span> | 435: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="req_username" value="<?php if (isset($_POST['req_username'])) echo forum_htmlencode($username); ?>" size="35" maxlength="25" /></span> |
431: </div> | 436: </div> |
432: </div> | 437: </div> |
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/profile.php |
punbb-1.3.4/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: */ |
123: ($forum_page['own_profile']) ? array($lang_profile['Change your password'], forum_link($forum_url['change_password'], $id)) : array(sprintf($lang_profile['Change user password'], forum_htmlencode($user['username'])),forum_link($forum_url['change_password']), $id) | 123: ($forum_page['own_profile']) ? array($lang_profile['Change your password'], forum_link($forum_url['change_password'], $id)) : array(sprintf($lang_profile['Change user password'], forum_htmlencode($user['username'])),forum_link($forum_url['change_password']), $id) |
124: ); | 124: ); |
125: | 125: |
126: // Setup headings | |
127: $forum_page['main_head'] = sprintf($lang_profile['Subform heading'], sprintf($lang_profile['Users profile'], forum_htmlencode($user['username'])), end($forum_page['crumbs'])); | |
128: | |
129: ($hook = get_hook('pf_change_pass_key_pre_header_load')) ? eval($hook) : null; | 126: ($hook = get_hook('pf_change_pass_key_pre_header_load')) ? eval($hook) : null; |
130: | 127: |
131: define('FORUM_PAGE', 'profile-changepass'); | 128: define('FORUM_PAGE', 'profile-changepass'); |
138: | 135: |
139: ?> | 136: ?> |
140: <div class="main-head"> | 137: <div class="main-head"> |
141: <h2 class="hn"><span><?php printf(($forum_user['id'] == $id) ? $lang_profile['Profile welcome'] : $lang_profile['Profile welcome user'], forum_htmlencode($user['username'])) ?></span></h2> | 138: <h2 class="hn"><span><?php echo $forum_page['own_profile'] ? $lang_profile['Change your password'] : sprintf($lang_profile['Change user password'], forum_htmlencode($user['username'])) ?></span></h2> |
142: </div> | 139: </div> |
143: <div class="main-content main-frm"> | 140: <div class="main-content main-frm"> |
144: <?php | 141: <?php |
179: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 176: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
180: <div class="sf-box text required"> | 177: <div class="sf-box text required"> |
181: <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 /> |
182: <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 /> |
183: </div> | 180: </div> |
184: </div> | 181: </div> |
185: <?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; ?> |
186: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 183: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
187: <div class="sf-box text required"> | 184: <div class="sf-box text required"> |
188: <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 /> |
189: <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 /> |
190: </div> | 187: </div> |
191: </div> | 188: </div> |
192: <?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; ?> |
290: ($forum_page['own_profile']) ? array($lang_profile['Change your password'], forum_link($forum_url['change_password'], $id)) : array(sprintf($lang_profile['Change user password'], forum_htmlencode($user['username'])),forum_link($forum_url['change_password'], $id)) | 287: ($forum_page['own_profile']) ? array($lang_profile['Change your password'], forum_link($forum_url['change_password'], $id)) : array(sprintf($lang_profile['Change user password'], forum_htmlencode($user['username'])),forum_link($forum_url['change_password'], $id)) |
291: ); | 288: ); |
292: | 289: |
293: // Setup headings | |
294: $forum_page['main_head'] = sprintf($lang_profile['Subform heading'], sprintf($lang_profile['Users profile'], forum_htmlencode($user['username'])), end($forum_page['crumbs'])); | |
295: | |
296: ($hook = get_hook('pf_change_pass_normal_pre_header_load')) ? eval($hook) : null; | 290: ($hook = get_hook('pf_change_pass_normal_pre_header_load')) ? eval($hook) : null; |
297: | 291: |
298: define('FORUM_PAGE', 'profile-changepass'); | 292: define('FORUM_PAGE', 'profile-changepass'); |
305: | 299: |
306: ?> | 300: ?> |
307: <div class="main-head"> | 301: <div class="main-head"> |
308: <h2 class="hn"><span><?php printf(($forum_user['id'] == $id) ? $lang_profile['Profile welcome'] : $lang_profile['Profile welcome user'], forum_htmlencode($user['username'])) ?></span></h2> | 302: <h2 class="hn"><span><?php echo $forum_page['own_profile'] ? $lang_profile['Change your password'] : sprintf($lang_profile['Change user password'], forum_htmlencode($user['username'])) ?></span></h2> |
309: </div> | 303: </div> |
310: <div class="main-content main-frm"> | 304: <div class="main-content main-frm"> |
311: <?php | 305: <?php |
343: <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> |
344: <?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; ?> |
345: <?php if (!$forum_user['is_admmod']): ?> | 339: <?php if (!$forum_user['is_admmod']): ?> |
346: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 340: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
347: <div class="sf-box text required"> | 341: <div class="sf-box text required"> |
348: <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 /> |
349: <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> |
350: </div> | 344: </div> |
351: </div> | 345: </div> |
352: <?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; ?> |
353: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 347: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
354: <div class="sf-box text required"> | 348: <div class="sf-box text required"> |
355: <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 /> |
356: <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 /> |
357: </div> | 351: </div> |
358: </div> | 352: </div> |
359: <?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; ?> |
360: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 354: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
361: <div class="sf-box text required"> | 355: <div class="sf-box text required"> |
362: <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 /> |
363: <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 /> |
364: </div> | 358: </div> |
365: </div> | 359: </div> |
366: <?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; ?> |
436: if (!is_valid_email($new_email)) | 430: if (!is_valid_email($new_email)) |
437: $errors[] = $lang_common['Invalid e-mail']; | 431: $errors[] = $lang_common['Invalid e-mail']; |
438: | 432: |
439: // Check it it's a banned e-mail address | 433: // Check if it's a banned e-mail address |
440: if (is_banned_email($new_email)) | 434: if (is_banned_email($new_email)) |
441: { | 435: { |
442: ($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; |
482: // Did everything go according to plan? | 476: // Did everything go according to plan? |
483: if (empty($errors)) | 477: if (empty($errors)) |
484: { | 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: |
485: $new_email_key = random_key(8, true); | 496: $new_email_key = random_key(8, true); |
486: | 497: |
487: // Save new e-mail and activation key | 498: // Save new e-mail and activation key |
537: ($forum_page['own_profile']) ? array($lang_profile['Change your e-mail'], forum_link($forum_url['change_email'], $id)) : array(sprintf($lang_profile['Change user e-mail'], forum_htmlencode($user['username'])), forum_link($forum_url['change_email'], $id)) | 548: ($forum_page['own_profile']) ? array($lang_profile['Change your e-mail'], forum_link($forum_url['change_email'], $id)) : array(sprintf($lang_profile['Change user e-mail'], forum_htmlencode($user['username'])), forum_link($forum_url['change_email'], $id)) |
538: ); | 549: ); |
539: | 550: |
540: // Setup headings | |
541: $forum_page['main_head'] = sprintf($lang_profile['Subform heading'], sprintf($lang_profile['Users profile'], forum_htmlencode($user['username'])), end($forum_page['crumbs'])); | |
542: | |
543: ($hook = get_hook('pf_change_email_normal_pre_header_load')) ? eval($hook) : null; | 551: ($hook = get_hook('pf_change_email_normal_pre_header_load')) ? eval($hook) : null; |
544: | 552: |
545: define('FORUM_PAGE', 'profile-changemail'); | 553: define('FORUM_PAGE', 'profile-changemail'); |
602: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 610: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
603: <div class="sf-box text required"> | 611: <div class="sf-box text required"> |
604: <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 /> |
605: <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> |
606: </div> | 614: </div> |
607: </div> | 615: </div> |
608: <?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; ?> |
668: array($lang_profile['Delete user'], forum_link($forum_url['delete_user'], $id)) | 676: array($lang_profile['Delete user'], forum_link($forum_url['delete_user'], $id)) |
669: ); | 677: ); |
670: | 678: |
671: // Setup headings | |
672: $forum_page['main_head'] = array( | |
673: 'head' => '<h1 class="hn"><span>'.sprintf($lang_profile['Subform heading'], sprintf($lang_profile['Users profile'], forum_htmlencode($user['username'])), end($forum_page['crumbs'])).'</span></h1>' | |
674: ); | |
675: | |
676: ($hook = get_hook('pf_delete_user_pre_header_load')) ? eval($hook) : null; | 679: ($hook = get_hook('pf_delete_user_pre_header_load')) ? eval($hook) : null; |
677: | 680: |
678: define('FORUM_PAGE', 'dialogue'); | 681: define('FORUM_PAGE', 'dialogue'); |
903: $form['num_posts'] = intval($_POST['num_posts']); | 906: $form['num_posts'] = intval($_POST['num_posts']); |
904: } | 907: } |
905: | 908: |
906: if ($forum_config['o_regs_verify'] == '0' || $forum_user['is_admmod']) | 909: if ($forum_user['is_admmod']) |
907: { | 910: { |
908: if (!defined('FORUM_EMAIL_FUNCTIONS_LOADED')) | 911: if (!defined('FORUM_EMAIL_FUNCTIONS_LOADED')) |
909: require FORUM_ROOT.'include/email.php'; | 912: require FORUM_ROOT.'include/email.php'; |
1298: $forum_user['g_id'] != FORUM_ADMIN && | 1301: $forum_user['g_id'] != FORUM_ADMIN && |
1299: ($forum_user['g_moderator'] != '1' || $forum_user['g_mod_edit_users'] == '0' || $user['g_id'] == FORUM_ADMIN || $user['g_moderator'] == '1')) | 1302: ($forum_user['g_moderator'] != '1' || $forum_user['g_mod_edit_users'] == '0' || $user['g_id'] == FORUM_ADMIN || $user['g_moderator'] == '1')) |
1300: { | 1303: { |
1301: ($hook = get_hook('pf_view_details_selected')) ? eval($hook) : null; | |
1302: | |
1303: // Setup user identification | 1304: // Setup user identification |
1304: $forum_page['user_ident'] = array(); | 1305: $forum_page['user_ident'] = array(); |
1305: | 1306: |
1306: ($hook = get_hook('pf_view_details_selected')) ? eval($hook) : null; | 1307: ($hook = get_hook('pf_view_details_selected')) ? eval($hook) : null; |
1307: | 1308: |
1308: $forum_page['user_ident']['username'] = '<li class="username'.(($user['realname'] =='') ? ' fn nickname' : ' nickname').'"><strong>'.forum_htmlencode($user['username']).'</strong></li>'; | 1309: $forum_page['user_ident']['username'] = '<li class="username'.(($user['realname'] =='') ? ' fn nickname' : ' nickname').'"><strong>'.forum_htmlencode($user['username']).'</strong></li>'; |
1309: $forum_page['user_ident']['usertitle'] = '<li class="usertitle"><span>'.get_title($user).'</span></li>'; | |
1310: | 1310: |
1311: if ($forum_config['o_avatars'] == '1') | 1311: if ($forum_config['o_avatars'] == '1') |
1312: { | 1312: { |
1316: $forum_page['user_ident']['avatar'] = '<li class="useravatar">'.$forum_page['avatar_markup'].'</li>'; | 1316: $forum_page['user_ident']['avatar'] = '<li class="useravatar">'.$forum_page['avatar_markup'].'</li>'; |
1317: } | 1317: } |
1318: | 1318: |
| 1319: $forum_page['user_ident']['usertitle'] = '<li class="usertitle"><span>'.get_title($user).'</span></li>'; |
| 1320: |
1319: // Setup user information | 1321: // Setup user information |
1320: $forum_page['user_info'] = array(); | 1322: $forum_page['user_info'] = array(); |
1321: | 1323: |
1421: </ul> | 1423: </ul> |
1422: </div> | 1424: </div> |
1423: </div> | 1425: </div> |
1424: <?php ($hook = get_hook('pf_view_details_pre_user_activity_info')) ? eval($hook) : null; ?> | 1426: <?php endif; ($hook = get_hook('pf_view_details_pre_user_activity_info')) ? eval($hook) : null; ?> |
1425: <?php endif; if (!empty($forum_page['user_activity'])): ?> | 1427: <?php if (!empty($forum_page['user_activity'])): ?> |
1426: <div class="ct-set data-set set<?php echo ++$forum_page['item_count'] ?>"> | 1428: <div class="ct-set data-set set<?php echo ++$forum_page['item_count'] ?>"> |
1427: <div class="ct-box data-box"> | 1429: <div class="ct-box data-box"> |
1428: <h3 class="ct-legend hn"><span><?php echo $lang_profile['Posts and topics'] ?></span></h3> | 1430: <h3 class="ct-legend hn"><span><?php echo $lang_profile['Posts and topics'] ?></span></h3> |
1431: </ul> | 1433: </ul> |
1432: </div> | 1434: </div> |
1433: </div> | 1435: </div> |
1434: <?php ($hook = get_hook('pf_view_details_pre_user_sig_info')) ? eval($hook) : null; ?> | 1436: <?php endif; ($hook = get_hook('pf_view_details_pre_user_sig_info')) ? eval($hook) : null; ?> |
1435: <?php endif; if (isset($forum_page['sig_demo'])): ?> | 1437: <?php if (isset($forum_page['sig_demo'])): ?> |
1436: <div class="ct-set data-set set<?php echo ++$forum_page['item_count'] ?>"> | 1438: <div class="ct-set data-set set<?php echo ++$forum_page['item_count'] ?>"> |
1437: <div class="ct-box data-box"> | 1439: <div class="ct-box data-box"> |
1438: <h3 class="ct-legend hn"><span><?php echo $lang_profile['Current signature'] ?></span></h3> | 1440: <h3 class="ct-legend hn"><span><?php echo $lang_profile['Current signature'] ?></span></h3> |
1500: ($hook = get_hook('pf_change_details_about_selected')) ? eval($hook) : null; | 1502: ($hook = get_hook('pf_change_details_about_selected')) ? eval($hook) : null; |
1501: | 1503: |
1502: $forum_page['user_ident']['username'] = '<li class="username'.(($user['realname'] =='') ? ' fn nickname' : ' nickname').'"><strong>'.forum_htmlencode($user['username']).'</strong></li>'; | 1504: $forum_page['user_ident']['username'] = '<li class="username'.(($user['realname'] =='') ? ' fn nickname' : ' nickname').'"><strong>'.forum_htmlencode($user['username']).'</strong></li>'; |
1503: $forum_page['user_ident']['usertitle'] = '<li class="usertitle"><span>'.get_title($user).'</span></li>'; | |
1504: | 1505: |
1505: if ($forum_config['o_avatars'] == '1') | 1506: if ($forum_config['o_avatars'] == '1') |
1506: { | 1507: { |
1510: $forum_page['user_ident']['avatar'] = '<li class="useravatar">'.$forum_page['avatar_markup'].'</li>'; | 1511: $forum_page['user_ident']['avatar'] = '<li class="useravatar">'.$forum_page['avatar_markup'].'</li>'; |
1511: } | 1512: } |
1512: | 1513: |
| 1514: $forum_page['user_ident']['usertitle'] = '<li class="usertitle"><span>'.get_title($user).'</span></li>'; |
| 1515: |
1513: // Create array for private information | 1516: // Create array for private information |
1514: $forum_page['user_private'] = array(); | 1517: $forum_page['user_private'] = array(); |
1515: | 1518: |
1563: | 1566: |
1564: // Setup user messaging | 1567: // Setup user messaging |
1565: if ($user['jabber'] !='') | 1568: if ($user['jabber'] !='') |
1566: $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>'; | 1569: $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>'; |
1567: if ($user['icq'] !='') | 1570: if ($user['icq'] !='') |
1568: $forum_page['user_contact']['icq'] = '<li><span><strong>'.$lang_profile['ICQ'].':</strong> '.forum_htmlencode($user['icq']).'</span></li>'; | 1571: $forum_page['user_contact']['icq'] = '<li><span>'.$lang_profile['ICQ'].': <strong>'.forum_htmlencode($user['icq']).'</strong></span></li>'; |
1569: if ($user['msn'] !='') | 1572: if ($user['msn'] !='') |
1570: $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>'; | 1573: $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>'; |
1571: if ($user['aim'] !='') | 1574: if ($user['aim'] !='') |
1572: $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>'; | 1575: $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>'; |
1573: if ($user['yahoo'] !='') | 1576: if ($user['yahoo'] !='') |
1574: $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>'; | 1577: $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>'; |
1575: | 1578: |
1576: // Setup signature demo | 1579: // Setup signature demo |
1577: if ($forum_config['o_signatures'] == '1' && isset($parsed_signature)) | 1580: if ($forum_config['o_signatures'] == '1' && isset($parsed_signature)) |
1594: if ($forum_page['own_profile'] || $forum_user['g_id'] == FORUM_ADMIN || ($forum_user['g_moderator'] == '1' && $forum_user['g_mod_change_passwords'] == '1')) | 1597: if ($forum_page['own_profile'] || $forum_user['g_id'] == FORUM_ADMIN || ($forum_user['g_moderator'] == '1' && $forum_user['g_mod_change_passwords'] == '1')) |
1595: $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>'; | 1598: $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>'; |
1596: | 1599: |
1597: if (!$forum_user['is_admmod'] && $forum_config['o_regs_verify'] == '1') | 1600: if (!$forum_user['is_admmod']) |
1598: $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>'; | 1601: $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>'; |
1599: | 1602: |
1600: // Setup headings | |
1601: $forum_page['main_head'] = sprintf($lang_profile['Subform heading'], forum_htmlencode(end($forum_page['crumbs'][0])), $lang_profile['Section about']); | |
1602: | |
1603: $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0; | 1603: $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0; |
1604: | 1604: |
1605: ($hook = get_hook('pf_change_details_about_pre_header_load')) ? eval($hook) : null; | 1605: ($hook = get_hook('pf_change_details_about_pre_header_load')) ? eval($hook) : null; |
1707: $forum_page['hidden_fields']['old_username'] = '<input type="hidden" name="old_username" value="'.forum_htmlencode($user['username']).'" />'; | 1707: $forum_page['hidden_fields']['old_username'] = '<input type="hidden" name="old_username" value="'.forum_htmlencode($user['username']).'" />'; |
1708: | 1708: |
1709: // Does the form have required fields | 1709: // Does the form have required fields |
1710: $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); | 1710: $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); |
1711: | |
1712: // Setup headings | |
1713: $forum_page['main_head'] = sprintf($lang_profile['Subform heading'], forum_htmlencode(end($forum_page['crumbs'][0])), $lang_profile['Section identity']); | |
1714: | 1711: |
1715: ($hook = get_hook('pf_change_details_identity_pre_header_load')) ? eval($hook) : null; | 1712: ($hook = get_hook('pf_change_details_identity_pre_header_load')) ? eval($hook) : null; |
1716: | 1713: |
1770: </div> | 1767: </div> |
1771: </div> | 1768: </div> |
1772: <?php endif; ($hook = get_hook('pf_change_details_identity_pre_email')) ? eval($hook) : null; ?> | 1769: <?php endif; ($hook = get_hook('pf_change_details_identity_pre_email')) ? eval($hook) : null; ?> |
1773: <?php if ($forum_user['is_admmod'] || $forum_config['o_regs_verify'] != '1'): ?> | 1770: <?php if ($forum_user['is_admmod']): ?> |
1774: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 1771: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
1775: <div class="sf-box text required"> | 1772: <div class="sf-box text required"> |
1776: <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 /> | 1773: <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 /> |
1925: 'csrf_token' => '<input type="hidden" name="csrf_token" value="'.generate_form_token($forum_page['form_action']).'" />' | 1922: 'csrf_token' => '<input type="hidden" name="csrf_token" value="'.generate_form_token($forum_page['form_action']).'" />' |
1926: ); | 1923: ); |
1927: | 1924: |
1928: // Setup headings | |
1929: $forum_page['main_head'] = sprintf($lang_profile['Subform heading'], forum_htmlencode(end($forum_page['crumbs'][0])), $lang_profile['Section settings']); | |
1930: | |
1931: ($hook = get_hook('pf_change_details_settings_pre_header_load')) ? eval($hook) : null; | 1925: ($hook = get_hook('pf_change_details_settings_pre_header_load')) ? eval($hook) : null; |
1932: | 1926: |
1933: define('FORUM_PAGE', 'profile-settings'); | 1927: define('FORUM_PAGE', 'profile-settings'); |
2283: if ($forum_config['o_smilies_sig'] == '1') | 2277: if ($forum_config['o_smilies_sig'] == '1') |
2284: $forum_page['text_options']['smilies'] = '<span'.(empty($forum_page['text_options']) ? ' class="first-item"' : '').'><a class="exthelp" href="'.forum_link($forum_url['help'], 'smilies').'" title="'.sprintf($lang_common['Help page'], $lang_common['Smilies']).'">'.$lang_common['Smilies'].'</a></span>'; | 2278: $forum_page['text_options']['smilies'] = '<span'.(empty($forum_page['text_options']) ? ' class="first-item"' : '').'><a class="exthelp" href="'.forum_link($forum_url['help'], 'smilies').'" title="'.sprintf($lang_common['Help page'], $lang_common['Smilies']).'">'.$lang_common['Smilies'].'</a></span>'; |
2285: | 2279: |
2286: // Setup headings | |
2287: $forum_page['main_head'] = sprintf($lang_profile['Subform heading'], forum_htmlencode(end($forum_page['crumbs'][0])), $lang_profile['Section signature']); | |
2288: | |
2289: ($hook = get_hook('pf_change_details_signature_pre_header_load')) ? eval($hook) : null; | 2280: ($hook = get_hook('pf_change_details_signature_pre_header_load')) ? eval($hook) : null; |
2290: | 2281: |
2291: define('FORUM_PAGE', 'profile-signature'); | 2282: define('FORUM_PAGE', 'profile-signature'); |
2407: $forum_page['frm_info']['avatar_size'] = '<li><span>'.sprintf($lang_profile['Avatar info size'], $forum_config['o_avatars_width'], $forum_config['o_avatars_height'], forum_number_format($forum_config['o_avatars_size']), forum_number_format(ceil($forum_config['o_avatars_size'] / 1024))).'</span></li>'; | 2398: $forum_page['frm_info']['avatar_size'] = '<li><span>'.sprintf($lang_profile['Avatar info size'], $forum_config['o_avatars_width'], $forum_config['o_avatars_height'], forum_number_format($forum_config['o_avatars_size']), forum_number_format(ceil($forum_config['o_avatars_size'] / 1024))).'</span></li>'; |
2408: } | 2399: } |
2409: | 2400: |
2410: // Setup headings | |
2411: $forum_page['main_head'] = sprintf($lang_profile['Subform heading'], forum_htmlencode(end($forum_page['crumbs'][0])), $lang_profile['Section avatar']); | |
2412: | |
2413: ($hook = get_hook('pf_change_details_avatar_pre_header_load')) ? eval($hook) : null; | 2401: ($hook = get_hook('pf_change_details_avatar_pre_header_load')) ? eval($hook) : null; |
2414: | 2402: |
2415: define('FORUM_PAGE', 'profile-avatar'); | 2403: define('FORUM_PAGE', 'profile-avatar'); |
2532: $forum_page['user_management']['delete'] = '<div class="ct-set set'.++$forum_page['item_count'].'">'."\n\t\t\t\t".'<div class="ct-box">'."\n\t\t\t\t\t".'<h3 class="ct-legend hn">'.$lang_profile['Delete user'].'</h3>'."\n\t\t\t\t".'<p><a href="'.forum_link($forum_url['delete_user'], $id).'">'.$lang_profile['Delete user info'].'</a></p>'."\n\t\t\t\t".'</div>'."\n\t\t\t".'</div>'; | 2520: $forum_page['user_management']['delete'] = '<div class="ct-set set'.++$forum_page['item_count'].'">'."\n\t\t\t\t".'<div class="ct-box">'."\n\t\t\t\t\t".'<h3 class="ct-legend hn">'.$lang_profile['Delete user'].'</h3>'."\n\t\t\t\t".'<p><a href="'.forum_link($forum_url['delete_user'], $id).'">'.$lang_profile['Delete user info'].'</a></p>'."\n\t\t\t\t".'</div>'."\n\t\t\t".'</div>'; |
2533: } | 2521: } |
2534: | 2522: |
2535: // Setup headings | |
2536: $forum_page['main_head'] = sprintf($lang_profile['Subform heading'], forum_htmlencode(end($forum_page['crumbs'][0])), $lang_profile['Section admin']); | |
2537: | |
2538: ($hook = get_hook('pf_change_details_admin_pre_header_load')) ? eval($hook) : null; | 2523: ($hook = get_hook('pf_change_details_admin_pre_header_load')) ? eval($hook) : null; |
2539: | 2524: |
2540: define('FORUM_PAGE', 'profile-admin'); | 2525: define('FORUM_PAGE', 'profile-admin'); |
2564: | 2549: |
2565: echo "\t\t\t".implode("\n\t\t\t", $forum_page['user_management'])."\n"; | 2550: echo "\t\t\t".implode("\n\t\t\t", $forum_page['user_management'])."\n"; |
2566: | 2551: |
2567: ($hook = get_hook('pf_change_details_admin_pre_group_membership')) ? eval($hook) : null; | 2552: ($hook = get_hook('pf_change_details_admin_pre_membership')) ? eval($hook) : null; |
2568: | 2553: |
2569: if ($forum_user['g_moderator'] != '1' && !$forum_page['own_profile']) | 2554: if ($forum_user['g_moderator'] != '1' && !$forum_page['own_profile']) |
2570: { | 2555: { |
punbb-1.3/search.php |
punbb-1.3.4/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: |
316: $forum_page['item_status']['posted'] = 'posted'; | 315: $forum_page['item_status']['posted'] = 'posted'; |
317: } | 316: } |
318: | 317: |
319: $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>'; | 318: if ($cur_set['sticky'] == '1') |
320: | 319: { |
321: $forum_page['item_pages'] = ceil(($cur_set['num_replies'] + 1) / $forum_user['disp_posts']); | 320: $forum_page['item_title_status']['sticky'] = '<em class="sticky">'.$lang_forum['Sticky'].'</em>'; |
322: | 321: $forum_page['item_status']['sticky'] = 'sticky'; |
323: if ($forum_page['item_pages'] > 1) | 322: } |
324: $forum_page['item_nav']['pages'] = '<span>'.$lang_forum['Pages'].' </span>'.paginate($forum_page['item_pages'], -1, $forum_url['topic'], $lang_common['Page separator'], array($cur_set['tid'], sef_friendly($cur_set['subject']))); | |
325: | 323: |
326: // Does this topic contain posts we haven't read? If so, tag it accordingly. | 324: if ($cur_set['closed'] != '0') |
327: if (!$forum_user['is_guest'] && $cur_set['last_post'] > $forum_user['last_visit'] && (!isset($tracked_topics['topics'][$cur_set['tid']]) || $tracked_topics['topics'][$cur_set['tid']] < $cur_set['last_post']) && (!isset($tracked_topics['forums'][$cur_set['forum_id']]) || $tracked_topics['forums'][$cur_set['forum_id']] < $cur_set['last_post'])) | |
328: { | 325: { |
329: $forum_page['item_nav']['new'] = '<em class="item-newposts"><a href="'.forum_link($forum_url['topic_new_posts'], array($cur_set['tid'], sef_friendly($cur_set['subject']))).'" title="'.$lang_forum['New posts info'].'">'.$lang_forum['New posts'].'</a></em>'; | 326: $forum_page['item_title_status']['closed'] = '<em class="closed">'.$lang_forum['Closed'].'</em>'; |
330: $forum_page['item_status']['new'] = 'new'; | 327: $forum_page['item_status']['closed'] = 'closed'; |
331: } | 328: } |
332: | 329: |
333: ($hook = get_hook('se_results_topics_row_pre_item_nav_merge')) ? eval($hook) : null; | 330: ($hook = get_hook('se_results_topics_row_pre_item_subject_status_merge')) ? eval($hook) : null; |
334: | 331: |
335: if (!empty($forum_page['item_nav'])) | 332: if (!empty($forum_page['item_title_status'])) |
336: $forum_page['item_title']['nav'] = '<span class="item-nav">'.sprintf($lang_forum['Topic navigation'], implode('  ', $forum_page['item_nav'])).'</span>'; | 333: $forum_page['item_title']['status'] = '<span class="item-status">'.sprintf($lang_forum['Item status'], implode(', ', $forum_page['item_title_status'])).'</span>'; |
| 334: |
| 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: |
338: ($hook = get_hook('se_results_topics_row_pre_item_title_merge')) ? eval($hook) : null; | 337: ($hook = get_hook('se_results_topics_row_pre_item_title_merge')) ? eval($hook) : null; |
339: | 338: |
340: $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>'; | 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>'; |
341: | 340: |
| 341: $forum_page['item_pages'] = ceil(($cur_set['num_replies'] + 1) / $forum_user['disp_posts']); |
342: | 342: |
343: if ($cur_set['sticky'] == '1') | 343: if ($forum_page['item_pages'] > 1) |
344: { | 344: $forum_page['item_nav']['pages'] = '<span>'.$lang_forum['Pages'].' </span>'.paginate($forum_page['item_pages'], -1, $forum_url['topic'], $lang_common['Page separator'], array($cur_set['tid'], sef_friendly($cur_set['subject']))); |
345: $forum_page['item_subject_status']['sticky'] = $lang_forum['Sticky']; | |
346: $forum_page['item_status']['sticky'] = 'sticky'; | |
347: } | |
348: | 345: |
349: if ($cur_set['closed'] != '0') | 346: // Does this topic contain posts we haven't read? If so, tag it accordingly. |
| 347: if (!$forum_user['is_guest'] && $cur_set['last_post'] > $forum_user['last_visit'] && (!isset($tracked_topics['topics'][$cur_set['tid']]) || $tracked_topics['topics'][$cur_set['tid']] < $cur_set['last_post']) && (!isset($tracked_topics['forums'][$cur_set['forum_id']]) || $tracked_topics['forums'][$cur_set['forum_id']] < $cur_set['last_post'])) |
350: { | 348: { |
351: $forum_page['item_subject_status']['closed'] = $lang_forum['Closed']; | 349: $forum_page['item_nav']['new'] = '<em class="item-newposts"><a href="'.forum_link($forum_url['topic_new_posts'], array($cur_set['tid'], sef_friendly($cur_set['subject']))).'" title="'.$lang_forum['New posts info'].'">'.$lang_forum['New posts'].'</a></em>'; |
352: $forum_page['item_status']['closed'] = 'closed'; | 350: $forum_page['item_status']['new'] = 'new'; |
353: } | 351: } |
354: | 352: |
355: ($hook = get_hook('se_results_topics_row_pre_item_subject_status_merge')) ? eval($hook) : null; | 353: ($hook = get_hook('se_results_topics_row_pre_item_nav_merge')) ? eval($hook) : null; |
356: | 354: |
357: if (!empty($forum_page['item_subject_status'])) | 355: $forum_page['item_subject']['starter'] = '<span class="item-starter">'.sprintf($lang_forum['Topic starter'], forum_htmlencode($cur_set['poster'])).'</span>'; |
358: $forum_page['item_subject']['status'] = '<span class="item-status">'.sprintf($lang_forum['Item status'], implode(' ', $forum_page['item_subject_status'])).'</span>'; | |
359: | 356: |
360: $forum_page['item_subject']['starter'] = '<span class="item-starter">'.sprintf($lang_forum['Topic starter'], '<cite>'.forum_htmlencode($cur_set['poster']).'</cite>').'</span>'; | 357: if (!empty($forum_page['item_nav'])) |
| 358: $forum_page['item_subject']['nav'] = '<span class="item-nav">'.sprintf($lang_forum['Topic navigation'], implode('  ', $forum_page['item_nav'])).'</span>'; |
361: | 359: |
362: ($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; |
363: | 361: |
364: $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>'; |
365: | 363: |
366: if (empty($forum_page['item_status'])) | 364: if (empty($forum_page['item_status'])) |
367: $forum_page['item_status']['normal'] = 'normal'; | 365: $forum_page['item_status']['normal'] = 'normal'; |
370: | 368: |
371: $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']) : ''); |
372: | 370: |
373: $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>'; |
374: $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>'; |
375: $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>'; |
376: | 374: |
394: ?> | 392: ?> |
395: </div> | 393: </div> |
396: | 394: |
397: <div class="main-foot"> | 395: <div class="main-foot"> |
398: <?php | 396: <?php |
399: | 397: |
400: if (!empty($forum_page['main_foot_options'])) | 398: if (!empty($forum_page['main_foot_options'])) |
401: 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>'; |
402: | 400: |
403: ?> | 401: ?> |
404: <p><?php echo $forum_page['items_info'] ?></p> | 402: <h2 class="hn"><span><?php echo $forum_page['items_info'] ?></span></h2> |
405: </div> | 403: </div> |
406: <?php | 404: <?php |
407: | 405: |
495: <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> |
496: </div> | 494: </div> |
497: </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> |
498: <?php ($hook = get_hook('se_pre_forum_fieldset')) ? eval($hook) : null; ?> | 507: <?php ($hook = get_hook('se_pre_forum_fieldset')) ? eval($hook) : null; ?> |
499: <fieldset class="mf-set set<?php echo ++$forum_page['item_count'] ?>"> | 508: <fieldset class="mf-set set<?php echo ++$forum_page['item_count'] ?>"> |
500: <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> |
punbb-1.3/style/Oxygen/Oxygen.css |
punbb-1.3.4/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: -------------------------------------------------------------*/ |
652: | 644: |
653: .brd .crumbs { | 645: .brd .crumbs { |
654: margin: 0.5em 0em; | 646: margin: 0.5em 0em; |
655: padding: 0em 1.5em; | 647: padding: 0em 1.417em; |
656: font-size: 1.084em; | 648: font-size: 1.084em; |
657: } | 649: } |
658: | 650: |
669: } | 661: } |
670: | 662: |
671: #brd-stats ul li.st-users { | 663: #brd-stats ul li.st-users { |
672: float: left; | 664: float: left; |
673: clear: both; | 665: clear: both; |
674: white-space: nowrap; | 666: white-space: nowrap; |
675: } | 667: } |
676: | 668: |
677: #brd-stats ul li.st-activity { | 669: #brd-stats ul li.st-activity { |
678: text-align: right; | 670: text-align: right; |
679: display: block; | 671: display: block; |
680: white-space: nowrap; | 672: white-space: nowrap; |
681: } | 673: } |
682: | 674: |
683: #brd-stats li strong { | 675: #brd-stats li strong { |
684: font-weight: bold; | 676: font-weight: bold; |
685: } | 677: } |
686: | 678: |
687: #brd-online { | 679: #brd-online { |
688: padding-top: 0.5em; | 680: padding-top: 0.5em; |
695: } | 687: } |
696: | 688: |
697: #brd-online .hn { | 689: #brd-online .hn { |
698: float: left; | 690: float: left; |
699: margin-right: 0.5em; | 691: margin-right: 0.5em; |
700: } | 692: } |
701: | 693: |
702: /* Footer | 694: /* Footer |
703: -------------------------------------------------------------*/ | 695: -------------------------------------------------------------*/ |
704: | 696: |
705: #brd-about p { | |
706: float: left; | |
707: margin: 0 1em; | |
708: } | |
709: | |
710: #brd-about #qjump { | 697: #brd-about #qjump { |
711: float: left; | 698: float: left; |
712: padding: 0.5em 0; | 699: padding: 0.5em 0; |
719: | 706: |
720: #brd-about #copyright { | 707: #brd-about #copyright { |
721: text-align: right; | 708: text-align: right; |
722: float: right; | |
723: margin: 0; | 709: margin: 0; |
724: } | 710: } |
725: | 711: |
726: #brd-about #querytime { | 712: #querytime { |
727: text-align: center; | 713: text-align: center; |
728: font-size: 0.9em; | 714: font-size: 0.9em; |
729: } | 715: } |
730: | 716: |
| 717: #extensions-used { |
| 718: border-bottom: 1px dotted; |
| 719: } |
| 720: |
731: /* Main and Content Options | 721: /* Main and Content Options |
732: -------------------------------------------------------------*/ | 722: -------------------------------------------------------------*/ |
733: | 723: |
786: padding: 0.5em 0; | 776: padding: 0.5em 0; |
787: white-space: nowrap; | 777: white-space: nowrap; |
788: font-weight: normal; | 778: font-weight: normal; |
789: text-transform: capitalize; | 779: } |
| 780: |
| 781: .brd .item-summary strong:first-letter { |
| 782: text-transform: uppercase; |
790: } | 783: } |
791: | 784: |
792: .brd .item-summary .subject-title { | 785: .brd .item-summary .subject-title { |
848: | 841: |
849: .brd .main-content .main-item p, | 842: .brd .main-content .main-item p, |
850: .brd .main-content .main-item .hn { | 843: .brd .main-content .main-item .hn { |
851: padding: 0; | 844: padding: 0; |
852: } | 845: } |
853: | 846: |
854: .brd .main-content .main-item .hn .item-status { | 847: .brd .main-content .main-item .hn .item-status { |
855: font-weight:normal; | 848: font-weight:normal; |
856: } | 849: } |
857: | 850: |
858: .brd .main-content .main-item .hn .item-status em { | 851: .brd .main-content .main-item .hn .item-status em { |
859: font-style:normal; | 852: font-style:normal; |
860: } | 853: } |
861: | 854: |
862: .brd .main-content .main-item .item-subject, | 855: .brd .main-content .main-item .item-subject, |
863: .brd .main-content .main-item li { | 856: .brd .main-content .main-item li { |
864: float: left; | 857: float: left; |
865: border-left-style: solid; | 858: border-left-style: solid; |
866: border-left-width: 1px; | 859: border-left-width: 1px; |
867: margin: 0 -2px -9.7em 0; | 860: margin: 0 -2px -9.7em 0; |
868: position: relative; | 861: position: relative; |
869: padding-top: 0.6em; | 862: padding-top: 0.6em; |
870: padding-bottom: 10.4em; | 863: padding-bottom: 10.4em; |
871: } | 864: } |
872: | 865: |
873: .brd .main-content .main-item .item-subject { | 866: .brd .main-content .main-item .item-subject { |
874: overflow: hidden; | 867: overflow: hidden; |
875: width: 100%; | 868: width: 100%; |
876: } | 869: } |
877: | 870: |
878: .brd .main-content .main-item li.info-topics, | 871: .brd .main-content .main-item li.info-topics, |
879: .brd .main-content .main-item li.info-forum, | 872: .brd .main-content .main-item li.info-forum, |
880: .brd .main-content .main-item li.info-posts, | 873: .brd .main-content .main-item li.info-posts, |
881: .brd .main-content .main-item li.info-views, | 874: .brd .main-content .main-item li.info-views, |
882: .brd .main-content .main-item li.info-replies { | 875: .brd .main-content .main-item li.info-replies { |
883: width: 7em; | 876: width: 7em; |
884: text-align:center; | 877: text-align: center; |
885: } | 878: } |
886: | 879: |
887: .brd .main-content .main-item li.info-forum { | 880: .brd .main-content .main-item li.info-forum { |
888: width: 20em; | 881: width: 20em; |
889: } | 882: } |
890: | 883: |
891: .brd .main-content .main-item li.info-lastpost { | 884: .brd .main-content .main-item li.info-lastpost { |
892: width: 20em; | 885: width: 20em; |
893: } | 886: } |
894: | 887: |
895: .brd .main-content .main-item li.info-lastpost cite { | 888: .brd .main-content .main-item li.info-lastpost cite { |
896: overflow: hidden; | 889: overflow: hidden; |
921: } | 914: } |
922: | 915: |
923: .brd .forum-noview .main-item { | 916: .brd .forum-noview .main-item { |
924: padding-right: 48em; | 917: padding-right: 28em; |
925: } | 918: } |
926: | 919: |
927: .brd .forum-noview .main-item ul { | 920: .brd .forum-noview .main-item ul { |
| 921: width: 27em; |
| 922: right: -28em; |
| 923: margin-left: -27em; |
| 924: } |
| 925: |
| 926: .brd .forum-forums .main-item { |
| 927: padding-right: 48em; |
| 928: } |
| 929: |
| 930: .brd .forum-forums .main-item ul { |
928: width: 47em; | 931: width: 47em; |
929: right: -48em; | 932: right: -48em; |
930: margin-left: -47em; | 933: margin-left: -47em; |
931: } | 934: } |
932: | 935: |
933: .brd .main-content .main-item .item-subject span.modlist { | 936: .brd .main-content .main-item .item-subject span.modlist { |
934: display: block; | 937: display: block; |
935: } | 938: } |
936: | 939: |
937: .brd .main-content .main-item .hn strong { | 940: .brd .main-content .main-item .hn strong { |
938: font-size: 1em; | 941: font-size: 1em; |
939: } | 942: } |
940: | 943: |
941: .brd .main-content .main-item .hn strong span { | 944: .brd .main-content .main-item .hn strong span { |
942: font-weight: normal; | 945: font-weight: normal; |
945: #brd-index .main-content .main-item .hn span { | 948: #brd-index .main-content .main-item .hn span { |
946: font-size: 1.084em; | 949: font-size: 1.084em; |
947: font-weight: bold; | 950: font-weight: bold; |
948: } | 951: } |
949: #brd-index .main-content .main-item .hn small { | 952: #brd-index .main-content .main-item .hn small { |
950: font-size: 1em; | 953: font-size: 1em; |
951: } | 954: } |
964: font-style: normal; | 967: font-style: normal; |
965: } | 968: } |
966: | 969: |
967: .brd .main-content .main-item .item-subject .hn { | 970: .brd .main-content .main-item .item-subject .hn, |
968: display:inline; | |
969: margin: 0 0 0 1.5em; | |
970: } | |
971: | |
972: .brd .main-content .main-item .item-subject p { | 971: .brd .main-content .main-item .item-subject p { |
973: margin: 0 0 0 1.5em; | 972: margin: 0 0 0 1.5em; |
974: } | 973: } |
975: | 974: |
976: .brd .main-content .main-item li.info-lastpost cite, | 975: .brd .main-content .main-item li.info-lastpost cite, |
977: .brd .main-content .main-item li.info-lastpost span { | 976: .brd .main-content .main-item li.info-lastpost span, |
978: display: block; | 977: .brd .main-content .main-item li.info-forum a { |
979: padding: 0 1em; | 978: display: block; |
980: font-style: normal; | 979: padding: 0 1em; |
981: font-weight: normal; | 980: font-style: normal; |
982: } | 981: font-weight: normal; |
| 982: } |
983: | 983: |
984: .brd .main-content .main-item li.info-lastpost strong { | 984: .brd .main-content .main-item li.info-lastpost strong { |
985: padding: 0 0 0 1em; | 985: padding: 0 0 0 1em; |
986: font-style: normal; | 986: font-style: normal; |
987: font-weight: normal; | 987: font-weight: normal; |
988: } | 988: } |
989: | 989: |
990: .brd .main-content .main-item li.info-select { | 990: .brd .main-content .main-item li.info-select { |
991: position: absolute; | 991: position: absolute; |
992: right: 0; | 992: right: 0; |
993: top: 0; | 993: top: 0; |
994: padding: 0.3em; | 994: padding: 0.3em; |
995: border-style: none none solid solid; | 995: border-style: none none solid solid; |
996: border-width: 1px; | 996: border-width: 1px; |
997: } | 997: } |
998: | 998: |
999: .brd .main-content .main-item .icon { | 999: .brd .main-content .main-item .icon { |
1000: border-style: solid; | 1000: border-style: solid; |
1001: border-width: 0.5833em; | 1001: border-width: 0.5833em; |
1002: height: 0; | 1002: height: 0; |
1003: width: 0; | 1003: width: 0; |
1004: float: left; | 1004: float: left; |
1005: margin-top: 0.667em; | 1005: margin-top: 0.667em; |
1006: margin-left: -2.417em; | 1006: margin-left: -2.417em; |
1007: } | 1007: } |
1008: | 1008: |
1009: .brd .main-content .main-item .hn .posted-mark { | 1009: .brd .main-content .main-item .hn .posted-mark { |
1010: position: absolute; | 1010: position: absolute; |
1011: font-size: 2em; | 1011: font-size: 2em; |
1012: width: 1em; | 1012: width: 1em; |
1013: left: -0.5em; | 1013: left: -0.5em; |
1014: top: 0; | 1014: top: 0; |
1015: } | 1015: } |
1016: | 1016: |
1017: /************************************************************* | 1017: /************************************************************* |
1018: F - MAIN CONTENT - FORMS | 1018: F - MAIN CONTENT - FORMS |
1157: | 1157: |
1158: .brd .mf-box .mf-item { | 1158: .brd .mf-box .mf-item { |
1159: position: relative; | 1159: position: relative; |
1160: top: -0.15em; | 1160: top: -0.166em; |
1161: padding: 0.25em 0; | 1161: padding: 0.25em 0; |
1162: } | 1162: } |
1163: | 1163: |
1416: margin-left: 18em; | 1416: margin-left: 18em; |
1417: border-style: none none none solid; | 1417: border-style: none none none solid; |
1418: border-width: 1px; | 1418: border-width: 1px; |
1419: zoom: 1; | |
1420: } | 1419: } |
1421: | 1420: |
1422: .brd .posthead .hn { | 1421: .brd .posthead .hn { |
1554: border-left-width: 0.7em; | 1553: border-left-width: 0.7em; |
1555: text-indent: 0.5em; | 1554: text-indent: 0.5em; |
1556: } | 1555: } |
1557: | 1556: .brd .postbody .author-info li span strong { |
| 1557: font-weight: normal; |
| 1558: } |
1558: .brd .online .author-ident .userstatus span { | 1559: .brd .online .author-ident .userstatus span { |
1559: font-weight: bold; | 1560: font-weight: bold; |
1560: } | 1561: } |
1626: padding: 1em 0.75em; | 1627: padding: 1em 0.75em; |
1627: } | 1628: } |
1628: | 1629: |
1629: .brd .entry-content .codebox code { | 1630: .brd .entry-content .codebox code, #brd-debug table .tcl, #brd-debug table .tcr { |
1630: font-family: monospace; | 1631: font-family: monospace; |
1631: } | 1632: } |
1632: | 1633: |
1709: text-align: center; | 1710: text-align: center; |
1710: } | 1711: } |
1711: | 1712: |
1712: #brd-debug table .tc0 { | 1713: #brd-debug table .tc1 { |
1713: white-space:normal; | 1714: white-space: normal; |
1714: width: 15%; | 1715: width: 10%; |
1715: } | 1716: } |
1716: | 1717: |
1717: #brd-debug table .tc1 { | 1718: #brd-debug table .tcr { |
1718: white-space: normal; | 1719: white-space: normal; |
1719: width: 90%; | 1720: width: 90%; |
1720: } | 1721: } |
punbb-1.3/userlist.php |
punbb-1.3.4/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']): ?> <option value="num_posts"<?php if ($forum_page['sort_by'] == 'num_posts') echo ' selected="selected"' ?>><?php echo $lang_ul['No of posts'] ?></option> | 184: <?php if ($forum_page['show_post_count']): ?> |
184: <?php endif; ($hook = get_hook('ul_new_sort_by_option')) ? eval($hook) : null; ?> </select></span> | 185: <option value="num_posts"<?php if ($forum_page['sort_by'] == 'num_posts') echo ' selected="selected"' ?>><?php echo $lang_ul['No of posts'] ?></option> |
| 186: <?php endif; ($hook = get_hook('ul_new_sort_by_option')) ? eval($hook) : null; ?> |
| 187: </select></span> |
185: </div> | 188: </div> |
186: </div> | 189: </div> |
187: <?php ($hook = get_hook('ul_pre_sort_order_fieldset')) ? eval($hook) : null; ?> | 190: <?php ($hook = get_hook('ul_pre_sort_order_fieldset')) ? eval($hook) : null; ?> |
310: echo "\n\t\t\t".'<p class="options">'.implode(' ', $forum_page['main_foot_options']).'</p>'; | 313: echo "\n\t\t\t".'<p class="options">'.implode(' ', $forum_page['main_foot_options']).'</p>'; |
311: | 314: |
312: ?> | 315: ?> |
313: <p><?php echo $forum_page['items_info'] ?></p> | 316: <h2 class="hn"><span><?php echo $forum_page['items_info'] ?></span></h2> |
314: </div> | 317: </div> |
315: <?php | 318: <?php |
316: | 319: |
punbb-1.3/viewforum.php |
punbb-1.3.4/viewforum.php |
2: /** | 2: /** |
3: * Lists the topics in the specified forum. | 3: * Lists the topics in 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: */ |
70: | 70: |
71: // Determine the topic offset (based on $_GET['p']) | 71: // Determine the topic offset (based on $_GET['p']) |
72: $forum_page['num_pages'] = ceil($cur_forum['num_topics'] / $forum_user['disp_topics']); | 72: $forum_page['num_pages'] = ceil($cur_forum['num_topics'] / $forum_user['disp_topics']); |
73: $forum_page['page'] = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : $_GET['p']; | 73: $forum_page['page'] = (!isset($_GET['p']) || !is_numeric($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : $_GET['p']; |
74: $forum_page['start_from'] = $forum_user['disp_topics'] * ($forum_page['page'] - 1); | 74: $forum_page['start_from'] = $forum_user['disp_topics'] * ($forum_page['page'] - 1); |
75: $forum_page['finish_at'] = min(($forum_page['start_from'] + $forum_user['disp_topics']), ($cur_forum['num_topics'])); | 75: $forum_page['finish_at'] = min(($forum_page['start_from'] + $forum_user['disp_topics']), ($cur_forum['num_topics'])); |
76: $forum_page['items_info'] = generate_items_info($lang_forum['Topics'], ($forum_page['start_from'] + 1), $cur_forum['num_topics']); | 76: $forum_page['items_info'] = generate_items_info($lang_forum['Topics'], ($forum_page['start_from'] + 1), $cur_forum['num_topics']); |
204: | 204: |
205: // Start from scratch | 205: // Start from scratch |
206: $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(); | 206: $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(); |
207: $forum_page['item_indicator'] = ''; | |
208: | 207: |
209: if ($forum_config['o_censoring'] == '1') | 208: if ($forum_config['o_censoring'] == '1') |
210: $cur_topic['subject'] = censor_words($cur_topic['subject']); | 209: $cur_topic['subject'] = censor_words($cur_topic['subject']); |
211: | 210: |
| 211: $forum_page['item_subject']['starter'] = '<span class="item-starter">'.sprintf($lang_forum['Topic starter'], forum_htmlencode($cur_topic['poster'])).'</span>'; |
| 212: |
212: if ($cur_topic['moved_to'] != null) | 213: if ($cur_topic['moved_to'] != null) |
213: { | 214: { |
214: $forum_page['item_status']['moved'] = 'moved'; | 215: $forum_page['item_status']['moved'] = 'moved'; |
215: $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>'; | 216: $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>'; |
216: | 217: |
217: // Combine everything to produce the Topic heading | 218: // Combine everything to produce the Topic heading |
218: $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>'.$forum_page['item_title']['link'].'</h3>'; | 219: $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>'.$forum_page['item_title']['link'].'</h3>'; |
259: | 260: |
260: $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>'; | 261: $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>'; |
261: | 262: |
262: // Assemble the Topic subject | |
263: | |
264: if (empty($forum_page['item_status'])) | 263: if (empty($forum_page['item_status'])) |
265: $forum_page['item_status']['normal'] = 'normal'; | 264: $forum_page['item_status']['normal'] = 'normal'; |
266: | 265: |
281: if (!empty($forum_page['item_nav'])) | 280: if (!empty($forum_page['item_nav'])) |
282: $forum_page['item_subject']['nav'] = '<span class="item-nav">'.sprintf($lang_forum['Topic navigation'], implode('  ', $forum_page['item_nav'])).'</span>'; | 281: $forum_page['item_subject']['nav'] = '<span class="item-nav">'.sprintf($lang_forum['Topic navigation'], implode('  ', $forum_page['item_nav'])).'</span>'; |
283: | 282: |
284: ($hook = get_hook('vf_topic_loop_normal_topic_pre_item_subject_merge')) ? eval($hook) : null; | 283: // Assemble the Topic subject |
285: | |
286: $forum_page['item_body']['subject']['desc'] = implode(' ', $forum_page['item_subject']); | |
287: | 284: |
288: $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>'; | 285: $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>'; |
289: | 286: |
293: $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_topic['last_post_id']).'">'.format_time($cur_topic['last_post']).'</a></strong> <cite>'.sprintf($lang_forum['by poster'], forum_htmlencode($cur_topic['last_poster'])).'</cite></li>'; | 290: $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_topic['last_post_id']).'">'.format_time($cur_topic['last_post']).'</a></strong> <cite>'.sprintf($lang_forum['by poster'], forum_htmlencode($cur_topic['last_poster'])).'</cite></li>'; |
294: } | 291: } |
295: | 292: |
296: $forum_page['item_subject']['starter'] = '<span class="item-starter">'.sprintf($lang_forum['Topic starter'], '<cite>'.forum_htmlencode($cur_topic['poster']).'</cite>').'</span>'; | 293: ($hook = get_hook('vf_row_pre_item_subject_merge')) ? eval($hook) : null; |
297: $forum_page['item_body']['subject']['desc'] = implode(' ', $forum_page['item_subject']); | 294: |
| 295: $forum_page['item_body']['subject']['desc'] = '<p>'.implode(' ', $forum_page['item_subject']).'</p>'; |
298: | 296: |
299: ($hook = get_hook('vf_row_pre_item_status_merge')) ? eval($hook) : null; | 297: ($hook = get_hook('vf_row_pre_item_status_merge')) ? eval($hook) : null; |
300: | 298: |
318: | 316: |
319: ?> | 317: ?> |
320: </div> | 318: </div> |
321: <div class="main-foot"> | 319: <div class="main-foot"> |
322: <?php | 320: <?php |
323: | 321: |
324: if (!empty($forum_page['main_foot_options'])) | 322: if (!empty($forum_page['main_foot_options'])) |
325: echo "\n\t\t\t".'<p class="options">'.implode(' ', $forum_page['main_foot_options']).'</p>'; | 323: echo "\n\t\t\t".'<p class="options">'.implode(' ', $forum_page['main_foot_options']).'</p>'; |
326: | 324: |
327: ?> | 325: ?> |
328: <p><?php echo $forum_page['items_info'] ?></p> | 326: <h2 class="hn"><span><?php echo $forum_page['items_info'] ?></span></h2> |
329: </div> | 327: </div> |
330: <?php | 328: <?php |
331: | 329: |
351: </div> | 349: </div> |
352: </div> | 350: </div> |
353: <div class="main-foot"> | 351: <div class="main-foot"> |
354: <p><?php echo $lang_forum['Empty forum'] ?></p> | 352: <h2 class="hn"><span><?php echo $lang_forum['Empty forum'] ?></span></h2> |
355: </div> | 353: </div> |
356: <?php | 354: <?php |
357: | 355: |
punbb-1.3/viewtopic.php |
punbb-1.3.4/viewtopic.php |
2: /** | 2: /** |
3: * Lists the posts in the specified topic. | 3: * Lists the posts in the specified topic. |
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: */ |
113: | 113: |
114: // Fetch some info about the topic | 114: // Fetch some info about the topic |
115: $query = array( | 115: $query = array( |
116: 'SELECT' => 't.subject, t.posted, t.poster, t.first_post_id, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies', | 116: 'SELECT' => 't.subject, t.first_post_id, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies', |
117: 'FROM' => 'topics AS t', | 117: 'FROM' => 'topics AS t', |
118: 'JOINS' => array( | 118: 'JOINS' => array( |
119: array( | 119: array( |
128: 'WHERE' => '(fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL' | 128: 'WHERE' => '(fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL' |
129: ); | 129: ); |
130: | 130: |
131: if (!$forum_user['is_guest']) | 131: if (!$forum_user['is_guest'] && $forum_config['o_subscriptions'] == '1') |
132: { | 132: { |
133: $query['SELECT'] .= ', s.user_id AS is_subscribed'; | 133: $query['SELECT'] .= ', s.user_id AS is_subscribed'; |
134: $query['JOINS'][] = array( | 134: $query['JOINS'][] = array( |
166: | 166: |
167: // Determine the post offset (based on $_GET['p']) | 167: // Determine the post offset (based on $_GET['p']) |
168: $forum_page['num_pages'] = ceil(($cur_topic['num_replies'] + 1) / $forum_user['disp_posts']); | 168: $forum_page['num_pages'] = ceil(($cur_topic['num_replies'] + 1) / $forum_user['disp_posts']); |
169: $forum_page['page'] = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : $_GET['p']; | 169: $forum_page['page'] = (!isset($_GET['p']) || !is_numeric($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : $_GET['p']; |
170: $forum_page['start_from'] = $forum_user['disp_posts'] * ($forum_page['page'] - 1); | 170: $forum_page['start_from'] = $forum_user['disp_posts'] * ($forum_page['page'] - 1); |
171: $forum_page['finish_at'] = min(($forum_page['start_from'] + $forum_user['disp_posts']), ($cur_topic['num_replies'] + 1)); | 171: $forum_page['finish_at'] = min(($forum_page['start_from'] + $forum_user['disp_posts']), ($cur_topic['num_replies'] + 1)); |
172: $forum_page['items_info'] = generate_items_info($lang_topic['Posts'], ($forum_page['start_from'] + 1), ($cur_topic['num_replies'] + 1)); | 172: $forum_page['items_info'] = generate_items_info($lang_topic['Posts'], ($forum_page['start_from'] + 1), ($cur_topic['num_replies'] + 1)); |
193: | 193: |
194: if ($forum_user['may_post']) | 194: if ($forum_user['may_post']) |
195: $forum_page['page_post']['posting'] = '<p class="posting"><a class="newpost" href="'.forum_link($forum_url['new_reply'], $id).'"><span>'.$lang_topic['Post reply'].'</span></a></p>'; | 195: $forum_page['page_post']['posting'] = '<p class="posting"><a class="newpost" href="'.forum_link($forum_url['new_reply'], $id).'"><span>'.$lang_topic['Post reply'].'</span></a></p>'; |
196: else if (!$forum_user['may_post'] && !$forum_user['is_guest'] && $cur_topic['closed'] != '1') | 196: else if ($forum_user['is_guest']) |
197: $forum_page['page_post']['posting'] = '<p class="posting">'.$lang_topic['No permission'].'</p>'; | |
198: if (!$forum_user['may_post'] && $forum_user['is_guest']) | |
199: $forum_page['page_post']['posting'] = '<p class="posting">'.sprintf($lang_topic['Login to post'], '<a href="'.forum_link($forum_url['login']).'">'.$lang_common['login'].'</a>', '<a href="'.forum_link($forum_url['register']).'">'.$lang_common['register'].'</a>').'</p>'; | 197: $forum_page['page_post']['posting'] = '<p class="posting">'.sprintf($lang_topic['Login to post'], '<a href="'.forum_link($forum_url['login']).'">'.$lang_common['login'].'</a>', '<a href="'.forum_link($forum_url['register']).'">'.$lang_common['register'].'</a>').'</p>'; |
| 198: else if ($cur_topic['closed'] == '1') |
| 199: $forum_page['page_post']['posting'] = '<p class="posting">'.$lang_topic['Topic closed info'].'</p>'; |
| 200: else |
| 201: $forum_page['page_post']['posting'] = '<p class="posting">'.$lang_topic['No permission'].'</p>'; |
200: | 202: |
201: // Setup main options | 203: // Setup main options |
202: $forum_page['main_title'] = $lang_topic['Topic options']; | 204: $forum_page['main_title'] = $lang_topic['Topic options']; |
203: $forum_page['main_head_options'] = array( | 205: $forum_page['main_head_options'] = array( |
204: 'rss' => '<span class="feed first-item"><a class="feed-option" href="'.forum_link($forum_url['topic_rss'], $id).'">'.$lang_topic['RSS topic feed'].'</a></span>' | 206: 'rss' => '<span class="feed first-item"><a class="feed" href="'.forum_link($forum_url['topic_rss'], $id).'">'.$lang_topic['RSS topic feed'].'</a></span>' |
205: ); | 207: ); |
206: | 208: |
207: if (!$forum_user['is_guest'] && $forum_config['o_subscriptions'] == '1') | 209: if (!$forum_user['is_guest'] && $forum_config['o_subscriptions'] == '1') |
229: $forum_page['crumbs'] = array( | 231: $forum_page['crumbs'] = array( |
230: array($forum_config['o_board_title'], forum_link($forum_url['index'])), | 232: array($forum_config['o_board_title'], forum_link($forum_url['index'])), |
231: array($cur_topic['forum_name'], forum_link($forum_url['forum'], array($cur_topic['forum_id'], sef_friendly($cur_topic['forum_name'])))), | 233: array($cur_topic['forum_name'], forum_link($forum_url['forum'], array($cur_topic['forum_id'], sef_friendly($cur_topic['forum_name'])))), |
232: $cur_topic['subject'] | 234: array($cur_topic['subject'], forum_link($forum_url['topic'], array($id, sef_friendly($cur_topic['subject'])))) |
233: ); | 235: ); |
234: | 236: |
235: // Setup main heading | 237: // Setup main heading |
331: if ($cur_post['poster_id'] > 1) | 333: if ($cur_post['poster_id'] > 1) |
332: { | 334: { |
333: if ($forum_config['o_avatars'] == '1' && $forum_user['show_avatars'] != '0') | 335: if ($forum_config['o_avatars'] == '1' && $forum_user['show_avatars'] != '0') |
| 336: { |
334: $forum_page['avatar_markup'] = generate_avatar_markup($cur_post['poster_id']); | 337: $forum_page['avatar_markup'] = generate_avatar_markup($cur_post['poster_id']); |
335: | 338: |
336: if (!empty($forum_page['avatar_markup'])) | 339: if (!empty($forum_page['avatar_markup'])) |
337: $forum_page['author_ident']['avatar'] = '<li class="useravatar">'.$forum_page['avatar_markup'].'</li>'; | 340: $forum_page['author_ident']['avatar'] = '<li class="useravatar">'.$forum_page['avatar_markup'].'</li>'; |
| 341: } |
338: | 342: |
339: $forum_page['author_ident']['username'] = '<li class="username">'.(($forum_user['g_view_users'] == '1') ? '<a title="'.sprintf($lang_topic['Go to profile'], forum_htmlencode($cur_post['username'])).'" href="'.forum_link($forum_url['user'], $cur_post['poster_id']).'">'.forum_htmlencode($cur_post['username']).'</a>' : '<strong>'.forum_htmlencode($cur_post['username']).'</strong>').'</li>'; | 343: $forum_page['author_ident']['username'] = '<li class="username">'.(($forum_user['g_view_users'] == '1') ? '<a title="'.sprintf($lang_topic['Go to profile'], forum_htmlencode($cur_post['username'])).'" href="'.forum_link($forum_url['user'], $cur_post['poster_id']).'">'.forum_htmlencode($cur_post['username']).'</a>' : '<strong>'.forum_htmlencode($cur_post['username']).'</strong>').'</li>'; |
340: $forum_page['author_ident']['usertitle'] = '<li class="usertitle"><span>'.get_title($cur_post).'</span></li>'; | 344: $forum_page['author_ident']['usertitle'] = '<li class="usertitle"><span>'.get_title($cur_post).'</span></li>'; |
365: if ($forum_config['o_censoring'] == '1') | 369: if ($forum_config['o_censoring'] == '1') |
366: $cur_post['location'] = censor_words($cur_post['location']); | 370: $cur_post['location'] = censor_words($cur_post['location']); |
367: | 371: |
368: $forum_page['author_info']['from'] = '<li><span>'.$lang_topic['From'].' <strong> '.forum_htmlencode($cur_post['location']).'</strong></span></li>'; | 372: $forum_page['author_info']['from'] = '<li><span>'.$lang_topic['From'].' <strong>'.forum_htmlencode($cur_post['location']).'</strong></span></li>'; |
369: } | 373: } |
370: | 374: |
371: $forum_page['author_info']['registered'] = '<li><span>'.$lang_topic['Registered'].' <strong> '.format_time($cur_post['registered'], 1).'</strong></span></li>'; | 375: $forum_page['author_info']['registered'] = '<li><span>'.$lang_topic['Registered'].' <strong>'.format_time($cur_post['registered'], 1).'</strong></span></li>'; |
372: | 376: |
373: if ($forum_config['o_show_post_count'] == '1' || $forum_user['is_admmod']) | 377: if ($forum_config['o_show_post_count'] == '1' || $forum_user['is_admmod']) |
374: $forum_page['author_info']['posts'] = '<li><span>'.$lang_topic['Posts info'].' <strong> '.forum_number_format($cur_post['num_posts']).'</strong></span></li>'; | 378: $forum_page['author_info']['posts'] = '<li><span>'.$lang_topic['Posts info'].' <strong>'.forum_number_format($cur_post['num_posts']).'</strong></span></li>'; |
375: } | 379: } |
376: | 380: |
377: if ($forum_user['is_admmod']) | 381: if ($forum_user['is_admmod']) |
378: { | 382: { |
379: if ($cur_post['admin_note'] != '') | 383: if ($cur_post['admin_note'] != '') |
380: $forum_page['author_info']['note'] = '<li><span>'.$lang_topic['Note'].' <strong> '.forum_htmlencode($cur_post['admin_note']).'</strong></span></li>'; | 384: $forum_page['author_info']['note'] = '<li><span>'.$lang_topic['Note'].' <strong>'.forum_htmlencode($cur_post['admin_note']).'</strong></span></li>'; |
381: } | 385: } |
382: } | 386: } |
383: } | 387: } |
396: if ($cur_post['poster_id'] > 1) | 400: if ($cur_post['poster_id'] > 1) |
397: { | 401: { |
398: if ($cur_post['url'] != '') | 402: if ($cur_post['url'] != '') |
399: $forum_page['post_contacts']['url'] = '<span class="user-url'.(!empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a class="external" href="'.forum_htmlencode(($forum_config['o_censoring'] == '1') ? censor_words($cur_post['url']) : $cur_post['url']).'">'.sprintf($lang_topic['Visit website'], '<span>'.sprintf($lang_topic['User possessive'], forum_htmlencode($cur_post['username'])).'</span>').'</a></span>'; | 403: $forum_page['post_contacts']['url'] = '<span class="user-url'.(empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a class="external" href="'.forum_htmlencode(($forum_config['o_censoring'] == '1') ? censor_words($cur_post['url']) : $cur_post['url']).'">'.sprintf($lang_topic['Visit website'], '<span>'.sprintf($lang_topic['User possessive'], forum_htmlencode($cur_post['username'])).'</span>').'</a></span>'; |
400: if ((($cur_post['email_setting'] == '0' && !$forum_user['is_guest']) || $forum_user['is_admmod']) && $forum_user['g_send_email'] == '1') | 404: if ((($cur_post['email_setting'] == '0' && !$forum_user['is_guest']) || $forum_user['is_admmod']) && $forum_user['g_send_email'] == '1') |
401: $forum_page['post_contacts']['email'] = '<span class="user-email'.(!empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a href="mailto:'.forum_htmlencode($cur_post['email']).'">'.$lang_topic['E-mail'].'<span> '.forum_htmlencode($cur_post['username']).'</span></a></span>'; | 405: $forum_page['post_contacts']['email'] = '<span class="user-email'.(empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a href="mailto:'.forum_htmlencode($cur_post['email']).'">'.$lang_topic['E-mail'].'<span> '.forum_htmlencode($cur_post['username']).'</span></a></span>'; |
402: else if ($cur_post['email_setting'] == '1' && !$forum_user['is_guest'] && $forum_user['g_send_email'] == '1') | 406: else if ($cur_post['email_setting'] == '1' && !$forum_user['is_guest'] && $forum_user['g_send_email'] == '1') |
403: $forum_page['post_contacts']['email'] = '<span class="user-email'.(!empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['email'], $cur_post['poster_id']).'">'.$lang_topic['E-mail'].'<span> '.forum_htmlencode($cur_post['username']).'</span></a></span>'; | 407: $forum_page['post_contacts']['email'] = '<span class="user-email'.(empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['email'], $cur_post['poster_id']).'">'.$lang_topic['E-mail'].'<span> '.forum_htmlencode($cur_post['username']).'</span></a></span>'; |
404: } | 408: } |
405: else | 409: else |
406: { | 410: { |
407: if ($cur_post['poster_email'] != '' && !$forum_user['is_guest'] && $forum_user['g_send_email'] == '1') | 411: if ($cur_post['poster_email'] != '' && !$forum_user['is_guest'] && $forum_user['g_send_email'] == '1') |
408: $forum_page['post_contacts']['email'] = '<span class="user-email'.(!empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a href="mailto:'.forum_htmlencode($cur_post['poster_email']).'">'.$lang_topic['E-mail'].'<span> '.forum_htmlencode($cur_post['username']).'</span></a></span>'; | 412: $forum_page['post_contacts']['email'] = '<span class="user-email'.(empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a href="mailto:'.forum_htmlencode($cur_post['poster_email']).'">'.$lang_topic['E-mail'].'<span> '.forum_htmlencode($cur_post['username']).'</span></a></span>'; |
409: } | 413: } |
410: } | 414: } |
411: | 415: |
418: // Generate the post options links | 422: // Generate the post options links |
419: if (!$forum_user['is_guest']) | 423: if (!$forum_user['is_guest']) |
420: { | 424: { |
421: $forum_page['post_actions']['report'] = '<span class="report-post'.(!empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['report'], $cur_post['id']).'">'.$lang_topic['Report'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; | 425: $forum_page['post_actions']['report'] = '<span class="report-post'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['report'], $cur_post['id']).'">'.$lang_topic['Report'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; |
422: | 426: |
423: if (!$forum_page['is_admmod']) | 427: if (!$forum_page['is_admmod']) |
424: { | 428: { |
427: if ($cur_post['poster_id'] == $forum_user['id']) | 431: if ($cur_post['poster_id'] == $forum_user['id']) |
428: { | 432: { |
429: if (($forum_page['start_from'] + $forum_page['item_count']) == 1 && $forum_user['g_delete_topics'] == '1') | 433: if (($forum_page['start_from'] + $forum_page['item_count']) == 1 && $forum_user['g_delete_topics'] == '1') |
430: $forum_page['post_actions']['delete'] = '<span class="delete-topic'.(!empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['delete'], $cur_topic['first_post_id']).'">'.$lang_topic['Delete topic'].'</a></span>'; | 434: $forum_page['post_actions']['delete'] = '<span class="delete-topic'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['delete'], $cur_topic['first_post_id']).'">'.$lang_topic['Delete topic'].'</a></span>'; |
431: if (($forum_page['start_from'] + $forum_page['item_count']) > 1 && $forum_user['g_delete_posts'] == '1') | 435: if (($forum_page['start_from'] + $forum_page['item_count']) > 1 && $forum_user['g_delete_posts'] == '1') |
432: $forum_page['post_actions']['delete'] = '<span class="delete-post'.(!empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['delete'], $cur_post['id']).'">'.$lang_topic['Delete'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; | 436: $forum_page['post_actions']['delete'] = '<span class="delete-post'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['delete'], $cur_post['id']).'">'.$lang_topic['Delete'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; |
433: if ($forum_user['g_edit_posts'] == '1') | 437: if ($forum_user['g_edit_posts'] == '1') |
434: $forum_page['post_actions']['edit'] = '<span class="edit-post'.(!empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['edit'], $cur_post['id']).'">'.$lang_topic['Edit'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; | 438: $forum_page['post_actions']['edit'] = '<span class="edit-post'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['edit'], $cur_post['id']).'">'.$lang_topic['Edit'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; |
435: } | 439: } |
436: | 440: |
437: if (($cur_topic['post_replies'] == '' && $forum_user['g_post_replies'] == '1') || $cur_topic['post_replies'] == '1') | 441: if (($cur_topic['post_replies'] == '' && $forum_user['g_post_replies'] == '1') || $cur_topic['post_replies'] == '1') |
438: $forum_page['post_actions']['quote'] = '<span class="quote-post'.(!empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['quote'], array($id, $cur_post['id'])).'">'.$lang_topic['Quote'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; | 442: $forum_page['post_actions']['quote'] = '<span class="quote-post'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['quote'], array($id, $cur_post['id'])).'">'.$lang_topic['Quote'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; |
439: } | 443: } |
440: } | 444: } |
441: else | 445: else |
442: { | 446: { |
443: if (($forum_page['start_from'] + $forum_page['item_count']) == 1) | 447: if (($forum_page['start_from'] + $forum_page['item_count']) == 1) |
444: $forum_page['post_actions']['delete'] = '<span class="delete-topic'.(!empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['delete'], $cur_topic['first_post_id']).'">'.$lang_topic['Delete topic'].'</a></span>'; | 448: $forum_page['post_actions']['delete'] = '<span class="delete-topic'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['delete'], $cur_topic['first_post_id']).'">'.$lang_topic['Delete topic'].'</a></span>'; |
445: else | 449: else |
446: $forum_page['post_actions']['delete'] = '<span class="delete-post'.(!empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['delete'], $cur_post['id']).'">'.$lang_topic['Delete'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; | 450: $forum_page['post_actions']['delete'] = '<span class="delete-post'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['delete'], $cur_post['id']).'">'.$lang_topic['Delete'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; |
447: | 451: |
448: $forum_page['post_actions']['edit'] = '<span class="edit-post'.(!empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['edit'], $cur_post['id']).'">'.$lang_topic['Edit'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; | 452: $forum_page['post_actions']['edit'] = '<span class="edit-post'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['edit'], $cur_post['id']).'">'.$lang_topic['Edit'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; |
449: $forum_page['post_actions']['quote'] = '<span class="quote-post'.(!empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['quote'], array($id, $cur_post['id'])).'">'.$lang_topic['Quote'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; | 453: $forum_page['post_actions']['quote'] = '<span class="quote-post'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['quote'], array($id, $cur_post['id'])).'">'.$lang_topic['Quote'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; |
450: } | 454: } |
451: } | 455: } |
452: else | 456: else |
454: if ($cur_topic['closed'] == '0') | 458: if ($cur_topic['closed'] == '0') |
455: { | 459: { |
456: if (($cur_topic['post_replies'] == '' && $forum_user['g_post_replies'] == '1') || $cur_topic['post_replies'] == '1') | 460: if (($cur_topic['post_replies'] == '' && $forum_user['g_post_replies'] == '1') || $cur_topic['post_replies'] == '1') |
457: $forum_page['post_actions']['quote'] = '<span class="report-post'.(!empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['quote'], array($id, $cur_post['id'])).'">'.$lang_topic['Quote'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; | 461: $forum_page['post_actions']['quote'] = '<span class="report-post'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['quote'], array($id, $cur_post['id'])).'">'.$lang_topic['Quote'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; |
458: } | 462: } |
459: } | 463: } |
460: | 464: |
540: <?php ($hook = get_hook('vt_row_new_post_entry_data')) ? eval($hook) : null; ?> | 544: <?php ($hook = get_hook('vt_row_new_post_entry_data')) ? eval($hook) : null; ?> |
541: </div> | 545: </div> |
542: </div> | 546: </div> |
543: <?php if (!empty($forum_page['post_options'])): ?> <div class="postfoot"> | 547: <?php if (!empty($forum_page['post_options'])): ?> |
| 548: <div class="postfoot"> |
544: <div class="post-options"> | 549: <div class="post-options"> |
545: <?php echo implode("\n\t\t\t\t\t", $forum_page['post_options'])."\n" ?> | 550: <?php echo implode("\n\t\t\t\t\t", $forum_page['post_options'])."\n" ?> |
546: </div> | 551: </div> |
547: </div> | 552: </div> |
548: <?php endif; ?> </div> | 553: <?php endif; ?> |
| 554: </div> |
549: <?php | 555: <?php |
550: | 556: |
551: } | 557: } |
553: ?> | 559: ?> |
554: </div> | 560: </div> |
555: | 561: |
556: <div class="main-foot"> | 562: <div class="main-foot"> |
557: <?php | 563: <?php |
558: | 564: |
559: if (!empty($forum_page['main_foot_options'])) | 565: if (!empty($forum_page['main_foot_options'])) |
560: echo "\n\t\t\t".'<p class="options">'.implode(' ', $forum_page['main_foot_options']).'</p>'; | 566: echo "\n\t\t\t".'<p class="options">'.implode(' ', $forum_page['main_foot_options']).'</p>'; |
561: | 567: |
562: ?> | 568: ?> |
563: <p><?php echo $forum_page['items_info'] ?></p> | 569: <h2 class="hn"><span><?php echo $forum_page['items_info'] ?></span></h2> |
564: </div> | 570: </div> |
565: <?php | 571: <?php |
566: | 572: |