PunBB 1.3.4 to 1.3.6 changes Legend
Lines removed 
Lines changed
 Lines added

punbb-1.3.4/admin/bans.php punbb-1.3.6/admin/bans.php
 24: require FORUM_ROOT.'lang/'.$forum_user['language'].'/admin_common.php'; 24: require FORUM_ROOT.'lang/'.$forum_user['language'].'/admin_common.php';
 25: require FORUM_ROOT.'lang/'.$forum_user['language'].'/admin_bans.php'; 25: require FORUM_ROOT.'lang/'.$forum_user['language'].'/admin_bans.php';
 26:  26: 
 27:  
 28: // Add/edit a ban (stage 1) 27: // Add/edit a ban (stage 1)
 29: if (isset($_REQUEST['add_ban']) || isset($_GET['edit_ban'])) 28: if (isset($_REQUEST['add_ban']) || isset($_GET['edit_ban']))
 30: { 29: {
384: 383: 
385: // Setup the form384: // Setup the form
386: $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0;385: $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0;
387: $forum_page['form_action'] = forum_link($forum_url['admin_bans']).'?action=more';386: $forum_page['form_action'] = forum_link($forum_url['admin_bans']).'&action=more';
388: 387: 
389: $forum_page['hidden_fields'] = array(388: $forum_page['hidden_fields'] = array(
390:     'csrf_token'    => '<input type="hidden" name="csrf_token" value="'.generate_form_token($forum_page['form_action']).'" />'389:     'csrf_token'    => '<input type="hidden" name="csrf_token" value="'.generate_form_token($forum_page['form_action']).'" />'
400: $forum_page['crumbs'][] = array($lang_admin_common['Bans'], forum_link($forum_url['admin_bans']));399: $forum_page['crumbs'][] = array($lang_admin_common['Bans'], forum_link($forum_url['admin_bans']));
401: 400: 
402: 401: 
 402: // Fetch user count
 403: $query = array(
 404:     'SELECT'    =>    'COUNT(id)',
 405:     'FROM'        =>    'bans'
 406: );
 407: 
 408: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
 409: $forum_page['num_bans'] = $forum_db->result($result);
 410: $forum_page['num_pages'] = ceil($forum_page['num_bans'] / $forum_user['disp_topics']);
 411: $forum_page['page'] = (!isset($_GET['p']) || !is_numeric($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : intval($_GET['p']);
 412: $forum_page['start_from'] = $forum_user['disp_topics'] * ($forum_page['page'] - 1);
 413: $forum_page['finish_at'] = min(($forum_page['start_from'] + $forum_user['disp_topics']), ($forum_page['num_bans']));
 414: 
 415: // Generate paging
 416: $forum_page['page_post']['paging']='<p class="paging"><span class="pages">'.$lang_common['Pages'].'</span> '.paginate($forum_page['num_pages'], $forum_page['page'], $forum_url['admin_bans'], $lang_common['Paging separator'], null, true).'</p>';
 417: 
 418: // Navigation links for header and page numbering for title/meta description
 419: if ($forum_page['page'] < $forum_page['num_pages'])
 420: {
 421:     $forum_page['nav']['last'] = '<link rel="last" href="'.forum_sublink($forum_url['admin_bans'], $forum_url['page'], $forum_page['num_pages']).'" title="'.$lang_common['Page'].' '.$forum_page['num_pages'].'" />';
 422:     $forum_page['nav']['next'] = '<link rel="next" href="'.forum_sublink($forum_url['admin_bans'], $forum_url['page'], ($forum_page['page'] + 1)).'" title="'.$lang_common['Page'].' '.($forum_page['page'] + 1).'" />';
 423: }
 424: if ($forum_page['page'] > 1)
 425: {
 426:     $forum_page['nav']['prev'] = '<link rel="prev" href="'.forum_sublink($forum_url['admin_bans'], $forum_url['page'], ($forum_page['page'] - 1)).'" title="'.$lang_common['Page'].' '.($forum_page['page'] - 1).'" />';
 427:     $forum_page['nav']['first'] = '<link rel="first" href="'.forum_link($forum_url['admin_bans']).'" title="'.$lang_common['Page'].' 1" />';
 428: }
 429: 
403: ($hook = get_hook('aba_pre_header_load')) ? eval($hook) : null;430: ($hook = get_hook('aba_pre_header_load')) ? eval($hook) : null;
404: 431: 
405: define('FORUM_PAGE_SECTION', 'users');432: define('FORUM_PAGE_SECTION', 'users');
449:     <div class="main-content main-frm">476:     <div class="main-content main-frm">
450: <?php477: <?php
451: 478: 
452: if (!empty($forum_bans))479: if ($forum_page['num_bans'] > 0)
453: {480: {
454: 481: 
455: ?>482: ?>
456:         <div class="ct-group">483:         <div class="ct-group">
457: <?php484: <?php
458: 485: 
 486:     // Grab the bans
 487:     $query = array(
 488:         'SELECT'    => 'b.*, u.username AS ban_creator_username',
 489:         'FROM'        => 'bans AS b',
 490:         'JOINS'        => array(
 491:             array(
 492:                 'LEFT JOIN'        => 'users AS u',
 493:                 'ON'            => 'u.id=b.ban_creator'
 494:             )
 495:         ),
 496:         'ORDER BY'    => 'b.id',
 497:         'LIMIT'        => $forum_page['start_from'].', '.$forum_page['finish_at']
 498:     );
 499: 
 500:     $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
 501: 
459:     $forum_page['item_num'] = 0;502:     $forum_page['item_num'] = 0;
460:     foreach ($forum_bans as $ban_key => $cur_ban)503:     while ($cur_ban = $forum_db->fetch_assoc($result))
461:     {504:     {
462:         $forum_page['ban_info'] = array();505:         $forum_page['ban_info'] = array();
463:         $forum_page['ban_creator'] = ($cur_ban['ban_creator_username'] != '') ? '<a href="'.forum_link($forum_url['user'], $cur_ban['ban_creator']).'">'.forum_htmlencode($cur_ban['ban_creator_username']).'</a>' : $lang_admin_common['Unknown'];506:         $forum_page['ban_creator'] = ($cur_ban['ban_creator_username'] != '') ? '<a href="'.forum_link($forum_url['user'], $cur_ban['ban_creator']).'">'.forum_htmlencode($cur_ban['ban_creator_username']).'</a>' : $lang_admin_common['Unknown'];
484:                 <div class="ct-box">527:                 <div class="ct-box">
485:                     <div class="ct-legend">528:                     <div class="ct-legend">
486:                         <h3 class=""><span><?php printf($lang_admin_bans['Current ban head'], $forum_page['ban_creator']) ?></span></h3>529:                         <h3 class=""><span><?php printf($lang_admin_bans['Current ban head'], $forum_page['ban_creator']) ?></span></h3>
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'].'&amp;csrf_token='.generate_form_token('del_ban'.$cur_ban['id']).'">'.$lang_admin_bans['Remove ban'].'</a>') ?></p>530:                         <p><?php printf($lang_admin_bans['Edit or remove'], '<a href="'.forum_link($forum_url['admin_bans']).'&amp;edit_ban='.$cur_ban['id'].'">'.$lang_admin_bans['Edit ban'].'</a>', '<a href="'.forum_link($forum_url['admin_bans']).'&amp;del_ban='.$cur_ban['id'].'&amp;csrf_token='.generate_form_token('del_ban'.$cur_ban['id']).'">'.$lang_admin_bans['Remove ban'].'</a>') ?></p>
488:                     </div>531:                     </div>
489: <?php if (!empty($forum_page['ban_info'])): ?>532: <?php if (!empty($forum_page['ban_info'])): ?>
490:                 <ul>533:                 <ul>


punbb-1.3.4/admin/db_update.php punbb-1.3.6/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 (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org  7:  * @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org
  8:  * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher  8:  * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
  9:  * @package PunBB  9:  * @package PunBB
 10:  */ 10:  */
 11:  11: 
 12:  12: 
 13: define('UPDATE_TO', '1.3.4'); 13: define('UPDATE_TO', '1.3.6');
 14: define('UPDATE_TO_DB_REVISION', 4); 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)
 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: if (!defined('FORUM_DEBUG'))  42: if (!defined('FORUM_DEBUG'))
 43:     define('FORUM_DEBUG', 1); 43:     define('FORUM_DEBUG', 1);
 44:  44: 
 45: // Turn on full PHP error reporting 45: // Turn on full PHP error reporting
 46: error_reporting(E_ALL); 46: error_reporting(E_ALL);
 47:  47: 
 48: // Turn off magic_quotes_runtime 48: // Turn off magic_quotes_runtime
 49: set_magic_quotes_runtime(0); 49: if (get_magic_quotes_runtime())
  50:     @ini_set('magic_quotes_runtime', false);
 50:  51: 
 51: // Turn off PHP time limit 52: // Turn off PHP time limit
 52: @set_time_limit(0); 53: @set_time_limit(0);
1169:             }1170:             }
1170:         }1171:         }
1171: 1172: 
 1173:         // Add the index for the post time
 1174:         if (!$forum_db->index_exists('posts', 'posted_idx'))
 1175:             $forum_db->add_index('posts', 'posted_idx', array('posted'));
 1176: 
1172:         // Move any users with the old unverified status to their new group1177:         // Move any users with the old unverified status to their new group
1173:         $query = array(1178:         $query = array(
1174:             'UPDATE'    => 'users',1179:             'UPDATE'    => 'users',
1207:         }1212:         }
1208: 1213: 
1209:         // Should we do charset conversion or not?1214:         // Should we do charset conversion or not?
1210:         if (strpos($cur_version, '1.2') === 0 && isset($_GET['convert_charset']))1215:         if (strpos($cur_version, '1.3') === 0)
 1216:             $query_str = '?stage=finish';
 1217:         elseif (strpos($cur_version, '1.2') === 0 && isset($_GET['convert_charset']))
1211:             $query_str = '?stage=conv_misc&req_old_charset='.$old_charset.'&req_per_page='.PER_PAGE;1218:             $query_str = '?stage=conv_misc&req_old_charset='.$old_charset.'&req_per_page='.PER_PAGE;
1212:         else1219:         else
1213:             $query_str = '?stage=conv_tables';1220:             $query_str = '?stage=conv_tables';


punbb-1.3.4/admin/index.php punbb-1.3.6/admin/index.php
140: else if (ini_get('eaccelerator.enable'))140: else if (ini_get('eaccelerator.enable'))
141:     $php_accelerator = '<a href="http://eaccelerator.net/">eAccelerator</a>';141:     $php_accelerator = '<a href="http://eaccelerator.net/">eAccelerator</a>';
142: else if (ini_get('xcache.cacher'))142: else if (ini_get('xcache.cacher'))
143:     $php_accelerator = '<a href="http://trac.lighttpd.net/xcache/">XCache</a>';143:     $php_accelerator = '<a href="http://xcache.lighttpd.net/">XCache</a>';
144: else144: else
145:     $php_accelerator = $lang_admin_index['Not applicable'];145:     $php_accelerator = $lang_admin_index['Not applicable'];
146: 146: 


punbb-1.3.4/admin/install.php punbb-1.3.6/admin/install.php
  4:  *  4:  *
  5:  * Used to actually install PunBB.  5:  * Used to actually install PunBB.
  6:  *  6:  *
  7:  * @copyright (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org  7:  * @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org
  8:  * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher  8:  * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
  9:  * @package PunBB  9:  * @package PunBB
 10:  */ 10:  */
 11:  11: 
 12:  12: 
 13: define('FORUM_VERSION', '1.3.4'); 13: define('FORUM_VERSION', '1.3.6');
 14: define('FORUM_DB_REVISION', 4); 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');
 62: if (!file_exists(FORUM_ROOT.'lang/'.$language.'/install.php')) 62: if (!file_exists(FORUM_ROOT.'lang/'.$language.'/install.php'))
 63:     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.');
 64:  64: 
 65: // Load the language file 65: // Load the language files
 66: require FORUM_ROOT.'lang/'.$language.'/install.php'; 66: require FORUM_ROOT.'lang/'.$language.'/install.php';
 67:  67: require FORUM_ROOT.'lang/'.$language.'/admin_settings.php';
 68:  68: 
 69: if (isset($_POST['generate_config'])) 69: if (isset($_POST['generate_config']))
 70: { 70: {
 92:     $dual_mysql = false; 92:     $dual_mysql = false;
 93:     $db_extensions = array(); 93:     $db_extensions = array();
 94:     if (function_exists('mysqli_connect')) 94:     if (function_exists('mysqli_connect'))
  95:     {
 95:         $db_extensions[] = array('mysqli', 'MySQL Improved'); 96:         $db_extensions[] = array('mysqli', 'MySQL Improved');
  97:     }
  98: 
 96:     if (function_exists('mysql_connect')) 99:     if (function_exists('mysql_connect'))
 97:     {100:     {
 98:         $db_extensions[] = array('mysql', 'MySQL Standard');101:         $db_extensions[] = array('mysql', 'MySQL Standard');
216:             <div class="sf-set set1">219:             <div class="sf-set set1">
217:                 <div class="sf-box text required">220:                 <div class="sf-box text required">
218:                     <label for="fld2"><span><?php echo $lang_install['Database server'] ?> <em><?php echo $lang_install['Required'] ?></em></span> <small><?php echo $lang_install['Database server help'] ?></small></label><br />221:                     <label for="fld2"><span><?php echo $lang_install['Database server'] ?> <em><?php echo $lang_install['Required'] ?></em></span> <small><?php echo $lang_install['Database server help'] ?></small></label><br />
219:                     <span class="fld-input"><input id="fld2" type="text" name="req_db_host" value="localhost" size="50" maxlength="100" /></span>222:                     <span class="fld-input"><input id="fld2" type="text" name="req_db_host" value="localhost" size="35" maxlength="100" /></span>
220:                 </div>223:                 </div>
221:             </div>224:             </div>
222:             <div class="sf-set set2">225:             <div class="sf-set set2">
276:             <div class="sf-set set4">279:             <div class="sf-set set4">
277:                 <div class="sf-box text required">280:                 <div class="sf-box text required">
278:                     <label for="fld10"><span><?php echo $lang_install['Admin e-mail'] ?> <em><?php echo $lang_install['Required'] ?></em></span> <small><?php echo $lang_install['E-mail address help'] ?></small></label><br />281:                     <label for="fld10"><span><?php echo $lang_install['Admin e-mail'] ?> <em><?php echo $lang_install['Required'] ?></em></span> <small><?php echo $lang_install['E-mail address help'] ?></small></label><br />
279:                     <span class="fld-input"><input id="fld10" type="text" name="req_email" size="50" maxlength="80" /></span>282:                     <span class="fld-input"><input id="fld10" type="text" name="req_email" size="35" maxlength="80" /></span>
280:                 </div>283:                 </div>
281:             </div>284:             </div>
282:         </fieldset>285:         </fieldset>
297:             <div class="sf-set set1">300:             <div class="sf-set set1">
298:                 <div class="sf-box text">301:                 <div class="sf-box text">
299:                     <label for="fld11"><span><?php echo $lang_install['Board title'] ?></span></label><br />302:                     <label for="fld11"><span><?php echo $lang_install['Board title'] ?></span></label><br />
300:                     <span class="fld-input"><input id="fld11" type="text" name="board_title" size="50" maxlength="255" /></span>303:                     <span class="fld-input"><input id="fld11" type="text" name="board_title" size="35" maxlength="255" /></span>
301:                 </div>304:                 </div>
302:             </div>305:             </div>
303:             <div class="sf-set set2">306:             <div class="sf-set set2">
304:                 <div class="sf-box text">307:                 <div class="sf-box text">
305:                     <label for="fld12"><span><?php echo $lang_install['Board description'] ?></span></label><br />308:                     <label for="fld12"><span><?php echo $lang_install['Board description'] ?></span></label><br />
306:                     <span class="fld-input"><input id="fld12" type="text" name="board_descrip" size="50" maxlength="255" /></span>309:                     <span class="fld-input"><input id="fld12" type="text" name="board_descrip" size="35" maxlength="255" /></span>
307:                 </div>310:                 </div>
308:             </div>311:             </div>
309:             <div class="sf-set set3">312:             <div class="sf-set set3">
310:                 <div class="sf-box text required">313:                 <div class="sf-box text required">
311:                     <label for="fld13"><span><?php echo $lang_install['Base URL'] ?> <em><?php echo $lang_install['Required'] ?></em></span> <small><?php echo $lang_install['Base URL help'] ?></small></label><br />314:                     <label for="fld13"><span><?php echo $lang_install['Base URL'] ?> <em><?php echo $lang_install['Required'] ?></em></span> <small><?php echo $lang_install['Base URL help'] ?></small></label><br />
312:                     <span class="fld-input"><input id="fld13" type="text" name="req_base_url" value="<?php echo $base_url_guess ?>" size="60" maxlength="100" /></span>315:                     <span class="fld-input"><input id="fld13" type="text" name="req_base_url" value="<?php echo $base_url_guess ?>" size="35" maxlength="100" /></span>
313:                 </div>316:                 </div>
314:             </div>317:             </div>
315: <?php318: <?php
473:     {476:     {
474:         $mysql_info = $forum_db->get_version();477:         $mysql_info = $forum_db->get_version();
475:         if (version_compare($mysql_info['version'], MIN_MYSQL_VERSION, '<'))478:         if (version_compare($mysql_info['version'], MIN_MYSQL_VERSION, '<'))
476:             error(sprintf($lang_install['Invalid MySQL version'], $mysql_version, MIN_MYSQL_VERSION));479:             error(sprintf($lang_install['Invalid MySQL version'], forum_htmlencode($mysql_info['version']), MIN_MYSQL_VERSION));
477:     }480:     }
478: 481: 
479:     // Validate prefix482:     // Validate prefix
1020:         'PRIMARY KEY'    => array('id'),1023:         'PRIMARY KEY'    => array('id'),
1021:         'INDEXES'        => array(1024:         'INDEXES'        => array(
1022:             'topic_id_idx'    => array('topic_id'),1025:             'topic_id_idx'    => array('topic_id'),
1023:             'multi_idx'        => array('poster_id', 'topic_id')1026:             'multi_idx'        => array('poster_id', 'topic_id'),
 1027:             'posted_idx'    => array('posted')
1024:         )1028:         )
1025:     );1029:     );
1026: 1030: 
1602:         'o_date_format'                => "'Y-m-d'",1606:         'o_date_format'                => "'Y-m-d'",
1603:         'o_check_for_updates'        => "'$check_for_updates'",1607:         'o_check_for_updates'        => "'$check_for_updates'",
1604:         'o_check_for_versions'        => "'$check_for_updates'",1608:         'o_check_for_versions'        => "'$check_for_updates'",
1605:         'o_timeout_visit'            => "'1800'",1609:         'o_timeout_visit'            => "'5400'",
1606:         'o_timeout_online'            => "'300'",1610:         'o_timeout_online'            => "'300'",
1607:         'o_redirect_delay'            => "'1'",1611:         'o_redirect_delay'            => "'1'",
1608:         'o_show_version'            => "'0'",1612:         'o_show_version'            => "'0'",
1655:         'o_rules'                    => "'0'",1659:         'o_rules'                    => "'0'",
1656:         'o_rules_message'            => "'".$lang_install['Default rules']."'",1660:         'o_rules_message'            => "'".$lang_install['Default rules']."'",
1657:         'o_maintenance'                => "'0'",1661:         'o_maintenance'                => "'0'",
1658:         'o_maintenance_message'        => "'".$lang_install['Default maint message']."'",1662:         'o_maintenance_message'        => "'".$lang_admin_settings['Maintenance message default']."'",
1659:         'o_default_dst'                => "'0'",1663:         'o_default_dst'                => "'0'",
1660:         'p_message_bbcode'            => "'1'",1664:         'p_message_bbcode'            => "'1'",
1661:         'p_message_img_tag'            => "'1'",1665:         'p_message_img_tag'            => "'1'",
1746: 1750: 
1747: 1751: 
1748:     $alerts = array();1752:     $alerts = array();
 1753: 
1749:     // Check if the cache directory is writable1754:     // Check if the cache directory is writable
1750:     if (!is_writable('./cache/'))1755:     if (!is_writable(FORUM_ROOT.'cache/'))
1751:         $alerts[] = '<li><span>'.$lang_install['No cache write'].'</span></li>';1756:         $alerts[] = '<li><span>'.$lang_install['No cache write'].'</span></li>';
1752: 1757: 
1753:     // Check if default avatar directory is writable1758:     // Check if default avatar directory is writable
1754:     if (!is_writable('./img/avatars/'))1759:     if (!is_writable(FORUM_ROOT.'img/avatars/'))
1755:         $alerts[] = '<li><span>'.$lang_install['No avatar write'].'</span></li>';1760:         $alerts[] = '<li><span>'.$lang_install['No avatar write'].'</span></li>';
1756: 1761: 
1757:     // Check if we disabled uploading avatars because file_uploads was disabled1762:     // Check if we disabled uploading avatars because file_uploads was disabled
1843:     <p><?php echo $lang_install['Success welcome'] ?></p>1848:     <p><?php echo $lang_install['Success welcome'] ?></p>
1844: </div>1849: </div>
1845: 1850: 
1846: <?php 
1847: ?> 
1848:  
1849: <div id="brd-main" class="main basic">1851: <div id="brd-main" class="main basic">
1850: 1852: 
1851:     <div class="main-head">1853:     <div class="main-head">
1853:     </div>1855:     </div>
1854: 1856: 
1855:     <div class="main-content main-frm">1857:     <div class="main-content main-frm">
1856: <?php1858: <?php if (!empty($alerts)): ?>
 1859:         <div class="ct-box error-box">
 1860:             <p class="warn"><strong><?php echo $lang_install['Warning'] ?></strong></p>
 1861:             <ul>
 1862:                 <?php echo implode("\n\t\t\t\t", $alerts)."\n" ?>
 1863:             </ul>
 1864:         </div>
 1865: <?php endif;
1857: 1866: 
1858: if (!$written)1867: if (!$written)
1859: {1868: {
1863:             <p class="warn"><?php echo $lang_install['No write info 1'] ?></p>1872:             <p class="warn"><?php echo $lang_install['No write info 1'] ?></p>
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>1873:             <p class="warn"><?php printf($lang_install['No write info 2'], '<a href="'.FORUM_ROOT.'index.php">'.$lang_install['Go to index'].'</a>') ?></p>
1865:         </div>1874:         </div>
1866: <?php if (!empty($alerts)): ?> 
1867:         <div class="ct-box error-box"> 
1868:             <p class="warn"><strong><?php echo $lang_install['Warning'] ?></strong></p> 
1869:             <ul> 
1870:                 <?php echo implode("\n\t\t\t\t", $alerts)."\n" ?> 
1871:             </ul> 
1872:         </div> 
1873: <?php endif; ?> 
1874:         <form class="frm-form" method="post" accept-charset="utf-8" action="install.php">1875:         <form class="frm-form" method="post" accept-charset="utf-8" action="install.php">
1875:             <div class="hidden">1876:             <div class="hidden">
1876:             <input type="hidden" name="generate_config" value="1" />1877:             <input type="hidden" name="generate_config" value="1" />


punbb-1.3.4/admin/users.php punbb-1.3.6/admin/users.php
812: }812: }
813: 813: 
814: 814: 
815: else if (isset($_POST['find_user']))815: else if (isset($_GET['find_user']))
816: {816: {
817:     $form = $_POST['form'];817:     $form = isset($_GET['form']) ? $_GET['form'] : array();
818:     $form['username'] = $_POST['username'];818: 
 819:     // trim() all elements in $form
 820:     $form = array_map('forum_trim', $form);
 821:     $conditions = $query_str = array();
819: 822: 
820:     //Check up for order_by and direction values823:     //Check up for order_by and direction values
821:     $order_by = isset($_POST['order_by']) ? forum_trim($_POST['order_by']) : null;824:     $order_by = isset($_GET['order_by']) ? forum_trim($_GET['order_by']) : null;
822:     $direction = isset($_POST['direction']) ? forum_trim($_POST['direction']) : null;825:     $direction = isset($_GET['direction']) ? forum_trim($_GET['direction']) : null;
823:     if ($order_by == null || $direction == null)826:     if ($order_by == null || $direction == null)
824:         message($lang_common['Bad request']);827:         message($lang_common['Bad request']);
 828: 
825:     if (!in_array($order_by, array('username', 'email', 'num_posts', 'num_posts', 'registered')) || !in_array($direction, array('ASC', 'DESC')))829:     if (!in_array($order_by, array('username', 'email', 'num_posts', 'num_posts', 'registered')) || !in_array($direction, array('ASC', 'DESC')))
826:         message($lang_common['Bad request']);830:         message($lang_common['Bad request']);
827: 831: 
828:     ($hook = get_hook('aus_find_user_selected')) ? eval($hook) : null;832:     ($hook = get_hook('aus_find_user_selected')) ? eval($hook) : null;
829: 833: 
830:     // forum_trim() all elements in $form834:     $query_str[] = 'order_by='.$order_by;
831:     $form = array_map('trim', $form);835:     $query_str[] = 'direction='.$direction;
832:     $conditions = array();836: 
833: 837:     $posts_greater = isset($_GET['posts_greater']) ? forum_trim($_GET['posts_greater']) : '';
834:     $posts_greater = forum_trim($_POST['posts_greater']);838:     $posts_less = isset($_GET['posts_less']) ? forum_trim($_GET['posts_less']) : '';
835:     $posts_less = forum_trim($_POST['posts_less']);839:     $last_post_after = isset($_GET['last_post_after']) ? forum_trim($_GET['last_post_after']) : '';
836:     $last_post_after = forum_trim($_POST['last_post_after']);840:     $last_post_before = isset($_GET['last_post_before']) ? forum_trim($_GET['last_post_before']) : '';
837:     $last_post_before = forum_trim($_POST['last_post_before']);841:     $registered_after = isset($_GET['registered_after']) ? forum_trim($_GET['registered_after']) : '';
838:     $registered_after = forum_trim($_POST['registered_after']);842:     $registered_before = isset($_GET['registered_before']) ? forum_trim($_GET['registered_before']) : '';
839:     $registered_before = forum_trim($_POST['registered_before']);843:     $user_group = isset($_GET['user_group']) ? intval($_GET['user_group']) : -1;
840:     $user_group = $_POST['user_group'];844: 
 845:     $query_str[] = 'user_group='.$user_group;
841: 846: 
842:     if ((!empty($posts_greater) || !empty($posts_less)) && !ctype_digit($posts_greater.$posts_less))847:     if ((!empty($posts_greater) || !empty($posts_less)) && !ctype_digit($posts_greater.$posts_less))
843:         message($lang_admin_users['Non numeric value message']);848:         message($lang_admin_users['Non numeric value message']);
844: 849: 
845:     // Try to convert date/time to timestamps850:     // Try to convert date/time to timestamps
846:     if ($last_post_after != '')851:     if ($last_post_after != '')
847:         $last_post_after = strtotime($last_post_after);852:     {
848:     if ($last_post_before != '')853:         $query_str[] = 'last_post_after='.$last_post_after;
849:         $last_post_before = strtotime($last_post_before); 
850:     if ($registered_after != '') 
851:         $registered_after = strtotime($registered_after); 
852:     if ($registered_before != '') 
853:         $registered_before = strtotime($registered_before); 
854: 854: 
855:     if ($last_post_after == -1 || $last_post_before == -1 || $registered_after == -1 || $registered_before == -1)855:         $last_post_after = strtotime($last_post_after);
856:         message($lang_admin_users['Invalid date/time message']);856:         if ($last_post_after === false || $last_post_after == -1)
 857:             message($lang_admin_users['Invalid date/time message']);
857: 858: 
858:     if ($last_post_after != '') 
859:         $conditions[] = 'u.last_post>'.$last_post_after;859:         $conditions[] = 'u.last_post>'.$last_post_after;
 860:     }
860:     if ($last_post_before != '')861:     if ($last_post_before != '')
 862:     {
 863:         $query_str[] = 'last_post_before='.$last_post_before;
 864: 
 865:         $last_post_before = strtotime($last_post_before);
 866:         if ($last_post_before === false || $last_post_before == -1)
 867:             message($lang_admin_users['Invalid date/time message']);
 868: 
861:         $conditions[] = 'u.last_post<'.$last_post_before;869:         $conditions[] = 'u.last_post<'.$last_post_before;
 870:     }
862:     if ($registered_after != '')871:     if ($registered_after != '')
 872:     {
 873:         $query_str[] = 'registered_after='.$registered_after;
 874: 
 875:         $registered_after = strtotime($registered_after);
 876:         if ($registered_after === false || $registered_after == -1)
 877:             message($lang_admin_users['Invalid date/time message']);
 878: 
863:         $conditions[] = 'u.registered>'.$registered_after;879:         $conditions[] = 'u.registered>'.$registered_after;
 880:     }
864:     if ($registered_before != '')881:     if ($registered_before != '')
 882:     {
 883:         $query_str[] = 'registered_before='.$registered_before;
 884: 
 885:         $registered_before = strtotime($registered_before);
 886:         if ($registered_before === false || $registered_before == -1)
 887:             message($lang_admin_users['Invalid date/time message']);
 888: 
865:         $conditions[] = 'u.registered<'.$registered_before;889:         $conditions[] = 'u.registered<'.$registered_before;
 890:     }
866: 891: 
867:     $like_command = ($db_type == 'pgsql') ? 'ILIKE' : 'LIKE';892:     $like_command = ($db_type == 'pgsql') ? 'ILIKE' : 'LIKE';
868:     foreach ($form as $key => $input)893:     foreach ($form as $key => $input)
869:     {894:     {
870:         if ($input != '' && in_array($key, array('username', 'email', 'title', 'realname', 'url', 'jabber', 'icq', 'msn', 'aim', 'yahoo', 'location', 'signature', 'admin_note')))895:         if ($input != '' && in_array($key, array('username', 'email', 'title', 'realname', 'url', 'jabber', 'icq', 'msn', 'aim', 'yahoo', 'location', 'signature', 'admin_note')))
 896:         {
871:             $conditions[] = 'u.'.$forum_db->escape($key).' '.$like_command.' \''.$forum_db->escape(str_replace('*', '%', $input)).'\'';897:             $conditions[] = 'u.'.$forum_db->escape($key).' '.$like_command.' \''.$forum_db->escape(str_replace('*', '%', $input)).'\'';
 898:             $query_str[] = 'form%5B'.$key.'%5D='.urlencode($input);
 899:         }
872:     }900:     }
873: 901: 
874:     if ($posts_greater != '')902:     if ($posts_greater != '')
 903:     {
 904:         $query_str[] = 'posts_greater='.$posts_greater;
875:         $conditions[] = 'u.num_posts>'.$posts_greater;905:         $conditions[] = 'u.num_posts>'.$posts_greater;
 906:     }
876:     if ($posts_less != '')907:     if ($posts_less != '')
 908:     {
 909:         $query_str[] = 'posts_less='.$posts_less;
877:         $conditions[] = 'u.num_posts<'.$posts_less;910:         $conditions[] = 'u.num_posts<'.$posts_less;
 911:     }
878: 912: 
879:     if ($user_group != 'all')913:     if ($user_group > -1)
880:         $conditions[] = 'u.group_id='.intval($user_group);914:         $conditions[] = 'u.group_id='.intval($user_group);
881: 915: 
882:     if (empty($conditions))916:     if (empty($conditions))
883:         message($lang_admin_users['No search terms message']);917:         message($lang_admin_users['No search terms message']);
884: 918: 
885:  
886:     // Load the misc.php language file919:     // Load the misc.php language file
887:     require FORUM_ROOT.'lang/'.$forum_user['language'].'/misc.php';920:     require FORUM_ROOT.'lang/'.$forum_user['language'].'/misc.php';
888: 921: 
889:     // Find any users matching the conditions922:     // Fetch user count
890:     $query = array(923:     $query = array(
891:         'SELECT'    => 'u.id, u.username, u.email, u.title, u.num_posts, u.admin_note, g.g_id, g.g_user_title',924:         'SELECT'    => 'COUNT(id)',
892:         'FROM'        => 'users AS u',925:         'FROM'        => 'users AS u',
893:         'JOINS'        => array(926:         'JOINS'        => array(
894:             array(927:             array(
896:                 'ON'            => 'g.g_id=u.group_id'929:                 'ON'            => 'g.g_id=u.group_id'
897:             )930:             )
898:         ),931:         ),
899:         'WHERE'        => 'u.id>1 AND '.implode(' AND ', $conditions),932:         'WHERE'        => 'u.id>1 AND '.implode(' AND ', $conditions)
900:         'ORDER BY'    => $order_by.' '.$direction 
901:     );933:     );
902: 934: 
903:     ($hook = get_hook('aus_find_user_qr_find_users')) ? eval($hook) : null;935:     ($hook = get_hook('aus_find_user_qr_count_find_users')) ? eval($hook) : null;
904:     $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); 
905:     $forum_page['num_users'] = $forum_db->num_rows($result); 
906: 936: 
 937:     $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
 938:     $forum_page['num_users'] = $forum_db->result($result);
 939:     $forum_page['num_pages'] = ceil($forum_page['num_users'] / $forum_user['disp_topics']);
 940:     $forum_page['page'] = (!isset($_GET['p']) || !is_numeric($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : $_GET['p'];
 941:     $forum_page['start_from'] = $forum_user['disp_topics'] * ($forum_page['page'] - 1);
 942:     $forum_page['finish_at'] = min(($forum_page['start_from'] + $forum_user['disp_topics']), ($forum_page['num_users']));
907: 943: 
908:     // Setup breadcrumbs944:     // Setup breadcrumbs
909:     $forum_page['crumbs'] = array(945:     $forum_page['crumbs'] = array(
915:     $forum_page['crumbs'][] = array($lang_admin_common['Searches'], forum_link($forum_url['admin_users']));951:     $forum_page['crumbs'][] = array($lang_admin_common['Searches'], forum_link($forum_url['admin_users']));
916:     $forum_page['crumbs'][] = $lang_admin_users['User search results'];952:     $forum_page['crumbs'][] = $lang_admin_users['User search results'];
917: 953: 
 954:     // Generate paging
 955:     $forum_page['page_post']['paging'] = '<p class="paging"><span class="pages">'.$lang_common['Pages'].'</span> '.paginate($forum_page['num_pages'], $forum_page['page'], $forum_url['admin_users'].'?find_user=&amp;'.implode('&amp;', $query_str), $lang_common['Paging separator'], null, true).'</p>';
 956: 
918:     ($hook = get_hook('aus_find_user_pre_header_load')) ? eval($hook) : null;957:     ($hook = get_hook('aus_find_user_pre_header_load')) ? eval($hook) : null;
919: 958: 
920:     define('FORUM_PAGE_SECTION', 'users');959:     define('FORUM_PAGE_SECTION', 'users');
961:             <tbody>1000:             <tbody>
962: <?php1001: <?php
963: 1002: 
 1003:     // Find any users matching the conditions
 1004:     $query = array(
 1005:         'SELECT'    => 'u.id, u.username, u.email, u.title, u.num_posts, u.admin_note, g.g_id, g.g_user_title',
 1006:         'FROM'        => 'users AS u',
 1007:         'JOINS'        => array(
 1008:             array(
 1009:                 'LEFT JOIN'        => 'groups AS g',
 1010:                 'ON'            => 'g.g_id=u.group_id'
 1011:             )
 1012:         ),
 1013:         'WHERE'        => 'u.id>1 AND '.implode(' AND ', $conditions),
 1014:         'ORDER BY'    => $order_by.' '.$direction,
 1015:         'LIMIT'        => $forum_page['start_from'].', '.$forum_page['finish_at']
 1016:     );
 1017: 
 1018:     ($hook = get_hook('aus_find_user_qr_find_users')) ? eval($hook) : null;
 1019: 
 1020:     $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
 1021: 
964:     if ($forum_page['num_users'] > 0)1022:     if ($forum_page['num_users'] > 0)
965:     {1023:     {
966:         $forum_page['item_count'] = 0;1024:         $forum_page['item_count'] = 0;
1107:         <h2 class="hn"><span><?php echo $lang_admin_users['Search head'] ?></span></h2>1165:         <h2 class="hn"><span><?php echo $lang_admin_users['Search head'] ?></span></h2>
1108:     </div>1166:     </div>
1109:     <div class="main-content main-frm">1167:     <div class="main-content main-frm">
1110:         <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo forum_link($forum_url['admin_users']) ?>?action=find_user">1168:         <form class="frm-form" method="get" accept-charset="utf-8" action="<?php echo forum_link($forum_url['admin_users']) ?>">
1111:             <div class="hidden">1169:             <div class="hidden">
1112:                 <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(forum_link($forum_url['admin_users']).'?action=find_user') ?>" />1170:                 <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(forum_link($forum_url['admin_users']).'?action=find_user') ?>" />
1113:             </div>1171:             </div>
1121:                 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">1179:                 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1122:                     <div class="sf-box text">1180:                     <div class="sf-box text">
1123:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['Username label'] ?></span></label><br />1181:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['Username label'] ?></span></label><br />
1124:                         <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="username" size="25" maxlength="25" /></span>1182:                         <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[username]" size="35" maxlength="25" /></span>
1125:                     </div>1183:                     </div>
1126:                 </div>1184:                 </div>
1127: <?php ($hook = get_hook('aus_search_form_pre_user_title')) ? eval($hook) : null; ?>1185: <?php ($hook = get_hook('aus_search_form_pre_user_title')) ? eval($hook) : null; ?>
1128:                 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">1186:                 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1129:                     <div class="sf-box text">1187:                     <div class="sf-box text">
1130:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['Title label'] ?></span></label><br />1188:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['Title label'] ?></span></label><br />
1131:                         <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[title]" size="30" maxlength="50" /></span>1189:                         <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[title]" size="35" maxlength="50" /></span>
1132:                     </div>1190:                     </div>
1133:                 </div>1191:                 </div>
1134: <?php ($hook = get_hook('aus_search_form_pre_realname')) ? eval($hook) : null; ?>1192: <?php ($hook = get_hook('aus_search_form_pre_realname')) ? eval($hook) : null; ?>
1135:                 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">1193:                 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1136:                     <div class="sf-box text">1194:                     <div class="sf-box text">
1137:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['Real name label'] ?></span></label><br />1195:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['Real name label'] ?></span></label><br />
1138:                         <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[realname]" size="30" maxlength="40" /></span>1196:                         <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[realname]" size="35" maxlength="40" /></span>
1139:                     </div>1197:                     </div>
1140:                 </div>1198:                 </div>
1141: <?php ($hook = get_hook('aus_search_form_pre_location')) ? eval($hook) : null; ?>1199: <?php ($hook = get_hook('aus_search_form_pre_location')) ? eval($hook) : null; ?>
1142:                 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">1200:                 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1143:                     <div class="sf-box text">1201:                     <div class="sf-box text">
1144:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['Location label'] ?></span></label><br />1202:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['Location label'] ?></span></label><br />
1145:                         <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[location]" size="30" maxlength="30" /></span>1203:                         <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[location]" size="35" maxlength="30" /></span>
1146:                     </div>1204:                     </div>
1147:                 </div>1205:                 </div>
1148: <?php ($hook = get_hook('aus_search_form_pre_signature')) ? eval($hook) : null; ?>1206: <?php ($hook = get_hook('aus_search_form_pre_signature')) ? eval($hook) : null; ?>
1156:                 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">1214:                 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1157:                     <div class="sf-box text">1215:                     <div class="sf-box text">
1158:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['Admin note label'] ?></span></label><br />1216:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['Admin note label'] ?></span></label><br />
1159:                         <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[admin_note]" size="30" maxlength="30" /></span>1217:                         <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[admin_note]" size="35" maxlength="30" /></span>
1160:                     </div>1218:                     </div>
1161:                 </div>1219:                 </div>
1162: <?php ($hook = get_hook('aus_search_form_pre_user_details_fieldset_end')) ? eval($hook) : null; ?>1220: <?php ($hook = get_hook('aus_search_form_pre_user_details_fieldset_end')) ? eval($hook) : null; ?>
1170:                 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">1228:                 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1171:                     <div class="sf-box text">1229:                     <div class="sf-box text">
1172:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['E-mail address label'] ?></span></label><br />1230:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['E-mail address label'] ?></span></label><br />
1173:                         <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[email]" size="30" maxlength="80" /></span>1231:                         <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[email]" size="35" maxlength="80" /></span>
1174:                     </div>1232:                     </div>
1175:                 </div>1233:                 </div>
1176: <?php ($hook = get_hook('aus_search_form_pre_website')) ? eval($hook) : null; ?>                <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">1234: <?php ($hook = get_hook('aus_search_form_pre_website')) ? eval($hook) : null; ?>                <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1182: <?php ($hook = get_hook('aus_search_form_pre_jabber')) ? eval($hook) : null; ?>                <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">1240: <?php ($hook = get_hook('aus_search_form_pre_jabber')) ? eval($hook) : null; ?>                <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1183:                     <div class="sf-box text">1241:                     <div class="sf-box text">
1184:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['Jabber label'] ?></span></label><br />1242:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['Jabber label'] ?></span></label><br />
1185:                         <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[jabber]" size="30" maxlength="80" /></span>1243:                         <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[jabber]" size="35" maxlength="80" /></span>
1186:                     </div>1244:                     </div>
1187:                 </div>1245:                 </div>
1188: <?php ($hook = get_hook('aus_search_form_pre_icq')) ? eval($hook) : null; ?>                <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">1246: <?php ($hook = get_hook('aus_search_form_pre_icq')) ? eval($hook) : null; ?>                <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1194: <?php ($hook = get_hook('aus_search_form_pre_msn')) ? eval($hook) : null; ?>                <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">1252: <?php ($hook = get_hook('aus_search_form_pre_msn')) ? eval($hook) : null; ?>                <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1195:                     <div class="sf-box text">1253:                     <div class="sf-box text">
1196:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['MSN Messenger label'] ?></span></label><br />1254:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['MSN Messenger label'] ?></span></label><br />
1197:                         <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[msn]" size="30" maxlength="80" /></span>1255:                         <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[msn]" size="35" maxlength="80" /></span>
1198:                     </div>1256:                     </div>
1199:                 </div>1257:                 </div>
1200: <?php ($hook = get_hook('aus_search_form_pre_aim')) ? eval($hook) : null; ?>                <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">1258: <?php ($hook = get_hook('aus_search_form_pre_aim')) ? eval($hook) : null; ?>                <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1303:                     <div class="sf-box select">1361:                     <div class="sf-box select">
1304:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['User group label'] ?></span></label><br />1362:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_users['User group label'] ?></span></label><br />
1305:                         <span class="fld-input"><select id="fld<?php echo $forum_page['fld_count'] ?>" name="user_group">1363:                         <span class="fld-input"><select id="fld<?php echo $forum_page['fld_count'] ?>" name="user_group">
1306:                             <option value="all" selected="selected"><?php echo $lang_admin_users['All groups'] ?></option>1364:                             <option value="-1" selected="selected"><?php echo $lang_admin_users['All groups'] ?></option>
1307:                             <option value="<?php echo FORUM_UNVERIFIED ?>"><?php echo $lang_admin_users['Unverified users'] ?></option>1365:                             <option value="<?php echo FORUM_UNVERIFIED ?>"><?php echo $lang_admin_users['Unverified users'] ?></option>
1308: <?php1366: <?php
1309: 1367: 


punbb-1.3.4/edit.php punbb-1.3.6/edit.php
 91:             $errors[] = $lang_post['No subject']; 91:             $errors[] = $lang_post['No subject'];
 92:         else if (utf8_strlen($subject) > 70) 92:         else if (utf8_strlen($subject) > 70)
 93:             $errors[] = $lang_post['Too long subject']; 93:             $errors[] = $lang_post['Too long subject'];
 94:         else if ($forum_config['p_subject_all_caps'] == '0' && utf8_strtoupper($subject) == $subject && !$forum_page['is_admmod']) 94:         else if ($forum_config['p_subject_all_caps'] == '0' && check_is_all_caps($subject) && !$forum_page['is_admmod'])
 95:             $subject = utf8_ucwords(utf8_strtolower($subject)); 95:             $subject = utf8_ucwords(utf8_strtolower($subject));
 96:     } 96:     }
 97:  97: 
100: 100: 
101:     if (strlen($message) > FORUM_MAX_POSTSIZE_BYTES)101:     if (strlen($message) > FORUM_MAX_POSTSIZE_BYTES)
102:         $errors[] = sprintf($lang_post['Too long message'], forum_number_format(strlen($message)), forum_number_format(FORUM_MAX_POSTSIZE_BYTES));102:         $errors[] = sprintf($lang_post['Too long message'], forum_number_format(strlen($message)), forum_number_format(FORUM_MAX_POSTSIZE_BYTES));
103:     else if ($forum_config['p_message_all_caps'] == '0' && utf8_strtoupper($message) == $message && !$forum_page['is_admmod'])103:     else if ($forum_config['p_message_all_caps'] == '0' && check_is_all_caps($message) && !$forum_page['is_admmod'])
104:         $message = utf8_ucwords(utf8_strtolower($message));104:         $message = utf8_ucwords(utf8_strtolower($message));
105: 105: 
106:     // Validate BBCode syntax106:     // Validate BBCode syntax


punbb-1.3.4/extern.php punbb-1.3.6/extern.php
128:         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";
129:         echo "\t\t\t".'<link>'.$item['link'].'</link>'."\n";129:         echo "\t\t\t".'<link>'.$item['link'].'</link>'."\n";
130:         echo "\t\t\t".'<description><![CDATA['.escape_cdata($item['description']).']]></description>'."\n";130:         echo "\t\t\t".'<description><![CDATA['.escape_cdata($item['description']).']]></description>'."\n";
131:         echo "\t\t\t".'<author><![CDATA['.(isset($item['author']['email']) ? escape_cdata($item['author']['email']) : 'dummy@example.com').' ('.escape_cdata($item['author']['name']).')]]></author>'."\n";131:         echo "\t\t\t".'<author><![CDATA['.(isset($item['author']['email']) ? escape_cdata($item['author']['email']) : 'null@example.com').' ('.escape_cdata($item['author']['name']).')]]></author>'."\n";
132:         echo "\t\t\t".'<pubDate>'.gmdate('r', $item['pubdate']).'</pubDate>'."\n";132:         echo "\t\t\t".'<pubDate>'.gmdate('r', $item['pubdate']).'</pubDate>'."\n";
133:         echo "\t\t\t".'<guid>'.$item['link'].'</guid>'."\n";133:         echo "\t\t\t".'<guid>'.$item['link'].'</guid>'."\n";
134: 134: 
335:             'JOINS'        => array(335:             'JOINS'        => array(
336:                 array(336:                 array(
337:                     'INNER JOIN'    => 'users AS u',337:                     'INNER JOIN'    => 'users AS u',
338:                     'ON'        => 'u.id = p.poster_id'338:                     'ON'            => 'u.id = p.poster_id'
339:                 )339:                 )
340:             ),340:             ),
341:             'WHERE'        => 'p.topic_id='.$tid,341:             'WHERE'        => 'p.topic_id='.$tid,
342:             'ORDER BY'    => 'p.posted DESC',342:             'ORDER BY'    => 'p.posted DESC',
343:             'LIMIT'        => $show343:             'LIMIT'        => $show
344:         );344:         );
345:  
346:         ($hook = get_hook('ex_qr_get_posts')) ? eval($hook) : null;345:         ($hook = get_hook('ex_qr_get_posts')) ? eval($hook) : null;
347:         $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);346:         $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
 347: 
348:         while ($cur_post = $forum_db->fetch_assoc($result))348:         while ($cur_post = $forum_db->fetch_assoc($result))
349:         {349:         {
350:             if ($forum_config['o_censoring'] == '1')350:             if ($forum_config['o_censoring'] == '1')
401: 401: 
402:             if (count($fids) == 1)402:             if (count($fids) == 1)
403:             {403:             {
404:             // Fetch forum name404:                 // Fetch forum name
405:             $query = array(405:                 $query = array(
406:                 'SELECT'    => 'f.forum_name',406:                     'SELECT'    => 'f.forum_name',
407:                 'FROM'        => 'forums AS f',407:                     'FROM'        => 'forums AS f',
408:                 'JOINS'        => array(408:                     'JOINS'        => array(
409:                     array(409:                         array(
410:                         'LEFT JOIN'        => 'forum_perms AS fp',410:                             'LEFT JOIN'        => 'forum_perms AS fp',
411:                         'ON'            => '(fp.forum_id=f.id AND fp.group_id='.$forum_user['g_id'].')'411:                             'ON'            => '(fp.forum_id=f.id AND fp.group_id='.$forum_user['g_id'].')'
412:                     )412:                         )
413:                 ),413:                     ),
414:                 'WHERE'        => '(fp.read_forum IS NULL OR fp.read_forum=1) AND f.id='.$fids[0]414:                     'WHERE'        => '(fp.read_forum IS NULL OR fp.read_forum=1) AND f.id='.$fids[0]
415:             );415:                 );
416: 416: 
417:             $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);417:                 $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
418:             if ($forum_db->num_rows($result))418:                 if ($forum_db->num_rows($result))
419:                 $forum_name = $lang_common['Title separator'].$forum_db->result($result);419:                     $forum_name = $lang_common['Title separator'].$forum_db->result($result);
420:             }420:             }
421:         }421:         }
422: 422: 
441: 441: 
442:         // Fetch $show topics442:         // Fetch $show topics
443:         $query = array(443:         $query = array(
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',444:             'SELECT'    => 't.id, t.poster, t.posted, t.subject, p.message, p.hide_smilies, u.email_setting, u.email, p.poster_id, p.poster_email',
445:             'FROM'        => 'topics AS t',445:             'FROM'        => 'topics AS t',
446:             'JOINS'        => array(446:             'JOINS'        => array(
447:                 array(447:                 array(
448:                     'INNER JOIN'    => 'posts AS p',448:                     'INNER JOIN'    => 'posts AS p',
449:                     'ON'            => 'p.id=t.first_post_id'449:                     'ON'            => 'p.id = t.first_post_id'
450:                 ),450:                 ),
451:                 array(451:                 array(
452:                     'INNER JOIN'        => 'users AS u',452:                     'INNER JOIN'    => 'users AS u',
453:                     'ON'            => 'u.id = p.poster_id'453:                     'ON'            => 'u.id = p.poster_id'
454:                 ),454:                 ),
455:                 array(455:                 array(
456:                     'LEFT JOIN'        => 'forum_perms AS fp',456:                     'LEFT JOIN'        => 'forum_perms AS fp',
457:                     'ON'            => '(fp.forum_id=t.forum_id AND fp.group_id='.$forum_user['g_id'].')'457:                     'ON'            => '(fp.forum_id = t.forum_id AND fp.group_id = '.$forum_user['g_id'].')'
458:                 )458:                 )
459:             ),459:             ),
460:             'WHERE'        => '(fp.read_forum IS NULL OR fp.read_forum=1) AND t.moved_to IS NULL',460:             'WHERE'        => '(fp.read_forum IS NULL OR fp.read_forum = 1) AND t.moved_to IS NULL',
461:             'ORDER BY'    => 't.last_post DESC',461:             'ORDER BY'    => 't.posted DESC',
462:             'LIMIT'        => $show462:             'LIMIT'        => $show
463:         );463:         );
464: 464: 
483:                 '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']))),
484:                 'description'    =>    $cur_topic['message'],484:                 'description'    =>    $cur_topic['message'],
485:                 'author'        =>    array(485:                 'author'        =>    array(
486:                     'name'    => $cur_topic['last_poster']486:                     'name'            => $cur_topic['poster']
487:                 ),487:                 ),
488:                 'pubdate'        =>    $cur_topic['last_post']488:                 'pubdate'        =>    $cur_topic['posted']
489:             );489:             );
490: 490: 
491:             if ($cur_topic['poster_id'] > 1)491:             if ($cur_topic['poster_id'] > 1)


punbb-1.3.4/header.php punbb-1.3.6/header.php
 76: if (!defined('FORUM_ALLOW_INDEX')) 76: if (!defined('FORUM_ALLOW_INDEX'))
 77:     $forum_head['robots'] = '<meta name="ROBOTS" content="NOINDEX, FOLLOW" />'; 77:     $forum_head['robots'] = '<meta name="ROBOTS" content="NOINDEX, FOLLOW" />';
 78: else 78: else
 79:     $forum_head['descriptions'] = '<meta name="description" content="'.generate_crumbs(true).' '.$lang_common['Title separator'].' '.forum_htmlencode($forum_config['o_board_desc']).'" />'; 79:     $forum_head['descriptions'] = '<meta name="description" content="'.generate_crumbs(true).$lang_common['Title separator'].forum_htmlencode($forum_config['o_board_desc']).'" />';
 80:  80: 
 81: // Should we output a MicroID? http://microid.org/ 81: // Should we output a MicroID? http://microid.org/
 82: if (strpos(FORUM_PAGE, 'profile') === 0) 82: if (strpos(FORUM_PAGE, 'profile') === 0)


punbb-1.3.4/include/cache.php punbb-1.3.6/include/cache.php
297:     $output = array();297:     $output = array();
298:     while ($cur_hook = $forum_db->fetch_assoc($result))298:     while ($cur_hook = $forum_db->fetch_assoc($result))
299:     {299:     {
300:         $load_ext_info = '$ext_info_stack[] = array('."\n".300:         $load_ext_info = '$GLOBALS[\'ext_info_stack\'][] = array('."\n".
301:             '\'id\'                => \''.$cur_hook['extension_id'].'\','."\n".301:             '\'id\'                => \''.$cur_hook['extension_id'].'\','."\n".
302:             '\'path\'            => FORUM_ROOT.\'extensions/'.$cur_hook['extension_id'].'\','."\n".302:             '\'path\'            => FORUM_ROOT.\'extensions/'.$cur_hook['extension_id'].'\','."\n".
303:             '\'url\'            => $GLOBALS[\'base_url\'].\'/extensions/'.$cur_hook['extension_id'].'\','."\n".303:             '\'url\'            => $GLOBALS[\'base_url\'].\'/extensions/'.$cur_hook['extension_id'].'\','."\n".
316:                 '\'url\'            => $GLOBALS[\'base_url\'].\'/extensions/'.$cur_dependency.'\'),'."\n";316:                 '\'url\'            => $GLOBALS[\'base_url\'].\'/extensions/'.$cur_dependency.'\'),'."\n";
317:         }317:         }
318: 318: 
319:         $load_ext_info .= ')'."\n".');'."\n".'$ext_info = $ext_info_stack[count($ext_info_stack) - 1];';319:         $load_ext_info .= ')'."\n".');'."\n".'$ext_info = $GLOBALS[\'ext_info_stack\'][count($GLOBALS[\'ext_info_stack\']) - 1];';
320:         $unload_ext_info = 'array_pop($ext_info_stack);'."\n".'$ext_info = empty($ext_info_stack) ? array() : $ext_info_stack[count($ext_info_stack) - 1];';320:         $unload_ext_info = 'array_pop($GLOBALS[\'ext_info_stack\']);'."\n".'$ext_info = empty($GLOBALS[\'ext_info_stack\']) ? array() : $GLOBALS[\'ext_info_stack\'][count($GLOBALS[\'ext_info_stack\']) - 1];';
321: 321: 
322:         $output[$cur_hook['id']][] = $load_ext_info."\n\n".$cur_hook['code']."\n\n".$unload_ext_info."\n";322:         $output[$cur_hook['id']][] = $load_ext_info."\n\n".$cur_hook['code']."\n\n".$unload_ext_info."\n";
323:     }323:     }


punbb-1.3.4/include/common.php punbb-1.3.6/include/common.php
 16:  16: 
 17: // Turn off magic_quotes_runtime 17: // Turn off magic_quotes_runtime
 18: if (get_magic_quotes_runtime()) 18: if (get_magic_quotes_runtime())
 19:     set_magic_quotes_runtime(0); 19:     @ini_set('magic_quotes_runtime', false);
 20:  20: 
 21: // Strip slashes from GET/POST/COOKIE (if magic_quotes_gpc is enabled) 21: // Strip slashes from GET/POST/COOKIE (if magic_quotes_gpc is enabled)
 22: if (get_magic_quotes_gpc()) 22: if (get_magic_quotes_gpc())


punbb-1.3.4/include/dblayer/mysqli_innodb.php punbb-1.3.6/include/dblayer/mysqli_innodb.php
   1: <?php
   2: /**
   3:  * A database layer class supporting transactions that relies on the MySQLi PHP extension.
   4:  *
   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
   7:  * @package PunBB
   8:  */
   9: 
  10: 
  11: // Make sure we have built in support for MySQL
  12: if (!function_exists('mysqli_connect'))
  13:     exit('This PHP environment doesn\'t have Improved MySQL (mysqli) support built in. Improved MySQL support is required if you want to use a MySQL 4.1 (or later) database to run this forum. Consult the PHP documentation for further assistance.');
  14: 
  15: 
  16: class DBLayer
  17: {
  18:     var $prefix;
  19:     var $link_id;
  20:     var $query_result;
  21: 
  22:     var $saved_queries = array();
  23:     var $num_queries = 0;
  24:     var $in_transaction = 0;
  25: 
  26:     var $datatype_transformations = array(
  27:         '/^SERIAL$/'    =>    'INT(10) UNSIGNED AUTO_INCREMENT'
  28:     );
  29: 
  30: 
  31:     function DBLayer($db_host, $db_username, $db_password, $db_name, $db_prefix, $foo)
  32:     {
  33:         $this->prefix = $db_prefix;
  34: 
  35:         // Was a custom port supplied with $db_host?
  36:         if (strpos($db_host, ':') !== false)
  37:             list($db_host, $db_port) = explode(':', $db_host);
  38: 
  39:         if (isset($db_port))
  40:             $this->link_id = @mysqli_connect($db_host, $db_username, $db_password, $db_name, $db_port);
  41:         else
  42:             $this->link_id = @mysqli_connect($db_host, $db_username, $db_password, $db_name);
  43: 
  44:         if (!$this->link_id)
  45:             error('Unable to connect to MySQL and select database. MySQL reported: '.mysqli_connect_error(), __FILE__, __LINE__);
  46: 
  47:         // Setup the client-server character set (UTF-8)
  48:         if (!defined('FORUM_NO_SET_NAMES'))
  49:             $this->set_names('utf8');
  50: 
  51:         return $this->link_id;
  52:     }
  53: 
  54: 
  55:     function start_transaction()
  56:     {
  57:         ++$this->in_transaction;
  58: 
  59:         mysqli_query($this->link_id, 'START TRANSACTION');
  60:         return;
  61:     }
  62: 
  63: 
  64:     function end_transaction()
  65:     {
  66:         --$this->in_transaction;
  67: 
  68:         mysqli_query($this->link_id, 'COMMIT');
  69:         return;
  70:     }
  71: 
  72: 
  73:     function query($sql, $unbuffered = false)
  74:     {
  75:         if (strlen($sql) > 140000)
  76:             exit('Insane query. Aborting.');
  77: 
  78:         if (defined('FORUM_SHOW_QUERIES'))
  79:             $q_start = get_microtime();
  80: 
  81:         $this->query_result = @mysqli_query($this->link_id, $sql);
  82: 
  83:         if ($this->query_result)
  84:         {
  85:             if (defined('FORUM_SHOW_QUERIES'))
  86:                 $this->saved_queries[] = array($sql, sprintf('%.5f', get_microtime() - $q_start));
  87: 
  88:             ++$this->num_queries;
  89: 
  90:             return $this->query_result;
  91:         }
  92:         else
  93:         {
  94:             if (defined('FORUM_SHOW_QUERIES'))
  95:                 $this->saved_queries[] = array($sql, 0);
  96: 
  97:             // Rollback transaction
  98:             if ($this->in_transaction)
  99:                 mysqli_query($this->link_id, 'ROLLBACK');
 100: 
 101:             --$this->in_transaction;
 102: 
 103:             return false;
 104:         }
 105:     }
 106: 
 107: 
 108:     function result($query_id = 0, $row = 0, $col = 0)
 109:     {
 110:         if ($query_id)
 111:         {
 112:             if ($row)
 113:                 @mysqli_data_seek($query_id, $row);
 114: 
 115:             $cur_row = @mysqli_fetch_row($query_id);
 116:             return $cur_row[$col];
 117:         }
 118:         else
 119:             return false;
 120:     }
 121: 
 122: 
 123:     function fetch_assoc($query_id = 0)
 124:     {
 125:         return ($query_id) ? @mysqli_fetch_assoc($query_id) : false;
 126:     }
 127: 
 128: 
 129:     function fetch_row($query_id = 0)
 130:     {
 131:         return ($query_id) ? @mysqli_fetch_row($query_id) : false;
 132:     }
 133: 
 134: 
 135:     function num_rows($query_id = 0)
 136:     {
 137:         return ($query_id) ? @mysqli_num_rows($query_id) : false;
 138:     }
 139: 
 140: 
 141:     function affected_rows()
 142:     {
 143:         return ($this->link_id) ? @mysqli_affected_rows($this->link_id) : false;
 144:     }
 145: 
 146: 
 147:     function insert_id()
 148:     {
 149:         return ($this->link_id) ? @mysqli_insert_id($this->link_id) : false;
 150:     }
 151: 
 152: 
 153:     function get_num_queries()
 154:     {
 155:         return $this->num_queries;
 156:     }
 157: 
 158: 
 159:     function get_saved_queries()
 160:     {
 161:         return $this->saved_queries;
 162:     }
 163: 
 164: 
 165:     function free_result($query_id = false)
 166:     {
 167:         return ($query_id) ? @mysqli_free_result($query_id) : false;
 168:     }
 169: 
 170: 
 171:     function escape($str)
 172:     {
 173:         return is_array($str) ? '' : mysqli_real_escape_string($this->link_id, $str);
 174:     }
 175: 
 176: 
 177:     function error()
 178:     {
 179:         $result['error_sql'] = @current(@end($this->saved_queries));
 180:         $result['error_no'] = @mysqli_errno($this->link_id);
 181:         $result['error_msg'] = @mysqli_error($this->link_id);
 182: 
 183:         return $result;
 184:     }
 185: 
 186: 
 187:     function close()
 188:     {
 189:         if ($this->link_id)
 190:         {
 191:             if ($this->query_result)
 192:                 @mysqli_free_result($this->query_result);
 193: 
 194:             return @mysqli_close($this->link_id);
 195:         }
 196:         else
 197:             return false;
 198:     }
 199: 
 200: 
 201:     function set_names($names)
 202:     {
 203:         return $this->query('SET NAMES \''.$this->escape($names).'\'');
 204:     }
 205: 
 206: 
 207:     function get_version()
 208:     {
 209:         $result = $this->query('SELECT VERSION()');
 210: 
 211:         return array(
 212:             'name'        => 'MySQL Improved (InnoDB)',
 213:             'version'    => preg_replace('/^([^-]+).*$/', '\\1', $this->result($result))
 214:         );
 215:     }
 216: 
 217: 
 218:     function table_exists($table_name, $no_prefix = false)
 219:     {
 220:         $result = $this->query('SHOW TABLES LIKE \''.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'\'');
 221:         return $this->num_rows($result) > 0;
 222:     }
 223: 
 224: 
 225:     function field_exists($table_name, $field_name, $no_prefix = false)
 226:     {
 227:         $result = $this->query('SHOW COLUMNS FROM '.($no_prefix ? '' : $this->prefix).$table_name.' LIKE \''.$this->escape($field_name).'\'');
 228:         return $this->num_rows($result) > 0;
 229:     }
 230: 
 231: 
 232:     function index_exists($table_name, $index_name, $no_prefix = false)
 233:     {
 234:         $exists = false;
 235: 
 236:         $result = $this->query('SHOW INDEX FROM '.($no_prefix ? '' : $this->prefix).$table_name);
 237:         while ($cur_index = $this->fetch_assoc($result))
 238:         {
 239:             if ($cur_index['Key_name'] == ($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name)
 240:             {
 241:                 $exists = true;
 242:                 break;
 243:             }
 244:         }
 245: 
 246:         return $exists;
 247:     }
 248: 
 249: 
 250:     function create_table($table_name, $schema, $no_prefix = false)
 251:     {
 252:         if ($this->table_exists($table_name, $no_prefix))
 253:             return;
 254: 
 255:         $query = 'CREATE TABLE '.($no_prefix ? '' : $this->prefix).$table_name." (\n";
 256: 
 257:         // Go through every schema element and add it to the query
 258:         foreach ($schema['FIELDS'] as $field_name => $field_data)
 259:         {
 260:             $field_data['datatype'] = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_data['datatype']);
 261: 
 262:             $query .= $field_name.' '.$field_data['datatype'];
 263: 
 264:             if (isset($field_data['collation']))
 265:                 $query .= 'CHARACTER SET utf8 COLLATE utf8_'.$field_data['collation'];
 266: 
 267:             if (!$field_data['allow_null'])
 268:                 $query .= ' NOT NULL';
 269: 
 270:             if (isset($field_data['default']))
 271:                 $query .= ' DEFAULT '.$field_data['default'];
 272: 
 273:             $query .= ",\n";
 274:         }
 275: 
 276:         // If we have a primary key, add it
 277:         if (isset($schema['PRIMARY KEY']))
 278:             $query .= 'PRIMARY KEY ('.implode(',', $schema['PRIMARY KEY']).'),'."\n";
 279: 
 280:         // Add unique keys
 281:         if (isset($schema['UNIQUE KEYS']))
 282:         {
 283:             foreach ($schema['UNIQUE KEYS'] as $key_name => $key_fields)
 284:                 $query .= 'UNIQUE KEY '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$key_name.'('.implode(',', $key_fields).'),'."\n";
 285:         }
 286: 
 287:         // Add indexes
 288:         if (isset($schema['INDEXES']))
 289:         {
 290:             foreach ($schema['INDEXES'] as $index_name => $index_fields)
 291:                 $query .= 'KEY '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name.'('.implode(',', $index_fields).'),'."\n";
 292:         }
 293: 
 294:         // We remove the last two characters (a newline and a comma) and add on the ending
 295:         $query = substr($query, 0, strlen($query) - 2)."\n".') ENGINE = '.(isset($schema['ENGINE']) ? $schema['ENGINE'] : 'InnoDB').' CHARACTER SET utf8';
 296: 
 297:         $this->query($query) or error(__FILE__, __LINE__);
 298:     }
 299: 
 300: 
 301:     function drop_table($table_name, $no_prefix = false)
 302:     {
 303:         if (!$this->table_exists($table_name, $no_prefix))
 304:             return;
 305: 
 306:         $this->query('DROP TABLE '.($no_prefix ? '' : $this->prefix).$table_name) or error(__FILE__, __LINE__);
 307:     }
 308: 
 309: 
 310:     function add_field($table_name, $field_name, $field_type, $allow_null, $default_value = null, $after_field = null, $no_prefix = false)
 311:     {
 312:         if ($this->field_exists($table_name, $field_name, $no_prefix))
 313:             return;
 314: 
 315:         $field_type = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_type);
 316: 
 317:         if ($default_value !== null && !is_int($default_value) && !is_float($default_value))
 318:             $default_value = '\''.$this->escape($default_value).'\'';
 319: 
 320:         $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' ADD '.$field_name.' '.$field_type.($allow_null ? ' ' : ' NOT NULL').($default_value !== null ? ' DEFAULT '.$default_value : ' ').($after_field != null ? ' AFTER '.$after_field : '')) or error(__FILE__, __LINE__);
 321:     }
 322: 
 323: 
 324:     function alter_field($table_name, $field_name, $field_type, $allow_null, $default_value = null, $after_field = null, $no_prefix = false)
 325:     {
 326:         if (!$this->field_exists($table_name, $field_name, $no_prefix))
 327:             return;
 328: 
 329:         $field_type = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_type);
 330: 
 331:         if ($default_value !== null && !is_int($default_value) && !is_float($default_value))
 332:             $default_value = '\''.$this->escape($default_value).'\'';
 333: 
 334:         $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' MODIFY '.$field_name.' '.$field_type.($allow_null ? ' ' : ' NOT NULL').($default_value !== null ? ' DEFAULT '.$default_value : ' ').($after_field != null ? ' AFTER '.$after_field : '')) or error(__FILE__, __LINE__);
 335:     }
 336: 
 337: 
 338:     function drop_field($table_name, $field_name, $no_prefix = false)
 339:     {
 340:         if (!$this->field_exists($table_name, $field_name, $no_prefix))
 341:             return;
 342: 
 343:         $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' DROP '.$field_name) or error(__FILE__, __LINE__);
 344:     }
 345: 
 346: 
 347:     function add_index($table_name, $index_name, $index_fields, $unique = false, $no_prefix = false)
 348:     {
 349:         if ($this->index_exists($table_name, $index_name, $no_prefix))
 350:             return;
 351: 
 352:         $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' ADD '.($unique ? 'UNIQUE ' : '').'INDEX '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name.' ('.implode(',', $index_fields).')') or error(__FILE__, __LINE__);
 353:     }
 354: 
 355: 
 356:     function drop_index($table_name, $index_name, $no_prefix = false)
 357:     {
 358:         if (!$this->index_exists($table_name, $index_name, $no_prefix))
 359:             return;
 360: 
 361:         $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' DROP INDEX '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name) or error(__FILE__, __LINE__);
 362:     }
 363: }


punbb-1.3.4/include/dblayer/mysql_innodb.php punbb-1.3.6/include/dblayer/mysql_innodb.php
   1: <?php
   2: /**
   3:  * A database layer class supporting transactions that relies on the MySQL PHP extension.
   4:  *
   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
   7:  * @package PunBB
   8:  */
   9: 
  10: 
  11: // Make sure we have built in support for MySQL
  12: if (!function_exists('mysql_connect'))
  13:     exit('This PHP environment doesn\'t have MySQL support built in. MySQL support is required if you want to use a MySQL database to run this forum. Consult the PHP documentation for further assistance.');
  14: 
  15: 
  16: class DBLayer
  17: {
  18:     var $prefix;
  19:     var $link_id;
  20:     var $query_result;
  21:     var $in_transaction = 0;
  22: 
  23:     var $saved_queries = array();
  24:     var $num_queries = 0;
  25: 
  26:     var $datatype_transformations = array(
  27:         '/^SERIAL$/'    =>    'INT(10) UNSIGNED AUTO_INCREMENT'
  28:     );
  29: 
  30: 
  31:     function DBLayer($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect)
  32:     {
  33:         $this->prefix = $db_prefix;
  34: 
  35:         if ($p_connect)
  36:             $this->link_id = @mysql_pconnect($db_host, $db_username, $db_password);
  37:         else
  38:             $this->link_id = @mysql_connect($db_host, $db_username, $db_password);
  39: 
  40:         if ($this->link_id)
  41:         {
  42:             if (!@mysql_select_db($db_name, $this->link_id))
  43:                 error('Unable to select database. MySQL reported: '.mysql_error(), __FILE__, __LINE__);
  44:         }
  45:         else
  46:             error('Unable to connect to MySQL server. MySQL reported: '.mysql_error(), __FILE__, __LINE__);
  47: 
  48:         // Setup the client-server character set (UTF-8)
  49:         if (!defined('FORUM_NO_SET_NAMES'))
  50:             $this->set_names('utf8');
  51: 
  52:         return $this->link_id;
  53:     }
  54: 
  55: 
  56:     function start_transaction()
  57:     {
  58:         ++$this->in_transaction;
  59: 
  60:         mysql_query('START TRANSACTION', $this->link_id);
  61:         return;
  62:     }
  63: 
  64: 
  65:     function end_transaction()
  66:     {
  67:         --$this->in_transaction;
  68: 
  69:         mysql_query('COMMIT', $this->link_id);
  70:         return;
  71:     }
  72: 
  73: 
  74:     function query($sql, $unbuffered = false)
  75:     {
  76:         if (strlen($sql) > 140000)
  77:             exit('Insane query. Aborting.');
  78: 
  79:         if (defined('FORUM_SHOW_QUERIES'))
  80:             $q_start = get_microtime();
  81: 
  82:         if ($unbuffered)
  83:             $this->query_result = @mysql_unbuffered_query($sql, $this->link_id);
  84:         else
  85:             $this->query_result = @mysql_query($sql, $this->link_id);
  86: 
  87:         if ($this->query_result)
  88:         {
  89:             if (defined('FORUM_SHOW_QUERIES'))
  90:                 $this->saved_queries[] = array($sql, sprintf('%.5f', get_microtime() - $q_start));
  91: 
  92:             ++$this->num_queries;
  93: 
  94:             return $this->query_result;
  95:         }
  96:         else
  97:         {
  98:             if (defined('FORUM_SHOW_QUERIES'))
  99:                 $this->saved_queries[] = array($sql, 0);
 100: 
 101:             // Rollback transaction
 102:             if ($this->in_transaction)
 103:                 mysql_query('ROLLBACK', $this->link_id);
 104: 
 105:             --$this->in_transaction;
 106: 
 107:             return false;
 108:         }
 109:     }
 110: 
 111: 
 112:     function result($query_id = 0, $row = 0, $col = 0)
 113:     {
 114:         return ($query_id) ? @mysql_result($query_id, $row, $col) : false;
 115:     }
 116: 
 117: 
 118:     function fetch_assoc($query_id = 0)
 119:     {
 120:         return ($query_id) ? @mysql_fetch_assoc($query_id) : false;
 121:     }
 122: 
 123: 
 124:     function fetch_row($query_id = 0)
 125:     {
 126:         return ($query_id) ? @mysql_fetch_row($query_id) : false;
 127:     }
 128: 
 129: 
 130:     function num_rows($query_id = 0)
 131:     {
 132:         return ($query_id) ? @mysql_num_rows($query_id) : false;
 133:     }
 134: 
 135: 
 136:     function affected_rows()
 137:     {
 138:         return ($this->link_id) ? @mysql_affected_rows($this->link_id) : false;
 139:     }
 140: 
 141: 
 142:     function insert_id()
 143:     {
 144:         return ($this->link_id) ? @mysql_insert_id($this->link_id) : false;
 145:     }
 146: 
 147: 
 148:     function get_num_queries()
 149:     {
 150:         return $this->num_queries;
 151:     }
 152: 
 153: 
 154:     function get_saved_queries()
 155:     {
 156:         return $this->saved_queries;
 157:     }
 158: 
 159: 
 160:     function free_result($query_id = false)
 161:     {
 162:         return ($query_id) ? @mysql_free_result($query_id) : false;
 163:     }
 164: 
 165: 
 166:     function escape($str)
 167:     {
 168:         if (is_array($str))
 169:             return '';
 170:         else if (function_exists('mysql_real_escape_string'))
 171:             return mysql_real_escape_string($str, $this->link_id);
 172:         else
 173:             return mysql_escape_string($str);
 174:     }
 175: 
 176: 
 177:     function error()
 178:     {
 179:         $result['error_sql'] = @current(@end($this->saved_queries));
 180:         $result['error_no'] = @mysql_errno($this->link_id);
 181:         $result['error_msg'] = @mysql_error($this->link_id);
 182: 
 183:         return $result;
 184:     }
 185: 
 186: 
 187:     function close()
 188:     {
 189:         if ($this->link_id)
 190:         {
 191:             if ($this->query_result)
 192:                 @mysql_free_result($this->query_result);
 193: 
 194:             return @mysql_close($this->link_id);
 195:         }
 196:         else
 197:             return false;
 198:     }
 199: 
 200: 
 201:     function set_names($names)
 202:     {
 203:         return $this->query('SET NAMES \''.$this->escape($names).'\'');
 204:     }
 205: 
 206: 
 207:     function get_version()
 208:     {
 209:         $result = $this->query('SELECT VERSION()');
 210: 
 211:         return array(
 212:             'name'        => 'MySQL Standard (InnoDB)',
 213:             'version'    => preg_replace('/^([^-]+).*$/', '\\1', $this->result($result))
 214:         );
 215:     }
 216: 
 217: 
 218:     function table_exists($table_name, $no_prefix = false)
 219:     {
 220:         $result = $this->query('SHOW TABLES LIKE \''.($no_prefix ? '' : $this->prefix).$this->escape($table_name).'\'');
 221:         return $this->num_rows($result) > 0;
 222:     }
 223: 
 224: 
 225:     function field_exists($table_name, $field_name, $no_prefix = false)
 226:     {
 227:         $result = $this->query('SHOW COLUMNS FROM '.($no_prefix ? '' : $this->prefix).$table_name.' LIKE \''.$this->escape($field_name).'\'');
 228:         return $this->num_rows($result) > 0;
 229:     }
 230: 
 231: 
 232:     function index_exists($table_name, $index_name, $no_prefix = false)
 233:     {
 234:         $exists = false;
 235: 
 236:         $result = $this->query('SHOW INDEX FROM '.($no_prefix ? '' : $this->prefix).$table_name);
 237:         while ($cur_index = $this->fetch_assoc($result))
 238:         {
 239:             if ($cur_index['Key_name'] == ($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name)
 240:             {
 241:                 $exists = true;
 242:                 break;
 243:             }
 244:         }
 245: 
 246:         return $exists;
 247:     }
 248: 
 249: 
 250:     function create_table($table_name, $schema, $no_prefix = false)
 251:     {
 252:         if ($this->table_exists($table_name, $no_prefix))
 253:             return;
 254: 
 255:         $query = 'CREATE TABLE '.($no_prefix ? '' : $this->prefix).$table_name." (\n";
 256: 
 257:         // Go through every schema element and add it to the query
 258:         foreach ($schema['FIELDS'] as $field_name => $field_data)
 259:         {
 260:             $field_data['datatype'] = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_data['datatype']);
 261: 
 262:             $query .= $field_name.' '.$field_data['datatype'];
 263: 
 264:             if (isset($field_data['collation']))
 265:                 $query .= 'CHARACTER SET utf8 COLLATE utf8_'.$field_data['collation'];
 266: 
 267:             if (!$field_data['allow_null'])
 268:                 $query .= ' NOT NULL';
 269: 
 270:             if (isset($field_data['default']))
 271:                 $query .= ' DEFAULT '.$field_data['default'];
 272: 
 273:             $query .= ",\n";
 274:         }
 275: 
 276:         // If we have a primary key, add it
 277:         if (isset($schema['PRIMARY KEY']))
 278:             $query .= 'PRIMARY KEY ('.implode(',', $schema['PRIMARY KEY']).'),'."\n";
 279: 
 280:         // Add unique keys
 281:         if (isset($schema['UNIQUE KEYS']))
 282:         {
 283:             foreach ($schema['UNIQUE KEYS'] as $key_name => $key_fields)
 284:                 $query .= 'UNIQUE KEY '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$key_name.'('.implode(',', $key_fields).'),'."\n";
 285:         }
 286: 
 287:         // Add indexes
 288:         if (isset($schema['INDEXES']))
 289:         {
 290:             foreach ($schema['INDEXES'] as $index_name => $index_fields)
 291:                 $query .= 'KEY '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name.'('.implode(',', $index_fields).'),'."\n";
 292:         }
 293: 
 294:         // We remove the last two characters (a newline and a comma) and add on the ending
 295:         $query = substr($query, 0, strlen($query) - 2)."\n".') ENGINE = '.(isset($schema['ENGINE']) ? $schema['ENGINE'] : 'InnoDB').' CHARACTER SET utf8';
 296: 
 297:         $this->query($query) or error(__FILE__, __LINE__);
 298:     }
 299: 
 300: 
 301:     function drop_table($table_name, $no_prefix = false)
 302:     {
 303:         if (!$this->table_exists($table_name, $no_prefix))
 304:             return;
 305: 
 306:         $this->query('DROP TABLE '.($no_prefix ? '' : $this->prefix).$table_name) or error(__FILE__, __LINE__);
 307:     }
 308: 
 309: 
 310:     function add_field($table_name, $field_name, $field_type, $allow_null, $default_value = null, $after_field = null, $no_prefix = false)
 311:     {
 312:         if ($this->field_exists($table_name, $field_name, $no_prefix))
 313:             return;
 314: 
 315:         $field_type = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_type);
 316: 
 317:         if ($default_value !== null && !is_int($default_value) && !is_float($default_value))
 318:             $default_value = '\''.$this->escape($default_value).'\'';
 319: 
 320:         $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' ADD '.$field_name.' '.$field_type.($allow_null ? ' ' : ' NOT NULL').($default_value !== null ? ' DEFAULT '.$default_value : ' ').($after_field != null ? ' AFTER '.$after_field : '')) or error(__FILE__, __LINE__);
 321:     }
 322: 
 323: 
 324:     function alter_field($table_name, $field_name, $field_type, $allow_null, $default_value = null, $after_field = null, $no_prefix = false)
 325:     {
 326:         if (!$this->field_exists($table_name, $field_name, $no_prefix))
 327:             return;
 328: 
 329:         $field_type = preg_replace(array_keys($this->datatype_transformations), array_values($this->datatype_transformations), $field_type);
 330: 
 331:         if ($default_value !== null && !is_int($default_value) && !is_float($default_value))
 332:             $default_value = '\''.$this->escape($default_value).'\'';
 333: 
 334:         $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' MODIFY '.$field_name.' '.$field_type.($allow_null ? ' ' : ' NOT NULL').($default_value !== null ? ' DEFAULT '.$default_value : ' ').($after_field != null ? ' AFTER '.$after_field : '')) or error(__FILE__, __LINE__);
 335:     }
 336: 
 337: 
 338:     function drop_field($table_name, $field_name, $no_prefix = false)
 339:     {
 340:         if (!$this->field_exists($table_name, $field_name, $no_prefix))
 341:             return;
 342: 
 343:         $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' DROP '.$field_name) or error(__FILE__, __LINE__);
 344:     }
 345: 
 346: 
 347:     function add_index($table_name, $index_name, $index_fields, $unique = false, $no_prefix = false)
 348:     {
 349:         if ($this->index_exists($table_name, $index_name, $no_prefix))
 350:             return;
 351: 
 352:         $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' ADD '.($unique ? 'UNIQUE ' : '').'INDEX '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name.' ('.implode(',', $index_fields).')') or error(__FILE__, __LINE__);
 353:     }
 354: 
 355: 
 356:     function drop_index($table_name, $index_name, $no_prefix = false)
 357:     {
 358:         if (!$this->index_exists($table_name, $index_name, $no_prefix))
 359:             return;
 360: 
 361:         $this->query('ALTER TABLE '.($no_prefix ? '' : $this->prefix).$table_name.' DROP INDEX '.($no_prefix ? '' : $this->prefix).$table_name.'_'.$index_name) or error(__FILE__, __LINE__);
 362:     }
 363: }


punbb-1.3.4/include/dblayer/sqlite.php punbb-1.3.6/include/dblayer/sqlite.php
579:         if (!empty($table['indices']))579:         if (!empty($table['indices']))
580:         {580:         {
581:             foreach ($table['indices'] as $cur_index)581:             foreach ($table['indices'] as $cur_index)
582:                 $this->query($cur_index) or error(__FILE__, __LINE__);582:                 if (!preg_match('#\(.*'.$field_name.'.*\)#', $cur_index))
 583:                     $this->query($cur_index) or error(__FILE__, __LINE__);
583:         }584:         }
584: 585: 
585:         //Copy content back586:         //Copy content back


punbb-1.3.4/include/essentials.php punbb-1.3.6/include/essentials.php
 15:     exit('The constant FORUM_ROOT must be defined and point to a valid PunBB installation root directory.'); 15:     exit('The constant FORUM_ROOT must be defined and point to a valid PunBB installation root directory.');
 16:  16: 
 17: // Define the version and database revision that this code was written for 17: // Define the version and database revision that this code was written for
 18: define('FORUM_VERSION', '1.3.4'); 18: define('FORUM_VERSION', '1.3.5');
 19: define('FORUM_DB_REVISION', 4); 19: define('FORUM_DB_REVISION', 4);
 20:  20: 
  21: // Record the start time (will be used to calculate the generation time for the page)
  22: list($usec, $sec) = explode(' ', microtime());
  23: $forum_start = ((float)$usec + (float)$sec);
  24: 
 21: // Load the functions script 25: // Load the functions script
 22: require FORUM_ROOT.'include/functions.php'; 26: require FORUM_ROOT.'include/functions.php';
 23:  27: 
 58:     exit; 62:     exit;
 59: } 63: }
 60:  64: 
 61: // Record the start time (will be used to calculate the generation time for the page) 
 62: list($usec, $sec) = explode(' ', microtime()); 
 63: $forum_start = ((float)$usec + (float)$sec); 
 64:  
 65: // Make sure PHP reports all errors except E_NOTICE. PunBB supports E_ALL, but a lot of scripts it may interact with, do not. 65: // Make sure PHP reports all errors except E_NOTICE. PunBB supports E_ALL, but a lot of scripts it may interact with, do not.
 66: if (defined('FORUM_DEBUG')) 66: if (defined('FORUM_DEBUG'))
 67:     error_reporting(E_ALL); 67:     error_reporting(E_ALL);
111: if (defined('PUN') || !isset($forum_config['o_database_revision']) || $forum_config['o_database_revision'] < FORUM_DB_REVISION || version_compare($forum_config['o_cur_version'], FORUM_VERSION, '<'))111: if (defined('PUN') || !isset($forum_config['o_database_revision']) || $forum_config['o_database_revision'] < FORUM_DB_REVISION || version_compare($forum_config['o_cur_version'], FORUM_VERSION, '<'))
112:     error('Your PunBB database is out-of-date and must be upgraded in order to continue. Please run <a href="'.$base_url.'/admin/db_update.php">db_update.php</a> in order to complete the upgrade process.');112:     error('Your PunBB database is out-of-date and must be upgraded in order to continue. Please run <a href="'.$base_url.'/admin/db_update.php">db_update.php</a> in order to complete the upgrade process.');
113: 113: 
 114: // For sqlite "show dot" options always disabled
 115: if ($db_type == 'sqlite')
 116: {
 117:     $forum_config['o_show_dot'] = '0';
 118: }
114: 119: 
115: // Load hooks120: // Load hooks
116: if (file_exists(FORUM_CACHE_DIR.'cache_hooks.php'))121: if (file_exists(FORUM_CACHE_DIR.'cache_hooks.php'))


punbb-1.3.4/include/functions.php punbb-1.3.6/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 (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org  5:  * @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org
  6:  * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher  6:  * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
  7:  * @package PunBB  7:  * @package PunBB
  8:  */  8:  */
404:     if ($type == FORUM_FT_DATETIME || $type == FORUM_FT_TIME)404:     if ($type == FORUM_FT_DATETIME || $type == FORUM_FT_TIME)
405:         $formatted_time .= gmdate($time_format, $timestamp);405:         $formatted_time .= gmdate($time_format, $timestamp);
406: 406: 
 407:     ($hook = get_hook('fn_format_time_end')) ? eval($hook) : null;
 408: 
407:     return $formatted_time;409:     return $formatted_time;
408: }410: }
409: 411: 
555: 557: 
556: 558: 
557: // Generate a string with numbered links (for multipage scripts)559: // Generate a string with numbered links (for multipage scripts)
558: function paginate($num_pages, $cur_page, $link, $separator, $args = null)560: function paginate($num_pages, $cur_page, $link, $separator, $args = null, $is_default_scheme = null)
559: {561: {
560:     global $forum_url, $lang_common;562:     global $forum_url, $lang_common;
561: 563: 
 564:     if ($is_default_scheme == null)
 565:         $forum_url_page = $forum_url['page'];
 566:     else
 567:     {
 568:         $forum_url_page = '&amp;p=$1';
 569:         unset($forum_url['insertion_find']);
 570:     }
 571: 
562:     $pages = array();572:     $pages = array();
563:     $link_to_all = false;573:     $link_to_all = false;
564: 574: 
574:     }584:     }
575: 585: 
576:     if ($num_pages <= 1)586:     if ($num_pages <= 1)
577:         $pages = array('<strong class="first-item">1</strong>');587:         $pages = array('<strong class="first-item">'.forum_number_format(1).'</strong>');
578:     else588:     else
579:     {589:     {
580:         // Add a previous page link590:         // Add a previous page link
581:         if ($num_pages > 1 && $cur_page > 1)591:         if ($num_pages > 1 && $cur_page > 1)
582:             $pages[] = '<a'.(empty($pages) ? ' class="first-item"' : '').' href="'.forum_sublink($link, $forum_url['page'], ($cur_page - 1), $args).'">'.$lang_common['Previous'].'</a>';592:             $pages[] = '<a'.(empty($pages) ? ' class="first-item"' : '').' href="'.forum_sublink($link, $forum_url_page, ($cur_page - 1), $args).'">'.$lang_common['Previous'].'</a>';
583: 593: 
584:         if ($cur_page > 3)594:         if ($cur_page > 3)
585:         {595:         {
586:             $pages[] = '<a'.(empty($pages) ? ' class="first-item"' : '').' href="'.forum_sublink($link, $forum_url['page'], 1, $args).'">1</a>';596:             $pages[] = '<a'.(empty($pages) ? ' class="first-item"' : '').' href="'.forum_sublink($link, $forum_url_page, 1, $args).'">'.forum_number_format(1).'</a>';
587: 597: 
588:             if ($cur_page > 5)598:             if ($cur_page > 5)
589:                 $pages[] = '<span>'.$lang_common['Spacer'].'</span>';599:                 $pages[] = '<span>'.$lang_common['Spacer'].'</span>';
594:             if ($current < 1 || $current > $num_pages)604:             if ($current < 1 || $current > $num_pages)
595:                 continue;605:                 continue;
596:             else if ($current != $cur_page || $link_to_all)606:             else if ($current != $cur_page || $link_to_all)
597:                 $pages[] = '<a'.(empty($pages) ? ' class="first-item" ' : '').' href="'.forum_sublink($link, $forum_url['page'], $current, $args).'">'.forum_number_format($current).'</a>';607:                 $pages[] = '<a'.(empty($pages) ? ' class="first-item" ' : '').' href="'.forum_sublink($link, $forum_url_page, $current, $args).'">'.forum_number_format($current).'</a>';
598:             else608:             else
599:                 $pages[] = '<strong'.(empty($pages) ? ' class="first-item"' : '').'>'.forum_number_format($current).'</strong>';609:                 $pages[] = '<strong'.(empty($pages) ? ' class="first-item"' : '').'>'.forum_number_format($current).'</strong>';
600: 610: 
603:             if ($cur_page != ($num_pages-3) && $cur_page != ($num_pages-4))613:             if ($cur_page != ($num_pages-3) && $cur_page != ($num_pages-4))
604:                 $pages[] = '<span>'.$lang_common['Spacer'].'</span>';614:                 $pages[] = '<span>'.$lang_common['Spacer'].'</span>';
605: 615: 
606:             $pages[] = '<a'.(empty($pages) ? ' class="first-item" ' : '').' href="'.forum_sublink($link, $forum_url['page'], $num_pages, $args).'">'.forum_number_format($num_pages).'</a>';616:             $pages[] = '<a'.(empty($pages) ? ' class="first-item" ' : '').' href="'.forum_sublink($link, $forum_url_page, $num_pages, $args).'">'.forum_number_format($num_pages).'</a>';
607:         }617:         }
608: 618: 
609:         // Add a next page link619:         // Add a next page link
610:         if ($num_pages > 1 && !$link_to_all && $cur_page < $num_pages)620:         if ($num_pages > 1 && !$link_to_all && $cur_page < $num_pages)
611:             $pages[] = '<a'.(empty($pages) ? ' class="first-item" ' : '').' href="'.forum_sublink($link, $forum_url['page'], ($cur_page + 1), $args).'">'.$lang_common['Next'].'</a>';621:             $pages[] = '<a'.(empty($pages) ? ' class="first-item" ' : '').' href="'.forum_sublink($link, $forum_url_page, ($cur_page + 1), $args).'">'.$lang_common['Next'].'</a>';
612:     }622:     }
613: 623: 
614:     ($hook = get_hook('fn_paginate_end')) ? eval($hook) : null;624:     ($hook = get_hook('fn_paginate_end')) ? eval($hook) : null;
749:     global $forum_config, $forum_user;759:     global $forum_config, $forum_user;
750:     static $lang_url_replace, $forum_reserved_strings;760:     static $lang_url_replace, $forum_reserved_strings;
751: 761: 
752:     if (!isset($lang_replace))762:     if (!isset($lang_url_replace))
753:         require FORUM_ROOT.'lang/'.$forum_user['language'].'/url_replace.php';763:         require FORUM_ROOT.'lang/'.$forum_user['language'].'/url_replace.php';
754: 764: 
755:     if (!isset($forum_reserved_strings))765:     if (!isset($forum_reserved_strings))
772:     foreach ($forum_reserved_strings as $match => $replace)782:     foreach ($forum_reserved_strings as $match => $replace)
773:         if ($str == $match)783:         if ($str == $match)
774:             return $replace;784:             return $replace;
 785:         else if ($match != '')
 786:             $str = str_replace($match, $replace, $str);
775: 787: 
776:     return $str;788:     return $str;
777: }789: }
937: function get_scheme_packs()949: function get_scheme_packs()
938: {950: {
939:       $schemes = array();951:       $schemes = array();
940:     952: 
941:     if($handle = opendir(FORUM_ROOT.'include/url'))953:     if($handle = opendir(FORUM_ROOT.'include/url'))
942:     {954:     {
943:         while (false !== ($dirname = readdir($handle)))955:         while (false !== ($dirname = readdir($handle)))
959: function get_style_packs()971: function get_style_packs()
960: {972: {
961:     $styles = array();973:     $styles = array();
962:     974: 
963:     if($handle = opendir(FORUM_ROOT.'style'))975:     if($handle = opendir(FORUM_ROOT.'style'))
964:     {976:     {
965:         while (false !== ($dirname = readdir($handle)))977:         while (false !== ($dirname = readdir($handle)))
1457:         if ($cur_ban['username'] != '' && utf8_strtolower($forum_user['username']) == utf8_strtolower($cur_ban['username']))1469:         if ($cur_ban['username'] != '' && utf8_strtolower($forum_user['username']) == utf8_strtolower($cur_ban['username']))
1458:             $is_banned = true;1470:             $is_banned = true;
1459: 1471: 
 1472:         if ($cur_ban['email'] != '' && $forum_user['email'] == $cur_ban['email'])
 1473:             $is_banned = true;
 1474: 
1460:         if ($cur_ban['ip'] != '')1475:         if ($cur_ban['ip'] != '')
1461:         {1476:         {
1462:             $cur_ban_ips = explode(' ', $cur_ban['ip']);1477:             $cur_ban_ips = explode(' ', $cur_ban['ip']);
1539:         else1554:         else
1540:         {1555:         {
1541:             // If the entry is older than "o_timeout_visit", update last_visit for the user in question, then delete him/her from the online list1556:             // If the entry is older than "o_timeout_visit", update last_visit for the user in question, then delete him/her from the online list
1542:             if ($cur_user['idle'] != '0')1557:             if ($cur_user['logged'] < ($now - $forum_config['o_timeout_visit']))
1543:             {1558:             {
1544:                 $query = array(1559:                 $query = array(
1545:                     'UPDATE'    => 'users',1560:                     'UPDATE'    => 'users',
2657:         <div class="ct-box info-box">2672:         <div class="ct-box info-box">
2658:             <p><?php echo $lang_common['CSRF token mismatch'] ?></p>2673:             <p><?php echo $lang_common['CSRF token mismatch'] ?></p>
2659:         </div>2674:         </div>
2660:         <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo $forum_page['form_action'] ?>">2675:         <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo forum_htmlencode($forum_page['form_action']) ?>">
2661:             <div class="hidden">2676:             <div class="hidden">
2662:                 <?php echo implode("\n\t\t\t\t", $forum_page['hidden_fields'])."\n" ?>2677:                 <?php echo implode("\n\t\t\t\t", $forum_page['hidden_fields'])."\n" ?>
2663:             </div>2678:             </div>
2777: 2792: 
2778: 2793: 
2779:     // START SUBST - <!-- forum_head -->2794:     // START SUBST - <!-- forum_head -->
 2795: 
2780:     ob_start();2796:     ob_start();
2781: 2797: 
2782: ?>2798:     require FORUM_ROOT.'style/'.$forum_user['style'].'/'.$forum_user['style'].'.php';
2783: <title><?php echo $lang_common['Maintenance'].$lang_common['Title separator'].forum_htmlencode($forum_config['o_board_title']) ?></title> 
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' ?>" /> 
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' ?>" /> 
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]--> 
2787: <!--[if IE 7]><link rel="stylesheet" type="text/css" href="<?php echo $base_url ?>/style/<?php echo $forum_user['style'] ?>/<?php echo $forum_user['style'].'_fix7.css' ?>" /><![endif]--> 
2788: <?php 
2789: 2799: 
2790:     $tpl_temp = forum_trim(ob_get_contents());2800:     $tpl_temp = forum_trim(ob_get_contents());
2791:     $tpl_maint = str_replace('<!-- forum_head -->', $tpl_temp, $tpl_maint);2801:     $tpl_maint = str_replace('<!-- forum_head -->', $tpl_temp, $tpl_maint);
2797:     ob_start();2807:     ob_start();
2798: 2808: 
2799: ?>2809: ?>
2800: <div id="brd-maint" class="main basic"> 
2801:  
2802:     <div class="main-head">2810:     <div class="main-head">
2803:         <h1 class="hn"><span><?php echo $lang_common['Maintenance mode'] ?></span></h1>2811:         <h1 class="hn"><span><?php echo $lang_common['Maintenance mode'] ?></span></h1>
2804:     </div>2812:     </div>
2807:             <?php echo $message."\n" ?>2815:             <?php echo $message."\n" ?>
2808:         </div>2816:         </div>
2809:     </div>2817:     </div>
2810:  
2811: </div> 
2812: <?php2818: <?php
2813: 2819: 
2814:     $tpl_temp = "\t".forum_trim(ob_get_contents());2820:     $tpl_temp = "\t".forum_trim(ob_get_contents());
3064: 3070: 
3065:     exit;3071:     exit;
3066: }3072: }
 3073: 
 3074: // Check the text is CAPSED
 3075: function check_is_all_caps($text)
 3076: {
 3077:     return (bool)/**/(utf8_strtoupper($text) == $text && utf8_strtolower($text) != $text);
 3078: }
3067: 3079: 


punbb-1.3.4/include/parser.php punbb-1.3.6/include/parser.php
 44:         if (strpos($text, '[code]') !== false && strpos($text, '[/code]') !== false) 44:         if (strpos($text, '[code]') !== false && strpos($text, '[/code]') !== false)
 45:         { 45:         {
 46:             list($inside, $outside) = split_text($text, '[code]', '[/code]', $errors); 46:             list($inside, $outside) = split_text($text, '[code]', '[/code]', $errors);
 47:             $text = implode("\0", $outside); 47:             $text = implode("\xc1", $outside);
 48:         } 48:         }
 49:  49: 
 50:         // Tidy up lists 50:         // Tidy up lists
 51:         $pattern = array('/\[list(?:=([1a\*]))?\]((?>(?:(?!\[list(?:=(?:[1a\*]))\]|\[\/list\]).+?)|(?R))*)\[\/list\]/ems'); 51:         $pattern = array('%\[list(?:=([1a*]))?+\]((?:(?>.*?(?=\[list(?:=[1a*])?+\]|\[/list\]))|(?R))*)\[/list\]%ise');
 52:         $replace = array('preparse_list_tag(\'$2\', \'$1\', $errors)'); 52:         $replace = array('preparse_list_tag(\'$2\', \'$1\', $errors)');
 53:         $text = preg_replace($pattern, $replace, $text); 53:         $text = preg_replace($pattern, $replace, $text);
 54:  54: 
 60:         // If we split up the message before we have to concatenate it together again (code tags) 60:         // If we split up the message before we have to concatenate it together again (code tags)
 61:         if (isset($inside)) 61:         if (isset($inside))
 62:         { 62:         {
 63:             $outside = explode("\0", $text); 63:             $outside = explode("\xc1", $text);
 64:             $text = ''; 64:             $text = '';
 65:  65: 
 66:             $num_tokens = count($outside); 66:             $num_tokens = count($outside);
520: 520: 
521:     if (strpos($content,'[list') !== false)521:     if (strpos($content,'[list') !== false)
522:     {522:     {
523:         $pattern = array('/\[list(?:=([1a\*]))?\]((?>(?:(?!\[list(?:=(?:[1a\*]))\]|\[\/list\]).+?)|(?R))*)\[\/list\]/ems');523:         $pattern = array('%\[list(?:=([1a*]))?+\]((?:(?>.*?(?=\[list(?:=[1a*])?+\]|\[/list\]))|(?R))*)\[/list\]%ise');
524:         $replace = array('preparse_list_tag(\'$2\', \'$1\', $errors)');524:         $replace = array('preparse_list_tag(\'$2\', \'$1\', $errors)');
525:         $content = preg_replace($pattern, $replace, $content);525:         $content = preg_replace($pattern, $replace, $content);
526:     }526:     }
592: 592: 
593:     // Ok, not very pretty :-)593:     // Ok, not very pretty :-)
594:     if (!$bbcode)594:     if (!$bbcode)
595:         $link = ($link == '' || $link == $url) ? ((utf8_strlen($url) > 55) ? utf8_substr($url, 0 , 39).' &#133; '.utf8_substr($url, -10) : $url) : stripslashes($link);595:         $link = ($link == '' || $link == $url) ? ((utf8_strlen($url) > 55) ? utf8_substr($url, 0 , 39).' â€¦ '.utf8_substr($url, -10) : $url) : stripslashes($link);
596: 596: 
597:     $return = ($hook = get_hook('ps_handle_url_tag_end')) ? eval($hook) : null;597:     $return = ($hook = get_hook('ps_handle_url_tag_end')) ? eval($hook) : null;
598:     if ($return != null)598:     if ($return != null)
649: 649: 
650:     if (strpos($content,'[list') !== false)650:     if (strpos($content,'[list') !== false)
651:     {651:     {
652:         $pattern = array('/\[list(?:=([1a\*]))?\]((?>(?:(?!\[list(?:=(?:[1a\*]))\]|\[\/list\]).+?)|(?R))*)\[\/list\]/ems');652:         $pattern = array('%\[list(?:=([1a*]))?+\]((?:(?>.*?(?=\[list(?:=[1a*])?+\]|\[/list\]))|(?R))*)\[/list\]%ise');
653:         $replace = array('handle_list_tag(\'$2\', \'$1\')');653:         $replace = array('handle_list_tag(\'$2\', \'$1\')');
654:         $content = preg_replace($pattern, $replace, $content);654:         $content = preg_replace($pattern, $replace, $content);
655:     }655:     }
688: 688: 
689:     if (!$is_signature)689:     if (!$is_signature)
690:     {690:     {
691:         $pattern[] = '/\[list(?:=([1a\*]))?\]((?>(?:(?!\[list(?:=(?:[1a\*]))\]|\[\/list\]).+?)|(?R))*)\[\/list\]/ems';691:         $pattern[] = '%\[list(?:=([1a*]))?+\]((?:(?>.*?(?=\[list(?:=[1a*])?+\]|\[/list\]))|(?R))*)\[/list\]%ise';
692:         $replace[] = 'handle_list_tag(\'$2\', \'$1\')';692:         $replace[] = 'handle_list_tag(\'$2\', \'$1\')';
693:     }693:     }
694: 694: 
752: {752: {
753:     $text = ' '.$text;753:     $text = ' '.$text;
754: 754: 
755:     $text = preg_replace('#(?<=[\s\]\)])(<)?(\[)?(\()?([\'"]?)(https?|ftp|news){1}://([\w\-]+\.([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^\s\[]*[^\s.,?!\[;:-]?)?)\4(?(3)(\)))(?(2)(\]))(?(1)(>))(?![^\s]*\[/(?:url|img)\])#ie', 'stripslashes(\'$1$2$3$4\').handle_url_tag(\'$5://$6\', \'$5://$6\', true).stripslashes(\'$4$10$11$12\')', $text);755:     $text = preg_replace('#(?<=[\s\]\)])(<)?(\[)?(\()?([\'"]?)(https?|ftp|news){1}://([\w\-]+\.([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^\s\[]*[^\s.,?!\[;:-])?)\4(?(3)(\)))(?(2)(\]))(?(1)(>))(?![^\s]*\[/(?:url|img)\])#ie', 'stripslashes(\'$1$2$3$4\').handle_url_tag(\'$5://$6\', \'$5://$6\', true).stripslashes(\'$4$10$11$12\')', $text);
756:     $text = preg_replace('#(?<=[\s\]\)])(<)?(\[)?(\()?([\'"]?)(www|ftp)\.(([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^\s\[]*[^\s.,?!\[;:-])?)\4(?(3)(\)))(?(2)(\]))(?(1)(>))(?![^\s]*\[/(?:url|img)\])#ie', 'stripslashes(\'$1$2$3$4\').handle_url_tag(\'$5.$6\', \'$5.$6\', true).stripslashes(\'$4$10$11$12\')', $text);756:     $text = preg_replace('#(?<=[\s\]\)])(<)?(\[)?(\()?([\'"]?)(www|ftp)\.(([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^\s\[]*[^\s.,?!\[;:-])?)\4(?(3)(\)))(?(2)(\]))(?(1)(>))(?![^\s]*\[/(?:url|img)\])#ie', 'stripslashes(\'$1$2$3$4\').handle_url_tag(\'$5.$6\', \'$5.$6\', true).stripslashes(\'$4$10$11$12\')', $text);
757: 757: 
758:     return substr($text, 1);758:     return substr($text, 1);
813:     if (strpos($text, '[code]') !== false && strpos($text, '[/code]') !== false)813:     if (strpos($text, '[code]') !== false && strpos($text, '[/code]') !== false)
814:     {814:     {
815:         list($inside, $outside) = split_text($text, '[code]', '[/code]', $errors);815:         list($inside, $outside) = split_text($text, '[code]', '[/code]', $errors);
816:         $text = implode("\0", $outside);816:         $text = implode("\xc1", $outside);
817:     }817:     }
818: 818: 
819:     $return = ($hook = get_hook('ps_parse_message_post_split')) ? eval($hook) : null;819:     $return = ($hook = get_hook('ps_parse_message_post_split')) ? eval($hook) : null;
842:     // If we split up the message before we have to concatenate it together again (code tags)842:     // If we split up the message before we have to concatenate it together again (code tags)
843:     if (isset($inside))843:     if (isset($inside))
844:     {844:     {
845:         $outside = explode("\0", $text);845:         $outside = explode("\xc1", $text);
846:         $text = '';846:         $text = '';
847: 847: 
848:         $num_tokens = count($outside);848:         $num_tokens = count($outside);


punbb-1.3.4/include/url/Default/forum_urls.php punbb-1.3.6/include/url/Default/forum_urls.php
 79:     'unstick'                        =>    'moderate.php?fid=$1&amp;unstick=$2&amp;csrf_token=$3', 79:     'unstick'                        =>    'moderate.php?fid=$1&amp;unstick=$2&amp;csrf_token=$3',
 80:     'moderate_topic'                =>    'moderate.php?fid=$1&amp;tid=$2', 80:     'moderate_topic'                =>    'moderate.php?fid=$1&amp;tid=$2',
 81:     'admin_index'                    =>    'admin/index.php', 81:     'admin_index'                    =>    'admin/index.php',
 82:     'admin_bans'                    =>    'admin/bans.php', 82:     'admin_bans'                    =>    'admin/bans.php?sort_by=1',
 83:     'admin_categories'                =>    'admin/categories.php', 83:     'admin_categories'                =>    'admin/categories.php',
 84:     'admin_censoring'                =>    'admin/censoring.php', 84:     'admin_censoring'                =>    'admin/censoring.php',
 85:     'admin_extensions_manage'        =>    'admin/extensions.php?section=manage', 85:     'admin_extensions_manage'        =>    'admin/extensions.php?section=manage',


punbb-1.3.4/include/url/File_based/forum_urls.php punbb-1.3.6/include/url/File_based/forum_urls.php
 81:     'unstick'                        =>    'unstick$1-$2-$3.html', 81:     'unstick'                        =>    'unstick$1-$2-$3.html',
 82:     'moderate_topic'                =>    'moderate$1-$2.html', 82:     'moderate_topic'                =>    'moderate$1-$2.html',
 83:     'admin_index'                    =>    'admin/index.php', 83:     'admin_index'                    =>    'admin/index.php',
 84:     'admin_bans'                    =>    'admin/bans.php', 84:     'admin_bans'                    =>    'admin/bans.php?sort_by=1',
 85:     'admin_categories'                =>    'admin/categories.php', 85:     'admin_categories'                =>    'admin/categories.php',
 86:     'admin_censoring'                =>    'admin/censoring.php', 86:     'admin_censoring'                =>    'admin/censoring.php',
 87:     'admin_extensions_manage'        =>    'admin/extensions.php?section=manage', 87:     'admin_extensions_manage'        =>    'admin/extensions.php?section=manage',


punbb-1.3.4/include/url/File_based_(fancy)/forum_urls.php punbb-1.3.6/include/url/File_based_(fancy)/forum_urls.php
 82:     'unstick'                        =>    'unstick$1-$2-$3.html', 82:     'unstick'                        =>    'unstick$1-$2-$3.html',
 83:     'moderate_topic'                =>    'moderate$1-$2.html', 83:     'moderate_topic'                =>    'moderate$1-$2.html',
 84:     'admin_index'                    =>    'admin/index.php', 84:     'admin_index'                    =>    'admin/index.php',
 85:     'admin_bans'                    =>    'admin/bans.php', 85:     'admin_bans'                    =>    'admin/bans.php?sort_by=1',
 86:     'admin_categories'                =>    'admin/categories.php', 86:     'admin_categories'                =>    'admin/categories.php',
 87:     'admin_censoring'                =>    'admin/censoring.php', 87:     'admin_censoring'                =>    'admin/censoring.php',
 88:     'admin_extensions_manage'        =>    'admin/extensions.php?section=manage', 88:     'admin_extensions_manage'        =>    'admin/extensions.php?section=manage',


punbb-1.3.4/include/url/Folder_based/forum_urls.php punbb-1.3.6/include/url/Folder_based/forum_urls.php
 79:     'unstick'                        =>    'unstick/$1/$2/$3/', 79:     'unstick'                        =>    'unstick/$1/$2/$3/',
 80:     'moderate_topic'                =>    'moderate/$1/$2/', 80:     'moderate_topic'                =>    'moderate/$1/$2/',
 81:     'admin_index'                    =>    'admin/index.php', 81:     'admin_index'                    =>    'admin/index.php',
 82:     'admin_bans'                    =>    'admin/bans.php', 82:     'admin_bans'                    =>    'admin/bans.php?sort_by=1',
 83:     'admin_categories'                =>    'admin/categories.php', 83:     'admin_categories'                =>    'admin/categories.php',
 84:     'admin_censoring'                =>    'admin/censoring.php', 84:     'admin_censoring'                =>    'admin/censoring.php',
 85:     'admin_extensions_manage'        =>    'admin/extensions.php?section=manage', 85:     'admin_extensions_manage'        =>    'admin/extensions.php?section=manage',


punbb-1.3.4/include/url/Folder_based_(fancy)/forum_urls.php punbb-1.3.6/include/url/Folder_based_(fancy)/forum_urls.php
 80:     'unstick'                        =>    'unstick/$1/$2/$3/', 80:     'unstick'                        =>    'unstick/$1/$2/$3/',
 81:     'moderate_topic'                =>    'moderate/$1/$2/', 81:     'moderate_topic'                =>    'moderate/$1/$2/',
 82:     'admin_index'                    =>    'admin/index.php', 82:     'admin_index'                    =>    'admin/index.php',
 83:     'admin_bans'                    =>    'admin/bans.php', 83:     'admin_bans'                    =>    'admin/bans.php?sort_by=1',
 84:     'admin_categories'                =>    'admin/categories.php', 84:     'admin_categories'                =>    'admin/categories.php',
 85:     'admin_censoring'                =>    'admin/censoring.php', 85:     'admin_censoring'                =>    'admin/censoring.php',
 86:     'admin_extensions_manage'        =>    'admin/extensions.php?section=manage', 86:     'admin_extensions_manage'        =>    'admin/extensions.php?section=manage',


punbb-1.3.4/index.php punbb-1.3.6/index.php
347: ?>347: ?>
348: <div id="brd-online" class="gen-content">348: <div id="brd-online" class="gen-content">
349:     <h3 class="hn"><span><?php printf($lang_index['Currently online'], implode($lang_index['Online stats separator'], $forum_page['online_info'])) ?></span></h3>349:     <h3 class="hn"><span><?php printf($lang_index['Currently online'], implode($lang_index['Online stats separator'], $forum_page['online_info'])) ?></span></h3>
350: <?php if (!empty($users)): ?>    <p><?php echo implode($lang_index['Online list separator'], $users) ?></p>350: <?php if (!empty($users)): ?>
 351:     <p><?php echo implode($lang_index['Online list separator'], $users) ?></p>
351: <?php endif; ($hook = get_hook('in_new_online_data')) ? eval($hook) : null; ?>352: <?php endif; ($hook = get_hook('in_new_online_data')) ? eval($hook) : null; ?>
352: </div>353: </div>
353: <?php354: <?php


punbb-1.3.4/lang/English/admin_index.php punbb-1.3.6/lang/English/admin_index.php
  7: 'Alerts'                        =>    'Administrator Alerts',  7: 'Alerts'                        =>    'Administrator Alerts',
  8: 'Check for updates enabled'        =>    'This board is setup to automatically check for updates and hotfixes against the punbb.informer.com updates service.',  8: 'Check for updates enabled'        =>    'This board is setup to automatically check for updates and hotfixes against the punbb.informer.com updates service.',
  9: 'Check for updates manual'        =>    'Check for updates',    // Link text  9: 'Check for updates manual'        =>    'Check for updates',    // Link text
 10: 'Copyright message'                =>    '&copy; 2008-2009 <a href="http://punbb.informer.com/">PunBB</a>, partially based on code &copy; 2008-2009 <a href="http://fluxbb.org/">FluxBB</a>', 10: 'Copyright message'                =>    '&copy; 2008-2011 <a href="http://punbb.informer.com/">PunBB</a>, partially based on code &copy; 2008-2009 <a href="http://fluxbb.org/">FluxBB</a>',
 11: 'PunBB version'                    =>    'PunBB version', 11: 'PunBB version'                    =>    'PunBB version',
 12: 'Not available'                    =>    'Not available', 12: 'Not available'                    =>    'Not available',
 13: 'Not applicable'                =>    'N/A', 13: 'Not applicable'                =>    'N/A',


punbb-1.3.4/lang/English/admin_reindex.php punbb-1.3.6/lang/English/admin_reindex.php
 14: 'Starting post info'        =>    'The post ID to start rebuilding at. The default value is the first available ID in the database. Normally you would not want to change this.', 14: 'Starting post info'        =>    'The post ID to start rebuilding at. The default value is the first available ID in the database. Normally you would not want to change this.',
 15: 'Empty index'                =>    'Empty index', 15: 'Empty index'                =>    'Empty index',
 16: 'Empty index info'            =>    'Empty search index before rebuilding (see below).', 16: 'Empty index info'            =>    'Empty search index before rebuilding (see below).',
 17: 'Rebuilding index title'    =>    'Rebuilding search index &#8230;', 17: 'Rebuilding index title'    =>    'Rebuilding search index…',
 18: 'Rebuilding index'            =>    'Rebuilding index &#8230; This might be a good time to put on some coffee :-)', 18: 'Rebuilding index'            =>    'Rebuilding index… This might be a good time to put on some coffee :-)',
 19: 'Processing post'            =>    'Processing post <strong>%s</strong> in topic <strong>%s</strong>.', 19: 'Processing post'            =>    'Processing post <strong>%s</strong> in topic <strong>%s</strong>.',
 20: 'Javascript redirect'        =>    'JavaScript redirect unsuccessful.', 20: 'Javascript redirect'        =>    'JavaScript redirect unsuccessful.',
 21: 'Click to continue'            =>    'Click here to continue', 21: 'Click to continue'            =>    'Click here to continue',


punbb-1.3.4/lang/English/admin_settings.php punbb-1.3.6/lang/English/admin_settings.php
 24: 'Setup timeouts'                =>    'Default timeouts and redirect delay', 24: 'Setup timeouts'                =>    'Default timeouts and redirect delay',
 25: 'Setup timeouts legend'            =>    'Timeout defaults', 25: 'Setup timeouts legend'            =>    'Timeout defaults',
 26: 'Visit timeout label'            =>    'Visit timeout', 26: 'Visit timeout label'            =>    'Visit timeout',
 27: 'Visit timeout help'            =>    'Seconds idle before last visit data is updated', 27: 'Visit timeout help'            =>    'Seconds idle before user is logged out',
 28: 'Online timeout label'            =>    'Online timeout', 28: 'Online timeout label'            =>    'Online timeout',
 29: 'Online timeout help'            =>    'Seconds idle before being removed from the online users list', 29: 'Online timeout help'            =>    'Seconds idle before being removed from the online users list',
 30: 'Redirect time label'            =>    'Redirect wait', 30: 'Redirect time label'            =>    'Redirect wait',
 51: 'Setup links legend'            =>    'Menu items', 51: 'Setup links legend'            =>    'Menu items',
 52: 'Enter links label'                =>    'Enter your links', 52: 'Enter links label'                =>    'Enter your links',
 53: 'Error no board title'            =>    'You must enter a board title.', 53: 'Error no board title'            =>    'You must enter a board title.',
 54: 'Error timeout value'            =>    'The value of "Timeout online" must be smaller than the value of "Timeout visit".', 54: 'Error timeout value'            =>    'The value of "Online timeout" must be smaller than the value of "Visit timeout".',
 55:  55: 
 56:  56: 
 57: // Features section 57: // Features section
 78: 'Guest posting'                    =>    'Guest posting', 78: 'Guest posting'                    =>    'Guest posting',
 79: 'Guest posting label'            =>    'Guests must supply e-mail addresses when posting.', 79: 'Guest posting label'            =>    'Guests must supply e-mail addresses when posting.',
 80: 'User has posted'                =>    'User has posted', 80: 'User has posted'                =>    'User has posted',
 81: 'User has posted label'            =>    'Display a dot in front of topics to indicate to a user that they have posted in that topic earlier. Disable if you are experiencing high server load.', 81: 'User has posted label'            =>    'Display a dot in front of topics to indicate to a user that they have posted in that topic earlier. Disable if you are experiencing high server load. Ignore for SQLite.',
 82: 'Topic views'                    =>    'Topic views', 82: 'Topic views'                    =>    'Topic views',
 83: 'Topic views label'                =>    'Keep track of the number of views a topic has. Disable if you are experiencing high server load in a busy forum.', 83: 'Topic views label'                =>    'Keep track of the number of views a topic has. Disable if you are experiencing high server load in a busy forum.',
 84: 'User post count'                =>    'User post count', 84: 'User post count'                =>    'User post count',
164: 'Allow form e-mail label'        =>    'Hide e-mail address but allow e-mail via the forum.',164: 'Allow form e-mail label'        =>    'Hide e-mail address but allow e-mail via the forum.',
165: 'Disallow form e-mail label'    =>    'Hide e-mail address and disallow e-mail via the forum.',165: 'Disallow form e-mail label'    =>    'Hide e-mail address and disallow e-mail via the forum.',
166: 'Registration rules'            =>    'Forum rules (enable and compose forum rules)',166: 'Registration rules'            =>    'Forum rules (enable and compose forum rules)',
167: 'Registration rules info'        =>    'You may require new users to agree to a set of rules when registering. The rules will always be available through a link in the navigation table at the top of every page. You may enable the use of rules and then compose your rules below.',167: 'Registration rules info'        =>    'You may require new users to agree to a set of rules when registering. The rules will always be available through a link in the navigation menu at the top of every page. You may enable the use of rules and then compose your rules below.',
168: 'Registration rules legend'        =>    'Forum rules',168: 'Registration rules legend'        =>    'Forum rules',
169: 'Require rules'                    =>    'Use rules',169: 'Require rules'                    =>    'Use rules',
170: 'Require rules label'            =>    'Users must agree to forum rules before registering.',170: 'Require rules label'            =>    'Users must agree to forum rules before registering.',
196: 196: 
197: // Maintenance section197: // Maintenance section
198: 'Maintenance head'                =>    'Setup maintenance message and activate maintenance mode',198: 'Maintenance head'                =>    'Setup maintenance message and activate maintenance mode',
199: 'Maintenance mode info'            =>    '<strong>IMPORTANT!</strong> Putting the board into maintenance mode means it will only be available to administrators. This should be used if the board needs to taken down temporarily for maintenance.',199: 'Maintenance mode info'            =>    '<strong>IMPORTANT!</strong> Putting the board into maintenance mode means it will only be available to administrators. This should be used if the board needs to be taken down temporarily for maintenance.',
200: 'Maintenance mode warn'            =>    '<strong>WARNING!</strong> DO NOT LOGOUT when the board is in maintenance mode. You will not be able to login again.',200: 'Maintenance mode warn'            =>    '<strong>WARNING!</strong> DO NOT LOGOUT when the board is in maintenance mode. You will not be able to login again.',
201: 'Maintenance legend'            =>    'Maintenance',201: 'Maintenance legend'            =>    'Maintenance',
202: 'Maintenance mode'                =>    'Maintenance mode',202: 'Maintenance mode'                =>    'Maintenance mode',


punbb-1.3.4/lang/English/admin_users.php punbb-1.3.6/lang/English/admin_users.php
 76: 'Ban admin message'                =>    'One of the selected users is an administrator and can\'t be banned. If you want to ban an administrator, you must first move him/her to any other user group.', 76: 'Ban admin message'                =>    'One of the selected users is an administrator and can\'t be banned. If you want to ban an administrator, you must first move him/her to any other user group.',
 77: 'Users banned'                    =>    'Users banned.', 77: 'Users banned'                    =>    'Users banned.',
 78: 'Mass ban info'                    =>    'You may set a message to be displayed to the banned users and set the date their bans are to expire.', 78: 'Mass ban info'                    =>    'You may set a message to be displayed to the banned users and set the date their bans are to expire.',
  79: 'Ban settings legend'            =>     'Ban users',
 79: 'Change group head'                =>    'Move the selected users to a new group', 80: 'Change group head'                =>    'Move the selected users to a new group',
 80: 'User groups updated'            =>    'User groups updated.', 81: 'User groups updated'            =>    'User groups updated.',
 81: 'Move users legend'                =>    'Move users', 82: 'Move users legend'                =>    'Move users',


punbb-1.3.4/lang/English/common.php punbb-1.3.6/lang/English/common.php
 50: 'Unanswered topics title'    =>    'Find topics which have not been replied to.', 50: 'Unanswered topics title'    =>    'Find topics which have not been replied to.',
 51: 'Username'                    =>    'Username', 51: 'Username'                    =>    'Username',
 52: 'Registered'                =>    'Registered', 52: 'Registered'                =>    'Registered',
 53: 'Write message'                =>    'Write message:', 53: 'Write message'                =>    'Write message',
 54: 'Forum'                        =>    'Forum', 54: 'Forum'                        =>    'Forum',
 55: 'Posts'                        =>    'Posts', 55: 'Posts'                        =>    'Posts',
 56: 'Pages'                        =>    'Pages', 56: 'Pages'                        =>    'Pages',
 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>, supported by <strong>%s</strong>.', 88: 'Powered by'                =>    'Powered by <strong>%s</strong>, supported by <strong>%s</strong>.',
 89: 'Maintenance'                =>    'Maintenance', 89: 'Maintenance'                =>    'Maintenance',
  90: 'Installed extension'        =>    'The %s official extension is installed. Copyright &copy; 2003&ndash;2011 <a href="http://punbb.informer.com/">PunBB</a>.',
  91: 'Installed extensions'        =>    'Currently installed <span id="extensions-used" title="%s">%s official extensions</span>. Copyright &copy; 2003&ndash;2011 <a href="http://punbb.informer.com/">PunBB</a>.',
 90:  92: 
 91: // CSRF confirmation form 93: // CSRF confirmation form
 92: 'Confirm'                    =>    'Confirm',    // Button 94: 'Confirm'                    =>    'Confirm',    // Button


punbb-1.3.4/lang/English/install.php punbb-1.3.6/lang/English/install.php
 84: 'Default language help'        =>    '(If you remove a language pack you must update this setting)', 84: 'Default language help'        =>    '(If you remove a language pack you must update this setting)',
 85: 'Default announce heading'    =>    'Sample announcement', 85: 'Default announce heading'    =>    'Sample announcement',
 86: 'Default announce message'    =>    '<p>Enter your announcement here.</p>', 86: 'Default announce message'    =>    '<p>Enter your announcement here.</p>',
 87: 'Default maint message'        =>    "The forums are temporarily down for maintenance. Please try again in a few minutes.<br />\\n<br />\\n/Administrator", 
 88: 'Default rules'                =>    'Enter your rules here.', 87: 'Default rules'                =>    'Enter your rules here.',
 89: 'Default category name'        =>    'Test category', 88: 'Default category name'        =>    'Test category',
 90: 'Default forum name'        =>    'Test forum', 89: 'Default forum name'        =>    'Test forum',


punbb-1.3.4/lang/English/mail_templates/welcome.tpl punbb-1.3.6/lang/English/mail_templates/welcome.tpl
  1: Subject: Welcome to <board_title>!  1: Subject: Welcome to <board_title>!
  2:   2: 
  3: Thank you for registering in the forums at <base_url>. Your username on the forums is <username>, as you requested. To complete your registration, you need to set a password for your account.  3: Thank you for registering in the forums at <base_url>. Your username on the forums is <username>, as you requested.
   4: 
   5: To complete your registration, you need to set a password for your account. It must be done in 72 hours, or else your account will be deleted.
  4:   6: 
  5: To set your password, please visit the following page:  7: To set your password, please visit the following page:
  6: <activation_url>  8: <activation_url>
  7:   9: 
  8: --  10: --
  9: <board_mailer> 11: <board_mailer>
 10: (Do not reply to this message) 
 11:  12: 
  13: (Do not reply to this message)


punbb-1.3.4/lang/English/misc.php punbb-1.3.6/lang/English/misc.php
 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: 'Too long reason'            =>    'Your report length is %s bytes. This exceeds the %s bytes limit.',
  31: 'Report errors'                =>    '<strong>Warning!</strong> The following errors must be corrected before your report can be sending:',
 30:  32: 
 31: // Subscriptions 33: // Subscriptions
 32: 'Already subscribed'        =>    'You are already subscribed to this topic.', 34: 'Already subscribed'        =>    'You are already subscribed to this topic.',


punbb-1.3.4/lang/English/profile.php punbb-1.3.6/lang/English/profile.php
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. It must be done in 72 hours after registration, or else your account will be deleted.',
220: 'Register at'                =>    'Register at %s',220: 'Register at'                =>    'Register at %s',
221: 'Register intro'            =>    'Registration enables you to use features not available when browsing the board as a guest. The fields below only make up a small part of all the settings you can alter in your profile. If you have any questions regarding this forum you should ask an administrator. Please complete the form below in order to register.',221: 'Register intro'            =>    'Registration enables you to use features not available when browsing the board as a guest. The fields below only make up a small part of all the settings you can alter in your profile. If you have any questions regarding this forum you should ask an administrator. Please complete the form below in order to register.',
222: 'Username'                    =>    'Username',222: 'Username'                    =>    'Username',
253: 'Username too short'        =>    'Usernames must be at least 2 characters long. Please choose another (longer) username.',253: 'Username too short'        =>    'Usernames must be at least 2 characters long. Please choose another (longer) username.',
254: 'Signature quote/code'        =>    'The quote and code BBCodes are not allowed in signatures.',254: 'Signature quote/code'        =>    'The quote and code BBCodes are not allowed in signatures.',
255: 'Invalid e-mail'            =>    'The e-mail address you entered is invalid.',255: 'Invalid e-mail'            =>    'The e-mail address you entered is invalid.',
 256: 'Signature quote/code/list'    =>    'Signature may not contain of the text formatting tags (BBCode) [quote], [code] or [list]. Please choose another tags or delete it.',
256: 257: 
257: );258: );


punbb-1.3.4/login.php punbb-1.3.6/login.php
433: <?php ($hook = get_hook('li_login_pre_remember_me_checkbox')) ? eval($hook) : null; ?>433: <?php ($hook = get_hook('li_login_pre_remember_me_checkbox')) ? eval($hook) : null; ?>
434:                 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">434:                 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
435:                     <div class="sf-box checkbox">435:                     <div class="sf-box checkbox">
436:                         <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="save_pass" value="1" /></span>436:                         <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="save_pass" value="1" <?php echo isset($_POST['save_pass']) ? 'checked="checked" ' : '' ?>/></span>
437:                         <label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_login['Remember me'] ?></span> <?php echo $lang_login['Persistent login'] ?></label>437:                         <label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_login['Remember me'] ?></span> <?php echo $lang_login['Persistent login'] ?></label>
438:                     </div>438:                     </div>
439:                 </div>439:                 </div>


punbb-1.3.4/misc.php punbb-1.3.6/misc.php
154:         message($lang_common['No permission']);154:         message($lang_common['No permission']);
155: 155: 
156:     $recipient_id = intval($_GET['email']);156:     $recipient_id = intval($_GET['email']);
 157:     
157:     if ($recipient_id < 2)158:     if ($recipient_id < 2)
158:         message($lang_common['Bad request']);159:         message($lang_common['Bad request']);
159: 160: 
170:     );171:     );
171: 172: 
172:     ($hook = get_hook('mi_email_qr_get_form_email_data')) ? eval($hook) : null;173:     ($hook = get_hook('mi_email_qr_get_form_email_data')) ? eval($hook) : null;
 174: 
173:     $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);175:     $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
 176:     
174:     if (!$forum_db->num_rows($result))177:     if (!$forum_db->num_rows($result))
175:         message($lang_common['Bad request']);178:         message($lang_common['Bad request']);
176: 179: 
179:     if ($email_setting == 2 && !$forum_user['is_admmod'])182:     if ($email_setting == 2 && !$forum_user['is_admmod'])
180:         message($lang_misc['Form e-mail disabled']);183:         message($lang_misc['Form e-mail disabled']);
181: 184: 
 185:     if ($recipient_email == '')
 186:         message($lang_common['Bad request']);
182: 187: 
183:     if (isset($_POST['form_sent']))188:     if (isset($_POST['form_sent']))
184:     {189:     {
367:     {372:     {
368:         ($hook = get_hook('mi_report_form_submitted')) ? eval($hook) : null;373:         ($hook = get_hook('mi_report_form_submitted')) ? eval($hook) : null;
369: 374: 
 375:         // Start with a clean slate
 376:         $errors = array();
 377: 
370:         // Flood protection378:         // Flood protection
371:         if ($forum_user['last_email_sent'] != '' && (time() - $forum_user['last_email_sent']) < $forum_user['g_email_flood'] && (time() - $forum_user['last_email_sent']) >= 0)379:         if ($forum_user['last_email_sent'] != '' && (time() - $forum_user['last_email_sent']) < $forum_user['g_email_flood'] && (time() - $forum_user['last_email_sent']) >= 0)
372:             message(sprintf($lang_misc['Report flood'], $forum_user['g_email_flood']));380:             message(sprintf($lang_misc['Report flood'], $forum_user['g_email_flood']));
376:         if ($reason == '')384:         if ($reason == '')
377:             message($lang_misc['No reason']);385:             message($lang_misc['No reason']);
378: 386: 
379:         // Get some info about the topic we're reporting387:         if (strlen($reason) > FORUM_MAX_POSTSIZE_BYTES)
380:         $query = array( 
381:             'SELECT'    => 't.id, t.subject, t.forum_id', 
382:             'FROM'        => 'posts AS p', 
383:             'JOINS'        => array( 
384:                 array( 
385:                     'INNER JOIN'    => 'topics AS t', 
386:                     'ON'            => 't.id=p.topic_id' 
387:                 ) 
388:             ), 
389:             'WHERE'        => 'p.id='.$post_id 
390:         ); 
391:  
392:         ($hook = get_hook('mi_report_qr_get_topic_data')) ? eval($hook) : null; 
393:         $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); 
394:         if (!$forum_db->num_rows($result)) 
395:             message($lang_common['Bad request']); 
396:  
397:         list($topic_id, $subject, $forum_id) = $forum_db->fetch_row($result); 
398:  
399:         ($hook = get_hook('mi_report_pre_reports_sent')) ? eval($hook) : null; 
400:  
401:         // Should we use the internal report handling? 
402:         if ($forum_config['o_report_method'] == 0 || $forum_config['o_report_method'] == 2) 
403:         {388:         {
 389:             $errors[] = sprintf($lang_misc['Too long reason'], forum_number_format(strlen($reason)), forum_number_format(FORUM_MAX_POSTSIZE_BYTES));
 390:         }
 391: 
 392:         if (empty($errors)) {
 393:             // Get some info about the topic we're reporting
404:             $query = array(394:             $query = array(
405:                 'INSERT'    => 'post_id, topic_id, forum_id, reported_by, created, message',395:                 'SELECT'    => 't.id, t.subject, t.forum_id',
406:                 'INTO'        => 'reports',396:                 'FROM'        => 'posts AS p',
407:                 'VALUES'    => $post_id.', '.$topic_id.', '.$forum_id.', '.$forum_user['id'].', '.time().', \''.$forum_db->escape($reason).'\''397:                 'JOINS'        => array(
 398:                     array(
 399:                         'INNER JOIN'    => 'topics AS t',
 400:                         'ON'            => 't.id=p.topic_id'
 401:                     )
 402:                 ),
 403:                 'WHERE'        => 'p.id='.$post_id
408:             );404:             );
409: 405: 
410:             ($hook = get_hook('mi_report_add_report')) ? eval($hook) : null;406:             ($hook = get_hook('mi_report_qr_get_topic_data')) ? eval($hook) : null;
411:             $forum_db->query_build($query) or error(__FILE__, __LINE__);407:             $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
412:         }408:             if (!$forum_db->num_rows($result))
 409:                 message($lang_common['Bad request']);
413: 410: 
414:         // Should we e-mail the report?411:             list($topic_id, $subject, $forum_id) = $forum_db->fetch_row($result);
415:         if ($forum_config['o_report_method'] == 1 || $forum_config['o_report_method'] == 2)412: 
416:         {413:             ($hook = get_hook('mi_report_pre_reports_sent')) ? eval($hook) : null;
417:             // We send it to the complete mailing-list in one swoop414: 
418:             if ($forum_config['o_mailing_list'] != '')415:             // Should we use the internal report handling?
 416:             if ($forum_config['o_report_method'] == 0 || $forum_config['o_report_method'] == 2)
419:             {417:             {
420:                 $mail_subject = 'Report('.$forum_id.') - \''.$subject.'\'';418:                 $query = array(
421:                 $mail_message = 'User \''.$forum_user['username'].'\' has reported the following message:'."\n".forum_link($forum_url['post'], $post_id)."\n\n".'Reason:'."\n".$reason;419:                     'INSERT'    => 'post_id, topic_id, forum_id, reported_by, created, message',
 420:                     'INTO'        => 'reports',
 421:                     'VALUES'    => $post_id.', '.$topic_id.', '.$forum_id.', '.$forum_user['id'].', '.time().', \''.$forum_db->escape($reason).'\''
 422:                 );
422: 423: 
423:                 if (!defined('FORUM_EMAIL_FUNCTIONS_LOADED'))424:                 ($hook = get_hook('mi_report_add_report')) ? eval($hook) : null;
424:                     require FORUM_ROOT.'include/email.php';425:                 $forum_db->query_build($query) or error(__FILE__, __LINE__);
 426:             }
425: 427: 
426:                 ($hook = get_hook('mi_report_modify_message')) ? eval($hook) : null;428:             // Should we e-mail the report?
 429:             if ($forum_config['o_report_method'] == 1 || $forum_config['o_report_method'] == 2)
 430:             {
 431:                 // We send it to the complete mailing-list in one swoop
 432:                 if ($forum_config['o_mailing_list'] != '')
 433:                 {
 434:                     $mail_subject = 'Report('.$forum_id.') - \''.$subject.'\'';
 435:                     $mail_message = 'User \''.$forum_user['username'].'\' has reported the following message:'."\n".forum_link($forum_url['post'], $post_id)."\n\n".'Reason:'."\n".$reason;
 436: 
 437:                     if (!defined('FORUM_EMAIL_FUNCTIONS_LOADED'))
 438:                         require FORUM_ROOT.'include/email.php';
427: 439: 
428:                 forum_mail($forum_config['o_mailing_list'], $mail_subject, $mail_message);440:                     ($hook = get_hook('mi_report_modify_message')) ? eval($hook) : null;
 441: 
 442:                     forum_mail($forum_config['o_mailing_list'], $mail_subject, $mail_message);
 443:                 }
429:             }444:             }
430:         } 
431: 445: 
432:         // Set last_email_sent time to prevent flooding446:             // Set last_email_sent time to prevent flooding
433:         $query = array(447:             $query = array(
434:             'UPDATE'    => 'users',448:                 'UPDATE'    => 'users',
435:             'SET'        => 'last_email_sent='.time(),449:                 'SET'        => 'last_email_sent='.time(),
436:             'WHERE'        => 'id='.$forum_user['id']450:                 'WHERE'        => 'id='.$forum_user['id']
437:         );451:             );
438: 452: 
439:         ($hook = get_hook('mi_report_qr_update_last_email_sent')) ? eval($hook) : null;453:             ($hook = get_hook('mi_report_qr_update_last_email_sent')) ? eval($hook) : null;
440:         $forum_db->query_build($query) or error(__FILE__, __LINE__);454:             $forum_db->query_build($query) or error(__FILE__, __LINE__);
441: 455: 
442:         ($hook = get_hook('mi_report_pre_redirect')) ? eval($hook) : null;456:             ($hook = get_hook('mi_report_pre_redirect')) ? eval($hook) : null;
443: 457: 
444:         redirect(forum_link($forum_url['post'], $post_id), $lang_misc['Report redirect']);458:             redirect(forum_link($forum_url['post'], $post_id), $lang_misc['Report redirect']);
 459:         }
445:     }460:     }
446: 461: 
447:     // Setup form462:     // Setup form
480:         <div id="req-msg" class="req-warn ct-box error-box">495:         <div id="req-msg" class="req-warn ct-box error-box">
481:             <p class="important"><?php printf($lang_common['Required warn'], '<em>'.$lang_common['Required'].'</em>') ?></p>496:             <p class="important"><?php printf($lang_common['Required warn'], '<em>'.$lang_common['Required'].'</em>') ?></p>
482:         </div>497:         </div>
 498: <?php
 499:         // If there were any errors, show them
 500:         if (!empty($errors)) {
 501:             $forum_page['errors'] = array();
 502:             foreach ($errors as $cur_error) {
 503:                 $forum_page['errors'][] = '<li class="warn"><span>'.$cur_error.'</span></li>';
 504:             }
 505: 
 506:             ($hook = get_hook('mi_pre_report_errors')) ? eval($hook) : null;
 507: ?>
 508:         <div class="ct-box error-box">
 509:             <h2 class="warn hn"><?php echo $lang_misc['Report errors'] ?></h2>
 510:             <ul class="error-list">
 511:                 <?php echo implode("\n\t\t\t\t", $forum_page['errors'])."\n" ?>
 512:             </ul>
 513:         </div>
 514: <?php
 515:         }
 516: ?>
483:         <form id="afocus" class="frm-form" method="post" accept-charset="utf-8" action="<?php echo $forum_page['form_action'] ?>">517:         <form id="afocus" class="frm-form" method="post" accept-charset="utf-8" action="<?php echo $forum_page['form_action'] ?>">
484:             <div class="hidden">518:             <div class="hidden">
485:                 <?php echo implode("\n\t\t\t\t", $forum_page['hidden_fields'])."\n" ?>519:                 <?php echo implode("\n\t\t\t\t", $forum_page['hidden_fields'])."\n" ?>


punbb-1.3.4/moderate.php punbb-1.3.6/moderate.php
 63:  63: 
 64: // Get some info about the forum we're moderating 64: // Get some info about the forum we're moderating
 65: $query = array( 65: $query = array(
 66:     'SELECT'    => 'f.forum_name, f.redirect_url, f.num_topics, f.moderators', 66:     'SELECT'    => 'f.forum_name, f.redirect_url, f.num_topics, f.moderators, f.sort_by',
 67:     'FROM'        => 'forums AS f', 67:     'FROM'        => 'forums AS f',
 68:     'JOINS'        => array( 68:     'JOINS'        => array(
 69:         array( 69:         array(
1433:     'SELECT'    => 't.id, t.poster, t.subject, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to',1433:     'SELECT'    => 't.id, t.poster, t.subject, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to',
1434:     'FROM'        => 'topics AS t',1434:     'FROM'        => 'topics AS t',
1435:     'WHERE'        => 'forum_id='.$fid,1435:     'WHERE'        => 'forum_id='.$fid,
1436:     'ORDER BY'    => 't.sticky DESC, last_post DESC',1436:     'ORDER BY'    => 't.sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 't.posted' : 't.last_post').' DESC',
1437:     'LIMIT'        =>    $forum_page['start_from'].', '.$forum_user['disp_topics']1437:     'LIMIT'        =>    $forum_page['start_from'].', '.$forum_user['disp_topics']
1438: );1438: );
1439: 1439: 


punbb-1.3.4/post.php punbb-1.3.6/post.php
124:             $errors[] = $lang_post['No subject'];124:             $errors[] = $lang_post['No subject'];
125:         else if (utf8_strlen($subject) > 70)125:         else if (utf8_strlen($subject) > 70)
126:             $errors[] = $lang_post['Too long subject'];126:             $errors[] = $lang_post['Too long subject'];
127:         else if ($forum_config['p_subject_all_caps'] == '0' && utf8_strtoupper($subject) == $subject && !$forum_page['is_admmod'])127:         else if ($forum_config['p_subject_all_caps'] == '0' && check_is_all_caps($subject) && !$forum_page['is_admmod'])
128:             $errors[] = $lang_post['All caps subject'];128:             $errors[] = $lang_post['All caps subject'];
129:     }129:     }
130: 130: 
168: 168: 
169:     if (strlen($message) > FORUM_MAX_POSTSIZE_BYTES)169:     if (strlen($message) > FORUM_MAX_POSTSIZE_BYTES)
170:         $errors[] = sprintf($lang_post['Too long message'], forum_number_format(strlen($message)), forum_number_format(FORUM_MAX_POSTSIZE_BYTES));170:         $errors[] = sprintf($lang_post['Too long message'], forum_number_format(strlen($message)), forum_number_format(FORUM_MAX_POSTSIZE_BYTES));
171:     else if ($forum_config['p_message_all_caps'] == '0' && utf8_strtoupper($message) == $message && !$forum_page['is_admmod'])171:     else if ($forum_config['p_message_all_caps'] == '0' && check_is_all_caps($message) && !$forum_page['is_admmod'])
172:         $errors[] = $lang_post['All caps message'];172:         $errors[] = $lang_post['All caps message'];
173: 173: 
174:     // Validate BBCode syntax174:     // Validate BBCode syntax


punbb-1.3.4/profile.php punbb-1.3.6/profile.php
336:             <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">336:             <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
337:                 <legend class="group-legend"><strong><?php echo $lang_common['Required information'] ?></strong></legend>337:                 <legend class="group-legend"><strong><?php echo $lang_common['Required information'] ?></strong></legend>
338: <?php ($hook = get_hook('pf_change_pass_normal_pre_old_password')) ? eval($hook) : null; ?>338: <?php ($hook = get_hook('pf_change_pass_normal_pre_old_password')) ? eval($hook) : null; ?>
339: <?php if (!$forum_user['is_admmod']): ?>339: <?php if (!$forum_user['is_admmod'] || $forum_user['id'] == $id): ?>
340:                 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">340:                 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
341:                     <div class="sf-box text required">341:                     <div class="sf-box text required">
342:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Old password'] ?> <em><?php echo $lang_common['Required'] ?></em></span> <small><?php echo $lang_profile['Old password help'] ?></small></label><br />342:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Old password'] ?> <em><?php echo $lang_common['Required'] ?></em></span> <small><?php echo $lang_profile['Old password help'] ?></small></label><br />
847: 847: 
848:     ($hook = get_hook('pf_ban_user_selected')) ? eval($hook) : null;848:     ($hook = get_hook('pf_ban_user_selected')) ? eval($hook) : null;
849: 849: 
850:     redirect(forum_link($forum_url['admin_bans']).'?add_ban='.$id, $lang_profile['Ban redirect']);850:     redirect(forum_link($forum_url['admin_bans']).'&amp;add_ban='.$id, $lang_profile['Ban redirect']);
851: }851: }
852: 852: 
853: 853: 
957:             $form['dst'] = (isset($form['dst'])) ? 1 : 0;957:             $form['dst'] = (isset($form['dst'])) ? 1 : 0;
958:             $form['time_format'] = (isset($form['time_format'])) ? intval($form['time_format']) : 0;958:             $form['time_format'] = (isset($form['time_format'])) ? intval($form['time_format']) : 0;
959:             $form['date_format'] = (isset($form['date_format'])) ? intval($form['date_format']) : 0;959:             $form['date_format'] = (isset($form['date_format'])) ? intval($form['date_format']) : 0;
 960:             $form['timezone'] = (isset($form['timezone'])) ? floatval($form['timezone']) : $forum_config['o_default_timezone'];
 961: 
 962:             // Validate timezone
 963:             if (($form['timezone'] > 14.0) || ($form['timezone'] < -12.0)) {
 964:                 message($lang_common['Bad request']);
 965:             }
960: 966: 
961:             $form['email_setting'] = intval($form['email_setting']);967:             $form['email_setting'] = intval($form['email_setting']);
962:             if ($form['email_setting'] < 0 && $form['email_setting'] > 2) $form['email_setting'] = 1;968:             if ($form['email_setting'] < 0 || $form['email_setting'] > 2) $form['email_setting'] = 1;
963: 969: 
964:             if ($forum_config['o_subscriptions'] == '1')970:             if ($forum_config['o_subscriptions'] == '1')
965:             {971:             {
1012:             if (substr_count($form['signature'], "\n") > ($forum_config['p_sig_lines'] - 1))1018:             if (substr_count($form['signature'], "\n") > ($forum_config['p_sig_lines'] - 1))
1013:                 $errors[] = sprintf($lang_profile['Sig too many lines'], forum_number_format($forum_config['p_sig_lines']));1019:                 $errors[] = sprintf($lang_profile['Sig too many lines'], forum_number_format($forum_config['p_sig_lines']));
1014: 1020: 
1015:             if ($form['signature'] != '' && $forum_config['p_sig_all_caps'] == '0' && utf8_strtoupper($form['signature']) == $form['signature'] && !$forum_user['is_admmod'])1021:             if ($form['signature'] != '' && $forum_config['p_sig_all_caps'] == '0' && check_is_all_caps($form['signature']) && !$forum_user['is_admmod'])
1016:                 $form['signature'] = utf8_ucwords(utf8_strtolower($form['signature']));1022:                 $form['signature'] = utf8_ucwords(utf8_strtolower($form['signature']));
1017: 1023: 
1018:             // Validate BBCode syntax1024:             // Validate BBCode syntax
1828:                 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">1834:                 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1829:                     <div class="sf-box text">1835:                     <div class="sf-box text">
1830:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Website'] ?></span></label><br />1836:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Website'] ?></span></label><br />
1831:                         <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[url]" value="<?php echo(isset($form['url']) ? forum_htmlencode($form['url']) : forum_htmlencode($user['url'])) ?>" size="50" maxlength="80" /></span>1837:                         <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[url]" value="<?php echo(isset($form['url']) ? forum_htmlencode($form['url']) : forum_htmlencode($user['url'])) ?>" size="35" maxlength="80" /></span>
1832:                     </div>1838:                     </div>
1833:                 </div>1839:                 </div>
1834: <?php ($hook = get_hook('pf_change_details_identity_pre_jabber')) ? eval($hook) : null; ?>1840: <?php ($hook = get_hook('pf_change_details_identity_pre_jabber')) ? eval($hook) : null; ?>
1835:                 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">1841:                 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1836:                     <div class="sf-box text">1842:                     <div class="sf-box text">
1837:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Jabber'] ?></span></label><br />1843:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['Jabber'] ?></span></label><br />
1838:                         <span class="fld-input"><input id="fld<?php echo $forum_page['fld_count'] ?>" type="text" name="form[jabber]" value="<?php echo(isset($form['jabber']) ? forum_htmlencode($form['jabber']) : forum_htmlencode($user['jabber'])) ?>" size="40" maxlength="80" /></span>1844:                         <span class="fld-input"><input id="fld<?php echo $forum_page['fld_count'] ?>" type="text" name="form[jabber]" value="<?php echo(isset($form['jabber']) ? forum_htmlencode($form['jabber']) : forum_htmlencode($user['jabber'])) ?>" size="35" maxlength="80" /></span>
1839:                     </div>1845:                     </div>
1840:                 </div>1846:                 </div>
1841: <?php ($hook = get_hook('pf_change_details_identity_pre_icq')) ? eval($hook) : null; ?>1847: <?php ($hook = get_hook('pf_change_details_identity_pre_icq')) ? eval($hook) : null; ?>
1849:                 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">1855:                 <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
1850:                     <div class="sf-box text">1856:                     <div class="sf-box text">
1851:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['MSN'] ?></span></label><br />1857:                         <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['MSN'] ?></span></label><br />
1852:                         <span class="fld-input"><input id="fld<?php echo $forum_page['fld_count'] ?>" type="text" name="form[msn]" value="<?php echo(isset($form['msn']) ? forum_htmlencode($form['msn']) : forum_htmlencode($user['msn'])) ?>" size="40" maxlength="80" /></span>1858:                         <span class="fld-input"><input id="fld<?php echo $forum_page['fld_count'] ?>" type="text" name="form[msn]" value="<?php echo(isset($form['msn']) ? forum_htmlencode($form['msn']) : forum_htmlencode($user['msn'])) ?>" size="35" maxlength="80" /></span>
1853:                     </div>1859:                     </div>
1854:                 </div>1860:                 </div>
1855: <?php ($hook = get_hook('pf_change_details_identity_pre_aim')) ? eval($hook) : null; ?>1861: <?php ($hook = get_hook('pf_change_details_identity_pre_aim')) ? eval($hook) : null; ?>
2256:         $forum_page['crumbs'] = array(2262:         $forum_page['crumbs'] = array(
2257:             array($forum_config['o_board_title'], forum_link($forum_url['index'])),2263:             array($forum_config['o_board_title'], forum_link($forum_url['index'])),
2258:             array(sprintf($lang_profile['Users profile'], $user['username']), forum_link($forum_url['user'], $id)),2264:             array(sprintf($lang_profile['Users profile'], $user['username']), forum_link($forum_url['user'], $id)),
2259:             array($lang_profile['Section signature'],forum_link($forum_url['profile_signature'], $id))2265:             array($lang_profile['Section signature'], forum_link($forum_url['profile_signature'], $id))
2260:         );2266:         );
2261: 2267: 
2262:         // Setup the form2268:         // Setup the form
2308: 2314: 
2309: ?>2315: ?>
2310:         <div class="ct-box error-box">2316:         <div class="ct-box error-box">
2311:             <h2 class="warn hn"><?php echo $lang_profile['Profile update errors'] ?></h3>2317:             <h2 class="warn hn"><?php echo $lang_profile['Profile update errors'] ?></h2>
2312:             <ul class="error-list">2318:             <ul class="error-list">
2313:                 <?php echo implode("\n\t\t\t\t\t", $forum_page['errors'])."\n" ?>2319:                 <?php echo implode("\n\t\t\t\t\t", $forum_page['errors'])."\n" ?>
2314:             </ul>2320:             </ul>
2513:         $forum_page['user_management'] = array();2519:         $forum_page['user_management'] = array();
2514: 2520: 
2515:         if ($forum_user['g_moderator'] == '1')2521:         if ($forum_user['g_moderator'] == '1')
2516:             $forum_page['user_management']['ban'] = '<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['Ban user'].'</h3>'."\n\t\t\t\t".'<p><a href="'.forum_link($forum_url['admin_bans']).'?add_ban='.$id.'">'.$lang_profile['Ban user info'].'</a></p>'."\n\t\t\t\t".'</div>'."\n\t\t\t".'</div>';2522:             $forum_page['user_management']['ban'] = '<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['Ban user'].'</h3>'."\n\t\t\t\t".'<p><a href="'.forum_link($forum_url['admin_bans']).'&amp;add_ban='.$id.'">'.$lang_profile['Ban user info'].'</a></p>'."\n\t\t\t\t".'</div>'."\n\t\t\t".'</div>';
2517:         else if ($forum_user['g_moderator'] != '1' && $user['g_id'] != FORUM_ADMIN )2523:         else if ($forum_user['g_moderator'] != '1' && $user['g_id'] != FORUM_ADMIN )
2518:         {2524:         {
2519:             $forum_page['user_management']['ban'] = '<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['Ban user'].'</h3>'."\n\t\t\t\t".'<p><a href="'.forum_link($forum_url['admin_bans']).'?add_ban='.$id.'">'.$lang_profile['Ban user info'].'</a></p>'."\n\t\t\t\t".'</div>'."\n\t\t\t".'</div>';2525:             $forum_page['user_management']['ban'] = '<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['Ban user'].'</h3>'."\n\t\t\t\t".'<p><a href="'.forum_link($forum_url['admin_bans']).'&amp;add_ban='.$id.'">'.$lang_profile['Ban 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>';2526:             $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>';
2521:         }2527:         }
2522: 2528: 


punbb-1.3.4/register.php punbb-1.3.6/register.php
163:         if ($banned_email && $forum_config['p_allow_banned_email'] == '0')163:         if ($banned_email && $forum_config['p_allow_banned_email'] == '0')
164:             $errors[] = $lang_profile['Banned e-mail'];164:             $errors[] = $lang_profile['Banned e-mail'];
165: 165: 
 166:         // Clean old unverified registrators - delete older than 72 hours
 167:         $query = array(
 168:             'DELETE'    => 'users',
 169:             'WHERE'        => 'group_id='.FORUM_UNVERIFIED.' AND activate_key IS NOT NULL AND registered < '.(time() - 259200)
 170:         );
 171:         ($hook = get_hook('rg_register_qr_delete_unverified')) ? eval($hook) : null;
 172:         $forum_db->query_build($query) or error(__FILE__, __LINE__);
 173: 
166:         // Check if someone else already has registered with that e-mail address174:         // Check if someone else already has registered with that e-mail address
167:         $dupe_list = array();175:         $dupe_list = array();
168: 176: 


punbb-1.3.4/search.php punbb-1.3.6/search.php
533: ($hook = get_hook('se_qr_get_cats_and_forums')) ? eval($hook) : null;533: ($hook = get_hook('se_qr_get_cats_and_forums')) ? eval($hook) : null;
534: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);534: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
535: 535: 
536: $cur_category = 0;536: if ($forum_db->num_rows($result) > 0)
537: while ($cur_forum = $forum_db->fetch_assoc($result)) 
538: {537: {
539:     ($hook = get_hook('se_forum_loop_start')) ? eval($hook) : null;538:     $cur_category = 0;
540: 539:     while ($cur_forum = $forum_db->fetch_assoc($result))
541:     if ($cur_forum['cid'] != $cur_category)    // A new category since last iteration? 
542:     {540:     {
543:         if ($cur_category)541:         ($hook = get_hook('se_forum_loop_start')) ? eval($hook) : null;
544:             echo "\t\t\t\t\t\t\t".'</fieldset>'."\n";542: 
 543:         if ($cur_forum['cid'] != $cur_category)    // A new category since last iteration?
 544:         {
 545:             if ($cur_category)
 546:                 echo "\t\t\t\t\t\t\t".'</fieldset>'."\n";
 547: 
 548:             echo "\t\t\t\t\t\t\t".'<fieldset>'."\n\t\t\t\t\t\t\t\t".'<legend><span>'.forum_htmlencode($cur_forum['cat_name']).':</span></legend>'."\n";
 549:             $cur_category = $cur_forum['cid'];
 550:         }
545: 551: 
546:         echo "\t\t\t\t\t\t\t".'<fieldset>'."\n\t\t\t\t\t\t\t\t".'<legend><span>'.forum_htmlencode($cur_forum['cat_name']).':</span></legend>'."\n";552:         echo "\t\t\t\t\t\t\t\t".'<div class="checklist-item"><span class="fld-input"><input type="checkbox" id="fld'.(++$forum_page['fld_count']).'"  name="forum[]" value="'.$cur_forum['fid'].'" /></span> <label for="fld'.$forum_page['fld_count'].'">'.forum_htmlencode($cur_forum['forum_name']).'</label></div>'."\n";
547:         $cur_category = $cur_forum['cid']; 
548:     }553:     }
549: 554: 
550:     echo "\t\t\t\t\t\t\t\t".'<div class="checklist-item"><span class="fld-input"><input type="checkbox" id="fld'.(++$forum_page['fld_count']).'"  name="forum[]" value="'.$cur_forum['fid'].'" /></span> <label for="fld'.$forum_page['fld_count'].'">'.forum_htmlencode($cur_forum['forum_name']).'</label></div>'."\n";555:     echo "\t\t\t\t\t\t\t".'</fieldset>'."\n";
551: }556: }
552: 557: 
553: ?>558: ?>
554:                             </fieldset> 
555:                         </div>559:                         </div>
556:                     </div>560:                     </div>
557: <?php ($hook = get_hook('se_pre_forum_fieldset_end')) ? eval($hook) : null; ?>561: <?php ($hook = get_hook('se_pre_forum_fieldset_end')) ? eval($hook) : null; ?>


punbb-1.3.4/style/Oxygen/Oxygen_cs.css punbb-1.3.6/style/Oxygen/Oxygen_cs.css
182:     background: #f4f4f4;182:     background: #f4f4f4;
183:     }183:     }
184: 184: 
 185: .brd .help-box .hn {
 186:     color: #294F6E
 187:     }
 188: 
185: .brd .frm-buttons, .brd .extension .options, .brd .hotfix .options {189: .brd .frm-buttons, .brd .extension .options, .brd .hotfix .options {
186:     border-color: #DBE0E4;190:     border-color: #DBE0E4;
187:     }191:     }
356: 360: 
357: #extensions-used {361: #extensions-used {
358:     border-bottom-color: #999;362:     border-bottom-color: #999;
359: }363:     }
360: 364: 
361: 365: 
362: /* Status indicators366: /* Status indicators
378:     border-color: #ACACAC #979797 #898989 #7A7A7A;382:     border-color: #ACACAC #979797 #898989 #7A7A7A;
379:     }383:     }
380: 384: 
381: .brd .main-content .sticky .closed .icon {385: .brd .main-content .sticky.closed .icon {
382:     border-color: #D7E5F3 #C3CFDC #898989 #7A7A7A;386:     border-color: #D7E5F3 #C3CFDC #898989 #7A7A7A;
383:     }387:     }
384: 388: 
390: /* Multi Checkbox Widget394: /* Multi Checkbox Widget
391: -------------------------------------------------------------*/395: -------------------------------------------------------------*/
392: 396: 
 397: .brd .checklist .checklist-item label {
 398:     background: #fff;
 399:     }
 400: 
393: .brd .checklist .checklist-item label:hover {401: .brd .checklist .checklist-item label:hover {
394:     background: #EDF1F5;402:     background: #EDF1F5;
395:     }403:     }


punbb-1.3.4/style/Oxygen/Oxygen.css punbb-1.3.6/style/Oxygen/Oxygen.css
597:     border-bottom: none;597:     border-bottom: none;
598:     }598:     }
599: 599: 
 600: #brd-admin-bans #brd-pagepost-end {
 601:     margin-top: -1em;
 602:     }
600: .brd .paging {603: .brd .paging {
601:     float: left;604:     float: left;
602:     }605:     }
638:     font-weight: normal;641:     font-weight: normal;
639:     }642:     }
640: 643: 
641: .brd .crumbs span, .brd crumbs span * {644: .brd .crumbs span, .brd .crumbs span * {
642:     white-space: nowrap;645:     white-space: nowrap;
643:     }646:     }
644: 647: 
716: 719: 
717: #extensions-used {720: #extensions-used {
718:     border-bottom: 1px dotted;721:     border-bottom: 1px dotted;
719: }722:     }
720: 723: 
721: /* Main and Content Options724: /* Main and Content Options
722: -------------------------------------------------------------*/725: -------------------------------------------------------------*/
723: 726: 
724: .brd p.options {727: .brd p.options {
725:     border-top: none;728:     border-top: none;
726:     float:right;729:     float: right;
727:     }730:     }
728: 731: 
729: .brd .main-modoptions .options {732: .brd .main-modoptions .options {
845:     }848:     }
846: 849: 
847: .brd .main-content .main-item .hn .item-status {850: .brd .main-content .main-item .hn .item-status {
848:     font-weight:normal;851:     font-weight: normal;
849:     }852:     }
850: 853: 
851: .brd .main-content .main-item .hn .item-status em {854: .brd .main-content .main-item .hn .item-status em {
852:     font-style:normal;855:     font-style: normal;
853:     }856:     }
854: 857: 
855: .brd .main-content .main-item .item-subject,858: .brd .main-content .main-item .item-subject,
1207:     }1210:     }
1208: 1211: 
1209: .brd .mf-set .mf-yesno .mf-item {1212: .brd .mf-set .mf-yesno .mf-item {
1210:     width: 10em;1213:     width: 11em;
1211:     float: left;1214:     float: left;
1212:     }1215:     }
1213: 1216: 
1278:     text-align:left;1281:     text-align:left;
1279:     }1282:     }
1280: 1283: 
 1284: .brd .checklist legend span {
 1285:     width: auto;
 1286:     max-width: 25em;
 1287:     }
 1288: 
 1289: 
1281: .brd .checklist .checklist-item {1290: .brd .checklist .checklist-item {
1282:     position: relative;1291:     position: relative;
1283:     height: auto;1292:     height: auto;
1288:     padding: 0 0 0 2.25em;1297:     padding: 0 0 0 2.25em;
1289:     float: none;1298:     float: none;
1290:     height: 100%;1299:     height: 100%;
1291:     background-color: #fff; 
1292:     }1300:     }
1293: 1301: 
1294: .brd .checklist .checklist-item .fld-input {1302: .brd .checklist .checklist-item .fld-input {
1329:     text-align: left;1337:     text-align: left;
1330:     position: relative;1338:     position: relative;
1331:     margin: 0 1em 0 -1px;1339:     margin: 0 1em 0 -1px;
1332:     padding: 2px 1em;1340:     padding: 2px 1.25em;
1333:     font-size: 0.917em;1341:     font-size: 0.917em;
1334:     z-index: 100;1342:     z-index: 100;
1335:     }1343:     }
1367:     width: 100%;1375:     width: 100%;
1368:     position: relative;1376:     position: relative;
1369:     }1377:     }
1370: 1378:     
1371: .brd .txt-set .required label span em {1379: .brd .txt-set .required label span em { 
1372:     margin-bottom: -1.2em;1380:     margin-bottom: -1.2em; 
1373:     }1381:     }
1374: 1382:      
1375: .brd .req-error {1383: .brd .req-error {
1376:     display: block;1384:     display: block;
1377:     }1385:     }


punbb-1.3.4/style/Oxygen/Oxygen_ie6.css punbb-1.3.6/style/Oxygen/Oxygen_ie6.css
 85: /* Fix for index.php: no backgroud for the first main-head. */ 85: /* Fix for index.php: no backgroud for the first main-head. */
 86: .brd #brd-index .main-head { position: relative; } 86: .brd #brd-index .main-head { position: relative; }
 87:  87: 
 88: .brd .main-content .main-item .hn .posted-mark { 
 89:     left: 0.2em; 
 90:     } 
 91:  
 92: /* Footer 88: /* Footer
 93: -------------------------------------------------------------*/ 89: -------------------------------------------------------------*/
 94:  90: 


punbb-1.3.4/style/Oxygen/Oxygen_ie8.css punbb-1.3.6/style/Oxygen/Oxygen_ie8.css
   1: /*************************************************************
   2: IE8 - FIXES
   3: **************************************************************/
   4: /* Forms
   5: -------------------------------------------------------------*/
   6: .brd .txt-set .required label span em {
   7:     margin-bottom: 0;
   8:     }


punbb-1.3.4/style/Oxygen/Oxygen.php punbb-1.3.6/style/Oxygen/Oxygen.php
  1: <link rel="stylesheet" type="text/css" media="screen" href="<?php echo $base_url.'/style/'.$forum_user['style'] ?>/Oxygen.css" />  1: <link rel="stylesheet" type="text/css" media="screen" href="<?php echo $base_url.'/style/'.$forum_user['style'] ?>/Oxygen.css" />
  2: <link rel="stylesheet" type="text/css" media="screen" href="<?php echo $base_url.'/style/'.$forum_user['style'] ?>/Oxygen_cs.css" />  2: <link rel="stylesheet" type="text/css" media="screen" href="<?php echo $base_url.'/style/'.$forum_user['style'] ?>/Oxygen_cs.css" />
  3: <!--[if lte IE 6]><link rel="stylesheet" type="text/css" href="<?php echo $base_url.'/style/'.$forum_user['style'] ?>/Oxygen_ie6.css" /><![endif]-->  3: <!--[if lte IE 6]><link rel="stylesheet" type="text/css" href="<?php echo $base_url.'/style/'.$forum_user['style'] ?>/Oxygen_ie6.css" /><![endif]-->
  4: <!--[if IE 7]><link rel="stylesheet" type="text/css" href="<?php echo $base_url.'/style/'.$forum_user['style'] ?>/Oxygen_ie7.css" /><![endif]--> 
  5:   4: 
   5: <!--[if IE 7]><link rel="stylesheet" type="text/css" href="<?php echo $base_url.'/style/'.$forum_user['style'] ?>/Oxygen_ie7.css" /><![endif]-->
   6: <!--[if IE 8]><link rel="stylesheet" type="text/css" href="<?php echo $base_url.'/style/'.$forum_user['style'] ?>/Oxygen_ie8.css" /><![endif]-->
  6:   7: 


punbb-1.3.4/viewforum.php punbb-1.3.6/viewforum.php
220: 220: 
221:             ($hook = get_hook('vf_topic_loop_moved_topic_pre_item_subject_merge')) ? eval($hook) : null;221:             ($hook = get_hook('vf_topic_loop_moved_topic_pre_item_subject_merge')) ? eval($hook) : null;
222: 222: 
 223:             $forum_page['item_body']['info']['replies'] = '<li class="info-replies"><span class="label">'.$lang_forum['No replies info'].'</span></li>';
 224: 
223:             if ($forum_config['o_topic_views'] == '1')225:             if ($forum_config['o_topic_views'] == '1')
224:                 $forum_page['item_body']['info']['views'] = '<li class="info-views"><span class="label">'.$lang_forum['No views info'].'</span></li>';226:                 $forum_page['item_body']['info']['views'] = '<li class="info-views"><span class="label">'.$lang_forum['No views info'].'</span></li>';
225: 227: 
226:             $forum_page['item_body']['info']['replies'] = '<li class="info-replies"><span class="label">'.$lang_forum['No replies info'].'</span></li>'; 
227:             $forum_page['item_body']['info']['lastpost'] = '<li class="info-lastpost"><span class="label">'.$lang_forum['No lastpost info'].'</span></li>';228:             $forum_page['item_body']['info']['lastpost'] = '<li class="info-lastpost"><span class="label">'.$lang_forum['No lastpost info'].'</span></li>';
228:         }229:         }
229:         else230:         else


punbb-1.3.4/viewtopic.php punbb-1.3.6/viewtopic.php
259: <?php259: <?php
260: 260: 
261:     if (!empty($forum_page['main_head_options']))261:     if (!empty($forum_page['main_head_options']))
262:         echo "\n\t\t".'<p class="options">'.implode(' ', $forum_page['main_head_options']).'</p>';262:         echo "\t\t".'<p class="options">'.implode(' ', $forum_page['main_head_options']).'</p>'."\n";
263: 263: 
264: ?>264: ?>
265:         <h2 class="hn"><span><?php echo $forum_page['items_info'] ?></span></h2>265:         <h2 class="hn"><span><?php echo $forum_page['items_info'] ?></span></h2>
408:             }408:             }
409:             else409:             else
410:             {410:             {
411:                 if ($cur_post['poster_email'] != '' && !$forum_user['is_guest'] && $forum_user['g_send_email'] == '1')411:                 if ($cur_post['poster_email'] != '' && $forum_user['is_admmod'] && $forum_user['g_send_email'] == '1')
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>&#160;'.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>&#160;'.forum_htmlencode($cur_post['username']).'</span></a></span>';
413:             }413:             }
414:         }414:         }


hdiff - version: 2.1.0 (modified)