| punbb-1.2.17/upload/admin_index.php |
punbb-1.2.20/upload/admin_index.php |
| 1: <?php | 1: <?php |
| 2: /*********************************************************************** | 2: /*********************************************************************** |
| 3: | 3: |
| 4: Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org) | 4: Copyright (C) 2002-2008 PunBB |
| 5: | 5: |
| 6: This file is part of PunBB. | 6: This file is part of PunBB. |
| 7: | 7: |
| 43: if (!ini_get('allow_url_fopen')) | 43: if (!ini_get('allow_url_fopen')) |
| 44: message('Unable to check for upgrade since \'allow_url_fopen\' is disabled on this system.'); | 44: message('Unable to check for upgrade since \'allow_url_fopen\' is disabled on this system.'); |
| 45: | 45: |
| 46: $fp = @fopen('http://www.punbb.org/latest_version', 'r'); | 46: $fp = @fopen('http://punbb.informer.com/latest_version', 'r'); |
| 47: $latest_version = trim(@fread($fp, 16)); | 47: $latest_version = trim(@fread($fp, 16)); |
| 48: @fclose($fp); | 48: @fclose($fp); |
| 49: | 49: |
| 59: if ($cur_version >= $latest_version) | 59: if ($cur_version >= $latest_version) |
| 60: message('You are running the latest version of PunBB.'); | 60: message('You are running the latest version of PunBB.'); |
| 61: else | 61: else |
| 62: message('A new version of PunBB has been released. You can download the latest version at <a href="http://www.punbb.org/">PunBB.org</a>.'); | 62: message('A new version of PunBB has been released. You can download the latest version at <a href="http://punbb.informer.com/">PunBB.Informer.Com</a>.'); |
| 63: } | 63: } |
| 64: | 64: |
| 65: | 65: |
| 176: <dt>PunBB version</dt> | 176: <dt>PunBB version</dt> |
| 177: <dd> | 177: <dd> |
| 178: PunBB <?php echo $pun_config['o_cur_version'] ?> - <a href="admin_index.php?action=check_upgrade">Check for upgrade</a><br /> | 178: PunBB <?php echo $pun_config['o_cur_version'] ?> - <a href="admin_index.php?action=check_upgrade">Check for upgrade</a><br /> |
| 179: © Copyright 2002, 2003, 2004, 2005 Rickard Andersson | 179: © Copyright 2002-2008 PunBB |
| 180: </dd> | 180: </dd> |
| 181: <dt>Server load</dt> | 181: <dt>Server load</dt> |
| 182: <dd> | 182: <dd> |
| punbb-1.2.17/upload/help.php |
punbb-1.2.20/upload/help.php |
| 1: <?php | 1: <?php |
| 2: /*********************************************************************** | 2: /*********************************************************************** |
| 3: | 3: |
| 4: Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org) | 4: Copyright (C) 2002-2008 PunBB |
| 5: | 5: |
| 6: This file is part of PunBB. | 6: This file is part of PunBB. |
| 7: | 7: |
| 70: [email=myname@mydomain.com]<?php echo $lang_help['My e-mail address'] ?>[/email] <?php echo $lang_help['produces'] ?> <a href="mailto:myname@mydomain.com"><?php echo $lang_help['My e-mail address'] ?></a><br /><br /> | 70: [email=myname@mydomain.com]<?php echo $lang_help['My e-mail address'] ?>[/email] <?php echo $lang_help['produces'] ?> <a href="mailto:myname@mydomain.com"><?php echo $lang_help['My e-mail address'] ?></a><br /><br /> |
| 71: </div> | 71: </div> |
| 72: <p><a name="img"></a><?php echo $lang_help['Images info'] ?></p> | 72: <p><a name="img"></a><?php echo $lang_help['Images info'] ?></p> |
| 73: <div>[img]http://www.punbb.org/img/small_logo.png[/img] <?php echo $lang_help['produces'] ?> <img src="http://www.punbb.org/img/small_logo.png" alt="http://www.punbb.org/img/small_logo.png" /></div> | 73: <div>[img]http://punbb.informer.com/img/small_logo.png[/img] <?php echo $lang_help['produces'] ?> <img src="http://punbb.informer.com/img/small_logo.png" alt="http://punbb.informer.com/img/small_logo.png" /></div> |
| 74: </div> | 74: </div> |
| 75: <h2><?php echo $lang_help['Quotes'] ?></h2> | 75: <h2><?php echo $lang_help['Quotes'] ?></h2> |
| 76: <div class="box"> | 76: <div class="box"> |
| punbb-1.2.17/upload/include/email.php |
punbb-1.2.20/upload/include/email.php |
| 1: <?php | 1: <?php |
| 2: /*********************************************************************** | 2: /*********************************************************************** |
| 3: | 3: |
| 4: Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org) | 4: Copyright (C) 2002-2008 PunBB |
| | 5: |
| | 6: Partially based on code copyright (C) 2008 FluxBB.org |
| 5: | 7: |
| 6: This file is part of PunBB. | 8: This file is part of PunBB. |
| 7: | 9: |
| 123: | 125: |
| 124: $recipients = explode(',', $to); | 126: $recipients = explode(',', $to); |
| 125: | 127: |
| | 128: // Sanitize the message |
| | 129: $message = str_replace("\r\n.", "\r\n..", $message); |
| | 130: $message = (substr($message, 0, 1) == '.' ? '.'.$message : $message); |
| | 131: |
| 126: // Are we using port 25 or a custom port? | 132: // Are we using port 25 or a custom port? |
| 127: if (strpos($pun_config['o_smtp_host'], ':') !== false) | 133: if (strpos($pun_config['o_smtp_host'], ':') !== false) |
| 128: list($smtp_host, $smtp_port) = explode(':', $pun_config['o_smtp_host']); | 134: list($smtp_host, $smtp_port) = explode(':', $pun_config['o_smtp_host']); |
| punbb-1.2.17/upload/include/parser.php |
punbb-1.2.20/upload/include/parser.php |
| 1: <?php | 1: <?php |
| 2: /*********************************************************************** | 2: /*********************************************************************** |
| 3: | 3: |
| 4: Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org) | 4: Copyright (C) 2002-2008 PunBB |
| | 5: |
| | 6: Partially based on code copyright (C) 2008 FluxBB.org |
| 5: | 7: |
| 6: This file is part of PunBB. | 8: This file is part of PunBB. |
| 7: | 9: |
| 314: $pattern = array('#\[b\](.*?)\[/b\]#s', | 316: $pattern = array('#\[b\](.*?)\[/b\]#s', |
| 315: '#\[i\](.*?)\[/i\]#s', | 317: '#\[i\](.*?)\[/i\]#s', |
| 316: '#\[u\](.*?)\[/u\]#s', | 318: '#\[u\](.*?)\[/u\]#s', |
| 317: '#\[url\]([^\[]*?)\[/url\]#e', | 319: '#\[url\]([^\[<]*?)\[/url\]#e', |
| 318: '#\[url=([^\[]*?)\](.*?)\[/url\]#e', | 320: '#\[url=([^\[<]*?)\](.*?)\[/url\]#e', |
| 319: '#\[email\]([^\[]*?)\[/email\]#', | 321: '#\[email\]([^\[<]*?)\[/email\]#', |
| 320: '#\[email=([^\[]*?)\](.*?)\[/email\]#', | 322: '#\[email=([^\[<]*?)\](.*?)\[/email\]#', |
| 321: '#\[color=([a-zA-Z]*|\#?[0-9a-fA-F]{6})](.*?)\[/color\]#s'); | 323: '#\[color=([a-zA-Z]*|\#?[0-9a-fA-F]{6})](.*?)\[/color\]#s'); |
| 322: | 324: |
| 323: $replace = array('<strong>$1</strong>', | 325: $replace = array('<strong>$1</strong>', |
| punbb-1.2.17/upload/install.php |
punbb-1.2.20/upload/install.php |
| 1: <?php | 1: <?php |
| 2: /*********************************************************************** | 2: /*********************************************************************** |
| 3: | 3: |
| 4: Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org) | 4: Copyright (C) 2002-2008 PunBB |
| 5: | 5: |
| 6: This file is part of PunBB. | 6: This file is part of PunBB. |
| 7: | 7: |
| 24: | 24: |
| 25: | 25: |
| 26: // The PunBB version this script installs | 26: // The PunBB version this script installs |
| 27: $punbb_version = '1.2.17'; | 27: $punbb_version = '1.2.20'; |
| 28: | 28: |
| 29: | 29: |
| 30: define('PUN_ROOT', './'); | 30: define('PUN_ROOT', './'); |
| punbb-1.2.17/upload/lang/English/index.php |
punbb-1.2.20/upload/lang/English/index.php |
| 5: | 5: |
| 6: 'Topics' => 'Topics', | 6: 'Topics' => 'Topics', |
| 7: 'Moderators' => 'Moderators', | 7: 'Moderators' => 'Moderators', |
| 8: 'Link to' => 'Link to', // As in "Link to http://www.punbb.org/" | 8: 'Link to' => 'Link to', // As in "Link to http://punbb.informer.com/" |
| 9: 'Empty board' => 'Board is empty.', | 9: 'Empty board' => 'Board is empty.', |
| 10: 'Newest user' => 'Newest registered user', | 10: 'Newest user' => 'Newest registered user', |
| 11: 'Users online' => 'Registered users online', | 11: 'Users online' => 'Registered users online', |
| punbb-1.2.17/upload/moderate.php |
punbb-1.2.20/upload/moderate.php |
| 1: <?php | 1: <?php |
| 2: /*********************************************************************** | 2: /*********************************************************************** |
| 3: | 3: |
| 4: Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org) | 4: Copyright (C) 2002-2008 PunBB |
| | 5: |
| | 6: Partially based on code copyright (C) 2008 FluxBB.org |
| 5: | 7: |
| 6: This file is part of PunBB. | 8: This file is part of PunBB. |
| 7: | 9: |
| 141: <fieldset> | 143: <fieldset> |
| 142: <legend><?php echo $lang_misc['Confirm delete legend'] ?></legend> | 144: <legend><?php echo $lang_misc['Confirm delete legend'] ?></legend> |
| 143: <div class="infldset"> | 145: <div class="infldset"> |
| 144: <input type="hidden" name="posts" value="<?php echo implode(',', array_keys($posts)) ?>" /> | 146: <input type="hidden" name="posts" value="<?php echo implode(',', array_map('intval', array_keys($posts))) ?>" /> |
| 145: <p><?php echo $lang_misc['Delete posts comply'] ?></p> | 147: <p><?php echo $lang_misc['Delete posts comply'] ?></p> |
| 146: </div> | 148: </div> |
| 147: </fieldset> | 149: </fieldset> |
| 168: // Determine the post offset (based on $_GET['p']) | 170: // Determine the post offset (based on $_GET['p']) |
| 169: $num_pages = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']); | 171: $num_pages = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']); |
| 170: | 172: |
| 171: $p = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p']; | 173: $p = (!isset($_GET['p']) || !is_numeric($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p']; |
| 172: $start_from = $pun_user['disp_posts'] * ($p - 1); | 174: $start_from = $pun_user['disp_posts'] * ($p - 1); |
| 173: | 175: |
| 174: // Generate paging links | 176: // Generate paging links |
| 334: if (empty($topics)) | 336: if (empty($topics)) |
| 335: message($lang_misc['No topics selected']); | 337: message($lang_misc['No topics selected']); |
| 336: | 338: |
| 337: $topics = implode(',', array_keys($topics)); | 339: $topics = implode(',', array_map('intval', array_keys($topics))); |
| 338: $action = 'multi'; | 340: $action = 'multi'; |
| 339: } | 341: } |
| 340: else | 342: else |
| 457: <h2><?php echo $lang_misc['Delete topics'] ?></h2> | 459: <h2><?php echo $lang_misc['Delete topics'] ?></h2> |
| 458: <div class="box"> | 460: <div class="box"> |
| 459: <form method="post" action="moderate.php?fid=<?php echo $fid ?>"> | 461: <form method="post" action="moderate.php?fid=<?php echo $fid ?>"> |
| 460: <input type="hidden" name="topics" value="<?php echo implode(',', array_keys($topics)) ?>" /> | 462: <input type="hidden" name="topics" value="<?php echo implode(',', array_map('intval', array_keys($topics))) ?>" /> |
| 461: <div class="inform"> | 463: <div class="inform"> |
| 462: <fieldset> | 464: <fieldset> |
| 463: <legend><?php echo $lang_misc['Confirm delete legend'] ?></legend> | 465: <legend><?php echo $lang_misc['Confirm delete legend'] ?></legend> |
| 564: // Determine the topic offset (based on $_GET['p']) | 566: // Determine the topic offset (based on $_GET['p']) |
| 565: $num_pages = ceil($cur_forum['num_topics'] / $pun_user['disp_topics']); | 567: $num_pages = ceil($cur_forum['num_topics'] / $pun_user['disp_topics']); |
| 566: | 568: |
| 567: $p = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p']; | 569: $p = (!isset($_GET['p']) || !is_numeric($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p']; |
| 568: $start_from = $pun_user['disp_topics'] * ($p - 1); | 570: $start_from = $pun_user['disp_topics'] * ($p - 1); |
| 569: | 571: |
| 570: // Generate paging links | 572: // Generate paging links |
| punbb-1.2.17/upload/profile.php |
punbb-1.2.20/upload/profile.php |
| 1: <?php | 1: <?php |
| 2: /*********************************************************************** | 2: /*********************************************************************** |
| 3: | 3: |
| 4: Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org) | 4: Copyright (C) 2002-2008 PunBB |
| 5: | 5: |
| 6: This file is part of PunBB. | 6: This file is part of PunBB. |
| 7: | 7: |
| 603: // Delete the user | 603: // Delete the user |
| 604: $db->query('DELETE FROM '.$db->prefix.'users WHERE id='.$id) or error('Unable to delete user', __FILE__, __LINE__, $db->error()); | 604: $db->query('DELETE FROM '.$db->prefix.'users WHERE id='.$id) or error('Unable to delete user', __FILE__, __LINE__, $db->error()); |
| 605: | 605: |
| | 606: // Delete user avatar |
| | 607: if (file_exists($pun_config['o_avatars_dir'].'/'.$id.'.gif')) |
| | 608: @unlink($pun_config['o_avatars_dir'].'/'.$id.'.gif'); |
| | 609: if (file_exists($pun_config['o_avatars_dir'].'/'.$id.'.jpg')) |
| | 610: @unlink($pun_config['o_avatars_dir'].'/'.$id.'.jpg'); |
| | 611: if (file_exists($pun_config['o_avatars_dir'].'/'.$id.'.png')) |
| | 612: @unlink($pun_config['o_avatars_dir'].'/'.$id.'.png'); |
| | 613: |
| 606: redirect('index.php', $lang_profile['User delete redirect']); | 614: redirect('index.php', $lang_profile['User delete redirect']); |
| 607: } | 615: } |
| 608: | 616: |
| punbb-1.2.17/upload/search.php |
punbb-1.2.20/upload/search.php |
| 1: <?php | 1: <?php |
| 2: /*********************************************************************** | 2: /*********************************************************************** |
| 3: | 3: |
| 4: Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org) | 4: Copyright (C) 2002-2008 PunBB |
| 5: | 5: |
| 6: This file is part of PunBB. | 6: This file is part of PunBB. |
| 7: | 7: |
| 466: $per_page = ($show_as == 'posts') ? $pun_user['disp_posts'] : $pun_user['disp_topics']; | 466: $per_page = ($show_as == 'posts') ? $pun_user['disp_posts'] : $pun_user['disp_topics']; |
| 467: $num_pages = ceil($num_hits / $per_page); | 467: $num_pages = ceil($num_hits / $per_page); |
| 468: | 468: |
| 469: $p = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p']; | 469: $p = (!isset($_GET['p']) || !is_numeric($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p']; |
| 470: $start_from = $per_page * ($p - 1); | 470: $start_from = $per_page * ($p - 1); |
| 471: | 471: |
| 472: // Generate paging links | 472: // Generate paging links |
| punbb-1.2.17/upload/userlist.php |
punbb-1.2.20/upload/userlist.php |
| 1: <?php | 1: <?php |
| 2: /*********************************************************************** | 2: /*********************************************************************** |
| 3: | 3: |
| 4: Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org) | 4: Copyright (C) 2002-2008 PunBB |
| | 5: |
| | 6: Partially based on code copyright (C) 2008 FluxBB.org |
| 5: | 7: |
| 6: This file is part of PunBB. | 8: This file is part of PunBB. |
| 7: | 9: |
| 123: // Determine the user offset (based on $_GET['p']) | 125: // Determine the user offset (based on $_GET['p']) |
| 124: $num_pages = ceil($num_users / 50); | 126: $num_pages = ceil($num_users / 50); |
| 125: | 127: |
| 126: $p = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p']; | 128: $p = (!isset($_GET['p']) || !is_numeric($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p']; |
| 127: $start_from = 50 * ($p - 1); | 129: $start_from = 50 * ($p - 1); |
| 128: | 130: |
| 129: // Generate paging links | 131: // Generate paging links |
| 154: <?php | 156: <?php |
| 155: | 157: |
| 156: // Grab the users | 158: // Grab the users |
| 157: $result = $db->query('SELECT u.id, u.username, u.title, u.num_posts, u.registered, g.g_id, g.g_user_title FROM '.$db->prefix.'users AS u LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id>1'.(!empty($where_sql) ? ' AND '.implode(' AND ', $where_sql) : '').' ORDER BY '.$sort_by.' '.$sort_dir.' LIMIT '.$start_from.', 50') or error('Unable to fetch user list', __FILE__, __LINE__, $db->error()); | 159: $result = $db->query('SELECT u.id, u.username, u.title, u.num_posts, u.registered, g.g_id, g.g_user_title FROM '.$db->prefix.'users AS u LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id>1'.(!empty($where_sql) ? ' AND '.implode(' AND ', $where_sql) : '').' ORDER BY '.$sort_by.' '.$sort_dir.', u.id ASC LIMIT '.$start_from.', 50') or error('Unable to fetch user list', __FILE__, __LINE__, $db->error()); |
| 158: if ($db->num_rows($result)) | 160: if ($db->num_rows($result)) |
| 159: { | 161: { |
| 160: while ($user_data = $db->fetch_assoc($result)) | 162: while ($user_data = $db->fetch_assoc($result)) |
| punbb-1.2.17/upload/viewforum.php |
punbb-1.2.20/upload/viewforum.php |
| 1: <?php | 1: <?php |
| 2: /*********************************************************************** | 2: /*********************************************************************** |
| 3: | 3: |
| 4: Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org) | 4: Copyright (C) 2002-2008 PunBB |
| 5: | 5: |
| 6: This file is part of PunBB. | 6: This file is part of PunBB. |
| 7: | 7: |
| 69: // Determine the topic offset (based on $_GET['p']) | 69: // Determine the topic offset (based on $_GET['p']) |
| 70: $num_pages = ceil($cur_forum['num_topics'] / $pun_user['disp_topics']); | 70: $num_pages = ceil($cur_forum['num_topics'] / $pun_user['disp_topics']); |
| 71: | 71: |
| 72: $p = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p']; | 72: $p = (!isset($_GET['p']) || !is_numeric($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p']; |
| 73: $start_from = $pun_user['disp_topics'] * ($p - 1); | 73: $start_from = $pun_user['disp_topics'] * ($p - 1); |
| 74: | 74: |
| 75: // Generate paging links | 75: // Generate paging links |
| 253: $forum_id = $id; | 253: $forum_id = $id; |
| 254: $footer_style = 'viewforum'; | 254: $footer_style = 'viewforum'; |
| 255: require PUN_ROOT.'footer.php'; | 255: require PUN_ROOT.'footer.php'; |
| punbb-1.2.17/upload/viewtopic.php |
punbb-1.2.20/upload/viewtopic.php |
| 1: <?php | 1: <?php |
| 2: /*********************************************************************** | 2: /*********************************************************************** |
| 3: | 3: |
| 4: Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org) | 4: Copyright (C) 2002-2008 PunBB |
| 5: | 5: |
| 6: This file is part of PunBB. | 6: This file is part of PunBB. |
| 7: | 7: |
| 128: // Determine the post offset (based on $_GET['p']) | 128: // Determine the post offset (based on $_GET['p']) |
| 129: $num_pages = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']); | 129: $num_pages = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']); |
| 130: | 130: |
| 131: $p = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p']; | 131: $p = (!isset($_GET['p']) || !is_numeric($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p']; |
| | 132: |
| 132: $start_from = $pun_user['disp_posts'] * ($p - 1); | 133: $start_from = $pun_user['disp_posts'] * ($p - 1); |
| 133: | 134: |
| 134: // Generate paging links | 135: // Generate paging links |