# HG changeset patch # User Dan # Date 1207454205 14400 # Node ID 5e1f1e916419b93227957e853b66ad4ea4e88c7b # Parent e3d7322305bf5b1b4b45735ad0cc371c606836f1 Big upgrade to 1.3 beta. Basic things are working. diff -r e3d7322305bf -r 5e1f1e916419 plugins/PunBB.php --- a/plugins/PunBB.php Sun Sep 02 11:00:57 2007 -0400 +++ b/plugins/PunBB.php Sat Apr 05 23:56:45 2008 -0400 @@ -4,15 +4,15 @@ Plugin URI: http://enanocms.org/PunBB_plugin Description: Provides a complete forum solution in PunBB, a separately maintained and very lightweight GPL forum. Author: Dan Fuhry -Version: 0.1.12.15 +Version: 1.3-beta Author URI: http://enanocms.org/ */ /* * PunBB Plugin for Enano CMS - * Version 0.1.12.15 - * Copyright (C) 2006-2007 Dan Fuhry - * Copyright (C) 2002-2007 Rickard Andersson + * Version 1.3-beta + * Copyright (C) 2006-2008 Dan Fuhry + * Copyright (C) 2002-2008 Rickard Andersson * * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -36,17 +36,19 @@ $plugins->attachHook('session_started', ' $pid = RenderMan::strToPageId($paths->get_pageid_from_url()); - if ( getConfig("punbb_installed") == "yes" && getConfig("punbb_version") == PUNANO_VERSION && $pid[0] == "Forum" && $pid[1] == "Special" ) + $is_style_or_script = ( strpos($_SERVER["REQUEST_URI"], "/style/") || strpos($_SERVER["REQUEST_URI"], "/include/js/") ); + if ( getConfig("punbb_installed") == "yes" && getConfig("punbb_version") == PUNANO_VERSION && $pid[0] == "Forum" && $pid[1] == "Special" && !$is_style_or_script ) { require( "punbb/include/common.php" ); } '); -define('PUNANO_VERSION', '0.1.12.15'); -define('PUNBB_VERSION', '1.2.15'); +define('PUNANO_VERSION', '0.1.3-beta'); +define('PUNBB_VERSION', '1.3-beta'); define('PUN_ROOT', ENANO_ROOT . '/punbb/'); define('PUN', ''); define('PUN_DISABLE_BUFFERING', ''); +// define('PUN_SHOW_QUERIES', ''); function page_Special_Forum() { @@ -59,10 +61,22 @@ { punano_upgrade(); } - else if ( preg_match('/^admin_/i', $paths->getParam(0)) ) + else if ( $paths->getParam(0) == 'admin' ) { punano_admin_console(); } + else if ( $paths->getParam(0) == 'style' ) + { + $path = $paths->getAllParams(); + header('Location: ' . scriptPath . '/punbb/' . $path); + exit(); + } + else if ( $paths->getParam(0) == 'include' && $paths->getParam(1) == 'js' ) + { + $path = $paths->getAllParams(); + header('Location: ' . scriptPath . '/punbb/' . $path); + exit(); + } else { punano_main(); @@ -80,7 +94,7 @@ else if ( $session->auth_level < USER_LEVEL_ADMIN ) { $url = makeUrlNS('Special', 'Login/' . $paths->page, 'level=' . USER_LEVEL_ADMIN, true); - redirect($url, 'Permission denied', 'You need to have an active high-privilege session to set up Punano.', 4); + pun_redirect($url, 'Permission denied', 'You need to have an active high-privilege session to set up Punano.', 4); } $template->header(); @@ -115,11 +129,13 @@ function _punano_perform_install() { global $db, $session, $paths, $template, $plugins; // Common objects + global $dbdriver; + $db_prefix = table_prefix . 'pun_'; $admin_email = getConfig('contact_email'); $pun_version = PUNBB_VERSION; - $schema = file_get_contents( ENANO_ROOT . '/punbb/schema.sql' ); + $schema = file_get_contents( ENANO_ROOT . "/punbb/install-$dbdriver.sql" ); if ( empty($schema) ) { echo 'ERROR: cannot load schema file!'; @@ -129,7 +145,8 @@ $replace = array( '{{TABLE_PREFIX}}' => $db_prefix, '{{ENANO_ADMIN_EMAIL}}' => $admin_email, - '{{PUN_VERSION}}' => $pun_version + '{{PUN_VERSION}}' => $pun_version, + '{{NOW}}' => strval(time()) ); $schema = strtr($schema, $replace); @@ -214,6 +231,7 @@ // At this point, the PunBB API is already loaded // So we'll include one of the Pun frontend files + /* $valid = array('delete', 'edit', 'extern', 'help', 'index', 'misc', 'moderate', 'post', 'profile', 'search', 'userlist', 'viewforum', 'viewtopic'); $file = 'index'; @@ -225,26 +243,28 @@ $file = strtolower($x); } } + */ + $file = 'rewrite'; // Don't worry. This is sanitized. - require PUN_ROOT . $file . '.php'; - + $file = PUN_ROOT . $file . '.php'; + require $file; } function punano_admin_console() { global $db, $session, $paths, $template, $plugins; // Common objects - $valid = array('categories', 'censoring', 'forums', 'groups', 'index', 'loader', 'maintenance', 'options', 'permissions', 'prune', 'ranks', 'reports', 'users'); - $mod = array('bans', 'censoring', 'index', 'loader', 'reports', 'users'); + $valid = array('bans', 'categories', 'censoring', 'extensions', 'forums', 'groups', 'index', 'options', 'prune', 'ranks', 'reindex', 'reports', 'users'); + $mod = array(); $file = 'index'; - if ( $x = $paths->getParam(0) ) + if ( $x = $paths->getParam(1) ) { $x = preg_replace('/\.php$/', '', $x); $x = preg_replace('/^admin_/i', '', $x); - if ( in_array(strtolower($x), $valid) ) + if ( in_array(strtolower($x), $valid) || in_array(strtolower($x), $mod) ) { $file = strtolower($x); } @@ -265,7 +285,7 @@ } // Don't worry. This is sanitized. - require PUN_ROOT . 'admin_' . $file . '.php'; + require PUN_ROOT . 'admin/' . $file . '.php'; } diff -r e3d7322305bf -r 5e1f1e916419 punbb/COPYING --- a/punbb/COPYING Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff -r e3d7322305bf -r 5e1f1e916419 punbb/admin/bans.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/admin/bans.php Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,487 @@ + $_ ) +{ + $$key =& $GLOBALS[$key]; +} + +($hook = get_hook('aba_start')) ? eval($hook) : null; + +if ($pun_user['g_id'] != PUN_ADMIN && ($pun_user['g_moderator'] != '1' || $pun_user['g_mod_ban_users'] == '0')) + message($lang_common['No permission']); + +// Load the admin.php language file +require PUN_ROOT.'lang/'.$pun_user['language'].'/admin.php'; +$GLOBALS['lang_admin'] = $lang_admin; + + +// Add/edit a ban (stage 1) +if (isset($_REQUEST['add_ban']) || isset($_GET['edit_ban'])) +{ + if (isset($_GET['add_ban']) || isset($_POST['add_ban'])) + { + // If the id of the user to ban was provided through GET (a link from profile.php) + if (isset($_GET['add_ban'])) + { + $add_ban = intval($_GET['add_ban']); + if ($add_ban < 2) + message($lang_common['Bad request']); + + $user_id = $add_ban; + + ($hook = get_hook('aba_add_ban_selected')) ? eval($hook) : null; + + $query = array( + 'SELECT' => 'u.group_id, u.username, u.email, u.registration_ip', + 'FROM' => 'users AS u', + 'WHERE' => 'u.id='.$user_id + ); + + ($hook = get_hook('aba_qr_get_user_by_id')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + if (!$pun_db->num_rows($result)) + message($lang_admin['No user id message']); + + list($group_id, $ban_user, $ban_email, $ban_ip) = $pun_db->fetch_row($result); + } + else // Otherwise the username is in POST + { + $ban_user = trim($_POST['new_ban_user']); + + ($hook = get_hook('aba_add_ban_form_submitted')) ? eval($hook) : null; + + if ($ban_user != '') + { + $query = array( + 'SELECT' => 'u.id, u.group_id, u.username, u.email, u.registration_ip', + 'FROM' => 'users AS u', + 'WHERE' => 'u.username=\''.$pun_db->escape($ban_user).'\' AND u.id>1' + ); + + ($hook = get_hook('aba_qr_get_user_by_username')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + if (!$pun_db->num_rows($result)) + message($lang_admin['No user username message']); + + list($user_id, $group_id, $ban_user, $ban_email, $ban_ip) = $pun_db->fetch_row($result); + } + } + + // Make sure we're not banning an admin + if (isset($group_id) && $group_id == PUN_ADMIN) + message($lang_admin['User is admin message']); + + // If we have a $user_id, we can try to find the last known IP of that user + if (isset($user_id)) + { + $query = array( + 'SELECT' => 'p.poster_ip', + 'FROM' => 'posts AS p', + 'WHERE' => 'p.poster_id='.$user_id, + 'ORDER BY' => 'p.posted DESC', + 'LIMIT' => '1' + ); + + ($hook = get_hook('aba_qr_get_last_known_ip')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + + $ban_ip = ($pun_db->num_rows($result)) ? $pun_db->result($result) : $ban_ip; + } + + $mode = 'add'; + } + else // We are editing a ban + { + $ban_id = intval($_GET['edit_ban']); + if ($ban_id < 1) + message($lang_common['Bad request']); + + ($hook = get_hook('aba_edit_ban_selected')) ? eval($hook) : null; + + $query = array( + 'SELECT' => 'b.username, b.ip, b.email, b.message, b.expire', + 'FROM' => 'bans AS b', + 'WHERE' => 'b.id='.$ban_id + ); + + ($hook = get_hook('aba_qr_get_ban_data')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + if ($pun_db->num_rows($result)) + list($ban_user, $ban_ip, $ban_email, $ban_message, $ban_expire) = $pun_db->fetch_row($result); + else + message($lang_common['Bad request']); + + // We just use GMT for expire dates, as its a date rather than a day I don't think its worth worrying about + $ban_expire = ($ban_expire != '') ? gmdate('Y-m-d', $ban_expire) : ''; + + $mode = 'edit'; + } + + + // Setup the form + $pun_page['fld_count'] = $pun_page['set_count'] = 0; + + // Setup breadcrumbs + $pun_page['crumbs'] = array( + array($pun_config['o_board_title'], pun_link($pun_url['index'])), + array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), + array($lang_admin['Bans'], pun_link($pun_url['admin_bans'])), + $lang_admin['Ban advanced'] + ); + + ($hook = get_hook('aba_add_edit_ban_pre_header_load')) ? eval($hook) : null; + + define('PUN_PAGE_SECTION', 'users'); + define('PUN_PAGE', 'admin-bans'); + require PUN_ROOT.'header.php'; + +?> +
+ + + +
+

{ }

+
+ +
+
+

+
+
+

+
+
+ + +
+ + +
+ +
+
+ +
+
+ +
+ +
+ +
+ + +
+ +
+
+ +
+ +
+ +
+ +
+
+
+ +
+ 1) ? ltrim($octets[$c], "0") : $octets[$c]; + + if ($c > 3 || !ctype_digit($octets[$c]) || intval($octets[$c]) > 255) + message($lang_admin['Invalid IP message']); + } + + $cur_address = implode('.', $octets); + $addresses[$i] = $cur_address; + } + + $ban_ip = implode(' ', $addresses); + } + + require PUN_ROOT.'include/email.php'; + if ($ban_email != '' && !is_valid_email($ban_email)) + { + if (!preg_match('/^[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/', $ban_email)) + message($lang_admin['Invalid e-mail message']); + } + + if ($ban_expire != '' && $ban_expire != 'Never') + { + $ban_expire = strtotime($ban_expire); + + if ($ban_expire == -1 || $ban_expire <= time()) + message($lang_admin['Invalid expire message']); + } + else + $ban_expire = 'NULL'; + + $ban_user = ($ban_user != '') ? '\''.$pun_db->escape($ban_user).'\'' : 'NULL'; + $ban_ip = ($ban_ip != '') ? '\''.$pun_db->escape($ban_ip).'\'' : 'NULL'; + $ban_email = ($ban_email != '') ? '\''.$pun_db->escape($ban_email).'\'' : 'NULL'; + $ban_message = ($ban_message != '') ? '\''.$pun_db->escape($ban_message).'\'' : 'NULL'; + + if ($_POST['mode'] == 'add') + { + $query = array( + 'INSERT' => 'username, ip, email, message, expire, ban_creator', + 'INTO' => 'bans', + 'VALUES' => $ban_user.', '.$ban_ip.', '.$ban_email.', '.$ban_message.', '.$ban_expire.', '.$pun_user['id'] + ); + + ($hook = get_hook('aba_qr_add_ban')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + } + else + { + $query = array( + 'UPDATE' => 'bans', + 'SET' => 'username='.$ban_user.', ip='.$ban_ip.', email='.$ban_email.', message='.$ban_message.', expire='.$ban_expire, + 'WHERE' => 'id='.intval($_POST['ban_id']) + ); + + ($hook = get_hook('aba_qr_update_ban')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + } + + // Regenerate the bans cache + require_once PUN_ROOT.'include/cache.php'; + generate_bans_cache(); + + pun_redirect(pun_link($pun_url['admin_bans']), (($_POST['mode'] == 'edit') ? $lang_admin['Ban edited'] : $lang_admin['Ban added']).' '.$lang_admin['Redirect']); +} + + +// Remove a ban +else if (isset($_GET['del_ban'])) +{ + $ban_id = intval($_GET['del_ban']); + if ($ban_id < 1) + message($lang_common['Bad request']); + + // Validate the CSRF token + if (!isset($_POST['csrf_token']) && (!isset($_GET['csrf_token']) || $_GET['csrf_token'] !== generate_form_token('del_ban'.$ban_id))) + csrf_confirm_form(); + + ($hook = get_hook('aba_del_ban_form_submitted2')) ? eval($hook) : null; + + $query = array( + 'DELETE' => 'bans', + 'WHERE' => 'id='.$ban_id + ); + + ($hook = get_hook('aba_qr_delete_ban')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + // Regenerate the bans cache + require_once PUN_ROOT.'include/cache.php'; + generate_bans_cache(); + + pun_redirect(pun_link($pun_url['admin_bans']), $lang_admin['Ban removed'].' '. $lang_admin['Redirect']); +} + + +// Setup the form +$pun_page['part_count'] = $pun_page['fld_count'] = $pun_page['set_count'] = 0; + +// Setup breadcrumbs +$pun_page['crumbs'] = array( + array($pun_config['o_board_title'], pun_link($pun_url['index'])), + array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), + $lang_admin['Bans'] +); + +($hook = get_hook('aba_pre_header_loaded')) ? eval($hook) : null; + +define('PUN_PAGE_SECTION', 'users'); +define('PUN_PAGE', 'admin-bans'); +require PUN_ROOT.'header.php'; + +?> +
+ + + +
+

{ }

+
+ +
+
+

+
+
+

+
+
+ +
+ +
+ +
+
+
+ +
+
+
+ +
+
+

+
+ $cur_ban) + { + $pun_page['ban_info'] = array(); + $pun_page['ban_creator'] = ($cur_ban['ban_creator_username'] != '') ? ''.htmlspecialchars($cur_ban['ban_creator_username']).'' : $lang_admin['Unknown']; + + if ($cur_ban['username'] != '') + $pun_page['ban_info'][] = ''.$lang_admin['Username'].': '.htmlspecialchars($cur_ban['username']).''; + + if ($cur_ban['email'] != '') + $pun_page['ban_info'][] = ''.$lang_admin['E-mail'].': '.$cur_ban['email'].''; + + if ($cur_ban['ip'] != '') + $pun_page['ban_info'][] = ''.$lang_admin['IP-ranges'].': '.$cur_ban['ip'].''; + + if ($cur_ban['expire'] != '') + $pun_page['ban_info'][] = ''.$lang_admin['Expire date'].': '.format_time($cur_ban['expire'], true).''; + + ($hook = get_hook('aba_view_ban_pre_display')) ? eval($hook) : null; + +?> +
+

+

+ ', $pun_page['ban_info'])."\n" ?> +

+

+

+
+ +
+

+
+ +
+ +
+ $_ ) +{ + $$key =& $GLOBALS[$key]; +} + +($hook = get_hook('acg_start')) ? eval($hook) : null; + +if ($session->user_level < USER_LEVEL_ADMIN) + message($lang_common['No permission']); + +// Load the admin.php language file +require PUN_ROOT.'lang/'.$pun_user['language'].'/admin.php'; +$GLOBALS['lang_admin'] = $lang_admin; + + +// Add a new category +if (isset($_POST['add_cat'])) +{ + $new_cat_name = trim($_POST['new_cat_name']); + if ($new_cat_name == '') + message($lang_admin['Must name category']); + + ($hook = get_hook('acg_add_cat_form_submitted')) ? eval($hook) : null; + + $query = array( + 'INSERT' => 'cat_name', + 'INTO' => 'categories', + 'VALUES' => '\''.$pun_db->escape($new_cat_name).'\'' + ); + + ($hook = get_hook('acg_qr_add_category')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + pun_redirect(pun_link($pun_url['admin_categories']), $lang_admin['Category added'].' '.$lang_admin['Redirect']); +} + + +// Delete a category +else if (isset($_POST['del_cat']) || isset($_POST['del_cat_comply'])) +{ + $cat_to_delete = intval($_POST['cat_to_delete']); + if ($cat_to_delete < 1) + message($lang_common['Bad request']); + + // User pressed the cancel button + if (isset($_POST['del_cat_cancel'])) + pun_redirect(pun_link($pun_url['admin_categories']), $lang_admin['Cancel redirect']); + + ($hook = get_hook('acg_del_cat_form_submitted')) ? eval($hook) : null; + + if (isset($_POST['del_cat_comply'])) // Delete a category with all forums and posts + { + @set_time_limit(0); + + $query = array( + 'SELECT' => 'f.id', + 'FROM' => 'forums AS f', + 'WHERE' => 'cat_id='.$cat_to_delete + ); + + ($hook = get_hook('acg_qr_get_forums_to_delete')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + $num_forums = $pun_db->num_rows($result); + + for ($i = 0; $i < $num_forums; ++$i) + { + $cur_forum = $pun_db->result($result, $i); + + // Prune all posts and topics + prune($cur_forum, 1, -1); + + // Delete the forum + $query = array( + 'DELETE' => 'forums', + 'WHERE' => 'id='.$cur_forum + ); + + ($hook = get_hook('acg_qr_delete_forum')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + } + + delete_orphans(); + + // Delete the category + $query = array( + 'DELETE' => 'categories', + 'WHERE' => 'id='.$cat_to_delete + ); + + ($hook = get_hook('acg_qr_delete_category')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + // Regenerate the quickjump cache + require_once PUN_ROOT.'include/cache.php'; + generate_quickjump_cache(); + + pun_redirect(pun_link($pun_url['admin_categories']), $lang_admin['Category deleted'].' '.$lang_admin['Redirect']); + } + else // If the user hasn't comfirmed the delete + { + $query = array( + 'SELECT' => 'c.cat_name', + 'FROM' => 'categories AS c', + 'WHERE' => 'c.id='.$cat_to_delete + ); + + ($hook = get_hook('acg_qr_get_category_name')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + $cat_name = $pun_db->result($result); + + + // Setup breadcrumbs + $pun_page['crumbs'] = array( + array($pun_config['o_board_title'], pun_link($pun_url['index'])), + array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), + array($lang_admin['Categories'], pun_link($pun_url['admin_categories'])), + $lang_admin['Delete category'] + ); + + ($hook = get_hook('acg_del_cat_pre_header_load')) ? eval($hook) : null; + + define('PUN_PAGE_SECTION', 'start'); + define('PUN_PAGE', 'admin-categories'); + require PUN_ROOT.'header.php'; + +?> +
+ + + + +
+

{ }

+
+ +
+
+

+
+
+

+
+
+ +
+ + +
+
+
+ +
+ 'c.id, c.cat_name, c.disp_position', + 'FROM' => 'categories AS c', + 'ORDER BY' => 'c.id' + ); + + ($hook = get_hook('acg_qr_get_categories')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + while ($cur_cat = $pun_db->fetch_assoc($result)) + { + // If these aren't set, we're looking at a category that was added after + // the admin started editing: we don't want to mess with it + if (isset($cat_name[$cur_cat['id']]) && isset($cat_order[$cur_cat['id']])) + { + if ($cat_name[$cur_cat['id']] == '') + message($lang_admin['Must enter category']); + + if ($cat_order[$cur_cat['id']] < 0) + message($lang_admin['Must be integer']); + + // We only want to update if we changed anything + if ($cur_cat['cat_name'] != $cat_name[$cur_cat['id']] || $cur_cat['disp_position'] != $cat_order[$cur_cat['id']]) + { + $query = array( + 'UPDATE' => 'categories', + 'SET' => 'cat_name=\''.$pun_db->escape($cat_name[$cur_cat['id']]).'\', disp_position='.$cat_order[$cur_cat['id']], + 'WHERE' => 'id='.$cur_cat['id'] + ); + + ($hook = get_hook('acg_qr_update_category')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + } + } + } + + // Regenerate the quickjump cache + require_once PUN_ROOT.'include/cache.php'; + generate_quickjump_cache(); + + pun_redirect(pun_link($pun_url['admin_categories']), $lang_admin['Categories updated'].' '.$lang_admin['Redirect']); +} + + +// Generate an array with all categories +$query = array( + 'SELECT' => 'c.id, c.cat_name, c.disp_position', + 'FROM' => 'categories AS c', + 'ORDER BY' => 'c.disp_position' +); + +($hook = get_hook('acg_qr_get_categories2')) ? eval($hook) : null; +$result = $pun_db->query_build($query) or error(__FILE__, __LINE__); +$num_cats = $pun_db->num_rows($result); + +for ($i = 0; $i < $num_cats; ++$i) + $cat_list[] = $pun_db->fetch_row($result); + +// Setup the form +$pun_page['fld_count'] = $pun_page['set_count'] = $pun_page['part_count'] = 0; + + +// Setup breadcrumbs +$pun_page['crumbs'] = array( + array($pun_config['o_board_title'], pun_link($pun_url['index'])), + array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), + $lang_admin['Categories'] +); + +($hook = get_hook('acg_cat_header_load')) ? eval($hook) : null; + +define('PUN_PAGE_SECTION', 'start'); +define('PUN_PAGE', 'admin-categories'); +require PUN_ROOT.'header.php'; + +?> +
+ + + + +
+

{ }

+
+ +
+
+

'.$lang_admin['Add category'].'') ?>

+
+
+

'.strtolower($lang_admin['Forums']).'') ?>

+
+
+ +
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ +
+
+

'.$lang_admin['Delete category'].'') ?>

+
+
+ +
+ +
+ +
+ +
+
+ +
+
+
+ +
+
+

'.$lang_admin['Edit categories'].'') ?>

+
+
+ + + +
+ : +
+
+ +
+ +
+ +
+ +
+
+
+ + +
+ $_ ) +{ + $$key =& $GLOBALS[$key]; +} + +($hook = get_hook('acs_start')) ? eval($hook) : null; + +if (!$pun_user['is_admmod']) + message($lang_common['No permission']); + +// Load the admin.php language file +require PUN_ROOT.'lang/'.$pun_user['language'].'/admin.php'; +$GLOBALS['lang_admin'] = $lang_admin; + + +// Add a censor word +if (isset($_POST['add_word'])) +{ + $search_for = trim($_POST['new_search_for']); + $replace_with = trim($_POST['new_replace_with']); + + if ($search_for == '' || $replace_with == '') + message($lang_admin['Must enter text message']); + + ($hook = get_hook('acs_add_word_form_submitted')) ? eval($hook) : null; + + $query = array( + 'INSERT' => 'search_for, replace_with', + 'INTO' => 'censoring', + 'VALUES' => '\''.$pun_db->escape($search_for).'\', \''.$pun_db->escape($replace_with).'\'' + ); + + ($hook = get_hook('acs_qr_add_censor')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + // Regenerate the censor cache + require_once PUN_ROOT.'include/cache.php'; + generate_censors_cache(); + + pun_redirect(pun_link($pun_url['admin_censoring']), $lang_admin['Censor word added'].' '.$lang_admin['Redirect']); +} + + +// Update a censor word +else if (isset($_POST['update'])) +{ + $id = intval(key($_POST['update'])); + + $search_for = trim($_POST['search_for'][$id]); + $replace_with = trim($_POST['replace_with'][$id]); + + if ($search_for == '' || $replace_with == '') + message($lang_admin['Must enter text message']); + + ($hook = get_hook('acs_update_form_submitted')) ? eval($hook) : null; + + $query = array( + 'UPDATE' => 'censoring', + 'SET' => 'search_for=\''.$pun_db->escape($search_for).'\', replace_with=\''.$pun_db->escape($replace_with).'\'', + 'WHERE' => 'id='.$id + ); + + ($hook = get_hook('acs_qr_update_censor')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + // Regenerate the censor cache + require_once PUN_ROOT.'include/cache.php'; + generate_censors_cache(); + + pun_redirect(pun_link($pun_url['admin_censoring']), $lang_admin['Censor word updated'].' '.$lang_admin['Redirect']); +} + + +// Remove a censor word +else if (isset($_POST['remove'])) +{ + $id = intval(key($_POST['remove'])); + + ($hook = get_hook('acs_remove_form_submitted')) ? eval($hook) : null; + + $query = array( + 'DELETE' => 'censoring', + 'WHERE' => 'id='.$id + ); + + ($hook = get_hook('acs_qr_delete_censor')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + // Regenerate the censor cache + require_once PUN_ROOT.'include/cache.php'; + generate_censors_cache(); + + pun_redirect(pun_link($pun_url['admin_censoring']), $lang_admin['Censor word removed'].' '.$lang_admin['Redirect']); +} + + +// Load the cached censors +if (file_exists(PUN_CACHE_DIR.'cache_censors.php')) + include PUN_CACHE_DIR.'cache_censors.php'; + +if (!defined('PUN_CENSORS_LOADED')) +{ + require_once PUN_ROOT.'include/cache.php'; + generate_censors_cache(); + require PUN_CACHE_DIR.'cache_censors.php'; +} + + +// Setup the form +$pun_page['part_count'] = $pun_page['fld_count'] = $pun_page['set_count'] = 0; + +// Setup breadcrumbs +$pun_page['crumbs'] = array( + array($pun_config['o_board_title'], pun_link($pun_url['index'])), + array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), + $lang_admin['Censoring'] +); + +($hook = get_hook('acs_pre_header_load')) ? eval($hook) : null; + +define('PUN_PAGE_SECTION', 'options'); +define('PUN_PAGE', 'admin-censoring'); +require PUN_ROOT.'header.php'; + +?> +
+ + + +
+

{ }

+
+ +
+
+

+
+
+ + +
+ + +
+ +
+ +
+ +
+ +
+
+ +
+
+
+ +
+
+

+
+
+ + $cur_word) + { + + ?> +
+ + +
+ +
+ +
+ + +
+ +
+ +
+
+ +
+
+

+
+
+
+

+
+
+
+ +
+ $_ ) +{ + $$key =& $GLOBALS[$key]; +} +require_once PUN_ROOT.'include/xml.php'; + +($hook = get_hook('aex_start')) ? eval($hook) : null; + +if ($session->user_level < USER_LEVEL_ADMIN) + message($lang_common['No permission']); + +// Load the admin.php language file +require PUN_ROOT.'lang/'.$pun_user['language'].'/admin.php'; +$GLOBALS['lang_admin'] = $lang_admin; + +// Make sure we have XML support +if (!function_exists('xml_parser_create')) + message($lang_admin['No XML support']); + +$section = isset($_GET['section']) ? $_GET['section'] : null; + + +// Install an extension +if (isset($_GET['install']) || isset($_GET['install_hotfix'])) +{ + ($hook = get_hook('aex_install_selected')) ? eval($hook) : null; + + // User pressed the cancel button + if (isset($_POST['install_cancel'])) + pun_redirect(pun_link($pun_url['admin_extensions_install']), $lang_admin['Cancel redirect']); + + $id = preg_replace('/[^0-9a-z_]/', '', isset($_GET['install']) ? $_GET['install'] : $_GET['install_hotfix']); + + // Load manifest (either locally or from punbb.org updates service) + if (isset($_GET['install'])) + $manifest = @file_get_contents(PUN_ROOT.'extensions/'.$id.'/manifest.xml'); + else + $manifest = @end(get_remote_file('http://punbb.org/update/manifest/'.$id.'.xml', 16)); + + // Parse manifest.xml into an array and validate it + $ext_data = xml_to_array($manifest); + $errors = validate_manifest($ext_data, $id); + + if (!empty($errors)) + message(isset($_GET['install']) ? $lang_common['Bad request'] : $lang_admin['Hotfix download failed']); + + // Setup breadcrumbs + $pun_page['crumbs'] = array( + array($pun_config['o_board_title'], pun_link($pun_url['index'])), + array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), + array($lang_admin['Install extensions'], pun_link($pun_url['admin_extensions_install'])), + $lang_admin['Install extension'] + ); + + if (isset($_POST['install_comply'])) + { + ($hook = get_hook('aex_install_comply_form_submitted')) ? eval($hook) : null; + + // Is there some uninstall code to store in the db? + $uninstall_code = (isset($ext_data['extension']['uninstall']) && trim($ext_data['extension']['uninstall']) != '') ? '\''.$pun_db->escape(trim($ext_data['extension']['uninstall'])).'\'' : 'NULL'; + + // Is there an uninstall note to store in the db? + $uninstall_note = 'NULL'; + foreach ($ext_data['extension']['note'] as $cur_note) + { + if ($cur_note['attributes']['type'] == 'uninstall' && trim($cur_note['content']) != '') + $uninstall_note = '\''.$pun_db->escape(trim($cur_note['content'])).'\''; + } + + $notices = array(); + + // Is this a fresh install or an upgrade? + $query = array( + 'SELECT' => 'e.version', + 'FROM' => 'extensions AS e', + 'WHERE' => 'e.id=\''.$pun_db->escape($id).'\'' + ); + + ($hook = get_hook('aex_qr_get_current_ext_version')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + if ($pun_db->num_rows($result)) + { + // EXT_CUR_VERSION will be available to the extension install routine (to facilitate extension upgrades) + define('EXT_CUR_VERSION', $pun_db->result($result)); + + // Run the author supplied install code + if (isset($ext_data['extension']['install']) && trim($ext_data['extension']['install']) != '') + eval($ext_data['extension']['install']); + + // Update the existing extension + $query = array( + 'UPDATE' => 'extensions', + 'SET' => 'title=\''.$pun_db->escape($ext_data['extension']['title']).'\', version=\''.$pun_db->escape($ext_data['extension']['version']).'\', description=\''.$pun_db->escape($ext_data['extension']['description']).'\', author=\''.$pun_db->escape($ext_data['extension']['author']).'\', uninstall='.$uninstall_code.', uninstall_note='.$uninstall_note, + 'WHERE' => 'id=\''.$pun_db->escape($id).'\'' + ); + + ($hook = get_hook('aex_qr_update_ext')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + // Delete the old hooks + $query = array( + 'DELETE' => 'extension_hooks', + 'WHERE' => 'extension_id=\''.$pun_db->escape($id).'\'' + ); + + ($hook = get_hook('aex_qr_delete_hooks')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + } + else + { + // Run the author supplied install code + if (isset($ext_data['extension']['install']) && trim($ext_data['extension']['install']) != '') + eval($ext_data['extension']['install']); + + // Add the new extension + $query = array( + 'INSERT' => 'id, title, version, description, author, uninstall, uninstall_note', + 'INTO' => 'extensions', + 'VALUES' => '\''.$pun_db->escape($ext_data['extension']['id']).'\', \''.$pun_db->escape($ext_data['extension']['title']).'\', \''.$pun_db->escape($ext_data['extension']['version']).'\', \''.$pun_db->escape($ext_data['extension']['description']).'\', \''.$pun_db->escape($ext_data['extension']['author']).'\', '.$uninstall_code.', '.$uninstall_note + ); + + ($hook = get_hook('aex_qr_add_ext')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + } + + // Now insert the hooks + foreach ($ext_data['extension']['hooks']['hook'] as $hook) + { + $query = array( + 'INSERT' => 'id, extension_id, code, installed', + 'INTO' => 'extension_hooks', + 'VALUES' => '\''.$pun_db->escape(trim($hook['attributes']['id'])).'\', \''.$pun_db->escape($id).'\', \''.$pun_db->escape(trim($hook['content'])).'\', '.time() + ); + + ($hook = get_hook('aex_qr_add_hook')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + } + + // Empty the PHP cache + $d = dir(PUN_CACHE_DIR); + while (($entry = $d->read()) !== false) + { + if (substr($entry, strlen($entry)-4) == '.php') + @unlink(PUN_CACHE_DIR.$entry); + } + $d->close(); + + // Regenerate the hooks cache + require_once PUN_ROOT.'include/cache.php'; + generate_hooks_cache(); + + // Display notices if there are any + if (!empty($notices)) + { + ($hook = get_hook('aex_install_notices_pre_header_load')) ? eval($hook) : null; + + define('PUN_PAGE_SECTION', 'extensions'); + define('PUN_PAGE', 'admin-extensions-install'); + require PUN_ROOT.'header.php'; + +?> +
+ + + +
+

{ }

+
+
+
+

""

+
+
+

+
    +'.$cur_notice.''."\n"; + +?> +
+

+
+
+ +
+ +
+ + + +
+

{ }

+
+ +
+
+

""

+
+
+ +
+

+


+'.++$pun_page['num_items'].'. '.htmlspecialchars($cur_note['content']).'

'; + } + + if (version_compare(clean_version($pun_config['o_cur_version']), clean_version($ext_data['extension']['maxtestedon']), '>')) + $form_warnings[] = '

'.++$pun_page['num_items'].'. '.$lang_admin['Maxtestedon warning'].'

'; + + if (!empty($form_warnings)) + { + +?> +

+ +
+
+ + +
+
+
+ +
+ 'e.title, e.version, e.description, e.author, e.uninstall, e.uninstall_note', + 'FROM' => 'extensions AS e', + 'WHERE' => 'e.id=\''.$pun_db->escape($id).'\'' + ); + + ($hook = get_hook('aex_qr_get_extension')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + if (!$pun_db->num_rows($result)) + message($lang_common['Bad request']); + + $ext_data = $pun_db->fetch_assoc($result); + + // Setup breadcrumbs + $pun_page['crumbs'] = array( + array($pun_config['o_board_title'], pun_link($pun_url['index'])), + array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), + array($lang_admin['Manage extensions'], pun_link($pun_url['admin_extensions_manage'])), + $lang_admin['Uninstall extension'] + ); + + // If the user has confirmed the uninstall + if (isset($_POST['uninstall_comply'])) + { + ($hook = get_hook('aex_uninstall_comply_form_submitted')) ? eval($hook) : null; + + $notices = array(); + + // Run uninstall code + eval($ext_data['uninstall']); + + // Now delete the extension and its hooks from the db + $query = array( + 'DELETE' => 'extension_hooks', + 'WHERE' => 'extension_id=\''.$pun_db->escape($id).'\'' + ); + + ($hook = get_hook('aex_qr_delete_hooks')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + $query = array( + 'DELETE' => 'extensions', + 'WHERE' => 'id=\''.$pun_db->escape($id).'\'' + ); + + ($hook = get_hook('aex_qr_delete_extension')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + // Empty the PHP cache + $d = dir(PUN_CACHE_DIR); + while (($entry = $d->read()) !== false) + { + if (substr($entry, strlen($entry)-4) == '.php') + @unlink(PUN_CACHE_DIR.$entry); + } + $d->close(); + + // Regenerate the hooks cache + require_once PUN_ROOT.'include/cache.php'; + generate_hooks_cache(); + + // Display notices if there are any + if (!empty($notices)) + { + ($hook = get_hook('aex_uninstall_notices_pre_header_load')) ? eval($hook) : null; + + define('PUN_PAGE_SECTION', 'extensions'); + define('PUN_PAGE', 'admin-extensions-manage'); + require PUN_ROOT.'header.php'; + +?> +
+ + + +
+

{ }

+
+ +
+
+

""

+
+
+

+
    +'.$cur_notice.''."\n"; + +?> +
+

+
+
+ +
+ +
+ + + +
+

{ }

+
+ +
+
+

""

+
+
+ +
+

+


+

+

+
+
+

+
+
+ + +
+
+
+ +
+ 'e.disabled', + 'FROM' => 'extensions AS e', + 'WHERE' => 'e.id=\''.$pun_db->escape($id).'\'' + ); + + ($hook = get_hook('aex_qr_get_disabled_status')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + if (!$pun_db->num_rows($result)) + message($lang_common['Bad request']); + + // Are we disabling or enabling? + $disable = $pun_db->result($result) == '0'; + + $query = array( + 'UPDATE' => 'extensions', + 'SET' => 'disabled='.($disable ? '1' : '0'), + 'WHERE' => 'id=\''.$pun_db->escape($id).'\'' + ); + + ($hook = get_hook('aex_qr_update_disabled_status')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + // Regenerate the hooks cache + require_once PUN_ROOT.'include/cache.php'; + generate_hooks_cache(); + + pun_redirect(pun_link($pun_url['admin_extensions_manage']), ($disable ? $lang_admin['Extension disabled'] : $lang_admin['Extension enabled']).' '.$lang_admin['Redirect']); +} + +($hook = get_hook('aex_new_action')) ? eval($hook) : null; + + +// Generate an array of installed extensions +$inst_exts = array(); +$query = array( + 'SELECT' => 'e.*', + 'FROM' => 'extensions AS e', + 'ORDER BY' => 'e.title' +); + +($hook = get_hook('aex_qr_get_all_extensions')) ? eval($hook) : null; +$result = $pun_db->query_build($query) or error(__FILE__, __LINE__); +while ($cur_ext = $pun_db->fetch_assoc($result)) + $inst_exts[$cur_ext['id']] = $cur_ext; + + +if ($section == 'install') +{ + // Setup breadcrumbs + $pun_page['crumbs'] = array( + array($pun_config['o_board_title'], pun_link($pun_url['index'])), + array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), + $lang_admin['Install extensions'] + ); + + ($hook = get_hook('aex_section_install_pre_header_load')) ? eval($hook) : null; + + define('PUN_PAGE_SECTION', 'extensions'); + define('PUN_PAGE', 'admin-extensions-install'); + + require PUN_ROOT.'header.php'; + +?> +
+ + + +
+

{ }

+
+ +
+
+

+
+'."\n\t\t\t".'

'.htmlspecialchars($hotfix['content']).'

'."\n\t\t\t".'

'.sprintf($lang_admin['Extension by'], 'PunBB').'
'.$lang_admin['Hotfix description'].'

'."\n\t\t\t".'

'.$lang_admin['Install hotfix'].'

'."\n\t\t".'
'; + ++$num_exts; + } + } + } + + $d = dir(PUN_ROOT.'extensions'); + while (($entry = $d->read()) !== false) + { + if ($entry{0} != '.' && is_dir(PUN_ROOT.'extensions/'.$entry)) + { + if (preg_match('/[^0-9a-z_]/', $entry)) + { + $pun_page['ext_error'][] = '
'."\n\t\t\t\t".'

'.sprintf($lang_admin['Extension loading error'], htmlspecialchars($entry)).'

'."\n\t\t\t\t".'

'.$lang_admin['Illegal ID'].'

'."\n\t\t\t".'
'; + ++$num_failed; + continue; + } + else if (!file_exists(PUN_ROOT.'extensions/'.$entry.'/manifest.xml')) + { + $pun_page['ext_error'][] = '
'."\n\t\t\t\t".'

'.sprintf($lang_admin['Extension loading error'], htmlspecialchars($entry)).'

'."\n\t\t\t\t".'

'.$lang_admin['Missing manifest'].'

'."\n\t\t\t".'
'; + ++$num_failed; + continue; + } + + // Parse manifest.xml into an array + $ext_data = xml_to_array(@file_get_contents(PUN_ROOT.'extensions/'.$entry.'/manifest.xml')); + if (empty($ext_data)) + { + $pun_page['ext_error'][] = '
'."\n\t\t\t\t".'

'.sprintf($lang_admin['Extension loading error'], htmlspecialchars($entry)).'

'."\n\t\t\t\t".'

'.$lang_admin['Failed parse manifest'].'

'."\n\t\t\t".'
'; + ++$num_failed; + continue; + } + + // Validate manifest + $errors = validate_manifest($ext_data, $entry); + if (!empty($errors)) + { + $pun_page['ext_error'][] = '
'."\n\t\t\t\t".'

'.sprintf($lang_admin['Extension loading error'], htmlspecialchars($entry)).'

'."\n\t\t\t\t".'

'.implode(' ', $errors).'

'."\n\t\t\t".'
'; + ++$num_failed; + } + else + { + if (!array_key_exists($entry, $inst_exts) || version_compare($inst_exts[$entry]['version'], $ext_data['extension']['version'], '!=')) + { + $pun_page['ext_item'][] = '
'."\n\t\t\t".'

'.htmlspecialchars($ext_data['extension']['title']).' v'.$ext_data['extension']['version'].'

'."\n\t\t\t".'

'.sprintf($lang_admin['Extension by'], htmlspecialchars($ext_data['extension']['author'])).''.(($ext_data['extension']['description'] != '') ? '
'.htmlspecialchars($ext_data['extension']['description']).'' : '').'

'."\n\t\t\t".'

'.$lang_admin['Install extension'].'

'."\n\t\t".'
'; + ++$num_exts; + } + } + } + } + $d->close(); + + ($hook = get_hook('aex_section_install_pre_display_ext_list')) ? eval($hook) : null; + + if ($num_exts) + echo "\t\t".implode("\n\t\t", $pun_page['ext_item'])."\n"; + else + { + +?> +
+

+
+ +
+
+

+
+ +
+ +
+ + + +
+ + + +
+

{ }

+
+ +
+
+

+
+ +
+

+
+'.($ext['disabled'] != '1' ? $lang_admin['Disable'] : $lang_admin['Enable']).'', + ''.$lang_admin['Uninstall'].'' + ); + + ($hook = get_hook('aex_section_manage_pre_ext_actions')) ? eval($hook) : null; + +?> +
+

'.$lang_admin['Extension disabled'].' )' ?>

+


+

+
+ +
+

+
+ +
+ +
+ $_ ) +{ + $$key =& $GLOBALS[$key]; +} + +($hook = get_hook('afo_start')) ? eval($hook) : null; + +if ($session->user_level < USER_LEVEL_ADMIN) + message($lang_common['No permission']); + +// Load the admin.php language file +require PUN_ROOT.'lang/'.$pun_user['language'].'/admin.php'; +$GLOBALS['lang_admin'] = $lang_admin; + + +// Add a "default" forum +if (isset($_POST['add_forum'])) +{ + $add_to_cat = intval($_POST['add_to_cat']); + if ($add_to_cat < 1) + message($lang_common['Bad request']); + + $forum_name = trim($_POST['forum_name']); + $position = intval($_POST['position']); + + ($hook = get_hook('afo_add_forum_form_submitted')) ? eval($hook) : null; + + if ($forum_name == '') + message($lang_admin['Must enter forum message']); + + $query = array( + 'INSERT' => 'forum_name, disp_position, cat_id', + 'INTO' => 'forums', + 'VALUES' => '\''.$pun_db->escape($forum_name).'\', '.$position.', '.$add_to_cat + ); + + ($hook = get_hook('afo_qr_add_forum')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + // Regenerate the quickjump cache + require_once PUN_ROOT.'include/cache.php'; + generate_quickjump_cache(); + + pun_redirect(pun_link($pun_url['admin_forums']), $lang_admin['Forum added'].' '.$lang_admin['Redirect']); +} + + +// Delete a forum +else if (isset($_GET['del_forum'])) +{ + $forum_to_delete = intval($_GET['del_forum']); + if ($forum_to_delete < 1) + message($lang_common['Bad request']); + + // User pressed the cancel button + if (isset($_POST['del_forum_cancel'])) + pun_redirect(pun_link($pun_url['admin_forums']), $lang_admin['Cancel redirect']); + + ($hook = get_hook('afo_del_forum_form_submitted')) ? eval($hook) : null; + + if (isset($_POST['del_forum_comply'])) // Delete a forum with all posts + { + @set_time_limit(0); + + // Prune all posts and topics + prune($forum_to_delete, 1, -1); + + delete_orphans(); + + // Delete the forum and any forum specific group permissions + $query = array( + 'DELETE' => 'forums', + 'WHERE' => 'id='.$forum_to_delete + ); + + ($hook = get_hook('afo_qr_delete_forum')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + $query = array( + 'DELETE' => 'forum_perms', + 'WHERE' => 'forum_id='.$forum_to_delete + ); + + ($hook = get_hook('afo_qr_delete_forum_perms')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + // Regenerate the quickjump cache + require_once PUN_ROOT.'include/cache.php'; + generate_quickjump_cache(); + + pun_redirect(pun_link($pun_url['admin_forums']), $lang_admin['Forum deleted'].' '.$lang_admin['Redirect']); + } + else // If the user hasn't confirmed the delete + { + $query = array( + 'SELECT' => 'f.forum_name', + 'FROM' => 'forums AS f', + 'WHERE' => 'f.id='.$forum_to_delete + ); + + ($hook = get_hook('afo_qr_get_forum_name')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + $forum_name = $pun_db->result($result); + + + // Setup breadcrumbs + $pun_page['crumbs'] = array( + array($pun_config['o_board_title'], pun_link($pun_url['index'])), + array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), + array($lang_admin['Forums'], pun_link($pun_url['admin_forums'])), + $lang_admin['Delete forum'] + ); + + ($hook = get_hook('afo_del_forum_pre_header_load')) ? eval($hook) : null; + + define('PUN_PAGE_SECTION', 'start'); + define('PUN_PAGE', 'admin-forums'); + require PUN_ROOT.'header.php'; + +?> +
+ + + +
+

{ }

+
+ +
+
+

+
+
+ +
+

+
+
+ + +
+
+
+ +
+ 'f.id, f.disp_position', + 'FROM' => 'categories AS c', + 'JOINS' => array( + array( + 'INNER JOIN' => 'forums AS f', + 'ON' => 'c.id=f.cat_id' + ) + ), + 'ORDER BY' => 'c.disp_position, c.id, f.disp_position' + ); + + ($hook = get_hook('afo_qr_get_forums')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + while ($cur_forum = $pun_db->fetch_assoc($result)) + { + // If these aren't set, we're looking at a forum that was added after + // the admin started editing: we don't want to mess with it + if (isset($positions[$cur_forum['id']])) + { + $new_disp_position = $positions[$cur_forum['id']]; + + if ($new_disp_position < 0) + message($lang_admin['Must be integer']); + + // We only want to update if we changed the position + if ($cur_forum['disp_position'] != $new_disp_position) + { + $query = array( + 'UPDATE' => 'forums', + 'SET' => 'disp_position='.$new_disp_position, + 'WHERE' => 'id='.$cur_forum['id'] + ); + + ($hook = get_hook('afo_qr_update_forum_position')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + } + } + } + + // Regenerate the quickjump cache + require_once PUN_ROOT.'include/cache.php'; + generate_quickjump_cache(); + + pun_redirect(pun_link($pun_url['admin_forums']), $lang_admin['Forums updated'].' '.$lang_admin['Redirect']); +} + + +else if (isset($_GET['edit_forum'])) +{ + $forum_id = intval($_GET['edit_forum']); + if ($forum_id < 1) + message($lang_common['Bad request']); + + // Update group permissions for $forum_id + if (isset($_POST['save'])) + { + ($hook = get_hook('afo_save_forum_form_submitted')) ? eval($hook) : null; + + // Start with the forum details + $forum_name = trim($_POST['forum_name']); + $forum_desc = pun_linebreaks(trim($_POST['forum_desc'])); + $cat_id = intval($_POST['cat_id']); + $sort_by = intval($_POST['sort_by']); + $redirect_url = isset($_POST['redirect_url']) ? trim($_POST['redirect_url']) : null; + + if ($forum_name == '') + message($lang_admin['Must enter forum message']); + + if ($cat_id < 1) + message($lang_common['Bad request']); + + $forum_desc = ($forum_desc != '') ? '\''.$pun_db->escape($forum_desc).'\'' : 'NULL'; + $redirect_url = ($redirect_url != '') ? '\''.$pun_db->escape($redirect_url).'\'' : 'NULL'; + + $query = array( + 'UPDATE' => 'forums', + 'SET' => 'forum_name=\''.$pun_db->escape($forum_name).'\', forum_desc='.$forum_desc.', redirect_url='.$redirect_url.', sort_by='.$sort_by.', cat_id='.$cat_id, + 'WHERE' => 'id='.$forum_id + ); + + ($hook = get_hook('afo_qr_update_forum')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + // Now let's deal with the permissions + if (isset($_POST['read_forum_old'])) + { + $query = array( + 'SELECT' => 'g.g_id, g.g_read_board, g.g_post_replies, g.g_post_topics', + 'FROM' => 'groups AS g', + 'WHERE' => 'g_id!='.PUN_ADMIN + ); + + ($hook = get_hook('afo_qr_get_groups')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + while ($cur_group = $pun_db->fetch_assoc($result)) + { + $read_forum_new = ($cur_group['g_read_board'] == '1') ? isset($_POST['read_forum_new'][$cur_group['g_id']]) ? '1' : '0' : intval($_POST['read_forum_old'][$cur_group['g_id']]); + $post_replies_new = isset($_POST['post_replies_new'][$cur_group['g_id']]) ? '1' : '0'; + $post_topics_new = isset($_POST['post_topics_new'][$cur_group['g_id']]) ? '1' : '0'; + + // Check if the new settings differ from the old + if ($read_forum_new != $_POST['read_forum_old'][$cur_group['g_id']] || $post_replies_new != $_POST['post_replies_old'][$cur_group['g_id']] || $post_topics_new != $_POST['post_topics_old'][$cur_group['g_id']]) + { + // If the new settings are identical to the default settings for this group, delete its row in forum_perms + if ($read_forum_new == '1' && $post_replies_new == $cur_group['g_post_replies'] && $post_topics_new == $cur_group['g_post_topics']) + { + $query = array( + 'DELETE' => 'forum_perms', + 'WHERE' => 'group_id='.$cur_group['g_id'].' AND forum_id='.$forum_id + ); + + ($hook = get_hook('afo_qr_delete_group_forum_perms')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + } + else + { + // Run an UPDATE and see if it affected a row, if not, INSERT + $query = array( + 'UPDATE' => 'forum_perms', + 'SET' => 'read_forum='.$read_forum_new.', post_replies='.$post_replies_new.', post_topics='.$post_topics_new, + 'WHERE' => 'group_id='.$cur_group['g_id'].' AND forum_id='.$forum_id + ); + + ($hook = get_hook('afo_qr_update_forum_perms')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + if (!$pun_db->affected_rows()) + { + $query = array( + 'INSERT' => 'group_id, forum_id, read_forum, post_replies, post_topics', + 'INTO' => 'forum_perms', + 'VALUES' => $cur_group['g_id'].', '.$forum_id.', '.$read_forum_new.', '.$post_replies_new.', '.$post_topics_new + ); + + ($hook = get_hook('afo_qr_add_forum_perms')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + } + } + } + } + } + + // Regenerate the quickjump cache + require_once PUN_ROOT.'include/cache.php'; + generate_quickjump_cache(); + + pun_redirect(pun_link($pun_url['admin_forums']), $lang_admin['Forum updated'].' '.$lang_admin['Redirect']); + } + else if (isset($_POST['revert_perms'])) + { + ($hook = get_hook('afo_revert_perms_form_submitted')) ? eval($hook) : null; + + $query = array( + 'DELETE' => 'forum_perms', + 'WHERE' => 'forum_id='.$forum_id + ); + + ($hook = get_hook('afo_qr_delete_forum_perms')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + // Regenerate the quickjump cache + require_once PUN_ROOT.'include/cache.php'; + generate_quickjump_cache(); + + pun_redirect(pun_link($pun_url['admin_forums']).'&edit_forum='.$forum_id, $lang_admin['Permissions reverted'].' '.$lang_admin['Redirect']); + } + + // Fetch forum info + $query = array( + 'SELECT' => 'f.id, f.forum_name, f.forum_desc, f.redirect_url, f.num_topics, f.sort_by, f.cat_id', + 'FROM' => 'forums AS f', + 'WHERE' => 'id='.$forum_id + ); + + ($hook = get_hook('afo_qr_get_forum_details')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + if (!$pun_db->num_rows($result)) + message($lang_common['Bad request']); + + $cur_forum = $pun_db->fetch_assoc($result); + + $pun_page['form_info'] = array(); + if ($cur_forum['redirect_url']) + $pun_page['form_info'][] = '
  • '.$lang_admin['Forum perms info 2'].'
  • '; + + $pun_page['form_info'][] = '
  • '.$lang_admin['Forum perms info 1'].'
  • '; + $pun_page['form_info'][] = '
  • '.$lang_admin['Forum perms info 3'].'
  • '; + $pun_page['form_info'][] = '
  • '. sprintf($lang_admin['Group key'], ''.$lang_admin['User groups'].'').'
  • '; + + // Setup the form + $pun_page['part_count'] = $pun_page['set_count'] = $pun_page['fld_count'] = 0; + + // Setup breadcrumbs + $pun_page['crumbs'] = array( + array($pun_config['o_board_title'], pun_link($pun_url['index'])), + array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), + array($lang_admin['Forums'], pun_link($pun_url['admin_forums'])), + $lang_admin['Edit forum'] + ); + + ($hook = get_hook('afo_edit_forum_pre_header_load')) ? eval($hook) : null; + + define('PUN_PAGE_SECTION', 'start'); + define('PUN_PAGE', 'admin-forums'); + require PUN_ROOT.'header.php'; + +?> +
    + + + +
    +

    { }

    +
    + +
    + +
    + +
    +

    +
    +
    + +
    +

    +
    + +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + +
    +
    + +
    +

    +
    +
      + +
    +
    +
    + + 'g.g_id, g.g_title, g.g_read_board, g.g_post_replies, g.g_post_topics, fp.read_forum, fp.post_replies, fp.post_topics', + 'FROM' => 'groups AS g', + 'JOINS' => array( + array( + 'LEFT JOIN' => 'forum_perms AS fp', + 'ON' => 'g.g_id=fp.group_id AND fp.forum_id='.$forum_id + ) + ), + 'WHERE' => 'g.g_id!='.PUN_ADMIN, + 'ORDER BY' => 'g.g_id' + ); + + ($hook = get_hook('afo_qr_get_forum_perms')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + while ($cur_perm = $pun_db->fetch_assoc($result)) + { + $read_forum = ($cur_perm['read_forum'] != '0') ? true : false; + $post_replies = (($cur_perm['g_post_replies'] == '0' && $cur_perm['post_replies'] == '1') || ($cur_perm['g_post_replies'] == '1' && $cur_perm['post_replies'] != '0')) ? true : false; + $post_topics = (($cur_perm['g_post_topics'] == '0' && $cur_perm['post_topics'] == '1') || ($cur_perm['g_post_topics'] == '1' && $cur_perm['post_topics'] != '0')) ? true : false; + + // Determine if the current sittings differ from the default or not + $read_forum_def = ($cur_perm['read_forum'] == '0') ? false : true; + $post_replies_def = (($post_replies && $cur_perm['g_post_replies'] == '0') || (!$post_replies && ($cur_perm['g_post_replies'] == '' || $cur_perm['g_post_replies'] == '1'))) ? false : true; + $post_topics_def = (($post_topics && $cur_perm['g_post_topics'] == '0') || (!$post_topics && ($cur_perm['g_post_topics'] == '' || $cur_perm['g_post_topics'] == '1'))) ? false : true; + +?> +
    + +
    + + + + + + + +
    +
    + + + +
    +
    +
    + + +
    +
    +
    +
    + +
    + + +
    + + + +
    +

    { }

    +
    + +
    +
    +

    +
    +
    + +
    + +
    + +
    +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + 'c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.disp_position', + 'FROM' => 'categories AS c', + 'JOINS' => array( + array( + 'INNER JOIN' => 'forums AS f', + 'ON' => 'c.id=f.cat_id' + ) + ), + 'ORDER BY' => 'c.disp_position, c.id, f.disp_position' +); + +($hook = get_hook('afo_qr_get_cats_and_forums')) ? eval($hook) : null; +$result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + +if ($pun_db->num_rows($result)) +{ + // Reset fieldset counter + $pun_page['set_count'] = 0; + +?> +
    +
    +

    +
    +
    + + +fetch_assoc($result)) + { + if ($cur_forum['cid'] != $cur_category) // A new category since last iteration? + { + if ($i > 2) echo "\t\t\t".''."\n"; + +?> +
    + + + + + +
    +
    + +
    + + +
    + +
    + $_ ) +{ + $$key =& $GLOBALS[$key]; +} + +($hook = get_hook('agr_start')) ? eval($hook) : null; + +if ($session->user_level < USER_LEVEL_ADMIN) + message($lang_common['No permission']); + +// Load the admin.php language file +require PUN_ROOT.'lang/'.$pun_user['language'].'/admin.php'; +$GLOBALS['lang_admin'] = $lang_admin; + + +// Add/edit a group (stage 1) +if (isset($_POST['add_group']) || isset($_GET['edit_group'])) +{ + if (isset($_POST['add_group'])) + { + ($hook = get_hook('agr_add_group_form_submitted')) ? eval($hook) : null; + + $base_group = intval($_POST['base_group']); + + $query = array( + 'SELECT' => 'g.*', + 'FROM' => 'groups AS g', + 'WHERE' => 'g.g_id='.$base_group + ); + + ($hook = get_hook('agr_qr_get_base_group')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + $group = $pun_db->fetch_assoc($result); + + $mode = 'add'; + } + else // We are editing a group + { + ($hook = get_hook('agr_edit_group_form_submitted')) ? eval($hook) : null; + + $group_id = intval($_GET['edit_group']); + if ($group_id < 1) + message($lang_common['Bad request']); + + $query = array( + 'SELECT' => 'g.*', + 'FROM' => 'groups AS g', + 'WHERE' => 'g.g_id='.$group_id + ); + + ($hook = get_hook('agr_qr_get_group')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + if (!$pun_db->num_rows($result)) + message($lang_common['Bad request']); + + $group = $pun_db->fetch_assoc($result); + + $mode = 'edit'; + } + + // Setup the form + $pun_page['part_count'] = $pun_page['fld_count'] = $pun_page['set_count'] = 0; + + // Setup breadcrumbs + $pun_page['crumbs'] = array( + array($pun_config['o_board_title'], pun_link($pun_url['index'])), + array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), + array($lang_admin['Groups'], pun_link($pun_url['admin_groups'])), + $mode == 'edit' ? $lang_admin['Edit group heading'] : $lang_admin['Add group heading'] + ); + + ($hook = get_hook('agr_add_edit_group_pre_header_load')) ? eval($hook) : null; + + define('PUN_PAGE_SECTION', 'users'); + define('PUN_PAGE', 'admin-groups'); + require PUN_ROOT.'header.php'; + +?> +
    + + + + +
    +

    { }

    +
    + +
    +
    +

    +
    +
    +

    '.$lang_common['Required'].'') ?>

    +
    +
    + + +
    +

    +
    + +
    + +
    +
    + +
    + +
    + +
    + +
    +

    +
    +

    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    + +

    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    + +
    + +
    +

    +
    + +
    + +
    +
    + +
    +
    + +
    + +
    + +
    + +
    +
    +
    +
    + +
    +escape($user_title).'\'' : 'NULL'; + + if ($_POST['mode'] == 'add') + { + ($hook = get_hook('agr_add_group_form_submitted2')) ? eval($hook) : null; + + $query = array( + 'SELECT' => '1', + 'FROM' => 'groups AS g', + 'WHERE' => 'g_title=\''.$pun_db->escape($title).'\'' + ); + + ($hook = get_hook('agr_qr_check_group_title_collision')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + if ($pun_db->num_rows($result)) + message(sprintf($lang_admin['Already a group message'], htmlspecialchars($title))); + + // Insert the new group + $query = array( + 'INSERT' => 'g_title, g_user_title, g_moderator, g_mod_edit_users, g_mod_rename_users, g_mod_change_passwords, g_mod_ban_users, g_read_board, g_view_users, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood', + 'INTO' => 'groups', + 'VALUES' => '\''.$pun_db->escape($title).'\', '.$user_title.', '.$moderator.', '.$mod_edit_users.', '.$mod_rename_users.', '.$mod_change_passwords.', '.$mod_ban_users.', '.$read_board.', '.$view_users.', '.$post_replies.', '.$post_topics.', '.$edit_posts.', '.$delete_posts.', '.$delete_topics.', '.$set_title.', '.$search.', '.$search_users.', '.$edit_subjects_interval.', '.$post_flood.', '.$search_flood + ); + + ($hook = get_hook('agr_qy_add_group')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + $new_group_id = $pun_db->insert_id(); + + // Now lets copy the forum specific permissions from the group which this group is based on + $query = array( + 'SELECT' => 'fp.forum_id, fp.read_forum, fp.post_replies, fp.post_topics', + 'FROM' => 'forum_perms AS fp', + 'WHERE' => 'group_id='.intval($_POST['base_group']) + ); + + ($hook = get_hook('agr_qr_get_group_forum_perms')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + while ($cur_forum_perm = $pun_db->fetch_assoc($result)) + { + $query = array( + 'INSERT' => 'group_id, forum_id, read_forum, post_replies, post_topics', + 'INTO' => 'forum_perms', + 'VALUES' => $new_group_id.', '.$cur_forum_perm['forum_id'].', '.$cur_forum_perm['read_forum'].', '.$cur_forum_perm['post_replies'].', '.$cur_forum_perm['post_topics'] + ); + + ($hook = get_hook('agr_qy_add_group_forum_perms')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + } + } + else + { + $group_id = intval($_POST['group_id']); + + ($hook = get_hook('agr_edit_group_form_submitted2')) ? eval($hook) : null; + + // Make sure admins and guests don't get moderator privileges + if ($group_id == PUN_ADMIN || $group_id == PUN_GUEST) + $moderator = '0'; + + // Make sure the default group isn't assigned moderator privileges + if ($moderator == '1' && $pun_config['o_default_user_group'] == $group_id) + message($lang_admin['Moderator default group']); + + $query = array( + 'SELECT' => '1', + 'FROM' => 'groups AS g', + 'WHERE' => 'g_title=\''.$pun_db->escape($title).'\' AND g_id!='.$group_id + ); + + ($hook = get_hook('agr_qr_check_group_title_collision2')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + if ($pun_db->num_rows($result)) + message(sprintf($lang_admin['Already a group message'], htmlspecialchars($title))); + + // Save changes + $query = array( + 'UPDATE' => 'groups', + 'SET' => 'g_title=\''.$pun_db->escape($title).'\', g_user_title='.$user_title.', g_moderator='.$moderator.', g_mod_edit_users='.$mod_edit_users.', g_mod_rename_users='.$mod_rename_users.', g_mod_change_passwords='.$mod_change_passwords.', g_mod_ban_users='.$mod_ban_users.', g_read_board='.$read_board.', g_view_users='.$view_users.', g_post_replies='.$post_replies.', g_post_topics='.$post_topics.', g_edit_posts='.$edit_posts.', g_delete_posts='.$delete_posts.', g_delete_topics='.$delete_topics.', g_set_title='.$set_title.', g_search='.$search.', g_search_users='.$search_users.', g_edit_subjects_interval='.$edit_subjects_interval.', g_post_flood='.$post_flood.', g_search_flood='.$search_flood, + 'WHERE' => 'g_id='.$group_id + ); + + ($hook = get_hook('agr_qy_update_group')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + // If the group doesn't have moderator privileges (it might have had before), remove its users from the moderator list in all forums + if (!$moderator) + clean_forum_moderators(); + } + + // Regenerate the quickjump cache + require_once PUN_ROOT.'include/cache.php'; + generate_quickjump_cache(); + + pun_redirect(pun_link($pun_url['admin_groups']), (($_POST['mode'] == 'edit') ? $lang_admin['Group edited'] : $lang_admin['Group added']).' '.$lang_admin['Redirect']); +} + + +// Set default group +else if (isset($_POST['set_default_group'])) +{ + $group_id = intval($_POST['default_group']); + + ($hook = get_hook('agr_set_default_group_form_submitted')) ? eval($hook) : null; + + // Make sure it's not the admin or guest groups + if ($group_id == PUN_ADMIN || $group_id == PUN_GUEST) + message($lang_common['Bad request']); + + // Make sure it's not a moderator group + $query = array( + 'SELECT' => 'g.g_id', + 'FROM' => 'groups AS g', + 'WHERE' => 'g.g_id='.$group_id.' AND g.g_moderator=0', + 'LIMIT' => '1' + ); + + ($hook = get_hook('agr_qr_get_group_moderation_status')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + if (!$pun_db->num_rows($result)) + message($lang_common['Bad request']); + + $query = array( + 'UPDATE' => 'config', + 'SET' => 'conf_value='.$group_id, + 'WHERE' => 'conf_name=\'o_default_user_group\'' + ); + + ($hook = get_hook('agr_qy_set_default_group')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + // Regenerate the config cache + require_once PUN_ROOT.'include/cache.php'; + generate_config_cache(); + + pun_redirect(pun_link($pun_url['admin_groups']), $lang_admin['Default group set'].' '.$lang_admin['Redirect']); +} + + +// Remove a group +else if (isset($_GET['del_group'])) +{ + $group_id = intval($_GET['del_group']); + if ($group_id < 4) + message($lang_common['Bad request']); + + // User pressed the cancel button + if (isset($_POST['del_group_cancel'])) + pun_redirect(pun_link($pun_url['admin_groups']), $lang_admin['Cancel redirect']); + + // Make sure we don't remove the default group + if ($group_id == $pun_config['o_default_user_group']) + message($lang_admin['Cannot remove default group']); + + ($hook = get_hook('agr_del_group_selected')) ? eval($hook) : null; + + + // Check if this group has any members + $query = array( + 'SELECT' => 'g.g_title, COUNT(u.id)', + 'FROM' => 'groups AS g', + 'JOINS' => array( + array( + 'INNER JOIN' => 'users AS u', + 'ON' => 'g.g_id=u.group_id' + ) + ), + 'WHERE' => 'g.g_id='.$group_id, + 'GROUP BY' => 'g.g_id, g.g_title' + ); + + ($hook = get_hook('agr_qr_get_group_member_count')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + + // If the group doesn't have any members or if we've already selected a group to move the members to + if (!$pun_db->num_rows($result) || isset($_POST['del_group'])) + { + ($hook = get_hook('agr_del_group_form_submitted')) ? eval($hook) : null; + + if (isset($_POST['del_group'])) // Move users + { + $query = array( + 'UPDATE' => 'users', + 'SET' => 'group_id='.intval($_POST['move_to_group']), + 'WHERE' => 'group_id='.$group_id + ); + + ($hook = get_hook('agr_qy_move_users')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + } + + // Delete the group and any forum specific permissions + $query = array( + 'DELETE' => 'groups', + 'WHERE' => 'g_id='.$group_id + ); + + ($hook = get_hook('agr_qy_delete_group')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + $query = array( + 'DELETE' => 'forum_perms', + 'WHERE' => 'group_id='.$group_id + ); + + ($hook = get_hook('agr_qy_delete_group_forum_perms')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + clean_forum_moderators(); + + // Regenerate the quickjump cache + require_once PUN_ROOT.'include/cache.php'; + generate_quickjump_cache(); + + pun_redirect(pun_link($pun_url['admin_groups']), $lang_admin['Group removed'].' '.$lang_admin['Redirect']); + } + + list($group_title, $num_members) = $pun_db->fetch_row($result); + + + // Setup the form + $pun_page['part_count'] = $pun_page['fld_count'] = $pun_page['set_count'] = 0; + + // Setup breadcrumbs + $pun_page['crumbs'] = array( + array($pun_config['o_board_title'], pun_link($pun_url['index'])), + array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), + array($lang_admin['Groups'], pun_link($pun_url['admin_groups'])), + $lang_admin['Remove group'] + ); + + ($hook = get_hook('agr_del_group_pre_header_load')) ? eval($hook) : null; + + define('PUN_PAGE_SECTION', 'users'); + define('PUN_PAGE', 'admin-groups'); + require PUN_ROOT.'header.php'; + +?> +
    + + + +
    +

    { }

    +
    + +
    +
    +

    +
    +
    + +
    + +
    + +
    +
    +
    + + +
    +
    +
    + +
    + +
    + + + +
    +

    { }

    +
    + +
    +
    +

    +
    +
    + +
    + +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +

    +
    +
    + +
    + +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +

    +
    +
    +

    +
    +
    + 'g.g_id, g.g_title', + 'FROM' => 'groups AS g', + 'ORDER BY' => 'g.g_title' +); + +($hook = get_hook('agr_qr_get_groups4')) ? eval($hook) : null; +$result = $pun_db->query_build($query) or error(__FILE__, __LINE__); +$pun_page['item_num'] = 0; +while ($cur_group = $pun_db->fetch_assoc($result)) +{ + +?> + + +
    +
    + +
    + $_ ) +{ + $$key =& $GLOBALS[$key]; +} + +$db_name =& $dbname; + +($hook = get_hook('ain_start')) ? eval($hook) : null; + +if (!$pun_user['is_admmod']) + message($lang_common['No permission']); + +// Load the admin.php language file +require PUN_ROOT.'lang/'.$pun_user['language'].'/admin.php'; +$GLOBALS['lang_admin'] = $lang_admin; + +// Show phpinfo() output +if (isset($_GET['action']) && $_GET['action'] == 'phpinfo' && $pun_user['g_id'] == PUN_ADMIN) +{ + ($hook = get_hook('ain_phpinfo_selected')) ? eval($hook) : null; + + // Is phpinfo() a disabled function? + if (strpos(strtolower((string)@ini_get('disable_functions')), 'phpinfo') !== false) + message($lang_admin['phpinfo disabled']); + + phpinfo(); + exit; +} + + +// Generate check for updates text block +if ($pun_config['o_check_for_updates'] == '1') + $punbb_updates = $lang_admin['Check for updates enabled']; +else +{ + // Get a list of installed hotfix extensions + $query = array( + 'SELECT' => 'e.id', + 'FROM' => 'extensions AS e', + 'WHERE' => 'e.id LIKE \'hotfix_%\'' + ); + + ($hook = get_hook('ain_qr_get_hotfixes')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + $num_hotfixes = $pun_db->num_rows($result); + + $hotfixes = array(); + for ($i = 0; $i < $num_hotfixes; ++$i) + $hotfixes[] = urlencode($pun_db->result($result, $i)); + + $punbb_updates = ''.$lang_admin['Check for updates manual'].''; +} + + +// Get the server load averages (if possible) +if (function_exists('sys_getloadavg')) +{ + $load_averages = sys_getloadavg(); + array_walk($load_averages, create_function('&$v', '$v = round($v, 3);')); + $server_load = $load_averages[0].' '.$load_averages[1].' '.$load_averages[2]; +} +else if (@file_exists('/proc/loadavg') && is_readable('/proc/loadavg')) +{ + // We use @ just in case + $fh = @fopen('/proc/loadavg', 'r'); + $load_averages = @fread($fh, 64); + @fclose($fh); + + $load_averages = @explode(' ', $load_averages); + $server_load = isset($load_averages[2]) ? $load_averages[0].' '.$load_averages[1].' '.$load_averages[2] : 'Not available'; +} +else if (!in_array(PHP_OS, array('WINNT', 'WIN32')) && preg_match('/averages?: ([0-9\.]+),[\s]+([0-9\.]+),[\s]+([0-9\.]+)/i', @exec('uptime'), $load_averages)) + $server_load = $load_averages[1].' '.$load_averages[2].' '.$load_averages[3]; +else + $server_load = $lang_admin['Not available']; + + +// Get number of current visitors +$query = array( + 'SELECT' => 'COUNT(o.user_id)', + 'FROM' => 'online AS o', + 'WHERE' => 'o.idle=0' +); + +($hook = get_hook('ain_qr_get_users_online')) ? eval($hook) : null; +$result = $pun_db->query_build($query) or error(__FILE__, __LINE__); +$num_online = $pun_db->result($result); + + +// Get the database system version +switch ($db_type) +{ + case 'sqlite': + $db_version = 'SQLite '.sqlite_libversion(); + break; + + default: + $result = $pun_db->query('SELECT VERSION()') or error(__FILE__, __LINE__); + $db_version = $pun_db->result($result); + break; +} + + +// Collect some additional info about MySQL +if ($db_type == 'mysql' || $db_type == 'mysqli') +{ + $db_version = 'MySQL '.$db_version; + + // Calculate total db size/row count + $result = $pun_db->query('SHOW TABLE STATUS FROM `'.$db_name.'` LIKE \''.$db_prefix.'%\'') or error(__FILE__, __LINE__); + + $total_records = $total_size = 0; + while ($status = $pun_db->fetch_assoc($result)) + { + $total_records += $status['Rows']; + $total_size += $status['Data_length'] + $status['Index_length']; + } + + $total_size = $total_size / 1024; + + if ($total_size > 1024) + $total_size = round($total_size / 1024, 2).' MB'; + else + $total_size = round($total_size, 2).' KB'; +} + + +// Check for the existance of various PHP opcode caches/optimizers +if (function_exists('mmcache')) + $php_accelerator = 'Turck MMCache'; +else if (isset($_PHPA)) + $php_accelerator = 'ionCube PHP Accelerator'; +else if (ini_get('apc.enabled')) + $php_accelerator ='Alternative PHP Cache (APC)'; +else if (ini_get('zend_optimizer.optimization_level')) + $php_accelerator = 'Zend Optimizer'; +else if (ini_get('eaccelerator.enable')) + $php_accelerator = 'eAccelerator'; +else if (ini_get('xcache.cacher')) + $php_accelerator = 'XCache'; +else + $php_accelerator = 'N/A'; + +$pun_page['item_num'] = 0; + +// Setup breadcrumbs +$pun_page['crumbs'] = array( + array($pun_config['o_board_title'], pun_link($pun_url['index'])), + array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), + $lang_admin['Information'] +); + +($hook = get_hook('ain_pre_header_load')) ? eval($hook) : null; + +define('PUN_PAGE_SECTION', 'start'); +define('PUN_PAGE', 'admin-information'); +require PUN_ROOT.'header.php'; + +?> +
    + + + +
    +

    { }

    +
    + +
    +
    +

    +
    +
    +

    +
    +
    + +
    +

    +
      +
    • PunBB
    • +
    • © Copyright 2002-2008 PunBB.org
    • +
    • +
    +
    + +
    +

    +

    ()

    +
    +
    +

    +
      +
    • :
    • +
    • PHP: -
    • +
    • :
    • +
    +
    + +
    +

    +
      +
    • +
    • :
    • +
    • :
    • +
    +
    +
    +
    + +
    + $_ ) +{ + $$key =& $GLOBALS[$key]; +} + +($hook = get_hook('aop_start')) ? eval($hook) : null; + +if ($session->user_level < USER_LEVEL_ADMIN) + message($lang_common['No permission']); + +// Load the admin.php language file +require PUN_ROOT.'lang/'.$pun_user['language'].'/admin.php'; +$GLOBALS['lang_admin'] = $lang_admin; + +$section = isset($_GET['section']) ? $_GET['section'] : null; + + +if (isset($_POST['form_sent'])) +{ + $form = array_map('trim', $_POST['form']); + + ($hook = get_hook('aop_form_submitted')) ? eval($hook) : null; + + // Validate input depending on section + switch ($section) + { + case 'setup': + { + ($hook = get_hook('aop_setup_validation')) ? eval($hook) : null; + + if ($form['board_title'] == '') + message($lang_admin['Error no board title']); + + // Clean default_lang, default_style, and sef + $form['default_style'] = preg_replace('#[\.\\\/]#', '', $form['default_style']); + $form['default_lang'] = preg_replace('#[\.\\\/]#', '', $form['default_lang']); + $form['sef'] = preg_replace('#[\.\\\/]#', '', $form['sef']); + + // Make sure default_lang and default_style exist + if (!file_exists(PUN_ROOT.'style/'.$form['default_style'].'/'.$form['default_style'].'.css')) + message($lang_common['Bad request']); + if (!file_exists(PUN_ROOT.'lang/'.$form['default_lang'].'/common.php')) + message($lang_common['Bad request']); + + $form['timeout_visit'] = intval($form['timeout_visit']); + $form['timeout_online'] = intval($form['timeout_online']); + $form['redirect_delay'] = intval($form['redirect_delay']); + + if ($form['timeout_online'] >= $form['timeout_visit']) + message($lang_admin['Error timeout value']); + + $form['disp_topics_default'] = (intval($form['disp_topics_default']) > 0) ? intval($form['disp_topics_default']) : 1; + $form['disp_posts_default'] = (intval($form['disp_posts_default']) > 0) ? intval($form['disp_posts_default']) : 1; + + if ($form['additional_navlinks'] != '') + $form['additional_navlinks'] = trim(pun_linebreaks($form['additional_navlinks'])); + + break; + } + + case 'features': + { + ($hook = get_hook('aop_features_validation')) ? eval($hook) : null; + + if (!isset($form['search_all_forums']) || $form['search_all_forums'] != '1') $form['search_all_forums'] = '0'; + if (!isset($form['ranks']) || $form['ranks'] != '1') $form['ranks'] = '0'; + if (!isset($form['censoring']) || $form['censoring'] != '1') $form['censoring'] = '0'; + if (!isset($form['quickjump']) || $form['quickjump'] != '1') $form['quickjump'] = '0'; + if (!isset($form['show_version']) || $form['show_version'] != '1') $form['show_version'] = '0'; + if (!isset($form['users_online']) || $form['users_online'] != '1') $form['users_online'] = '0'; + + if (!isset($form['quickpost']) || $form['quickpost'] != '1') $form['quickpost'] = '0'; + if (!isset($form['subscriptions']) || $form['subscriptions'] != '1') $form['subscriptions'] = '0'; + if (!isset($form['force_guest_email']) || $form['force_guest_email'] != '1') $form['force_guest_email'] = '0'; + if (!isset($form['show_dot']) || $form['show_dot'] != '1') $form['show_dot'] = '0'; + if (!isset($form['topic_views']) || $form['topic_views'] != '1') $form['topic_views'] = '0'; + if (!isset($form['show_post_count']) || $form['show_post_count'] != '1') $form['show_post_count'] = '0'; + if (!isset($form['show_user_info']) || $form['show_user_info'] != '1') $form['show_user_info'] = '0'; + + if (!isset($form['message_bbcode']) || $form['message_bbcode'] != '1') $form['message_bbcode'] = '0'; + if (!isset($form['message_img_tag']) || $form['message_img_tag'] != '1') $form['message_img_tag'] = '0'; + if (!isset($form['smilies']) || $form['smilies'] != '1') $form['smilies'] = '0'; + if (!isset($form['make_links']) || $form['make_links'] != '1') $form['make_links'] = '0'; + if (!isset($form['message_all_caps']) || $form['message_all_caps'] != '1') $form['message_all_caps'] = '0'; + if (!isset($form['subject_all_caps']) || $form['subject_all_caps'] != '1') $form['subject_all_caps'] = '0'; + $form['indent_num_spaces'] = intval($form['indent_num_spaces']); + + if (!isset($form['signatures']) || $form['signatures'] != '1') $form['signatures'] = '0'; + if (!isset($form['sig_bbcode']) || $form['sig_bbcode'] != '1') $form['sig_bbcode'] = '0'; + if (!isset($form['sig_img_tag']) || $form['sig_img_tag'] != '1') $form['sig_img_tag'] = '0'; + if (!isset($form['sig_all_caps']) || $form['sig_all_caps'] != '1') $form['sig_all_caps'] = '0'; + + if (!isset($form['avatars']) || $form['avatars'] != '1') $form['avatars'] = '0'; + + // Clean avatars_dir + $form['avatars_dir'] = str_replace("\0", '', $form['avatars_dir']); + + // Make sure avatars_dir doesn't end with a slash + if (substr($form['avatars_dir'], -1) == '/') + $form['avatars_dir'] = substr($form['avatars_dir'], 0, -1); + + $form['avatars_width'] = intval($form['avatars_width']); + $form['avatars_height'] = intval($form['avatars_height']); + $form['avatars_size'] = intval($form['avatars_size']); + + if (!isset($form['check_for_updates']) || $form['check_for_updates'] != '1') $form['check_for_updates'] = '0'; + if (!isset($form['gzip']) || $form['gzip'] != '1') $form['gzip'] = '0'; + + if (!isset($form['announcement']) || $form['announcement'] != '1') $form['announcement'] = '0'; + + if ($form['announcement_message'] != '') + $form['announcement_message'] = pun_linebreaks($form['announcement_message']); + else + $form['announcement_message'] = $lang_admin['Announcement message default']; + + break; + } + + case 'email': + { + ($hook = get_hook('aop_email_validation')) ? eval($hook) : null; + + require PUN_ROOT.'include/email.php'; + + $form['admin_email'] = strtolower($form['admin_email']); + if (!is_valid_email($form['admin_email'])) + message($lang_admin['Error invalid admin e-mail']); + + $form['webmaster_email'] = strtolower($form['webmaster_email']); + if (!is_valid_email($form['webmaster_email'])) + message($lang_admin['Error invalid web e-mail']); + + if (!isset($form['smtp_ssl']) || $form['smtp_ssl'] != '1') $form['smtp_ssl'] = '0'; + + break; + } + + case 'registration': + { + ($hook = get_hook('aop_registration_validation')) ? eval($hook) : null; + + if (!isset($form['regs_allow']) || $form['regs_allow'] != '1') $form['regs_allow'] = '0'; + if (!isset($form['regs_verify']) || $form['regs_verify'] != '1') $form['regs_verify'] = '0'; + if (!isset($form['allow_banned_email']) || $form['allow_banned_email'] != '1') $form['allow_banned_email'] = '0'; + if (!isset($form['allow_dupe_email']) || $form['allow_dupe_email'] != '1') $form['allow_dupe_email'] = '0'; + if (!isset($form['regs_report']) || $form['regs_report'] != '1') $form['regs_report'] = '0'; + + if (!isset($form['rules']) || $form['rules'] != '1') $form['rules'] = '0'; + + if ($form['rules_message'] != '') + $form['rules_message'] = pun_linebreaks($form['rules_message']); + else + $form['rules_message'] = $lang_admin['Rules default']; + + break; + } + + case 'maintenance': + { + ($hook = get_hook('aop_maintenance_validation')) ? eval($hook) : null; + + if (!isset($form['maintenance']) || $form['maintenance'] != '1') $form['maintenance'] = '0'; + + if ($form['maintenance_message'] != '') + $form['maintenance_message'] = pun_linebreaks($form['maintenance_message']); + else + $form['maintenance_message'] = $lang_admin['Maintenance message default']; + + break; + } + + default: + { + ($hook = get_hook('aop_new_section_validation')) ? eval($hook) : null; + break; + } + } + + ($hook = get_hook('aop_pre_update_configuration')) ? eval($hook) : null; + + while (list($key, $input) = @each($form)) + { + // Only update permission values that have changed + if (array_key_exists('p_'.$key, $pun_config) && $pun_config['p_'.$key] != $input) + { + $query = array( + 'UPDATE' => 'config', + 'SET' => 'conf_value='.$input, + 'WHERE' => 'conf_name=\'p_'.$pun_db->escape($key).'\'' + ); + + ($hook = get_hook('aop_qr_update_permission_conf')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + } + + // Only update option values that have changed + if (array_key_exists('o_'.$key, $pun_config) && $pun_config['o_'.$key] != $input) + { + if ($input != '' || is_int($input)) + $value = '\''.$pun_db->escape($input).'\''; + else + $value = 'NULL'; + + $query = array( + 'UPDATE' => 'config', + 'SET' => 'conf_value='.$value, + 'WHERE' => 'conf_name=\'o_'.$pun_db->escape($key).'\'' + ); + + ($hook = get_hook('aop_qr_update_permission_option')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + } + } + + // Regenerate the config cache + require_once PUN_ROOT.'include/cache.php'; + generate_config_cache(); + + pun_redirect(pun_link($pun_url['admin_options_'.$section]), $lang_admin['Options updated'].' '.$lang_admin['Redirect']); +} + + +if (!$section || $section == 'setup') +{ + // Setup the form + $pun_page['fld_count'] = $pun_page['set_count'] = $pun_page['part_count'] = 0; + + // Setup breadcrumbs + $pun_page['crumbs'] = array( + array($pun_config['o_board_title'], pun_link($pun_url['index'])), + array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), + $lang_admin['Setup'] + ); + + ($hook = get_hook('aop_setup_pre_header_load')) ? eval($hook) : null; + + define('PUN_PAGE_SECTION', 'options'); + define('PUN_PAGE', 'admin-options-setup'); + require PUN_ROOT.'header.php'; + +?> +
    + + + + +
    +

    { }

    +
    + +
    +
    +

    +
    +
    + + +
    +

    +
    + +
    + +
    +
    + +
    +
    + +
    + +
    +
    + +
    +

    +
    + +
    + +
    +
    + +
    +
    + +
    +
    + +
    + +
    +
    + +
    +

    +
    + +
    + +
    +
    + +
    +
    + +
    + +
    +
    + +
    +

    +
    + +
    + +
    +
    + +
    +
    + +
    + +
    +
    + +
    +

    +
    + +
    + +
    +
    +
    +
    + +
    +
    + +
    +

    +
    +

    +
    +
    + +
    + +
    + +
    +
    + +
    +

    +
    +

    +
    +
    + +
    + +
    + +
    +
    +
    + +
    +
    +
    + +
    + +
    + + + +
    +

    { }

    +
    + +
    +
    +

    +
    +
    + + +
    +

    '.strtolower($lang_admin['Censoring']).'') ?>

    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +

    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +

    +
    + +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    + +
    +
    + +
    +

    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + +
    +

    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + +
    +
    + +
    +

    +
    +

    +
    +
    + +
    + +
    + +
    +
    + +
    +

    +
    +

    +
    +
    + +
    + +
    + +
    +
    + +
    +

    +
    + +
    +
    + +
    +
    + +
    + +
    +
    +
    + +
    +
    +
    + +
    + +
    + + + +
    +

    { }

    +
    + +
    +
    +

    +
    +
    + + +
    +

    +
    +

    +
    +
    + +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    + +
    +
    + +
    +

    +
    +

    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    +
    + +
    + +
    + + + +
    +

    { }

    +
    + +
    +
    +

    +
    +
    + +
    +

    +

    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + +
    + +
    + + + +
    +

    { }

    +
    + +
    +
    +

    +
    +
    + + +
    +

    +
    + +
    + +
    +
    + +
    +
    +
    + +
    + +
    + +
    +
    + +
    +

    +
    +

    +
    +
    + +
    + +
    +
    + +
    +
    + +
    +
    + +
    + +
    +
    +
    + +
    +
    +
    + +
    + $_ ) +{ + $$key =& $GLOBALS[$key]; +} + +($hook = get_hook('apr_start')) ? eval($hook) : null; + +if ($session->user_level < USER_LEVEL_ADMIN) + message($lang_common['No permission']); + +// Load the admin.php language file +require PUN_ROOT.'lang/'.$pun_user['language'].'/admin.php'; +$GLOBALS['lang_admin'] = $lang_admin; + + +if (isset($_GET['action']) || isset($_POST['prune']) || isset($_POST['prune_comply'])) +{ + if (isset($_POST['prune_comply'])) + { + $prune_from = $_POST['prune_from']; + $prune_days = intval($_POST['prune_days']); + $prune_date = ($prune_days) ? time() - ($prune_days*86400) : -1; + + ($hook = get_hook('apr_prune_comply_form_submitted')) ? eval($hook) : null; + + @set_time_limit(0); + + if ($prune_from == 'all') + { + $query = array( + 'SELECT' => 'f.id', + 'FROM' => 'forums AS f' + ); + + ($hook = get_hook('apr_qr_get_all_forums')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + $num_forums = $pun_db->num_rows($result); + + for ($i = 0; $i < $num_forums; ++$i) + { + $fid = $pun_db->result($result, $i); + + prune($fid, $_POST['prune_sticky'], $prune_date); + sync_forum($fid); + } + } + else + { + $prune_from = intval($prune_from); + prune($prune_from, $_POST['prune_sticky'], $prune_date); + sync_forum($prune_from); + } + + delete_orphans(); + + pun_redirect(pun_link($pun_url['admin_prune']), 'Posts pruned. Redirecting …'); + } + + + $prune_days = intval($_POST['req_prune_days']); + if ($prune_days < 0) + message($lang_admin['Days to prune message']); + + $prune_date = time() - ($prune_days*86400); + $prune_from = $_POST['prune_from']; + + if ($prune_from != 'all') + { + $prune_from = intval($prune_from); + + // Fetch the forum name (just for cosmetic reasons) + $query = array( + 'SELECT' => 'f.forum_name', + 'FROM' => 'forums AS f', + 'WHERE' => 'f.id='.$prune_from + ); + + ($hook = get_hook('apr_qr_get_forum_name')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + $forum = htmlspecialchars($pun_db->result($result)); + } + else + $forum = 'all forums'; + + // Count the number of topics to prune + $query = array( + 'SELECT' => 'COUNT(t.id)', + 'FROM' => 'topics AS t', + 'WHERE' => 't.last_post<'.$prune_date.' AND t.moved_to IS NULL' + ); + + if ($prune_from != 'all') + $query['WHERE'] .= ' AND t.forum_id='.$prune_from; + if (!isset($_POST['prune_sticky'])) + $query['WHERE'] .= ' AND t.sticky=0'; + + ($hook = get_hook('apr_qr_get_topic_count')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + $num_topics = $pun_db->result($result); + + if (!$num_topics) + message($lang_admin['No days old message']); + + + // Setup breadcrumbs + $pun_page['crumbs'] = array( + array($pun_config['o_board_title'], pun_link($pun_url['index'])), + array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), + array($lang_admin['Prune topics'], pun_link($pun_url['admin_prune'])), + $lang_admin['Confirm prune heading'] + ); + + ($hook = get_hook('apr_prune_comply_pre_header_load')) ? eval($hook) : null; + + define('PUN_PAGE_SECTION', 'management'); + define('PUN_PAGE', 'admin-prune'); + require PUN_ROOT.'header.php'; + +?> +
    + + + + +
    +

    { }

    +
    + +
    +
    +

    +
    +
    + +
    +

    +

    +
    + +
    + +
    +
    +
    + +
    + +
    + + + +
    +

    { }

    +
    + +
    +
    +

    +
    +
    +

    +

    +
    +
    +

    '.$lang_common['Required'].'') ?>

    +
    +
    + + +
    + + +
    + +
    +
    + +
    +
    + +
    + +
    + +
    + +
    +
    +
    + +
    + $_ ) +{ + $$key =& $GLOBALS[$key]; +} + +($hook = get_hook('ark_start')) ? eval($hook) : null; + +if ($session->user_level < USER_LEVEL_ADMIN) + message($lang_common['No permission']); + +// Load the admin.php language file +require PUN_ROOT.'lang/'.$pun_user['language'].'/admin.php'; +$GLOBALS['lang_admin'] = $lang_admin; + + +// Add a rank +if (isset($_POST['add_rank'])) +{ + $rank = trim($_POST['new_rank']); + $min_posts = intval($_POST['new_min_posts']); + + if ($rank == '') + message($lang_admin['Title message']); + + if ($min_posts < 0) + message($lang_admin['Min posts message']); + + ($hook = get_hook('ark_add_rank_form_submitted')) ? eval($hook) : null; + + // Make sure there isn't already a rank with the same min_posts value + $query = array( + 'SELECT' => '1', + 'FROM' => 'ranks AS r', + 'WHERE' => 'min_posts='.$min_posts + ); + + ($hook = get_hook('ark_qr_check_rank_collision')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + if ($pun_db->num_rows($result)) + message(sprintf($lang_admin['Min posts occupied message'], $min_posts)); + + $query = array( + 'INSERT' => 'rank, min_posts', + 'INTO' => 'ranks', + 'VALUES' => '\''.$pun_db->escape($rank).'\', '.$min_posts + ); + + ($hook = get_hook('ark_qr_add_rank')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + // Regenerate the ranks cache + require_once PUN_ROOT.'include/cache.php'; + generate_ranks_cache(); + + pun_redirect(pun_link($pun_url['admin_ranks']), $lang_admin['Rank added'].' '.$lang_admin['Redirect']); +} + + +// Update a rank +else if (isset($_POST['update'])) +{ + $id = intval(key($_POST['update'])); + + $rank = trim($_POST['rank'][$id]); + $min_posts = intval($_POST['min_posts'][$id]); + + if ($rank == '') + message($lang_admin['Title message']); + + if ($min_posts < 0) + message($lang_admin['Min posts message']); + + ($hook = get_hook('ark_update_form_submitted')) ? eval($hook) : null; + + // Make sure there isn't already a rank with the same min_posts value + $query = array( + 'SELECT' => '1', + 'FROM' => 'ranks AS r', + 'WHERE' => 'id!='.$id.' AND min_posts='.$min_posts + ); + + ($hook = get_hook('ark_qr_check_rank_collision2')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + if ($pun_db->num_rows($result)) + message(sprintf($lang_admin['Min posts occupied message'], $min_posts)); + + $query = array( + 'UPDATE' => 'ranks', + 'SET' => 'rank=\''.$pun_db->escape($rank).'\', min_posts='.$min_posts, + 'WHERE' => 'id='.$id + ); + + ($hook = get_hook('ark_qr_update_rank')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + // Regenerate the ranks cache + require_once PUN_ROOT.'include/cache.php'; + generate_ranks_cache(); + + pun_redirect(pun_link($pun_url['admin_ranks']), $lang_admin['Rank updated'].' '.$lang_admin['Redirect']); +} + + +// Remove a rank +else if (isset($_POST['remove'])) +{ + $id = intval(key($_POST['remove'])); + + ($hook = get_hook('ark_remove_form_submitted')) ? eval($hook) : null; + + $query = array( + 'DELETE' => 'ranks', + 'WHERE' => 'id='.$id + ); + + ($hook = get_hook('ark_qr_delete_rank')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + // Regenerate the ranks cache + require_once PUN_ROOT.'include/cache.php'; + generate_ranks_cache(); + + pun_redirect(pun_link($pun_url['admin_ranks']), $lang_admin['Rank removed'].' '.$lang_admin['Redirect']); +} + + +// Load the cached ranks +if (file_exists(PUN_CACHE_DIR.'cache_ranks.php')) + include PUN_CACHE_DIR.'cache_ranks.php'; + +if (!defined('PUN_RANKS_LOADED')) +{ + require_once PUN_ROOT.'include/cache.php'; + generate_ranks_cache(); + require PUN_CACHE_DIR.'cache_ranks.php'; +} + + +// Setup the form +$pun_page['fld_count'] = $pun_page['set_count'] = 0; + +// Setup breadcrumbs +$pun_page['crumbs'] = array( + array($pun_config['o_board_title'], pun_link($pun_url['index'])), + array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), + $lang_admin['Ranks'] +); + +($hook = get_hook('ark_pre_header_load')) ? eval($hook) : null; + +define('PUN_PAGE_SECTION', 'users'); +define('PUN_PAGE', 'admin-ranks'); +require PUN_ROOT.'header.php'; + +?> +
    + + + +
    +

    { }

    +
    + +
    +
    +

    +
    + +
    + +
    + + +
    + +
    + +
    + +
    + +
    +
    + +
    +
    +
    + +
    +
    +

    +
    +
    + + $cur_rank) + { + + ?> +
    + + +
    + +
    + +
    + + +
    + +
    + +
    +
    + +
    +
    +

    +
    +
    +
    +

    +
    +
    +
    + +
    + $_ ) +{ + $$key =& $GLOBALS[$key]; +} + +($hook = get_hook('ari_start')) ? eval($hook) : null; + +if ($session->user_level < USER_LEVEL_ADMIN) + message($lang_common['No permission']); + +// The reindexer isn't used for MySQL +if ($db_type == 'mysql' || $db_type == 'mysqli') + message($lang_common['Bad request']); + +// Load the admin.php language file +require PUN_ROOT.'lang/'.$pun_user['language'].'/admin.php'; +$GLOBALS['lang_admin'] = $lang_admin; + + +if (isset($_GET['i_per_page']) && isset($_GET['i_start_at'])) +{ + $per_page = intval($_GET['i_per_page']); + $start_at = intval($_GET['i_start_at']); + if ($per_page < 1 || $start_at < 1) + message($lang_common['Bad request']); + + ($hook = get_hook('ari_cycle_start')) ? eval($hook) : null; + + @set_time_limit(0); + + // If this is the first cycle of posts we empty the search index before we proceed + if (isset($_GET['i_empty_index'])) + { + $query = array( + 'DELETE' => 'search_matches' + ); + + ($hook = get_hook('ari_qr_empty_search_matches')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + $query = array( + 'DELETE' => 'search_words' + ); + + ($hook = get_hook('ari_qr_empty_search_words')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + // Reset the sequence for the search words (not needed for SQLite) + if ($db_type == 'pgsql') + $result = $pun_db->query('SELECT setval(\''.$pun_db->prefix.'search_words_id_seq\', 1, false)') or error(__FILE__, __LINE__); + } + +?> + + + + + + +<?php echo htmlspecialchars($pun_config['o_board_title']) ?> - Rebuilding search index … + + + + +

    + + 'p.id, p.message, t.id, t.subject, t.first_post_id', + 'FROM' => 'posts AS p', + 'JOINS' => array( + array( + 'INNER JOIN' => 'topics AS t', + 'ON' => 't.id=p.topic_id' + ) + ), + 'WHERE' => 'p.id>='.$start_at, + 'ORDER BY' => 'p.id', + 'LIMIT' => $per_page + ); + + ($hook = get_hook('ari_qr_fetch_posts')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + + $post_id = 0; + echo '

    '; + while ($cur_post = $pun_db->fetch_row($result)) + { + printf($lang_admin['Processing post'], $cur_post[0], $cur_post[2]).'
    '."\n"; + + if ($cur_post[0] == $cur_post[4]) // This is the "topic post" so we have to index the subject as well + update_search_index('post', $cur_post[0], $cur_post[1], $cur_post[3]); + else + update_search_index('post', $cur_post[0], $cur_post[1]); + + $post_id = $cur_post[0]; + } + echo '

    '; + + // Check if there is more work to do + $query = array( + 'SELECT' => 'p.id', + 'FROM' => 'posts AS p', + 'WHERE' => 'p.id>'.$post_id, + 'ORDER BY' => 'p.id', + 'LIMIT' => '1' + ); + + ($hook = get_hook('ari_qr_find_next_post')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + + $query_str = ($pun_db->num_rows($result)) ? '?i_per_page='.$per_page.'&i_start_at='.$pun_db->result($result) : ''; + + ($hook = get_hook('ari_cycle_end')) ? eval($hook) : null; + + $pun_db->end_transaction(); + $pun_db->close(); + + exit('
    '.$lang_admin['Javascript redirect'].' '.$lang_admin['Click to continue'].'.'); +} + + +// Get the first post ID from the db +$query = array( + 'SELECT' => 'p.id', + 'FROM' => 'posts AS p', + 'ORDER BY' => 'p.id', + 'LIMIT' => '1' +); + +($hook = get_hook('ari_qr_find_lowest_post_id')) ? eval($hook) : null; +$result = $pun_db->query_build($query) or error(__FILE__, __LINE__); +if ($pun_db->num_rows($result)) + $first_id = $pun_db->result($result); + +// Setup form +$pun_page['set_count'] = $pun_page['fld_count'] = 0; + +// Setup breadcrumbs +$pun_page['crumbs'] = array( + array($pun_config['o_board_title'], pun_link($pun_url['index'])), + array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), + $lang_admin['Rebuild index'] +); + +define('PUN_PAGE_SECTION', 'management'); +define('PUN_PAGE', 'admin-reindex'); +require PUN_ROOT.'header.php'; + +?> +
    + + + +
    +

    { }

    +
    + +
    +
    +

    +
    +
    +

    +
    +
    + + +
    + + +
    + +
    +
    + +
    +
    + +
    + +
    + +
    +

    +

    +
    +
    + +
    +
    +
    + +
    + $_ ) +{ + $$key =& $GLOBALS[$key]; +} + +($hook = get_hook('arp_start')) ? eval($hook) : null; + +if (!$pun_user['is_admmod']) + message($lang_common['No permission']); + +// Load the admin.php language file +require PUN_ROOT.'lang/'.$pun_user['language'].'/admin.php'; +$GLOBALS['lang_admin'] = $lang_admin; + + +// Mark reports as read +if (isset($_POST['mark_as_read'])) +{ + if (empty($_POST['reports'])) + message($lang_admin['No reports selected']); + + ($hook = get_hook('arp_mark_as_read_form_submitted')) ? eval($hook) : null; + + $reports_to_mark = array_map('intval', array_keys($_POST['reports'])); + + $query = array( + 'UPDATE' => 'reports', + 'SET' => 'zapped='.time().', zapped_by='.$pun_user['id'], + 'WHERE' => 'id IN('.implode(',', $reports_to_mark).') AND zapped IS NULL' + ); + + ($hook = get_hook('arp_qr_mark_reports_as_read')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + + pun_redirect(pun_link($pun_url['admin_reports']), $lang_admin['Reports marked read'].' '.$lang_admin['Redirect']); +} + +$pun_page['fld_count'] = $pun_page['set_count'] = 0; + +// Setup breadcrumbs +$pun_page['crumbs'] = array( + array($pun_config['o_board_title'], pun_link($pun_url['index'])), + array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), + $lang_admin['Reports'] +); + +($hook = get_hook('arp_pre_header_load')) ? eval($hook) : null; + +define('PUN_PAGE_SECTION', 'management'); +define('PUN_PAGE', 'admin-reports'); +require PUN_ROOT.'header.php'; + +?> +
    + + + +
    +

    { }

    +
    + +
    +
    +

    +
    + 'r.id, r.post_id, r.topic_id, r.forum_id, r.reported_by, r.created, r.message, t.subject, f.forum_name, u.username AS reporter', + 'FROM' => 'reports AS r', + 'JOINS' => array( + array( + 'LEFT JOIN' => 'topics AS t', + 'ON' => 'r.topic_id=t.id' + ), + array( + 'LEFT JOIN' => 'forums AS f', + 'ON' => 'r.forum_id=f.id' + ), + array( + 'LEFT JOIN' => 'users AS u', + 'ON' => 'r.reported_by=u.id' + ) + ), + 'WHERE' => 'r.zapped IS NULL', + 'ORDER BY' => 'r.created DESC' +); + +($hook = get_hook('arp_qr_get_new_reports')) ? eval($hook) : null; +$result = $pun_db->query_build($query) or error(__FILE__, __LINE__); +if ($pun_db->num_rows($result)) +{ + +?> +
    + +fetch_assoc($result)) + { + $reporter = ($cur_report['reporter'] != '') ? ''.htmlspecialchars($cur_report['reporter']).'' : $lang_admin['Deleted user']; + $forum = ($cur_report['forum_name'] != '') ? ''.htmlspecialchars($cur_report['forum_name']).'' : $lang_admin['Deleted forum']; + $topic = ($cur_report['subject'] != '') ? ''.htmlspecialchars($cur_report['subject']).'' : $lang_admin['Deleted topic']; + $post = ($cur_report['post_id'] != '') ? str_replace("\n", '
    ', htmlspecialchars($cur_report['message'])) : $lang_admin['Deleted post']; + $post_id = ($cur_report['post_id'] != '') ? 'Post #'.$cur_report['post_id'].'' : $lang_admin['Deleted post']; + +?> +
    +

    +
    +

     Â»  Â» 

    +

    + +
    + +
    + +
    +
    + +
    +

    +
    + +
    + +
    +
    +

    +
    + 'r.id, r.post_id, r.topic_id, r.forum_id, r.reported_by, r.created, r.message, r.zapped, r.zapped_by AS zapped_by_id, t.subject, f.forum_name, u.username AS reporter, u2.username AS zapped_by', + 'FROM' => 'reports AS r', + 'JOINS' => array( + array( + 'LEFT JOIN' => 'topics AS t', + 'ON' => 'r.topic_id=t.id' + ), + array( + 'LEFT JOIN' => 'forums AS f', + 'ON' => 'r.forum_id=f.id' + ), + array( + 'LEFT JOIN' => 'users AS u', + 'ON' => 'r.reported_by=u.id' + ), + array( + 'LEFT JOIN' => 'users AS u2', + 'ON' => 'r.zapped_by=u2.id' + ) + ), + 'WHERE' => 'r.zapped IS NOT NULL', + 'ORDER BY' => 'r.zapped DESC', + 'LIMIT' => '10' +); + +($hook = get_hook('arp_qr_get_last_zapped_reports')) ? eval($hook) : null; +$result = $pun_db->query_build($query) or error(__FILE__, __LINE__); +if ($pun_db->num_rows($result)) +{ + $i = 1; + $pun_page['num_items'] = 0; + while ($cur_report = $pun_db->fetch_assoc($result)) + { + $reporter = ($cur_report['reporter'] != '') ? ''.htmlspecialchars($cur_report['reporter']).'' : $lang_admin['Deleted user']; + $forum = ($cur_report['forum_name'] != '') ? ''.htmlspecialchars($cur_report['forum_name']).'' : $lang_admin['Deleted forum']; + $topic = ($cur_report['subject'] != '') ? ''.htmlspecialchars($cur_report['subject']).'' : $lang_admin['Deleted topic']; + $post = ($cur_report['post_id'] != '') ? str_replace("\n", '
    ', htmlspecialchars($cur_report['message'])) : $lang_admin['Deleted post']; + $post_id = ($cur_report['post_id'] != '') ? 'Post #'.$cur_report['post_id'].'' : $lang_admin['Deleted post']; + $zapped_by = ($cur_report['zapped_by'] != '') ? ''.htmlspecialchars($cur_report['zapped_by']).'' : $lang_admin['Deleted user']; + +?> +
    +

    +

     Â»  Â» 

    +

    +

    + +
    + +
    +

    +
    + +
    + +
    + $_ ) +{ + $$key =& $GLOBALS[$key]; +} + +($hook = get_hook('aus_start')) ? eval($hook) : null; + +if (!$pun_user['is_admmod']) + message($lang_common['No permission']); + +// Load the admin.php language file +require PUN_ROOT.'lang/'.$pun_user['language'].'/admin.php'; +$GLOBALS['lang_admin'] = $lang_admin; + + +// Show IP statistics for a certain user ID +if (isset($_GET['ip_stats'])) +{ + $ip_stats = intval($_GET['ip_stats']); + if ($ip_stats < 1) + message($lang_common['Bad request']); + + ($hook = get_hook('aus_ip_stats_selected')) ? eval($hook) : null; + + $query = array( + 'SELECT' => 'p.poster_ip, MAX(p.posted) AS last_used, COUNT(p.id) AS used_times', + 'FROM' => 'posts AS p', + 'WHERE' => 'p.poster_id='.$ip_stats, + 'GROUP BY' => 'p.poster_ip', + 'ORDER BY' => 'last_used DESC' + ); + + ($hook = get_hook('aus_qr_get_user_ips')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + $pun_page['num_users'] = $pun_db->num_rows($result); + + // Setup breadcrumbs + $pun_page['crumbs'] = array( + array($pun_config['o_board_title'], pun_link($pun_url['index'])), + array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), + array($lang_admin['Searches'], pun_link($pun_url['admin_users'])), + $lang_admin['User search results'] + ); + + ($hook = get_hook('aus_ip_stats_pre_header_load')) ? eval($hook) : null; + + define('PUN_PAGE_SECTION', 'users'); + define('PUN_PAGE', 'admin-users'); + require PUN_ROOT.'header.php'; + +?> +
    + + + +
    +

    { }

    +
    + +
    +
    +

    +
    +
    + + + + + + + + + + + + +fetch_assoc($result)) + { + $pun_page['actions'] = ''.$lang_admin['Find more users'].''; + +?> + + + + + + + + +'."\n"; + +?> + +
    '.$lang_admin['No posts by user'].'
    +
    +
    + +
    + 'DISTINCT p.poster_id, p.poster', + 'FROM' => 'posts AS p', + 'WHERE' => 'p.poster_ip=\''.$pun_db->escape($ip).'\'', + 'ORDER BY' => 'p.poster DESC' + ); + + ($hook = get_hook('aus_qr_get_users_matching_ip')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + $pun_page['num_users'] = $pun_db->num_rows($result); + + // Setup breadcrumbs + $pun_page['crumbs'] = array( + array($pun_config['o_board_title'], pun_link($pun_url['index'])), + array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), + array($lang_admin['Searches'], pun_link($pun_url['admin_users'])), + $lang_admin['User search results'] + ); + + ($hook = get_hook('aus_show_users_pre_header_load')) ? eval($hook) : null; + + define('PUN_PAGE_SECTION', 'users'); + define('PUN_PAGE', 'admin-users'); + require PUN_ROOT.'header.php'; + +?> +
    + + + +
    +

    { }

    +
    + +
    +
    +

    +
    +
    + + + + + + + + + + + + + +num_rows($result); + if ($num_posts) + { + // Loop through users and print out some info + for ($i = 0; $i < $num_posts; ++$i) + { + list($poster_id, $poster) = $pun_db->fetch_row($result); + + $query = array( + 'SELECT' => 'u.id, u.username, u.email, u.title, u.num_posts, u.admin_note, g.g_id, g.g_user_title', + 'FROM' => 'users AS u', + 'JOINS' => array( + array( + 'INNER JOIN' => 'groups AS g', + 'ON' => 'g.g_id=u.group_id' + ) + ), + 'WHERE' => 'u.id>1 AND u.id='.$poster_id + ); + + ($hook = get_hook('aus_qr_get_user_details')) ? eval($hook) : null; + $result2 = $pun_db->query_build($query) or error(__FILE__, __LINE__); + if ($user_data = $pun_db->fetch_assoc($result2)) + { + $pun_page['user_title'] = get_title($user_data); + $pun_page['actions'] = ''.$lang_admin['View IP stats'].''.$lang_admin['Show posts'].''; + +?> + + + + + + + + + + + + + + + + + +'."\n"; + +?> + +
    '.htmlspecialchars($user_data['admin_note']).'' ?>
        
    '.$lang_admin['Cannot find IP'].'
    +', + '', + '' +); + +($hook = get_hook('aus_show_users_pre_moderation_buttons')) ? eval($hook) : null; + +?> +

    +
    +
    + +
    +user_level < USER_LEVEL_ADMIN) + message($lang_common['No permission']); + + if (empty($_POST['users'])) + message($lang_admin['No users selected']); + + ($hook = get_hook('aus_delete_users_selected')) ? eval($hook) : null; + + if (!is_array($_POST['users'])) + $users = explode(',', $_POST['users']); + else + $users = array_keys($_POST['users']); + + $users = array_map('intval', $users); + + // We check to make sure there are no administrators in this list + $query = array( + 'SELECT' => '1', + 'FROM' => 'users AS u', + 'WHERE' => 'u.id IN ('.implode(',', $users).') AND u.group_id='.PUN_ADMIN + ); + + ($hook = get_hook('aus_qr_check_for_admins')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + if ($pun_db->num_rows($result) > 0) + message($lang_admin['Delete admin message']); + + if (isset($_POST['delete_users_comply'])) + { + ($hook = get_hook('aus_delete_users_form_submitted')) ? eval($hook) : null; + + foreach ($users as $id) + { + // We don't want to delete the Guest user + if ($id > 1) + delete_user($id, true); + } + + pun_redirect(pun_link($pun_url['admin_users']), $lang_admin['Users deleted'].' '.$lang_admin['Redirect']); + } + + // Setup form + $pun_page['set_count'] = $pun_page['fld_count'] = 0; + + // Setup breadcrumbs + $pun_page['crumbs'] = array( + array($pun_config['o_board_title'], pun_link($pun_url['index'])), + array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), + array($lang_admin['Searches'], pun_link($pun_url['admin_users'])), + $lang_admin['Delete users'] + ); + + ($hook = get_hook('aus_delete_users_pre_header_load')) ? eval($hook) : null; + + define('PUN_PAGE_SECTION', 'users'); + define('PUN_PAGE', 'admin-users'); + require PUN_ROOT.'header.php'; + +?> +
    + + + +
    +

    { }

    +
    + +
    +
    +

    +
    +
    +

    +
    +
    + +
    + +
    + +
    +
    +
    + + +
    +
    +
    + +
    +user_level < USER_LEVEL_ADMIN) + message($lang_common['No permission']); + + if (empty($_POST['users'])) + message($lang_admin['No users selected']); + + ($hook = get_hook('aus_ban_users_selected')) ? eval($hook) : null; + + if (!is_array($_POST['users'])) + $users = explode(',', $_POST['users']); + else + $users = array_keys($_POST['users']); + + $users = array_map('intval', $users); + + // We check to make sure there are no administrators in this list + $query = array( + 'SELECT' => '1', + 'FROM' => 'users AS u', + 'WHERE' => 'u.id IN ('.implode(',', $users).') AND u.group_id='.PUN_ADMIN + ); + + ($hook = get_hook('aus_qr_check_for_admins2')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + if ($pun_db->num_rows($result) > 0) + message($lang_admin['Ban admin message']); + + if (isset($_POST['ban_users_comply'])) + { + $ban_message = trim($_POST['ban_message']); + $ban_expire = trim($_POST['ban_expire']); + + ($hook = get_hook('aus_ban_users_form_submitted')) ? eval($hook) : null; + + if ($ban_expire != '' && $ban_expire != 'Never') + { + $ban_expire = strtotime($ban_expire); + + if ($ban_expire == -1 || $ban_expire <= time()) + message($lang_admin['Invalid expire message']); + } + else + $ban_expire = 'NULL'; + + $ban_message = ($ban_message != '') ? '"'.$pun_db->escape($ban_message).'"' : 'NULL'; + + // Get the latest IPs for the posters and store them for a little later + $query = array( + 'SELECT' => 'p.poster_id, p.poster_ip', + 'FROM' => 'posts AS p', + 'WHERE' => 'p.poster_id IN ('.implode(',', $users).') AND p.poster_id>1', + 'GROUP BY' => 'p.poster_id', + 'ORDER BY' => 'p.posted DESC' + ); + + ($hook = get_hook('aus_qr_get_latest_user_ips')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + + $ips = array(); + while ($cur_post = $pun_db->fetch_assoc($result)) + $ips[$cur_post['poster_id']] = $cur_post['poster_ip']; + + // Get the rest of the data for the posters, merge in the IP information, create a ban + $query = array( + 'SELECT' => 'u.id, u.username, u.email, u.registration_ip', + 'FROM' => 'users AS u', + 'WHERE' => 'id IN ('.implode(',', $users).') AND id>1' + ); + + ($hook = get_hook('aus_qr_get_users')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + while ($cur_user = $pun_db->fetch_assoc($result)) + { + $ban_ip = isset($ips[$cur_user['id']]) ? $ips[$cur_user['id']] : $cur_user['registration_ip']; + + $query = array( + 'INSERT' => 'username, ip, email, message, expire, ban_creator', + 'INTO' => 'bans', + 'VALUES' => '\''.$pun_db->escape($cur_user['username']).'\', \''.$ban_ip.'\', \''.$pun_db->escape($cur_user['email']).'\', '.$ban_message.', '.$ban_expire.', '.$pun_user['id'] + ); + + ($hook = get_hook('aus_qr_add_ban')) ? eval($hook) : null; + $pun_db->query_build($query) or error(__FILE__, __LINE__); + } + + // Regenerate the bans cache + require_once PUN_ROOT.'include/cache.php'; + generate_bans_cache(); + + pun_redirect(pun_link($pun_url['admin_users']), $lang_admin['Users banned'].' '.$lang_admin['Redirect']); + } + + // Setup form + $pun_page['set_count'] = $pun_page['fld_count'] = 0; + + // Setup breadcrumbs + $pun_page['crumbs'] = array( + array($pun_config['o_board_title'], pun_link($pun_url['index'])), + array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), + array($lang_admin['Searches'], pun_link($pun_url['admin_users'])), + $lang_admin['Ban users'] + ); + + ($hook = get_hook('aus_ban_users_pre_header_load')) ? eval($hook) : null; + + define('PUN_PAGE_SECTION', 'users'); + define('PUN_PAGE', 'admin-users'); + require PUN_ROOT.'header.php'; + +?> +
    + + + +
    +

    { }

    +
    + +
    +
    +

    +
    +
    +

    +
    +
    + +
    + +
    + +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +user_level < USER_LEVEL_ADMIN) + message($lang_common['No permission']); + + // User pressed the cancel button + if (isset($_POST['change_group_cancel'])) + pun_redirect(pun_link($pun_url['admin_users']), $lang_admin['Cancel redirect']); + + if (empty($_POST['users'])) + message($lang_admin['No users selected']); + + ($hook = get_hook('aus_change_group_selected')) ? eval($hook) : null; + + if (!is_array($_POST['users'])) + $users = explode(',', $_POST['users']); + else + $users = array_keys($_POST['users']); + + $users = array_map('intval', $users); + + if (isset($_POST['change_group_comply'])) + { + $move_to_group = intval($_POST['move_to_group']); + + ($hook = get_hook('aus_change_group_form_submitted')) ? eval($hook) : null; + + // We need some information on the group + $query = array( + 'SELECT' => 'g.g_moderator', + 'FROM' => 'groups AS g', + 'WHERE' => 'g.g_id='.$move_to_group + ); + + ($hook = get_hook('aus_qr_get_group_moderator_status')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + if ($move_to_group == PUN_GUEST || !$pun_db->num_rows($result)) + message($lang_common['Bad request']); + + $group_is_mod = $pun_db->result($result); + + // Move users + $query = array( + 'UPDATE' => 'users', + 'SET' => 'group_id='.$move_to_group, + 'WHERE' => 'id IN ('.implode(',', $users).') AND id>1' + ); + + ($hook = get_hook('aus_qr_change_user_group')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + + if ($move_to_group != PUN_ADMIN && $group_is_mod == '0') + clean_forum_moderators(); + + pun_redirect(pun_link($pun_url['admin_users']), $lang_admin['User groups updated'].' '.$lang_admin['Redirect']); + } + + // Setup form + $pun_page['set_count'] = $pun_page['fld_count'] = 0; + + // Setup breadcrumbs + $pun_page['crumbs'] = array( + array($pun_config['o_board_title'], pun_link($pun_url['index'])), + array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), + array($lang_admin['Searches'], pun_link($pun_url['admin_users'])), + $lang_admin['Change group'] + ); + + ($hook = get_hook('aus_change_group_pre_header_load')) ? eval($hook) : null; + + define('PUN_PAGE_SECTION', 'users'); + define('PUN_PAGE', 'admin-users'); + require PUN_ROOT.'header.php'; + +?> +
    + + + +
    +

    { }

    +
    + +
    +
    +

    +
    +
    + +
    + +
    + +
    +
    +
    + + +
    +
    +
    + +
    +'.$last_post_after; + if ($last_post_before != '') + $conditions[] = 'u.last_post<'.$last_post_before; + if ($registered_after != '') + $conditions[] = 'u.registered>'.$registered_after; + if ($registered_before != '') + $conditions[] = 'u.registered<'.$registered_before; + + $like_command = ($db_type == 'pgsql') ? 'ILIKE' : 'LIKE'; + while (list($key, $input) = @each($form)) + { + if ($input != '' && in_array($key, array('username', 'email', 'title', 'realname', 'url', 'jabber', 'icq', 'msn', 'aim', 'yahoo', 'location', 'signature', 'admin_note'))) + $conditions[] = 'u.'.$pun_db->escape($key).' '.$like_command.' \''.$pun_db->escape(str_replace('*', '%', $input)).'\''; + } + + if ($posts_greater != '') + $conditions[] = 'u.num_posts>'.$posts_greater; + if ($posts_less != '') + $conditions[] = 'u.num_posts<'.$posts_less; + + if ($user_group != 'all') + $conditions[] = 'u.group_id='.intval($user_group); + + if (empty($conditions)) + message($lang_admin['No search terms message']); + + + // Load the misc.php language file + require PUN_ROOT.'lang/'.$pun_user['language'].'/misc.php'; + + // Find any users matching the conditions + $query = array( + 'SELECT' => 'u.id, u.username, u.email, u.title, u.num_posts, u.admin_note, g.g_id, g.g_user_title', + 'FROM' => 'users AS u', + 'JOINS' => array( + array( + 'LEFT JOIN' => 'groups AS g', + 'ON' => 'g.g_id=u.group_id' + ) + ), + 'WHERE' => 'u.id>1 AND '.implode(' AND ', $conditions), + 'ORDER BY' => $pun_db->escape($order_by).' '.$pun_db->escape($direction) + ); + + ($hook = get_hook('aus_qr_find_users')) ? eval($hook) : null; + $result = $pun_db->query_build($query) or error(__FILE__, __LINE__); + $pun_page['num_users'] = $pun_db->num_rows($result); + + + // Setup breadcrumbs + $pun_page['crumbs'] = array( + array($pun_config['o_board_title'], pun_link($pun_url['index'])), + array($lang_admin['Forum administration'], pun_link($pun_url['admin_index'])), + array($lang_admin['Searches'], pun_link($pun_url['admin_users'])), + $lang_admin['User search results'] + ); + + ($hook = get_hook('aus_find_user_pre_header_load')) ? eval($hook) : null; + + define('PUN_PAGE_SECTION', 'users'); + define('PUN_PAGE', 'admin-users'); + require PUN_ROOT.'header.php'; + +?> +
    + + + +
    +

    { }

    +
    + +
    +
    +

    +
    +
    + + + + + + + + + + + + + +fetch_assoc($result)) + { + $user_title = get_title($user_data); + + // This script is a special case in that we want to display "Not verified" for non-verified users + if (($user_data['g_id'] == '' || $user_data['g_id'] == PUN_UNVERIFIED) && $user_title != $lang_common['Banned']) + $user_title = ''.$lang_admin['Not verified'].''; + + $pun_page['actions'] = ''.$lang_admin['View IP stats'].''.$lang_admin['Show posts'].''; + +?> + + + + + + + + +'."\n"; + +?> + +
    '.htmlspecialchars($user_data['username']).'' ?> '.htmlspecialchars($user_data['admin_note']).'' ?>
    '.$lang_admin['No match'].'
    +', + '', + '' +); + +($hook = get_hook('aus_find_user_pre_moderation_buttons')) ? eval($hook) : null; + +?> +

    + +

    +
    +
    +
    + +
    + + + +
    +

    { }

    +
    + +
    +
    +

    +
    +
    + + +
    + +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + +
    + +
    + +
    + +
    +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + +
    +
    +

    +
    +
    + +
    + +
    + +
    + +
    +
    + +
    +
    +
    + +
    +query('SELECT group_id, username, email FROM '.$pun_db->prefix.'users WHERE id='.$user_id) or error('Unable to fetch user info', __FILE__, __LINE__, $pun_db->error()); - if ($pun_db->num_rows($result)) - list($group_id, $ban_user, $ban_email) = $pun_db->fetch_row($result); - else - message('No user by that ID registered.'); - } - else // Otherwise the username is in POST - { - $ban_user = trim($_POST['new_ban_user']); - - if ($ban_user != '') - { - $result = $pun_db->query('SELECT id, group_id, username, email FROM '.$pun_db->prefix.'users WHERE username=\''.$pun_db->escape($ban_user).'\' AND id>1') or error('Unable to fetch user info', __FILE__, __LINE__, $pun_db->error()); - if ($pun_db->num_rows($result)) - list($user_id, $group_id, $ban_user, $ban_email) = $pun_db->fetch_row($result); - else - message('No user by that username registered. If you want to add a ban not tied to a specific username just leave the username blank.'); - } - } - - // Make sure we're not banning an admin - if (isset($group_id) && $group_id == PUN_ADMIN) - message('The user '.pun_htmlspecialchars($ban_user).' is an administrator and can\'t be banned. If you want to ban an administrator, you must first demote him/her to moderator or user.'); - - // If we have a $user_id, we can try to find the last known IP of that user - if (isset($user_id)) - { - $result = $pun_db->query('SELECT poster_ip FROM '.$pun_db->prefix.'posts WHERE poster_id='.$user_id.' ORDER BY posted DESC LIMIT 1') or error('Unable to fetch post info', __FILE__, __LINE__, $pun_db->error()); - $ban_ip = ($pun_db->num_rows($result)) ? $pun_db->result($result) : ''; - } - - $mode = 'add'; - } - else // We are editing a ban - { - $ban_id = intval($_GET['edit_ban']); - if ($ban_id < 1) - message($lang_common['Bad request']); - - $result = $pun_db->query('SELECT username, ip, email, message, expire FROM '.$pun_db->prefix.'bans WHERE id='.$ban_id) or error('Unable to fetch ban info', __FILE__, __LINE__, $pun_db->error()); - if ($pun_db->num_rows($result)) - list($ban_user, $ban_ip, $ban_email, $ban_message, $ban_expire) = $pun_db->fetch_row($result); - else - message($lang_common['Bad request']); - - $ban_expire = ($ban_expire != '') ? date('Y-m-d', $ban_expire) : ''; - - $mode = 'edit'; - } - - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Bans'; - $focus_element = array('bans2', 'ban_user'); - require PUN_ROOT.'header.php'; - - generate_admin_menu('bans'); - - -?> -
    -

    Ban advanced settings

    -
    -
    -
    - - -
    - Supplement ban with IP and e-mail -
    - - - - - - - - - - - - - -
    Username - - The username to ban. -
    IP-adresses - - The IP or IP-ranges you wish to ban (e.g. 150.11.110.1 or 150.11.110). Separate addresses with spaces. If an IP is entered already it is the last known IP of this user in the database.here to see IP statistics for this user.' ?> -
    E-mail/domain - - The e-mail or e-mail domain you wish to ban (e.g. someone@somewhere.com or somewhere.com). See "Allow banned e-mail addresses" in Options for more info. -
    -

    You should be very careful when banning an IP-range because of the possibility of multiple users matching the same partial IP.

    -
    -
    -
    -
    -
    - Ban message and expiry -
    - - - - - - - - - -
    Ban message - - A message that will be displayed to the banned user when he/she visits the forums. -
    Expire date - - The date when this ban should be automatically removed (format: YYYY-MM-DD). Leave blank to remove manually. -
    -
    -
    -
    -

    -
    -
    -
    -
    - - 1) ? ltrim($octets[$c], "0") : $octets[$c]; - - if ($c > 3 || preg_match('/[^0-9]/', $octets[$c]) || intval($octets[$c]) > 255) - message('You entered an invalid IP/IP-range.'); - } - - $cur_address = implode('.', $octets); - $addresses[$i] = $cur_address; - } - - $ban_ip = implode(' ', $addresses); - } - - require PUN_ROOT.'include/email.php'; - if ($ban_email != '' && !is_valid_email($ban_email)) - { - if (!preg_match('/^[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/', $ban_email)) - message('The e-mail address (e.g. user@domain.com) or partial e-mail address domain (e.g. domain.com) you entered is invalid.'); - } - - if ($ban_expire != '' && $ban_expire != 'Never') - { - $ban_expire = strtotime($ban_expire); - - if ($ban_expire == -1 || $ban_expire <= time()) - message('You entered an invalid expire date. The format should be YYYY-MM-DD and the date must be at least one day in the future.'); - } - else - $ban_expire = 'NULL'; - - $ban_user = ($ban_user != '') ? '\''.$pun_db->escape($ban_user).'\'' : 'NULL'; - $ban_ip = ($ban_ip != '') ? '\''.$pun_db->escape($ban_ip).'\'' : 'NULL'; - $ban_email = ($ban_email != '') ? '\''.$pun_db->escape($ban_email).'\'' : 'NULL'; - $ban_message = ($ban_message != '') ? '\''.$pun_db->escape($ban_message).'\'' : 'NULL'; - - if ($_POST['mode'] == 'add') - $pun_db->query('INSERT INTO '.$pun_db->prefix.'bans (username, ip, email, message, expire) VALUES('.$ban_user.', '.$ban_ip.', '.$ban_email.', '.$ban_message.', '.$ban_expire.')') or error('Unable to add ban', __FILE__, __LINE__, $pun_db->error()); - else - $pun_db->query('UPDATE '.$pun_db->prefix.'bans SET username='.$ban_user.', ip='.$ban_ip.', email='.$ban_email.', message='.$ban_message.', expire='.$ban_expire.' WHERE id='.intval($_POST['ban_id'])) or error('Unable to update ban', __FILE__, __LINE__, $pun_db->error()); - - // Regenerate the bans cache - require_once PUN_ROOT.'include/cache.php'; - generate_bans_cache(); - - pun_redirect('admin_bans.php', 'Ban '.(($_POST['mode'] == 'edit') ? 'edited' : 'added').'. Redirecting …'); -} - - -// Remove a ban -else if (isset($_GET['del_ban'])) -{ - confirm_referrer('admin_bans.php'); - - $ban_id = intval($_GET['del_ban']); - if ($ban_id < 1) - message($lang_common['Bad request']); - - $pun_db->query('DELETE FROM '.$pun_db->prefix.'bans WHERE id='.$ban_id) or error('Unable to delete ban', __FILE__, __LINE__, $pun_db->error()); - - // Regenerate the bans cache - require_once PUN_ROOT.'include/cache.php'; - generate_bans_cache(); - - pun_redirect('admin_bans.php', 'Ban removed. Redirecting …'); -} - - -$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Bans'; -$focus_element = array('bans', 'new_ban_user'); -require PUN_ROOT.'header.php'; - -generate_admin_menu('bans'); - -?> -
    -

    New ban

    -
    -
    -
    -
    - Add ban -
    - - - - - -
    Username
    - - The username to ban (case insensitive). The next page will let you enter a custom IP and e-mail. If you just want to ban a specific IP/IP-range or e-mail just leave it blank. -
    -
    -
    -
    -
    -
    - -

    Existing bans

    -
    -
    -query('SELECT id, username, ip, email, message, expire FROM '.$pun_db->prefix.'bans ORDER BY id') or error('Unable to fetch ban list', __FILE__, __LINE__, $pun_db->error()); -if ($pun_db->num_rows($result)) -{ - while ($cur_ban = $pun_db->fetch_assoc($result)) - { - $expire = format_time($cur_ban['expire'], true); - -?> -
    -
    - Ban expires: -
    - - - - - - - - - - - - - - - - - -
    Username
    E-mail
    IP/IP-ranges
    Reason
    -

    Edit - Remove

    -
    -
    -
    -No bans in list.

    '."\n"; - -?> -
    -
    -
    -
    - -query('INSERT INTO '.$pun_db->prefix.'categories (cat_name) VALUES(\''.$pun_db->escape($new_cat_name).'\')') or error('Unable to create category', __FILE__, __LINE__, $pun_db->error()); - - pun_redirect('admin_categories.php', 'Category added. Redirecting …'); -} - - -// Delete a category -else if (isset($_POST['del_cat']) || isset($_POST['del_cat_comply'])) -{ - confirm_referrer('admin_categories.php'); - - $cat_to_delete = intval($_POST['cat_to_delete']); - if ($cat_to_delete < 1) - message($lang_common['Bad request']); - - if (isset($_POST['del_cat_comply'])) // Delete a category with all forums and posts - { - @set_time_limit(0); - - $result = $pun_db->query('SELECT id FROM '.$pun_db->prefix.'forums WHERE cat_id='.$cat_to_delete) or error('Unable to fetch forum list', __FILE__, __LINE__, $pun_db->error()); - $num_forums = $pun_db->num_rows($result); - - for ($i = 0; $i < $num_forums; ++$i) - { - $cur_forum = $pun_db->result($result, $i); - - // Prune all posts and topics - prune($cur_forum, 1, -1); - - // Delete the forum - $pun_db->query('DELETE FROM '.$pun_db->prefix.'forums WHERE id='.$cur_forum) or error('Unable to delete forum', __FILE__, __LINE__, $pun_db->error()); - } - - // Locate any "orphaned redirect topics" and delete them - $result = $pun_db->query('SELECT t1.id FROM '.$pun_db->prefix.'topics AS t1 LEFT JOIN '.$pun_db->prefix.'topics AS t2 ON t1.moved_to=t2.id WHERE t2.id IS NULL AND t1.moved_to IS NOT NULL') or error('Unable to fetch redirect topics', __FILE__, __LINE__, $pun_db->error()); - $num_orphans = $pun_db->num_rows($result); - - if ($num_orphans) - { - for ($i = 0; $i < $num_orphans; ++$i) - $orphans[] = $pun_db->result($result, $i); - - $pun_db->query('DELETE FROM '.$pun_db->prefix.'topics WHERE id IN('.implode(',', $orphans).')') or error('Unable to delete redirect topics', __FILE__, __LINE__, $pun_db->error()); - } - - // Delete the category - $pun_db->query('DELETE FROM '.$pun_db->prefix.'categories WHERE id='.$cat_to_delete) or error('Unable to delete category', __FILE__, __LINE__, $pun_db->error()); - - // Regenerate the quickjump cache - require_once PUN_ROOT.'include/cache.php'; - generate_quickjump_cache(); - - pun_redirect('admin_categories.php', 'Category deleted. Redirecting …'); - } - else // If the user hasn't comfirmed the delete - { - $result = $pun_db->query('SELECT cat_name FROM '.$pun_db->prefix.'categories WHERE id='.$cat_to_delete) or error('Unable to fetch category info', __FILE__, __LINE__, $pun_db->error()); - $cat_name = $pun_db->result($result); - - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Categories'; - require PUN_ROOT.'header.php'; - - generate_admin_menu('categories'); - -?> -
    -

    Category delete

    -
    -
    -
    - -
    - Confirm delete category -
    -

    Are you sure that you want to delete the category ""?

    -

    WARNING! Deleting a category will delete all forums and posts (if any) in that category!

    -
    -
    -
    -

    Go back

    -
    -
    -
    -
    - -query('SELECT id, disp_position FROM '.$pun_db->prefix.'categories ORDER BY disp_position') or error('Unable to fetch category list', __FILE__, __LINE__, $pun_db->error()); - $num_cats = $pun_db->num_rows($result); - - for ($i = 0; $i < $num_cats; ++$i) - { - if ($cat_name[$i] == '') - message('You must enter a category name.'); - - if (!@preg_match('#^\d+$#', $cat_order[$i])) - message('Position must be an integer value.'); - - list($cat_id, $position) = $pun_db->fetch_row($result); - - $pun_db->query('UPDATE '.$pun_db->prefix.'categories SET cat_name=\''.$pun_db->escape($cat_name[$i]).'\', disp_position='.$cat_order[$i].' WHERE id='.$cat_id) or error('Unable to update category', __FILE__, __LINE__, $pun_db->error()); - } - - // Regenerate the quickjump cache - require_once PUN_ROOT.'include/cache.php'; - generate_quickjump_cache(); - - pun_redirect('admin_categories.php', 'Categories updated. Redirecting …'); -} - - -// Generate an array with all categories -$result = $pun_db->query('SELECT id, cat_name, disp_position FROM '.$pun_db->prefix.'categories ORDER BY disp_position') or error('Unable to fetch category list', __FILE__, __LINE__, $pun_db->error()); -$num_cats = $pun_db->num_rows($result); - -for ($i = 0; $i < $num_cats; ++$i) - $cat_list[] = $pun_db->fetch_row($result); - - -$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Categories'; -require PUN_ROOT.'header.php'; - -generate_admin_menu('categories'); - -?> -
    -

    Add/remove/edit categories

    -
    -
    -
    -
    - Add/delete categories -
    - - - - - - - - - -
    Add a new category
    - - The name of the new category you want to add. You can edit the name of the category later (see below). Go to Forums to add forums to your new category. -
    Delete a category
    - - Select the name of the category you want to delete. You will be asked to confirm your choice of category for deletion before it is deleted. -
    -
    -
    -
    -
    -
    - Edit categories -
    - - - - - - - - - - - - - -
    NamePosition 
     
    -
    -
    -
    -
    -
    -
    -
    -
    - -query('INSERT INTO '.$pun_db->prefix.'censoring (search_for, replace_with) VALUES (\''.$pun_db->escape($search_for).'\', \''.$pun_db->escape($replace_with).'\')') or error('Unable to add censor word', __FILE__, __LINE__, $pun_db->error()); - - pun_redirect('admin_censoring.php', 'Censor word added. Redirecting …'); -} - - -// Update a censor word -else if (isset($_POST['update'])) -{ - confirm_referrer('admin_censoring.php'); - - $id = intval(key($_POST['update'])); - - $search_for = trim($_POST['search_for'][$id]); - $replace_with = trim($_POST['replace_with'][$id]); - - if ($search_for == '' || $replace_with == '') - message('You must enter both text to search for and text to replace with.'); - - $pun_db->query('UPDATE '.$pun_db->prefix.'censoring SET search_for=\''.$pun_db->escape($search_for).'\', replace_with=\''.$pun_db->escape($replace_with).'\' WHERE id='.$id) or error('Unable to update censor word', __FILE__, __LINE__, $pun_db->error()); - - pun_redirect('admin_censoring.php', 'Censor word updated. Redirecting …'); -} - - -// Remove a censor word -else if (isset($_POST['remove'])) -{ - confirm_referrer('admin_censoring.php'); - - $id = intval(key($_POST['remove'])); - - $pun_db->query('DELETE FROM '.$pun_db->prefix.'censoring WHERE id='.$id) or error('Unable to delete censor word', __FILE__, __LINE__, $pun_db->error()); - - pun_redirect('admin_censoring.php', 'Censor word removed. Redirecting …'); -} - - -$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Censoring'; -$focus_element = array('censoring', 'new_search_for'); -require PUN_ROOT.'header.php'; - -generate_admin_menu('censoring'); - -?> -
    -

    Censoring

    -
    -
    -
    -
    - Add word -
    -

    Enter a word that you want to censor and the replacement text for this word. Wildcards are accepted (i.e. *some* would match somewhere and lonesome). Censor words also affect usernames. New users will not be able to register with usernames containing any censored words. The search is case insensitive. Censor words must be enabled in Options for this to have any effect.

    - - - - - - - - - - - - - - - -
    Censored wordReplacement textAction
    -
    -
    -
    -
    -
    - Edit/remove words -
    -query('SELECT id, search_for, replace_with FROM '.$pun_db->prefix.'censoring ORDER BY id') or error('Unable to fetch censor word list', __FILE__, __LINE__, $pun_db->error()); -if ($pun_db->num_rows($result)) -{ - -?> - - - - - - - - - -fetch_assoc($result)) - echo "\t\t\t\t\t\t\t\t".''."\n"; - -?> - -
    Censored wordReplacement textActions
     
    -No censor words in list.

    '."\n"; - -?> -
    -
    -
    -
    -
    -
    -
    - -query('INSERT INTO '.$pun_db->prefix.'forums (cat_id) VALUES('.$add_to_cat.')') or error('Unable to create forum', __FILE__, __LINE__, $pun_db->error()); - - // Regenerate the quickjump cache - require_once PUN_ROOT.'include/cache.php'; - generate_quickjump_cache(); - - pun_redirect('admin_forums.php', 'Forum added. Redirecting …'); -} - - -// Delete a forum -else if (isset($_GET['del_forum'])) -{ - confirm_referrer('admin_forums.php'); - - $forum_id = intval($_GET['del_forum']); - if ($forum_id < 1) - message($lang_common['Bad request']); - - if (isset($_POST['del_forum_comply'])) // Delete a forum with all posts - { - @set_time_limit(0); - - // Prune all posts and topics - prune($forum_id, 1, -1); - - // Locate any "orphaned redirect topics" and delete them - $result = $pun_db->query('SELECT t1.id FROM '.$pun_db->prefix.'topics AS t1 LEFT JOIN '.$pun_db->prefix.'topics AS t2 ON t1.moved_to=t2.id WHERE t2.id IS NULL AND t1.moved_to IS NOT NULL') or error('Unable to fetch redirect topics', __FILE__, __LINE__, $pun_db->error()); - $num_orphans = $pun_db->num_rows($result); - - if ($num_orphans) - { - for ($i = 0; $i < $num_orphans; ++$i) - $orphans[] = $pun_db->result($result, $i); - - $pun_db->query('DELETE FROM '.$pun_db->prefix.'topics WHERE id IN('.implode(',', $orphans).')') or error('Unable to delete redirect topics', __FILE__, __LINE__, $pun_db->error()); - } - - // Delete the forum and any forum specific group permissions - $pun_db->query('DELETE FROM '.$pun_db->prefix.'forums WHERE id='.$forum_id) or error('Unable to delete forum', __FILE__, __LINE__, $pun_db->error()); - $pun_db->query('DELETE FROM '.$pun_db->prefix.'forum_perms WHERE forum_id='.$forum_id) or error('Unable to delete group forum permissions', __FILE__, __LINE__, $pun_db->error()); - - // Regenerate the quickjump cache - require_once PUN_ROOT.'include/cache.php'; - generate_quickjump_cache(); - - pun_redirect('admin_forums.php', 'Forum deleted. Redirecting …'); - } - else // If the user hasn't confirmed the delete - { - $result = $pun_db->query('SELECT forum_name FROM '.$pun_db->prefix.'forums WHERE id='.$forum_id) or error('Unable to fetch forum info', __FILE__, __LINE__, $pun_db->error()); - $forum_name = pun_htmlspecialchars($pun_db->result($result)); - - - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Forums'; - require PUN_ROOT.'header.php'; - - generate_admin_menu('forums'); - -?> -
    -

    Confirm delete forum

    -
    -
    -
    -
    - Important! Read before deleting -
    -

    Are you sure that you want to delete the forum ""?

    -

    WARNING! Deleting a forum will delete all posts (if any) in that forum!

    -
    -
    -
    -

    Go back

    -
    -
    -
    -
    - -query('UPDATE '.$pun_db->prefix.'forums SET disp_position='.$disp_position.' WHERE id='.intval($forum_id)) or error('Unable to update forum', __FILE__, __LINE__, $pun_db->error()); - } - - // Regenerate the quickjump cache - require_once PUN_ROOT.'include/cache.php'; - generate_quickjump_cache(); - - pun_redirect('admin_forums.php', 'Forums updated. Redirecting …'); -} - - -else if (isset($_GET['edit_forum'])) -{ - $forum_id = intval($_GET['edit_forum']); - if ($forum_id < 1) - message($lang_common['Bad request']); - - // Update group permissions for $forum_id - if (isset($_POST['save'])) - { - confirm_referrer('admin_forums.php'); - - // Start with the forum details - $forum_name = trim($_POST['forum_name']); - $forum_desc = pun_linebreaks(trim($_POST['forum_desc'])); - $cat_id = intval($_POST['cat_id']); - $sort_by = intval($_POST['sort_by']); - $redirect_url = isset($_POST['redirect_url']) ? trim($_POST['redirect_url']) : null; - - if ($forum_name == '') - message('You must enter a forum name.'); - - if ($cat_id < 1) - message($lang_common['Bad request']); - - $forum_desc = ($forum_desc != '') ? '\''.$pun_db->escape($forum_desc).'\'' : 'NULL'; - $redirect_url = ($redirect_url != '') ? '\''.$pun_db->escape($redirect_url).'\'' : 'NULL'; - - $pun_db->query('UPDATE '.$pun_db->prefix.'forums SET forum_name=\''.$pun_db->escape($forum_name).'\', forum_desc='.$forum_desc.', redirect_url='.$redirect_url.', sort_by='.$sort_by.', cat_id='.$cat_id.' WHERE id='.$forum_id) or error('Unable to update forum', __FILE__, __LINE__, $pun_db->error()); - - // Now let's deal with the permissions - if (isset($_POST['read_forum_old'])) - { - $result = $pun_db->query('SELECT g_id, g_read_board, g_post_replies, g_post_topics FROM '.$pun_db->prefix.'groups WHERE g_id!='.PUN_ADMIN) or error('Unable to fetch user group list', __FILE__, __LINE__, $pun_db->error()); - while ($cur_group = $pun_db->fetch_assoc($result)) - { - $read_forum_new = ($cur_group['g_read_board'] == '1') ? isset($_POST['read_forum_new'][$cur_group['g_id']]) ? '1' : '0' : intval($_POST['read_forum_old'][$cur_group['g_id']]); - $post_replies_new = isset($_POST['post_replies_new'][$cur_group['g_id']]) ? '1' : '0'; - $post_topics_new = isset($_POST['post_topics_new'][$cur_group['g_id']]) ? '1' : '0'; - - // Check if the new settings differ from the old - if ($read_forum_new != $_POST['read_forum_old'][$cur_group['g_id']] || $post_replies_new != $_POST['post_replies_old'][$cur_group['g_id']] || $post_topics_new != $_POST['post_topics_old'][$cur_group['g_id']]) - { - // If the new settings are identical to the default settings for this group, delete it's row in forum_perms - if ($read_forum_new == '1' && $post_replies_new == $cur_group['g_post_replies'] && $post_topics_new == $cur_group['g_post_topics']) - $pun_db->query('DELETE FROM '.$pun_db->prefix.'forum_perms WHERE group_id='.$cur_group['g_id'].' AND forum_id='.$forum_id) or error('Unable to delete group forum permissions', __FILE__, __LINE__, $pun_db->error()); - else - { - // Run an UPDATE and see if it affected a row, if not, INSERT - $pun_db->query('UPDATE '.$pun_db->prefix.'forum_perms SET read_forum='.$read_forum_new.', post_replies='.$post_replies_new.', post_topics='.$post_topics_new.' WHERE group_id='.$cur_group['g_id'].' AND forum_id='.$forum_id) or error('Unable to insert group forum permissions', __FILE__, __LINE__, $pun_db->error()); - if (!$pun_db->affected_rows()) - $pun_db->query('INSERT INTO '.$pun_db->prefix.'forum_perms (group_id, forum_id, read_forum, post_replies, post_topics) VALUES('.$cur_group['g_id'].', '.$forum_id.', '.$read_forum_new.', '.$post_replies_new.', '.$post_topics_new.')') or error('Unable to insert group forum permissions', __FILE__, __LINE__, $pun_db->error()); - } - } - } - } - - // Regenerate the quickjump cache - require_once PUN_ROOT.'include/cache.php'; - generate_quickjump_cache(); - - pun_redirect('admin_forums.php', 'Forum updated. Redirecting …'); - } - else if (isset($_POST['revert_perms'])) - { - confirm_referrer('admin_forums.php'); - - $pun_db->query('DELETE FROM '.$pun_db->prefix.'forum_perms WHERE forum_id='.$forum_id) or error('Unable to delete group forum permissions', __FILE__, __LINE__, $pun_db->error()); - - // Regenerate the quickjump cache - require_once PUN_ROOT.'include/cache.php'; - generate_quickjump_cache(); - - pun_redirect('admin_forums.php?edit_forum='.$forum_id, 'Permissions reverted to defaults. Redirecting …'); - } - - - // Fetch forum info - $result = $pun_db->query('SELECT id, forum_name, forum_desc, redirect_url, num_topics, sort_by, cat_id FROM '.$pun_db->prefix.'forums WHERE id='.$forum_id) or error('Unable to fetch forum info', __FILE__, __LINE__, $pun_db->error()); - if (!$pun_db->num_rows($result)) - message($lang_common['Bad request']); - - $cur_forum = $pun_db->fetch_assoc($result); - - - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Forums'; - require PUN_ROOT.'header.php'; - - generate_admin_menu('forums'); - -?> -
    -

    Edit forum

    -
    -
    -

    -
    -
    - Edit forum details -
    - - - - - - - - - - - - - - - - - - - - - -
    Forum name
    Description (HTML)
    Category - -
    Sort topics by - -
    Redirect URL'; ?>
    -
    -
    -
    -
    -
    - Edit group permissions for this forum -
    -

    In this form, you can set the forum specific permissions for the different user groups. If you haven't made any changes to this forums group permissions, what you see below is the default based on settings in User groups. Administrators always have full permissions and are thus excluded. Permission settings that differ from the default permissions for the user group are marked red. The "Read forum" permission checkbox will be disabled if the group in question lacks the "Read board" permission. For redirect forums, only the "Read forum" permission is editable.

    - - - - - - - - - - -query('SELECT g.g_id, g.g_title, g.g_read_board, g.g_post_replies, g.g_post_topics, fp.read_forum, fp.post_replies, fp.post_topics FROM '.$pun_db->prefix.'groups AS g LEFT JOIN '.$pun_db->prefix.'forum_perms AS fp ON (g.g_id=fp.group_id AND fp.forum_id='.$forum_id.') WHERE g.g_id!='.PUN_ADMIN.' ORDER BY g.g_id') or error('Unable to fetch group forum permission list', __FILE__, __LINE__, $pun_db->error()); - - while ($cur_perm = $pun_db->fetch_assoc($result)) - { - $read_forum = ($cur_perm['read_forum'] != '0') ? true : false; - $post_replies = (($cur_perm['g_post_replies'] == '0' && $cur_perm['post_replies'] == '1') || ($cur_perm['g_post_replies'] == '1' && $cur_perm['post_replies'] != '0')) ? true : false; - $post_topics = (($cur_perm['g_post_topics'] == '0' && $cur_perm['post_topics'] == '1') || ($cur_perm['g_post_topics'] == '1' && $cur_perm['post_topics'] != '0')) ? true : false; - - // Determine if the current sittings differ from the default or not - $read_forum_def = ($cur_perm['read_forum'] == '0') ? false : true; - $post_replies_def = (($post_replies && $cur_perm['g_post_replies'] == '0') || (!$post_replies && ($cur_perm['g_post_replies'] == '' || $cur_perm['g_post_replies'] == '1'))) ? false : true; - $post_topics_def = (($post_topics && $cur_perm['g_post_topics'] == '0') || (!$post_topics && ($cur_perm['g_post_topics'] == '' || $cur_perm['g_post_topics'] == '1'))) ? false : true; - -?> - - - > - - /> - - > - - /> - - > - - /> - - - - -
     Read forumPost repliesPost topics
    -
    -
    -
    -
    -

    -
    -
    -
    -
    - - - -
    -

    Add forum

    -
    -
    -
    -
    - Create a new forum -
    - - - - - -
    Add forum to category
    - - Select the category to which you wish to add a new forum. -
    -
    -
    -
    -
    -
    - -

    Edit forums

    -
    -
    -

    -query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.disp_position FROM '.$pun_db->prefix.'categories AS c INNER JOIN '.$pun_db->prefix.'forums AS f ON c.id=f.cat_id ORDER BY c.disp_position, c.id, f.disp_position') or error('Unable to fetch category/forum list', __FILE__, __LINE__, $pun_db->error()); - -$cur_category = 0; -while ($cur_forum = $pun_db->fetch_assoc($result)) -{ - if ($cur_forum['cid'] != $cur_category) // A new category since last iteration? - { - if ($cur_category != 0) - echo "\t\t\t\t\t\t\t".''."\n\t\t\t\t\t\t".'
    '."\n\t\t\t\t\t".''."\n\t\t\t\t".'
    '."\n"; - -?> -
    -
    - Category: -
    - - - - - - - -
    Edit - DeletePosition   -   
    -
    -
    -
    -

    - - - -
    - -query('SELECT * FROM '.$pun_db->prefix.'groups WHERE g_id='.$base_group) or error('Unable to fetch user group info', __FILE__, __LINE__, $pun_db->error()); - $group = $pun_db->fetch_assoc($result); - - $mode = 'add'; - } - else // We are editing a group - { - $group_id = intval($_GET['edit_group']); - if ($group_id < 1) - message($lang_common['Bad request']); - - $result = $pun_db->query('SELECT * FROM '.$pun_db->prefix.'groups WHERE g_id='.$group_id) or error('Unable to fetch user group info', __FILE__, __LINE__, $pun_db->error()); - if (!$pun_db->num_rows($result)) - message($lang_common['Bad request']); - - $group = $pun_db->fetch_assoc($result); - - $mode = 'edit'; - } - - - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / User groups'; - $required_fields = array('req_title' => 'Group title'); - $focus_element = array('groups2', 'req_title'); - require PUN_ROOT.'header.php'; - - generate_admin_menu('groups'); - -?> -
    -

    Group settings

    -
    -
    -

    -
    - - - -
    - Setup group options and permissions -
    -

    Below options and permissions are the default permissions for the user group. These options apply if no forum specific permissions are in effect.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Group title - -
    User title - - This title will override any rank users in this group have attained. Leave blank to use default title or rank. -
    Read board - tabindex="3" /> Yes    tabindex="4" /> No - Allow users in this group to view the board. This setting applies to every aspect of the board and can therefore not be overridden by forum specific settings. If this is set to "No", users in this group will only be able to login/logout and register. -
    Post replies - tabindex="5" /> Yes    tabindex="6" /> No - Allow users in this group to post replies in topics. -
    Post topics - tabindex="7" /> Yes    tabindex="8" /> No - Allow users in this group to post new topics. -
    Edit posts - tabindex="11" /> Yes    tabindex="12" /> No - Allow users in this group to edit their own posts. -
    Delete posts - tabindex="13" /> Yes    tabindex="14" /> No - Allow users in this group to delete their own posts. -
    Delete topics - tabindex="15" /> Yes    tabindex="16" /> No - Allow users in this group to delete their own topics (including any replies). -
    Set user title - tabindex="17" /> Yes    tabindex="18" /> No - Allow users in this group to set their own user title. -
    Use search - tabindex="19" /> Yes    tabindex="20" /> No - Allow users in this group to use the search feature. -
    Search user list - tabindex="21" /> Yes    tabindex="22" /> No - Allow users in this group to freetext search for users in the user list. -
    Edit subjects interval - - Number of seconds after post time that users in this group may edit the subject of topics they've posted. Set to 0 to allow edits indefinitely. -
    Post flood interval - - Number of seconds that users in this group have to wait between posts. Set to 0 to disable. -
    Search flood interval - - Number of seconds that users in this group have to wait between searches. Set to 0 to disable. -
    -

    Please note that in order for a user in this group to have moderator abilities, he/she must be assigned to moderate one or more forums. This is done via the user administration page of the user's profile.

    -
    -
    -
    -

    -
    -
    -
    -
    - -escape($user_title).'\'' : 'NULL'; - - if ($_POST['mode'] == 'add') - { - $result = $pun_db->query('SELECT 1 FROM '.$pun_db->prefix.'groups WHERE g_title=\''.$pun_db->escape($title).'\'') or error('Unable to check group title collision', __FILE__, __LINE__, $pun_db->error()); - if ($pun_db->num_rows($result)) - message('There is already a group with the title \''.pun_htmlspecialchars($title).'\'.'); - - $pun_db->query('INSERT INTO '.$pun_db->prefix.'groups (g_title, g_user_title, g_read_board, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood) VALUES(\''.$pun_db->escape($title).'\', '.$user_title.', '.$read_board.', '.$post_replies.', '.$post_topics.', '.$edit_posts.', '.$delete_posts.', '.$delete_topics.', '.$set_title.', '.$search.', '.$search_users.', '.$edit_subjects_interval.', '.$post_flood.', '.$search_flood.')') or error('Unable to add group', __FILE__, __LINE__, $pun_db->error()); - $new_group_id = $pun_db->insert_id(); - - // Now lets copy the forum specific permissions from the group which this group is based on - $result = $pun_db->query('SELECT forum_id, read_forum, post_replies, post_topics FROM '.$pun_db->prefix.'forum_perms WHERE group_id='.intval($_POST['base_group'])) or error('Unable to fetch group forum permission list', __FILE__, __LINE__, $pun_db->error()); - while ($cur_forum_perm = $pun_db->fetch_assoc($result)) - $pun_db->query('INSERT INTO '.$pun_db->prefix.'forum_perms (group_id, forum_id, read_forum, post_replies, post_topics) VALUES('.$new_group_id.', '.$cur_forum_perm['forum_id'].', '.$cur_forum_perm['read_forum'].', '.$cur_forum_perm['post_replies'].', '.$cur_forum_perm['post_topics'].')') or error('Unable to insert group forum permissions', __FILE__, __LINE__, $pun_db->error()); - } - else - { - $result = $pun_db->query('SELECT 1 FROM '.$pun_db->prefix.'groups WHERE g_title=\''.$pun_db->escape($title).'\' AND g_id!='.intval($_POST['group_id'])) or error('Unable to check group title collision', __FILE__, __LINE__, $pun_db->error()); - if ($pun_db->num_rows($result)) - message('There is already a group with the title \''.pun_htmlspecialchars($title).'\'.'); - - $pun_db->query('UPDATE '.$pun_db->prefix.'groups SET g_title=\''.$pun_db->escape($title).'\', g_user_title='.$user_title.', g_read_board='.$read_board.', g_post_replies='.$post_replies.', g_post_topics='.$post_topics.', g_edit_posts='.$edit_posts.', g_delete_posts='.$delete_posts.', g_delete_topics='.$delete_topics.', g_set_title='.$set_title.', g_search='.$search.', g_search_users='.$search_users.', g_edit_subjects_interval='.$edit_subjects_interval.', g_post_flood='.$post_flood.', g_search_flood='.$search_flood.' WHERE g_id='.intval($_POST['group_id'])) or error('Unable to update group', __FILE__, __LINE__, $pun_db->error()); - } - - // Regenerate the quickjump cache - require_once PUN_ROOT.'include/cache.php'; - generate_quickjump_cache(); - - pun_redirect('admin_groups.php', 'Group '.(($_POST['mode'] == 'edit') ? 'edited' : 'added').'. Redirecting …'); -} - - -// Set default group -else if (isset($_POST['set_default_group'])) -{ - confirm_referrer('admin_groups.php'); - - $group_id = intval($_POST['default_group']); - if ($group_id < 4) - message($lang_common['Bad request']); - - $pun_db->query('UPDATE '.$pun_db->prefix.'config SET conf_value='.$group_id.' WHERE conf_name=\'o_default_user_group\'') or error('Unable to update board config', __FILE__, __LINE__, $pun_db->error()); - - // Regenerate the config cache - require_once PUN_ROOT.'include/cache.php'; - generate_config_cache(); - - pun_redirect('admin_groups.php', 'Default group set. Redirecting …'); -} - - -// Remove a group -else if (isset($_GET['del_group'])) -{ - confirm_referrer('admin_groups.php'); - - $group_id = intval($_GET['del_group']); - if ($group_id < 5) - message($lang_common['Bad request']); - - // Make sure we don't remove the default group - if ($group_id == $pun_config['o_default_user_group']) - message('The default group cannot be removed. In order to delete this group, you must first setup a different group as the default.'); - - - // Check if this group has any members - $result = $pun_db->query('SELECT g.g_title, COUNT(u.id) FROM '.$pun_db->prefix.'groups AS g INNER JOIN '.$pun_db->prefix.'users AS u ON g.g_id=u.group_id WHERE g.g_id='.$group_id.' GROUP BY g.g_id, g_title') or error('Unable to fetch group info', __FILE__, __LINE__, $pun_db->error()); - - // If the group doesn't have any members or if we've already selected a group to move the members to - if (!$pun_db->num_rows($result) || isset($_POST['del_group'])) - { - if (isset($_POST['del_group'])) - { - $move_to_group = intval($_POST['move_to_group']); - $pun_db->query('UPDATE '.$pun_db->prefix.'users SET group_id='.$move_to_group.' WHERE group_id='.$group_id) or error('Unable to move users into group', __FILE__, __LINE__, $pun_db->error()); - } - - // Delete the group and any forum specific permissions - $pun_db->query('DELETE FROM '.$pun_db->prefix.'groups WHERE g_id='.$group_id) or error('Unable to delete group', __FILE__, __LINE__, $pun_db->error()); - $pun_db->query('DELETE FROM '.$pun_db->prefix.'forum_perms WHERE group_id='.$group_id) or error('Unable to delete group forum permissions', __FILE__, __LINE__, $pun_db->error()); - - // Regenerate the quickjump cache - require_once PUN_ROOT.'include/cache.php'; - generate_quickjump_cache(); - - pun_redirect('admin_groups.php', 'Group removed. Redirecting …'); - } - - - list($group_title, $group_members) = $pun_db->fetch_row($result); - - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / User groups'; - require PUN_ROOT.'header.php'; - - generate_admin_menu('groups'); - -?> -
    -

    Remove group

    -
    -
    -
    -
    - Move users currently in group -
    -

    The group "" currently has members. Please select a group to which these members will be assigned upon removal.

    - -
    -
    -
    -

    -
    -
    -
    -
    - - -
    -

    Add/setup groups

    -
    -
    -
    -
    - Add new group -
    - - - - - -
    Base new group on
    - - Select a user group from which the new group will inherit it's permission settings. The next page will let you fine-tune said settings. -
    -
    -
    -
    -
    -
    - Set default group -
    - - - - - -
    Default group
    - - This is the default user group, e.g. the group users are placed in when they register. For security reasons, users can't be placed in either the moderator or administrator user groups by default. -
    -
    -
    -
    -
    -
    - -

    Existing groups

    -
    -
    -
    -
    - Edit/remove groups -
    -

    The pre-defined groups Guests, Administrators, Moderators and Members cannot be removed. They can however be edited. Please note though, that in some groups, some options are unavailable (e.g. the edit posts permission for guests). Administrators always have full permissions.

    - -query('SELECT g_id, g_title FROM '.$pun_db->prefix.'groups ORDER BY g_id') or error('Unable to fetch user group list', __FILE__, __LINE__, $pun_db->error()); - -while ($cur_group = $pun_db->fetch_assoc($result)) - echo "\t\t\t\t\t\t\t\t".''."\n"; - -?> -
    Edit'.(($cur_group['g_id'] > PUN_MEMBER) ? ' - Remove' : '').''.pun_htmlspecialchars($cur_group['g_title']).'
    -
    -
    -
    -
    -
    -
    -
    - -= $latest_version) - message('You are running the latest version of PunBB.'); - else - message('A new version of PunBB has been released. You can download the latest version at PunBB.org.'); -} - - -// Show phpinfo() output -else if ($action == 'phpinfo' && $pun_user['g_id'] == PUN_ADMIN) -{ - // Is phpinfo() a disabled function? - if (strpos(strtolower((string)@ini_get('disable_functions')), 'phpinfo') !== false) - message('The PHP function phpinfo() has been disabled on this server.'); - - phpinfo(); - exit; -} - - -// Get the server load averages (if possible) -if (@file_exists('/proc/loadavg') && is_readable('/proc/loadavg')) -{ - // We use @ just in case - $fh = @fopen('/proc/loadavg', 'r'); - $load_averages = @fread($fh, 64); - @fclose($fh); - - $load_averages = @explode(' ', $load_averages); - $server_load = isset($load_averages[2]) ? $load_averages[0].' '.$load_averages[1].' '.$load_averages[2] : 'Not available'; -} -else if (!in_array(PHP_OS, array('WINNT', 'WIN32')) && preg_match('/averages?: ([0-9\.]+),[\s]+([0-9\.]+),[\s]+([0-9\.]+)/i', @exec('uptime'), $load_averages)) - $server_load = $load_averages[1].' '.$load_averages[2].' '.$load_averages[3]; -else - $server_load = 'Not available'; - - -// Get number of current visitors -$result = $pun_db->query('SELECT COUNT(user_id) FROM '.$pun_db->prefix.'online WHERE idle=0') or error('Unable to fetch online count', __FILE__, __LINE__, $pun_db->error()); -$num_online = $pun_db->result($result); - - -// Get the database system version -switch ($db_type) -{ - case 'sqlite': - $db_version = 'SQLite '.sqlite_libversion(); - break; - - default: - $result = $pun_db->query('SELECT VERSION()') or error('Unable to fetch version info', __FILE__, __LINE__, $pun_db->error()); - $db_version = $pun_db->result($result); - break; -} - - -// Collect some additional info about MySQL -if ($db_type == 'mysql' || $db_type == 'mysqli') -{ - $db_version = 'MySQL '.$db_version; - - // Calculate total db size/row count - $result = $pun_db->query('SHOW TABLE STATUS FROM `'.$db_name.'`') or error('Unable to fetch table status', __FILE__, __LINE__, $pun_db->error()); - - $total_records = $total_size = 0; - while ($status = $pun_db->fetch_assoc($result)) - { - $total_records += $status['Rows']; - $total_size += $status['Data_length'] + $status['Index_length']; - } - - $total_size = $total_size / 1024; - - if ($total_size > 1024) - $total_size = round($total_size / 1024, 2).' MB'; - else - $total_size = round($total_size, 2).' KB'; -} - - -// See if MMCache or PHPA is loaded -if (function_exists('mmcache')) - $php_accelerator = 'Turck MMCache'; -else if (isset($_PHPA)) - $php_accelerator = 'ionCube PHP Accelerator'; -else - $php_accelerator = 'N/A'; - - -$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin'; -require PUN_ROOT.'header.php'; - -generate_admin_menu('index'); - -?> -
    -

    Forum administration

    -
    -
    -

    - Welcome to the PunBB administration control panel. From here you can control vital aspects of the forum. Depending on whether you are an administrator or a moderator you can

    -  - organize categories and forums.
    -  - set forum-wide options and preferences.
    -  - control permissions for users and guests.
    -  - view IP statistics for users.
    -  - ban users.
    -  - censor words.
    -  - set up user ranks.
    -  - prune old posts.
    -  - handle post reports. -

    -
    -
    - -

    Statistics

    -
    -
    -
    -
    PunBB version
    -
    - PunBB - Check for upgrade
    - © Copyright 2002, 2003, 2004, 2005 Rickard Andersson -
    -
    Server load
    -
    - ( users online) -
    -
    Environment
    -
    - Operating system:
    - PHP: - Show info
    - Accelerator: -
    -
    Database
    -
    - -
    Rows: -
    Size: -
    -
    -
    -
    -
    -
    - - -
    - -query($truncate_sql.$pun_db->prefix.'search_matches') or error('Unable to empty search index match table', __FILE__, __LINE__, $pun_db->error()); - $pun_db->query($truncate_sql.$pun_db->prefix.'search_words') or error('Unable to empty search index words table', __FILE__, __LINE__, $pun_db->error()); - - // Reset the sequence for the search words (not needed for SQLite) - switch ($db_type) - { - case 'mysql': - case 'mysqli': - $result = $pun_db->query('ALTER TABLE '.$pun_db->prefix.'search_words auto_increment=1') or error('Unable to update table auto_increment', __FILE__, __LINE__, $pun_db->error()); - break; - - case 'pgsql'; - $result = $pun_db->query('SELECT setval(\''.$pun_db->prefix.'search_words_id_seq\', 1, false)') or error('Unable to update sequence', __FILE__, __LINE__, $pun_db->error()); - } - } - - $end_at = $start_at + $per_page; - -?> - - - - - -<?php echo pun_htmlspecialchars($pun_config['o_board_title']) ?> / Rebuilding search index … - - - - -Rebuilding index … This might be a good time to put on some coffee :-)

    - -query('SELECT DISTINCT t.id, p.id, p.message FROM '.$pun_db->prefix.'topics AS t INNER JOIN '.$pun_db->prefix.'posts AS p ON t.id=p.topic_id WHERE t.id>='.$start_at.' AND t.id<'.$end_at.' ORDER BY t.id') or error('Unable to fetch topic/post info', __FILE__, __LINE__, $pun_db->error()); - - $cur_topic = 0; - while ($cur_post = $pun_db->fetch_row($result)) - { - if ($cur_post[0] <> $cur_topic) - { - // Fetch subject and ID of first post in topic - $result2 = $pun_db->query('SELECT p.id, t.subject, MIN(p.posted) AS first FROM '.$pun_db->prefix.'posts AS p INNER JOIN '.$pun_db->prefix.'topics AS t ON t.id=p.topic_id WHERE t.id='.$cur_post[0].' GROUP BY p.id, t.subject ORDER BY first LIMIT 1') or error('Unable to fetch topic info', __FILE__, __LINE__, $pun_db->error()); - list($first_post, $subject) = $pun_db->fetch_row($result2); - - $cur_topic = $cur_post[0]; - } - - echo 'Processing post '.$cur_post[1].' in topic '.$cur_post[0].'
    '."\n"; - - if ($cur_post[1] == $first_post) // This is the "topic post" so we have to index the subject as well - update_search_index('post', $cur_post[1], $cur_post[2], $subject); - else - update_search_index('post', $cur_post[1], $cur_post[2]); - } - - // Check if there is more work to do - $result = $pun_db->query('SELECT id FROM '.$pun_db->prefix.'topics WHERE id>'.$end_at) or error('Unable to fetch topic info', __FILE__, __LINE__, $pun_db->error()); - - $query_str = ($pun_db->num_rows($result)) ? '?i_per_page='.$per_page.'&i_start_at='.$end_at : ''; - - $pun_db->end_transaction(); - $pun_db->close(); - - exit('
    JavaScript redirect unsuccessful. Click here to continue.'); -} - - -// Get the first post ID from the db -$result = $pun_db->query('SELECT id FROM '.$pun_db->prefix.'topics ORDER BY id LIMIT 1') or error('Unable to fetch topic info', __FILE__, __LINE__, $pun_db->error()); -if ($pun_db->num_rows($result)) - $first_id = $pun_db->result($result); - -$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Maintenance'; -require PUN_ROOT.'header.php'; - -generate_admin_menu('maintenance'); - -?> -
    -

    Forum Maintenance

    -
    -
    -
    -
    - Rebuild search index -
    -

    If you've added, edited or removed posts manually in the database or if you're having problems searching, you should rebuild the search index. For best performance you should put the forum in maintenance mode during rebuilding. Rebuilding the search index can take a long time and will increase server load during the rebuild process!

    - - - - - - - - - - - - - -
    Topics per cycle - - The number of topics to process per pageview. E.g. if you were to enter 100, one hundred topics would be processed and then the page would refresh. This is to prevent the script from timing out during the rebuild process. -
    Starting Topic ID - - The topic ID to start rebuilding at. It's default value is the first available ID in the database. Normally you wouldn't want to change this. -
    Empty index -   Select this if you want the search index to be emptied before rebuilding (see below). -
    -

    Once the process has completed you will be redirected back to this page. It is highly recommended that you have JavaScript enabled in your browser during rebuilding (for automatic redirect when a cycle has completed). If you are forced to abort the rebuild process, make a note of the last processed topic ID and enter that ID+1 in "Topic ID to start at" when/if you want to continue ("Empty index" must not be selected).

    -
    -
    -
    -
    -
    -
    -
    -
    - -= $form['timeout_visit']) - message('The value of "Timeout online" must be smaller than the value of "Timeout visit".'); - - while (list($key, $input) = @each($form)) - { - // Only update values that have changed - if (array_key_exists('o_'.$key, $pun_config) && $pun_config['o_'.$key] != $input) - { - if ($input != '' || is_int($input)) - $value = '\''.$pun_db->escape($input).'\''; - else - $value = 'NULL'; - - $pun_db->query('UPDATE '.$pun_db->prefix.'config SET conf_value='.$value.' WHERE conf_name=\'o_'.$pun_db->escape($key).'\'') or error('Unable to update board config', __FILE__, __LINE__, $pun_db->error()); - } - } - - // Regenerate the config cache - require_once PUN_ROOT.'include/cache.php'; - generate_config_cache(); - - pun_redirect('admin_options.php', 'Options updated. Redirecting …'); -} - - -$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Options'; -$form_name = 'update_options'; -require PUN_ROOT.'header.php'; - -generate_admin_menu('options'); - -?> -
    -

    Options

    -
    -
    -

    -
    - -
    - Essentials -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    Board title - - The title of this bulletin board (shown at the top of every page). This field may not contain HTML. -
    Board description - - A short description of this bulletin board (shown at the top of every page). This field may contain HTML. -
    Base URL - - The complete URL of the forum without trailing slash (i.e. http://www.mydomain.com/forums). This must be correct in order for all admin and moderator features to work. If you get "Bad referer" errors, it's probably incorrect. -
    Server timezone - - The timezone of the server where PunBB is installed. -
    Default language - - This is the default language style used if the visitor is a guest or a user that hasn't changed from the default in his/her profile. If you remove a language pack, this must be updated. -
    Default style - - This is the default style used for guests and users who haven't changed from the default in their profile.
    -
    -
    -
    -
    -
    - Time and timeouts -
    - - - - - - - - - - - - - - - - - - - - - -
    Time format - - [Current format: ] See here for formatting options. -
    Date format - - [Current format: ] See here for formatting options. -
    Visit timeout - - Number of seconds a user must be idle before his/hers last visit data is updated (primarily affects new message indicators). -
    Online timeout - - Number of seconds a user must be idle before being removed from the online users list. -
    Redirect time - - Number of seconds to wait when redirecting. If set to 0, no redirect page will be displayed (not recommended). -
    -
    -
    -
    -
    -
    - Display -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Version number - /> Yes    /> No - Show version number in footer. -
    User info in posts - /> Yes    /> No - Show information about the poster under the username in topic view. The information affected is location, register date, post count and the contact links (e-mail and URL). -
    User post count - /> Yes    /> No - Show the number of posts a user has made (affects topic view, profile and userlist). -
    Smilies - /> Yes    /> No - Convert smilies to small icons. -
    Smilies in signatures - /> Yes    /> No - Convert smilies to small icons in user signatures. -
    Make clickable links - /> Yes    /> No - When enabled, PunBB will automatically detect any URL's in posts and make them clickable hyperlinks. -
    Topic review - - Maximum number of posts to display when posting (newest first). 0 to disable. -
    Topics per page default - - The default number of topics to display per page in a forum. Users can personalize this setting. -
    Posts per page default - - The default number of posts to display per page in a topic. Users can personalize this setting. -
    Indent size - - If set to 8, a regular tab will be used when displaying text within the [code][/code] tag. Otherwise this many spaces will be used to indent the text. -
    -
    -
    -
    -
    -
    - Features -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Quick post - /> Yes    /> No - When enabled, PunBB will add a quick post form at the bottom of topics. This way users can post directly from the topic view. -
    Users online - /> Yes    /> No - Display info on the index page about guests and registered users currently browsing the forums. -
    Censor words - /> Yes    /> No - Enable this to censor specific words in the forum. See Censoring for more info. -
    User ranks - /> Yes    /> No - Enable this to use user ranks. See Ranks for more info. -
    User has posted earlier - /> Yes    /> No - This feature displays a dot in front of topics in viewforum.php in case the currently logged in user has posted in that topic earlier. Disable if you are experiencing high server load. -
    Quick jump - /> Yes    /> No - Enable the quick jump (jump to forum) drop list. -
    GZip output - /> Yes    /> No - If enabled, PunBB will gzip the output sent to browsers. This will reduce bandwidth usage, but use a little more CPU. This feature requires that PHP is configured with zlib (--with-zlib). Note: If you already have one of the Apache modules mod_gzip or mod_deflate set up to compress PHP scripts, you should disable this feature. -
    Search all forums - /> Yes    /> No - When disabled, searches will only be allowed in one forum at a time. Disable if server load is high due to excessive searching. -
    Additional menu items - - By entering HTML hyperlinks into this textbox, any number of items can be added to the navigation menu at the top of all pages. The format for adding new links is X = <a href="URL">LINK</a> where X is the position at which the link should be inserted (e.g. 0 to insert at the beginning and 2 to insert after "User list"). Separate entries with a linebreak. -
    -
    -
    -
    -
    -
    - Reports -
    - - - - - - - - - - - - - -
    Report method - /> Internal    /> E-mail    /> Both - Select the method for handling topic/post reports. You can choose whether topic/post reports should be handled by the internal report system, e-mailed to the addresses on the mailing list (see below) or both. -
    Report new registrations - /> Yes    /> No - If enabled, PunBB will notify users on the mailing list (see below) when a new user registers in the forums. -
    Mailing list - - A comma separated list of subscribers. The people on this list are the recipients of reports. -
    -
    -
    -
    -
    -
    - Avatars -
    - - - - - - - - - - - - - - - - - - - - - -
    Use avatars - /> Yes    /> No - When enabled, users will be able to upload an avatar which will be displayed under their title/rank. -
    Upload directory - - The upload directory for avatars (relative to the PunBB root directory). PHP must have write permissions to this directory. -
    Max width - - The maximum allowed width of avatars in pixels (60 is recommended). -
    Max height - - The maximum allowed height of avatars in pixels (60 is recommended). -
    Max size - - The maximum allowed size of avatars in bytes (10240 is recommended). -
    -
    -
    -
    -
    -
    - E-mail -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    Admin e-mail - - The e-mail address of the forum administrator. -
    Webmaster e-mail - - This is the address that all e-mails sent by the forum will be addressed from. -
    Subscriptions - /> Yes    /> No - Enable users to subscribe to topics (recieve e-mail when someone replies). -
    SMTP server address - - The address of an external SMTP server to send e-mails with. You can specify a custom port number if the SMTP server doesn't run on the default port 25 (example: mail.myhost.com:3580). Leave blank to use the local mail program. -
    SMTP username - - Username for SMTP server. Only enter a username if it is required by the SMTP server (most servers do not require authentication). -
    SMTP password - - Password for SMTP server. Only enter a password if it is required by the SMTP server (most servers do not require authentication). -
    -
    -
    -
    -
    -
    - Registration -
    - - - - - - - - - - - - - - - - - -
    Allow new registrations - /> Yes    /> No - Controls whether this forum accepts new registrations. Disable only under special circumstances. -
    Verify registrations - /> Yes    /> No - When enabled, users are e-mailed a random password when they register. They can then log in and change the password in their profile if they see fit. This feature also requires users to verify new e-mail addresses if they choose to change from the one they registered with. This is an effective way of avoiding registration abuse and making sure that all users have "correct" e-mail addresses in their profiles. -
    Use forum rules - /> Yes    /> No - When enabled, users must agree to a set of rules when registering (enter text below). The rules will always be available through a link in the navigation table at the top of every page. -
    Rules - - Here you can enter any rules or other information that the user must review and accept when registering. If you enabled rules above you have to enter something here, otherwise it will be disabled. This text will not be parsed like regular posts and thus may contain HTML. -
    -
    -
    -
    -
    -
    - Announcement -
    - - - - - - - - - -
    Display announcement - /> Yes    /> No - Enable this to display the below message in the forums. -
    Announcement message - - This text will not be parsed like regular posts and thus may contain HTML. -
    -
    -
    -
    -
    -
    - Maintenance -
    - - - - - - - - - -
    Maintenance mode - /> Yes    /> No - When enabled, the board will only be available to administrators. This should be used if the board needs to taken down temporarily for maintenance. WARNING! Do not log out when the board is in maintenance mode. You will not be able to login again. -
    Maintenance message - - The message that will be displayed to users when the board is in maintenance mode. If left blank a default message will be used. This text will not be parsed like regular posts and thus may contain HTML. -
    -
    -
    -
    -

    -
    -
    -
    -
    - -query('UPDATE '.$pun_db->prefix.'config SET conf_value='.$input.' WHERE conf_name=\'p_'.$pun_db->escape($key).'\'') or error('Unable to update board config', __FILE__, __LINE__, $pun_db->error()); - } - - // Regenerate the config cache - require_once PUN_ROOT.'include/cache.php'; - generate_config_cache(); - - pun_redirect('admin_permissions.php', 'Permissions updated. Redirecting …'); -} - - -$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Permissions'; -require PUN_ROOT.'header.php'; -generate_admin_menu('permissions'); - -?> -
    -

    Permissions

    -
    -
    -

    -
    - -
    - Posting -
    - - - - - - - - - - - - - - - - - - - - - -
    BBCode - /> Yes    /> No - Allow BBCode in posts (recommended). -
    Image tag - /> Yes    /> No - Allow the BBCode [img][/img] tag in posts. -
    All caps message - /> Yes    /> No - Allow a message to contain only capital letters. -
    All caps subject - /> Yes    /> No - Allow a subject to contain only capital letters. -
    Require guest e-mail - /> Yes    /> No - Require guests to supply an e-mail address when posting. -
    -
    -
    -
    -
    -
    - Signatures -
    - - - - - - - - - - - - - - - - - - - - - -
    BBCodes in signatures - /> Yes    /> No - Allow BBCodes in user signatures. -
    Image tag in signatures - /> Yes    /> No - Allow the BBCode [img][/img] tag in user signatures (not recommended). -
    All caps signature - /> Yes    /> No - Allow a signature to contain only capital letters. -
    Maximum signature length - - The maximum number of characters a user signature may contain. -
    Maximum signature lines - - The maximum number of lines a user signature may contain. -
    -
    -
    -
    -
    -
    - Moderators -
    - - - - - - - - - - - - - - - - - -
    Edit user profiles - /> Yes    /> No - Allow moderators to edit user profiles. -
    Rename users - /> Yes    /> No - Allow moderators to rename users. Other moderators and administrators are excluded. -
    Change user passwords - /> Yes    /> No - Allow moderators to change user passwords. Other moderators and administrators are excluded. -
    Ban users - /> Yes    /> No - Allow moderators to ban users (and edit/remove current bans). -
    -
    -
    -
    -
    -
    - Registration -
    - - - - - - - - - -
    Allow banned e-mail addresses - /> Yes    /> No - Allow users to register with or change to a banned e-mail address/domain. If left at it's default setting (yes) this action will be allowed, but an alert e-mail will be sent to the mailing list (an effective way of detecting multiple registrations). -
    Allow duplicate e-mail addresses - /> Yes    /> No - Controls whether users should be allowed to register with an e-mail address that another user already has. If allowed, an alert e-mail will be sent to the mailing list if a duplicate is detected. -
    -
    -
    -
    -

    -
    -
    -
    -
    - -query('SELECT id FROM '.$pun_db->prefix.'forums') or error('Unable to fetch forum list', __FILE__, __LINE__, $pun_db->error()); - $num_forums = $pun_db->num_rows($result); - - for ($i = 0; $i < $num_forums; ++$i) - { - $fid = $pun_db->result($result, $i); - - prune($fid, $_POST['prune_sticky'], $prune_date); - update_forum($fid); - } - } - else - { - $prune_from = intval($prune_from); - prune($prune_from, $_POST['prune_sticky'], $prune_date); - update_forum($prune_from); - } - - // Locate any "orphaned redirect topics" and delete them - $result = $pun_db->query('SELECT t1.id FROM '.$pun_db->prefix.'topics AS t1 LEFT JOIN '.$pun_db->prefix.'topics AS t2 ON t1.moved_to=t2.id WHERE t2.id IS NULL AND t1.moved_to IS NOT NULL') or error('Unable to fetch redirect topics', __FILE__, __LINE__, $pun_db->error()); - $num_orphans = $pun_db->num_rows($result); - - if ($num_orphans) - { - for ($i = 0; $i < $num_orphans; ++$i) - $orphans[] = $pun_db->result($result, $i); - - $pun_db->query('DELETE FROM '.$pun_db->prefix.'topics WHERE id IN('.implode(',', $orphans).')') or error('Unable to delete redirect topics', __FILE__, __LINE__, $pun_db->error()); - } - - pun_redirect('admin_prune.php', 'Posts pruned. Redirecting …'); - } - - - $prune_days = $_POST['req_prune_days']; - if (!@preg_match('#^\d+$#', $prune_days)) - message('Days to prune must be a positive integer.'); - - $prune_date = time() - ($prune_days*86400); - $prune_from = $_POST['prune_from']; - - // Concatenate together the query for counting number or topics to prune - $sql = 'SELECT COUNT(id) FROM '.$pun_db->prefix.'topics WHERE last_post<'.$prune_date.' AND moved_to IS NULL'; - - if ($_POST['prune_sticky'] == '0') - $sql .= ' AND sticky=\'0\''; - - if ($prune_from != 'all') - { - $prune_from = intval($prune_from); - $sql .= ' AND forum_id='.$prune_from; - - // Fetch the forum name (just for cosmetic reasons) - $result = $pun_db->query('SELECT forum_name FROM '.$pun_db->prefix.'forums WHERE id='.$prune_from) or error('Unable to fetch forum name', __FILE__, __LINE__, $pun_db->error()); - $forum = '"'.pun_htmlspecialchars($pun_db->result($result)).'"'; - } - else - $forum = 'all forums'; - - $result = $pun_db->query($sql) or error('Unable to fetch topic prune count', __FILE__, __LINE__, $pun_db->error()); - $num_topics = $pun_db->result($result); - - if (!$num_topics) - message('There are no topics that are '.$prune_days.' days old. Please decrease the value of "Days old" and try again.'); - - - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Prune'; - require PUN_ROOT.'header.php'; - - generate_admin_menu('prune'); - -?> -
    -

    Prune

    -
    -
    -
    - - - -
    - Confirm prune posts -
    -

    Are you sure that you want to prune all topics older than days from ? ( topics)

    -

    WARNING! Pruning posts deletes them permanently.

    -
    -
    -
    -

    Go back

    -
    -
    -
    -
    - - 'Days old'); - $focus_element = array('prune', 'req_prune_days'); - require PUN_ROOT.'header.php'; - - generate_admin_menu('prune'); - -?> -
    -

    Prune

    -
    -
    -
    - -
    - Prune old posts -
    - - - - - - - - - - - - - -
    Days old - - The number of days "old" a topic must be to be pruned. E.g. if you were to enter 30, every topic that didn't contain a post dated less than 30 days old would be deleted. -
    Prune sticky topics -  Yes    No - When enabled sticky topics will also be pruned. -
    Prune from forum - - The forum from which you want to prune posts. -
    -

    Use this feature with caution. Pruned posts can never be recovered. For best performance you should put the forum in maintenance mode during pruning.

    -
    -
    -
    -
    -
    -
    -
    -
    - -query('SELECT 1 FROM '.$pun_db->prefix.'ranks WHERE min_posts='.$min_posts) or error('Unable to fetch rank info', __FILE__, __LINE__, $pun_db->error()); - if ($pun_db->num_rows($result)) - message('There is already a rank with a minimun posts value of '.$min_posts.'.'); - - $pun_db->query('INSERT INTO '.$pun_db->prefix.'ranks (rank, min_posts) VALUES(\''.$pun_db->escape($rank).'\', '.$min_posts.')') or error('Unable to add rank', __FILE__, __LINE__, $pun_db->error()); - - // Regenerate the ranks cache - require_once PUN_ROOT.'include/cache.php'; - generate_ranks_cache(); - - pun_redirect('admin_ranks.php', 'Rank added. Redirecting …'); -} - - -// Update a rank -else if (isset($_POST['update'])) -{ - confirm_referrer('admin_ranks.php'); - - $id = intval(key($_POST['update'])); - - $rank = trim($_POST['rank'][$id]); - $min_posts = trim($_POST['min_posts'][$id]); - - if ($rank == '') - message('You must enter a rank title.'); - - if (!@preg_match('#^\d+$#', $min_posts)) - message('Minimum posts must be a positive integer value.'); - - // Make sure there isn't already a rank with the same min_posts value - $result = $pun_db->query('SELECT 1 FROM '.$pun_db->prefix.'ranks WHERE id!='.$id.' AND min_posts='.$min_posts) or error('Unable to fetch rank info', __FILE__, __LINE__, $pun_db->error()); - if ($pun_db->num_rows($result)) - message('There is already a rank with a minimun posts value of '.$min_posts.'.'); - - $pun_db->query('UPDATE '.$pun_db->prefix.'ranks SET rank=\''.$pun_db->escape($rank).'\', min_posts='.$min_posts.' WHERE id='.$id) or error('Unable to update rank', __FILE__, __LINE__, $pun_db->error()); - - // Regenerate the ranks cache - require_once PUN_ROOT.'include/cache.php'; - generate_ranks_cache(); - - pun_redirect('admin_ranks.php', 'Rank updated. Redirecting …'); -} - - -// Remove a rank -else if (isset($_POST['remove'])) -{ - confirm_referrer('admin_ranks.php'); - - $id = intval(key($_POST['remove'])); - - $pun_db->query('DELETE FROM '.$pun_db->prefix.'ranks WHERE id='.$id) or error('Unable to delete rank', __FILE__, __LINE__, $pun_db->error()); - - // Regenerate the ranks cache - require_once PUN_ROOT.'include/cache.php'; - generate_ranks_cache(); - - pun_redirect('admin_ranks.php', 'Rank removed. Redirecting …'); -} - - -$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Ranks'; -$focus_element = array('ranks', 'new_rank'); -require PUN_ROOT.'header.php'; - -generate_admin_menu('ranks'); - -?> -
    -

    Ranks

    -
    -
    -
    -
    - Add rank -
    -

    Enter a rank and the minimum number of posts that a user has to have to aquire the rank. Different ranks cannot have the same value for minimum posts. If a title is set for a user, the title will be displayed instead of any rank. User ranks must be enabled in Options for this to have any effect.

    - - - - - - - - - - - - - - - -
    Rank titleMinimum postsAction
    -
    -
    -
    -
    -
    - Edit/remove ranks -
    -query('SELECT id, rank, min_posts FROM '.$pun_db->prefix.'ranks ORDER BY min_posts') or error('Unable to fetch rank list', __FILE__, __LINE__, $pun_db->error()); -if ($pun_db->num_rows($result)) -{ - -?> - - - - - - - - - -fetch_assoc($result)) - echo "\t\t\t\t\t\t\t\t".''."\n"; - -?> - -
    Rank titleMinimum PostsActions
     
    -No ranks in list.

    '."\n"; - -?> -
    -
    -
    -
    -
    -
    -
    - -query('SELECT zapped FROM '.$pun_db->prefix.'reports WHERE id='.$zap_id) or error('Unable to fetch report info', __FILE__, __LINE__, $pun_db->error()); - $zapped = $pun_db->result($result); - - if ($zapped == '') - $pun_db->query('UPDATE '.$pun_db->prefix.'reports SET zapped='.time().', zapped_by='.$pun_user['id'].' WHERE id='.$zap_id) or error('Unable to zap report', __FILE__, __LINE__, $pun_db->error()); - - pun_redirect('admin_reports.php', 'Report zapped. Redirecting …'); -} - - -$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Reports'; -require PUN_ROOT.'header.php'; - -generate_admin_menu('reports'); - -?> -
    -

    New reports

    -
    -
    -query('SELECT r.id, r.post_id, r.topic_id, r.forum_id, r.reported_by, r.created, r.message, t.subject, f.forum_name, u.username AS reporter FROM '.$pun_db->prefix.'reports AS r LEFT JOIN '.$pun_db->prefix.'topics AS t ON r.topic_id=t.id LEFT JOIN '.$pun_db->prefix.'forums AS f ON r.forum_id=f.id LEFT JOIN '.table_prefix.'users AS u ON r.reported_by=u.user_id WHERE r.zapped IS NULL ORDER BY created DESC') or error('Unable to fetch report list', __FILE__, __LINE__, $pun_db->error()); - -if ($pun_db->num_rows($result)) -{ - while ($cur_report = $pun_db->fetch_assoc($result)) - { - $reporter = ($cur_report['reporter'] != '') ? ''.pun_htmlspecialchars($cur_report['reporter']).'' : 'Deleted user'; - $forum = ($cur_report['forum_name'] != '') ? ''.pun_htmlspecialchars($cur_report['forum_name']).'' : 'Deleted'; - $topic = ($cur_report['subject'] != '') ? ''.pun_htmlspecialchars($cur_report['subject']).'' : 'Deleted'; - $post = ($cur_report['post_id'] != '') ? str_replace("\n", '
    ', pun_htmlspecialchars($cur_report['message'])) : 'Deleted'; - $postid = ($cur_report['post_id'] != '') ? 'Post #'.$cur_report['post_id'].'' : 'Deleted'; - -?> -
    -
    - Reported -
    - - - - - - - - - -
    Forum » Topic » Post »  » 
    Report by
    -
    -
    -
    -There are no new reports.

    '."\n"; - -?> -
    -
    -
    - -
    -

    10 last zapped reports

    -
    -
    -query('SELECT r.id, r.post_id, r.topic_id, r.forum_id, r.reported_by, r.message, r.zapped, r.zapped_by AS zapped_by_id, t.subject, f.forum_name, u.username AS reporter, u2.username AS zapped_by FROM '.$pun_db->prefix.'reports AS r LEFT JOIN '.$pun_db->prefix.'topics AS t ON r.topic_id=t.id LEFT JOIN '.$pun_db->prefix.'forums AS f ON r.forum_id=f.id LEFT JOIN '.table_prefix.'users AS u ON r.reported_by=u.user_id LEFT JOIN '.table_prefix.'users AS u2 ON r.zapped_by=u2.user_id WHERE r.zapped IS NOT NULL ORDER BY zapped DESC LIMIT 10') or error('Unable to fetch report list', __FILE__, __LINE__, $pun_db->error()); - -if ($pun_db->num_rows($result)) -{ - while ($cur_report = $pun_db->fetch_assoc($result)) - { - $reporter = ($cur_report['reporter'] != '') ? ''.pun_htmlspecialchars($cur_report['reporter']).'' : 'Deleted user'; - $forum = ($cur_report['forum_name'] != '') ? ''.pun_htmlspecialchars($cur_report['forum_name']).'' : 'Deleted'; - $topic = ($cur_report['subject'] != '') ? ''.pun_htmlspecialchars($cur_report['subject']).'' : 'Deleted'; - $post = ($cur_report['post_id'] != '') ? str_replace("\n", '
    ', pun_htmlspecialchars($cur_report['message'])) : 'Post deleted'; - $post_id = ($cur_report['post_id'] != '') ? 'Post #'.$cur_report['post_id'].'' : 'Deleted'; - $zapped_by = ($cur_report['zapped_by'] != '') ? ''.pun_htmlspecialchars($cur_report['zapped_by']).'' : 'N/A'; - -?> -
    -
    - Zapped -
    - - - - - - - - - -
    Forum » Topic » Post »  » 
    Reported by
    Zapped by
    -
    -
    -
    -There are no zapped reports.

    '."\n"; - -?> -
    -
    -
    -
    - - -
    -
    - -
    -
    - -
    -

    Users

    -
    -
    - - - - - - - - - - -query('SELECT poster_ip, MAX(posted) AS last_used, COUNT(id) AS used_times FROM '.$pun_db->prefix.'posts WHERE poster_id='.$ip_stats.' GROUP BY poster_ip ORDER BY last_used DESC') or error('Unable to fetch post info', __FILE__, __LINE__, $pun_db->error()); - if ($pun_db->num_rows($result)) - { - while ($cur_ip = $pun_db->fetch_assoc($result)) - { - -?> - - - - - - -'."\n"; - -?> - -
    IP addressLast usedTimes foundAction
    Find more users for this ip
    There are currently no posts by that user in the forum.
    -
    -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -

    Users

    -
    -
    - - - - - - - - - - - - -query('SELECT DISTINCT poster_id, poster FROM '.$pun_db->prefix.'posts WHERE poster_ip=\''.$pun_db->escape($ip).'\' ORDER BY poster DESC') or error('Unable to fetch post info', __FILE__, __LINE__, $pun_db->error()); - $num_posts = $pun_db->num_rows($result); - - if ($num_posts) - { - // Loop through users and print out some info - for ($i = 0; $i < $num_posts; ++$i) - { - list($poster_id, $poster) = $pun_db->fetch_row($result); - - $result2 = $pun_db->query('SELECT u.id, u.username, u.email, u.title, u.num_posts, u.admin_note, g.g_id, g.g_user_title FROM '.$pun_db->prefix.'users AS u INNER JOIN '.$pun_db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id>1 AND u.id='.$poster_id) or error('Unable to fetch user info', __FILE__, __LINE__, $pun_db->error()); - - if (($user_data = $pun_db->fetch_assoc($result2))) - { - $user_title = get_title($user_data); - - $actions = 'View IP stats - Show posts'; - -?> - - - - - - - - - - - - - - - - - -'."\n"; - -?> - -
    UsernameE-mailTitle/StatusPostsAdmin noteActions
    '.pun_htmlspecialchars($user_data['username']).'' ?>
     Guest   
    The supplied IP address could not be found in the database.
    -
    -
    -
    - -
    -
    - -
    -
    -'.$last_post_after; - if ($last_post_before != '') - $conditions[] = 'u.last_post<'.$last_post_before; - if ($registered_after != '') - $conditions[] = 'u.registered>'.$registered_after; - if ($registered_before != '') - $conditions[] = 'u.registered<'.$registered_before; - - $like_command = ($db_type == 'pgsql') ? 'ILIKE' : 'LIKE'; - while (list($key, $input) = @each($form)) - { - if ($input != '' && in_array($key, array('username', 'email', 'title', 'realname', 'url', 'jabber', 'icq', 'msn', 'aim', 'yahoo', 'location', 'signature', 'admin_note'))) - $conditions[] = 'u.'.$pun_db->escape($key).' '.$like_command.' \''.$pun_db->escape(str_replace('*', '%', $input)).'\''; - } - - if ($posts_greater != '') - $conditions[] = 'u.num_posts>'.$posts_greater; - if ($posts_less != '') - $conditions[] = 'u.num_posts<'.$posts_less; - - if ($user_group != 'all') - $conditions[] = 'u.group_id='.intval($user_group); - - if (empty($conditions)) - message('You didn\'t enter any search terms.'); - - - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Users'; - require PUN_ROOT.'header.php'; - -?> -
    -
    - -
    -
    - -
    -

    Users

    -
    -
    - - - - - - - - - - - - -query('SELECT u.id, u.username, u.email, u.title, u.num_posts, u.admin_note, g.g_id, g.g_user_title FROM '.$pun_db->prefix.'users AS u LEFT JOIN '.$pun_db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id>1 AND '.implode(' AND ', $conditions).' ORDER BY '.$pun_db->escape($order_by).' '.$pun_db->escape($direction)) or error('Unable to fetch user info', __FILE__, __LINE__, $pun_db->error()); - if ($pun_db->num_rows($result)) - { - while ($user_data = $pun_db->fetch_assoc($result)) - { - $user_title = get_title($user_data); - - // This script is a special case in that we want to display "Not verified" for non-verified users - if (($user_data['g_id'] == '' || $user_data['g_id'] == PUN_UNVERIFIED) && $user_title != $lang_common['Banned']) - $user_title = 'Not verified'; - - $actions = 'View IP stats - Show posts'; - -?> - - - - - - - - -'."\n"; - -?> - -
    UsernameE-mailTitle/StatusPostsAdmin noteActions
    '.pun_htmlspecialchars($user_data['username']).'' ?>
    No match.
    -
    -
    -
    - -
    -
    - -
    -
    - -
    -

    User search

    -
    -
    -

    -
    -
    - Enter search criteria -
    -

    Search for users in the database. You can enter one or more terms to search for. Wildcards in the form of asterisks (*) are accepted.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Username
    E-mail address
    Title
    Real name
    Website
    ICQ
    MSN Messenger
    AOL IM
    Yahoo! Messenger
    Location
    Signature
    Admin note
    Number of posts greater than
    Number of posts less than
    Last post is after - (yyyy-mm-dd hh:mm:ss)
    Last post is before - (yyyy-mm-dd hh:mm:ss)
    Registered after - (yyyy-mm-dd hh:mm:ss)
    Registered before - (yyyy-mm-dd hh:mm:ss)
    Order by -     -
    User group - -
    -
    -
    -
    -

    -
    -
    - -

    IP search

    -
    -
    -
    -
    - Enter IP to search for -
    - - - - - -
    IP address
    - The IP address to search for in the post database.
    -
    -
    -
    -
    -
    -
    -
    - - -Order Allow,Deny -Deny from All - \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/cache/cache_bans.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/cache/cache_bans.php Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,8 @@ + \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/cache/cache_config.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/cache/cache_config.php Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,79 @@ + '1.3-beta', + 'o_board_title' => 'PunBB 1.3 + Enano', + 'o_board_desc' => 'PunBB integrated with Enano\'s user and template system. w00t!', + 'o_default_timezone' => '0', + 'o_time_format' => 'H:i:s', + 'o_date_format' => 'Y-m-d', + 'o_check_for_updates' => '0', + 'o_timeout_visit' => '1800', + 'o_timeout_online' => '300', + 'o_redirect_delay' => '1', + 'o_show_version' => '0', + 'o_show_user_info' => '1', + 'o_show_post_count' => '1', + 'o_signatures' => '1', + 'o_smilies' => '1', + 'o_smilies_sig' => '1', + 'o_make_links' => '1', + 'o_default_lang' => 'English', + 'o_default_style' => 'Oxygen', + 'o_default_user_group' => '3', + 'o_topic_review' => '15', + 'o_disp_topics_default' => '30', + 'o_disp_posts_default' => '25', + 'o_indent_num_spaces' => '4', + 'o_quickpost' => '1', + 'o_users_online' => '1', + 'o_censoring' => '0', + 'o_ranks' => '1', + 'o_show_dot' => '0', + 'o_topic_views' => '1', + 'o_quickjump' => '1', + 'o_gzip' => '0', + 'o_additional_navlinks' => '', + 'o_report_method' => '0', + 'o_regs_report' => '0', + 'o_mailing_list' => 'dan@enanocms.org', + 'o_avatars' => '0', + 'o_avatars_dir' => 'img/avatars', + 'o_avatars_width' => '60', + 'o_avatars_height' => '60', + 'o_avatars_size' => '10240', + 'o_search_all_forums' => '1', + 'o_sef' => 'File_based_(fancy)', + 'o_admin_email' => 'dan@enanocms.org', + 'o_webmaster_email' => 'dan@enanocms.org', + 'o_subscriptions' => '1', + 'o_smtp_host' => NULL, + 'o_smtp_user' => NULL, + 'o_smtp_pass' => NULL, + 'o_smtp_ssl' => '0', + 'o_regs_allow' => '1', + 'o_regs_verify' => '0', + 'o_announcement' => '0', + 'o_announcement_heading' => 'Sample announcement', + 'o_announcement_message' => '

    Enter your announcement here.

    ', + 'o_rules' => '0', + 'o_rules_message' => 'Enter your rules here.', + 'o_maintenance' => '0', + 'o_maintenance_message' => 'The forums are temporarily down for maintenance. Please try again in a few minutes.
    \\n
    \\n/Administrator', + 'p_message_bbcode' => '1', + 'p_message_img_tag' => '1', + 'p_message_all_caps' => '1', + 'p_subject_all_caps' => '1', + 'p_sig_all_caps' => '1', + 'p_sig_bbcode' => '1', + 'p_sig_img_tag' => '0', + 'p_sig_length' => '400', + 'p_sig_lines' => '4', + 'p_allow_banned_email' => '1', + 'p_allow_dupe_email' => '0', + 'p_force_guest_email' => '1', +); + +?> \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/cache/cache_hooks.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/cache/cache_hooks.php Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,8 @@ + \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/cache/cache_quickjump_1.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/cache/cache_quickjump_1.php Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,4 @@ + + array ( + 'id' => '1', + 'rank' => 'New member', + 'min_posts' => '0', + ), + 1 => + array ( + 'id' => '2', + 'rank' => 'New member', + 'min_posts' => '0', + ), +); + +?> \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/cache/index.html --- a/punbb/cache/index.html Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - -. - - -. - - \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/delete.php --- a/punbb/delete.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,130 +0,0 @@ -query('SELECT f.id AS fid, f.forum_name, f.moderators, f.redirect_url, fp.post_replies, fp.post_topics, t.id AS tid, t.subject, t.posted, t.closed, p.poster, p.poster_id, p.message, p.hide_smilies FROM '.$pun_db->prefix.'posts AS p INNER JOIN '.$pun_db->prefix.'topics AS t ON t.id=p.topic_id INNER JOIN '.$pun_db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$pun_db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND p.id='.$id) or error('Unable to fetch post info', __FILE__, __LINE__, $pun_db->error()); -if (!$pun_db->num_rows($result)) - message($lang_common['Bad request']); - -$cur_post = $pun_db->fetch_assoc($result); - -// Sort out who the moderators are and if we are currently a moderator (or an admin) -$mods_array = ($cur_post['moderators'] != '') ? unserialize($cur_post['moderators']) : array(); -$is_admmod = ($pun_user['g_id'] == PUN_ADMIN || ($pun_user['g_id'] == PUN_MOD && array_key_exists($pun_user['username'], $mods_array))) ? true : false; - -// Determine whether this post is the "topic post" or not -$result = $pun_db->query('SELECT id FROM '.$pun_db->prefix.'posts WHERE topic_id='.$cur_post['tid'].' ORDER BY posted LIMIT 1') or error('Unable to fetch post info', __FILE__, __LINE__, $pun_db->error()); -$topic_post_id = $pun_db->result($result); - -$is_topic_post = ($id == $topic_post_id) ? true : false; - -// Do we have permission to edit this post? -if (($pun_user['g_delete_posts'] == '0' || - ($pun_user['g_delete_topics'] == '0' && $is_topic_post) || - $cur_post['poster_id'] != $pun_user['id'] || - $cur_post['closed'] == '1') && - !$is_admmod) - message($lang_common['No permission']); - -// Load the delete.php language file -require PUN_ROOT.'lang/'.$pun_user['language'].'/delete.php'; - - -if (isset($_POST['delete'])) -{ - if ($is_admmod) - confirm_referrer('delete'); - - require PUN_ROOT.'include/search_idx.php'; - - if ($is_topic_post) - { - // Delete the topic and all of it's posts - delete_topic($cur_post['tid']); - update_forum($cur_post['fid']); - - pun_redirect('viewforum.php?id='.$cur_post['fid'], $lang_delete['Topic del redirect']); - } - else - { - // Delete just this one post - delete_post($id, $cur_post['tid']); - update_forum($cur_post['fid']); - - pun_redirect('viewtopic.php?id='.$cur_post['tid'], $lang_delete['Post del redirect']); - } -} - - -$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_delete['Delete post']; -require PUN_ROOT.'header.php'; - -require PUN_ROOT.'include/parser.php'; -$cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']); - -?> -
    -
    -
    •  » 
    •  » 
    -
    -
    - -
    -

    -
    -
    -
    -
    - -
    -
    -

    :

    - -
    -
    -
    -
    -

    -
    -
    -
    -query('SELECT f.id AS fid, f.forum_name, f.moderators, f.redirect_url, fp.post_replies, fp.post_topics, t.id AS tid, t.subject, t.posted, t.closed, p.poster, p.poster_id, p.message, p.hide_smilies FROM '.$pun_db->prefix.'posts AS p INNER JOIN '.$pun_db->prefix.'topics AS t ON t.id=p.topic_id INNER JOIN '.$pun_db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$pun_db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND p.id='.$id) or error('Unable to fetch post info', __FILE__, __LINE__, $pun_db->error()); -if (!$pun_db->num_rows($result)) - message($lang_common['Bad request']); - -$cur_post = $pun_db->fetch_assoc($result); - -// Sort out who the moderators are and if we are currently a moderator (or an admin) -$mods_array = ($cur_post['moderators'] != '') ? unserialize($cur_post['moderators']) : array(); -$is_admmod = ($pun_user['g_id'] == PUN_ADMIN || ($pun_user['g_id'] == PUN_MOD && array_key_exists($pun_user['username'], $mods_array))) ? true : false; - -// Determine whether this post is the "topic post" or not -$result = $pun_db->query('SELECT id FROM '.$pun_db->prefix.'posts WHERE topic_id='.$cur_post['tid'].' ORDER BY posted LIMIT 1') or error('Unable to fetch post info', __FILE__, __LINE__, $pun_db->error()); -$topic_post_id = $pun_db->result($result); - -$can_edit_subject = ($id == $topic_post_id && (($pun_user['g_edit_subjects_interval'] == '0' || (time() - $cur_post['posted']) < $pun_user['g_edit_subjects_interval']) || $is_admmod)) ? true : false; - -// Do we have permission to edit this post? -if (($pun_user['g_edit_posts'] == '0' || - $cur_post['poster_id'] != $pun_user['id'] || - $cur_post['closed'] == '1') && - !$is_admmod) - message($lang_common['No permission']); - -// Load the post.php/edit.php language file -require PUN_ROOT.'lang/'.$pun_user['language'].'/post.php'; - -// Start with a clean slate -$errors = array(); - - -if (isset($_POST['form_sent'])) -{ - if ($is_admmod) - confirm_referrer('edit.php'); - - // If it is a topic it must contain a subject - if ($can_edit_subject) - { - $subject = pun_trim($_POST['req_subject']); - - if ($subject == '') - $errors[] = $lang_post['No subject']; - else if (pun_strlen($subject) > 70) - $errors[] = $lang_post['Too long subject']; - else if ($pun_config['p_subject_all_caps'] == '0' && strtoupper($subject) == $subject && $pun_user['g_id'] < PUN_MOD) - $subject = ucwords(strtolower($subject)); - } - - // Clean up message from POST - $message = pun_linebreaks(pun_trim($_POST['req_message'])); - - if ($message == '') - $errors[] = $lang_post['No message']; - else if (strlen($message) > 65535) - $errors[] = $lang_post['Too long message']; - else if ($pun_config['p_message_all_caps'] == '0' && strtoupper($message) == $message && $pun_user['g_id'] < PUN_MOD) - $message = ucwords(strtolower($message)); - - // Validate BBCode syntax - if ($pun_config['p_message_bbcode'] == '1' && strpos($message, '[') !== false && strpos($message, ']') !== false) - { - require PUN_ROOT.'include/parser.php'; - $message = preparse_bbcode($message, $errors); - } - - - $hide_smilies = isset($_POST['hide_smilies']) ? intval($_POST['hide_smilies']) : 0; - if ($hide_smilies != '1') $hide_smilies = '0'; - - // Did everything go according to plan? - if (empty($errors) && !isset($_POST['preview'])) - { - $edited_sql = (!isset($_POST['silent']) || !$is_admmod) ? $edited_sql = ', edited='.time().', edited_by=\''.$pun_db->escape($pun_user['username']).'\'' : ''; - - require PUN_ROOT.'include/search_idx.php'; - - if ($can_edit_subject) - { - // Update the topic and any redirect topics - $pun_db->query('UPDATE '.$pun_db->prefix.'topics SET subject=\''.$pun_db->escape($subject).'\' WHERE id='.$cur_post['tid'].' OR moved_to='.$cur_post['tid']) or error('Unable to update topic', __FILE__, __LINE__, $pun_db->error()); - - // We changed the subject, so we need to take that into account when we update the search words - update_search_index('edit', $id, $message, $subject); - } - else - update_search_index('edit', $id, $message); - - // Update the post - $pun_db->query('UPDATE '.$pun_db->prefix.'posts SET message=\''.$pun_db->escape($message).'\', hide_smilies=\''.$hide_smilies.'\''.$edited_sql.' WHERE id='.$id) or error('Unable to update post', __FILE__, __LINE__, $pun_db->error()); - - pun_redirect('viewtopic.php?pid='.$id.'#p'.$id, $lang_post['Edit redirect']); - } -} - - - -$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_post['Edit post']; -$required_fields = array('req_subject' => $lang_common['Subject'], 'req_message' => $lang_common['Message']); -$focus_element = array('edit', 'req_message'); -require PUN_ROOT.'header.php'; - -$cur_index = 1; - -?> -
    -
    -
    •  » 
    •  » 
    -
    -
    - - -
    -

    -
    -

    -
      -'.$cur_error.''."\n"; -?> -
    -
    -
    -
    - - -
    -

    -
    -
    -
    -
    - -
    -
    -
    -
    -
    - - -
    -

    -
    -
    -
    -
    - - -
    - - - -
    -
    - '.$lang_post['Hide smilies']; - else - $checkboxes[] = '
    -
    -
    - -
    -
    - '."\n\t\t\t\t\t\t\t", $checkboxes).''."\n" ?> -
    -
    -
    - -
    -

    -
    -
    -
    - + +. + + +. + + \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/extern.php --- a/punbb/extern.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,330 +0,0 @@ - - - Show board statistics: - - - And finally some examples using extern.php to output an RSS 0.91 - feed. - - Output the 15 most recently active topics: - http://host.com/extern.php?action=active&type=RSS - - Output the 15 newest topics from forum with ID=2: - http://host.com/extern.php?action=active&type=RSS&fid=2 - - Below you will find some variables you can edit to tailor the - scripts behaviour to your needs. - - -/***********************************************************************/ - -// The maximum number of topics that will be displayed -$show_max_topics = 60; - -// The length at which topic subjects will be truncated (for HTML output) -$max_subject_length = 30; - -/***********************************************************************/ - -// DO NOT EDIT ANYTHING BELOW THIS LINE! (unless you know what you are doing) - - -define('PUN_ROOT', './'); -@include PUN_ROOT.'config.php'; - -// If PUN isn't defined, config.php is missing or corrupt -if (!defined('PUN')) - exit('The file \'config.php\' doesn\'t exist or is corrupt. Please run install.php to install PunBB first.'); - - -// Make sure PHP reports all errors except E_NOTICE -error_reporting(E_ALL ^ E_NOTICE); - -// Turn off magic_quotes_runtime -set_magic_quotes_runtime(0); - - -// Load the functions script -require PUN_ROOT.'include/functions.php'; - -// Load DB abstraction layer and try to connect -require PUN_ROOT.'include/dblayer/common_db.php'; - -// Load cached config -@include PUN_ROOT.'cache/cache_config.php'; -if (!defined('PUN_CONFIG_LOADED')) -{ - require PUN_ROOT.'include/cache.php'; - generate_config_cache(); - require PUN_ROOT.'cache/cache_config.php'; -} - -// Make sure we (guests) have permission to read the forums -$result = $pun_db->query('SELECT g_read_board FROM '.$pun_db->prefix.'groups WHERE g_id=3') or error('Unable to fetch group info', __FILE__, __LINE__, $pun_db->error()); -if ($pun_db->result($result) == '0') - exit('No permission'); - - -// Attempt to load the common language file -@include PUN_ROOT.'lang/'.$pun_config['o_default_lang'].'/common.php'; -if (!isset($lang_common)) - exit('There is no valid language pack \''.$pun_config['o_default_lang'].'\' installed. Please reinstall a language of that name.'); - -// Check if we are to display a maintenance message -if ($pun_config['o_maintenance'] && !defined('PUN_TURN_OFF_MAINT')) - maintenance_message(); - -if (!isset($_GET['action'])) - exit('No parameters supplied. See extern.php for instructions.'); - - -// -// Converts the CDATA end sequence ]]> into ]]> -// -function escape_cdata($str) -{ - return str_replace(']]>', ']]>', $str); -} - - -// -// Show recent discussions -// -if ($_GET['action'] == 'active' || $_GET['action'] == 'new') -{ - $order_by = ($_GET['action'] == 'active') ? 't.last_post' : 't.posted'; - $forum_sql = ''; - - // Was any specific forum ID's supplied? - if (isset($_GET['fid']) && $_GET['fid'] != '') - { - $fids = explode(',', trim($_GET['fid'])); - $fids = array_map('intval', $fids); - - if (!empty($fids)) - $forum_sql = ' AND f.id IN('.implode(',', $fids).')'; - } - - // Any forum ID's to exclude? - if (isset($_GET['nfid']) && $_GET['nfid'] != '') - { - $nfids = explode(',', trim($_GET['nfid'])); - $nfids = array_map('intval', $nfids); - - if (!empty($nfids)) - $forum_sql = ' AND f.id NOT IN('.implode(',', $nfids).')'; - } - - // Should we output this as RSS? - if (isset($_GET['type']) && strtoupper($_GET['type']) == 'RSS') - { - $rss_description = ($_GET['action'] == 'active') ? $lang_common['RSS Desc Active'] : $lang_common['RSS Desc New']; - $url_action = ($_GET['action'] == 'active') ? '&action=new' : ''; - - // Send XML/no cache headers - header('Content-Type: text/xml'); - header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); - - // It's time for some syndication! - echo ''."\r\n"; - echo ''."\r\n"; - echo ''."\r\n"; - echo ''."\r\n"; - echo "\t".''.pun_htmlspecialchars($pun_config['o_board_title']).''."\r\n"; - echo "\t".''.$pun_config['o_base_url'].'/'."\r\n"; - echo "\t".''.pun_htmlspecialchars($rss_description.' '.$pun_config['o_board_title']).''."\r\n"; - echo "\t".'en-us'."\r\n"; - - // Fetch 15 topics - $result = $pun_db->query('SELECT t.id, t.poster, t.subject, t.posted, t.last_post, f.id AS fid, f.forum_name FROM '.$pun_db->prefix.'topics AS t INNER JOIN '.$pun_db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$pun_db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.moved_to IS NULL'.$forum_sql.' ORDER BY '.$order_by.' DESC LIMIT 15') or error('Unable to fetch topic list', __FILE__, __LINE__, $pun_db->error()); - - while ($cur_topic = $pun_db->fetch_assoc($result)) - { - if ($pun_config['o_censoring'] == '1') - $cur_topic['subject'] = censor_words($cur_topic['subject']); - - echo "\t".''."\r\n"; - echo "\t\t".''.pun_htmlspecialchars($cur_topic['subject']).''."\r\n"; - echo "\t\t".''.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].$url_action.''."\r\n"; - echo "\t\t".''.$cur_topic['forum_name'].'
    '."\r\n".$lang_common['Author'].': '.$cur_topic['poster'].'
    '."\r\n".$lang_common['Posted'].': '.date('r', $cur_topic['posted']).'
    '."\r\n".$lang_common['Last post'].': '.date('r', $cur_topic['last_post'])).']]>
    '."\r\n"; - echo "\t".'
    '."\r\n"; - } - - echo '
    '."\r\n"; - echo '
    '; - } - - - // Output regular HTML - else - { - $show = isset($_GET['show']) ? intval($_GET['show']) : 15; - if ($show < 1 || $show > 50) - $show = 15; - - // Fetch $show topics - $result = $pun_db->query('SELECT t.id, t.subject FROM '.$pun_db->prefix.'topics AS t INNER JOIN '.$pun_db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$pun_db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.moved_to IS NULL'.$forum_sql.' ORDER BY '.$order_by.' DESC LIMIT '.$show) or error('Unable to fetch topic list', __FILE__, __LINE__, $pun_db->error()); - - while ($cur_topic = $pun_db->fetch_assoc($result)) - { - if ($pun_config['o_censoring'] == '1') - $cur_topic['subject'] = censor_words($cur_topic['subject']); - - if (pun_strlen($cur_topic['subject']) > $max_subject_length) - $subject_truncated = pun_htmlspecialchars(trim(substr($cur_topic['subject'], 0, ($max_subject_length-5)))).' …'; - else - $subject_truncated = pun_htmlspecialchars($cur_topic['subject']); - - echo '
  • '.$subject_truncated.'
  • '."\n"; - } - } - - return; -} - - -// -// Show users online -// -else if ($_GET['action'] == 'online' || $_GET['action'] == 'online_full') -{ - // Load the index.php language file - require PUN_ROOT.'lang/'.$pun_config['o_default_lang'].'/index.php'; - - // Fetch users online info and generate strings for output - $num_guests = $num_users = 0; - $users = array(); - $result = $pun_db->query('SELECT user_id, ident FROM '.$pun_db->prefix.'online WHERE idle=0 ORDER BY ident', true) or error('Unable to fetch online list', __FILE__, __LINE__, $pun_db->error()); - - while ($pun_user_online = $pun_db->fetch_assoc($result)) - { - if ($pun_user_online['user_id'] > 1) - { - $users[] = ''.pun_htmlspecialchars($pun_user_online['ident']).''; - ++$num_users; - } - else - ++$num_guests; - } - - echo $lang_index['Guests online'].': '.$num_guests.'
    '; - - if ($_GET['action'] == 'online_full') - echo $lang_index['Users online'].': '.implode(', ', $users).'
    '; - else - echo $lang_index['Users online'].': '.$num_users.'
    '; - - return; -} - - -// -// Show board statistics -// -else if ($_GET['action'] == 'stats') -{ - // Load the index.php language file - require PUN_ROOT.'lang/'.$pun_config['o_default_lang'].'/index.php'; - - // Collect some statistics from the database - $result = $pun_db->query('SELECT COUNT(id)-1 FROM '.$pun_db->prefix.'users') or error('Unable to fetch total user count', __FILE__, __LINE__, $pun_db->error()); - $stats['total_users'] = $pun_db->result($result); - - $result = $pun_db->query('SELECT id, username FROM '.$pun_db->prefix.'users ORDER BY registered DESC LIMIT 1') or error('Unable to fetch newest registered user', __FILE__, __LINE__, $pun_db->error()); - $stats['last_user'] = $pun_db->fetch_assoc($result); - - $result = $pun_db->query('SELECT SUM(num_topics), SUM(num_posts) FROM '.$pun_db->prefix.'forums') or error('Unable to fetch topic/post count', __FILE__, __LINE__, $pun_db->error()); - list($stats['total_topics'], $stats['total_posts']) = $pun_db->fetch_row($result); - - echo $lang_index['No of users'].': '.$stats['total_users'].'
    '; - echo $lang_index['Newest user'].': '.pun_htmlspecialchars($stats['last_user']['username']).'
    '; - echo $lang_index['No of topics'].': '.$stats['total_topics'].'
    '; - echo $lang_index['No of posts'].': '.$stats['total_posts']; - - return; -} - - -else - exit('Bad request'); diff -r e3d7322305bf -r 5e1f1e916419 punbb/footer.php --- a/punbb/footer.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,147 +0,0 @@ -', $tpl_temp, $tpl_main); -ob_end_clean(); -// END SUBST - - - -// START SUBST - -ob_start(); - -?> -
    -

    -
    -
    -'."\n\t\t\t\t".'
    '.$lang_common['Search links'].'
    '."\n\t\t\t\t".'
    '.$lang_common['Show recent posts'].'
    '."\n"; - echo "\t\t\t\t".'
    '.$lang_common['Show unanswered posts'].'
    '."\n"; - - if ($pun_config['o_subscriptions'] == '1') - echo "\t\t\t\t".'
    '.$lang_common['Show subscriptions'].'
    '."\n"; - - echo "\t\t\t\t".'
    '.$lang_common['Show your posts'].'
    '."\n\t\t\t".''."\n"; - } - else - { - if ($pun_user['g_search'] == '1') - { - echo "\n\t\t\t".''."\n"; - } - } -} -else if ($footer_style == 'viewforum' || $footer_style == 'viewtopic') -{ - echo "\n\t\t\t".'
    '."\n"; - - // Display the "Jump to" drop list - if ($pun_config['o_quickjump'] == '1') - { - // Load cached quickjump - @include PUN_ROOT.'cache/cache_quickjump_'.$pun_user['g_id'].'.php'; - if (!defined('PUN_QJ_LOADED')) - { - require_once PUN_ROOT.'include/cache.php'; - generate_quickjump_cache($pun_user['g_id']); - require PUN_ROOT.'cache/cache_quickjump_'.$pun_user['g_id'].'.php'; - } - } - - if ($footer_style == 'viewforum' && $is_admmod) - echo "\t\t\t".'

    '.$lang_common['Moderate forum'].'

    '."\n"; - else if ($footer_style == 'viewtopic' && $is_admmod) - { - echo "\t\t\t".'
    '.$lang_topic['Mod controls'].'
    '.$lang_common['Delete posts'].'
    '."\n"; - echo "\t\t\t".'
    '.$lang_common['Move topic'].'
    '."\n"; - - if ($cur_topic['closed'] == '1') - echo "\t\t\t".'
    '.$lang_common['Open topic'].'
    '."\n"; - else - echo "\t\t\t".'
    '.$lang_common['Close topic'].'
    '."\n"; - - if ($cur_topic['sticky'] == '1') - echo "\t\t\t".'
    '.$lang_common['Unstick topic'].'
    '."\n"; - else - echo "\t\t\t".'
    '.$lang_common['Stick topic'].'
    '."\n"; - } - - echo "\t\t\t".'
    '."\n"; -} - -?> -

    Powered by PunBB
    © Copyright 2002–2005 Rickard Andersson

    -[ PunBB time: '.$time_diff.' seconds, '.$pun_db->get_num_queries().' queries executed ]

    '."\n"; -} - -?> -
    -
    -
    -
    -end_transaction(); - -// Display executed queries (if enabled) -if (defined('PUN_SHOW_QUERIES')) - display_saved_queries(); - -$tpl_temp = trim(ob_get_contents()); -$tpl_main = str_replace('', $tpl_temp, $tpl_main); -ob_end_clean(); -// END SUBST - - - -// Close the db connection (and free up any result data) -$pun_db->close(); - -// Spit out the page -exit($tpl_main); diff -r e3d7322305bf -r 5e1f1e916419 punbb/header.php --- a/punbb/header.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,295 +0,0 @@ -tpl_strings['PAGE_NAME'] = $page_title; -$template->add_header(''); - -// Special case - many Enano themes have indented paragraphs -$template->add_header(''); - -// Send no-cache headers -header('Expires: Thu, 21 Jul 1977 07:30:00 GMT'); // When yours truly first set eyes on this world! :) -header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); -header('Cache-Control: post-check=0, pre-check=0', false); -header('Pragma: no-cache'); // For HTTP/1.0 compability - -// Load the template -if (defined('PUN_ADMIN_CONSOLE')) -{ - $inner = '
    -
    - -
    -
    -
    - - -
    - - -
    -
    - - - - - - - -
    -
    '; - - $tpl_main = $template->getHeader() . $inner . $template->getFooter(); -} -else if (defined('PUN_HELP')) -{ - $tpl_main = file_get_contents(PUN_ROOT.'include/template/help.tpl'); -} -else -{ - // $tpl_main = file_get_contents(PUN_ROOT.'include/template/main.tpl'); - $inner = '
    -
    - -
    -
    -
    - - -
    - - -
    -
    - - - - - - - -
    -
    '; - - $tpl_main = $template->getHeader() . $inner . $template->getFooter(); - -} - - -// START SUBST - -while (preg_match('##', $tpl_main, $cur_include)) -{ - if (!file_exists(PUN_ROOT.'include/user/'.$cur_include[1].'.'.$cur_include[2])) - error('Unable to process user include '.htmlspecialchars($cur_include[0]).' from template main.tpl. There is no such file in folder /include/user/'); - - ob_start(); - include PUN_ROOT.'include/user/'.$cur_include[1].'.'.$cur_include[2]; - $tpl_temp = ob_get_contents(); - $tpl_main = str_replace($cur_include[0], $tpl_temp, $tpl_main); - ob_end_clean(); -} -// END SUBST - - -// START SUBST - -$tpl_main = str_replace('', $lang_common['lang_direction'], $tpl_main); -// END SUBST - - - -// START SUBST - -$tpl_main = str_replace('', $lang_common['lang_encoding'], $tpl_main); -// END SUBST - - -// START SUBST - -ob_start(); - -// Is this a page that we want search index spiders to index? -if (!defined('PUN_ALLOW_INDEX')) - echo ''."\n"; - -?> - -'."\n"; - -if (isset($required_fields)) -{ - // Output JavaScript to validate form (make sure required fields are filled out) - -?> - -'; - -$tpl_temp = trim(ob_get_contents()); -$tpl_main = str_replace('', $tpl_temp, $tpl_main); -ob_end_clean(); -// END SUBST - - - -// START SUBST - -if (isset($focus_element)) -{ - $tpl_main = str_replace('', '', $tpl_main); -} -// END SUBST - - - -// START SUBST - -$tpl_main = str_replace('', htmlspecialchars(basename($_SERVER['PHP_SELF'], '.php')), $tpl_main); -// END SUBST - - - -// START SUBST - -$tpl_main = str_replace('', '

    '.pun_htmlspecialchars($pun_config['o_board_title']).'

    ', $tpl_main); -// END SUBST - - - -// START SUBST - -$tpl_main = str_replace('', '

    '.$pun_config['o_board_desc'].'

    ', $tpl_main); -// END SUBST - - - -// START SUBST - -$tpl_main = str_replace('','
    '."\n\t\t\t". generate_navlinks()."\n\t\t".'
    ', $tpl_main); -// END SUBST - - - -// START SUBST - -if ($pun_user['is_guest']) - $tpl_temp = '
    '."\n\t\t\t".'

    '.$lang_common['Not logged in'].'

    '."\n\t\t".'
    '; -else -{ - $tpl_temp = '
    '."\n\t\t\t".'
      '."\n\t\t\t\t".'
    • '.$lang_common['Logged in as'].' '.pun_htmlspecialchars($pun_user['username']).'
    • '."\n\t\t\t\t".'
    • '.$lang_common['Last visit'].': '.format_time($pun_user['last_visit']).'
    • '; - - if ($pun_user['g_id'] >= USER_LEVEL_MEMBER) - { - $result_header = $pun_db->query('SELECT COUNT(id) FROM '.$pun_db->prefix.'reports WHERE zapped IS NULL') or error('Unable to fetch reports info', __FILE__, __LINE__, $pun_db->error()); - - if ($pun_db->result($result_header)) - $tpl_temp .= "\n\t\t\t\t".''; - - if ($pun_config['o_maintenance'] == '1') - $tpl_temp .= "\n\t\t\t\t".''; - } - - if (in_array(basename($_SERVER['PHP_SELF']), array('index.php', 'search.php'))) - $tpl_temp .= "\n\t\t\t".'
    '."\n\t\t\t".''."\n\t\t\t".'
    '."\n\t\t".'
    '; - else - $tpl_temp .= "\n\t\t\t".''."\n\t\t\t".'
    '."\n\t\t".''; -} - -$tpl_main = str_replace('', $tpl_temp, $tpl_main); -// END SUBST - - -// START SUBST - -if ($pun_config['o_announcement'] == '1') -{ - ob_start(); - -?> -
    -

    -
    -
    -
    -
    -
    -
    -', $tpl_temp, $tpl_main); - ob_end_clean(); -} -else - $tpl_main = str_replace('', '', $tpl_main); -// END SUBST - - -// START SUBST - -ob_start(); - - -define('PUN_HEADER', 1); diff -r e3d7322305bf -r 5e1f1e916419 punbb/help.php --- a/punbb/help.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,160 +0,0 @@ - -

    -
    -
    -


    -

    -
    -
    -

    -
    -


    -
    - [b][/b]
    - [u][/u]
    - [i][/i]
    - [color=#FF0000][/color]
    - [color=blue][/color] -
    -
    -

    -
    -


    -
    - [url=][/url]
    - [url][/url]
    - [email]myname@mydomain.com[/email] myname@mydomain.com
    - [email=myname@mydomain.com][/email]

    -
    -

    -
    [img]http://www.punbb.org/img/small_logo.png[/img] http://www.punbb.org/img/small_logo.png
    -
    -

    -
    -
    -

    -     [quote=James][/quote]

    -

    -
    -

    James :

    -
    -
    -

    -     [quote][/quote]

    -

    -
    -

    -
    -
    -
    -

    -
    -
    -

    -     [code][/code]

    -

    -
    -

    :

    -
    -
    -
    -

    -
    -
    -

    -     [b][u][/u][/b]

    -
    -
    -

    -
    -
    -

    -
    '."\n"; -} - -?> -
    -
    -
    - + Allow from all + diff -r e3d7322305bf -r 5e1f1e916419 punbb/img/avatars/index.html --- a/punbb/img/avatars/index.html Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - -. - - -. - - \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/img/index.html --- a/punbb/img/index.html Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - -. - - -. - - \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/img/logo.png Binary file punbb/img/logo.png has changed diff -r e3d7322305bf -r 5e1f1e916419 punbb/img/smilies/big_smile.png Binary file punbb/img/smilies/big_smile.png has changed diff -r e3d7322305bf -r 5e1f1e916419 punbb/img/smilies/cool.png Binary file punbb/img/smilies/cool.png has changed diff -r e3d7322305bf -r 5e1f1e916419 punbb/img/smilies/hmm.png Binary file punbb/img/smilies/hmm.png has changed diff -r e3d7322305bf -r 5e1f1e916419 punbb/img/smilies/index.html --- a/punbb/img/smilies/index.html Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - -. - - -. - - \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/img/smilies/lol.png Binary file punbb/img/smilies/lol.png has changed diff -r e3d7322305bf -r 5e1f1e916419 punbb/img/smilies/mad.png Binary file punbb/img/smilies/mad.png has changed diff -r e3d7322305bf -r 5e1f1e916419 punbb/img/smilies/neutral.png Binary file punbb/img/smilies/neutral.png has changed diff -r e3d7322305bf -r 5e1f1e916419 punbb/img/smilies/roll.png Binary file punbb/img/smilies/roll.png has changed diff -r e3d7322305bf -r 5e1f1e916419 punbb/img/smilies/sad.png Binary file punbb/img/smilies/sad.png has changed diff -r e3d7322305bf -r 5e1f1e916419 punbb/img/smilies/smile.png Binary file punbb/img/smilies/smile.png has changed diff -r e3d7322305bf -r 5e1f1e916419 punbb/img/smilies/tongue.png Binary file punbb/img/smilies/tongue.png has changed diff -r e3d7322305bf -r 5e1f1e916419 punbb/img/smilies/wink.png Binary file punbb/img/smilies/wink.png has changed diff -r e3d7322305bf -r 5e1f1e916419 punbb/img/smilies/yikes.png Binary file punbb/img/smilies/yikes.png has changed diff -r e3d7322305bf -r 5e1f1e916419 punbb/include/cache.php --- a/punbb/include/cache.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,205 +0,0 @@ - $v) - { - if (is_numeric($k)) - $output .= $indent.' '.$k.' => '; - else - $output .= $indent.' \''.str_replace('\'', '\\\'', str_replace('\\', '\\\\', $k)).'\' => '; - - if (is_array($v)) - $output .= var_export($v, true, $indent.' '); - else - { - if (gettype($v) != 'string' && !empty($v)) - $output .= $v.','."\n"; - else - $output .= '\''.str_replace('\'', '\\\'', str_replace('\\', '\\\\', $v)).'\','."\n"; - } - } - - $output .= ($indent != '') ? $indent.'),'."\n" : ')'; - } - else - $output = $args[0]; - - if ($args[1] == true) - return $output; - else - echo $output; - } -} - - -// -// Generate the config cache PHP script -// -function generate_config_cache() -{ - global $pun_db; - - // Get the forum config from the DB - $result = $pun_db->query('SELECT * FROM '.$pun_db->prefix.'config', true) or error('Unable to fetch forum config', __FILE__, __LINE__, $pun_db->error()); - while ($cur_config_item = $pun_db->fetch_row($result)) - $output[$cur_config_item[0]] = $cur_config_item[1]; - - // Output config as PHP code - $fh = @fopen(PUN_ROOT.'cache/cache_config.php', 'wb'); - if (!$fh) - error('Unable to write configuration cache file to cache directory. Please make sure PHP has write access to the directory \'cache\'', __FILE__, __LINE__); - - fwrite($fh, ''); - - fclose($fh); -} - - -// -// Generate the bans cache PHP script -// -function generate_bans_cache() -{ - global $pun_db; - - // Get the ban list from the DB - $result = $pun_db->query('SELECT * FROM '.$pun_db->prefix.'bans', true) or error('Unable to fetch ban list', __FILE__, __LINE__, $pun_db->error()); - - $output = array(); - while ($cur_ban = $pun_db->fetch_assoc($result)) - $output[] = $cur_ban; - - // Output ban list as PHP code - $fh = @fopen(PUN_ROOT.'cache/cache_bans.php', 'wb'); - if (!$fh) - error('Unable to write bans cache file to cache directory. Please make sure PHP has write access to the directory \'cache\'', __FILE__, __LINE__); - - fwrite($fh, ''); - - fclose($fh); -} - - -// -// Generate the ranks cache PHP script -// -function generate_ranks_cache() -{ - global $pun_db; - - // Get the rank list from the DB - $result = $pun_db->query('SELECT * FROM '.$pun_db->prefix.'ranks ORDER BY min_posts', true) or error('Unable to fetch rank list', __FILE__, __LINE__, $pun_db->error()); - - $output = array(); - while ($cur_rank = $pun_db->fetch_assoc($result)) - $output[] = $cur_rank; - - // Output ranks list as PHP code - $fh = @fopen(PUN_ROOT.'cache/cache_ranks.php', 'wb'); - if (!$fh) - error('Unable to write ranks cache file to cache directory. Please make sure PHP has write access to the directory \'cache\'', __FILE__, __LINE__); - - fwrite($fh, ''); - - fclose($fh); -} - - -// -// Generate quickjump cache PHP scripts -// -function generate_quickjump_cache($group_id = false) -{ - global $pun_db, $lang_common, $pun_user; - - // If a group_id was supplied, we generate the quickjump cache for that group only - if ($group_id !== false) - $groups[0] = $group_id; - else - { - // A group_id was now supplied, so we generate the quickjump cache for all groups - $result = $pun_db->query('SELECT g_id FROM '.$pun_db->prefix.'groups') or error('Unable to fetch user group list', __FILE__, __LINE__, $pun_db->error()); - $num_groups = $pun_db->num_rows($result); - - for ($i = 0; $i < $num_groups; ++$i) - $groups[] = $pun_db->result($result, $i); - } - - // Loop through the groups in $groups and output the cache for each of them - while (list(, $group_id) = @each($groups)) - { - // Output quickjump as PHP code - $fh = @fopen(PUN_ROOT.'cache/cache_quickjump_'.$group_id.'.php', 'wb'); - if (!$fh) - error('Unable to write quickjump cache file to cache directory. Please make sure PHP has write access to the directory \'cache\'', __FILE__, __LINE__); - - $output = ''; - $output .= "\t\t\t\t".'
    '."\n\t\t\t\t\t".'
    '."\n\t\t\t\t".'
    '."\n"; - - fwrite($fh, $output); - - fclose($fh); - } -} diff -r e3d7322305bf -r 5e1f1e916419 punbb/include/common.php --- a/punbb/include/common.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,163 +0,0 @@ -install.php to install PunBB first.'); - -// Record the start time (will be used to calculate the generation time for the page) - -function get_microtime() -{ - list($usec, $sec) = explode(' ', microtime()); - return ((float)$usec + (float)$sec); -} - -$pun_start = get_microtime(); - -// Make sure PHP reports all errors except E_NOTICE. PunBB supports E_ALL, but a lot of scripts it may interact with, do not. -error_reporting(E_ALL); - -// Turn off magic_quotes_runtime -set_magic_quotes_runtime(0); - -/* -Disabled for Enano - this is already done by Enano's API -// Strip slashes from GET/POST/COOKIE (if magic_quotes_gpc is enabled) -if (get_magic_quotes_gpc()) -{ - function stripslashes_array($array) - { - return is_array($array) ? array_map('stripslashes_array', $array) : stripslashes($array); - } - - $_GET = stripslashes_array($_GET); - $_POST = stripslashes_array($_POST); - $_COOKIE = stripslashes_array($_COOKIE); -} -*/ - -// Seed the random number generator -mt_srand((double)microtime()*1000000); - -// If a cookie name is not specified in config.php, we use the default (punbb_cookie) -if (empty($cookie_name)) - $cookie_name = 'punbb_cookie'; - -// Define a few commonly used constants -define('PUN_UNVERIFIED', 32000); -define('PUN_ADMIN', USER_LEVEL_ADMIN); -define('PUN_MOD', USER_LEVEL_MOD); -define('PUN_GUEST', USER_LEVEL_GUEST); -define('PUN_MEMBER', USER_LEVEL_MEMBER); - -/* -Skip this - Enano's API will handle it -// Load DB abstraction layer and connect -require PUN_ROOT.'include/dblayer/common_db.php'; - -// Start a transaction -$pun_db->start_transaction(); -*/ - -$GLOBALS['pun_db'] = new PunBB_DBAL_Enano(); -$GLOBALS['pun_config'] = array(); - -$pun_config =& $GLOBALS['pun_config']; - -// Load cached config -@include PUN_ROOT.'cache/cache_config.php'; -if (!defined('PUN_CONFIG_LOADED')) -{ - require PUN_ROOT.'include/cache.php'; - generate_config_cache(); - require PUN_ROOT.'cache/cache_config.php'; -} - -// Enable output buffering -if (!defined('PUN_DISABLE_BUFFERING')) -{ - // For some very odd reason, "Norton Internet Security" unsets this - $_SERVER['HTTP_ACCEPT_ENCODING'] = isset($_SERVER['HTTP_ACCEPT_ENCODING']) ? $_SERVER['HTTP_ACCEPT_ENCODING'] : ''; - - // Should we use gzip output compression? - if ($pun_config['o_gzip'] && extension_loaded('zlib') && (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false || strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') !== false)) - ob_start('ob_gzhandler'); - else - ob_start(); -} - -// Check/update/set cookie and fetch user info -$GLOBALS['pun_user'] = array(); -$pun_user =& $GLOBALS['pun_user']; -check_cookie($pun_user); - -// Attempt to load the common language file -@include PUN_ROOT.'lang/'.$pun_user['language'].'/common.php'; -if (!isset($lang_common)) - exit('There is no valid language pack \''.pun_htmlspecialchars($pun_user['language']).'\' installed. Please reinstall a language of that name.'); - -// Check if we are to display a maintenance message -if ($pun_config['o_maintenance'] && $pun_user['g_id'] < PUN_ADMIN && !defined('PUN_TURN_OFF_MAINT')) - maintenance_message(); - - -// Load cached bans -/* -// // DISABLED IN ENANO // // -// Enano has its own ban list // -@include PUN_ROOT.'cache/cache_bans.php'; -if (!defined('PUN_BANS_LOADED')) -{ - require_once PUN_ROOT.'include/cache.php'; - generate_bans_cache(); - require PUN_ROOT.'cache/cache_bans.php'; -} - -// Check if current user is banned -check_bans(); -*/ - -// Update online list -update_users_online(); - diff -r e3d7322305bf -r 5e1f1e916419 punbb/include/common_admin.php --- a/punbb/include/common_admin.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,149 +0,0 @@ - -
    -
    -

    menu

    - -read()) !== false) - { - $prefix = substr($entry, 0, strpos($entry, '_')); - $suffix = substr($entry, strlen($entry) - 4); - - if ($suffix == '.php' && ((!$is_admin && $prefix == 'AMP') || ($is_admin && ($prefix == 'AP' || $prefix == 'AMP')))) - $plugins[] = array(substr(substr($entry, strpos($entry, '_') + 1), 0, -4), $entry); - } - $d->close(); - - // Did we find any plugins? - if (!empty($plugins)) - { - -?> -

    Plugins

    - - -
    - -query('SELECT id FROM '.$pun_db->prefix.'topics WHERE forum_id='.$forum_id.$extra_sql, true) or error('Unable to fetch topics', __FILE__, __LINE__, $pun_db->error()); - - $topic_ids = ''; - while ($row = $pun_db->fetch_row($result)) - $topic_ids .= (($topic_ids != '') ? ',' : '').$row[0]; - - if ($topic_ids != '') - { - // Fetch posts to prune - $result = $pun_db->query('SELECT id FROM '.$pun_db->prefix.'posts WHERE topic_id IN('.$topic_ids.')', true) or error('Unable to fetch posts', __FILE__, __LINE__, $pun_db->error()); - - $post_ids = ''; - while ($row = $pun_db->fetch_row($result)) - $post_ids .= (($post_ids != '') ? ',' : '').$row[0]; - - if ($post_ids != '') - { - // Delete topics - $pun_db->query('DELETE FROM '.$pun_db->prefix.'topics WHERE id IN('.$topic_ids.')') or error('Unable to prune topics', __FILE__, __LINE__, $pun_db->error()); - // Delete subscriptions - $pun_db->query('DELETE FROM '.$pun_db->prefix.'subscriptions WHERE topic_id IN('.$topic_ids.')') or error('Unable to prune subscriptions', __FILE__, __LINE__, $pun_db->error()); - // Delete posts - $pun_db->query('DELETE FROM '.$pun_db->prefix.'posts WHERE id IN('.$post_ids.')') or error('Unable to prune posts', __FILE__, __LINE__, $pun_db->error()); - - // We removed a bunch of posts, so now we have to update the search index - require_once PUN_ROOT.'include/search_idx.php'; - strip_search_index($post_ids); - } - } -} diff -r e3d7322305bf -r 5e1f1e916419 punbb/include/dblayer/common_db.php --- a/punbb/include/dblayer/common_db.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -prefix = table_prefix . 'pun_'; + $this->link_id =& $db->_conn; + + // Setup the client-server character set (UTF-8) + if (!defined('PUN_NO_SET_NAMES')) + mysql_query('SET NAMES \'utf8\'', $this->link_id) or error(__FILE__, __LINE__); + } + + + function start_transaction() + { + return; + } + + + function end_transaction() + { + return; + } + + + function query($sql, $unbuffered = false) + { + if (strlen($sql) > 140000) + exit('Insane query. Aborting.'); + + if (defined('PUN_SHOW_QUERIES')) + $q_start = get_microtime(); + + if ($unbuffered) + $this->query_result = @mysql_unbuffered_query($sql, $this->link_id); + else + $this->query_result = @mysql_query($sql, $this->link_id); + + if ($this->query_result) + { + if (defined('PUN_SHOW_QUERIES')) + $this->saved_queries[] = array($sql, sprintf('%.5f', get_microtime() - $q_start)); + + ++$this->num_queries; + + return $this->query_result; + } + else + { + if (defined('PUN_SHOW_QUERIES')) + $this->saved_queries[] = array($sql, 0); + + return false; + } + } + + + function query_build($query, $unbuffered = false) + { + $sql = ''; + + if (isset($query['SELECT'])) + { + $sql = 'SELECT '.$query['SELECT'].' FROM '.(isset($query['PARAMS']['NO_PREFIX']) ? '' : $this->prefix).$query['FROM']; + + if (isset($query['JOINS'])) + { + foreach ($query['JOINS'] as $cur_join) + $sql .= ' '.key($cur_join).' '.(isset($query['PARAMS']['NO_PREFIX']) ? '' : $this->prefix).current($cur_join).' ON '.$cur_join['ON']; + } + + if (!empty($query['WHERE'])) + $sql .= ' WHERE '.$query['WHERE']; + if (!empty($query['GROUP BY'])) + $sql .= ' GROUP BY '.$query['GROUP BY']; + if (!empty($query['HAVING'])) + $sql .= ' HAVING '.$query['HAVING']; + if (!empty($query['ORDER BY'])) + $sql .= ' ORDER BY '.$query['ORDER BY']; + if (!empty($query['LIMIT'])) + $sql .= ' LIMIT '.$query['LIMIT']; + } + else if (isset($query['INSERT'])) + { + $sql = 'INSERT INTO '.(isset($query['PARAMS']['NO_PREFIX']) ? '' : $this->prefix).$query['INTO']; + + if (!empty($query['INSERT'])) + $sql .= ' ('.$query['INSERT'].')'; + + $sql .= ' VALUES('.$query['VALUES'].')'; + } + else if (isset($query['UPDATE'])) + { + $query['UPDATE'] = (isset($query['PARAMS']['NO_PREFIX']) ? '' : $this->prefix).$query['UPDATE']; + + if (isset($query['PARAMS']['LOW_PRIORITY'])) + $query['UPDATE'] = 'LOW_PRIORITY '.$query['UPDATE']; + + $sql = 'UPDATE '.$query['UPDATE'].' SET '.$query['SET']; + + if (!empty($query['WHERE'])) + $sql .= ' WHERE '.$query['WHERE']; + } + else if (isset($query['DELETE'])) + { + $sql = 'DELETE FROM '.(isset($query['PARAMS']['NO_PREFIX']) ? '' : $this->prefix).$query['DELETE']; + + if (!empty($query['WHERE'])) + $sql .= ' WHERE '.$query['WHERE']; + } + else if (isset($query['REPLACE'])) + { + $sql = 'REPLACE INTO '.(isset($query['PARAMS']['NO_PREFIX']) ? '' : $this->prefix).$query['INTO']; + + if (!empty($query['REPLACE'])) + $sql .= ' ('.$query['REPLACE'].')'; + + $sql .= ' VALUES('.$query['VALUES'].')'; + } + + return $this->query($sql, $unbuffered); + } + + function result($query_id = 0, $row = 0) + { + return ($query_id) ? @mysql_result($query_id, $row) : false; + } + + + function fetch_assoc($query_id = 0) + { + return ($query_id) ? @mysql_fetch_assoc($query_id) : false; + } + + + function fetch_row($query_id = 0) + { + return ($query_id) ? @mysql_fetch_row($query_id) : false; + } + + + function num_rows($query_id = 0) + { + return ($query_id) ? @mysql_num_rows($query_id) : false; + } + + + function affected_rows() + { + return ($this->link_id) ? @mysql_affected_rows($this->link_id) : false; + } + + + function insert_id() + { + return ($this->link_id) ? @mysql_insert_id($this->link_id) : false; + } + + + function get_num_queries() + { + return $this->num_queries; + } + + + function get_saved_queries() + { + return $this->saved_queries; + } + + + function free_result($query_id = false) + { + return ($query_id) ? @mysql_free_result($query_id) : false; + } + + + function escape($str) + { + if (is_array($str)) + return ''; + else if (function_exists('mysql_real_escape_string')) + return mysql_real_escape_string($str, $this->link_id); + else + return mysql_escape_string($str); + } + + + function error() + { + $result['error_sql'] = @current(@end($this->saved_queries)); + $result['error_no'] = @mysql_errno($this->link_id); + $result['error_msg'] = @mysql_error($this->link_id); + + return $result; + } + + + function close() + { + return true; + } + + + function table_exists($table_name) + { + $result = $this->query('SHOW TABLES LIKE \''.$this->escape($table_name).'\''); + return $this->num_rows($result) > 0; + } + + + function field_exists($table_name, $field_name) + { + $result = $this->query('SHOW COLUMNS FROM '.$table_name.' LIKE \''.$this->escape($field_name).'\''); + return $this->num_rows($result) > 0; + } + + + function index_exists($table_name, $index_name) + { + $exists = false; + + $result = $this->query('SHOW INDEX FROM '.$table_name); + while ($cur_index = $this->fetch_assoc($result)) + { + if ($cur_index['Key_name'] == $index_name) + { + $exists = true; + break; + } + } + + return $exists; + } + + + function add_field($table_name, $field_name, $field_type, $allow_null, $default_value = null, $after_field = null) + { + if ($this->field_exists($table_name, $field_name)) + return; + + if ($default_value !== null && !is_int($default_value) && !is_float($default_value)) + $default_value = '\''.$this->escape($default_value).'\''; + + $this->query('ALTER TABLE '.$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__); + } + + + function drop_field($table_name, $field_name) + { + if (!$this->field_exists($table_name, $field_name)) + return; + + $this->query('ALTER TABLE '.$table_name.' DROP '.$field_name) or error(__FILE__, __LINE__); + } +} diff -r e3d7322305bf -r 5e1f1e916419 punbb/include/dblayer/enano_pgsql.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/include/dblayer/enano_pgsql.php Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,342 @@ +prefix = table_prefix . 'pun_'; + $this->link_id =& $db->_conn; + } + + + function start_transaction() + { + ++$this->in_transaction; + + return (@pg_query($this->link_id, 'BEGIN')) ? true : false; + } + + + function end_transaction() + { + --$this->in_transaction; + + if (@pg_query($this->link_id, 'COMMIT')) + return true; + else + { + @pg_query($this->link_id, 'ROLLBACK'); + return false; + } + } + + + function query($sql, $unbuffered = false) // $unbuffered is ignored since there is no pgsql_unbuffered_query() + { + if (strlen($sql) > 140000) + exit('Insane query. Aborting.'); + + if (strrpos($sql, 'LIMIT') !== false) + $sql = preg_replace('#LIMIT ([0-9]+),([ 0-9]+)#', 'LIMIT \\2 OFFSET \\1', $sql); + + if (defined('PUN_SHOW_QUERIES')) + $q_start = get_microtime(); + + @pg_send_query($this->link_id, $sql); + $this->query_result = @pg_get_result($this->link_id); + + if (pg_result_status($this->query_result) != PGSQL_FATAL_ERROR) + { + if (defined('PUN_SHOW_QUERIES')) + $this->saved_queries[] = array($sql, sprintf('%.5f', get_microtime() - $q_start)); + + ++$this->num_queries; + + $this->last_query_text[$this->query_result] = $sql; + + return $this->query_result; + } + else + { + if (defined('PUN_SHOW_QUERIES')) + $this->saved_queries[] = array($sql, 0); + + $this->error_msg = @pg_result_error($this->query_result); + + if ($this->in_transaction) + @pg_query($this->link_id, 'ROLLBACK'); + + --$this->in_transaction; + + return false; + } + } + + + function query_build($query, $unbuffered = false) + { + $sql = ''; + + if (isset($query['SELECT'])) + { + $sql = 'SELECT '.$query['SELECT'].' FROM '.(isset($query['PARAMS']['NO_PREFIX']) ? '' : $this->prefix).$query['FROM']; + + if (isset($query['JOINS'])) + { + foreach ($query['JOINS'] as $cur_join) + $sql .= ' '.key($cur_join).' '.(isset($query['PARAMS']['NO_PREFIX']) ? '' : $this->prefix).current($cur_join).' ON '.$cur_join['ON']; + } + + if (!empty($query['WHERE'])) + $sql .= ' WHERE '.$query['WHERE']; + if (!empty($query['GROUP BY'])) + $sql .= ' GROUP BY '.$query['GROUP BY']; + if (!empty($query['HAVING'])) + $sql .= ' HAVING '.$query['HAVING']; + if (!empty($query['ORDER BY'])) + $sql .= ' ORDER BY '.$query['ORDER BY']; + if (!empty($query['LIMIT'])) + $sql .= ' LIMIT '.$query['LIMIT']; + } + else if (isset($query['INSERT'])) + { + $sql = 'INSERT INTO '.(isset($query['PARAMS']['NO_PREFIX']) ? '' : $this->prefix).$query['INTO']; + + if (!empty($query['INSERT'])) + $sql .= ' ('.$query['INSERT'].')'; + + $sql .= ' VALUES('.$query['VALUES'].')'; + } + else if (isset($query['UPDATE'])) + { + $query['UPDATE'] = (isset($query['PARAMS']['NO_PREFIX']) ? '' : $this->prefix).$query['UPDATE']; + + $sql = 'UPDATE '.$query['UPDATE'].' SET '.$query['SET']; + + if (!empty($query['WHERE'])) + $sql .= ' WHERE '.$query['WHERE']; + } + else if (isset($query['DELETE'])) + { + $sql = 'DELETE FROM '.(isset($query['PARAMS']['NO_PREFIX']) ? '' : $this->prefix).$query['DELETE']; + + if (!empty($query['WHERE'])) + $sql .= ' WHERE '.$query['WHERE']; + } + + return $this->query($sql, $unbuffered); + } + + + function result($query_id = 0, $row = 0) + { + return ($query_id) ? @pg_fetch_result($query_id, $row, 0) : false; + } + + + function fetch_assoc($query_id = 0) + { + return ($query_id) ? @pg_fetch_assoc($query_id) : false; + } + + + function fetch_row($query_id = 0) + { + return ($query_id) ? @pg_fetch_row($query_id) : false; + } + + + function num_rows($query_id = 0) + { + return ($query_id) ? @pg_num_rows($query_id) : false; + } + + + function affected_rows() + { + return ($this->query_result) ? @pg_affected_rows($this->query_result) : false; + } + + + function insert_id() + { + $query_id = $this->query_result; + + if ($query_id && $this->last_query_text[$query_id] != '') + { + if (preg_match('/^INSERT INTO ([a-z0-9\_\-]+)/is', $this->last_query_text[$query_id], $table_name)) + { + // Hack (don't ask) + if (substr($table_name[1], -6) == 'groups') + $table_name[1] .= '_g'; + + $temp_q_id = @pg_query($this->link_id, 'SELECT currval(\''.$table_name[1].'_id_seq\')'); + return ($temp_q_id) ? intval(@pg_fetch_result($temp_q_id, 0)) : false; + } + } + + return false; + } + + + function get_num_queries() + { + return $this->num_queries; + } + + + function get_saved_queries() + { + return $this->saved_queries; + } + + + function free_result($query_id = false) + { + if (!$query_id) + $query_id = $this->query_result; + + return ($query_id) ? @pg_free_result($query_id) : false; + } + + + function escape($str) + { + return is_array($str) ? '' : pg_escape_string($str); + } + + + function error() + { + $result['error_sql'] = @current(@end($this->saved_queries)); + $result['error_no'] = false; +/* + if (!empty($this->query_result)) + { + $result['error_msg'] = trim(@pg_result_error($this->query_result)); + if ($result['error_msg'] != '') + return $result; + } + + $result['error_msg'] = (!empty($this->link_id)) ? trim(@pg_last_error($this->link_id)) : trim(@pg_last_error()); +*/ + $result['error_msg'] = $this->error_msg; + + return $result; + } + + + function close() + { + if ($this->link_id) + { + if ($this->in_transaction) + { + if (defined('PUN_SHOW_QUERIES')) + $this->saved_queries[] = array('COMMIT', 0); + + @pg_query($this->link_id, 'COMMIT'); + } + + if ($this->query_result) + @pg_free_result($this->query_result); + } + return true; + } + + + function table_exists($table_name) + { + $result = $this->query('SELECT 1 FROM pg_class WHERE relname = \''.$this->escape($table_name).'\''); + return $this->num_rows($result) > 0; + } + + + function field_exists($table_name, $field_name) + { + $result = $this->query('SELECT 1 FROM pg_class c INNER JOIN pg_attribute a ON a.attrelid = c.oid WHERE c.relname = \''.$this->escape($table_name).'\' AND a.attname = \''.$this->escape($field_name).'\''); + return $this->num_rows($result) > 0; + } + + + function index_exists($table_name, $index_name) + { + $result = $this->query('SELECT 1 FROM pg_index i INNER JOIN pg_class c1 ON c1.oid = i.indrelid INNER JOIN pg_class c2 ON c2.oid = i.indexrelid WHERE c1.relname = \''.$this->escape($table_name).'\' AND c2.relname = \''.$this->escape($index_name).'\''); + return $this->num_rows($result) > 0; + } + + + function add_field($table_name, $field_name, $field_type, $allow_null, $default_value = null, $after_field = null) + { + if ($this->field_exists($table_name, $field_name)) + return; + + $field_type = str_replace(array('TINY', 'FLOAT'), array('SMALL', 'REAL'), strtoupper($field_type)); + $field_type = preg_replace('/(.*?INT)(\([0-9]+)\)/', '$1', $field_type); + + $this->query('ALTER TABLE '.$table_name.' ADD '.$field_name.' '.$field_type) or error(__FILE__, __LINE__); + + if ($default_value !== null) + { + if (!is_int($default_value) && !is_float($default_value)) + $default_value = '\''.$this->escape($default_value).'\''; + + $this->query('ALTER TABLE '.$table_name.' ALTER '.$field_name.' SET DEFAULT '.$default_value) or error(__FILE__, __LINE__); + $this->query('UPDATE '.$table_name.' SET '.$field_name.'='.$default_value) or error(__FILE__, __LINE__); + } + + if (!$allow_null) + $this->query('ALTER TABLE '.$table_name.' ALTER '.$field_name.' SET NOT NULL') or error(__FILE__, __LINE__); + } + + + function drop_field($table_name, $field_name) + { + if (!$this->field_exists($table_name, $field_name)) + return; + + $this->query('ALTER TABLE '.$table_name.' DROP '.$field_name) or error(__FILE__, __LINE__); + } +} diff -r e3d7322305bf -r 5e1f1e916419 punbb/include/dblayer/index.html --- a/punbb/include/dblayer/index.html Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - -. - - -. - - \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/include/dblayer/mysql.php --- a/punbb/include/dblayer/mysql.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,190 +0,0 @@ -prefix = $db_prefix; - - if ($p_connect) - $this->link_id = @mysql_pconnect($db_host, $db_username, $db_password); - else - $this->link_id = @mysql_connect($db_host, $db_username, $db_password); - - if ($this->link_id) - { - if (@mysql_select_db($db_name, $this->link_id)) - return $this->link_id; - else - error('Unable to select database. MySQL reported: '.mysql_error(), __FILE__, __LINE__); - } - else - error('Unable to connect to MySQL server. MySQL reported: '.mysql_error(), __FILE__, __LINE__); - } - - - function start_transaction() - { - return; - } - - - function end_transaction() - { - return; - } - - - function query($sql, $unbuffered = false) - { - if (defined('PUN_SHOW_QUERIES')) - $q_start = get_microtime(); - - if ($unbuffered) - $this->query_result = @mysql_unbuffered_query($sql, $this->link_id); - else - $this->query_result = @mysql_query($sql, $this->link_id); - - if ($this->query_result) - { - if (defined('PUN_SHOW_QUERIES')) - $this->saved_queries[] = array($sql, sprintf('%.5f', get_microtime() - $q_start)); - - ++$this->num_queries; - - return $this->query_result; - } - else - { - if (defined('PUN_SHOW_QUERIES')) - $this->saved_queries[] = array($sql, 0); - - return false; - } - } - - - function result($query_id = 0, $row = 0) - { - return ($query_id) ? @mysql_result($query_id, $row) : false; - } - - - function fetch_assoc($query_id = 0) - { - return ($query_id) ? @mysql_fetch_assoc($query_id) : false; - } - - - function fetch_row($query_id = 0) - { - return ($query_id) ? @mysql_fetch_row($query_id) : false; - } - - - function num_rows($query_id = 0) - { - return ($query_id) ? @mysql_num_rows($query_id) : false; - } - - - function affected_rows() - { - return ($this->link_id) ? @mysql_affected_rows($this->link_id) : false; - } - - - function insert_id() - { - return ($this->link_id) ? @mysql_insert_id($this->link_id) : false; - } - - - function get_num_queries() - { - return $this->num_queries; - } - - - function get_saved_queries() - { - return $this->saved_queries; - } - - - function free_result($query_id = false) - { - return ($query_id) ? @mysql_free_result($query_id) : false; - } - - - function escape($str) - { - if (is_array($str)) - return ''; - else if (function_exists('mysql_real_escape_string')) - return mysql_real_escape_string($str, $this->link_id); - else - return mysql_escape_string($str); - } - - - function error() - { - $result['error_sql'] = @current(@end($this->saved_queries)); - $result['error_no'] = @mysql_errno($this->link_id); - $result['error_msg'] = @mysql_error($this->link_id); - - return $result; - } - - - function close() - { - if ($this->link_id) - { - if ($this->query_result) - @mysql_free_result($this->query_result); - - return @mysql_close($this->link_id); - } - else - return false; - } -} diff -r e3d7322305bf -r 5e1f1e916419 punbb/include/dblayer/mysqli.php --- a/punbb/include/dblayer/mysqli.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,188 +0,0 @@ -prefix = $db_prefix; - - // Was a custom port supplied with $db_host? - if (strpos($db_host, ':') !== false) - list($db_host, $db_port) = explode(':', $db_host); - - if (isset($db_port)) - $this->link_id = @mysqli_connect($db_host, $db_username, $db_password, $db_name, $db_port); - else - $this->link_id = @mysqli_connect($db_host, $db_username, $db_password, $db_name); - - if (!$this->link_id) - error('Unable to connect to MySQL and select database. MySQL reported: '.mysqli_connect_error(), __FILE__, __LINE__); - } - - - function start_transaction() - { - return; - } - - - function end_transaction() - { - return; - } - - - function query($sql, $unbuffered = false) - { - if (defined('PUN_SHOW_QUERIES')) - $q_start = get_microtime(); - - $this->query_result = @mysqli_query($this->link_id, $sql); - - if ($this->query_result) - { - if (defined('PUN_SHOW_QUERIES')) - $this->saved_queries[] = array($sql, sprintf('%.5f', get_microtime() - $q_start)); - - ++$this->num_queries; - - return $this->query_result; - } - else - { - if (defined('PUN_SHOW_QUERIES')) - $this->saved_queries[] = array($sql, 0); - - return false; - } - } - - - function result($query_id = 0, $row = 0) - { - if ($query_id) - { - if ($row) - @mysqli_data_seek($query_id, $row); - - $cur_row = @mysqli_fetch_row($query_id); - return $cur_row[0]; - } - else - return false; - } - - - function fetch_assoc($query_id = 0) - { - return ($query_id) ? @mysqli_fetch_assoc($query_id) : false; - } - - - function fetch_row($query_id = 0) - { - return ($query_id) ? @mysqli_fetch_row($query_id) : false; - } - - - function num_rows($query_id = 0) - { - return ($query_id) ? @mysqli_num_rows($query_id) : false; - } - - - function affected_rows() - { - return ($this->link_id) ? @mysqli_affected_rows($this->link_id) : false; - } - - - function insert_id() - { - return ($this->link_id) ? @mysqli_insert_id($this->link_id) : false; - } - - - function get_num_queries() - { - return $this->num_queries; - } - - - function get_saved_queries() - { - return $this->saved_queries; - } - - - function free_result($query_id = false) - { - return ($query_id) ? @mysqli_free_result($query_id) : false; - } - - - function escape($str) - { - return is_array($str) ? '' : mysqli_real_escape_string($this->link_id, $str); - } - - - function error() - { - $result['error_sql'] = @current(@end($this->saved_queries)); - $result['error_no'] = @mysqli_errno($this->link_id); - $result['error_msg'] = @mysqli_error($this->link_id); - - return $result; - } - - - function close() - { - if ($this->link_id) - { - if ($this->query_result) - @mysqli_free_result($this->query_result); - - return @mysqli_close($this->link_id); - } - else - return false; - } -} diff -r e3d7322305bf -r 5e1f1e916419 punbb/include/dblayer/pgsql.php --- a/punbb/include/dblayer/pgsql.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,264 +0,0 @@ -prefix = $db_prefix; - - if ($db_host != '') - { - if (strpos($db_host, ':') !== false) - { - list($db_host, $dbport) = explode(':', $db_host); - $connect_str[] = 'host='.$db_host.' port='.$dbport; - } - else - { - if ($db_host != 'localhost') - $connect_str[] = 'host='.$db_host; - } - } - - if ($db_name) - $connect_str[] = 'dbname='.$db_name; - - if ($db_username != '') - $connect_str[] = 'user='.$db_username; - - if ($db_password != '') - $connect_str[] = 'password='.$db_password; - - if ($p_connect) - $this->link_id = @pg_pconnect(implode(' ', $connect_str)); - else - $this->link_id = @pg_connect(implode(' ', $connect_str)); - - if (!$this->link_id) - error('Unable to connect to PostgreSQL server', __FILE__, __LINE__); - else - return $this->link_id; - } - - - function start_transaction() - { - ++$this->in_transaction; - - return (@pg_query($this->link_id, 'BEGIN')) ? true : false; - } - - - function end_transaction() - { - --$this->in_transaction; - - if (@pg_query($this->link_id, 'COMMIT')) - return true; - else - { - @pg_query($this->link_id, 'ROLLBACK'); - return false; - } - } - - - function query($sql, $unbuffered = false) // $unbuffered is ignored since there is no pgsql_unbuffered_query() - { - if (strrpos($sql, 'LIMIT') !== false) - $sql = preg_replace('#LIMIT ([0-9]+),([ 0-9]+)#', 'LIMIT \\2 OFFSET \\1', $sql); - - if (defined('PUN_SHOW_QUERIES')) - $q_start = get_microtime(); - - @pg_send_query($this->link_id, $sql); - $this->query_result = @pg_get_result($this->link_id); - - if (pg_result_status($this->query_result) != PGSQL_FATAL_ERROR) - { - if (defined('PUN_SHOW_QUERIES')) - $this->saved_queries[] = array($sql, sprintf('%.5f', get_microtime() - $q_start)); - - ++$this->num_queries; - - $this->last_query_text[$this->query_result] = $sql; - - return $this->query_result; - } - else - { - if (defined('PUN_SHOW_QUERIES')) - $this->saved_queries[] = array($sql, 0); - - $this->error_msg = @pg_result_error($this->query_result); - - if ($this->in_transaction) - @pg_query($this->link_id, 'ROLLBACK'); - - --$this->in_transaction; - - return false; - } - } - - - function result($query_id = 0, $row = 0) - { - return ($query_id) ? @pg_fetch_result($query_id, $row, 0) : false; - } - - - function fetch_assoc($query_id = 0) - { - return ($query_id) ? @pg_fetch_assoc($query_id) : false; - } - - - function fetch_row($query_id = 0) - { - return ($query_id) ? @pg_fetch_row($query_id) : false; - } - - - function num_rows($query_id = 0) - { - return ($query_id) ? @pg_num_rows($query_id) : false; - } - - - function affected_rows() - { - return ($this->query_result) ? @pg_affected_rows($this->query_result) : false; - } - - - function insert_id() - { - $query_id = $this->query_result; - - if ($query_id && $this->last_query_text[$query_id] != '') - { - if (preg_match('/^INSERT INTO ([a-z0-9\_\-]+)/is', $this->last_query_text[$query_id], $table_name)) - { - // Hack (don't ask) - if (substr($table_name[1], -6) == 'groups') - $table_name[1] .= '_g'; - - $temp_q_id = @pg_query($this->link_id, 'SELECT currval(\''.$table_name[1].'_id_seq\')'); - return ($temp_q_id) ? intval(@pg_fetch_result($temp_q_id, 0)) : false; - } - } - - return false; - } - - - function get_num_queries() - { - return $this->num_queries; - } - - - function get_saved_queries() - { - return $this->saved_queries; - } - - - function free_result($query_id = false) - { - if (!$query_id) - $query_id = $this->query_result; - - return ($query_id) ? @pg_free_result($query_id) : false; - } - - - function escape($str) - { - return is_array($str) ? '' : pg_escape_string($str); - } - - - function error() - { - $result['error_sql'] = @current(@end($this->saved_queries)); - $result['error_no'] = false; -/* - if (!empty($this->query_result)) - { - $result['error_msg'] = trim(@pg_result_error($this->query_result)); - if ($result['error_msg'] != '') - return $result; - } - - $result['error_msg'] = (!empty($this->link_id)) ? trim(@pg_last_error($this->link_id)) : trim(@pg_last_error()); -*/ - $result['error_msg'] = $this->error_msg; - - return $result; - } - - - function close() - { - if ($this->link_id) - { - if ($this->in_transaction) - { - if (defined('PUN_SHOW_QUERIES')) - $this->saved_queries[] = array('COMMIT', 0); - - @pg_query($this->link_id, 'COMMIT'); - } - - if ($this->query_result) - @pg_free_result($this->query_result); - - return @pg_close($this->link_id); - } - else - return false; - } -} diff -r e3d7322305bf -r 5e1f1e916419 punbb/include/dblayer/sqlite.php --- a/punbb/include/dblayer/sqlite.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,253 +0,0 @@ -prefix = $db_prefix; - - if (!file_exists($db_name)) - { - @touch($db_name); - @chmod($db_name, 0666); - if (!file_exists($db_name)) - error('Unable to create new database \''.$db_name.'\'. Permission denied', __FILE__, __LINE__); - } - - if (!is_readable($db_name)) - error('Unable to open database \''.$db_name.'\' for reading. Permission denied', __FILE__, __LINE__); - - if (!is_writable($db_name)) - error('Unable to open database \''.$db_name.'\' for writing. Permission denied', __FILE__, __LINE__); - - if ($p_connect) - $this->link_id = @sqlite_popen($db_name, 0666, $sqlite_error); - else - $this->link_id = @sqlite_open($db_name, 0666, $sqlite_error); - - if (!$this->link_id) - error('Unable to open database \''.$db_name.'\'. SQLite reported: '.$sqlite_error, __FILE__, __LINE__); - else - return $this->link_id; - } - - - function start_transaction() - { - ++$this->in_transaction; - - return (@sqlite_query($this->link_id, 'BEGIN')) ? true : false; - } - - - function end_transaction() - { - --$this->in_transaction; - - if (@sqlite_query($this->link_id, 'COMMIT')) - return true; - else - { - @sqlite_query($this->link_id, 'ROLLBACK'); - return false; - } - } - - - function query($sql, $unbuffered = false) - { - if (defined('PUN_SHOW_QUERIES')) - $q_start = get_microtime(); - - if ($unbuffered) - $this->query_result = @sqlite_unbuffered_query($this->link_id, $sql); - else - $this->query_result = @sqlite_query($this->link_id, $sql); - - if ($this->query_result) - { - if (defined('PUN_SHOW_QUERIES')) - $this->saved_queries[] = array($sql, sprintf('%.5f', get_microtime() - $q_start)); - - ++$this->num_queries; - - return $this->query_result; - } - else - { - if (defined('PUN_SHOW_QUERIES')) - $this->saved_queries[] = array($sql, 0); - - $this->error_no = @sqlite_last_error($this->link_id); - $this->error_msg = @sqlite_error_string($this->error_no); - - if ($this->in_transaction) - @sqlite_query($this->link_id, 'ROLLBACK'); - - --$this->in_transaction; - - return false; - } - } - - - function result($query_id = 0, $row = 0) - { - if ($query_id) - { - if ($row != 0) - @sqlite_seek($query_id, $row); - - return @current(@sqlite_current($query_id)); - } - else - return false; - } - - - function fetch_assoc($query_id = 0) - { - if ($query_id) - { - $cur_row = @sqlite_fetch_array($query_id, SQLITE_ASSOC); - if ($cur_row) - { - // Horrible hack to get rid of table names and table aliases from the array keys - while (list($key, $value) = @each($cur_row)) - { - $dot_spot = strpos($key, '.'); - if ($dot_spot !== false) - { - unset($cur_row[$key]); - $key = substr($key, $dot_spot+1); - $cur_row[$key] = $value; - } - } - } - - return $cur_row; - } - else - return false; - } - - - function fetch_row($query_id = 0) - { - return ($query_id) ? @sqlite_fetch_array($query_id, SQLITE_NUM) : false; - } - - - function num_rows($query_id = 0) - { - return ($query_id) ? @sqlite_num_rows($query_id) : false; - } - - - function affected_rows() - { - return ($this->query_result) ? @sqlite_changes($this->query_result) : false; - } - - - function insert_id() - { - return ($this->link_id) ? @sqlite_last_insert_rowid($this->link_id) : false; - } - - - function get_num_queries() - { - return $this->num_queries; - } - - - function get_saved_queries() - { - return $this->saved_queries; - } - - - function free_result($query_id = false) - { - return true; - } - - - function escape($str) - { - return is_array($str) ? '' : sqlite_escape_string($str); - } - - - function error() - { - $result['error_sql'] = @current(@end($this->saved_queries)); - $result['error_no'] = $this->error_no; - $result['error_msg'] = $this->error_msg; - - return $result; - } - - - function close() - { - if ($this->link_id) - { - if ($this->in_transaction) - { - if (defined('PUN_SHOW_QUERIES')) - $this->saved_queries[] = array('COMMIT', 0); - - @sqlite_query($this->link_id, 'COMMIT'); - } - - return @sqlite_close($this->link_id); - } - else - return false; - } -} diff -r e3d7322305bf -r 5e1f1e916419 punbb/include/email.php --- a/punbb/include/email.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,186 +0,0 @@ - 50) - return false; - - return preg_match('/^(([^<>()[\]\\.,;:\s@"\']+(\.[^<>()[\]\\.,;:\s@"\']+)*)|("[^"\']+"))@((\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\])|(([a-zA-Z\d\-]+\.)+[a-zA-Z]{2,}))$/', $email); -} - - -// -// Check if $email is banned -// -function is_banned_email($email) -{ - global $pun_db, $pun_bans; - - foreach ($pun_bans as $cur_ban) - { - if ($cur_ban['email'] != '' && - ($email == $cur_ban['email'] || - (strpos($cur_ban['email'], '@') === false && stristr($email, '@'.$cur_ban['email'])))) - return true; - } - - return false; -} - - -// -// Wrapper for PHP's mail() -// -function pun_mail($to, $subject, $message, $from = '') -{ - global $pun_config, $lang_common; - - // Default sender/return address - if (!$from) - $from = '"'.str_replace('"', '', $pun_config['o_board_title'].' '.$lang_common['Mailer']).'" <'.$pun_config['o_webmaster_email'].'>'; - - // Do a little spring cleaning - $to = trim(preg_replace('#[\n\r]+#s', '', $to)); - $subject = trim(preg_replace('#[\n\r]+#s', '', $subject)); - $from = trim(preg_replace('#[\n\r:]+#s', '', $from)); - - $headers = 'From: '.$from."\r\n".'Date: '.date('r')."\r\n".'MIME-Version: 1.0'."\r\n".'Content-transfer-encoding: 8bit'."\r\n".'Content-type: text/plain; charset='.$lang_common['lang_encoding']."\r\n".'X-Mailer: PunBB Mailer'; - - // Make sure all linebreaks are CRLF in message (and strip out any NULL bytes) - $message = str_replace(array("\n", "\0"), array("\r\n", ''), pun_linebreaks($message)); - - if ($pun_config['o_smtp_host'] != '') - smtp_mail($to, $subject, $message, $headers); - else - { - // Change the linebreaks used in the headers according to OS - if (strtoupper(substr(PHP_OS, 0, 3)) == 'MAC') - $headers = str_replace("\r\n", "\r", $headers); - else if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') - $headers = str_replace("\r\n", "\n", $headers); - - mail($to, $subject, $message, $headers); - } -} - - -// -// This function was originally a part of the phpBB Group forum software phpBB2 (http://www.phpbb.com). -// They deserve all the credit for writing it. I made small modifications for it to suit PunBB and it's coding standards. -// -function server_parse($socket, $expected_response) -{ - $server_response = ''; - while (substr($server_response, 3, 1) != ' ') - { - if (!($server_response = fgets($socket, 256))) - error('Couldn\'t get mail server response codes. Please contact the forum administrator.', __FILE__, __LINE__); - } - - if (!(substr($server_response, 0, 3) == $expected_response)) - error('Unable to send e-mail. Please contact the forum administrator with the following error message reported by the SMTP server: "'.$server_response.'"', __FILE__, __LINE__); -} - - -// -// This function was originally a part of the phpBB Group forum software phpBB2 (http://www.phpbb.com). -// They deserve all the credit for writing it. I made small modifications for it to suit PunBB and it's coding standards. -// -function smtp_mail($to, $subject, $message, $headers = '') -{ - global $pun_config; - - $recipients = explode(',', $to); - - // Are we using port 25 or a custom port? - if (strpos($pun_config['o_smtp_host'], ':') !== false) - list($smtp_host, $smtp_port) = explode(':', $pun_config['o_smtp_host']); - else - { - $smtp_host = $pun_config['o_smtp_host']; - $smtp_port = 25; - } - - if (!($socket = fsockopen($smtp_host, $smtp_port, $errno, $errstr, 15))) - error('Could not connect to smtp host "'.$pun_config['o_smtp_host'].'" ('.$errno.') ('.$errstr.')', __FILE__, __LINE__); - - server_parse($socket, '220'); - - if ($pun_config['o_smtp_user'] != '' && $pun_config['o_smtp_pass'] != '') - { - fwrite($socket, 'EHLO '.$smtp_host."\r\n"); - server_parse($socket, '250'); - - fwrite($socket, 'AUTH LOGIN'."\r\n"); - server_parse($socket, '334'); - - fwrite($socket, base64_encode($pun_config['o_smtp_user'])."\r\n"); - server_parse($socket, '334'); - - fwrite($socket, base64_encode($pun_config['o_smtp_pass'])."\r\n"); - server_parse($socket, '235'); - } - else - { - fwrite($socket, 'HELO '.$smtp_host."\r\n"); - server_parse($socket, '250'); - } - - fwrite($socket, 'MAIL FROM: <'.$pun_config['o_webmaster_email'].'>'."\r\n"); - server_parse($socket, '250'); - - $to_header = 'To: '; - - @reset($recipients); - while (list(, $email) = @each($recipients)) - { - fwrite($socket, 'RCPT TO: <'.$email.'>'."\r\n"); - server_parse($socket, '250'); - - $to_header .= '<'.$email.'>, '; - } - - fwrite($socket, 'DATA'."\r\n"); - server_parse($socket, '354'); - - fwrite($socket, 'Subject: '.$subject."\r\n".$to_header."\r\n".$headers."\r\n\r\n".$message."\r\n"); - - fwrite($socket, '.'."\r\n"); - server_parse($socket, '250'); - - fwrite($socket, 'QUIT'."\r\n"); - fclose($socket); - - return true; -} diff -r e3d7322305bf -r 5e1f1e916419 punbb/include/enano_dbal.php --- a/punbb/include/enano_dbal.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,170 +0,0 @@ -prefix = table_prefix . 'pun_'; - } - - function start_transaction() - { - return; - } - - function end_transaction() - { - return; - } - - function query($sql, $unbuffered = false) - { - global $db; - if (defined('PUN_SHOW_QUERIES')) - $q_start = pun_microtime(); - - if ($unbuffered) - $this->query_result = $db->sql_unbuffered_query($sql); - else - $this->query_result = $db->sql_query($sql); - - if ($this->query_result) - { - if (defined('PUN_SHOW_QUERIES')) - $this->saved_queries[] = array($sql, sprintf('%.5f', pun_microtime() - $q_start)); - - ++$this->num_queries; - - return $this->query_result; - } - else - { - if (defined('PUN_SHOW_QUERIES')) - $this->saved_queries[] = array($sql, 0); - - return false; - } - } - - function result($query_id = 0, $row = 0) - { - return ($query_id) ? @mysql_result($query_id, $row) : false; - } - - function fetch_assoc($query_id = 0) - { - global $db; - return ($query_id) ? $db->fetchrow($query_id) : false; - } - - function fetch_row($query_id = 0) - { - global $db; - return ($query_id) ? $db->fetchrow_num($query_id) : false; - } - - - function num_rows($query_id = 0) - { - global $db; - return ($query_id) ? @mysql_num_rows($query_id) : false; - } - - function affected_rows() - { - global $db; - return ($db->_conn) ? @mysql_affected_rows($db->_conn) : false; - } - - function insert_id() - { - global $db; - $ret = ($db->_conn) ? @mysql_insert_id($db->_conn) : false; - return $ret; - } - - function get_num_queries() - { - return $this->num_queries; - } - - function get_saved_queries() - { - return $this->saved_queries; - } - - function free_result($query_id = false) - { - global $db; - return ($query_id) ? $db->free_result($query_id) : false; - } - - function escape($str) - { - global $db; - if (is_array($str)) - return ''; - else if (function_exists('mysql_real_escape_string')) - return $db->escape($str); - else - return mysql_escape_string($str); - } - - - function error() - { - $result['error_sql'] = @current(@end($this->saved_queries)); - $result['error_no'] = @mysql_errno($this->link_id); - $result['error_msg'] = @mysql_error($this->link_id); - - return $result; - } - - - function close() - { - return false; - } - -} - diff -r e3d7322305bf -r 5e1f1e916419 punbb/include/essentials.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/include/essentials.php Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,101 @@ +install.php to install PunBB first.'); + + +// Record the start time (will be used to calculate the generation time for the page) +list($usec, $sec) = explode(' ', microtime()); +$pun_start = ((float)$usec + (float)$sec); + +// Make sure PHP reports all errors except E_NOTICE. PunBB supports E_ALL, but a lot of scripts it may interact with, do not. +error_reporting(E_ALL); + +// Force POSIX locale (to prevent functions such as strtolower() from messing up UTF-8 strings) +setlocale(LC_CTYPE, 'C'); + +// If the cache directory is not specified, we use the default setting +if (!defined('PUN_CACHE_DIR')) + define('PUN_CACHE_DIR', PUN_ROOT.'cache/'); + + +// Load DB abstraction layer and connect +require PUN_ROOT.'include/dblayer/common_db.php'; + +// Start a transaction +$pun_db->start_transaction(); + + +// Load cached config +if (file_exists(PUN_CACHE_DIR.'cache_config.php')) + include PUN_CACHE_DIR.'cache_config.php'; + +if (!defined('PUN_CONFIG_LOADED')) +{ + require_once PUN_ROOT.'include/cache.php'; + generate_config_cache(); + require PUN_CACHE_DIR.'cache_config.php'; +} + + +// Load hooks +if (file_exists(PUN_CACHE_DIR.'cache_hooks.php')) + include PUN_CACHE_DIR.'cache_hooks.php'; + +if (!defined('PUN_HOOKS_LOADED')) +{ + require_once PUN_ROOT.'include/cache.php'; + generate_hooks_cache(); + require PUN_CACHE_DIR.'cache_hooks.php'; +} + + +define('PUN_ESSENTIALS_LOADED', 1); \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/include/functions.php --- a/punbb/include/functions.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1097 +0,0 @@ -started) - $session->start(); - - if($session->user_logged_in) - { - $result = $pun_db->query( - 'SELECT eu.*, u.*, eu.real_name AS realname, g.*, eu.user_level AS g_id, o.logged, o.idle - FROM '.$pun_db->prefix.'users AS u - LEFT JOIN '.table_prefix.'users AS eu - ON eu.user_id=u.id - INNER JOIN '.$pun_db->prefix.'groups AS g - ON u.group_id=g.g_id - LEFT JOIN '.$pun_db->prefix.'online AS o - ON o.user_id=u.id - WHERE u.id='.intval($session->user_id)) - or error('Unable to fetch user information', __FILE__, __LINE__, $pun_db->error()); - $pun_user = $pun_db->fetch_assoc($result); - // Set a default language if the user selected language no longer exists - if (!@file_exists(PUN_ROOT.'lang/'.$pun_user['language'])) - $pun_user['language'] = $pun_config['o_default_lang']; - - // Set a default style if the user selected style no longer exists - // if (!@file_exists(PUN_ROOT.'style/'.$pun_user['style'].'.css')) - // $pun_user['style'] = $pun_config['o_default_style']; - - if (!$pun_user['disp_topics']) - $pun_user['disp_topics'] = $pun_config['o_disp_topics_default']; - if (!$pun_user['disp_posts']) - $pun_user['disp_posts'] = $pun_config['o_disp_posts_default']; - - if ($pun_user['save_pass'] == '0') - $expire = 0; - - // Define this if you want this visit to affect the online list and the users last visit data - if (!defined('PUN_QUIET_VISIT')) - { - // Update the online list - if (!$pun_user['logged']) - $pun_db->query('INSERT INTO '.$pun_db->prefix.'online (user_id, ident, logged) VALUES('.$pun_user['id'].', \''.$pun_db->escape($pun_user['username']).'\', '.$now.')') or error('Unable to insert into online list', __FILE__, __LINE__, $pun_db->error()); - else - { - // Special case: We've timed out, but no other user has browsed the forums since we timed out - if ($pun_user['logged'] < ($now-$pun_config['o_timeout_visit'])) - { - $pun_db->query('UPDATE '.$pun_db->prefix.'users SET last_visit='.$pun_user['logged'].' WHERE id='.$pun_user['id']) or error('Unable to update user visit data', __FILE__, __LINE__, $pun_db->error()); - $pun_user['last_visit'] = $pun_user['logged']; - } - - $idle_sql = ($pun_user['idle'] == '1') ? ', idle=0' : ''; - $pun_db->query('UPDATE '.$pun_db->prefix.'online SET logged='.$now.$idle_sql.' WHERE user_id='.$pun_user['id']) or error('Unable to update online list', __FILE__, __LINE__, $pun_db->error()); - } - } - - $pun_user['is_guest'] = false; - } - else - { - set_default_user(); - } -} - - -// -// Fill $pun_user with default values (for guests) -// -function set_default_user() -{ - global $pun_db, $pun_user, $pun_config; - - $remote_addr = get_remote_address(); - - // Fetch guest user - $result = $pun_db->query('SELECT u.*, g.*, o.logged FROM '.$pun_db->prefix.'users AS u INNER JOIN '.$pun_db->prefix.'groups AS g ON u.group_id=g.g_id LEFT JOIN '.$pun_db->prefix.'online AS o ON o.ident=\''.$remote_addr.'\' WHERE u.id=1') or error('Unable to fetch guest information', __FILE__, __LINE__, $pun_db->error()); - if (!$pun_db->num_rows($result)) - exit('Unable to fetch guest information. The table \''.$pun_db->prefix.'users\' must contain an entry with id = 1 that represents anonymous users.'); - - $pun_user = $pun_db->fetch_assoc($result); - - // Update online list - if (!$pun_user['logged']) - $pun_db->query('INSERT INTO '.$pun_db->prefix.'online (user_id, ident, logged) VALUES(1, \''.$pun_db->escape($remote_addr).'\', '.time().')') or error('Unable to insert into online list', __FILE__, __LINE__, $pun_db->error()); - else - $pun_db->query('UPDATE '.$pun_db->prefix.'online SET logged='.time().' WHERE ident=\''.$pun_db->escape($remote_addr).'\'') or error('Unable to update online list', __FILE__, __LINE__, $pun_db->error()); - - $pun_user['disp_topics'] = $pun_config['o_disp_topics_default']; - $pun_user['disp_posts'] = $pun_config['o_disp_posts_default']; - $pun_user['timezone'] = $pun_config['o_server_timezone']; - $pun_user['language'] = $pun_config['o_default_lang']; - $pun_user['style'] = $pun_config['o_default_style']; - $pun_user['is_guest'] = true; -} - - -// -// Set a cookie, PunBB style! -// -function pun_setcookie($user_id, $password_hash, $expire) -{ - global $cookie_name, $cookie_path, $cookie_domain, $cookie_secure, $cookie_seed; - - // Enable sending of a P3P header by removing // from the following line (try this if login is failing in IE6) -// @header('P3P: CP="CUR ADM"'); - - if (version_compare(PHP_VERSION, '5.2.0', '>=')) - setcookie($cookie_name, serialize(array($user_id, md5($cookie_seed.$password_hash))), $expire, $cookie_path, $cookie_domain, $cookie_secure, true); - else - setcookie($cookie_name, serialize(array($user_id, md5($cookie_seed.$password_hash))), $expire, $cookie_path.'; HttpOnly', $cookie_domain, $cookie_secure); -} - - -// -// Check whether the connecting user is banned (and delete any expired bans while we're at it) -// -function check_bans() -{ - global $pun_db, $pun_config, $lang_common, $pun_user, $pun_bans; - - // Admins aren't affected - if ($pun_user['g_id'] == PUN_ADMIN || !$pun_bans) - return; - - // Add a dot at the end of the IP address to prevent banned address 192.168.0.5 from matching e.g. 192.168.0.50 - $user_ip = get_remote_address().'.'; - $bans_altered = false; - - foreach ($pun_bans as $cur_ban) - { - // Has this ban expired? - if ($cur_ban['expire'] != '' && $cur_ban['expire'] <= time()) - { - $pun_db->query('DELETE FROM '.$pun_db->prefix.'bans WHERE id='.$cur_ban['id']) or error('Unable to delete expired ban', __FILE__, __LINE__, $pun_db->error()); - $bans_altered = true; - continue; - } - - if ($cur_ban['username'] != '' && !strcasecmp($pun_user['username'], $cur_ban['username'])) - { - $pun_db->query('DELETE FROM '.$pun_db->prefix.'online WHERE ident=\''.$pun_db->escape($pun_user['username']).'\'') or error('Unable to delete from online list', __FILE__, __LINE__, $pun_db->error()); - message($lang_common['Ban message'].' '.(($cur_ban['expire'] != '') ? $lang_common['Ban message 2'].' '.strtolower(format_time($cur_ban['expire'], true)).'. ' : '').(($cur_ban['message'] != '') ? $lang_common['Ban message 3'].'

    '.pun_htmlspecialchars($cur_ban['message']).'

    ' : '

    ').$lang_common['Ban message 4'].' '.$pun_config['o_admin_email'].'.', true); - } - - if ($cur_ban['ip'] != '') - { - $cur_ban_ips = explode(' ', $cur_ban['ip']); - - for ($i = 0; $i < count($cur_ban_ips); ++$i) - { - $cur_ban_ips[$i] = $cur_ban_ips[$i].'.'; - - if (substr($user_ip, 0, strlen($cur_ban_ips[$i])) == $cur_ban_ips[$i]) - { - $pun_db->query('DELETE FROM '.$pun_db->prefix.'online WHERE ident=\''.$pun_db->escape($pun_user['username']).'\'') or error('Unable to delete from online list', __FILE__, __LINE__, $pun_db->error()); - message($lang_common['Ban message'].' '.(($cur_ban['expire'] != '') ? $lang_common['Ban message 2'].' '.strtolower(format_time($cur_ban['expire'], true)).'. ' : '').(($cur_ban['message'] != '') ? $lang_common['Ban message 3'].'

    '.pun_htmlspecialchars($cur_ban['message']).'

    ' : '

    ').$lang_common['Ban message 4'].' '.$pun_config['o_admin_email'].'.', true); - } - } - } - } - - // If we removed any expired bans during our run-through, we need to regenerate the bans cache - if ($bans_altered) - { - require_once PUN_ROOT.'include/cache.php'; - generate_bans_cache(); - } -} - - -// -// Update "Users online" -// -function update_users_online() -{ - global $pun_db, $pun_config, $pun_user; - - $now = time(); - - // Fetch all online list entries that are older than "o_timeout_online" - $result = $pun_db->query('SELECT * FROM '.$pun_db->prefix.'online WHERE logged<'.($now-$pun_config['o_timeout_online'])) or error('Unable to fetch old entries from online list', __FILE__, __LINE__, $pun_db->error()); - while ($cur_user = $pun_db->fetch_assoc($result)) - { - // If the entry is a guest, delete it - if ($cur_user['user_id'] == '1') - $pun_db->query('DELETE FROM '.$pun_db->prefix.'online WHERE ident=\''.$pun_db->escape($cur_user['ident']).'\'') or error('Unable to delete from online list', __FILE__, __LINE__, $pun_db->error()); - else - { - // 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 - if ($cur_user['logged'] < ($now-$pun_config['o_timeout_visit'])) - { - $pun_db->query('UPDATE '.$pun_db->prefix.'users SET last_visit='.$cur_user['logged'].' WHERE id='.$cur_user['user_id']) or error('Unable to update user visit data', __FILE__, __LINE__, $pun_db->error()); - $pun_db->query('DELETE FROM '.$pun_db->prefix.'online WHERE user_id='.$cur_user['user_id']) or error('Unable to delete from online list', __FILE__, __LINE__, $pun_db->error()); - } - else if ($cur_user['idle'] == '0') - $pun_db->query('UPDATE '.$pun_db->prefix.'online SET idle=1 WHERE user_id='.$cur_user['user_id']) or error('Unable to insert into online list', __FILE__, __LINE__, $pun_db->error()); - } - } -} - -// -// Generate the "navigator" that appears at the top of every page -// -function generate_navlinks() -{ - global $pun_config, $lang_common, $pun_user; - global $db, $session, $paths, $template, $plugins; // Common objects - - // Index and Userlist should always be displayed - $links[] = '
    '."\n\n"; - - ++$cat_count; - -?> -
    -

    -
    -
    - - - - - - - - - - - $pun_user['last_visit']) - { - $item_status = 'inew'; - $icon_text = $lang_common['New icon']; - $icon_type = 'icon inew'; - } - - // Is this a redirect forum? - if ($cur_forum['redirect_url'] != '') - { - $forum_field = '

    '.pun_htmlspecialchars($cur_forum['forum_name']).'

    '; - $num_topics = $num_posts = ' '; - $item_status = 'iredirect'; - $icon_text = $lang_common['Redirect icon']; - $icon_type = 'icon'; - } - else - { - $forum_field = '

    '.pun_htmlspecialchars($cur_forum['forum_name']).'

    '; - $num_topics = $cur_forum['num_topics']; - $num_posts = $cur_forum['num_posts']; - } - - if ($cur_forum['forum_desc'] != '') - $forum_field .= "\n\t\t\t\t\t\t\t\t".$cur_forum['forum_desc']; - - - // If there is a last_post/last_poster. - if ($cur_forum['last_post'] != '') - $last_post = ''.format_time($cur_forum['last_post']).''.$lang_common['by'].' '.pun_htmlspecialchars($cur_forum['last_poster']).''; - else - $last_post = ' '; - - if ($cur_forum['moderators'] != '') - { - $mods_array = unserialize($cur_forum['moderators']); - $moderators = array(); - - while (list($mod_username, $mod_id) = @each($mods_array)) - $moderators[] = ''.pun_htmlspecialchars($mod_username).''; - - $moderators = "\t\t\t\t\t\t\t\t".'

    ('.$lang_common['Moderated by'].' '.implode(', ', $moderators).')

    '."\n"; - } - -?> - > - - - - - - 0) - echo "\t\t\t".''."\n\t\t\t".'
    -
    -
    -
    - -
    -
    -
    '."\n\t\t".'
    '."\n\t".'
    '."\n".'
    '."\n\n"; -else - echo '

    '.$lang_index['Empty board'].'

    '; - - -// Collect some statistics from the database -$result = $pun_db->query('SELECT COUNT(id)-1 FROM '.$pun_db->prefix.'users') or error('Unable to fetch total user count', __FILE__, __LINE__, $pun_db->error()); -$stats['total_users'] = $pun_db->result($result); - -$result = $pun_db->query('SELECT u.id, eu.username FROM '.$pun_db->prefix.'users AS u LEFT JOIN '.table_prefix.'users AS eu ON ( eu.user_id = u.id ) ORDER BY registered DESC LIMIT 1') or error('Unable to fetch newest registered user', __FILE__, __LINE__, $pun_db->error()); -$stats['last_user'] = $pun_db->fetch_assoc($result); - -$result = $pun_db->query('SELECT SUM(num_topics), SUM(num_posts) FROM '.$pun_db->prefix.'forums') or error('Unable to fetch topic/post count', __FILE__, __LINE__, $pun_db->error()); -list($stats['total_topics'], $stats['total_posts']) = $pun_db->fetch_row($result); - -?> -
    -

    -
    -
    -
    -
    -
    '. $stats['total_users'] ?>
    -
    '.$stats['total_topics'] ?>
    -
    '.$stats['total_posts'] ?>
    -
    -
    -
    -
    :
    -query('SELECT user_id, ident FROM '.$pun_db->prefix.'online WHERE idle=0 ORDER BY ident', true) or error('Unable to fetch online list', __FILE__, __LINE__, $pun_db->error()); - - while ($pun_user_online = $pun_db->fetch_assoc($result)) - { - if ($pun_user_online['user_id'] > 1) - $users[] = "\n\t\t\t\t".'
    '.pun_htmlspecialchars($pun_user_online['ident']).''; - else - ++$num_guests; - } - - $num_users = count($users); - echo "\t\t\t\t".'
    '. $lang_index['Users online'].': '.$num_users.'
    '."\n\t\t\t\t".'
    '.$lang_index['Guests online'].': '.$num_guests.'
    '."\n\t\t\t".'
    '."\n"; - - - if ($num_users > 0) - echo "\t\t\t".'
    '."\n\t\t\t\t".'
    '.$lang_index['Online'].': 
    '."\t\t\t\t".implode(', ', $users).''."\n\t\t\t".'
    '."\n"; - else - echo "\t\t\t".'
    '."\n"; - -} -else - echo "\t\t".''."\n\t\t\t".'
    '."\n"; - - -?> -
    -
    -
    -Enter your announcement here.

    '), + ('o_rules', '0'), + ('o_rules_message', 'Enter your rules here.'), + ('o_maintenance', '0'), + ('o_maintenance_message', 'The forums are temporarily down for maintenance. Please try again in a few minutes.
    \\n
    \\n/Administrator'), + ('p_message_bbcode', '1'), + ('p_message_img_tag', '1'), + ('p_message_all_caps', '1'), + ('p_subject_all_caps', '1'), + ('p_sig_all_caps', '1'), + ('p_sig_bbcode', '1'), + ('p_sig_img_tag', '0'), + ('p_sig_length', '400'), + ('p_sig_lines', '4'), + ('p_allow_banned_email', '1'), + ('p_allow_dupe_email', '0'), + ('p_force_guest_email', '1'); + +INSERT INTO {{TABLE_PREFIX}}groups (g_title, g_user_title, g_moderator, g_mod_edit_users, g_mod_rename_users, g_mod_change_passwords, g_mod_ban_users, g_read_board, g_view_users, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood) VALUES + ('Administrators', 'Administrator', 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0), + ('Guest', NULL, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0), + ('Members', NULL, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 300, 60, 30), + ('Moderators', 'Moderator', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0); + +INSERT INTO {{TABLE_PREFIX}}forums (forum_name, forum_desc, num_topics, num_posts, last_post, last_post_id, last_poster, disp_position, cat_id) VALUES('Test forum', 'This is just a test forum', 1, 1, {{NOW}}, 1, 'Enano', 1, 1); +INSERT INTO {{TABLE_PREFIX}}topics (poster, subject, posted, first_post_id, last_post, last_post_id, last_poster, forum_id) VALUES('Enano', 'Test post', {{NOW}}, 1, {{NOW}}, 1, 'Enano', 1); +INSERT INTO {{TABLE_PREFIX}}posts (poster, poster_id, poster_ip, message, posted, topic_id) VALUES('Enano', 2, '127.0.0.1', 'If you are looking at this (which I guess you are), the install of PunBB appears to have worked! Now log in and head over to the administration control panel to configure your forum.', {{NOW}}, 1); +INSERT INTO {{TABLE_PREFIX}}ranks (rank, min_posts) VALUES('New member', 0); +INSERT INTO {{TABLE_PREFIX}}ranks (rank, min_posts) VALUES('Member', 10); +INSERT INTO {{TABLE_PREFIX}}users (id, group_id, username, password, email) VALUES(1, 2, 'Guest', 'Guest', 'Guest'); diff -r e3d7322305bf -r 5e1f1e916419 punbb/install.php --- a/punbb/install.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1454 +0,0 @@ -here instead.'); - - -// Make sure we are running at least PHP 4.1.0 -if (intval(str_replace('.', '', phpversion())) < 410) - exit('You are running PHP version '.PHP_VERSION.'. PunBB requires at least PHP 4.1.0 to run properly. You must upgrade your PHP installation before you can continue.'); - -// Disable error reporting for uninitialized variables -error_reporting(E_ALL); - -// Turn off PHP time limit -@set_time_limit(0); - - -if (!isset($_POST['form_sent'])) -{ - // Determine available database extensions - $dual_mysql = false; - $db_extensions = array(); - if (function_exists('mysqli_connect')) - $db_extensions[] = array('mysqli', 'MySQL Improved'); - if (function_exists('mysql_connect')) - { - $db_extensions[] = array('mysql', 'MySQL Standard'); - - if (count($db_extensions) > 1) - $dual_mysql = true; - } - if (function_exists('sqlite_open')) - $db_extensions[] = array('sqlite', 'SQLite'); - if (function_exists('pg_connect')) - $db_extensions[] = array('pgsql', 'PostgreSQL'); - - if (empty($db_extensions)) - exit('This PHP environment does not have support for any of the databases that PunBB supports. PHP needs to have support for either MySQL, PostgreSQL or SQLite in order for PunBB to be installed.'); - -?> - - - - - -PunBB Installation - - - - - -
    -
    - -
    -

    PunBB Installation

    -
    -
    -

    Welcome to PunBB installation! You are about to install PunBB. In order to install PunBB you must complete the form set out below. If you encounter any difficulties with the installation, please refer to the documentation.

    -
    -
    -
    - -
    -

    Install PunBB 1.2

    -
    -
    -
    -
    -
    -

    Database setup

    -

    Please enter the requested information in order to setup your database for PunBB. You must know all the information asked for before proceeding with the installation.

    -
    -
    - Select your database type -
    -

    PunBB currently supports MySQL, PostgreSQL and SQLite. If your database of choice is missing from the drop-down menu below, it means this PHP environment does not have support for that particular database. More information regarding support for particular versions of each database can be found in the FAQ.

    -

    PunBB has detected that your PHP environment supports two different ways of communicating with MySQL. The two options are called standard and improved. If you are uncertain which one to use, start by trying improved and if that fails, try standard.

    - -
    -
    -
    -
    -
    - Enter your database server hostname -
    -

    The address of the database server (example: localhost, db.myhost.com or 192.168.0.15). You can specify a custom port number if your database doesn't run on the default port (example: localhost:3580). For SQLite support, just enter anything or leave it at 'localhost'.

    - -
    -
    -
    -
    -
    - Enter then name of your database -
    -

    The name of the database that PunBB will be installed into. The database must exist. For SQLite, this is the relative path to the database file. If the SQLite database file does not exist, PunBB will attempt to create it.

    - -
    -
    -
    -
    -
    - Enter your database username and password -
    -

    Enter the username and password with which you connect to the database. Ignore for SQLite.

    - - -
    -
    -
    -
    -
    -
    - Enter database table prefix -
    -

    If you like you can specify a table prefix. This way you can run multiple copies of PunBB in the same database (example: foo_).

    - -
    -
    -
    -
    -
    -

    Administration setup

    -

    Please enter the requested information in order to setup an administrator for your PunBB installation

    -
    -
    - Enter Administrators username -
    -

    The username of the forum administrator. You can later create more administrators and moderators. Usernames can be between 2 and 25 characters long.

    - -
    -
    -
    -
    -
    - Enter and confirm Administrator password -
    -

    Passwords can be between 4 and 16 characters long. Passwords are case sensitive.

    - - -
    -
    -
    -
    -
    -
    - Enter Administrator's e-mail -
    -

    The e-mail address of the forum administrator.

    - -
    -
    -
    -
    -
    - Enter the Base URL of your PunBB installation -
    -

    The URL (without trailing slash) of your PunBB forum (example: http://forum.myhost.com or http://myhost.com/~myuser). This must be correct or administrators and moderators will not be able to submit any forms. Please note that the preset value below is just an educated guess by PunBB.

    - -
    -
    -
    -

    -
    -
    -
    - -
    -
    - - - -An error occured on line '.$line.' in file '.$file.'.

    '; - else - echo 'An error occured.

    '; - - echo 'PunBB reported: '.htmlspecialchars($message).'

    '; - - if ($db_error !== false) - echo 'Database reported: '.htmlspecialchars($db_error['error_msg']).(($db_error['error_no']) ? ' (Errno: '.$db_error['error_no'].')' : ''); - - exit; - } - - - $db_type = $_POST['req_db_type']; - $db_host = trim($_POST['req_db_host']); - $db_name = trim($_POST['req_db_name']); - $db_username = unescape(trim($_POST['db_username'])); - $db_password = unescape(trim($_POST['db_password'])); - $db_prefix = trim($_POST['db_prefix']); - $username = unescape(trim($_POST['req_username'])); - $email = strtolower(trim($_POST['req_email'])); - $password1 = unescape(trim($_POST['req_password1'])); - $password2 = unescape(trim($_POST['req_password2'])); - - - // Make sure base_url doesn't end with a slash - if (substr($_POST['req_base_url'], -1) == '/') - $base_url = substr($_POST['req_base_url'], 0, -1); - else - $base_url = $_POST['req_base_url']; - - - // Validate username and passwords - if (strlen($username) < 2) - error('Usernames must be at least 2 characters long. Please go back and correct.'); - if (strlen($password1) < 4) - error('Passwords must be at least 4 characters long. Please go back and correct.'); - if ($password1 != $password2) - error('Passwords do not match. Please go back and correct.'); - if (!strcasecmp($username, 'Guest')) - error('The username guest is reserved. Please go back and correct.'); - if (preg_match('/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/', $username)) - error('Usernames may not be in the form of an IP address. Please go back and correct.'); - if (preg_match('#\[b\]|\[/b\]|\[u\]|\[/u\]|\[i\]|\[/i\]|\[color|\[/color\]|\[quote\]|\[/quote\]|\[code\]|\[/code\]|\[img\]|\[/img\]|\[url|\[/url\]|\[email|\[/email\]#i', $username)) - error('Usernames may not contain any of the text formatting tags (BBCode) that the forum uses. Please go back and correct.'); - - if (strlen($email) > 50 || !preg_match('/^(([^<>()[\]\\.,;:\s@"\']+(\.[^<>()[\]\\.,;:\s@"\']+)*)|("[^"\']+"))@((\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\])|(([a-zA-Z\d\-]+\.)+[a-zA-Z]{2,}))$/', $email)) - error('The administrator e-mail address you entered is invalid. Please go back and correct.'); - - - // Load the appropriate DB layer class - switch ($db_type) - { - case 'mysql': - require PUN_ROOT.'include/dblayer/mysql.php'; - break; - - case 'mysqli': - require PUN_ROOT.'include/dblayer/mysqli.php'; - break; - - case 'pgsql': - require PUN_ROOT.'include/dblayer/pgsql.php'; - break; - - case 'sqlite': - require PUN_ROOT.'include/dblayer/sqlite.php'; - break; - - default: - error('\''.$db_type.'\' is not a valid database type.'); - } - - // Create the database object (and connect/select db) - $pun_db = new DBLayer($db_host, $db_username, $db_password, $db_name, $db_prefix, false); - - - // Do some DB type specific checks - switch ($db_type) - { - case 'mysql': - case 'mysqli': - break; - - case 'pgsql': - // Make sure we are running at least PHP 4.3.0 (needed only for PostgreSQL) - if (version_compare(PHP_VERSION, '4.3.0', '<')) - error('You are running PHP version '.PHP_VERSION.'. PunBB requires at least PHP 4.3.0 to run properly when using PostgreSQL. You must upgrade your PHP installation or use a different database before you can continue.'); - break; - - case 'sqlite': - if (strtolower($db_prefix) == 'sqlite_') - error('The table prefix \'sqlite_\' is reserved for use by the SQLite engine. Please choose a different prefix.'); - break; - } - - - // Make sure PunBB isn't already installed - $result = $pun_db->query('SELECT 1 FROM '.$db_prefix.'users WHERE id=1'); - if ($pun_db->num_rows($result)) - error('A table called "'.$db_prefix.'users" is already present in the database "'.$db_name.'". This could mean that PunBB is already installed or that another piece of software is installed and is occupying one or more of the table names PunBB requires. If you want to install multiple copies of PunBB in the same database, you must choose a different table prefix.'); - - - // Create all tables - switch ($db_type) - { - case 'mysql': - case 'mysqli': - $sql = 'CREATE TABLE '.$db_prefix."bans ( - id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, - username VARCHAR(200), - ip VARCHAR(255), - email VARCHAR(50), - message VARCHAR(255), - expire INT(10) UNSIGNED, - PRIMARY KEY (id) - ) TYPE=MyISAM;"; - break; - - case 'pgsql': - $pun_db->start_transaction(); - - $sql = 'CREATE TABLE '.$db_prefix."bans ( - id SERIAL, - username VARCHAR(200), - ip VARCHAR(255), - email VARCHAR(50), - message VARCHAR(255), - expire INT, - PRIMARY KEY (id) - )"; - break; - - case 'sqlite': - $pun_db->start_transaction(); - - $sql = 'CREATE TABLE '.$db_prefix."bans ( - id INTEGER NOT NULL, - username VARCHAR(200), - ip VARCHAR(255), - email VARCHAR(50), - message VARCHAR(255), - expire INTEGER, - PRIMARY KEY (id) - )"; - break; - - } - - $pun_db->query($sql) or error('Unable to create table '.$db_prefix.'bans. Please check your settings and try again.', __FILE__, __LINE__, $pun_db->error()); - - - switch ($db_type) - { - case 'mysql': - case 'mysqli': - $sql = 'CREATE TABLE '.$db_prefix."categories ( - id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, - cat_name VARCHAR(80) NOT NULL DEFAULT 'New Category', - disp_position INT(10) NOT NULL DEFAULT 0, - PRIMARY KEY (id) - ) TYPE=MyISAM;"; - break; - - case 'pgsql': - $sql = 'CREATE TABLE '.$db_prefix."categories ( - id SERIAL, - cat_name VARCHAR(80) NOT NULL DEFAULT 'New Category', - disp_position INT NOT NULL DEFAULT 0, - PRIMARY KEY (id) - )"; - break; - - case 'sqlite': - $sql = 'CREATE TABLE '.$db_prefix."categories ( - id INTEGER NOT NULL, - cat_name VARCHAR(80) NOT NULL DEFAULT 'New Category', - disp_position INTEGER NOT NULL DEFAULT 0, - PRIMARY KEY (id) - )"; - break; - } - - $pun_db->query($sql) or error('Unable to create table '.$db_prefix.'categories. Please check your settings and try again.', __FILE__, __LINE__, $pun_db->error()); - - - - switch ($db_type) - { - case 'mysql': - case 'mysqli': - $sql = 'CREATE TABLE '.$db_prefix."censoring ( - id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, - search_for VARCHAR(60) NOT NULL DEFAULT '', - replace_with VARCHAR(60) NOT NULL DEFAULT '', - PRIMARY KEY (id) - ) TYPE=MyISAM;"; - break; - - case 'pgsql': - $sql = 'CREATE TABLE '.$db_prefix."censoring ( - id SERIAL, - search_for VARCHAR(60) NOT NULL DEFAULT '', - replace_with VARCHAR(60) NOT NULL DEFAULT '', - PRIMARY KEY (id) - )"; - break; - - case 'sqlite': - $sql = 'CREATE TABLE '.$db_prefix."censoring ( - id INTEGER NOT NULL, - search_for VARCHAR(60) NOT NULL DEFAULT '', - replace_with VARCHAR(60) NOT NULL DEFAULT '', - PRIMARY KEY (id) - )"; - break; - } - - $pun_db->query($sql) or error('Unable to create table '.$db_prefix.'censoring. Please check your settings and try again.', __FILE__, __LINE__, $pun_db->error()); - - - - switch ($db_type) - { - case 'mysql': - case 'mysqli': - $sql = 'CREATE TABLE '.$db_prefix."config ( - conf_name VARCHAR(255) NOT NULL DEFAULT '', - conf_value TEXT, - PRIMARY KEY (conf_name) - ) TYPE=MyISAM;"; - break; - - case 'pgsql': - $sql = 'CREATE TABLE '.$db_prefix."config ( - conf_name VARCHAR(255) NOT NULL DEFAULT '', - conf_value TEXT, - PRIMARY KEY (conf_name) - )"; - break; - - case 'sqlite': - $sql = 'CREATE TABLE '.$db_prefix."config ( - conf_name VARCHAR(255) NOT NULL DEFAULT '', - conf_value TEXT, - PRIMARY KEY (conf_name) - )"; - break; - } - - $pun_db->query($sql) or error('Unable to create table '.$db_prefix.'config. Please check your settings and try again.', __FILE__, __LINE__, $pun_db->error()); - - - - switch ($db_type) - { - case 'mysql': - case 'mysqli': - $sql = 'CREATE TABLE '.$db_prefix."forum_perms ( - group_id INT(10) NOT NULL DEFAULT 0, - forum_id INT(10) NOT NULL DEFAULT 0, - read_forum TINYINT(1) NOT NULL DEFAULT 1, - post_replies TINYINT(1) NOT NULL DEFAULT 1, - post_topics TINYINT(1) NOT NULL DEFAULT 1, - PRIMARY KEY (group_id, forum_id) - ) TYPE=MyISAM;"; - break; - - case 'pgsql': - $sql = 'CREATE TABLE '.$db_prefix."forum_perms ( - group_id INT NOT NULL DEFAULT 0, - forum_id INT NOT NULL DEFAULT 0, - read_forum SMALLINT NOT NULL DEFAULT 1, - post_replies SMALLINT NOT NULL DEFAULT 1, - post_topics SMALLINT NOT NULL DEFAULT 1, - PRIMARY KEY (group_id, forum_id) - )"; - break; - - case 'sqlite': - $sql = 'CREATE TABLE '.$db_prefix."forum_perms ( - group_id INTEGER NOT NULL DEFAULT 0, - forum_id INTEGER NOT NULL DEFAULT 0, - read_forum INTEGER NOT NULL DEFAULT 1, - post_replies INTEGER NOT NULL DEFAULT 1, - post_topics INTEGER NOT NULL DEFAULT 1, - PRIMARY KEY (group_id, forum_id) - )"; - break; - } - - $pun_db->query($sql) or error('Unable to create table '.$db_prefix.'forum_perms. Please check your settings and try again.', __FILE__, __LINE__, $pun_db->error()); - - - - switch ($db_type) - { - case 'mysql': - case 'mysqli': - $sql = 'CREATE TABLE '.$db_prefix."forums ( - id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, - forum_name VARCHAR(80) NOT NULL DEFAULT 'New forum', - forum_desc TEXT, - redirect_url VARCHAR(100), - moderators TEXT, - num_topics MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, - num_posts MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, - last_post INT(10) UNSIGNED, - last_post_id INT(10) UNSIGNED, - last_poster VARCHAR(200), - sort_by TINYINT(1) NOT NULL DEFAULT 0, - disp_position INT(10) NOT NULL DEFAULT 0, - cat_id INT(10) UNSIGNED NOT NULL DEFAULT 0, - PRIMARY KEY (id) - ) TYPE=MyISAM;"; - break; - - case 'pgsql': - $sql = 'CREATE TABLE '.$db_prefix."forums ( - id SERIAL, - forum_name VARCHAR(80) NOT NULL DEFAULT 'New forum', - forum_desc TEXT, - redirect_url VARCHAR(100), - moderators TEXT, - num_topics INT NOT NULL DEFAULT 0, - num_posts INT NOT NULL DEFAULT 0, - last_post INT, - last_post_id INT, - last_poster VARCHAR(200), - sort_by SMALLINT NOT NULL DEFAULT 0, - disp_position INT NOT NULL DEFAULT 0, - cat_id INT NOT NULL DEFAULT 0, - PRIMARY KEY (id) - )"; - break; - - case 'sqlite': - $sql = 'CREATE TABLE '.$db_prefix."forums ( - id INTEGER NOT NULL, - forum_name VARCHAR(80) NOT NULL DEFAULT 'New forum', - forum_desc TEXT, - redirect_url VARCHAR(100), - moderators TEXT, - num_topics INTEGER NOT NULL DEFAULT 0, - num_posts INTEGER NOT NULL DEFAULT 0, - last_post INTEGER, - last_post_id INTEGER, - last_poster VARCHAR(200), - sort_by INTEGER NOT NULL DEFAULT 0, - disp_position INTEGER NOT NULL DEFAULT 0, - cat_id INTEGER NOT NULL DEFAULT 0, - PRIMARY KEY (id) - )"; - break; - } - - $pun_db->query($sql) or error('Unable to create table '.$db_prefix.'forums. Please check your settings and try again.', __FILE__, __LINE__, $pun_db->error()); - - - - switch ($db_type) - { - case 'mysql': - case 'mysqli': - $sql = 'CREATE TABLE '.$db_prefix."groups ( - g_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, - g_title VARCHAR(50) NOT NULL DEFAULT '', - g_user_title VARCHAR(50), - g_read_board TINYINT(1) NOT NULL DEFAULT 1, - g_post_replies TINYINT(1) NOT NULL DEFAULT 1, - g_post_topics TINYINT(1) NOT NULL DEFAULT 1, - g_post_polls TINYINT(1) NOT NULL DEFAULT 1, - g_edit_posts TINYINT(1) NOT NULL DEFAULT 1, - g_delete_posts TINYINT(1) NOT NULL DEFAULT 1, - g_delete_topics TINYINT(1) NOT NULL DEFAULT 1, - g_set_title TINYINT(1) NOT NULL DEFAULT 1, - g_search TINYINT(1) NOT NULL DEFAULT 1, - g_search_users TINYINT(1) NOT NULL DEFAULT 1, - g_edit_subjects_interval SMALLINT(6) NOT NULL DEFAULT 300, - g_post_flood SMALLINT(6) NOT NULL DEFAULT 30, - g_search_flood SMALLINT(6) NOT NULL DEFAULT 30, - PRIMARY KEY (g_id) - ) TYPE=MyISAM;"; - break; - - case 'pgsql': - $sql = 'CREATE TABLE '.$db_prefix."groups ( - g_id SERIAL, - g_title VARCHAR(50) NOT NULL DEFAULT '', - g_user_title VARCHAR(50), - g_read_board SMALLINT NOT NULL DEFAULT 1, - g_post_replies SMALLINT NOT NULL DEFAULT 1, - g_post_topics SMALLINT NOT NULL DEFAULT 1, - g_post_polls SMALLINT NOT NULL DEFAULT 1, - g_edit_posts SMALLINT NOT NULL DEFAULT 1, - g_delete_posts SMALLINT NOT NULL DEFAULT 1, - g_delete_topics SMALLINT NOT NULL DEFAULT 1, - g_set_title SMALLINT NOT NULL DEFAULT 1, - g_search SMALLINT NOT NULL DEFAULT 1, - g_search_users SMALLINT NOT NULL DEFAULT 1, - g_edit_subjects_interval SMALLINT NOT NULL DEFAULT 300, - g_post_flood SMALLINT NOT NULL DEFAULT 30, - g_search_flood SMALLINT NOT NULL DEFAULT 30, - PRIMARY KEY (g_id) - )"; - break; - - case 'sqlite': - $sql = 'CREATE TABLE '.$db_prefix."groups ( - g_id INTEGER NOT NULL, - g_title VARCHAR(50) NOT NULL DEFAULT '', - g_user_title VARCHAR(50), - g_read_board INTEGER NOT NULL DEFAULT 1, - g_post_replies INTEGER NOT NULL DEFAULT 1, - g_post_topics INTEGER NOT NULL DEFAULT 1, - g_post_polls INTEGER NOT NULL DEFAULT 1, - g_edit_posts INTEGER NOT NULL DEFAULT 1, - g_delete_posts INTEGER NOT NULL DEFAULT 1, - g_delete_topics INTEGER NOT NULL DEFAULT 1, - g_set_title INTEGER NOT NULL DEFAULT 1, - g_search INTEGER NOT NULL DEFAULT 1, - g_search_users INTEGER NOT NULL DEFAULT 1, - g_edit_subjects_interval INTEGER NOT NULL DEFAULT 300, - g_post_flood INTEGER NOT NULL DEFAULT 30, - g_search_flood INTEGER NOT NULL DEFAULT 30, - PRIMARY KEY (g_id) - )"; - break; - } - - $pun_db->query($sql) or error('Unable to create table '.$db_prefix.'groups. Please check your settings and try again.', __FILE__, __LINE__, $pun_db->error()); - - - - switch ($db_type) - { - case 'mysql': - case 'mysqli': - $sql = 'CREATE TABLE '.$db_prefix."online ( - user_id INT(10) UNSIGNED NOT NULL DEFAULT 1, - ident VARCHAR(200) NOT NULL DEFAULT '', - logged INT(10) UNSIGNED NOT NULL DEFAULT 0, - idle TINYINT(1) NOT NULL DEFAULT 0 - ) TYPE=HEAP;"; - break; - - case 'pgsql': - $sql = 'CREATE TABLE '.$db_prefix."online ( - user_id INT NOT NULL DEFAULT 1, - ident VARCHAR(200) NOT NULL DEFAULT '', - logged INT NOT NULL DEFAULT 0, - idle SMALLINT NOT NULL DEFAULT 0 - )"; - break; - - case 'sqlite': - $sql = 'CREATE TABLE '.$db_prefix."online ( - user_id INTEGER NOT NULL DEFAULT 1, - ident VARCHAR(200) NOT NULL DEFAULT '', - logged INTEGER NOT NULL DEFAULT 0, - idle INTEGER NOT NULL DEFAULT 0 - )"; - break; - } - - $pun_db->query($sql) or error('Unable to create table '.$db_prefix.'online. Please check your settings and try again.', __FILE__, __LINE__, $pun_db->error()); - - - - switch ($db_type) - { - case 'mysql': - case 'mysqli': - $sql = 'CREATE TABLE '.$db_prefix."posts ( - id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, - poster VARCHAR(200) NOT NULL DEFAULT '', - poster_id INT(10) UNSIGNED NOT NULL DEFAULT 1, - poster_ip VARCHAR(15), - poster_email VARCHAR(50), - message TEXT, - hide_smilies TINYINT(1) NOT NULL DEFAULT 0, - posted INT(10) UNSIGNED NOT NULL DEFAULT 0, - edited INT(10) UNSIGNED, - edited_by VARCHAR(200), - topic_id INT(10) UNSIGNED NOT NULL DEFAULT 0, - PRIMARY KEY (id) - ) TYPE=MyISAM;"; - break; - - case 'pgsql': - $sql = 'CREATE TABLE '.$db_prefix."posts ( - id SERIAL, - poster VARCHAR(200) NOT NULL DEFAULT '', - poster_id INT NOT NULL DEFAULT 1, - poster_ip VARCHAR(15), - poster_email VARCHAR(50), - message TEXT, - hide_smilies SMALLINT NOT NULL DEFAULT 0, - posted INT NOT NULL DEFAULT 0, - edited INT, - edited_by VARCHAR(200), - topic_id INT NOT NULL DEFAULT 0, - PRIMARY KEY (id) - )"; - break; - - case 'sqlite': - $sql = 'CREATE TABLE '.$db_prefix."posts ( - id INTEGER NOT NULL, - poster VARCHAR(200) NOT NULL DEFAULT '', - poster_id INTEGER NOT NULL DEFAULT 1, - poster_ip VARCHAR(15), - poster_email VARCHAR(50), - message TEXT, - hide_smilies INTEGER NOT NULL DEFAULT 0, - posted INTEGER NOT NULL DEFAULT 0, - edited INTEGER, - edited_by VARCHAR(200), - topic_id INTEGER NOT NULL DEFAULT 0, - PRIMARY KEY (id) - )"; - break; - } - - $pun_db->query($sql) or error('Unable to create table '.$db_prefix.'posts. Please check your settings and try again.', __FILE__, __LINE__, $pun_db->error()); - - - - switch ($db_type) - { - case 'mysql': - case 'mysqli': - $sql = 'CREATE TABLE '.$db_prefix."ranks ( - id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, - rank VARCHAR(50) NOT NULL DEFAULT '', - min_posts MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, - PRIMARY KEY (id) - ) TYPE=MyISAM;"; - break; - - case 'pgsql': - $sql = 'CREATE TABLE '.$db_prefix."ranks ( - id SERIAL, - rank VARCHAR(50) NOT NULL DEFAULT '', - min_posts INT NOT NULL DEFAULT 0, - PRIMARY KEY (id) - )"; - break; - - case 'sqlite': - $sql = 'CREATE TABLE '.$db_prefix."ranks ( - id INTEGER NOT NULL, - rank VARCHAR(50) NOT NULL DEFAULT '', - min_posts INTEGER NOT NULL DEFAULT 0, - PRIMARY KEY (id) - )"; - break; - } - - $pun_db->query($sql) or error('Unable to create table '.$db_prefix.'titles. Please check your settings and try again.', __FILE__, __LINE__, $pun_db->error()); - - - - switch ($db_type) - { - case 'mysql': - case 'mysqli': - $sql = 'CREATE TABLE '.$db_prefix."reports ( - id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, - post_id INT(10) UNSIGNED NOT NULL DEFAULT 0, - topic_id INT(10) UNSIGNED NOT NULL DEFAULT 0, - forum_id INT(10) UNSIGNED NOT NULL DEFAULT 0, - reported_by INT(10) UNSIGNED NOT NULL DEFAULT 0, - created INT(10) UNSIGNED NOT NULL DEFAULT 0, - message TEXT, - zapped INT(10) UNSIGNED, - zapped_by INT(10) UNSIGNED, - PRIMARY KEY (id) - ) TYPE=MyISAM;"; - break; - - case 'pgsql': - $sql = 'CREATE TABLE '.$db_prefix."reports ( - id SERIAL, - post_id INT NOT NULL DEFAULT 0, - topic_id INT NOT NULL DEFAULT 0, - forum_id INT NOT NULL DEFAULT 0, - reported_by INT NOT NULL DEFAULT 0, - created INT NOT NULL DEFAULT 0, - message TEXT, - zapped INT, - zapped_by INT, - PRIMARY KEY (id) - )"; - break; - - case 'sqlite': - $sql = 'CREATE TABLE '.$db_prefix."reports ( - id INTEGER NOT NULL, - post_id INTEGER NOT NULL DEFAULT 0, - topic_id INTEGER NOT NULL DEFAULT 0, - forum_id INTEGER NOT NULL DEFAULT 0, - reported_by INTEGER NOT NULL DEFAULT 0, - created INTEGER NOT NULL DEFAULT 0, - message TEXT, - zapped INTEGER, - zapped_by INTEGER, - PRIMARY KEY (id) - )"; - break; - } - - $pun_db->query($sql) or error('Unable to create table '.$db_prefix.'reports. Please check your settings and try again.', __FILE__, __LINE__, $pun_db->error()); - - - - switch ($db_type) - { - case 'mysql': - case 'mysqli': - $sql = 'CREATE TABLE '.$db_prefix."search_cache ( - id INT(10) UNSIGNED NOT NULL DEFAULT 0, - ident VARCHAR(200) NOT NULL DEFAULT '', - search_data TEXT, - PRIMARY KEY (id) - ) TYPE=MyISAM;"; - break; - - case 'pgsql': - $sql = 'CREATE TABLE '.$db_prefix."search_cache ( - id INT NOT NULL DEFAULT 0, - ident VARCHAR(200) NOT NULL DEFAULT '', - search_data TEXT, - PRIMARY KEY (id) - )"; - break; - - case 'sqlite': - $sql = 'CREATE TABLE '.$db_prefix."search_cache ( - id INTEGER NOT NULL DEFAULT 0, - ident VARCHAR(200) NOT NULL DEFAULT '', - search_data TEXT, - PRIMARY KEY (id) - )"; - break; - } - - $pun_db->query($sql) or error('Unable to create table '.$db_prefix.'search_cache. Please check your settings and try again.', __FILE__, __LINE__, $pun_db->error()); - - - - switch ($db_type) - { - case 'mysql': - case 'mysqli': - $sql = 'CREATE TABLE '.$db_prefix."search_matches ( - post_id INT(10) UNSIGNED NOT NULL DEFAULT 0, - word_id MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, - subject_match TINYINT(1) NOT NULL DEFAULT 0 - ) TYPE=MyISAM;"; - break; - - case 'pgsql': - $sql = 'CREATE TABLE '.$db_prefix."search_matches ( - post_id INT NOT NULL DEFAULT 0, - word_id INT NOT NULL DEFAULT 0, - subject_match SMALLINT NOT NULL DEFAULT 0 - )"; - break; - - case 'sqlite': - $sql = 'CREATE TABLE '.$db_prefix."search_matches ( - post_id INTEGER NOT NULL DEFAULT 0, - word_id INTEGER NOT NULL DEFAULT 0, - subject_match INTEGER NOT NULL DEFAULT 0 - )"; - break; - } - - $pun_db->query($sql) or error('Unable to create table '.$db_prefix.'search_matches. Please check your settings and try again.', __FILE__, __LINE__, $pun_db->error()); - - - - switch ($db_type) - { - case 'mysql': - case 'mysqli': - $sql = 'CREATE TABLE '.$db_prefix."search_words ( - id MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT, - word VARCHAR(20) BINARY NOT NULL DEFAULT '', - PRIMARY KEY (word), - KEY ".$db_prefix."search_words_id_idx (id) - ) TYPE=MyISAM;"; - break; - - case 'pgsql': - $sql = 'CREATE TABLE '.$db_prefix."search_words ( - id SERIAL, - word VARCHAR(20) NOT NULL DEFAULT '', - PRIMARY KEY (word) - )"; - break; - - case 'sqlite': - $sql = 'CREATE TABLE '.$db_prefix."search_words ( - id INTEGER NOT NULL, - word VARCHAR(20) NOT NULL DEFAULT '', - PRIMARY KEY (id), - UNIQUE (word) - )"; - break; - } - - $pun_db->query($sql) or error('Unable to create table '.$db_prefix.'search_words. Please check your settings and try again.', __FILE__, __LINE__, $pun_db->error()); - - - - switch ($db_type) - { - case 'mysql': - case 'mysqli': - $sql = 'CREATE TABLE '.$db_prefix."subscriptions ( - user_id INT(10) UNSIGNED NOT NULL DEFAULT 0, - topic_id INT(10) UNSIGNED NOT NULL DEFAULT 0, - PRIMARY KEY (user_id, topic_id) - ) TYPE=MyISAM;"; - break; - - case 'pgsql': - $sql = 'CREATE TABLE '.$db_prefix."subscriptions ( - user_id INT NOT NULL DEFAULT 0, - topic_id INT NOT NULL DEFAULT 0, - PRIMARY KEY (user_id, topic_id) - )"; - break; - - case 'sqlite': - $sql = 'CREATE TABLE '.$db_prefix."subscriptions ( - user_id INTEGER NOT NULL DEFAULT 0, - topic_id INTEGER NOT NULL DEFAULT 0, - PRIMARY KEY (user_id, topic_id) - )"; - break; - } - - $pun_db->query($sql) or error('Unable to create table '.$db_prefix.'subscriptions. Please check your settings and try again.', __FILE__, __LINE__, $pun_db->error()); - - - - switch ($db_type) - { - case 'mysql': - case 'mysqli': - $sql = 'CREATE TABLE '.$db_prefix."topics ( - id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, - poster VARCHAR(200) NOT NULL DEFAULT '', - subject VARCHAR(255) NOT NULL DEFAULT '', - posted INT(10) UNSIGNED NOT NULL DEFAULT 0, - last_post INT(10) UNSIGNED NOT NULL DEFAULT 0, - last_post_id INT(10) UNSIGNED NOT NULL DEFAULT 0, - last_poster VARCHAR(200), - num_views MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, - num_replies MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, - closed TINYINT(1) NOT NULL DEFAULT 0, - sticky TINYINT(1) NOT NULL DEFAULT 0, - moved_to INT(10) UNSIGNED, - forum_id INT(10) UNSIGNED NOT NULL DEFAULT 0, - PRIMARY KEY (id) - ) TYPE=MyISAM;"; - break; - - case 'pgsql': - $sql = 'CREATE TABLE '.$db_prefix."topics ( - id SERIAL, - poster VARCHAR(200) NOT NULL DEFAULT '', - subject VARCHAR(255) NOT NULL DEFAULT '', - posted INT NOT NULL DEFAULT 0, - last_post INT NOT NULL DEFAULT 0, - last_post_id INT NOT NULL DEFAULT 0, - last_poster VARCHAR(200), - num_views INT NOT NULL DEFAULT 0, - num_replies INT NOT NULL DEFAULT 0, - closed SMALLINT NOT NULL DEFAULT 0, - sticky SMALLINT NOT NULL DEFAULT 0, - moved_to INT, - forum_id INT NOT NULL DEFAULT 0, - PRIMARY KEY (id) - )"; - break; - - case 'sqlite': - $sql = 'CREATE TABLE '.$db_prefix."topics ( - id INTEGER NOT NULL, - poster VARCHAR(200) NOT NULL DEFAULT '', - subject VARCHAR(255) NOT NULL DEFAULT '', - posted INTEGER NOT NULL DEFAULT 0, - last_post INTEGER NOT NULL DEFAULT 0, - last_post_id INTEGER NOT NULL DEFAULT 0, - last_poster VARCHAR(200), - num_views INTEGER NOT NULL DEFAULT 0, - num_replies INTEGER NOT NULL DEFAULT 0, - closed INTEGER NOT NULL DEFAULT 0, - sticky INTEGER NOT NULL DEFAULT 0, - moved_to INTEGER, - forum_id INTEGER NOT NULL DEFAULT 0, - PRIMARY KEY (id) - )"; - break; - } - - $pun_db->query($sql) or error('Unable to create table '.$db_prefix.'topics. Please check your settings and try again.', __FILE__, __LINE__, $pun_db->error()); - - - - switch ($db_type) - { - case 'mysql': - case 'mysqli': - $sql = 'CREATE TABLE '.$db_prefix."users ( - id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, - group_id INT(10) UNSIGNED NOT NULL DEFAULT 4, - username VARCHAR(200) NOT NULL DEFAULT '', - password VARCHAR(40) NOT NULL DEFAULT '', - email VARCHAR(50) NOT NULL DEFAULT '', - title VARCHAR(50), - realname VARCHAR(40), - url VARCHAR(100), - jabber VARCHAR(75), - icq VARCHAR(12), - msn VARCHAR(50), - aim VARCHAR(30), - yahoo VARCHAR(30), - location VARCHAR(30), - use_avatar TINYINT(1) NOT NULL DEFAULT 0, - signature TEXT, - disp_topics TINYINT(3) UNSIGNED, - disp_posts TINYINT(3) UNSIGNED, - email_setting TINYINT(1) NOT NULL DEFAULT 1, - save_pass TINYINT(1) NOT NULL DEFAULT 1, - notify_with_post TINYINT(1) NOT NULL DEFAULT 0, - show_smilies TINYINT(1) NOT NULL DEFAULT 1, - show_img TINYINT(1) NOT NULL DEFAULT 1, - show_img_sig TINYINT(1) NOT NULL DEFAULT 1, - show_avatars TINYINT(1) NOT NULL DEFAULT 1, - show_sig TINYINT(1) NOT NULL DEFAULT 1, - timezone FLOAT NOT NULL DEFAULT 0, - language VARCHAR(25) NOT NULL DEFAULT 'English', - style VARCHAR(25) NOT NULL DEFAULT 'Oxygen', - num_posts INT(10) UNSIGNED NOT NULL DEFAULT 0, - last_post INT(10) UNSIGNED, - registered INT(10) UNSIGNED NOT NULL DEFAULT 0, - registration_ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', - last_visit INT(10) UNSIGNED NOT NULL DEFAULT 0, - admin_note VARCHAR(30), - activate_string VARCHAR(50), - activate_key VARCHAR(8), - PRIMARY KEY (id) - ) TYPE=MyISAM;"; - break; - - case 'pgsql': - $sql = 'CREATE TABLE '.$db_prefix."users ( - id SERIAL, - group_id INT NOT NULL DEFAULT 4, - username VARCHAR(200) NOT NULL DEFAULT '', - password VARCHAR(40) NOT NULL DEFAULT '', - email VARCHAR(50) NOT NULL DEFAULT '', - title VARCHAR(50), - realname VARCHAR(40), - url VARCHAR(100), - jabber VARCHAR(75), - icq VARCHAR(12), - msn VARCHAR(50), - aim VARCHAR(30), - yahoo VARCHAR(30), - location VARCHAR(30), - use_avatar SMALLINT NOT NULL DEFAULT 0, - signature TEXT, - disp_topics SMALLINT, - disp_posts SMALLINT, - email_setting SMALLINT NOT NULL DEFAULT 1, - save_pass SMALLINT NOT NULL DEFAULT 1, - notify_with_post SMALLINT NOT NULL DEFAULT 0, - show_smilies SMALLINT NOT NULL DEFAULT 1, - show_img SMALLINT NOT NULL DEFAULT 1, - show_img_sig SMALLINT NOT NULL DEFAULT 1, - show_avatars SMALLINT NOT NULL DEFAULT 1, - show_sig SMALLINT NOT NULL DEFAULT 1, - timezone REAL NOT NULL DEFAULT 0, - language VARCHAR(25) NOT NULL DEFAULT 'English', - style VARCHAR(25) NOT NULL DEFAULT 'Oxygen', - num_posts INT NOT NULL DEFAULT 0, - last_post INT, - registered INT NOT NULL DEFAULT 0, - registration_ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', - last_visit INT NOT NULL DEFAULT 0, - admin_note VARCHAR(30), - activate_string VARCHAR(50), - activate_key VARCHAR(8), - PRIMARY KEY (id) - )"; - break; - - case 'sqlite': - $sql = 'CREATE TABLE '.$db_prefix."users ( - id INTEGER NOT NULL, - group_id INTEGER NOT NULL DEFAULT 4, - username VARCHAR(200) NOT NULL DEFAULT '', - password VARCHAR(40) NOT NULL DEFAULT '', - email VARCHAR(50) NOT NULL DEFAULT '', - title VARCHAR(50), - realname VARCHAR(40), - url VARCHAR(100), - jabber VARCHAR(75), - icq VARCHAR(12), - msn VARCHAR(50), - aim VARCHAR(30), - yahoo VARCHAR(30), - location VARCHAR(30), - use_avatar INTEGER NOT NULL DEFAULT 0, - signature TEXT, - disp_topics INTEGER, - disp_posts INTEGER, - email_setting INTEGER NOT NULL DEFAULT 1, - save_pass INTEGER NOT NULL DEFAULT 1, - notify_with_post INTEGER NOT NULL DEFAULT 0, - show_smilies INTEGER NOT NULL DEFAULT 1, - show_img INTEGER NOT NULL DEFAULT 1, - show_img_sig INTEGER NOT NULL DEFAULT 1, - show_avatars INTEGER NOT NULL DEFAULT 1, - show_sig INTEGER NOT NULL DEFAULT 1, - timezone FLOAT NOT NULL DEFAULT 0, - language VARCHAR(25) NOT NULL DEFAULT 'English', - style VARCHAR(25) NOT NULL DEFAULT 'Oxygen', - num_posts INTEGER NOT NULL DEFAULT 0, - last_post INTEGER, - registered INTEGER NOT NULL DEFAULT 0, - registration_ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', - last_visit INTEGER NOT NULL DEFAULT 0, - admin_note VARCHAR(30), - activate_string VARCHAR(50), - activate_key VARCHAR(8), - PRIMARY KEY (id) - )"; - break; - } - - $pun_db->query($sql) or error('Unable to create table '.$db_prefix.'users. Please check your settings and try again.', __FILE__, __LINE__, $pun_db->error()); - - - // Add some indexes - switch ($db_type) - { - case 'mysql': - case 'mysqli': - // We use MySQL's ALTER TABLE ... ADD INDEX syntax instead of CREATE INDEX to avoid problems with users lacking the INDEX privilege - $queries[] = 'ALTER TABLE '.$db_prefix.'online ADD UNIQUE INDEX '.$db_prefix.'online_user_id_ident_idx(user_id,ident)'; - $queries[] = 'ALTER TABLE '.$db_prefix.'online ADD INDEX '.$db_prefix.'online_user_id_idx(user_id)'; - $queries[] = 'ALTER TABLE '.$db_prefix.'posts ADD INDEX '.$db_prefix.'posts_topic_id_idx(topic_id)'; - $queries[] = 'ALTER TABLE '.$db_prefix.'posts ADD INDEX '.$db_prefix.'posts_multi_idx(poster_id, topic_id)'; - $queries[] = 'ALTER TABLE '.$db_prefix.'reports ADD INDEX '.$db_prefix.'reports_zapped_idx(zapped)'; - $queries[] = 'ALTER TABLE '.$db_prefix.'search_matches ADD INDEX '.$db_prefix.'search_matches_word_id_idx(word_id)'; - $queries[] = 'ALTER TABLE '.$db_prefix.'search_matches ADD INDEX '.$db_prefix.'search_matches_post_id_idx(post_id)'; - $queries[] = 'ALTER TABLE '.$db_prefix.'topics ADD INDEX '.$db_prefix.'topics_forum_id_idx(forum_id)'; - $queries[] = 'ALTER TABLE '.$db_prefix.'topics ADD INDEX '.$db_prefix.'topics_moved_to_idx(moved_to)'; - $queries[] = 'ALTER TABLE '.$db_prefix.'users ADD INDEX '.$db_prefix.'users_registered_idx(registered)'; - $queries[] = 'ALTER TABLE '.$db_prefix.'search_cache ADD INDEX '.$db_prefix.'search_cache_ident_idx(ident(8))'; - $queries[] = 'ALTER TABLE '.$db_prefix.'users ADD INDEX '.$db_prefix.'users_username_idx(username(8))'; - break; - - default: - $queries[] = 'CREATE INDEX '.$db_prefix.'online_user_id_idx ON '.$db_prefix.'online(user_id)'; - $queries[] = 'CREATE INDEX '.$db_prefix.'posts_topic_id_idx ON '.$db_prefix.'posts(topic_id)'; - $queries[] = 'CREATE INDEX '.$db_prefix.'posts_multi_idx ON '.$db_prefix.'posts(poster_id, topic_id)'; - $queries[] = 'CREATE INDEX '.$db_prefix.'reports_zapped_idx ON '.$db_prefix.'reports(zapped)'; - $queries[] = 'CREATE INDEX '.$db_prefix.'search_matches_word_id_idx ON '.$db_prefix.'search_matches(word_id)'; - $queries[] = 'CREATE INDEX '.$db_prefix.'search_matches_post_id_idx ON '.$db_prefix.'search_matches(post_id)'; - $queries[] = 'CREATE INDEX '.$db_prefix.'topics_forum_id_idx ON '.$db_prefix.'topics(forum_id)'; - $queries[] = 'CREATE INDEX '.$db_prefix.'topics_moved_to_idx ON '.$db_prefix.'topics(moved_to)'; - $queries[] = 'CREATE INDEX '.$db_prefix.'users_registered_idx ON '.$db_prefix.'users(registered)'; - $queries[] = 'CREATE INDEX '.$db_prefix.'users_username_idx ON '.$db_prefix.'users(username)'; - $queries[] = 'CREATE INDEX '.$db_prefix.'search_cache_ident_idx ON '.$db_prefix.'search_cache(ident)'; - $queries[] = 'CREATE INDEX '.$db_prefix.'search_words_id_idx ON '.$db_prefix.'search_words(id)'; - break; - } - - @reset($queries); - while (list(, $sql) = @each($queries)) - $pun_db->query($sql) or error('Unable to create indexes. Please check your configuration and try again.', __FILE__, __LINE__, $pun_db->error()); - - - - $now = time(); - - // Insert the four preset groups - $pun_db->query('INSERT INTO '.$pun_db->prefix."groups (g_title, g_user_title, g_read_board, g_post_replies, g_post_topics, g_post_polls, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood) VALUES('Administrators', 'Administrator', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0)") or error('Unable to add group', __FILE__, __LINE__, $pun_db->error()); - $pun_db->query('INSERT INTO '.$pun_db->prefix."groups (g_title, g_user_title, g_read_board, g_post_replies, g_post_topics, g_post_polls, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood) VALUES('Moderators', 'Moderator', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0)") or error('Unable to add group', __FILE__, __LINE__, $pun_db->error()); - $pun_db->query('INSERT INTO '.$pun_db->prefix."groups (g_title, g_user_title, g_read_board, g_post_replies, g_post_topics, g_post_polls, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood) VALUES('Guest', NULL, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0)") or error('Unable to add group', __FILE__, __LINE__, $pun_db->error()); - $pun_db->query('INSERT INTO '.$pun_db->prefix."groups (g_title, g_user_title, g_read_board, g_post_replies, g_post_topics, g_post_polls, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood) VALUES('Members', NULL, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 300, 60, 30)") or error('Unable to add group', __FILE__, __LINE__, $pun_db->error()); - - // Insert guest and first admin user - $pun_db->query('INSERT INTO '.$db_prefix."users (group_id, username, password, email) VALUES(3, 'Guest', 'Guest', 'Guest')") - or error('Unable to add guest user. Please check your configuration and try again.'); - - $pun_db->query('INSERT INTO '.$db_prefix."users (group_id, username, password, email, num_posts, last_post, registered, registration_ip, last_visit) VALUES(1, '".$pun_db->escape($username)."', '".pun_hash($password1)."', '$email', 1, ".$now.", ".$now.", '127.0.0.1', ".$now.')') - or error('Unable to add administrator user. Please check your configuration and try again.'); - - // Insert config data - $config = array( - 'o_cur_version' => "'$punbb_version'", - 'o_board_title' => "'My PunBB forum'", - 'o_board_desc' => "'Unfortunately no one can be told what PunBB is - you have to see it for yourself.'", - 'o_server_timezone' => "'0'", - 'o_time_format' => "'H:i:s'", - 'o_date_format' => "'Y-m-d'", - 'o_timeout_visit' => "'600'", - 'o_timeout_online' => "'300'", - 'o_redirect_delay' => "'1'", - 'o_show_version' => "'0'", - 'o_show_user_info' => "'1'", - 'o_show_post_count' => "'1'", - 'o_smilies' => "'1'", - 'o_smilies_sig' => "'1'", - 'o_make_links' => "'1'", - 'o_default_lang' => "'English'", - 'o_default_style' => "'Oxygen'", - 'o_default_user_group' => "'4'", - 'o_topic_review' => "'15'", - 'o_disp_topics_default' => "'30'", - 'o_disp_posts_default' => "'25'", - 'o_indent_num_spaces' => "'4'", - 'o_quickpost' => "'1'", - 'o_users_online' => "'1'", - 'o_censoring' => "'0'", - 'o_ranks' => "'1'", - 'o_show_dot' => "'0'", - 'o_quickjump' => "'1'", - 'o_gzip' => "'0'", - 'o_additional_navlinks' => "''", - 'o_report_method' => "'0'", - 'o_regs_report' => "'0'", - 'o_mailing_list' => "'$email'", - 'o_avatars' => "'1'", - 'o_avatars_dir' => "'img/avatars'", - 'o_avatars_width' => "'60'", - 'o_avatars_height' => "'60'", - 'o_avatars_size' => "'10240'", - 'o_search_all_forums' => "'1'", - 'o_base_url' => "'$base_url'", - 'o_admin_email' => "'$email'", - 'o_webmaster_email' => "'$email'", - 'o_subscriptions' => "'1'", - 'o_smtp_host' => "NULL", - 'o_smtp_user' => "NULL", - 'o_smtp_pass' => "NULL", - 'o_regs_allow' => "'1'", - 'o_regs_verify' => "'0'", - 'o_announcement' => "'0'", - 'o_announcement_message' => "'Enter your announcement here.'", - 'o_rules' => "'0'", - 'o_rules_message' => "'Enter your rules here.'", - 'o_maintenance' => "'0'", - 'o_maintenance_message' => "'The forums are temporarily down for maintenance. Please try again in a few minutes.
    \\n
    \\n/Administrator'", - 'p_mod_edit_users' => "'1'", - 'p_mod_rename_users' => "'0'", - 'p_mod_change_passwords' => "'0'", - 'p_mod_ban_users' => "'0'", - 'p_message_bbcode' => "'1'", - 'p_message_img_tag' => "'1'", - 'p_message_all_caps' => "'1'", - 'p_subject_all_caps' => "'1'", - 'p_sig_all_caps' => "'1'", - 'p_sig_bbcode' => "'1'", - 'p_sig_img_tag' => "'0'", - 'p_sig_length' => "'400'", - 'p_sig_lines' => "'4'", - 'p_allow_banned_email' => "'1'", - 'p_allow_dupe_email' => "'0'", - 'p_force_guest_email' => "'1'" - ); - - while (list($conf_name, $conf_value) = @each($config)) - { - $pun_db->query('INSERT INTO '.$db_prefix."config (conf_name, conf_value) VALUES('$conf_name', $conf_value)") - or error('Unable to insert into table '.$db_prefix.'config. Please check your configuration and try again.'); - } - - // Insert some other default data - $pun_db->query('INSERT INTO '.$db_prefix."categories (cat_name, disp_position) VALUES('Test category', 1)") - or error('Unable to insert into table '.$db_prefix.'categories. Please check your configuration and try again.'); - - $pun_db->query('INSERT INTO '.$db_prefix."forums (forum_name, forum_desc, num_topics, num_posts, last_post, last_post_id, last_poster, disp_position, cat_id) VALUES('Test forum', 'This is just a test forum', 1, 1, ".$now.", 1, '".$pun_db->escape($username)."', 1, 1)") - or error('Unable to insert into table '.$db_prefix.'forums. Please check your configuration and try again.'); - - $pun_db->query('INSERT INTO '.$db_prefix."topics (poster, subject, posted, last_post, last_post_id, last_poster, forum_id) VALUES('".$pun_db->escape($username)."', 'Test post', ".$now.", ".$now.", 1, '".$pun_db->escape($username)."', 1)") - or error('Unable to insert into table '.$db_prefix.'topics. Please check your configuration and try again.'); - - $pun_db->query('INSERT INTO '.$db_prefix."posts (poster, poster_id, poster_ip, message, posted, topic_id) VALUES('".$pun_db->escape($username)."', 2, '127.0.0.1', 'If you are looking at this (which I guess you are), the install of PunBB appears to have worked! Now log in and head over to the administration control panel to configure your forum.', ".$now.', 1)') - or error('Unable to insert into table '.$db_prefix.'posts. Please check your configuration and try again.'); - - $pun_db->query('INSERT INTO '.$db_prefix."ranks (rank, min_posts) VALUES('New member', 0)") - or error('Unable to insert into table '.$db_prefix.'ranks. Please check your configuration and try again.'); - - $pun_db->query('INSERT INTO '.$db_prefix."ranks (rank, min_posts) VALUES('Member', 10)") - or error('Unable to insert into table '.$db_prefix.'ranks. Please check your configuration and try again.'); - - - if ($db_type == 'pgsql' || $db_type == 'sqlite') - $pun_db->end_transaction(); - - - - $alerts = ''; - // Check if the cache directory is writable - if (!@is_writable('./cache/')) - $alerts .= '

    The cache directory is currently not writable! In order for PunBB to function properly, the directory named cache must be writable by PHP. Use chmod to set the appropriate directory permissions. If in doubt, chmod to 0777.

    '; - - // Check if default avatar directory is writable - if (!@is_writable('./img/avatars/')) - $alerts .= '

    The avatar directory is currently not writable! If you want users to be able to upload their own avatar images you must see to it that the directory named img/avatars is writable by PHP. You can later choose to save avatar images in a different directory (see Admin/Options). Use chmod to set the appropriate directory permissions. If in doubt, chmod to 0777.

    '; - - - /// Display config.php and give further instructions - $config = ' - - - - - -PunBB Installation - - - - -
    -
    - -
    -

    Final instructions

    -
    -
    -
    -
    -

    To finalize the installation all you need to do is to copy and paste the text in the text box below into a file called config.php and then upload this file to the root directory of your PunBB installation. Make sure there are no linebreaks or spaces before <?php. You can later edit config.php if you reconfigure your setup (e.g. change the database password or ).

    - -
    -
    - Copy contents to config.php -
    - -
    -
    -
    -
    -
    -

    Once you have created config.php with the contents above, PunBB is installed!

    -

    Go to forum index

    -
    -
    -
    -
    -
    - -
    -
    - - - - 'Administration', +'Start' => 'Start', +'Setup' => 'Setup', +'Users' => 'Users', +'Options' => 'Options', +'Management' => 'Management', +'Extensions' => 'Extensions', +'Moderate' => 'Moderate', + +// Page Menu Items +'Information' => 'Information', +'Categories' => 'Categories', +'Forums' => 'Forums', +'Searches' => 'Searches', +'User search' => 'User search', +'Groups' => 'Groups', +'Ranks' => 'Ranks', +'Bans' => 'Bans', +'Settings' => 'Settings', +'Essentials' => 'Essentials', +'Features' => 'Features', +'Communications' => 'Communications', +'Registration' => 'Registration', +'Content' => 'Content', +'Prune topics' => 'Prune topics', +'Reports' => 'Reports', +'Censoring' => 'Censoring', +'Manage extensions' => 'Manage extensions', +'Install extensions' => 'Install extensions', +'Rebuild index' => 'Rebuild index', + +// Common Items +'Add' => 'Add', +'Add new' => 'Add new', +'Delete' => 'Delete', +'Edit' => 'Edit', +'Update' => 'Update', +'Remove' => 'Remove', +'Forum' => 'Forum', +'Update all' => 'Update all', +'Position' => 'Position', +'Yes' => 'Yes', +'No' => 'No', +'Save changes' => 'Save changes', +'User groups' => 'User groups', +'Save' => 'Save', +'E-mail' => 'E-mail', +'Redirect' => 'Redirecting …', +'Category' => 'Category', +'Post replies' => 'Post replies', +'Post topics' => 'Post topics', +'Deleted user' => 'Deleted user', +'Failed plugin' => 'Failed to load plugin "%s".', +'Missing plugin' => 'There is no plugin in the plugin directory called "%s".', +'Skip to Admin menu' => 'Skip to Admin menu', +'All forums' => 'All forums', +'Warning' => 'Warning!', +'Important' => 'Important:', +'Cancel' => 'Cancel', +'Cancel redirect' => 'Operation cancelled. Redirecting …', +'Delete confirm head' => 'Delete confirmation', +'Requires confirmation' => '(Requires confirmation via seperate form)', +'Unknown' => 'Unknown', + + +// admin_bans +'Ban advanced' => 'Ban advanced settings', +'Ban advanced heading' => 'Ban by username with IP and e-mail or just ban by IP, by e-mail or both', +'Ban criteria legend' => 'Ban criteria', +'Ban settings legend' => 'Ban settings', +'Ban IP warning' => 'Warning! You should be very careful when banning an IP-range because of the possibility of multiple users matching the same partial IP.', +'Current ban head' => 'Ban created by %s', +'Username' => 'Username', +'Username to ban' => 'Username to ban', +'Ban creator' => 'Ban creator', +'IP-addresses to ban' => 'IP-addresses to ban', +'IP-addresses info' => 'The IP or IP-ranges you wish to ban (e.g. 150.11.110.1 or 150.11.110). Separate addresses with spaces. If an IP is entered already it is the last known IP of this user in the database.', +'IP-addresses info 2' => 'Click the following link to see IP statistics for this user: ', +'IP-addresses info link' => 'User IP statistics', +'E-mail/domain to ban' => 'E-mail/domain to ban', +'E-mail/domain info' => 'The e-mail or e-mail domain you wish to ban (e.g. someone@somewhere.com or somewhere.com). See "Allow registration with banned e-mail addresses" in Options/Registration for more info.', +'Ban message' => 'Ban message', +'Ban message info' => '(Displayed to the banned user when he/she visits the forums)', +'Expire date' => 'Ban expiry date', +'Expire date info' => 'The date when this ban should be automatically removed (format: YYYY-MM-DD). Leave blank to remove manually.', +'New ban heading' => 'Ban specified useraname', +'New ban legend' => 'New ban', +'Advanced ban info' => 'The next page will let you enter a custom IP and e-mail. If you just want to ban a specific IP/IP-range or e-mail just leave the username on this page blank.', +'Existing bans heading' => 'Edit or remove existing bans', +'Expires' => 'Expires', +'IP-ranges' => 'IP/IP-ranges', +'Reason' => 'Reason', +'No bans' => 'No bans in list', +'Ban removed' => 'Ban removed.', +'Ban added' => 'Ban added.', +'Ban edited' => 'Ban edited.', +'No user id message' => 'No user by that ID registered.', +'No user username message' => 'No user by that username registered. If you want to add a ban not tied to a specific username just leave the username blank.', +'User is admin message' => 'The user 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.', +'Must enter message' => 'You must enter either a username, an IP address or an e-mail address (at least).', +'Invalid IP message' => 'You entered an invalid IP/IP-range.', +'Can\'t ban guest user' => 'The guest user cannot be banned.', +'Invalid e-mail message' => 'The e-mail address (e.g. user@domain.com) or partial e-mail address domain (e.g. domain. com) you entered is invalid.', +'Invalid expire message' => 'You entered an invalid expire date. The format should be YYYY-MM-DD and the date must be at least one day in the future.', + +// admin_categories +'Category head' => 'Manage categories', +'Del category head' => '%s (together with all forums and posts it contains)', +'Add category head' => '%s (create a new category at the specified position)', +'Add category info' => 'Your new category will not appear on the board index page until at least one forum is added to it. To create a new forum in this category or to move an existing forum to it go to the %s page.', +'Del category info' => 'Select a category to be permanently deleted. When a category is deleted all forums and posts in that category will also be deleted. You will be asked to confirm deletion via a seperate form.', +'Add category' => 'Add category', +'New category intro' => 'Enter the name of your new category. You can edit the name of the category later (see below). To add forums to your new category go to %s.', // Link to admin/forums +'Delete category' => 'Delete category', +'Confirm delete cat' => 'You are deleting the category "%s"', +'Delete category intro' => 'Select the name of the category you want to delete. You will be asked to confirm your choice of category for deletion before it is deleted.', +'Category to delete' => 'Category to delete', +'Delete category warning' => 'WARNING! Deleting a category will delete all forums and posts (if any) in that category!', +'New category name' => 'New category name', +'Edit categories head' => '%s (change category names and/or positions)', +'Edit categories' => 'Edit categories', +'Edit category name' => 'Edit category', +'Change category position' => 'Change position', +'Categories updated' => 'Categories updated.', +'Category added' => 'Category added.', +'Category deleted' => 'Category deleted.', +'Must name category' => 'You must enter a name for the category', +'Must enter category' => 'You must enter a category name.', +'Must be integer' => 'Position must be an integer value', +'Category position help' => '(Relative to other categories on index page)', + + +// admin_censoring +'Add censored word head' => 'Add new censored word', +'Add censored word legend' => 'Add word', +'Add censored word intro' => 'Enter a word that you want to censor and the replacement text for this word. Wildcards are accepted (i.e. *some* would match somewhere and lonesome). Censor words also affect usernames. New users will not be able to register with usernames containing any censored words. The search is case insensitive. For this to have any effect "Censor words" must be enabled in %s.', +'Censored word' => 'Censored word ', +'Censored replacement text' => 'Replace with ', +'Edit censored word legend' => 'Edit/remove words', +'No censored words' => 'No censor words in list.', +'Censor word added' => 'Censor word added.', +'Censor word updated' => 'Censor word updated.', +'Censor word removed' => 'Censor word removed.', +'Must enter text message' => 'You must enter both text to search for and text to replace with.', + +// admin_extensions +'Install extension' => 'Install extension', +'Extensions available' => 'Extensions available for install', +'Installed extensions' => 'Installed extensions', +'Installed extensions warn' => 'WARNING! If you uninstall an extension, any data associated with that extension will be permanently deleted from the database and cannot be restored by re-installing the extension. If you wish to retain the data then you should disable the extension instead.', +'Uninstall extension' => 'Uninstall extension', +'Uninstall' => 'Uninstall', +'Uninstall extension confirm' => 'Are you sure you want to uninstall the extension "%s"?', +'Enable' => 'Enable', +'Disable' => 'Disable', +'Extension error' => 'Error:', +'Extension loading error' => 'Loading of extension "%s" failed.', +'Illegal ID' => 'The ID must contain only lowercase alphanumeric characters (a-z and 0-9) and the underscore character (_).', +'Maxtestedon warning' => 'This extension has not been explicitly tested on your PunBB version and might therefore not be compatible with your current setup.', +'Missing manifest' => 'Missing manifest.xml.', +'Failed parse manifest' => 'Unable to parse manifest.xml.', +'extension root error' => 'Root element extension is malformed or missing.', +'extension/engine error' => 'Root element engine attribute is malformed or missing.', +'extension/engine error2' => 'Extension format version is unsupported.', +'extension/id error' => 'Element extension/id is malformed or missing.', +'extension/id error2' => 'Element extension/id does not match the extension folder name.', +'extension/title error' => 'Element extension/title is malformed or missing.', +'extension/version error' => 'Element extension/version is malformed or missing.', +'extension/description error' => 'Element extension/description is malformed or missing.', +'extension/author error' => 'Element extension/author is malformed or missing.', +'extension/minversion error' => 'Element extension/minversion is malformed or missing.', +'extension/minversion error2' => 'This extension requires PunBB %s or later.', +'extension/maxtestedon error' => 'Element extension/maxtestedon is malformed or missing.', +'extension/note error' => 'Element extension/note is malformed.', +'extension/note error2' => 'Element extension/note has malformed or missing attribute "type".', +'extension/hooks/hook error' => 'Element extension/hooks/hook is malformed or missing.', +'extension/hooks/hook error2' => 'Element extension/hooks/hook is missing attribute "id".', +'No XML support' => 'This PHP environment doesn\'t have XML support built in. XML support is required if you want to use PunBB extensions. Consult the PHP documentation for further assistance.', +'No installed extensions' => 'There are no installed extensions.', +'No available extensions' => 'There are no extensions available for install or upgrade.', +'Invalid extensions' => 'IMPORTANT! The extensions listed below were found in the extensions folder but are not available for install or upgrade because the errors displayed below were detected.', +'Extension installed' => 'Extension installed.', +'Extension installed info' => 'The extension was successfully installed, but reported the following notices.', +'Extension uninstalled' => 'Extension uninstalled.', +'Extension uninstalled info' => 'The extension was successfully uninstalled, but reported the following notices.', +'Install note' => 'Please read before installing', +'Uninstall note' => 'Please read before uninstalling', +'Hotfix download failed' => 'Download and install of a hotfix extension failed. Please wait a while and try again.', +'Extension disabled' => 'Extension disabled', +'Extension enabled' => 'Extension enabled', +'Extension by' => 'Created by %s', +'Hotfix description' => 'This hotfix for your PunBB installation was detected by automatic update.', +'Install hotfix' => 'Install hotfix', + +// admin_forums +'Delete forum' => 'Delete forum', +'Delete forum warning' => 'WARNING! Deleting a forum will delete all posts (if any) in that forum!', +'Edit details head' => '%s. Edit forum details', +'Edit permissions head' => '%s. Set group permissions for this forum', +'Edit forum' => 'Edit forum', +'Edit forum details legend' => 'Forum details:', +'Category assignment' => 'Assign to category', +'Edit forum perms legend' => 'Forum group permissions (non default permissions are suffixed "(S)":', +'Group permissions' => 'Group permissions', +'Group key' => 'Permissions are the defaults as set in %s unless suffixed "(S)"', +'Forum name' => 'Forum name', +'Forum description' => 'Description', +'Forum description help' => '(You may use HTML in your description)', +'Sort topics by' => 'Sort topics by', +'Sort last post' => 'Last post', +'Sort topic start' => 'Topic start', +'Redirect URL' => 'Redirect URL', +'Edit forums head' => 'Edit, delete or change the position of forums', +'Edit forum details head' => 'Edit forum\'s details and group permissions', +'Confirm delete forum' => 'You are deleting the forum "%s"', +'Administrators' => 'Administrators', +'Admin full perms' => '[ Always have full permissions ]', +'Forum perms info 1' => 'The "Read forum" permission checkbox will be disabled if the group in question lacks the "Read board" permission.', +'Forum perms info 2' => 'This is a redirect forum. Only the "Read forum" permission is editable.', +'Forum perms info 3' => 'Permissions can be restored to default settings using the "Default permissions" button below.', +'Not default' => '(S)', +'Read forum' => 'Read forum', +'Restore defaults' => 'Default permissions', +'Add forum' => 'Add forum', +'Add forum head' => 'Add a new forum to the selected category at the specified position', +'Add forum legend' => 'Add forum:', +'Forum position help' => '(Relative to other forums within category)', +'Add to category' => 'Add to category', +'Update positions' => 'Update positions', +'Forum added' => 'Forum added.', +'Forum deleted' => 'Forum deleted.', +'Forums updated' => 'Forums updated.', +'Forum updated' => 'Forum updated.', +'Permissions reverted' => 'Permissions reverted to defaults.', +'Must enter forum message' => 'You must enter a forum name.', + +// admin_groups +'Group settings heading' => 'Group\'s default permission that apply when no forum specific permissions are set', +'Group title' => 'Group title', +'User title' => 'User title', +'Group title head' => '%s. Group and user title', +'Group perms head' => '%s. Group permissions', +'Group flood head' => '%s. Group flood protection settings', +'User title info' => 'This title will override any rank users in this group have attained. Leave blank to use default title or rank.', +'Permissions' => 'Permissions', +'Moderation' => 'Moderation', +'Allow moderate' => 'Allow users moderator privileges.', +'Allow mod edit profiles' => 'Allow moderators to edit user profiles.', +'Allow mod edit username' => 'Allow moderators to rename users.', +'Allow mod change pass' => 'Allow moderators to change user passwords.', +'Allow mod bans' => 'Allow moderators to ban users.', +'Allow read board' => 'Allow users to view the board.', +'Allow read board info' => 'This setting applies to every aspect of the board and can, if disabled, not be overridden by forum specific read permissions. If this is disabled, users in this group will only be able to login/logout and register.', +'Allow view users' => 'Allow users to view the userlist and user profiles.', +'Allow post replies' => 'Allow users to post replies in topics.', +'Allow post topics' => 'Allow users to post new topics.', +'Allow edit posts' => 'Allow users to edit their own posts.', +'Allow delete posts' => 'Allow users to delete their own posts.', +'Allow delete topics' => 'Allow users to delete their own topics (including any replies).', +'Allow set user title' => 'Allow users to set their own user titles.', +'Allow use search' => 'Allow users to use the search feature.', +'Allow search users' => 'Allow users to freetext search for users in the user list.', +'Restrictions' => 'Restrictions', +'Mod permissions' => 'Moderator permissions', +'User permissions' => 'User permissions', +'Edit interval' => 'Edit subjects interval', +'Edit interval info' => 'Number of seconds after post time that users in this group may edit the subject of topics they have posted. Set to 0 to allow edits indefinitely.', +'Flood interval' => 'Post flood interval', +'Flood interval info' => 'Number of seconds that users in this group have to wait between posts. Set to 0 to disable.', +'Search interval' => 'Search flood interval', +'Search interval info' => 'Number of seconds that users in this group have to wait between searches. Set to 0 to disable.', +'Mods warning' => 'Please note that in order for a user in this group to have moderator abilities, he/she must be assigned to moderate one or more forums. This is done via the user administration page of the user\'s profile.', +'Remove group' => 'Remove group', +'Remove group head' => 'Remove "%s" group which contains %s members', +'Remove group help' => '(Transfer current members to this group)', +'Move users to' => 'Move users to', +'Cannot remove default group' => 'The default group cannot be removed. In order to delete this group, you must first setup a different group as the default.', +'Add group heading' => 'Add new group (will inherit the permissions of the group it is based on)', +'Edit group heading' => 'Edit existing group', +'Base new group' => 'Base new group on', +'Add group' => 'Add new group', +'Default group heading' => 'Default group for new users (administrator/moderator groups not available for security reasons)', +'Default group' => 'Default group', +'Set default' => 'Set default', +'Existing groups heading' => 'Existing groups', +'Existing groups intro' => 'The pre-defined groups Guests, Administrators and Members cannot be removed. They can however be edited. Please note though, that in some groups, certain options are unavailable (e.g. the "edit posts" permission for guests). Administrators always have full permissions.', +'Group removed' => 'Group removed.', +'Default group set' => 'Default group set.', +'Group added' => 'Group added.', +'Group edited' => 'Group edited.', +'Must enter group message' => 'You must enter a group title.', +'Already a group message' => 'There is already a group with the title "%s".', +'Moderator default group' => 'Due to the fact that this group is the default group for new users, it can not be assigned moderator privileges.', + +// admin_index +'Information head' => 'Welcome to PunBB administration control panel', +'Welcome info' => 'From here you can control vital aspects of the forum. Depending on whether you are an administrator or a moderator you can enable and disable features, manage users and groups, create and manage categories and forums, manage extensions and maintain your PunBB installation in good order.', +'Forum information head' => 'Forum information', +'PunBB version' => 'PunBB version', +'Check for updates enabled' => 'This board is setup to automatically check for updates and hotfixes against the PunBB.org updates service.', +'Check for updates manual' => 'Check for updates', // Link text +'Server load' => 'Server load', +'users online' => 'users online', +'Environment' => 'Environment', +'Operating system' => 'Operating system', +'Show info' => 'Show info', +'Accelerator' => 'Accelerator', +'Database' => 'Database', +'Rows' => 'Rows', +'Size' => 'Size', +'phpinfo disabled' => 'The PHP function phpinfo() has been disabled on this server.', +'Not available' => 'Not available', + +// admin_reindex +'Reindex heading' => 'Rebuild search index to restore search performance', +'Rebuild index legend' => 'Rebuild search index', +'Reindex info' => 'If you have added, edited or removed posts manually in the database or if you are having problems searching, you should rebuild the search index. For best performance you should put the forum in maintenance mode during rebuilding. Once the process has completed you will be redirected back to this page. It is highly recommended that you have JavaScript enabled in your browser during rebuilding (for automatic redirect when a cycle has completed).', +'Reindex warning' => 'IMPORTANT! Rebuilding the search index can take a long time and will increase server load during the rebuild process. If you are forced to abort the rebuild process, make a note of the last processed post ID and enter that ID+1 in "Starting post ID" when/if you want to continue.', +'Empty index warning' => 'WARNING! You cannot resume an aborted rebuild if "empty index" has been selected.', +'Posts per cycle' => 'Posts per cycle', +'Posts per cycle info' => 'The number of posts to process per pageview. E.g. if you were to enter 100, one hundred posts would be processed and then the page would refresh. This is to prevent the script from timing out during the rebuild process.', +'Starting post' => 'Starting Post ID', +'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.', +'Empty index' => 'Empty index', +'Empty index info' => 'Empty search index before rebuilding (see below).', +'Rebuild index' => 'Rebuild index', +'Rebuilding index' => 'Rebuilding index … This might be a good time to put on some coffee :-)', +'Processing post' => 'Processing post %s in topic %s.', +'Javascript redirect' => 'JavaScript redirect unsuccessful.', +'Click to continue' => 'Click here to continue', + +// admin_options - essentials +'Essentials head' => 'Setup PunBB', +'Essentials personal head' => '%s. Personalize your PunBB installation', +'Essentials local head' => '%s. Configure PunBB for your location', +'Essentials automatic head' => '%s. Automatically check for updates', +'Essentials automatic info' => 'PunBB is able to periodically check if there are any important updates to your software. The updates may be new releases or hotfix extensions. When updates are available a message will appear to administrators near the top of your board.', +'Essentials URL head' => '%s. Setup URL Scheme (SEF URL\'s ) for your boards pages', +'Essentials links head' => '%s. Add your own links to the main navigation menu', +'Essentials links info' => 'By entering HTML hyperlinks into this textbox, any number of items can be added to the navigation menu at the top of all pages. The format for adding new links is X = <a href="URL">LINK</a> where X is the position at which the link should be inserted (e.g. 0 to insert at the beginning and 2 to insert after "User list"). Separate entries with a linebreak.', +'Essentials gzip head' => '%s. Compress output using GZip', +'Essentials mail head' => '%s. Forum e-mail addresses and mailing list', +'Personalize legend' => 'Personalize your board:', +'Addressing legend' => 'Board URLs', +'Compression legend' => 'Output compression:', +'Enable gzip' => 'Enable GZIP:', +'Board defaults legend' => 'Local settings:', +'Updates legend' => 'Updates:', +'Timeouts legend' => 'Default timeouts:', +'Board menu legend' => 'Board navigation', +'Board title' => 'Board title', +'Board description' => 'Board description', +'Board description help' => '(You may use HTML in the description)', +'URL scheme' => 'URL scheme', +'URL scheme help' => '(Make sure you have read and understood the information above)', +'URL scheme info' => 'WARNING! If you select any scheme other than the default scheme you must copy/upload the file .htaccess from the extras directory into the forum root directory. The server that hosts the forums must be configured with mod_rewrite support and must allow the use of .htaccess files. For servers other than Apache, please refer to your servers documentation.', +'Default timezone' => 'Default timezone', +'Default language' => 'Default language', +'Default language help' => '(If you remove a language pack you must update this setting)', +'Default style' => 'Default style', +'Time format' => 'Time format', +'Date format' => 'Date format', +'Current format' => 'Current format:', +'Check for updates' => 'Check for updates', +'Auto check for updates' => 'Enable automatic update checking.', +'Updates info' => 'If you enable automatic updates PunBB will periodically check if there are any important updates to your software. The updates may be new releases or hotfix extensions. When updates are available a message will appear near the top of your board.', +'Auto check disabled' => 'The ability to automatically check for updates has been disabled. In order to support this feature, the PHP environment under which PunBB runs, must support either the cURL extension, the fsockopen() function or be configured with allow_url_fopen enabled.', +'Visit timeout' => 'Visit timeout', +'Visit timeout info' => '(Seconds idle before last visit data is updated)', +'Online timeout' => 'Online timeout', +'Online timeout info' => '(Seconds idle before being removed from the online users list)', +'Redirect time' => 'Redirect wait', +'Redirect time info' => '(If set to 0 seconds, no redirect page will be displayed: not recommended).', +'Additional menu items' => 'Additional menu items', +'Maintenance head' => 'Setup maintenance message and activate maintenance mode', +'Maintenance mode' => 'Maintenance mode', +'Board maintenance legend' => 'Maintenance:', +'Enable maintenance mode' => 'Enable maintenance mode', +'Maintenance mode label' => 'Put board into maintenance mode.', +'Maintenance mode info' => 'IMPORTANT! 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.', +'Maintenance mode warn' => 'WARNING! DO NOT LOGOUT when the board is in maintenance mode. You will not be able to login again.', +'Maintenance message' => 'Maintenance message', +'Maintenance message help' => '(The message to be be shown when the board is in maintenance mode. You may use the default message provided or compose your own. You may use html in your message)', +'Maintenance message default' => 'The forums are temporarily down for maintenance. Please try again in a few minutes.

    Administrator', +'GZip output' => 'Enable output compression using GZip.', +'GZip info' => 'If enabled, PunBB will gzip the output sent to browsers. This will reduce bandwidth usage, but use a little more CPU. This feature requires that PHP is configured with zlib (--with-zlib). Note: If you already have one of the Apache modules mod_gzip or mod_deflate set up to compress PHP scripts, you should disable this feature.', + +// admin_options - features +'User part head' => '%s. User features and information', +'General part head' => '%s. General features (go to %s to setup censored words list)', +'Timeout part head' => '%s. Timeouts and redirect (set defaults for idle times and redirect delay)', +'Report part head' => '%s. Reports of posts and topics may be sent via internal system, e-mail or both', +'Announcement part head' => '%s. Announcement to be displayed on all pages of your board', +'Subscriptions' => 'Subscriptions', +'Searching' => 'Searching', +'User ranks' => 'User ranks', +'Guest posting' => 'Guest posting', +'Online list' => 'Online list', +'User has posted' => 'User has posted', +'User post count' => 'User post count', +'User info' => 'User info in posts', +'Topic views' => 'Topic views', +'Quick post' => 'Quick post', +'Censor words' => 'Censoring', +'Show version' => 'Show version', +'Quick jump' => 'Quick jump menu', + + +'User features' => 'User features', +'Mods legend' => 'Moderator options', +'User information' => 'User information', +'General features' => 'General features', +'Subscriptions info' => 'Allow users to subscribe to topics (receive e-mail when someone replies).', +'Search all forums' => 'Allow users to search all forums instead of one forum at a time. Disable if server load is high due to excessive searching.', +'Show version info' => 'Show PunBB version number in the footer.', +'Users online info' => 'Display list of guests and registered users online.', +'User info in posts' => 'Show poster location, register date, post count, e-mail and URL in posts.', +'User post count info' => 'Show user post count in posts, profile and userlist.', +'User has posted info' => '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.', +'Topic views info' => 'Keep track of the number of views a topic has. Disable if you are experiencing high server load in a busy forum.', +'Quick post info' => 'Add a quick post form at the foot of topics.', +'Censor words info' => 'Enable censoring of specific words.', +'User ranks info' => 'Enable user ranking based on number of posts.', +'Quick jump info' => 'Enable the quick jump (jump to forum) drop list.', +'Require guest email' => 'Guests must supply e-mail addresses when posting.', + + +// admin_options - content +'Posting part head' => '%s. Topic and post features and information', +'Message part head' => '%s. Topic and post content', +'Sigs part head' => '%s. User signatures and signature content', +'Avatars part head' => '%s. User avatars (upload and size settings)', +'Posts and sigs' => 'Content (Posts and Signatures)', +'Post content' => 'Message content', +'Signature content' => 'Signature content', +'Allow avatars' => 'Allow avatars', +'Allow capitals' => 'Allow all capitals', +'Indent size' => '[code] tag indent size', +'Allow signatures' => 'Allow signatures', +'Indent size info' => '(Indent text by this many spaces. If set to 8, a regular tab will be used)', +'Max sig length' => 'Signature length', +'Max sig lines' => 'Signature lines', +'Avatars' => 'Content (Avatars)', +'Avatars intro' => 'Enable or disable the uploading of avatars by users for display in posts. Enter the directory where uploaded avatars will be stored and set the maximum dimensions and file size for uploaded avatars.', +'Use avatars' => 'Use avatars', +'Use avatars info' => 'Allow users to upload avatars for display in posts.', +'Upload directory' => 'Avatar upload directory', +'Upload directory info' => 'Relative to the PunBB root directory. PHP must have write permissions to this directory.', +'Max width' => 'Avatar max width', +'Max width info' => 'Pixels (60 is recommended).', +'Max height' => 'Avatar max height', +'Max height info' => 'Pixels (60 is recommended).', +'Max size' => 'Avatar max size', +'Max size info' => 'Bytes (10240 is recommended).', +'Pagination' => '%s. Pagination defaults for topics, posts and topic review', +'Pagination intro' => 'Set defaults for the number of topics and posts to display per page. Set the default for the number of posts to be displayed in the topic review which appears when posting a new message. All these settings can be changed by users in their profiles.', +'Allow BBCode' => 'Allow BBCode in posts (recommended).', +'Allow img' => 'Allow BBCode [img] tag in posts.', +'All caps message' => 'Allow messages to contain only capital letters.', +'All caps subject' => 'Allow subjects to contain only capital letters.', +'Signatures' => 'Signatures', +'Allow signatures info' => 'Allow users to attach a signature to their posts.', +'BBCode in sigs' => 'Allow BBCode in signatures.', +'Img in sigs' => 'Allow BBCode [img] tag in signatures (not recommended).', +'All caps sigs' => 'Allow signatures to contain only capital letters.', +'Max sig length info' => 'Maximum number of characters a signature may contain.', +'Max sig lines info' => 'Maximum number of lines a signature may contain.', +'Smilies in posts' => 'Convert smilies to small icons in posts.', +'Smilies in signatures' => 'Convert smilies to small icons in user signatures.', +'Make clickable links' => 'Detect and convert URL\'s in posts to clickable hyperlinks.', +'Topic review' => 'Topic review', +'Topic review info' => 'Ordered newest first. 0 to disable.', +'Topics per page' => 'Topics per page', +'Posts per page' => 'Posts per page', + +// admin_options - communications +'E-mail head' => 'E-mail', +'Essentials e-mail head' => '%s. Mail server configuration for sending e-mails from the forum', +'Webmaster e-mail help' => '(The "from" address of e-mails sent by the forum)', +'E-mail addresses legend' => 'E-mail addresses:', +'E-mail server legend' => 'E-mail server:', +'Admin e-mail' => 'Administrator\'s e-mail', +'Webmaster e-mail' => 'Webmaster e-mail', +'SMTP server address' => 'SMTP server address', +'SMTP server info' => 'In most cases PunBB will be able to send e-mail using your local e-mail program in which case you can ignore the following settings. PunBB can be configured to use an external mail server. Enter the address of the external server and, if required, specify a custom port number if the SMTP server doesn\'t run on the default port 25 (example: mail.myhost.com:3580).', +'SMTP server address help' => '(For external servers. Leave blank to use local mail program)', +'SMTP username' => 'SMTP username', +'SMTP username help' => '(Not required by most SMTP servers)', +'SMTP password' => 'SMTP password', +'SMTP password help' => '(Not required by mosts SMTP servers)', +'SMTP SSL' => 'SSL for SMTP', +'SMTP SSL info' => 'Encrypt SMTP connection using SSL if your version of PHP supports SSL and your SMTP server requires it.', +'Announcement' => 'Communications (Announcements)', +'Announcement legend' => 'Announcement:', +'Enable announcement' => 'Enable announcement', +'Enable announcement info' => 'Display an announcement message.', +'Announcement heading' => 'Announcement heading', +'Announcement message' => 'Announcement message', +'Announcement message help' => '(You may use HTML in your message. Announcements are not parsed like posts)', +'Announcement message default' => '

    Enter your announcement here.

    ', +'Reports part head' => '%s. Reporting system settings', +'Reports intro' => 'Select the method for handling topic/post reports. You can choose whether topic/post reports should be handled by the internal report system, e-mailed to the addresses on the mailing list (see below) or both. You may also choose to have new registrations reported to people on the mailing list.', +'Report method' => 'Report method', +'Report internal' => 'By internal report system.', +'Report both' => 'Both by internal report system and by e-mail to those on mailing list.', +'Report email' => 'By e-mail to those on mailing list.', +'Report new registrations' => 'Notify by e-mail', +'Report new registrations info' => 'Notify users on the mailing list when new users register in the forums.', +'Mail list legend' => 'Mailing list', +'Mailing list' => 'Create mailing list', +'Mailing list help' => 'A comma separated list of recipients of reports and/or new registration notifications.', + +// admin_options - registration +'Registration head' => 'Registration', +'Allow reg head' => '%s. New registrations', +'New reg info' => 'You may choose to verify all new registration. When registration verification is enabled, users are e-mailed a random password when they register. They can then log in and change the password in their profile if they see fit. This feature also requires users to verify new e-mail addresses if they choose to change from the e-mail addresses they registered with. This is an effective way of avoiding registration abuse and making sure that all users have "correct" e-mail addresses in their profiles.', +'New registrations' => 'New registrations', +'Allow registrations' => 'Allow registrations', +'Registration intro' => 'Enable or disable new registrations and set whether or not you wish new registrations to be verified by e-mail. Enable or disable registration with banned e-mail addresses or an e-mail address that another user already has. If a banned or duplicate e-mail address is detected an alert e-mail will be sent to the mailing list (an effective way of detecting multiple registrations).', +'Registration legend' => 'Registration settings', +'Registration e-mail' => 'Registration e-mail', +'Allow new registrations' => 'Allow new users to register. Disable only under special circumstances.', +'Allow banned email' => 'Allow registration with banned e-mail addresses.', +'Allow dupe email' => 'Allow registration with duplicate e-mail addresses.', +'Verify registrations' => 'Verify registrations', +'Enable verify registrations' => 'Require verification of all new registrations by e-mail.', +'Verify registrations info' => 'When enabled, users are e-mailed a random password when they register. They can then log in and change the password in their profile if they see fit. This feature also requires users to verify new e-mail addresses if they choose to change from the e-mail addresses they registered with. This is an effective way of avoiding registration abuse and making sure that all users have "correct" e-mail addresses in their profiles.', +'Rules part head' => '%s. Forum rules (enable and compose forum rules)', +'Rules legend' => 'Forum rules', +'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.', +'Use rules' => 'Use rules', +'Compose rules help' => '(You may use HTML as text is not parsed. Leaving empty disables the use of rules)', +'Require rules' => 'Require users to agree to forum rules.', +'Compose rules' => 'Compose rules', +'Rules default' => 'Enter your rules here.', +'Error no board title' => 'You must enter a board title.', +'Error invalid admin e-mail' => 'The admin e-mail address you entered is invalid.', +'Error invalid web e-mail' => 'The webmaster e-mail address you entered is invalid.', +'Error timeout value' => 'The value of "Timeout online" must be smaller than the value of "Timeout visit".', +'Options updated' => 'Settings updated.', + +// admin_prune +'Prune settings head' => 'Prune topics according to age of latest post and forum', +'Prune legend' => 'Select posts to prune', +'Confirm prune heading' => 'Confirm prune topics', +'Prune details head' => 'Confirm prune topics from: %s', +'Prune topics info 1' => 'WARNING! Pruning will permanently delete %s topics%s.', +'Prune topics info 2' => 'The topics being deleted do not contain posts newer than %s days old.', +'Include sticky' => 'including sticky topics', +'Days old' => 'Days old', +'Number of topics' => 'Number of topics', +'Prune caution' => 'IMPORTANT! Use this feature with caution. Pruned posts can NEVER be recovered. For best performance you should put the forum in maintenance mode during pruning.', +'Days old' => 'Days old', +'Prune intro' => 'You may prune topics from all forums or from one particular forum. Topics will be pruned according to the value you specify for "Days old". E.g. if you were to enter 30, every topic that didn\'t contain a post dated less than 30 days old would be deleted.', +'Prune sticky' => 'Prune sticky topics', +'Prune sticky enable' => 'Enable pruning of sticky topics.', +'Prune from' => 'Prune from forum', +'Days to prune message' => 'Days to prune must be a positive integer.', +'No days old message' => 'There are no topics that are as old as you have specified. Please decrease the value of "Days old" and try again.', + +// admin_ranks +'Rank' => 'Rank', +'Rank added' => 'Rank added.', +'Title message' => 'You must enter a rank title.', +'Min posts message' => 'Minimum posts must be a positive integer value.', +'Min posts occupied message' => 'There is already a rank with a minimum posts value of %s.', +'Rank updated' => 'Rank updated', +'Rank removed' => 'Rank removed', +'Add rank intro' => 'Enter a rank and the minimum number of posts that a user has to have to acquire the rank. Different ranks cannot have the same value for minimum posts. If a title is set for a user, the title will be displayed instead of any rank. For this to have any effect "User ranks" must be enabled in %s.', +'Add rank' => 'Add rank', +'Add new rank' => 'Add new rank', +'Add rank legend' => 'New rank details', +'Rank title' => 'Rank title', +'Min posts' => 'Minimum posts', +'Existing ranks' => 'Existing ranks', +'Existing ranks intro' => 'Edit or remove existing user ranks.', +'No ranks' => 'No ranks in list', + +// admin_reports +'No reports selected' => 'No reports were selected to be marked as read.', +'Reports marked read' => 'Reports marked as read.', +'New reports heading' => 'New reports (select and mark as read once dealt with)', +'Reported by' => 'Report %s by %s', +'Deleted forum' => 'Deleted forum', +'Deleted topic' => 'Deleted topic', +'Deleted post' => 'Deleted post', +'Deleted user' => 'Deleted user', +'Mark read' => 'Mark as read', +'Select report' => 'Select report', +'No new reports' => 'There are no new reports.', +'Read reports heading' => 'Last 10 reports marked as read', +'No read reports' => 'There are no read reports.', +'Marked read by' => '[ Read %s by %s ]', + +// admin_users +'User IP search head' => 'Search for users and IP addresses', +'User search head' => 'Search for users using one or more criteria. Use wildcard character * for partial matches.', +'User search legend' => 'Search criteria (Use wildcard character * for partial matches)', +'User results legend' => 'Search results', +'Users matching criteria' => 'Results matching user search criteria', +'User IP stats' => 'IP statistics for user', +'IP matching criteria' => 'Results matching IP address', +'Users found' => 'Users found [ %s ]', +'IP addresses found' => 'IP addresses found [ %s ]', +'IP search head' => 'Search for a specific IP address in the post database', +'IP search legend' => 'Enter IP to search for', +'Moderate users' => 'Moderate users', +'E-mail address' => 'E-mail address', +'Title' => 'Title', +'Real name' => 'Real name', +'Website' => 'Website', +'Location' => 'Location', +'Signature' => 'Signature', +'Admin note' => 'Admin note', +'More posts than' => 'More posts than', +'Less posts than' => 'Less posts than', +'Number of posts' => '(Number of posts)', +'Last post after' => 'Last post is after', +'Last post before' => 'Last post is before', +'Registered after' => 'Registered after', +'Registered before' => 'Registered before', +'Order by' => 'Order by', +'Sort order' => 'Sort order', +'User group' => 'User group', +'IP address' => 'IP address', +'Submit search' => 'Submit search', +'Not verified' => 'Not verified', +'Registered' => 'registered', +'Last post' => 'last post', +'Ascending' => 'ascending', +'Descending' => 'descending', +'All groups' => 'All groups', +'Unverified users' => 'Unverified users', +'Non numeric value message' => 'You entered a non-numeric value into a numeric only column.', +'Invalid date/time message' => 'You entered an invalid date/time.', +'No search terms message' => 'You didn\'t enter any search terms.', +'Delete users' => 'Delete users', +'Delete warning' => 'WARNING! Deleted users and/or posts cannot be restored. If you choose not to delete the posts made by these users, the posts can only be deleted manually at a later time.', +'Delete posts legend' => 'You may choose to delete posts these users have made', +'Confirm delete' => 'Confirm delete', +'Delete posts' => 'Delete posts', +'Delete posts label' => 'Enable to delete all posts and topics these users have made.', +'Users deleted' => 'Users deleted.', +'Ban' => 'Ban', +'Ban users' => 'Ban users', +'Change group' => 'Change group', +'Delete admin message' => 'Administrators cannot be deleted. In order to delete an administrator, you must first move him/her to a different user group.', +'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.', +'Users banned' => 'Users banned.', +'Mass ban info' => 'You may set a message to be displayed to the banned users and set the date their bans are to expire.', +'Change group head' => 'Move the selected users to a new group', +'User groups updated' => 'User groups updated.', +'Move users legend' => 'Move users', +'No users selected' => 'No users selected', + +// admin_users tables +'Username column' => 'Username - E-mail - Admin notes', +'Title column' => 'Title - Status', +'Posts' => 'Posts', +'Actions' => 'Action(s)', +'View IP stats' => 'View IP stats', +'Show posts' => 'Show posts', +'Last used' => 'Last used', +'Times found' => 'Times found', +'Find more users' => 'Find more users for this IP', +'No posts by user' => 'There are currently no posts by that user in the forum.', +'Guest' => 'Guest', +'Cannot find IP' => 'The supplied IP address could not be found in the database.', +'Not verified' => 'Not verified', +'No match' => 'No match', +'User search results' => 'User search results' + +); diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/English/common.php --- a/punbb/lang/English/common.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,153 +0,0 @@ - 'ltr', // ltr (Left-To-Right) or rtl (Right-To-Left) -'lang_encoding' => 'iso-8859-1', -'lang_multibyte' => false, - -// Notices -'Bad request' => 'Bad request. The link you followed is incorrect or outdated.', -'No view' => 'You do not have permission to view these forums.', -'No permission' => 'You do not have permission to access this page.', -'Bad referrer' => 'Bad HTTP_REFERER. You were referred to this page from an unauthorized source. If the problem persists please make sure that \'Base URL\' is correctly set in Admin/Options and that you are visiting the forum by navigating to that URL. More information regarding the referrer check can be found in the PunBB documentation.', - -// Topic/forum indicators -'New icon' => 'There are new posts', -'Normal icon' => '', -'Closed icon' => 'This topic is closed', -'Redirect icon' => 'Redirected forum', - -// Miscellaneous -'Announcement' => 'Announcement', -'Options' => 'Options', -'Actions' => 'Actions', -'Submit' => 'Submit', // "name" of submit buttons -'Ban message' => 'You are banned from this forum.', -'Ban message 2' => 'The ban expires at the end of', -'Ban message 3' => 'The administrator or moderator that banned you left the following message:', -'Ban message 4' => 'Please direct any inquiries to the forum administrator at', -'Never' => 'Never', -'Today' => 'Today', -'Yesterday' => 'Yesterday', -'Info' => 'Info', // a common table header -'Go back' => 'Go back', -'Maintenance' => 'Maintenance', -'Redirecting' => 'Redirecting', -'Click redirect' => 'Click here if you do not want to wait any longer (or if your browser does not automatically forward you)', -'on' => 'on', // as in "BBCode is on" -'off' => 'off', -'Invalid e-mail' => 'The e-mail address you entered is invalid.', -'required field' => 'is a required field in this form.', // for javascript form validation -'Last post' => 'Last post', -'by' => 'by', // as in last post by someuser -'New posts' => 'New posts', // the link that leads to the first new post (use   for spaces) -'New posts info' => 'Go to the first new post in this topic.', // the popup text for new posts links -'Username' => 'Username', -'Password' => 'Password', -'E-mail' => 'E-mail', -'Send e-mail' => 'Send e-mail', -'Moderated by' => 'Moderated by', -'Registered' => 'Registered', -'Subject' => 'Subject', -'Message' => 'Message', -'Topic' => 'Topic', -'Forum' => 'Forum', -'Posts' => 'Posts', -'Replies' => 'Replies', -'Author' => 'Author', -'Pages' => 'Pages', -'BBCode' => 'BBCode', // You probably shouldn't change this -'img tag' => '[img] tag', -'Smilies' => 'Smilies', -'and' => 'and', -'Image link' => 'image', // This is displayed (i.e. ) instead of images when "Show images" is disabled in the profile -'wrote' => 'wrote', // For [quote]'s -'Code' => 'Code', // For [code]'s -'Mailer' => 'Mailer', // As in "MyForums Mailer" in the signature of outgoing e-mails -'Important information' => 'Important information', -'Write message legend' => 'Write your message and submit', - -// Title -'Title' => 'Title', -'Member' => 'Member', // Default title -'Moderator' => 'Moderator', -'Administrator' => 'Administrator', -'Banned' => 'Banned', -'Guest' => 'Guest', - -// Stuff for include/parser.php -'BBCode error' => 'The BBCode syntax in the message is incorrect.', -'BBCode error 1' => 'Missing start tag for [/quote].', -'BBCode error 2' => 'Missing end tag for [code].', -'BBCode error 3' => 'Missing start tag for [/code].', -'BBCode error 4' => 'Missing one or more end tags for [quote].', -'BBCode error 5' => 'Missing one or more start tags for [/quote].', - -// Stuff for the navigator (top of every page) -'Index' => 'Index', -'User list' => 'User list', -'Rules' => 'Rules', -'Search' => 'Search', -'Register' => 'Register', -'Login' => 'Login', -'Not logged in' => 'You are not logged in.', -'Profile' => 'Profile', -'Logout' => 'Logout', -'Logged in as' => 'Logged in as', -'Admin' => 'Administration', -'Last visit' => 'Last visit', -'Show new posts' => 'Show new posts since last visit', -'Mark all as read' => 'Mark all topics as read', -'Link separator' => '', // The text that separates links in the navigator - -// Stuff for the page footer -'Board footer' => 'Board footer', -'Search links' => 'Search links', -'Show recent posts' => 'Show recent posts', -'Show unanswered posts' => 'Show unanswered posts', -'Show your posts' => 'Show your posts', -'Show subscriptions' => 'Show your subscribed topics', -'Jump to' => 'Jump to', -'Go' => ' Go ', // submit button in forum jump -'Move topic' => 'Move topic', -'Open topic' => 'Open topic', -'Close topic' => 'Close topic', -'Unstick topic' => 'Unstick topic', -'Stick topic' => 'Stick topic', -'Moderate forum' => 'Moderate forum', -'Delete posts' => 'Delete multiple posts', -'Debug table' => 'Debug information', - -// For extern.php RSS feed -'RSS Desc Active' => 'The most recently active topics at', // board_title will be appended to this string -'RSS Desc New' => 'The newest topics at', // board_title will be appended to this string -'Posted' => 'Posted' // The date/time a topic was started - -); diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/English/delete.php --- a/punbb/lang/English/delete.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - 'Delete post', -'Warning' => 'Warning! If this is the first post in the topic, the whole topic will be deleted.', -'Delete' => 'Delete', // The submit button -'Post del redirect' => 'Post deleted. Redirecting …', -'Topic del redirect' => 'Topic deleted. Redirecting …' - -); diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/English/forum.php --- a/punbb/lang/English/forum.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - 'Post new topic', -'Views' => 'Views', -'Moved' => 'Moved', -'Sticky' => 'Sticky', -'Empty forum' => 'Forum is empty.' - -); diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/English/help.php --- a/punbb/lang/English/help.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ - 'Help', -'produces' => 'produces', - -'BBCode info 1' => 'BBCode is a collection of formatting tags that are used to change the look of text in this forum. BBCode is based on the same principal as, and is very similar to, HTML. Below is a list of all the available BBCodes and instructions on how to use them.', -'BBCode info 2' => 'Administrators have the ability to enable or disable BBCode. You can tell if BBCode is enabled or disabled out in the left margin whenever you post a message or edit your signature.', - -'Text style' => 'Text style', -'Text style info' => 'The following tags change the appearance of text:', -'Bold text' => 'Bold text', -'Underlined text' => 'Underlined text', -'Italic text' => 'Italic text', -'Red text' => 'Red text', -'Blue text' => 'Blue text', - -'Links and images' => 'Links and images', -'Links info' => 'You can create links to other documents or to e-mail addresses using the following tags:', -'My e-mail address' => 'My e-mail address', -'Images info' => 'If you want to display an image you can use the img tag.', - -'Quotes' => 'Quotes', -'Quotes info' => 'If you want to quote someone, you should use the quote tag.', -'Quotes info 2' => 'If you don\'t want to quote anyone in particular, you can use the quote tag without specifying a name.', -'Quote text' => 'This is the text i want to quote.', -'produces quote box' => 'produces a quote box like this:', - -'Code' => 'Code', -'Code info' => 'When displaying source code you should make sure that you use the code tag. Text displayed with the code tag will use a monospaced font and will not be affected by other tags.', -'Code text' => 'This is some code.', -'produces code box' => 'produces a code box like this:', - -'Nested tags' => 'Nested tags', -'Nested tags info' => 'BBCode can be nested to create more advanced formatting. For example:', -'Bold, underlined text' => 'Bold, underlined text', - -'Smilies info' => 'If you like (and if it is enabled), the forum can convert a series of smilies to images representations of that smiley. This forum recognizes the following smilies and replaces them with images:' - -); diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/English/index.html --- a/punbb/lang/English/index.html Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - -. - - -. - - \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/English/index.php --- a/punbb/lang/English/index.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - 'Topics', -'Moderators' => 'Moderators', -'Link to' => 'Link to', // As in "Link to http://www.punbb.org/" -'Empty board' => 'Board is empty.', -'Newest user' => 'Newest registered user', -'Users online' => 'Registered users online', -'Guests online' => 'Guests online', -'No of users' => 'Total number of registered users', -'No of topics' => 'Total number of topics', -'No of posts' => 'Total number of posts', -'Online' => 'Online', // As in "Online: User A, User B etc." -'Board info' => 'Board information', -'Board stats' => 'Board statistics', -'User info' => 'User information' - -); diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/English/install.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/lang/English/install.php Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,76 @@ + 'Install PunBB %s', +'Required' => '(Required)', +'Install welcome' => 'Welcome to PunBB installation. You are about to install PunBB %s.', +'Install head' => 'Complete all three parts of this form to install your forum', +'Install intro' => 'In order to install PunBB you must complete the form set out below. Please read the instructions provided before completing the form. If you encounter any difficulties with the installation, please refer to the documentation supplied as part of PunBB\'s download package.', +'Part1' => 'Part 1 - Database setup', +'Part1 intro' => 'Please enter the requested information in order to setup your database for PunBB. You must know all the information asked for before proceeding with the installation. Help with completing this part of the form is set out below.', +'Database type' => 'Database type:', +'Database name' => 'Database name:', +'Database server' => 'Database server:', +'Database username' => 'Database username:', +'Database password' => 'Database password:', +'Database user pass' => 'Database username and password:', +'Table prefix' => 'Table prefix:', +'Database type info' => 'PunBB currently supports MySQL, PostgreSQL and SQLite. If your database of choice is missing from the drop-down menu below, it means this PHP environment does not have support for that particular database. More information regarding support for particular versions of each database can be found in the FAQ.', +'Mysql type info' => 'PunBB has detected that your PHP environment supports two different ways of communicating with MySQL. The two options are called "standard" and "improved". If you are uncertain which one to use, start by trying improved and if that fails, try standard.', +'Database server info' => 'Enter the address of the database server (example: localhost, db.myhost.com or 192.168.0.15). You can specify a custom port number if your database doesn\'t run on the default port (example: localhost:3580). For SQLite support, just enter anything or leave it at \'localhost\'.', +'Database name info' => 'Enter the name of the database that PunBB will be installed into. The database must exist. For SQLite, this is the relative path to the database file. If the SQLite database file does not exist, PunBB will attempt to create it.', +'Database username info' => 'Enter the username and password used for connecting to the selected database. Ignore for SQLite.', +'Table prefix info' => 'Optional - enter a database table prefix. By specifying a table prefix you can run multiple copies of PunBB in the same database (example: foo_).', +'Part1 legend' => 'Database information', +'Database type help' => 'Select type of database.', +'Database server help' => 'The address of your database server. For SQLite enter anything.', +'Database name help' => 'Existing database PunBB will be installed to.', +'Database username help' => 'For database connection. Ignore for SQLite.', +'Database password help' => 'For database connection. Ignore for SQLite.', +'Table prefix help' => 'Optional database table prefix e.g. "foo_".', +'Part2' => 'Part 2 - Forum Administrator setup', +'Part2 legend' => 'Administrator\'s details', +'Part2 intro' => 'Please enter the requested information in order to setup an administrator for your PunBB installation. You can later create more administrators and moderators.', +'Username' => 'Username:', +'Password' => 'Password:', +'E-mail address' => 'E-mail address:', +'Admin username' => 'Administrator\'s username:', +'Admin password' => 'Administrator\'s password:', +'Admin confirm password' => 'Confirm password:', +'Admin e-mail' => 'Administrator\'s e-mail:', +'Admin username info' => 'Enter the username of the forum administrator. Usernames can be between 2 and 25 characters long.', +'Admin password info' => 'Enter then re-enter the forum administrator\'s password. Passwords must be at least 4 characters long and are case sensitive.', +'Admin e-mail info' => 'Enter a current and valid e-mail address for the forum administrator.', +'Username help' => 'Between 2 and 25 characters.', +'Password help' => 'Minimum 4 characters. Case sensitive.', +'Confirm password help' => 'Re-enter exactly as before.', +'E-mail address help' => 'The e-mail address of the forum administrator.', +'Part3' => 'Part 3 - Forum setup', +'Part3 legend' => 'Forum information', +'Part3 intro' => 'Please enter the requested information. Pay particular attention to entering your base URL and read the instructions set out below carefully.', +'Board title' => 'Board title:', +'Board title and desc' => 'Board title and description:', +'Board description' => 'Board description:', +'Base URL' => 'Base URL:', +'Board title info' => 'Enter a title and a short description for your PunBB installation. They will be shown at the top of every page. Leave blank to use the default title and description. Both can be changed later.', +'Base URL info' => 'Please pay particular attention when entering your Base URL. You must set the correct Base URL or your forum will not work properly. The Base URL is the URL (without trailing slash) of your PunBB forum (example: http://forum.myhost.com or http://myhost.com/~myuser). Please note that the preset value below is just an educated guess by PunBB.', +'Base URL help' => 'The URL (without trailing slash) of your PunBB installation. Please read information above.', +'Start install' => 'Start install', // Label for submit button + +// Installation completed form +'Success description' => 'Congratulations! PunBB %s has been successfully installed.', +'Success welcome' => 'Please follow the instructions below to finalize the installation.', +'Final instructions' => 'Final instructions', +'No write info 1' => 'Important! To finalize the installation, you need to click on the button below to download a file called config.php. You then need to upload this file to the root directory of your PunBB installation.', +'No write info 2' => 'Once you have uploaded config.php, PunBB will be fully installed! You may then %s once config.php has been uploaded.', +'Go to index' => 'go to the forum index', +'Warning' => 'Warning!', +'No cache write' => 'The cache directory is currently not writable! In order for PunBB to function properly, the directory named cache must be writable by PHP. Use chmod to set the appropriate directory permissions. If in doubt, chmod to 0777.', +'No avatar write' => 'The avatar directory is currently not writable! If you want users to be able to upload their own avatar images you must see to it that the directory named img/avatars is writable by PHP. You can later choose to save avatar images in a different directory (see Admin/Options). Use chmod to set the appropriate directory permissions. If in doubt, chmod to 0777.', +'File upload alert' => 'File uploads appear to be disallowed on this server! If you want users to be able to upload their own avatar images you must enable the file_uploads configuration setting in PHP. Once file uploads have been enabled, avatar uploads can be enabled in Administration / Options / Content.', +'Download config' => 'Download config.php file', // Label for submit button +'Write info' => 'PunBB has been fully installed! You may now %s.', +); \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/English/login.php --- a/punbb/lang/English/login.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ - 'Wrong username and/or password.', -'Forgotten pass' => 'Forgotten your password?', -'Login redirect' => 'Logged in successfully. Redirecting …', -'Logout redirect' => 'Logged out. Redirecting …', -'No e-mail match' => 'There is no user registered with the e-mail address', -'Request pass' => 'Request password', -'Request pass legend' => 'Enter the e-mail address with which you registered', -'Request pass info' => 'A new password together with a link to activate the new password will be sent to that address.', -'Not registered' => 'Not registered yet?', -'Login legend' => 'Enter your username and password below', -'Login info' => 'If you have not registered or have forgotten your password click on the appropriate link below.', - -// Forget password mail stuff -'Forget mail' => 'An e-mail has been sent to the specified address with instructions on how to change your password. If it does not arrive you can contact the forum administrator at' - -); diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/English/mail_templates/activate_email.tpl --- a/punbb/lang/English/mail_templates/activate_email.tpl Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -Subject: Change e-mail address requested - -Hello , - -You have requested to have a new e-mail address assigned to your account in the discussion forum at . If you didn't request this or if you don't want to change your e-mail address you should just ignore this message. Only if you visit the activation page below will your e-mail address be changed. In order for the activation page to work, you must be logged in to the forum. - -To change your e-mail address, please visit the following page: - - --- - -(Do not reply to this message) \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/English/mail_templates/activate_password.tpl --- a/punbb/lang/English/mail_templates/activate_password.tpl Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -Subject: New password requested - -Hello , - -You have requested to have a new password assigned to your account in the discussion forum at . If you didn't request this or if you don't want to change your password you should just ignore this message. Only if you visit the activation page below will your password be changed. - -Your new password is: - -To change your password, please visit the following page: - - --- - -(Do not reply to this message) \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/English/mail_templates/form_email.tpl --- a/punbb/lang/English/mail_templates/form_email.tpl Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ -Subject: - - from has sent you a message. You can reply to by replying to this e-mail. - -The message reads as follows: ------------------------------------------------------------------------ - - - ------------------------------------------------------------------------ - --- - \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/English/mail_templates/index.html --- a/punbb/lang/English/mail_templates/index.html Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - -. - - -. - - \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/English/mail_templates/new_reply.tpl --- a/punbb/lang/English/mail_templates/new_reply.tpl Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -Subject: Reply to topic: - - has replied to the topic to which you are subscribed. There may be more new replies, but this is the only notification you will receive until you visit the board again. - -The post is located at - -You can unsubscribe by going to - --- - -(Do not reply to this message) \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/English/mail_templates/new_reply_full.tpl --- a/punbb/lang/English/mail_templates/new_reply_full.tpl Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -Subject: Reply to topic: - - has replied to the topic to which you are subscribed. There may be more new replies, but this is the only notification you will receive until you visit the board again. - -The message reads as follows: ------------------------------------------------------------------------ - - - ------------------------------------------------------------------------ - -The post is located at - -You can unsubscribe by going to - --- - -(Do not reply to this message) \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/English/mail_templates/welcome.tpl --- a/punbb/lang/English/mail_templates/welcome.tpl Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -Subject: Welcome to ! - -Thank you for registering in the forums at . Your account details are: - -Username: -Password: - -Login at to activate the account. - --- - -(Do not reply to this message) \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/English/misc.php --- a/punbb/lang/English/misc.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ - 'All topics and forums have been marked as read. Redirecting …', - -// Send e-mail -'Form e-mail disabled' => 'The user you are trying to send an e-mail to has disabled form e-mail.', -'No e-mail subject' => 'You must enter a subject.', -'No e-mail message' => 'You must enter a message.', -'Too long e-mail message' => 'Messages cannot be longer than 65535 characters (64 KB).', -'E-mail sent redirect' => 'E-mail sent. Redirecting …', -'Send e-mail to' => 'Send e-mail to', -'E-mail subject' => 'Subject', -'E-mail message' => 'Message', -'E-mail disclosure note' => 'Please note that by using this form, your e-mail address will be disclosed to the recipient.', -'Write e-mail' => 'Write and submit your e-mail message', - -// Report -'No reason' => 'You must enter a reason.', -'Report redirect' => 'Post reported. Redirecting …', -'Report post' => 'Report post', -'Reason' => 'Reason', -'Reason desc' => 'Please enter a short reason why you are reporting this post', - -// Subscriptions -'Already subscribed' => 'You are already subscribed to this topic.', -'Subscribe redirect' => 'Your subscription has been added. Redirecting …', -'Not subscribed' => 'You are not subscribed to this topic.', -'Unsubscribe redirect' => 'Your subscription has been removed. Redirecting …', - -// General forum and topic moderation -'Moderate' => 'Moderate', -'Select' => 'Select', // the header of a column of checkboxes -'Move' => 'Move', -'Delete' => 'Delete', - -// Moderate forum -'Open' => 'Open', -'Close' => 'Close', -'Move topic' => 'Move topic', -'Move topics' => 'Move topics', -'Move legend' => 'Select destination of move', -'Move to' => 'Move to', -'Leave redirect' => 'Leave redirect topic(s)', -'Move topic redirect' => 'Topic moved. Redirecting …', -'Move topics redirect' => 'Topics moved. Redirecting …', -'Confirm delete legend' => 'Please confirm deletion', -'Delete topics' => 'Delete topics', -'Delete topics comply' => 'Are you sure you want to delete the selected topics?', -'Delete topics redirect' => 'Topics deleted. Redirecting …', -'Open topic redirect' => 'Topic opened. Redirecting …', -'Open topics redirect' => 'Topics opened. Redirecting …', -'Close topic redirect' => 'Topic closed. Redirecting …', -'Close topics redirect' => 'Topics closed. Redirecting …', -'No topics selected' => 'You must select at least one topic for move/delete/open/close.', -'Stick topic redirect' => 'Topic sticked. Redirecting …', -'Unstick topic redirect' => 'Topic unsticked. Redirecting …', - -// Delete multiple posts in topic -'Delete posts' => 'Delete posts', -'Delete posts comply' => 'Are you sure you want to delete the selected posts?', -'Delete posts redirect' => 'Posts deleted. Redirecting …', -'No posts selected' => 'You must select at least one post to be deleted.' - -); diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/English/post.php --- a/punbb/lang/English/post.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ - 'Topics must contain a subject.', -'Too long subject' => 'Subjects cannot be longer than 70 characters.', -'No message' => 'You must enter a message.', -'Too long message' => 'Posts cannot be longer that 65535 characters (64 KB).', - -// Posting -'Post errors' => 'Post errors', -'Post errors info' => 'The following errors need to be corrected before the message can be posted:', -'Post preview' => 'Post preview', -'Guest name' => 'Name', // For guests (instead of Username) -'Post redirect' => 'Post entered. Redirecting …', -'Post a reply' => 'Post a reply', -'Post new topic' => 'Post new topic', -'Hide smilies' => 'Never show smilies as icons for this post', -'Subscribe' => 'Subscribe to this topic', -'Topic review' => 'Topic review (newest first)', -'Flood start' => 'At least', -'flood end' => 'seconds have to pass between posts. Please wait a little while and try posting again.', -'Preview' => 'Preview', // submit button to preview message - -// Edit post -'Edit post legend' => 'Edit the post and submit changes', -'Silent edit' => 'Silent edit (don\'t display "Edited by ..." in topic view)', -'Edit post' => 'Edit post', -'Edit redirect' => 'Post updated. Redirecting …' - -); diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/English/prof_reg.php --- a/punbb/lang/English/prof_reg.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ - 'Enter a valid e-mail address', -'E-mail legend 2' => 'Enter and confirm a valid e-mail address', -'Localisation legend' => 'Set your localisation options', -'Timezone' => 'Timezone', -'Timezone info' => 'For the forum to display times correctly you must select your local timezone.', -'Language' => 'Language', -'Language info' => 'You can choose which language you wish to use to view the forum.', -'E-mail setting info' => 'Select whether you want your e-mail address to be viewable to other users or not and if you want other users to be able to send you e-mail via the forum (form e-mail) or not.', -'E-mail setting 1' => 'Display your e-mail address.', -'E-mail setting 2' => 'Hide your e-mail address but allow form e-mail.', -'E-mail setting 3' => 'Hide your e-mail address and disallow form e-mail.', -'Privacy options legend' => 'Set your privacy options', -'Save user/pass' => 'Save username and password between visits.', -'Save user/pass info' => 'This option sets whether the forum should "remember" you between visits. If enabled, you will not have to login every time you visit the forum. You will be logged in automatically. Recommended.', -'Confirm pass' => 'Confirm password', - -'Username too short' => 'Usernames must be at least 2 characters long. Please choose another (longer) username.', -'Username guest' => 'The username guest is reserved. Please choose another username.', -'Username IP' => 'Usernames may not be in the form of an IP address. Please choose another username.', -'Username reserved chars' => 'Usernames may not contain all the characters \', " and [ or ] at once. Please choose another username.', -'Username BBCode' => 'Usernames may not contain any of the text formatting tags (BBCode) that the forum uses. Please choose another username.', -'Dupe username' => 'Someone else has already registered with that username. Please choose another username.', -'Pass too short' => 'Passwords must be at least 4 characters long. Please choose another (longer) password.', -'Pass not match' => 'Passwords do not match. Please go back and correct.', -'Banned e-mail' => 'The e-mail address you entered is banned in this forum. Please choose another e-mail address.', -'Dupe e-mail' => 'Someone else is already registered with that e-mail address. Please choose another e-mail address.', -'Sig too long' => 'Signatures cannot be longer than', -'characters' => 'characters', -'Sig too many lines' => 'Signatures cannot have more than', -'lines' => 'lines', -'Signature quote/code' => 'The quote and code BBCodes are not allowed in signatures. Please go back and correct.', -'Bad ICQ' => 'You entered an invalid ICQ UIN. Please go back and correct.' - -); diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/English/profile.php --- a/punbb/lang/English/profile.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,144 +0,0 @@ - 'Profile menu', -'Section essentials' => 'Essentials', -'Section personal' => 'Personal', -'Section messaging' => 'Messaging', -'Section personality' => 'Personality', -'Section display' => 'Display', -'Section privacy' => 'Privacy', -'Section admin' => 'Administration', - -// Miscellaneous -'Username and pass legend' => 'Enter your username and password', -'Personal details legend' => 'Enter your personal details', -'Contact details legend' => 'Enter your messaging details', -'Options display' => 'Set your display options', -'Options post' => 'Set your post viewing options', -'User activity' => 'User activity', -'Paginate info' => 'Enter the number of topics and posts you wish to view on each page.', - -// Password stuff -'Pass key bad' => 'The specified password activation key was incorrect or has expired. Please re-request a new password. If that fails, contact the forum administrator at', -'Pass updated' => 'Your password has been updated. You can now login with your new password.', -'Pass updated redirect' => 'Password updated. Redirecting …', -'Wrong pass' => 'Wrong old password.', -'Change pass' => 'Change password', -'Change pass legend' => 'Enter and confirm your new password', -'Old pass' => 'Old password', -'New pass' => 'New password', -'Confirm new pass' => 'Confirm new password', - -// E-mail stuff -'E-mail key bad' => 'The specified e-mail activation key was incorrect or has expired. Please re-request change of e-mail address. If that fails, contact the forum administrator at', -'E-mail updated' => 'Your e-mail address has been updated.', -'Activate e-mail sent' => 'An email has been sent to the specified address with instructions on how to activate the new e-mail address. If it doesn\'t arrive you can contact the forum administrator at', -'E-mail legend' => 'Enter your new e-mail address', -'E-mail instructions' => '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.', -'Change e-mail' => 'Change e-mail address', -'New e-mail' => 'New e-mail', - -// Avatar upload stuff -'Avatars disabled' => 'The administrator has disabled avatar support.', -'Too large ini' => 'The selected file was too large to upload. The server didn\'t allow the upload.', -'Partial upload' => 'The selected file was only partially uploaded. Please try again.', -'No tmp directory' => 'PHP was unable to save the uploaded file to a temporary location.', -'No file' => 'You did not select a file for upload.', -'Bad type' => 'The file you tried to upload is not of an allowed type. Allowed types are gif, jpeg and png.', -'Too wide or high' => 'The file you tried to upload is wider and/or higher than the maximum allowed', -'Too large' => 'The file you tried to upload is larger than the maximum allowed', -'pixels' => 'pixels', -'bytes' => 'bytes', -'Move failed' => 'The server was unable to save the uploaded file. Please contact the forum administrator at', -'Unknown failure' => 'An unknown error occurred. Please try again.', -'Avatar upload redirect' => 'Avatar uploaded. Redirecting …', -'Avatar deleted redirect' => 'Avatar deleted. Redirecting …', -'Avatar desc' => 'An avatar is a small image that will be displayed under your username in your posts. It must not be any bigger than', -'Upload avatar' => 'Upload avatar', -'Upload avatar legend' => 'Enter an avatar file to upload', -'Delete avatar' => 'Delete avatar', // only for admins -'File' => 'File', -'Upload' => 'Upload', // submit button - -// Form validation stuff -'Dupe username' => 'Someone else has already registered with that username. Please go back and try a different username.', -'Forbidden title' => 'The title you entered contains a forbidden word. You must choose a different title.', -'Profile redirect' => 'Profile updated. Redirecting …', - -// Profile display stuff -'Not activated' => 'This user hasn\'t activated his/her account yet. The account is activated when he/she logs in the first time.', -'Unknown' => '(Unknown)', // This is displayed when a user hasn't filled out profile field (e.g. Location) -'Private' => '(Private)', // This is displayed when a user does not want to receive e-mails -'No avatar' => '(No avatar)', -'Show posts' => 'Show all posts', -'Realname' => 'Real name', -'Location' => 'Location', -'Website' => 'Website', -'Jabber' => 'Jabber', -'ICQ' => 'ICQ', -'MSN' => 'MSN Messenger', -'AOL IM' => 'AOL IM', -'Yahoo' => 'Yahoo! Messenger', -'Avatar' => 'Avatar', -'Signature' => 'Signature', -'Sig max length' => 'Max length', -'Sig max lines' => 'Max lines', -'Avatar legend' => 'Set your avatar display options', -'Avatar info' => 'An avatar is a small image that will be displayed with all your posts. You can upload an avatar by clicking the link below. The checkbox \'Use avatar\' below must be checked in order for the avatar to be visible in your posts.', -'Change avatar' => 'Change avatar', -'Use avatar' => 'Use avatar.', -'Signature legend' => 'Compose your signature', -'Signature info' => 'A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It\'s up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature.', -'Sig preview' => 'Current signature preview:', -'No sig' => 'No signature currently stored in profile.', -'Topics per page' => 'Topics', -'Topics per page info' => 'This setting controls how many topics are displayed per page when you view a forum. If you are uncertain about what to use, you can just leave it blank and the forum default will be used.', -'Posts per page' => 'Posts', -'Posts per page info' => 'This setting controls how many posts are displayed per page when you view a topic. If you are uncertain about what to use, you can just leave it blank and the forum default will be used.', -'Leave blank' => 'Leave blank to use forum default.', -'Notify full' => 'Include post in subscription e-mails.', -'Notify full info' => 'With this enabled, a plain text version of the new post will be included in subscription notification e-mails.', -'Show smilies' => 'Show smilies as graphic icons', -'Show smilies info' => 'If you enable this option, small images will be displayed instead of text smilies.', -'Show images' => 'Show images in posts.', -'Show images info' => 'Disable this if you don\'t want to see images in posts (i.e. images displayed with the [img]-tag).', -'Show images sigs' => 'Show images in user signatures.', -'Show images sigs info' => 'Disable this if you don\'t want to see images in signatures (i.e. images displayed with the [img]-tag).', -'Show avatars' => 'Show user avatars in posts.', -'Show avatars info' => 'This option toggles whether user avatar images will be displayed in posts or not.', -'Show sigs' => 'Show user signatures.', -'Show sigs info' => 'Enable if you would like to see user signatures.', -'Style legend' => 'Select your preferred style', -'Style info' => 'If you like you can use a different visual style for this forum.', -'Admin note' => 'Admin note', -'Pagination legend' => 'Enter your pagination options', -'Post display legend' => 'Set your options for viewing posts', -'Post display info' => 'If you are on a slow connection, disabling these options, particularly showing images in posts and signatures, will make pages load faster.', -'Instructions' => 'When you update your profile, you will be redirected back to this page.', - -// Administration stuff -'Group membership legend' => 'Choose user group', -'Save' => 'Save', -'Set mods legend' => 'Set moderator access', -'Moderator in' => 'Moderator in', -'Moderator in info' => 'Choose what forums this user should be allowed to moderate. Note: This only applies to moderators. Administrators always have full permissions in all forums.', -'Update forums' => 'Update forums', -'Delete ban legend' => 'Delete (administrators only) or ban user', -'Delete user' => 'Delete user', -'Ban user' => 'Ban user', -'Confirm delete legend' => 'Important: read before deleting user', -'Confirm delete user' => 'Confirm delete user', -'Confirmation info' => 'Please confirm that you want to delete the user', // the username will be appended to this string -'Delete warning' => 'Warning! Deleted users and/or posts cannot be restored. If you choose not to delete the posts made by this user, the posts can only be deleted manually at a later time.', -'Delete posts' => 'Delete any posts and topics this user has made.', -'Delete' => 'Delete', // submit button (confirm user delete) -'User delete redirect' => 'User deleted. Redirecting …', -'Group membership redirect' => 'Group membership saved. Redirecting …', -'Update forums redirect' => 'Forum moderator rights updated. Redirecting …', -'Ban redirect' => 'Redirecting …' - -); diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/English/register.php --- a/punbb/lang/English/register.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ - 'This forum is not accepting new registrations.', -'Reg cancel redirect' => 'Registration cancelled. Redirecting …', -'Forum rules' => 'Forum rules', -'Rules legend' => 'You must agree to the following in order to register', -'Agree' => 'Agree', -'Cancel' => 'Cancel', -'Register' => 'Register', - -// Form validation stuff (some of these are also used in post.php) -'Username censor' => 'The username you entered contains one or more censored words. Please choose a different username.', -'Username dupe 1' => 'Someone is already registered with the username', -'Username dupe 2' => 'The username you entered is too similar. The username must differ from that by at least one alphanumerical character (a-z or 0-9). Please choose a different username.', -'E-mail not match' => 'E-mail addresses do not match. Please go back and correct.', - -// Registration e-mail stuff -'Reg e-mail' => 'Thank you for registering. Your password has been sent to the specified address. If it doesn\'t arrive you can contact the forum administrator at', -'Reg complete' => 'Registration complete. Logging in and redirecting …', - -// Register info -'Desc 1' => 'Registration will grant you access to a number of features and capabilities otherwise unavailable. These functions include the ability to edit and delete posts, design your own signature that accompanies your posts and much more. If you have any questions regarding this forum you should ask an administrator.', -'Desc 2' => 'Below is a form you must fill out in order to register. Once you are registered you should visit your profile and review the different settings you can change. The fields below only make up a small part of all the settings you can alter in your profile.', -'Username legend' => 'Please enter a username between 2 and 25 characters long', -'Pass legend 1' => 'Please enter and confirm your chosen password', -'Pass legend 2' => 'Please read the instructions below', -'Pass info' => 'Passwords can be between 4 and 16 characters long. Passwords are case sensitive.', -'E-mail info' => 'You must enter a valid e-mail address as your randomly generated password will be sent to that address.', -'Confirm e-mail' => 'Confirm e-mail address', - -); diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/English/search.php --- a/punbb/lang/English/search.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ - 'User search', -'No search permission' => 'You do not have permission to use the search feature.', -'Search' => 'Search', -'Search criteria legend' => 'Enter your search criteria', -'Search info' => 'To search by keyword, enter a term or terms to search for. Separate terms with spaces. Use AND, OR and NOT to refine your search. To search by author enter the username of the author whose posts you wish to search for. Use wildcard character * for partial matches.', -'Keyword search' => 'Keyword search', -'Author search' => 'Author search', -'Search in legend' => 'Select where to search', -'Search in info' => 'Choose in which forum you would like to search and if you want to search in topic subjects, message text or both.', -'Forum search' => 'Forum', -'All forums' => 'All forums', -'Search in' => 'Search in', -'Message and subject' => 'Message text and topic subject', -'Message only' => 'Message text only', -'Topic only' => 'Topic subject only', -'Sort by' => 'Sort by', -'Sort order' => 'Sort order', -'Search results legend' => 'Select how to view search results', -'Search results info' => 'You can choose how you wish to sort and show your results.', -'Sort by post time' => 'Post time', -'Sort by author' => 'Author', -'Sort by subject' => 'Subject', -'Sort by forum' => 'Forum', -'Ascending' => 'Ascending', -'Descending' => 'Descending', -'Show as' => 'Show results as', -'Show as topics' => 'Topics', -'Show as posts' => 'Posts', - -// Results -'Search results' => 'Search results', -'No terms' => 'You have to enter at least one keyword and/or an author to search for.', -'No hits' => 'Your search returned no hits.', -'No user posts' => 'There are no posts by this user in this forum.', -'No subscriptions' => 'You are currently not subscribed to any topics.', -'No new posts' => 'There are no topics with new posts since your last visit.', -'No recent posts' => 'No new posts have been made within the last 24 hours.', -'No unanswered' => 'There are no unanswered posts in this forum.', -'Go to post' => 'Go to post' - -); diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/English/stopwords.txt --- a/punbb/lang/English/stopwords.txt Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,150 +0,0 @@ -about -after -ago -all -almost -along -also -any -anybody -anywhere -are -arent -around -ask -been -before -being -between -but -came -can -cant -come -could -couldnt -did -didnt -does -doesnt -dont -each -either -else -even -every -everybody -everyone -find -for -from -get -going -gone -got -had -has -have -havent -having -her -here -hers -him -his -how -ill -into -isnt -its -ive -just -know -less -like -make -many -may -more -most -much -must -near -never -none -nothing -now -off -often -once -one -only -other -our -ours -out -over -please -rather -really -said -see -she -should -small -some -something -sometime -somewhere -take -than -thank -thanks -that -thats -the -their -theirs -them -then -there -these -they -thing -think -this -those -though -through -thus -too -true -two -under -until -upon -use -very -want -was -way -well -were -what -when -where -which -who -whom -whose -why -will -with -within -without -would -yes -yet -you -your -yours \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/English/topic.php --- a/punbb/lang/English/topic.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ - 'Post reply', -'Topic closed' => 'Topic closed', -'From' => 'From', // User location -'Note' => 'Note', // Admin note -'Website' => 'Website', -'Guest' => 'Guest', -'Online' => 'Online', -'Offline' => 'Offline', -'Last edit' => 'Last edited by', -'Report' => 'Report', -'Delete' => 'Delete', -'Edit' => 'Edit', -'Quote' => 'Quote', -'Is subscribed' => 'You are currently subscribed to this topic', -'Unsubscribe' => 'Unsubscribe', -'Subscribe' => 'Subscribe to this topic', -'Quick post' => 'Quick post', - -'Link separator' => ' | ', // The text that separates links in posts (website, e-mail, report, edit etc.) -'Mod controls' => 'Moderator controls' - -); diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/English/userlist.php --- a/punbb/lang/English/userlist.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - 'Find and sort users', -'User search info' => 'Enter a username to search for and/or a user group to filter by. The username field can be left blank. Use the wildcard character * for partial matches. Sort users by name, date registered or number of posts and in ascending/descending order.', -'User group' => 'User group', -'No of posts' => 'No. of posts', -'All users' => 'All' - -); diff -r e3d7322305bf -r 5e1f1e916419 punbb/lang/index.html --- a/punbb/lang/index.html Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - -. - - -. - - \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/login.php --- a/punbb/login.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,229 +0,0 @@ -escape($form_username).'\'' : 'LOWER(username)=LOWER(\''.$pun_db->escape($form_username).'\')'; - - $result = $pun_db->query('SELECT id, group_id, password, save_pass FROM '.$pun_db->prefix.'users WHERE '.$username_sql) or error('Unable to fetch user info', __FILE__, __LINE__, $pun_db->error()); - list($user_id, $group_id, $db_password_hash, $save_pass) = $pun_db->fetch_row($result); - - $authorized = false; - - if (!empty($db_password_hash)) - { - $sha1_in_db = (strlen($db_password_hash) == 40) ? true : false; - $sha1_available = (function_exists('sha1') || function_exists('mhash')) ? true : false; - - $form_password_hash = pun_hash($form_password); // This could result in either an SHA-1 or an MD5 hash (depends on $sha1_available) - - if ($sha1_in_db && $sha1_available && $db_password_hash == $form_password_hash) - $authorized = true; - else if (!$sha1_in_db && $db_password_hash == md5($form_password)) - { - $authorized = true; - - if ($sha1_available) // There's an MD5 hash in the database, but SHA1 hashing is available, so we update the DB - $pun_db->query('UPDATE '.$pun_db->prefix.'users SET password=\''.$form_password_hash.'\' WHERE id='.$user_id) or error('Unable to update user password', __FILE__, __LINE__, $pun_db->error()); - } - } - - if (!$authorized) - message($lang_login['Wrong user/pass'].' '.$lang_login['Forgotten pass'].''); - - // Update the status if this is the first time the user logged in - if ($group_id == PUN_UNVERIFIED) - $pun_db->query('UPDATE '.$pun_db->prefix.'users SET group_id='.$pun_config['o_default_user_group'].' WHERE id='.$user_id) or error('Unable to update user status', __FILE__, __LINE__, $pun_db->error()); - - // Remove this users guest entry from the online list - $pun_db->query('DELETE FROM '.$pun_db->prefix.'online WHERE ident=\''.$pun_db->escape(get_remote_address()).'\'') or error('Unable to delete from online list', __FILE__, __LINE__, $pun_db->error()); - - $expire = ($save_pass == '1') ? time() + 31536000 : 0; - pun_setcookie($user_id, $form_password_hash, $expire); - - pun_redirect(htmlspecialchars($_POST['redirect_url']), $lang_login['Login redirect']); -} - - -else if ($action == 'out') -{ - if ($pun_user['is_guest'] || !isset($_GET['id']) || $_GET['id'] != $pun_user['id']) - { - header('Location: index.php'); - exit; - } - - // Remove user from "users online" list. - $pun_db->query('DELETE FROM '.$pun_db->prefix.'online WHERE user_id='.$pun_user['id']) or error('Unable to delete from online list', __FILE__, __LINE__, $pun_db->error()); - - // Update last_visit (make sure there's something to update it with) - if (isset($pun_user['logged'])) - $pun_db->query('UPDATE '.$pun_db->prefix.'users SET last_visit='.$pun_user['logged'].' WHERE id='.$pun_user['id']) or error('Unable to update user visit data', __FILE__, __LINE__, $pun_db->error()); - - pun_setcookie(1, random_pass(8), time() + 31536000); - - pun_redirect('index.php', $lang_login['Logout redirect']); -} - - -else if ($action == 'forget' || $action == 'forget_2') -{ - if (!$pun_user['is_guest']) - header('Location: index.php'); - - if (isset($_POST['form_sent'])) - { - require PUN_ROOT.'include/email.php'; - - // Validate the email-address - $email = strtolower(trim($_POST['req_email'])); - if (!is_valid_email($email)) - message($lang_common['Invalid e-mail']); - - $result = $pun_db->query('SELECT id, username FROM '.$pun_db->prefix.'users WHERE email=\''.$pun_db->escape($email).'\'') or error('Unable to fetch user info', __FILE__, __LINE__, $pun_db->error()); - - if ($pun_db->num_rows($result)) - { - // Load the "activate password" template - $mail_tpl = trim(file_get_contents(PUN_ROOT.'lang/'.$pun_user['language'].'/mail_templates/activate_password.tpl')); - - // The first row contains the subject - $first_crlf = strpos($mail_tpl, "\n"); - $mail_subject = trim(substr($mail_tpl, 8, $first_crlf-8)); - $mail_message = trim(substr($mail_tpl, $first_crlf)); - - // Do the generic replacements first (they apply to all e-mails sent out here) - $mail_message = str_replace('', $pun_config['o_base_url'].'/', $mail_message); - $mail_message = str_replace('', $pun_config['o_board_title'].' '.$lang_common['Mailer'], $mail_message); - - // Loop through users we found - while ($cur_hit = $pun_db->fetch_assoc($result)) - { - // Generate a new password and a new password activation code - $new_password = random_pass(8); - $new_password_key = random_pass(8); - - $pun_db->query('UPDATE '.$pun_db->prefix.'users SET activate_string=\''.pun_hash($new_password).'\', activate_key=\''.$new_password_key.'\' WHERE id='.$cur_hit['id']) or error('Unable to update activation data', __FILE__, __LINE__, $pun_db->error()); - - // Do the user specific replacements to the template - $cur_mail_message = str_replace('', $cur_hit['username'], $mail_message); - $cur_mail_message = str_replace('', $pun_config['o_base_url'].'/profile.php?id='.$cur_hit['id'].'&action=change_pass&key='.$new_password_key, $cur_mail_message); - $cur_mail_message = str_replace('', $new_password, $cur_mail_message); - - pun_mail($email, $mail_subject, $cur_mail_message); - } - - message($lang_login['Forget mail'].' '.$pun_config['o_admin_email'].'.'); - } - else - message($lang_login['No e-mail match'].' '.htmlspecialchars($email).'.'); - } - - - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_login['Request pass']; - $required_fields = array('req_email' => $lang_common['E-mail']); - $focus_element = array('request_pass', 'req_email'); - require PUN_ROOT.'header.php'; - -?> -
    -

    -
    -
    -
    -
    - -
    - - -

    -
    -
    -
    -

    -
    -
    -
    - $lang_common['Username'], 'req_password' => $lang_common['Password']); -$focus_element = array('login', 'req_username'); -require PUN_ROOT.'header.php'; - -?> -
    -

    -
    -
    -
    -
    - -
    - - - - -

    -

       -

    -
    -
    -
    -

    -
    -
    -
    - -
    -

    -
    -
    -

    -
    -
    -
    -query('UPDATE '.$pun_db->prefix.'users SET last_visit='.$pun_user['logged'].' WHERE id='.$pun_user['id']) or error('Unable to update user last visit data', __FILE__, __LINE__, $pun_db->error()); - - pun_redirect('index.php', $lang_misc['Mark read redirect']); -} - - -else if (isset($_GET['email'])) -{ - if ($pun_user['is_guest']) - message($lang_common['No permission']); - - $recipient_id = intval($_GET['email']); - if ($recipient_id < 2) - message($lang_common['Bad request']); - - $result = $pun_db->query('SELECT username, email, email_setting FROM '.$pun_db->prefix.'users WHERE id='.$recipient_id) or error('Unable to fetch user info', __FILE__, __LINE__, $pun_db->error()); - if (!$pun_db->num_rows($result)) - message($lang_common['Bad request']); - - list($recipient, $recipient_email, $email_setting) = $pun_db->fetch_row($result); - - if ($email_setting == 2 && $pun_user['g_id'] < PUN_MOD) - message($lang_misc['Form e-mail disabled']); - - - if (isset($_POST['form_sent'])) - { - // Clean up message and subject from POST - $subject = pun_trim($_POST['req_subject']); - $message = pun_trim($_POST['req_message']); - - if ($subject == '') - message($lang_misc['No e-mail subject']); - else if ($message == '') - message($lang_misc['No e-mail message']); - else if (strlen($message) > 65535) - message($lang_misc['Too long e-mail message']); - - // Load the "form e-mail" template - $mail_tpl = trim(file_get_contents(PUN_ROOT.'lang/'.$pun_user['language'].'/mail_templates/form_email.tpl')); - - // The first row contains the subject - $first_crlf = strpos($mail_tpl, "\n"); - $mail_subject = trim(substr($mail_tpl, 8, $first_crlf-8)); - $mail_message = trim(substr($mail_tpl, $first_crlf)); - - $mail_subject = str_replace('', $subject, $mail_subject); - $mail_message = str_replace('', $pun_user['username'], $mail_message); - $mail_message = str_replace('', $pun_config['o_board_title'], $mail_message); - $mail_message = str_replace('', $message, $mail_message); - $mail_message = str_replace('', $pun_config['o_board_title'].' '.$lang_common['Mailer'], $mail_message); - - require_once PUN_ROOT.'include/email.php'; - - pun_mail($recipient_email, $mail_subject, $mail_message, '"'.str_replace('"', '', $pun_user['username']).'" <'.$pun_user['email'].'>'); - - pun_redirect(htmlspecialchars($_POST['redirect_url']), $lang_misc['E-mail sent redirect']); - } - - - // Try to determine if the data in HTTP_REFERER is valid (if not, we redirect to the users profile after the e-mail is sent) - $redirect_url = (isset($_SERVER['HTTP_REFERER']) && preg_match('#^'.preg_quote($pun_config['o_base_url']).'/(.*?)\.php#i', $_SERVER['HTTP_REFERER'])) ? htmlspecialchars($_SERVER['HTTP_REFERER']) : 'index.php'; - - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_misc['Send e-mail to'].' '.pun_htmlspecialchars($recipient); - $required_fields = array('req_subject' => $lang_misc['E-mail subject'], 'req_message' => $lang_misc['E-mail message']); - $focus_element = array('email', 'req_subject'); - require PUN_ROOT.'header.php'; - -?> -
    -

    -
    -
    -
    -
    - -
    - - - - -

    -
    -
    -
    -

    -
    -
    -
    -query('SELECT topic_id FROM '.$pun_db->prefix.'posts WHERE id='.$post_id) or error('Unable to fetch post info', __FILE__, __LINE__, $pun_db->error()); - if (!$pun_db->num_rows($result)) - message($lang_common['Bad request']); - - $topic_id = $pun_db->result($result); - - // Get the subject and forum ID - $result = $pun_db->query('SELECT subject, forum_id FROM '.$pun_db->prefix.'topics WHERE id='.$topic_id) or error('Unable to fetch topic info', __FILE__, __LINE__, $pun_db->error()); - if (!$pun_db->num_rows($result)) - message($lang_common['Bad request']); - - list($subject, $forum_id) = $pun_db->fetch_row($result); - - // Should we use the internal report handling? - if ($pun_config['o_report_method'] == 0 || $pun_config['o_report_method'] == 2) - $pun_db->query('INSERT INTO '.$pun_db->prefix.'reports (post_id, topic_id, forum_id, reported_by, created, message) VALUES('.$post_id.', '.$topic_id.', '.$forum_id.', '.$pun_user['id'].', '.time().', \''.$pun_db->escape($reason).'\')' ) or error('Unable to create report', __FILE__, __LINE__, $pun_db->error()); - - // Should we e-mail the report? - if ($pun_config['o_report_method'] == 1 || $pun_config['o_report_method'] == 2) - { - // We send it to the complete mailing-list in one swoop - if ($pun_config['o_mailing_list'] != '') - { - $mail_subject = 'Report('.$forum_id.') - \''.$subject.'\''; - $mail_message = 'User \''.$pun_user['username'].'\' has reported the following message:'."\n".$pun_config['o_base_url'].'/viewtopic.php?pid='.$post_id.'#p'.$post_id."\n\n".'Reason:'."\n".$reason; - - require PUN_ROOT.'include/email.php'; - - pun_mail($pun_config['o_mailing_list'], $mail_subject, $mail_message); - } - } - - pun_redirect('viewtopic.php?pid='.$post_id.'#p'.$post_id, $lang_misc['Report redirect']); - } - - - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_misc['Report post']; - $required_fields = array('req_reason' => $lang_misc['Reason']); - $focus_element = array('report', 'req_reason'); - require PUN_ROOT.'header.php'; - -?> -
    -

    -
    -
    -
    -
    - -
    - - -
    -
    -
    -

    -
    -
    -
    -query('SELECT 1 FROM '.$pun_db->prefix.'subscriptions WHERE user_id='.$pun_user['id'].' AND topic_id='.$topic_id) or error('Unable to fetch subscription info', __FILE__, __LINE__, $pun_db->error()); - if ($pun_db->num_rows($result)) - message($lang_misc['Already subscribed']); - - $pun_db->query('INSERT INTO '.$pun_db->prefix.'subscriptions (user_id, topic_id) VALUES('.$pun_user['id'].' ,'.$topic_id.')') or error('Unable to add subscription', __FILE__, __LINE__, $pun_db->error()); - - pun_redirect('viewtopic.php?id='.$topic_id, $lang_misc['Subscribe redirect']); -} - - -else if (isset($_GET['unsubscribe'])) -{ - if ($pun_user['is_guest'] || $pun_config['o_subscriptions'] != '1') - message($lang_common['No permission']); - - $topic_id = intval($_GET['unsubscribe']); - if ($topic_id < 1) - message($lang_common['Bad request']); - - $result = $pun_db->query('SELECT 1 FROM '.$pun_db->prefix.'subscriptions WHERE user_id='.$pun_user['id'].' AND topic_id='.$topic_id) or error('Unable to fetch subscription info', __FILE__, __LINE__, $pun_db->error()); - if (!$pun_db->num_rows($result)) - message($lang_misc['Not subscribed']); - - $pun_db->query('DELETE FROM '.$pun_db->prefix.'subscriptions WHERE user_id='.$pun_user['id'].' AND topic_id='.$topic_id) or error('Unable to remove subscription', __FILE__, __LINE__, $pun_db->error()); - - pun_redirect('viewtopic.php?id='.$topic_id, $lang_misc['Unsubscribe redirect']); -} - - -else - message($lang_common['Bad request']); diff -r e3d7322305bf -r 5e1f1e916419 punbb/moderate.php --- a/punbb/moderate.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,719 +0,0 @@ -query('SELECT poster_ip FROM '.$pun_db->prefix.'posts WHERE id='.$get_host) or error('Unable to fetch post IP address', __FILE__, __LINE__, $pun_db->error()); - if (!$pun_db->num_rows($result)) - message($lang_common['Bad request']); - - $ip = $pun_db->result($result); - } - - message('The IP address is: '.$ip.'
    The host name is: '.@gethostbyaddr($ip).'

    Show more users for this IP'); -} - - -// All other functions require moderator/admin access -$fid = isset($_GET['fid']) ? intval($_GET['fid']) : 0; -if ($fid < 1) - message($lang_common['Bad request']); - -$result = $pun_db->query('SELECT moderators FROM '.$pun_db->prefix.'forums WHERE id='.$fid) or error('Unable to fetch forum info', __FILE__, __LINE__, $pun_db->error()); - -$moderators = $pun_db->result($result); -$mods_array = ($moderators != '') ? unserialize($moderators) : array(); - -if ($pun_user['g_id'] != PUN_ADMIN && ($pun_user['g_id'] != PUN_MOD || !array_key_exists($pun_user['username'], $mods_array))) - message($lang_common['No permission']); - - -// Load the misc.php language file -require PUN_ROOT.'lang/'.$pun_user['language'].'/misc.php'; - - -// All other topic moderation features require a topic id in GET -if (isset($_GET['tid'])) -{ - $tid = intval($_GET['tid']); - if ($tid < 1) - message($lang_common['Bad request']); - - // Fetch some info about the topic - $result = $pun_db->query('SELECT t.subject, t.num_replies, f.id AS forum_id, forum_name FROM '.$pun_db->prefix.'topics AS t INNER JOIN '.$pun_db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$pun_db->prefix.'subscriptions AS s ON (t.id=s.topic_id AND s.user_id='.$pun_user['id'].') LEFT JOIN '.$pun_db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND f.id='.$fid.' AND t.id='.$tid.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $pun_db->error()); - if (!$pun_db->num_rows($result)) - message($lang_common['Bad request']); - - $cur_topic = $pun_db->fetch_assoc($result); - - - // Delete one or more posts - if (isset($_POST['delete_posts']) || isset($_POST['delete_posts_comply'])) - { - $posts = $_POST['posts']; - if (empty($posts)) - message($lang_misc['No posts selected']); - - if (isset($_POST['delete_posts_comply'])) - { - confirm_referrer('moderate.php'); - - if (@preg_match('/[^0-9,]/', $posts)) - message($lang_common['Bad request']); - - // Verify that the post IDs are valid - $result = $pun_db->query('SELECT 1 FROM '.$pun_db->prefix.'posts WHERE id IN('.$posts.') AND topic_id='.$tid) or error('Unable to check posts', __FILE__, __LINE__, $pun_db->error()); - - if ($pun_db->num_rows($result) != substr_count($posts, ',') + 1) - message($lang_common['Bad request']); - - // Delete the posts - $pun_db->query('DELETE FROM '.$pun_db->prefix.'posts WHERE id IN('.$posts.')') or error('Unable to delete posts', __FILE__, __LINE__, $pun_db->error()); - - require PUN_ROOT.'include/search_idx.php'; - strip_search_index($posts); - - // Get last_post, last_post_id, and last_poster for the topic after deletion - $result = $pun_db->query('SELECT id, poster, posted FROM '.$pun_db->prefix.'posts WHERE topic_id='.$tid.' ORDER BY id DESC LIMIT 1') or error('Unable to fetch post info', __FILE__, __LINE__, $pun_db->error()); - $last_post = $pun_db->fetch_assoc($result); - - // How many posts did we just delete? - $num_posts_deleted = substr_count($posts, ',') + 1; - - // Update the topic - $pun_db->query('UPDATE '.$pun_db->prefix.'topics SET last_post='.$last_post['posted'].', last_post_id='.$last_post['id'].', last_poster=\''.$pun_db->escape($last_post['poster']).'\', num_replies=num_replies-'.$num_posts_deleted.' WHERE id='.$tid) or error('Unable to update topic', __FILE__, __LINE__, $pun_db->error()); - - update_forum($fid); - - pun_redirect('viewtopic.php?id='.$tid, $lang_misc['Delete posts redirect']); - } - - - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_misc['Moderate']; - require PUN_ROOT.'header.php'; - -?> -
    -

    -
    -
    -
    -
    - -
    - -

    -
    -
    -
    -

    -
    -
    -
    - $num_pages) ? 1 : $_GET['p']; - $start_from = $pun_user['disp_posts'] * ($p - 1); - - // Generate paging links - $paging_links = $lang_common['Pages'].': '.pun_paginate($num_pages, $p, 'moderate.php?fid='.$fid.'&tid='.$tid); - - - if ($pun_config['o_censoring'] == '1') - $cur_topic['subject'] = censor_words($cur_topic['subject']); - - - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$cur_topic['subject']; - require PUN_ROOT.'header.php'; - -?> -
    -
    - -
    •  » 
    •  » 
    -
    -
    -
    - -
    -query('SELECT u.title, u.num_posts, g.g_id, g.g_user_title, p.id, p.poster, p.poster_id, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by FROM '.$pun_db->prefix.'posts AS p INNER JOIN '.$pun_db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$pun_db->prefix.'groups AS g ON g.g_id=u.group_id WHERE p.topic_id='.$tid.' ORDER BY p.id LIMIT '.$start_from.','.$pun_user['disp_posts'], true) or error('Unable to fetch post info', __FILE__, __LINE__, $pun_db->error()); - - while ($cur_post = $pun_db->fetch_assoc($result)) - { - $post_count++; - - // If the poster is a registered user. - if ($cur_post['poster_id'] > 1) - { - $poster = ''.pun_htmlspecialchars($cur_post['poster']).''; - - // get_title() requires that an element 'username' be present in the array - $cur_post['username'] = $cur_post['poster']; - $user_title = get_title($cur_post); - - if ($pun_config['o_censoring'] == '1') - $user_title = censor_words($user_title); - } - // If the poster is a guest (or a user that has been deleted) - else - { - $poster = pun_htmlspecialchars($cur_post['poster']); - $user_title = $lang_topic['Guest']; - } - - // Switch the background color for every message. - $bg_switch = ($bg_switch) ? $bg_switch = false : $bg_switch = true; - $vtbg = ($bg_switch) ? ' roweven' : ' rowodd'; - - // Perform the main parsing of the message (BBCode, smilies, censor words etc) - $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']); - -?> - -
    - -

    # 

    -
    -
    -
    -
    -
    -
    -
    -
    -
    -

    -
    - -'.$lang_topic['Last edit'].' '.pun_htmlspecialchars($cur_post['edited_by']).' ('.format_time($cur_post['edited']).')

    '."\n"; ?> -
    - 1) echo '

    '."\n" ?> -
    -
    -
    -
    -
    - - - - - -
    -
    - -

    />

    -
    -
    -
    -
    -query('SELECT 1 FROM '.$pun_db->prefix.'topics WHERE id IN('.implode(',',$topics).') AND forum_id='.$fid) or error('Unable to check topics', __FILE__, __LINE__, $pun_db->error()); - - if ($pun_db->num_rows($result) != count($topics)) - message($lang_common['Bad request']); - - // Delete any redirect topics if there are any (only if we moved/copied the topic back to where it where it was once moved from) - $pun_db->query('DELETE FROM '.$pun_db->prefix.'topics WHERE forum_id='.$move_to_forum.' AND moved_to IN('.implode(',',$topics).')') or error('Unable to delete redirect topics', __FILE__, __LINE__, $pun_db->error()); - - // Move the topic(s) - $pun_db->query('UPDATE '.$pun_db->prefix.'topics SET forum_id='.$move_to_forum.' WHERE id IN('.implode(',',$topics).')') or error('Unable to move topics', __FILE__, __LINE__, $pun_db->error()); - - // Should we create redirect topics? - if (isset($_POST['with_redirect'])) - { - while (list(, $cur_topic) = @each($topics)) - { - // Fetch info for the redirect topic - $result = $pun_db->query('SELECT poster, subject, posted, last_post FROM '.$pun_db->prefix.'topics WHERE id='.$cur_topic) or error('Unable to fetch topic info', __FILE__, __LINE__, $pun_db->error()); - $moved_to = $pun_db->fetch_assoc($result); - - // Create the redirect topic - $pun_db->query('INSERT INTO '.$pun_db->prefix.'topics (poster, subject, posted, last_post, moved_to, forum_id) VALUES(\''.$pun_db->escape($moved_to['poster']).'\', \''.$pun_db->escape($moved_to['subject']).'\', '.$moved_to['posted'].', '.$moved_to['last_post'].', '.$cur_topic.', '.$fid.')') or error('Unable to create redirect topic', __FILE__, __LINE__, $pun_db->error()); - } - } - - update_forum($fid); // Update the forum FROM which the topic was moved - update_forum($move_to_forum); // Update the forum TO which the topic was moved - - $redirect_msg = (count($topics) > 1) ? $lang_misc['Move topics redirect'] : $lang_misc['Move topic redirect']; - pun_redirect('viewforum.php?id='.$move_to_forum, $redirect_msg); - } - - if (isset($_POST['move_topics'])) - { - $topics = isset($_POST['topics']) ? $_POST['topics'] : array(); - if (empty($topics)) - message($lang_misc['No topics selected']); - - $topics = implode(',', array_keys($topics)); - $action = 'multi'; - } - else - { - $topics = intval($_GET['move_topics']); - if ($topics < 1) - message($lang_common['Bad request']); - - $action = 'single'; - } - - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Moderate'; - require PUN_ROOT.'header.php'; - -?> -
    -

    -
    -
    -
    - -
    - -
    - -
    - -
    -
    -
    -
    -

    -
    -
    -
    -query('SELECT 1 FROM '.$pun_db->prefix.'topics WHERE id IN('.$topics.') AND forum_id='.$fid) or error('Unable to check topics', __FILE__, __LINE__, $pun_db->error()); - - if ($pun_db->num_rows($result) != substr_count($topics, ',') + 1) - message($lang_common['Bad request']); - - // Delete the topics and any redirect topics - $pun_db->query('DELETE FROM '.$pun_db->prefix.'topics WHERE id IN('.$topics.') OR moved_to IN('.$topics.')') or error('Unable to delete topic', __FILE__, __LINE__, $pun_db->error()); - - // Delete any subscriptions - $pun_db->query('DELETE FROM '.$pun_db->prefix.'subscriptions WHERE topic_id IN('.$topics.')') or error('Unable to delete subscriptions', __FILE__, __LINE__, $pun_db->error()); - - // Create a list of the post ID's in this topic and then strip the search index - $result = $pun_db->query('SELECT id FROM '.$pun_db->prefix.'posts WHERE topic_id IN('.$topics.')') or error('Unable to fetch posts', __FILE__, __LINE__, $pun_db->error()); - - $post_ids = ''; - while ($row = $pun_db->fetch_row($result)) - $post_ids .= ($post_ids != '') ? ','.$row[0] : $row[0]; - - // We have to check that we actually have a list of post ID's since we could be deleting just a redirect topic - if ($post_ids != '') - strip_search_index($post_ids); - - // Delete posts - $pun_db->query('DELETE FROM '.$pun_db->prefix.'posts WHERE topic_id IN('.$topics.')') or error('Unable to delete posts', __FILE__, __LINE__, $pun_db->error()); - - update_forum($fid); - - pun_redirect('viewforum.php?id='.$fid, $lang_misc['Delete topics redirect']); - } - - - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_misc['Moderate']; - require PUN_ROOT.'header.php'; - -?> -
    -

    -
    -
    - -
    -
    - -
    -

    -
    -
    -
    -

    -
    -
    -
    -query('UPDATE '.$pun_db->prefix.'topics SET closed='.$action.' WHERE id IN('.implode(',', $topics).') AND forum_id='.$fid) or error('Unable to close topics', __FILE__, __LINE__, $pun_db->error()); - - $redirect_msg = ($action) ? $lang_misc['Close topics redirect'] : $lang_misc['Open topics redirect']; - pun_redirect('moderate.php?fid='.$fid, $redirect_msg); - } - // Or just one in $_GET - else - { - confirm_referrer('viewtopic.php'); - - $topic_id = ($action) ? intval($_GET['close']) : intval($_GET['open']); - if ($topic_id < 1) - message($lang_common['Bad request']); - - $pun_db->query('UPDATE '.$pun_db->prefix.'topics SET closed='.$action.' WHERE id='.$topic_id.' AND forum_id='.$fid) or error('Unable to close topic', __FILE__, __LINE__, $pun_db->error()); - - $redirect_msg = ($action) ? $lang_misc['Close topic redirect'] : $lang_misc['Open topic redirect']; - pun_redirect('viewtopic.php?id='.$topic_id, $redirect_msg); - } -} - - -// Stick a topic -else if (isset($_GET['stick'])) -{ - confirm_referrer('viewtopic.php'); - - $stick = intval($_GET['stick']); - if ($stick < 1) - message($lang_common['Bad request']); - - $pun_db->query('UPDATE '.$pun_db->prefix.'topics SET sticky=\'1\' WHERE id='.$stick.' AND forum_id='.$fid) or error('Unable to stick topic', __FILE__, __LINE__, $pun_db->error()); - - pun_redirect('viewtopic.php?id='.$stick, $lang_misc['Stick topic redirect']); -} - - -// Unstick a topic -else if (isset($_GET['unstick'])) -{ - confirm_referrer('viewtopic.php'); - - $unstick = intval($_GET['unstick']); - if ($unstick < 1) - message($lang_common['Bad request']); - - $pun_db->query('UPDATE '.$pun_db->prefix.'topics SET sticky=\'0\' WHERE id='.$unstick.' AND forum_id='.$fid) or error('Unable to unstick topic', __FILE__, __LINE__, $pun_db->error()); - - pun_redirect('viewtopic.php?id='.$unstick, $lang_misc['Unstick topic redirect']); -} - - -// No specific forum moderation action was specified in the query string, so we'll display the moderator forum - -// Load the viewforum.php language file -require PUN_ROOT.'lang/'.$pun_user['language'].'/forum.php'; - -// Fetch some info about the forum -$result = $pun_db->query('SELECT f.forum_name, f.redirect_url, f.num_topics FROM '.$pun_db->prefix.'forums AS f LEFT JOIN '.$pun_db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND f.id='.$fid) or error('Unable to fetch forum info', __FILE__, __LINE__, $pun_db->error()); -if (!$pun_db->num_rows($result)) - message($lang_common['Bad request']); - -$cur_forum = $pun_db->fetch_assoc($result); - -// Is this a redirect forum? In that case, abort! -if ($cur_forum['redirect_url'] != '') - message($lang_common['Bad request']); - -$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.pun_htmlspecialchars($cur_forum['forum_name']); -require PUN_ROOT.'header.php'; - -// Determine the topic offset (based on $_GET['p']) -$num_pages = ceil($cur_forum['num_topics'] / $pun_user['disp_topics']); - -$p = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p']; -$start_from = $pun_user['disp_topics'] * ($p - 1); - -// Generate paging links -$paging_links = $lang_common['Pages'].': '.pun_paginate($num_pages, $p, 'moderate.php?fid='.$fid) - -?> -
    -
    - -
    •  
    • » 
    -
    -
    -
    - -
    -
    -

    -
    -
    - - - - - - - - - - - -query('SELECT id, poster, subject, posted, last_post, last_post_id, last_poster, num_views, num_replies, closed, sticky, moved_to FROM '.$pun_db->prefix.'topics WHERE forum_id='.$fid.' ORDER BY sticky DESC, last_post DESC LIMIT '.$start_from.', '.$pun_user['disp_topics']) or error('Unable to fetch topic list for forum', __FILE__, __LINE__, $pun_db->error()); - -// If there are topics in this forum. -if ($pun_db->num_rows($result)) -{ - $button_status = ''; - - while ($cur_topic = $pun_db->fetch_assoc($result)) - { - - $icon_text = $lang_common['Normal icon']; - $item_status = ''; - $icon_type = 'icon'; - - if ($cur_topic['moved_to'] == null) - { - $last_post = ''.format_time($cur_topic['last_post']).' '.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['last_poster']); - $ghost_topic = false; - } - else - { - $last_post = ' '; - $ghost_topic = true; - } - - if ($pun_config['o_censoring'] == '1') - $cur_topic['subject'] = censor_words($cur_topic['subject']); - - if ($cur_topic['moved_to'] != 0) - $subject = $lang_forum['Moved'].': '.pun_htmlspecialchars($cur_topic['subject']).''.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).''; - else if ($cur_topic['closed'] == '0') - $subject = ''.pun_htmlspecialchars($cur_topic['subject']).''.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).''; - else - { - $subject = ''.pun_htmlspecialchars($cur_topic['subject']).''.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).''; - $icon_text = $lang_common['Closed icon']; - $item_status = 'iclosed'; - } - - if ($cur_topic['last_post'] > $pun_user['last_visit'] && !$ghost_topic) - { - $icon_text .= ' '.$lang_common['New icon']; - $item_status .= ' inew'; - $icon_type = 'icon inew'; - $subject = ''.$subject.''; - $subject_new_posts = ''.$lang_common['New posts'].' ]'; - } - else - $subject_new_posts = null; - - // We won't display "the dot", but we add the spaces anyway - if ($pun_config['o_show_dot'] == '1') - $subject = '  '.$subject; - - if ($cur_topic['sticky'] == '1') - { - $subject = ''.$lang_forum['Sticky'].': '.$subject; - $item_status .= ' isticky'; - $icon_text .= ' '.$lang_forum['Sticky']; - } - - $num_pages_topic = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']); - - if ($num_pages_topic > 1) - $subject_multipage = '[ '.pun_paginate($num_pages_topic, -1, 'viewtopic.php?id='.$cur_topic['id']).' ]'; - else - $subject_multipage = null; - - // Should we show the "New posts" and/or the multipage links? - if (!empty($subject_new_posts) || !empty($subject_multipage)) - { - $subject .= '  '.(!empty($subject_new_posts) ? $subject_new_posts : ''); - $subject .= !empty($subject_multipage) ? ' '.$subject_multipage : ''; - } - -?> - > - - - - - - -'."\n"; -} - -?> - -
    -
    -
    - -
    -
    '.$lang_forum['Empty forum'].'
    -
    -
    -
    - -
    -
    - -

    />   />   />   />

    -
    -
    -
    -
    - tags and the target -## URL for the pun_redirect() function must be set to the value of -## $_SERVER['REQUEST_URI']. This URL can however be extended to -## include extra variables (like the addition of &foo=bar in -## the form of this example plugin). -## -## 4. If your plugin is for administrators only, the filename must -## have the prefix "AP_". If it is for both administrators and -## moderators, use the prefix "AMP_". This example plugin has the -## prefix "AMP_" and is therefore available for both admins and -## moderators in the navigation menu. -## -## 5. Use _ instead of spaces in the file name. -## -## 6. Since plugin scripts are included from the PunBB script -## admin_loader.php, you have access to all PunBB functions and -## global variables (e.g. $pun_db, $pun_config, $pun_user etc). -## -## 7. Do your best to keep the look and feel of your plugins' user -## interface similar to the rest of the admin scripts. Feel free to -## borrow markup and code from the admin scripts to use in your -## plugins. If you create your own styles they need to be added to -## the "base_admin" style sheet. -## -## 8. Plugins must be released under the GNU General Public License or -## a GPL compatible license. Copy the GPL preamble at the top of -## this file into your plugin script and alter the copyright notice -## to refrect the author of the plugin (i.e. you). -## -## - - -// Make sure no one attempts to run this script "directly" -if (!defined('PUN')) - exit; - -// Tell admin_loader.php that this is indeed a plugin and that it is loaded -define('PUN_PLUGIN_LOADED', 1); - -// -// The rest is up to you! -// - -// If the "Show text" button was clicked -if (isset($_POST['show_text'])) -{ - // Make sure something something was entered - if (trim($_POST['text_to_show']) == '') - message('You didn\'t enter anything!'); - - // Display the admin navigation menu - generate_admin_menu($plugin); - -?> -
    -

    Example plugin

    -
    -
    -

    You said "". Great stuff.

    -

    Go back

    -
    -
    -
    - -
    -

    Example plugin

    -
    -
    -

    This plugin doesn't do anything useful. Hence the name "Example".

    -

    This would be a good spot to talk a little about your plugin. Describe what it does and how it should be used. Be brief, but informative.

    -
    -
    - -

    An example form

    -
    -
    -
    -
    - Enter a piece of text and hit "Show text"! -
    - - - - - -
    Text to show
    - - The text you want to display. -
    -
    -
    -
    -
    -
    -
    - - -. - - -. - - \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/post.php --- a/punbb/post.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,600 +0,0 @@ - 0 && $fid > 0) - message($lang_common['Bad request']); - -// Fetch some info about the topic and/or the forum -if ($tid) - $result = $pun_db->query('SELECT f.id, f.forum_name, f.moderators, f.redirect_url, fp.post_replies, fp.post_topics, t.subject, t.closed FROM '.$pun_db->prefix.'topics AS t INNER JOIN '.$pun_db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$pun_db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$tid) or error('Unable to fetch forum info', __FILE__, __LINE__, $pun_db->error()); -else - $result = $pun_db->query('SELECT f.id, f.forum_name, f.moderators, f.redirect_url, fp.post_replies, fp.post_topics FROM '.$pun_db->prefix.'forums AS f LEFT JOIN '.$pun_db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND f.id='.$fid) or error('Unable to fetch forum info', __FILE__, __LINE__, $pun_db->error()); - -if (!$pun_db->num_rows($result)) - message($lang_common['Bad request']); - -$cur_posting = $pun_db->fetch_assoc($result); - -// Is someone trying to post into a redirect forum? -if ($cur_posting['redirect_url'] != '') - message($lang_common['Bad request']); - -// Sort out who the moderators are and if we are currently a moderator (or an admin) -$mods_array = ($cur_posting['moderators'] != '') ? unserialize($cur_posting['moderators']) : array(); -$is_admmod = ($pun_user['g_id'] == PUN_ADMIN || ($pun_user['g_id'] == PUN_MOD && array_key_exists($pun_user['username'], $mods_array))) ? true : false; - -// Do we have permission to post? -if ((($tid && (($cur_posting['post_replies'] == '' && $pun_user['g_post_replies'] == '0') || $cur_posting['post_replies'] == '0')) || - ($fid && (($cur_posting['post_topics'] == '' && $pun_user['g_post_topics'] == '0') || $cur_posting['post_topics'] == '0')) || - (isset($cur_posting['closed']) && $cur_posting['closed'] == '1')) && - !$is_admmod) - message($lang_common['No permission']); - -// Load the post.php language file -require PUN_ROOT.'lang/'.$pun_user['language'].'/post.php'; - -// Start with a clean slate -$errors = array(); - - -// Did someone just hit "Submit" or "Preview"? -if (isset($_POST['form_sent'])) -{ - // Make sure form_user is correct - if (($pun_user['is_guest'] && $_POST['form_user'] != 'Guest') || (!$pun_user['is_guest'] && $_POST['form_user'] != $pun_user['username'])) - message($lang_common['Bad request']); - - // Flood protection - if (!$pun_user['is_guest'] && !isset($_POST['preview']) && $pun_user['last_post'] != '' && (time() - $pun_user['last_post']) < $pun_user['g_post_flood']) - $errors[] = $lang_post['Flood start'].' '.$pun_user['g_post_flood'].' '.$lang_post['flood end']; - - // If it's a new topic - if ($fid) - { - $subject = pun_trim($_POST['req_subject']); - - if ($subject == '') - $errors[] = $lang_post['No subject']; - else if (pun_strlen($subject) > 70) - $errors[] = $lang_post['Too long subject']; - else if ($pun_config['p_subject_all_caps'] == '0' && strtoupper($subject) == $subject && $pun_user['g_id'] < PUN_MOD) - $subject = ucwords(strtolower($subject)); - } - - // If the user is logged in we get the username and e-mail from $pun_user - if (!$pun_user['is_guest']) - { - $username = $pun_user['username']; - $email = $pun_user['email']; - } - // Otherwise it should be in $_POST - else - { - $username = trim($_POST['req_username']); - $email = strtolower(trim(($pun_config['p_force_guest_email'] == '1') ? $_POST['req_email'] : $_POST['email'])); - - // Load the register.php/profile.php language files - require PUN_ROOT.'lang/'.$pun_user['language'].'/prof_reg.php'; - require PUN_ROOT.'lang/'.$pun_user['language'].'/register.php'; - - // It's a guest, so we have to validate the username - if (strlen($username) < 2) - $errors[] = $lang_prof_reg['Username too short']; - else if (!strcasecmp($username, 'Guest') || !strcasecmp($username, $lang_common['Guest'])) - $errors[] = $lang_prof_reg['Username guest']; - else if (preg_match('/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/', $username)) - $errors[] = $lang_prof_reg['Username IP']; - - if ((strpos($username, '[') !== false || strpos($username, ']') !== false) && strpos($username, '\'') !== false && strpos($username, '"') !== false) - $errors[] = $lang_prof_reg['Username reserved chars']; - if (preg_match('#\[b\]|\[/b\]|\[u\]|\[/u\]|\[i\]|\[/i\]|\[color|\[/color\]|\[quote\]|\[quote=|\[/quote\]|\[code\]|\[/code\]|\[img\]|\[/img\]|\[url|\[/url\]|\[email|\[/email\]#i', $username)) - $errors[] = $lang_prof_reg['Username BBCode']; - - // Check username for any censored words - $temp = censor_words($username); - if ($temp != $username) - $errors[] = $lang_register['Username censor']; - - // Check that the username (or a too similar username) is not already registered - $result = $pun_db->query('SELECT username FROM '.$pun_db->prefix.'users WHERE (username=\''.$pun_db->escape($username).'\' OR username=\''.$pun_db->escape(preg_replace('/[^\w]/', '', $username)).'\') AND id>1') or error('Unable to fetch user info', __FILE__, __LINE__, $pun_db->error()); - if ($pun_db->num_rows($result)) - { - $busy = $pun_db->result($result); - $errors[] = $lang_register['Username dupe 1'].' '.pun_htmlspecialchars($busy).'. '.$lang_register['Username dupe 2']; - } - - if ($pun_config['p_force_guest_email'] == '1' || $email != '') - { - require PUN_ROOT.'include/email.php'; - if (!is_valid_email($email)) - $errors[] = $lang_common['Invalid e-mail']; - } - } - - // Clean up message from POST - $message = pun_linebreaks(pun_trim($_POST['req_message'])); - - if ($message == '') - $errors[] = $lang_post['No message']; - else if (strlen($message) > 65535) - $errors[] = $lang_post['Too long message']; - else if ($pun_config['p_message_all_caps'] == '0' && strtoupper($message) == $message && $pun_user['g_id'] < PUN_MOD) - $message = ucwords(strtolower($message)); - - // Validate BBCode syntax - if ($pun_config['p_message_bbcode'] == '1' && strpos($message, '[') !== false && strpos($message, ']') !== false) - { - require PUN_ROOT.'include/parser.php'; - $message = preparse_bbcode($message, $errors); - } - - - require PUN_ROOT.'include/search_idx.php'; - global $db, $session, $paths, $template, $plugins; // Common objects - - $hide_smilies = isset($_POST['hide_smilies']) ? 1 : 0; - $subscribe = isset($_POST['subscribe']) ? 1 : 0; - - $now = time(); - - // Did everything go according to plan? - if (empty($errors) && !isset($_POST['preview'])) - { - // If it's a reply - if ($tid) - { - if ($session->user_logged_in) - { - // Insert the new post - $pun_db->query('INSERT INTO '.$pun_db->prefix.'posts (poster, poster_id, poster_ip, message, hide_smilies, posted, topic_id) VALUES(\''.$pun_db->escape($username).'\', '.$pun_user['id'].', \''.get_remote_address().'\', \''.$pun_db->escape($message).'\', \''.$hide_smilies.'\', '.$now.', '.$tid.')') or error('Unable to create post', __FILE__, __LINE__, $pun_db->error()); - $new_pid = $pun_db->insert_id(); - - // To subscribe or not to subscribe, that ... - if ($pun_config['o_subscriptions'] == '1' && $subscribe) - { - $result = $pun_db->query('SELECT 1 FROM '.$pun_db->prefix.'subscriptions WHERE user_id='.$pun_user['id'].' AND topic_id='.$tid) or error('Unable to fetch subscription info', __FILE__, __LINE__, $pun_db->error()); - if (!$pun_db->num_rows($result)) - $pun_db->query('INSERT INTO '.$pun_db->prefix.'subscriptions (user_id, topic_id) VALUES('.$pun_user['id'].' ,'.$tid.')') or error('Unable to add subscription', __FILE__, __LINE__, $pun_db->error()); - } - } - else - { - // It's a guest. Insert the new post - $email_sql = ($pun_config['p_force_guest_email'] == '1' || $email != '') ? '\''.$email.'\'' : 'NULL'; - $pun_db->query('INSERT INTO '.$pun_db->prefix.'posts (poster, poster_ip, poster_email, message, hide_smilies, posted, topic_id) VALUES(\''.$pun_db->escape($username).'\', \''.get_remote_address().'\', '.$email_sql.', \''.$pun_db->escape($message).'\', \''.$hide_smilies.'\', '.$now.', '.$tid.')') or error('Unable to create post', __FILE__, __LINE__, $pun_db->error()); - $new_pid = $pun_db->insert_id(); - } - - // Count number of replies in the topic - $result = $pun_db->query('SELECT COUNT(id) FROM '.$pun_db->prefix.'posts WHERE topic_id='.$tid) or error('Unable to fetch post count for topic', __FILE__, __LINE__, $pun_db->error()); - $num_replies = $pun_db->result($result, 0) - 1; - - // Update topic - $pun_db->query('UPDATE '.$pun_db->prefix.'topics SET num_replies='.$num_replies.', last_post='.$now.', last_post_id='.$new_pid.', last_poster=\''.$pun_db->escape($username).'\' WHERE id='.$tid) or error('Unable to update topic', __FILE__, __LINE__, $pun_db->error()); - - update_search_index('post', $new_pid, $message); - - update_forum($cur_posting['id']); - - // Should we send out notifications? - if ($pun_config['o_subscriptions'] == '1') - { - // Get the post time for the previous post in this topic - $result = $pun_db->query('SELECT posted FROM '.$pun_db->prefix.'posts WHERE topic_id='.$tid.' ORDER BY id DESC LIMIT 1, 1') or error('Unable to fetch post info', __FILE__, __LINE__, $pun_db->error()); - $previous_post_time = $pun_db->result($result); - - // Get any subscribed users that should be notified (banned users are NOT excluded in Enano) - $result = $pun_db->query('SELECT u.id, eu.email, u.notify_with_post, u.language FROM '.$pun_db->prefix.'users AS u LEFT JOIN '.table_prefix.'users AS eu ON eu.user_id=u.id INNER JOIN '.$pun_db->prefix.'subscriptions AS s ON u.id=s.user_id LEFT JOIN '.$pun_db->prefix.'forum_perms AS fp ON (fp.forum_id='.$cur_posting['id'].' AND fp.group_id=u.group_id) LEFT JOIN '.$pun_db->prefix.'online AS o ON u.id=o.user_id WHERE COALESCE(o.logged, u.last_visit)>'.$previous_post_time.' AND (fp.read_forum IS NULL OR fp.read_forum=1) AND s.topic_id='.$tid.' AND u.id!='.intval($pun_user['id'])) or error('Unable to fetch subscription info', __FILE__, __LINE__, $pun_db->error()); - if ($pun_db->num_rows($result)) - { - require_once PUN_ROOT.'include/email.php'; - - $notification_emails = array(); - - // Loop through subscribed users and send e-mails - while ($cur_subscriber = $pun_db->fetch_assoc($result)) - { - // Is the subscription e-mail for $cur_subscriber['language'] cached or not? - if (!isset($notification_emails[$cur_subscriber['language']])) - { - if (file_exists(PUN_ROOT.'lang/'.$cur_subscriber['language'].'/mail_templates/new_reply.tpl')) - { - // Load the "new reply" template - $mail_tpl = trim(file_get_contents(PUN_ROOT.'lang/'.$cur_subscriber['language'].'/mail_templates/new_reply.tpl')); - - // Load the "new reply full" template (with post included) - $mail_tpl_full = trim(file_get_contents(PUN_ROOT.'lang/'.$cur_subscriber['language'].'/mail_templates/new_reply_full.tpl')); - - // The first row contains the subject (it also starts with "Subject:") - $first_crlf = strpos($mail_tpl, "\n"); - $mail_subject = trim(substr($mail_tpl, 8, $first_crlf-8)); - $mail_message = trim(substr($mail_tpl, $first_crlf)); - - $first_crlf = strpos($mail_tpl_full, "\n"); - $mail_subject_full = trim(substr($mail_tpl_full, 8, $first_crlf-8)); - $mail_message_full = trim(substr($mail_tpl_full, $first_crlf)); - - $mail_subject = str_replace('', '\''.$cur_posting['subject'].'\'', $mail_subject); - $mail_message = str_replace('', '\''.$cur_posting['subject'].'\'', $mail_message); - $mail_message = str_replace('', $username, $mail_message); - $mail_message = str_replace('', $pun_config['o_base_url'].'/viewtopic.php?pid='.$new_pid.'#p'.$new_pid, $mail_message); - $mail_message = str_replace('', $pun_config['o_base_url'].'/misc.php?unsubscribe='.$tid, $mail_message); - $mail_message = str_replace('', $pun_config['o_board_title'].' '.$lang_common['Mailer'], $mail_message); - - $mail_subject_full = str_replace('', '\''.$cur_posting['subject'].'\'', $mail_subject_full); - $mail_message_full = str_replace('', '\''.$cur_posting['subject'].'\'', $mail_message_full); - $mail_message_full = str_replace('', $username, $mail_message_full); - $mail_message_full = str_replace('', $message, $mail_message_full); - $mail_message_full = str_replace('', $pun_config['o_base_url'].'/viewtopic.php?pid='.$new_pid.'#p'.$new_pid, $mail_message_full); - $mail_message_full = str_replace('', $pun_config['o_base_url'].'/misc.php?unsubscribe='.$tid, $mail_message_full); - $mail_message_full = str_replace('', $pun_config['o_board_title'].' '.$lang_common['Mailer'], $mail_message_full); - - $notification_emails[$cur_subscriber['language']][0] = $mail_subject; - $notification_emails[$cur_subscriber['language']][1] = $mail_message; - $notification_emails[$cur_subscriber['language']][2] = $mail_subject_full; - $notification_emails[$cur_subscriber['language']][3] = $mail_message_full; - - $mail_subject = $mail_message = $mail_subject_full = $mail_message_full = null; - } - } - - // We have to double check here because the templates could be missing - if (isset($notification_emails[$cur_subscriber['language']])) - { - if ($cur_subscriber['notify_with_post'] == '0') - pun_mail($cur_subscriber['email'], $notification_emails[$cur_subscriber['language']][0], $notification_emails[$cur_subscriber['language']][1]); - else - pun_mail($cur_subscriber['email'], $notification_emails[$cur_subscriber['language']][2], $notification_emails[$cur_subscriber['language']][3]); - } - } - } - } - } - // If it's a new topic - else if ($fid) - { - // Create the topic - $pun_db->query('INSERT INTO '.$pun_db->prefix.'topics (poster, subject, posted, last_post, last_poster, forum_id) VALUES(\''.$pun_db->escape($username).'\', \''.$pun_db->escape($subject).'\', '.$now.', '.$now.', \''.$pun_db->escape($username).'\', '.$fid.')') or error('Unable to create topic', __FILE__, __LINE__, $pun_db->error()); - $new_tid = $pun_db->insert_id(); - - if (!$pun_user['is_guest']) - { - // To subscribe or not to subscribe, that ... - if ($pun_config['o_subscriptions'] == '1' && (isset($_POST['subscribe']) && $_POST['subscribe'] == '1')) - $pun_db->query('INSERT INTO '.$pun_db->prefix.'subscriptions (user_id, topic_id) VALUES('.$pun_user['id'].' ,'.$new_tid.')') or error('Unable to add subscription', __FILE__, __LINE__, $pun_db->error()); - - // Create the post ("topic post") - $pun_db->query('INSERT INTO '.$pun_db->prefix.'posts (poster, poster_id, poster_ip, message, hide_smilies, posted, topic_id) VALUES(\''.$pun_db->escape($username).'\', '.$pun_user['id'].', \''.get_remote_address().'\', \''.$pun_db->escape($message).'\', \''.$hide_smilies.'\', '.$now.', '.$new_tid.')') or error('Unable to create post', __FILE__, __LINE__, $pun_db->error()); - } - else - { - // Create the post ("topic post") - $email_sql = ($pun_config['p_force_guest_email'] == '1' || $email != '') ? '\''.$email.'\'' : 'NULL'; - $pun_db->query('INSERT INTO '.$pun_db->prefix.'posts (poster, poster_ip, poster_email, message, hide_smilies, posted, topic_id) VALUES(\''.$pun_db->escape($username).'\', \''.get_remote_address().'\', '.$email_sql.', \''.$pun_db->escape($message).'\', \''.$hide_smilies.'\', '.$now.', '.$new_tid.')') or error('Unable to create post', __FILE__, __LINE__, $pun_db->error()); - } - $new_pid = $pun_db->insert_id(); - - // Update the topic with last_post_id - $pun_db->query('UPDATE '.$pun_db->prefix.'topics SET last_post_id='.$new_pid.' WHERE id='.$new_tid) or error('Unable to update topic', __FILE__, __LINE__, $pun_db->error()); - - update_search_index('post', $new_pid, $message, $subject); - - update_forum($fid); - } - - // If the posting user is logged in, increment his/her post count - if (!$pun_user['is_guest']) - { - $low_prio = ($db_type == 'mysql') ? 'LOW_PRIORITY ' : ''; - $pun_db->query('UPDATE '.$low_prio.$pun_db->prefix.'users SET num_posts=num_posts+1, last_post='.$now.' WHERE id='.$pun_user['id']) or error('Unable to update user', __FILE__, __LINE__, $pun_db->error()); - } - - pun_redirect('viewtopic.php?pid='.$new_pid.'#p'.$new_pid, $lang_post['Post redirect']); - } -} - - -// If a topic id was specified in the url (it's a reply). -if ($tid) -{ - $action = $lang_post['Post a reply']; - $form = '
    '; - - // If a quote-id was specified in the url. - if (isset($_GET['qid'])) - { - $qid = intval($_GET['qid']); - if ($qid < 1) - message($lang_common['Bad request']); - - $result = $pun_db->query('SELECT poster, message FROM '.$pun_db->prefix.'posts WHERE id='.$qid.' AND topic_id='.$tid) or error('Unable to fetch quote info', __FILE__, __LINE__, $pun_db->error()); - if (!$pun_db->num_rows($result)) - message($lang_common['Bad request']); - - list($q_poster, $q_message) = $pun_db->fetch_row($result); - - $q_message = str_replace('[img]', '[url]', $q_message); - $q_message = str_replace('[/img]', '[/url]', $q_message); - $q_message = pun_htmlspecialchars($q_message); - - if ($pun_config['p_message_bbcode'] == '1') - { - // If username contains a square bracket, we add "" or '' around it (so we know when it starts and ends) - if (strpos($q_poster, '[') !== false || strpos($q_poster, ']') !== false) - { - if (strpos($q_poster, '\'') !== false) - $q_poster = '"'.$q_poster.'"'; - else - $q_poster = '\''.$q_poster.'\''; - } - else - { - // Get the characters at the start and end of $q_poster - $ends = substr($q_poster, 0, 1).substr($q_poster, -1, 1); - - // Deal with quoting "Username" or 'Username' (becomes '"Username"' or "'Username'") - if ($ends == '\'\'') - $q_poster = '"'.$q_poster.'"'; - else if ($ends == '""') - $q_poster = '\''.$q_poster.'\''; - } - - $quote = '[quote='.$q_poster.']'.$q_message.'[/quote]'."\n"; - } - else - $quote = '> '.$q_poster.' '.$lang_common['wrote'].':'."\n\n".'> '.$q_message."\n"; - } - - $forum_name = ''.pun_htmlspecialchars($cur_posting['forum_name']).''; -} -// If a forum_id was specified in the url (new topic). -else if ($fid) -{ - $action = $lang_post['Post new topic']; - $form = ''; - - $forum_name = pun_htmlspecialchars($cur_posting['forum_name']); -} -else - message($lang_common['Bad request']); - - -$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$action; -$required_fields = array('req_email' => $lang_common['E-mail'], 'req_subject' => $lang_common['Subject'], 'req_message' => $lang_common['Message']); -$focus_element = array('post'); - -if (!$pun_user['is_guest']) - $focus_element[] = ($fid) ? 'req_subject' : 'req_message'; -else -{ - $required_fields['req_username'] = $lang_post['Guest name']; - $focus_element[] = 'req_username'; -} - -require PUN_ROOT.'header.php'; - -?> -
    -
    -
    •  » 
    •  » '.pun_htmlspecialchars($cur_posting['subject']) ?>
    -
    -
    - - -
    -

    -
    -
    -

    -
      -'.$cur_error.''."\n"; -?> -
    -
    -
    -
    - - -
    -

    -
    -
    -
    -
    - -
    -
    -
    -
    -
    - - -
    -

    -
    - -
    -
    - -
    - - -'.$lang_common['E-mail'].'' : $lang_common['E-mail']; - $email_form_name = ($pun_config['p_force_guest_email'] == '1') ? 'req_email' : 'email'; - -?> - -
    - - - - -
    -
    -'.$lang_post['Hide smilies']; - - if ($pun_config['o_subscriptions'] == '1') - $checkboxes[] = '
    -
    -
    - -
    -
    - '."\n\t\t\t\t", $checkboxes).'
    '."\n" ?> -
    -
    -
    - -
    -

    - -
    -
    - -query('SELECT poster, message, hide_smilies, posted FROM '.$pun_db->prefix.'posts WHERE topic_id='.$tid.' ORDER BY id DESC LIMIT '.$pun_config['o_topic_review']) or error('Unable to fetch topic review', __FILE__, __LINE__, $pun_db->error()); - -?> - -
    -

    -fetch_assoc($result)) - { - // Switch the background color for every message. - $bg_switch = ($bg_switch) ? $bg_switch = false : $bg_switch = true; - $vtbg = ($bg_switch) ? ' roweven' : ' rowodd'; - $post_count++; - - $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']); - -?> -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    - -
    -query('SELECT activate_string, activate_key FROM '.$pun_db->prefix.'users WHERE id='.$id) or error('Unable to fetch new password', __FILE__, __LINE__, $pun_db->error()); - list($new_password_hash, $new_password_key) = $pun_db->fetch_row($result); - - if ($key == '' || $key != $new_password_key) - message($lang_profile['Pass key bad'].' '.$pun_config['o_admin_email'].'.'); - else - { - $pun_db->query('UPDATE '.$pun_db->prefix.'users SET password=\''.$new_password_hash.'\', activate_string=NULL, activate_key=NULL WHERE id='.$id) or error('Unable to update password', __FILE__, __LINE__, $pun_db->error()); - - message($lang_profile['Pass updated'], true); - } - } - - // Make sure we are allowed to change this users password - if ($pun_user['id'] != $id) - { - if ($pun_user['g_id'] < USER_LEVEL_MOD) // A regular user trying to change another users password? - message($lang_common['No permission']); - else if ($pun_user['g_id'] == USER_LEVEL_MOD) // A moderator trying to change a users password? - { - $result = $pun_db->query('SELECT group_id FROM '.$pun_db->prefix.'users WHERE id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $pun_db->error()); - if (!$pun_db->num_rows($result)) - message($lang_common['Bad request']); - - if ($pun_config['p_mod_edit_users'] == '0' || $pun_config['p_mod_change_passwords'] == '0' || $pun_db->result($result) < PUN_GUEST) - message($lang_common['No permission']); - } - } - - if (isset($_POST['form_sent'])) - { - $old_password = isset($_POST['req_old_password']) ? trim($_POST['req_old_password']) : ''; - $new_password1 = trim($_POST['req_new_password1']); - $new_password2 = trim($_POST['req_new_password2']); - - if ($new_password1 != $new_password2) - message($lang_prof_reg['Pass not match']); - if (strlen($new_password1) < 4) - message($lang_prof_reg['Pass too short']); - - $result = $pun_db->query('SELECT password, save_pass FROM '.$pun_db->prefix.'users WHERE id='.$id) or error('Unable to fetch password', __FILE__, __LINE__, $pun_db->error()); - list($db_password_hash, $save_pass) = $pun_db->fetch_row($result); - - $authorized = false; - - if (!empty($db_password_hash)) - { - $sha1_in_db = (strlen($db_password_hash) == 40) ? true : false; - $sha1_available = (function_exists('sha1') || function_exists('mhash')) ? true : false; - - $old_password_hash = pun_hash($old_password); // This could result in either an SHA-1 or an MD5 hash - - if (($sha1_in_db && $sha1_available && $db_password_hash == $old_password_hash) || - (!$sha1_in_db && $db_password_hash == md5($old_password)) || - $pun_user['g_id'] >= USER_LEVEL_MEMBER) - $authorized = true; - } - - if (!$authorized) - message($lang_profile['Wrong pass']); - - $new_password_hash = pun_hash($new_password1); - - $pun_db->query('UPDATE '.$pun_db->prefix.'users SET password=\''.$new_password_hash.'\' WHERE id='.$id) or error('Unable to update password', __FILE__, __LINE__, $pun_db->error()); - - if ($pun_user['id'] == $id) - { - $expire = ($save_pass == '1') ? time() + 31536000 : 0; - pun_setcookie($pun_user['id'], $new_password_hash, $expire); - } - - pun_redirect('profile.php?section=essentials&id='.$id, $lang_profile['Pass updated redirect']); - } - - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Profile']; - $required_fields = array('req_old_password' => $lang_profile['Old pass'], 'req_new_password1' => $lang_profile['New pass'], 'req_new_password2' => $lang_profile['Confirm new pass']); - $focus_element = array('change_pass', (($pun_user['g_id'] < USER_LEVEL_MOD) ? 'req_old_password' : 'req_new_password1')); - require PUN_ROOT.'header.php'; - -?> -
    -

    -
    -
    -
    - -
    - -
    - - - -
    -
    -
    -
    -

    -
    -
    -
    -query('SELECT group_id FROM '.$pun_db->prefix.'users WHERE id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $pun_db->error()); - if (!$pun_db->num_rows($result)) - message($lang_common['Bad request']); - - if ($pun_config['p_mod_edit_users'] == '0' || $pun_db->result($result) < PUN_GUEST) - message($lang_common['No permission']); - } - } - - if (isset($_GET['key'])) - { - $key = $_GET['key']; - - $result = $pun_db->query('SELECT activate_string, activate_key FROM '.$pun_db->prefix.'users WHERE id='.$id) or error('Unable to fetch activation data', __FILE__, __LINE__, $pun_db->error()); - list($new_email, $new_email_key) = $pun_db->fetch_row($result); - - if ($key == '' || $key != $new_email_key) - message($lang_profile['E-mail key bad'].' '.$pun_config['o_admin_email'].'.'); - else - { - $pun_db->query('UPDATE '.$pun_db->prefix.'users SET email=activate_string, activate_string=NULL, activate_key=NULL WHERE id='.$id) or error('Unable to update e-mail address', __FILE__, __LINE__, $pun_db->error()); - - message($lang_profile['E-mail updated'], true); - } - } - else if (isset($_POST['form_sent'])) - { - if (pun_hash($_POST['req_password']) !== $pun_user['password']) - message($lang_profile['Wrong pass']); - - require PUN_ROOT.'include/email.php'; - - // Validate the email-address - $new_email = strtolower(trim($_POST['req_new_email'])); - if (!is_valid_email($new_email)) - message($lang_common['Invalid e-mail']); - - // Check it it's a banned e-mail address - if (is_banned_email($new_email)) - { - if ($pun_config['p_allow_banned_email'] == '0') - message($lang_prof_reg['Banned e-mail']); - else if ($pun_config['o_mailing_list'] != '') - { - $mail_subject = 'Alert - Banned e-mail detected'; - $mail_message = 'User \''.$pun_user['username'].'\' changed to banned e-mail address: '.$new_email."\n\n".'User profile: '.$pun_config['o_base_url'].'/profile.php?id='.$id."\n\n".'-- '."\n".'Forum Mailer'."\n".'(Do not reply to this message)'; - - pun_mail($pun_config['o_mailing_list'], $mail_subject, $mail_message); - } - } - - // Check if someone else already has registered with that e-mail address - $result = $pun_db->query('SELECT id, username FROM '.$pun_db->prefix.'users WHERE email=\''.$pun_db->escape($new_email).'\'') or error('Unable to fetch user info', __FILE__, __LINE__, $pun_db->error()); - if ($pun_db->num_rows($result)) - { - if ($pun_config['p_allow_dupe_email'] == '0') - message($lang_prof_reg['Dupe e-mail']); - else if ($pun_config['o_mailing_list'] != '') - { - while ($cur_dupe = $pun_db->fetch_assoc($result)) - $dupe_list[] = $cur_dupe['username']; - - $mail_subject = 'Alert - Duplicate e-mail detected'; - $mail_message = 'User \''.$pun_user['username'].'\' changed to an e-mail address that also belongs to: '.implode(', ', $dupe_list)."\n\n".'User profile: '.$pun_config['o_base_url'].'/profile.php?id='.$id."\n\n".'-- '."\n".'Forum Mailer'."\n".'(Do not reply to this message)'; - - pun_mail($pun_config['o_mailing_list'], $mail_subject, $mail_message); - } - } - - - $new_email_key = random_pass(8); - - $pun_db->query('UPDATE '.$pun_db->prefix.'users SET activate_string=\''.$pun_db->escape($new_email).'\', activate_key=\''.$new_email_key.'\' WHERE id='.$id) or error('Unable to update activation data', __FILE__, __LINE__, $pun_db->error()); - - // Load the "activate e-mail" template - $mail_tpl = trim(file_get_contents(PUN_ROOT.'lang/'.$pun_user['language'].'/mail_templates/activate_email.tpl')); - - // The first row contains the subject - $first_crlf = strpos($mail_tpl, "\n"); - $mail_subject = trim(substr($mail_tpl, 8, $first_crlf-8)); - $mail_message = trim(substr($mail_tpl, $first_crlf)); - - $mail_message = str_replace('', $pun_user['username'], $mail_message); - $mail_message = str_replace('', $pun_config['o_base_url'], $mail_message); - $mail_message = str_replace('', $pun_config['o_base_url'].'/profile.php?action=change_email&id='.$id.'&key='.$new_email_key, $mail_message); - $mail_message = str_replace('', $pun_config['o_board_title'].' '.$lang_common['Mailer'], $mail_message); - - pun_mail($new_email, $mail_subject, $mail_message); - - message($lang_profile['Activate e-mail sent'].' '.$pun_config['o_admin_email'].'.', true); - } - - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Profile']; - $required_fields = array('req_new_email' => $lang_profile['New e-mail'], 'req_password' => $lang_common['Password']); - $focus_element = array('change_email', 'req_new_email'); - require PUN_ROOT.'header.php'; - -?> -
    -

    -
    -
    -
    -
    - -
    - - - -

    -
    -
    -
    -

    -
    -
    -
    - $pun_config['o_avatars_size']) - message($lang_profile['Too large'].' '.$pun_config['o_avatars_size'].' '.$lang_profile['bytes'].'.'); - - // Determine type - $extensions = null; - if ($uploaded_file['type'] == 'image/gif') - $extensions = array('.gif', '.jpg', '.png'); - else if ($uploaded_file['type'] == 'image/jpeg' || $uploaded_file['type'] == 'image/pjpeg') - $extensions = array('.jpg', '.gif', '.png'); - else - $extensions = array('.png', '.gif', '.jpg'); - - // Move the file to the avatar directory. We do this before checking the width/height to circumvent open_basedir restrictions. - if (!@move_uploaded_file($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.tmp')) - message($lang_profile['Move failed'].' '.$pun_config['o_admin_email'].'.'); - - // Now check the width/height - list($width, $height, $type,) = getimagesize($pun_config['o_avatars_dir'].'/'.$id.'.tmp'); - if (empty($width) || empty($height) || $width > $pun_config['o_avatars_width'] || $height > $pun_config['o_avatars_height']) - { - @unlink($pun_config['o_avatars_dir'].'/'.$id.'.tmp'); - message($lang_profile['Too wide or high'].' '.$pun_config['o_avatars_width'].'x'.$pun_config['o_avatars_height'].' '.$lang_profile['pixels'].'.'); - } - else if ($type == 1 && $uploaded_file['type'] != 'image/gif') // Prevent dodgy uploads - { - @unlink($pun_config['o_avatars_dir'].'/'.$id.'.tmp'); - message($lang_profile['Bad type']); - } - - // Delete any old avatars and put the new one in place - @unlink($pun_config['o_avatars_dir'].'/'.$id.$extensions[0]); - @unlink($pun_config['o_avatars_dir'].'/'.$id.$extensions[1]); - @unlink($pun_config['o_avatars_dir'].'/'.$id.$extensions[2]); - @rename($pun_config['o_avatars_dir'].'/'.$id.'.tmp', $pun_config['o_avatars_dir'].'/'.$id.$extensions[0]); - @chmod($pun_config['o_avatars_dir'].'/'.$id.$extensions[0], 0644); - } - else - message($lang_profile['Unknown failure']); - - // Enable use_avatar (seems sane since the user just uploaded an avatar) - $pun_db->query('UPDATE '.$pun_db->prefix.'users SET use_avatar=1 WHERE id='.$id) or error('Unable to update avatar state', __FILE__, __LINE__, $pun_db->error()); - - pun_redirect('profile.php?section=personality&id='.$id, $lang_profile['Avatar upload redirect']); - } - - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Profile']; - $required_fields = array('req_file' => $lang_profile['File']); - $focus_element = array('upload_avatar', 'req_file'); - require PUN_ROOT.'header.php'; - -?> -
    -

    -
    -
    -
    -
    - -
    - - - -

    KB).

    -
    -
    -
    -

    -
    -
    -
    -query('UPDATE '.$pun_db->prefix.'users SET use_avatar=0 WHERE id='.$id) or error('Unable to update avatar state', __FILE__, __LINE__, $pun_db->error()); - - pun_redirect('profile.php?section=personality&id='.$id, $lang_profile['Avatar deleted redirect']); -} - - -else if (isset($_POST['update_group_membership'])) -{ - if ($pun_user['g_id'] < USER_LEVEL_ADMIN) - message($lang_common['No permission']); - - confirm_referrer('profile.php'); - - $new_group_id = intval($_POST['group_id']); - - $pun_db->query('UPDATE '.$pun_db->prefix.'users SET group_id='.$new_group_id.' WHERE id='.$id) or error('Unable to change user group', __FILE__, __LINE__, $pun_db->error()); - - // If the user was a moderator or an administrator, we remove him/her from the moderator list in all forums as well - if ($new_group_id > PUN_MOD) - { - $result = $pun_db->query('SELECT id, moderators FROM '.$pun_db->prefix.'forums') or error('Unable to fetch forum list', __FILE__, __LINE__, $pun_db->error()); - - while ($cur_forum = $pun_db->fetch_assoc($result)) - { - $cur_moderators = ($cur_forum['moderators'] != '') ? unserialize($cur_forum['moderators']) : array(); - - if (in_array($id, $cur_moderators)) - { - $username = array_search($id, $cur_moderators); - unset($cur_moderators[$username]); - $cur_moderators = (!empty($cur_moderators)) ? '\''.$pun_db->escape(serialize($cur_moderators)).'\'' : 'NULL'; - - $pun_db->query('UPDATE '.$pun_db->prefix.'forums SET moderators='.$cur_moderators.' WHERE id='.$cur_forum['id']) or error('Unable to update forum', __FILE__, __LINE__, $pun_db->error()); - } - } - } - - pun_redirect('profile.php?section=admin&id='.$id, $lang_profile['Group membership redirect']); -} - - -else if (isset($_POST['update_forums'])) -{ - if ($pun_user['g_id'] < USER_LEVEL_ADMIN) - message($lang_common['No permission']); - - confirm_referrer('profile.php'); - - // Get the username of the user we are processing - $result = $pun_db->query('SELECT eu.username FROM '.$pun_db->prefix.'users AS u LEFT JOIN '.table_prefix.'users AS eu ON eu.user_id=u.id WHERE u.id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $pun_db->error()); - $username = $pun_db->result($result); - - $moderator_in = (isset($_POST['moderator_in'])) ? array_keys($_POST['moderator_in']) : array(); - - // Loop through all forums - $result = $pun_db->query('SELECT id, moderators FROM '.$pun_db->prefix.'forums') or error('Unable to fetch forum list', __FILE__, __LINE__, $pun_db->error()); - - while ($cur_forum = $pun_db->fetch_assoc($result)) - { - $cur_moderators = ($cur_forum['moderators'] != '') ? unserialize($cur_forum['moderators']) : array(); - // If the user should have moderator access (and he/she doesn't already have it) - if (in_array($cur_forum['id'], $moderator_in) && !in_array($id, $cur_moderators)) - { - $cur_moderators[$username] = $id; - ksort($cur_moderators); - - $pun_db->query('UPDATE '.$pun_db->prefix.'forums SET moderators=\''.$pun_db->escape(serialize($cur_moderators)).'\' WHERE id='.$cur_forum['id']) or error('Unable to update forum', __FILE__, __LINE__, $pun_db->error()); - } - // If the user shouldn't have moderator access (and he/she already has it) - else if (!in_array($cur_forum['id'], $moderator_in) && in_array($id, $cur_moderators)) - { - unset($cur_moderators[$username]); - $cur_moderators = (!empty($cur_moderators)) ? '\''.$pun_db->escape(serialize($cur_moderators)).'\'' : 'NULL'; - - $pun_db->query('UPDATE '.$pun_db->prefix.'forums SET moderators='.$cur_moderators.' WHERE id='.$cur_forum['id']) or error('Unable to update forum', __FILE__, __LINE__, $pun_db->error()); - } - } - - pun_redirect('profile.php?section=admin&id='.$id, $lang_profile['Update forums redirect']); -} - - -else if (isset($_POST['ban'])) -{ - if ($pun_user['g_id'] < USER_LEVEL_MOD || ($pun_user['g_id'] == USER_LEVEL_MOD && $pun_config['p_mod_ban_users'] == '0')) - message($lang_common['No permission']); - - pun_redirect('admin_bans.php?add_ban='.$id, $lang_profile['Ban redirect']); -} - - -else if (isset($_POST['delete_user']) || isset($_POST['delete_user_comply'])) -{ - if ($pun_user['g_id'] < USER_LEVEL_ADMIN) - message($lang_common['No permission']); - - confirm_referrer('profile.php'); - - // Get the username and group of the user we are deleting - $result = $pun_db->query('SELECT group_id, username FROM '.$pun_db->prefix.'users WHERE id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $pun_db->error()); - list($group_id, $username) = $pun_db->fetch_row($result); - - if ($group_id == PUN_ADMIN) - message('Administrators cannot be deleted. In order to delete this user, you must first move him/her to a different user group.'); - - if (isset($_POST['delete_user_comply'])) - { - // If the user is a moderator or an administrator, we remove him/her from the moderator list in all forums as well - if ($group_id < PUN_GUEST) - { - $result = $pun_db->query('SELECT id, moderators FROM '.$pun_db->prefix.'forums') or error('Unable to fetch forum list', __FILE__, __LINE__, $pun_db->error()); - - while ($cur_forum = $pun_db->fetch_assoc($result)) - { - $cur_moderators = ($cur_forum['moderators'] != '') ? unserialize($cur_forum['moderators']) : array(); - - if (in_array($id, $cur_moderators)) - { - unset($cur_moderators[$username]); - $cur_moderators = (!empty($cur_moderators)) ? '\''.$pun_db->escape(serialize($cur_moderators)).'\'' : 'NULL'; - - $pun_db->query('UPDATE '.$pun_db->prefix.'forums SET moderators='.$cur_moderators.' WHERE id='.$cur_forum['id']) or error('Unable to update forum', __FILE__, __LINE__, $pun_db->error()); - } - } - } - - // Delete any subscriptions - $pun_db->query('DELETE FROM '.$pun_db->prefix.'subscriptions WHERE user_id='.$id) or error('Unable to delete subscriptions', __FILE__, __LINE__, $pun_db->error()); - - // Remove him/her from the online list (if they happen to be logged in) - $pun_db->query('DELETE FROM '.$pun_db->prefix.'online WHERE user_id='.$id) or error('Unable to remove user from online list', __FILE__, __LINE__, $pun_db->error()); - - // Should we delete all posts made by this user? - if (isset($_POST['delete_posts'])) - { - require PUN_ROOT.'include/search_idx.php'; - @set_time_limit(0); - - // Find all posts made by this user - $result = $pun_db->query('SELECT p.id, p.topic_id, t.forum_id FROM '.$pun_db->prefix.'posts AS p INNER JOIN '.$pun_db->prefix.'topics AS t ON t.id=p.topic_id INNER JOIN '.$pun_db->prefix.'forums AS f ON f.id=t.forum_id WHERE p.poster_id='.$id) or error('Unable to fetch posts', __FILE__, __LINE__, $pun_db->error()); - if ($pun_db->num_rows($result)) - { - while ($cur_post = $pun_db->fetch_assoc($result)) - { - // Determine whether this post is the "topic post" or not - $result2 = $pun_db->query('SELECT id FROM '.$pun_db->prefix.'posts WHERE topic_id='.$cur_post['topic_id'].' ORDER BY posted LIMIT 1') or error('Unable to fetch post info', __FILE__, __LINE__, $pun_db->error()); - - if ($pun_db->result($result2) == $cur_post['id']) - delete_topic($cur_post['topic_id']); - else - delete_post($cur_post['id'], $cur_post['topic_id']); - - update_forum($cur_post['forum_id']); - } - } - } - else - // Set all his/her posts to guest - $pun_db->query('UPDATE '.$pun_db->prefix.'posts SET poster_id=1 WHERE poster_id='.$id) or error('Unable to update posts', __FILE__, __LINE__, $pun_db->error()); - - // Delete the user - $pun_db->query('DELETE FROM '.$pun_db->prefix.'users WHERE id='.$id) or error('Unable to delete user', __FILE__, __LINE__, $pun_db->error()); - - pun_redirect('index.php', $lang_profile['User delete redirect']); - } - - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Profile']; - require PUN_ROOT.'header.php'; - -?> -
    -

    -
    -
    -
    -
    - -
    -

    -
    - -
    -

    -
    -
    -
    -

    -
    -
    -
    -query('SELECT group_id FROM '.$pun_db->prefix.'users WHERE id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $pun_db->error()); - if (!$pun_db->num_rows($result)) - message($lang_common['Bad request']); - - $group_id = $pun_db->result($result); - - if ($pun_user['id'] != $id && - ($pun_user['g_id'] < USER_LEVEL_MOD || - ($pun_user['g_id'] == USER_LEVEL_MOD && $pun_config['p_mod_edit_users'] == '0') || - ($pun_user['g_id'] == USER_LEVEL_MOD && $group_id < PUN_GUEST))) - message($lang_common['No permission']); - - if ($pun_user['g_id'] >= USER_LEVEL_MEMBER) - confirm_referrer('profile.php'); - - // Extract allowed elements from $_POST['form'] - function extract_elements($allowed_elements) - { - $form = array(); - - while (list($key, $value) = @each($_POST['form'])) - { - if (in_array($key, $allowed_elements)) - $form[$key] = $value; - } - - return $form; - } - - $username_updated = false; - - // Validate input depending on section - switch ($section) - { - case 'essentials': - { - $form = extract_elements(array('timezone', 'language')); - - if ($pun_user['g_id'] >= USER_LEVEL_MEMBER) - { - $form['admin_note'] = trim($_POST['admin_note']); - - // Are we allowed to change usernames? - // In Enano, NO! - if ( false ) // ($pun_user['g_id'] == USER_LEVEL_ADMIN || ($pun_user['g_id'] == USER_LEVEL_MOD && $pun_config['p_mod_rename_users'] == '1')) - { - $form['username'] = trim($_POST['req_username']); - $old_username = trim($_POST['old_username']); - - if (strlen($form['username']) < 2) - message($lang_prof_reg['Username too short']); - else if (pun_strlen($form['username']) > 25) // This usually doesn't happen since the form element only accepts 25 characters - message($lang_common['Bad request']); - else if (!strcasecmp($form['username'], 'Guest') || !strcasecmp($form['username'], $lang_common['Guest'])) - message($lang_prof_reg['Username guest']); - else if (preg_match('/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/', $form['username'])) - message($lang_prof_reg['Username IP']); - else if (preg_match('#\[b\]|\[/b\]|\[u\]|\[/u\]|\[i\]|\[/i\]|\[color|\[/color\]|\[quote\]|\[quote=|\[/quote\]|\[code\]|\[/code\]|\[img\]|\[/img\]|\[url|\[/url\]|\[email|\[/email\]#i', $form['username'])) - message($lang_prof_reg['Username BBCode']); - - // Check that the username is not already registered - $result = $pun_db->query('SELECT 1 FROM '.table_prefix.'users WHERE username=\''.$pun_db->escape($form['username']).'\' AND user_id!='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $pun_db->error()); - if ($pun_db->num_rows($result)) - message($lang_profile['Dupe username']); - - if ($form['username'] != $old_username) - $username_updated = true; - } - - // We only allow administrators to update the post count - if ($pun_user['g_id'] == USER_LEVEL_ADMIN) - $form['num_posts'] = intval($_POST['num_posts']); - } - - /* - // Don't update e-mail address in Enano - if ($pun_config['o_regs_verify'] == '0' || $pun_user['g_id'] >= USER_LEVEL_MEMBER) - { - require PUN_ROOT.'include/email.php'; - - // Validate the email-address - $form['email'] = strtolower(trim($_POST['req_email'])); - if (!is_valid_email($form['email'])) - message($lang_common['Invalid e-mail']); - } - */ - - // Make sure we got a valid language string - if (isset($form['language'])) - { - $form['language'] = preg_replace('#[\.\\\/]#', '', $form['language']); - if (!file_exists(PUN_ROOT.'lang/'.$form['language'].'/common.php')) - message($lang_common['Bad request']); - } - - break; - } - - case 'personal': - { - $form = extract_elements(array('realname', 'url', 'location')); - - if ($pun_user['g_id'] == USER_LEVEL_ADMIN) - $form['title'] = trim($_POST['title']); - else if ($pun_user['g_set_title'] == '1') - { - $form['title'] = trim($_POST['title']); - - if ($form['title'] != '') - { - // A list of words that the title may not contain - // If the language is English, there will be some duplicates, but it's not the end of the world - $forbidden = array('Member', 'Moderator', 'Administrator', 'Banned', 'Guest', $lang_common['Member'], $lang_common['Moderator'], $lang_common['Administrator'], $lang_common['Banned'], $lang_common['Guest']); - - if (in_array($form['title'], $forbidden)) - message($lang_profile['Forbidden title']); - } - } - - // Add http:// if the URL doesn't contain it already - if ($form['url'] != '' && strpos(strtolower($form['url']), 'http://') !== 0) - $form['url'] = 'http://'.$form['url']; - - break; - } - - case 'messaging': - { - $form = extract_elements(array('jabber', 'icq', 'msn', 'aim', 'yahoo')); - - // If the ICQ UIN contains anything other than digits it's invalid - if ($form['icq'] != '' && @preg_match('/[^0-9]/', $form['icq'])) - message($lang_prof_reg['Bad ICQ']); - - break; - } - - case 'personality': - { - $form = extract_elements(array('use_avatar')); - - // Clean up signature from POST - $form['signature'] = pun_linebreaks(trim($_POST['signature'])); - - // Validate signature - if (pun_strlen($form['signature']) > $pun_config['p_sig_length']) - message($lang_prof_reg['Sig too long'].' '.$pun_config['p_sig_length'].' '.$lang_prof_reg['characters'].'.'); - else if (substr_count($form['signature'], "\n") > ($pun_config['p_sig_lines']-1)) - message($lang_prof_reg['Sig too many lines'].' '.$pun_config['p_sig_lines'].' '.$lang_prof_reg['lines'].'.'); - else if ($form['signature'] && $pun_config['p_sig_all_caps'] == '0' && strtoupper($form['signature']) == $form['signature'] && $pun_user['g_id'] < USER_LEVEL_MOD) - $form['signature'] = ucwords(strtolower($form['signature'])); - - // Validate BBCode syntax - if ($pun_config['p_sig_bbcode'] == '1' && strpos($form['signature'], '[') !== false && strpos($form['signature'], ']') !== false) - { - require PUN_ROOT.'include/parser.php'; - $form['signature'] = preparse_bbcode($form['signature'], $foo, true); - } - - if (!isset($form['use_avatar']) || $form['use_avatar'] != '1') $form['use_avatar'] = '0'; - - break; - } - - case 'display': - { - $form = extract_elements(array('disp_topics', 'disp_posts', 'show_smilies', 'show_img', 'show_img_sig', 'show_avatars', 'show_sig', 'style')); - - if ($form['disp_topics'] != '' && intval($form['disp_topics']) < 3) $form['disp_topics'] = 3; - if ($form['disp_topics'] != '' && intval($form['disp_topics']) > 75) $form['disp_topics'] = 75; - if ($form['disp_posts'] != '' && intval($form['disp_posts']) < 3) $form['disp_posts'] = 3; - if ($form['disp_posts'] != '' && intval($form['disp_posts']) > 75) $form['disp_posts'] = 75; - - if (!isset($form['show_smilies']) || $form['show_smilies'] != '1') $form['show_smilies'] = '0'; - if (!isset($form['show_img']) || $form['show_img'] != '1') $form['show_img'] = '0'; - if (!isset($form['show_img_sig']) || $form['show_img_sig'] != '1') $form['show_img_sig'] = '0'; - if (!isset($form['show_avatars']) || $form['show_avatars'] != '1') $form['show_avatars'] = '0'; - if (!isset($form['show_sig']) || $form['show_sig'] != '1') $form['show_sig'] = '0'; - - break; - } - - case 'privacy': - { - $form = extract_elements(array('email_setting', 'save_pass', 'notify_with_post')); - - $form['email_setting'] = intval($form['email_setting']); - if ($form['email_setting'] < 0 && $form['email_setting'] > 2) $form['email_setting'] = 1; - - if (!isset($form['save_pass']) || $form['save_pass'] != '1') $form['save_pass'] = '0'; - if (!isset($form['notify_with_post']) || $form['notify_with_post'] != '1') $form['notify_with_post'] = '0'; - - // If the save_pass setting has changed, we need to set a new cookie with the appropriate expire date - if ($pun_user['id'] == $id && $form['save_pass'] != $pun_user['save_pass']) - { - $result = $pun_db->query('SELECT password FROM '.$pun_db->prefix.'users WHERE id='.$id) or error('Unable to fetch user password hash', __FILE__, __LINE__, $pun_db->error()); - pun_setcookie($id, $pun_db->result($result), ($form['save_pass'] == '1') ? time() + 31536000 : 0); - } - - break; - } - - default: - message($lang_common['Bad request']); - } - - - // Singlequotes around non-empty values and NULL for empty values - $temp = array(); - while (list($key, $input) = @each($form)) - { - $value = ($input !== '') ? '\''.$pun_db->escape($input).'\'' : 'NULL'; - - $temp[] = $key.'='.$value; - } - - if (empty($temp)) - message($lang_common['Bad request']); - - - $pun_db->query('UPDATE '.$pun_db->prefix.'users SET '.implode(',', $temp).' WHERE id='.$id) or error('Unable to update profile', __FILE__, __LINE__, $pun_db->error()); - - // If we changed the username we have to update some stuff - if ($username_updated) - { - $pun_db->query('UPDATE '.$pun_db->prefix.'posts SET poster=\''.$pun_db->escape($form['username']).'\' WHERE poster_id='.$id) or error('Unable to update posts', __FILE__, __LINE__, $pun_db->error()); - $pun_db->query('UPDATE '.$pun_db->prefix.'topics SET poster=\''.$pun_db->escape($form['username']).'\' WHERE poster=\''.$pun_db->escape($old_username).'\'') or error('Unable to update topics', __FILE__, __LINE__, $pun_db->error()); - $pun_db->query('UPDATE '.$pun_db->prefix.'topics SET last_poster=\''.$pun_db->escape($form['username']).'\' WHERE last_poster=\''.$pun_db->escape($old_username).'\'') or error('Unable to update topics', __FILE__, __LINE__, $pun_db->error()); - $pun_db->query('UPDATE '.$pun_db->prefix.'forums SET last_poster=\''.$pun_db->escape($form['username']).'\' WHERE last_poster=\''.$pun_db->escape($old_username).'\'') or error('Unable to update forums', __FILE__, __LINE__, $pun_db->error()); - $pun_db->query('UPDATE '.$pun_db->prefix.'online SET ident=\''.$pun_db->escape($form['username']).'\' WHERE ident=\''.$pun_db->escape($old_username).'\'') or error('Unable to update online list', __FILE__, __LINE__, $pun_db->error()); - - // If the user is a moderator or an administrator we have to update the moderator lists - $result = $pun_db->query('SELECT group_id FROM '.$pun_db->prefix.'users WHERE id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $pun_db->error()); - $group_id = $pun_db->result($result); - - if ($group_id < PUN_GUEST) - { - $result = $pun_db->query('SELECT id, moderators FROM '.$pun_db->prefix.'forums') or error('Unable to fetch forum list', __FILE__, __LINE__, $pun_db->error()); - - while ($cur_forum = $pun_db->fetch_assoc($result)) - { - $cur_moderators = ($cur_forum['moderators'] != '') ? unserialize($cur_forum['moderators']) : array(); - - if (in_array($id, $cur_moderators)) - { - unset($cur_moderators[$old_username]); - $cur_moderators[$form['username']] = $id; - ksort($cur_moderators); - - $pun_db->query('UPDATE '.$pun_db->prefix.'forums SET moderators=\''.$pun_db->escape(serialize($cur_moderators)).'\' WHERE id='.$cur_forum['id']) or error('Unable to update forum', __FILE__, __LINE__, $pun_db->error()); - } - } - } - } - - pun_redirect('profile.php?section='.$section.'&id='.$id, $lang_profile['Profile redirect']); -} - - -$result = $pun_db->query('SELECT eu.username, eu.email, u.title, eu.real_name AS realname, u.url, u.jabber, u.icq, u.msn, u.aim, u.yahoo, u.location, u.use_avatar, u.signature, u.disp_topics, u.disp_posts, u.email_setting, u.save_pass, u.notify_with_post, u.show_smilies, u.show_img, u.show_img_sig, u.show_avatars, u.show_sig, u.timezone, u.language, u.style, u.num_posts, u.last_post, u.registered, u.registration_ip, u.admin_note, g.g_id, g.g_user_title FROM '.$pun_db->prefix.'users AS u LEFT JOIN '.table_prefix.'users AS eu ON eu.user_id=u.id LEFT JOIN '.$pun_db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $pun_db->error()); -if (!$pun_db->num_rows($result)) - message($lang_common['Bad request']); - -$user = $pun_db->fetch_assoc($result); - -$last_post = format_time($user['last_post']); - -if ($user['signature'] != '') -{ - require PUN_ROOT.'include/parser.php'; - $parsed_signature = parse_signature($user['signature']); -} - - -// View or edit? -if ($pun_user['id'] != $id && - ($pun_user['g_id'] > USER_LEVEL_MOD || - ($pun_user['g_id'] == USER_LEVEL_MOD && $pun_config['p_mod_edit_users'] == '0') || - ($pun_user['g_id'] == USER_LEVEL_MOD && $user['g_id'] < PUN_GUEST))) -{ - if ($user['email_setting'] == '0' && !$pun_user['is_guest']) - $email_field = ''.$user['email'].''; - else if ($user['email_setting'] == '1' && !$pun_user['is_guest']) - $email_field = ''.$lang_common['Send e-mail'].''; - else - $email_field = $lang_profile['Private']; - - $user_title_field = get_title($user); - - if ($user['url'] != '') - { - $user['url'] = pun_htmlspecialchars($user['url']); - - if ($pun_config['o_censoring'] == '1') - $user['url'] = censor_words($user['url']); - - $url = ''.$user['url'].''; - } - else - $url = $lang_profile['Unknown']; - - if ($pun_config['o_avatars'] == '1') - { - if ($user['use_avatar'] == '1') - { - if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$id.'.gif')) - $avatar_field = ''; - else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$id.'.jpg')) - $avatar_field = ''; - else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$id.'.png')) - $avatar_field = ''; - else - $avatar_field = $lang_profile['No avatar']; - } - else - $avatar_field = $lang_profile['No avatar']; - } - - $posts_field = ''; - if ($pun_config['o_show_post_count'] == '1' || $pun_user['g_id'] >= USER_LEVEL_MEMBER) - $posts_field = $user['num_posts']; - if ($pun_user['g_search'] == '1') - $posts_field .= (($posts_field != '') ? ' - ' : '').''.$lang_profile['Show posts'].''; - - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Profile']; - define('PUN_ALLOW_INDEX', 1); - require PUN_ROOT.'header.php'; - -?> -
    -

    -
    -
    -
    -
    - -
    -
    -
    :
    -
    -
    :
    -
    -
    :
    -
    -
    :
    -
    -
    :
    -
     
    -
    :
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    :
    -
    -
    :
    -
    -
    :
    -
    -
    :
    -
    -
    :
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    :
    -
    -
    :
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    :
    -
    -
    :
    -
    -
    :
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -= USER_LEVEL_MEMBER) - { - if ( false ) // NO RENAMING IN ENANO // ($pun_user['g_id'] == USER_LEVEL_ADMIN || $pun_config['p_mod_rename_users'] == '1') - $username_field = ''."\n"; - else - $username_field = '

    '.$lang_common['Username'].': '.pun_htmlspecialchars($user['username']).'

    '."\n"; - - $email_field = '

    '.$lang_common['Send e-mail'].'

    '."\n"; - } - else - { - $username_field = '

    '.$lang_common['Username'].': '.pun_htmlspecialchars($user['username']).'

    '."\n"; - - if ($pun_config['o_regs_verify'] == '1') - $email_field = '

    '.$lang_common['E-mail'].': '.$user['email'].' - '.$lang_profile['Change e-mail'].'

    '."\n"; - else - $email_field = ''."\n"; - } - - if ($pun_user['g_id'] == USER_LEVEL_ADMIN) - { - $posts_field = '

    '.$lang_profile['Show posts'].'

    '."\n"; - } - else if ($pun_config['o_show_post_count'] == '1' || $pun_user['g_id'] >= USER_LEVEL_MEMBER) - { - $posts_field = '

    '.$lang_common['Posts'].': '.$user['num_posts'].' - '.$lang_profile['Show posts'].'

    '."\n"; - } - else - { - $posts_field = '

    '.$lang_profile['Show posts'].'

    '."\n"; - } - - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Profile']; - $GLOBALS['required_fields'] = array('req_username' => $lang_common['Username']); - require PUN_ROOT.'header.php'; - - generate_profile_menu('essentials'); - -?> -
    -

    -
    -
    -
    -
    - -
    - - - PUN_MOD && $pun_config['p_mod_change_passwords'] == '1')): ?>

    -
    -
    -
    -
    -
    - -
    - -read()) !== false) - { - if ($entry != '.' && $entry != '..' && is_dir(PUN_ROOT.'lang/'.$entry) && file_exists(PUN_ROOT.'lang/'.$entry.'/common.php')) - $languages[] = $entry; - } - $d->close(); - - // Only display the language selection box if there's more than one language available - if (count($languages) > 1) - { - natsort($languages); - -?> - - -
    -
    -
    -
    -
    - -
    -

    : = USER_LEVEL_MEMBER) echo ' ('.pun_htmlspecialchars($user['registration_ip']).')'; ?>

    -

    :

    - -= USER_LEVEL_MEMBER): ?> -
    -
    -
    -

    -
    -
    -
    -'.$lang_common['Title'].'  ('.$lang_profile['Leave blank'].')

    '."\n"; - - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Profile']; - require PUN_ROOT.'header.php'; - - generate_profile_menu('personal'); - -?> -
    -

    -
    -
    -
    -
    - -
    - - - - - -
    -
    -
    -

    -
    -
    -
    - -
    -

    -
    -
    -
    -
    - -
    - - - - - - -
    -
    -
    -

    -
    -
    -
    -'.$lang_profile['Change avatar'].''; - if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$id.'.gif')) - $avatar_format = 'gif'; - else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$id.'.jpg')) - $avatar_format = 'jpg'; - else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$id.'.png')) - $avatar_format = 'png'; - else - $avatar_field = ''.$lang_profile['Upload avatar'].''; - - // Display the delete avatar link? - if ($img_size) - $avatar_field .= '   '.$lang_profile['Delete avatar'].''; - - if ($user['signature'] != '') - $signature_preview = '

    '.$lang_profile['Sig preview'].'

    '."\n\t\t\t\t\t".'
    '."\n\t\t\t\t\t\t".'
    '."\n\t\t\t\t\t\t".$parsed_signature."\n\t\t\t\t\t".'
    '."\n"; - else - $signature_preview = '

    '.$lang_profile['No sig'].'

    '."\n"; - - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Profile']; - require PUN_ROOT.'header.php'; - - generate_profile_menu('personality'); - - -?> -
    -

    -
    -
    -
    -
    -
    - -
    - alt="" /> -

    -
    - -
    -

    -
    -
    -
    -
    -
    - -
    -

    -
    - -
    - - -
    -
    -
    -

    -
    -
    -
    - -
    -

    -
    -
    -
    -read()) !== false) - { - if (substr($entry, strlen($entry)-4) == '.css') - $styles[] = substr($entry, 0, strlen($entry)-4); - } - $d->close(); - - // Only display the style selection box if there's more than one style available - if (count($styles) == 1) - echo "\t\t\t".'
    '."\n"; - else if (count($styles) > 1) - { - natsort($styles); - -?> -
    -
    - -
    - -
    -
    -
    - -
    -
    - -
    -

    -
    - - - - - -
    -
    -
    -
    -
    -
    - -
    - - -

    -
    -
    -
    -

    -
    -
    -
    - -
    -

    -
    -
    -
    -
    - -
    - -

    -
    - - - -
    -

    -
    - -
    -

    -
    - -
    -
    -
    -
    -

    -
    -
    -
    - -
    -

    -
    -
    -
    - -
    - - -
    -

    -
    -
    -
    - - -
    - - -
    - -
    -
    -
    - - -
    -    -
    -
    -
    - -
    -
    - -
    -

    -query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.moderators FROM '.$pun_db->prefix.'categories AS c INNER JOIN '.$pun_db->prefix.'forums AS f ON c.id=f.cat_id WHERE f.redirect_url IS NULL ORDER BY c.disp_position, c.id, f.disp_position') or error('Unable to fetch category/forum list', __FILE__, __LINE__, $pun_db->error()); - - $cur_category = 0; - while ($cur_forum = $pun_db->fetch_assoc($result)) - { - if ($cur_forum['cid'] != $cur_category) // A new category since last iteration? - { - if ($cur_category) - echo "\n\t\t\t\t\t\t\t\t".'
    '; - - if ($cur_category != 0) - echo "\n\t\t\t\t\t\t\t".'
    '."\n"; - - echo "\t\t\t\t\t\t\t".'
    '."\n\t\t\t\t\t\t\t\t".'

    '.$cur_forum['cat_name'].'

    '."\n\t\t\t\t\t\t\t\t".'
    '; - $cur_category = $cur_forum['cid']; - } - - $moderators = ($cur_forum['moderators'] != '') ? unserialize($cur_forum['moderators']) : array(); - - echo "\n\t\t\t\t\t\t\t\t\t".''."\n"; - } - -?> -
    -
    -
    -
    - - - - - - - -
    - - -
    -

    -
    -
    -
    -
    - -
    -

    -
    -
    -
    -

    -
    -
    -
    -query('SELECT 1 FROM '.$pun_db->prefix.'users WHERE registration_ip=\''.get_remote_address().'\' AND registered>'.(time() - 3600)) or error('Unable to fetch user info', __FILE__, __LINE__, $pun_db->error()); - - if ($pun_db->num_rows($result)) - message('A new user was registered with the same IP address as you within the last hour. To prevent registration flooding, at least an hour has to pass between registrations from the same IP. Sorry for the inconvenience.'); - - - $username = pun_trim($_POST['req_username']); - $email1 = strtolower(trim($_POST['req_email1'])); - - if ($pun_config['o_regs_verify'] == '1') - { - $email2 = strtolower(trim($_POST['req_email2'])); - - $password1 = random_pass(8); - $password2 = $password1; - } - else - { - $password1 = trim($_POST['req_password1']); - $password2 = trim($_POST['req_password2']); - } - - // Convert multiple whitespace characters into one (to prevent people from registering with indistinguishable usernames) - $username = preg_replace('#\s+#s', ' ', $username); - - // Validate username and passwords - if (strlen($username) < 2) - message($lang_prof_reg['Username too short']); - else if (pun_strlen($username) > 25) // This usually doesn't happen since the form element only accepts 25 characters - message($lang_common['Bad request']); - else if (strlen($password1) < 4) - message($lang_prof_reg['Pass too short']); - else if ($password1 != $password2) - message($lang_prof_reg['Pass not match']); - else if (!strcasecmp($username, 'Guest') || !strcasecmp($username, $lang_common['Guest'])) - message($lang_prof_reg['Username guest']); - else if (preg_match('/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/', $username)) - message($lang_prof_reg['Username IP']); - else if ((strpos($username, '[') !== false || strpos($username, ']') !== false) && strpos($username, '\'') !== false && strpos($username, '"') !== false) - message($lang_prof_reg['Username reserved chars']); - else if (preg_match('#\[b\]|\[/b\]|\[u\]|\[/u\]|\[i\]|\[/i\]|\[color|\[/color\]|\[quote\]|\[quote=|\[/quote\]|\[code\]|\[/code\]|\[img\]|\[/img\]|\[url|\[/url\]|\[email|\[/email\]#i', $username)) - message($lang_prof_reg['Username BBCode']); - - // Check username for any censored words - if ($pun_config['o_censoring'] == '1') - { - // If the censored username differs from the username - if (censor_words($username) != $username) - message($lang_register['Username censor']); - } - - // Check that the username (or a too similar username) is not already registered - $result = $pun_db->query('SELECT username FROM '.$pun_db->prefix.'users WHERE UPPER(username)=UPPER(\''.$pun_db->escape($username).'\') OR UPPER(username)=UPPER(\''.$pun_db->escape(preg_replace('/[^\w]/', '', $username)).'\')') or error('Unable to fetch user info', __FILE__, __LINE__, $pun_db->error()); - - if ($pun_db->num_rows($result)) - { - $busy = $pun_db->result($result); - message($lang_register['Username dupe 1'].' '.pun_htmlspecialchars($busy).'. '.$lang_register['Username dupe 2']); - } - - - // Validate e-mail - require PUN_ROOT.'include/email.php'; - - if (!is_valid_email($email1)) - message($lang_common['Invalid e-mail']); - else if ($pun_config['o_regs_verify'] == '1' && $email1 != $email2) - message($lang_register['E-mail not match']); - - // Check it it's a banned e-mail address - if (is_banned_email($email1)) - { - if ($pun_config['p_allow_banned_email'] == '0') - message($lang_prof_reg['Banned e-mail']); - - $banned_email = true; // Used later when we send an alert e-mail - } - else - $banned_email = false; - - // Check if someone else already has registered with that e-mail address - $dupe_list = array(); - - $result = $pun_db->query('SELECT username FROM '.$pun_db->prefix.'users WHERE email=\''.$email1.'\'') or error('Unable to fetch user info', __FILE__, __LINE__, $pun_db->error()); - if ($pun_db->num_rows($result)) - { - if ($pun_config['p_allow_dupe_email'] == '0') - message($lang_prof_reg['Dupe e-mail']); - - while ($cur_dupe = $pun_db->fetch_assoc($result)) - $dupe_list[] = $cur_dupe['username']; - } - - // Make sure we got a valid language string - if (isset($_POST['language'])) - { - $language = preg_replace('#[\.\\\/]#', '', $_POST['language']); - if (!file_exists(PUN_ROOT.'lang/'.$language.'/common.php')) - message($lang_common['Bad request']); - } - else - $language = $pun_config['o_default_lang']; - - $timezone = round($_POST['timezone'], 1); - $save_pass = (!isset($_POST['save_pass']) || $_POST['save_pass'] != '1') ? '0' : '1'; - - $email_setting = intval($_POST['email_setting']); - if ($email_setting < 0 || $email_setting > 2) $email_setting = 1; - - // Insert the new user into the database. We do this now to get the last inserted id for later use. - $now = time(); - - $intial_group_id = ($pun_config['o_regs_verify'] == '0') ? $pun_config['o_default_user_group'] : PUN_UNVERIFIED; - $password_hash = pun_hash($password1); - - // Add the user - $pun_db->query('INSERT INTO '.$pun_db->prefix.'users (username, group_id, password, email, email_setting, save_pass, timezone, language, style, registered, registration_ip, last_visit) VALUES(\''.$pun_db->escape($username).'\', '.$intial_group_id.', \''.$password_hash.'\', \''.$email1.'\', '.$email_setting.', '.$save_pass.', '.$timezone.' , \''.$pun_db->escape($language).'\', \''.$pun_config['o_default_style'].'\', '.$now.', \''.get_remote_address().'\', '.$now.')') or error('Unable to create user', __FILE__, __LINE__, $pun_db->error()); - $new_uid = $pun_db->insert_id(); - - - // If we previously found out that the e-mail was banned - if ($banned_email && $pun_config['o_mailing_list'] != '') - { - $mail_subject = 'Alert - Banned e-mail detected'; - $mail_message = 'User \''.$username.'\' registered with banned e-mail address: '.$email1."\n\n".'User profile: '.$pun_config['o_base_url'].'/profile.php?id='.$new_uid."\n\n".'-- '."\n".'Forum Mailer'."\n".'(Do not reply to this message)'; - - pun_mail($pun_config['o_mailing_list'], $mail_subject, $mail_message); - } - - // If we previously found out that the e-mail was a dupe - if (!empty($dupe_list) && $pun_config['o_mailing_list'] != '') - { - $mail_subject = 'Alert - Duplicate e-mail detected'; - $mail_message = 'User \''.$username.'\' registered with an e-mail address that also belongs to: '.implode(', ', $dupe_list)."\n\n".'User profile: '.$pun_config['o_base_url'].'/profile.php?id='.$new_uid."\n\n".'-- '."\n".'Forum Mailer'."\n".'(Do not reply to this message)'; - - pun_mail($pun_config['o_mailing_list'], $mail_subject, $mail_message); - } - - // Should we alert people on the admin mailing list that a new user has registered? - if ($pun_config['o_regs_report'] == '1') - { - $mail_subject = 'Alert - New registration'; - $mail_message = 'User \''.$username.'\' registered in the forums at '.$pun_config['o_base_url']."\n\n".'User profile: '.$pun_config['o_base_url'].'/profile.php?id='.$new_uid."\n\n".'-- '."\n".'Forum Mailer'."\n".'(Do not reply to this message)'; - - pun_mail($pun_config['o_mailing_list'], $mail_subject, $mail_message); - } - - // Must the user verify the registration or do we log him/her in right now? - if ($pun_config['o_regs_verify'] == '1') - { - // Load the "welcome" template - $mail_tpl = trim(file_get_contents(PUN_ROOT.'lang/'.$pun_user['language'].'/mail_templates/welcome.tpl')); - - // The first row contains the subject - $first_crlf = strpos($mail_tpl, "\n"); - $mail_subject = trim(substr($mail_tpl, 8, $first_crlf-8)); - $mail_message = trim(substr($mail_tpl, $first_crlf)); - - $mail_subject = str_replace('', $pun_config['o_board_title'], $mail_subject); - $mail_message = str_replace('', $pun_config['o_base_url'].'/', $mail_message); - $mail_message = str_replace('', $username, $mail_message); - $mail_message = str_replace('', $password1, $mail_message); - $mail_message = str_replace('', $pun_config['o_base_url'].'/login.php', $mail_message); - $mail_message = str_replace('', $pun_config['o_board_title'].' '.$lang_common['Mailer'], $mail_message); - - pun_mail($email1, $mail_subject, $mail_message); - - message($lang_register['Reg e-mail'].' '.$pun_config['o_admin_email'].'.', true); - } - - pun_setcookie($new_uid, $password_hash, ($save_pass != '0') ? $now + 31536000 : 0); - - pun_redirect('index.php', $lang_register['Reg complete']); -} - - -$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_register['Register']; -$required_fields = array('req_username' => $lang_common['Username'], 'req_password1' => $lang_common['Password'], 'req_password2' => $lang_prof_reg['Confirm pass'], 'req_email1' => $lang_common['E-mail'], 'req_email2' => $lang_common['E-mail'].' 2'); -$focus_element = array('register', 'req_username'); -require PUN_ROOT.'header.php'; - -?> -
    -

    -
    -
    -
    -
    -

    -

    -

    -
    -
    - -
    - - -
    -
    -
    -
    -
    - -
    - - -

    -
    -
    -
    -
    -
    - -
    -

    - - -
    -
    -
    -
    -
    - -
    - -read()) !== false) - { - if ($entry != '.' && $entry != '..' && is_dir(PUN_ROOT.'lang/'.$entry) && file_exists(PUN_ROOT.'lang/'.$entry.'/common.php')) - $languages[] = $entry; - } - $d->close(); - - // Only display the language selection box if there's more than one language available - if (count($languages) > 1) - { - -?> - - -
    -
    -
    -
    -
    - -
    -

    -
    - - - -
    -

    -
    - -
    -
    -
    -
    -

    -
    -
    -
    - $_ ) +{ + $$key =& $GLOBALS[$key]; +} + +// Allow extensions to create their own rewrite rules/modify existing rules +($hook = get_hook('re_rewrite_rules')) ? eval($hook) : null; + +// We determine the path to the script, since we need to separate the path from the data to be rewritten +$path_to_script = contentPath . $paths->nslist['Special'] . 'Forum'; +if (substr($path_to_script, -1) != '/') + $path_to_script = $path_to_script.'/'; + +// We create our own request URI with the path removed and only the parts to rewrite included +// $request_uri = substr($_SERVER['REQUEST_URI'], strlen($path_to_script)); +// if (strpos($request_uri, '?') !== false) +// $request_uri = substr($request_uri, 0, strpos($request_uri, '?')); +$request_uri = $paths->getAllParams(); + +$rewritten_url = ''; +$url_parts = array(); + +$pun_rewrite_rules['/^$/'] = 'index.php'; + +// die('
    ' . htmlspecialchars(print_r($pun_rewrite_rules, true)) . '
    '); + +// We go through every rewrite rule +foreach ($pun_rewrite_rules as $rule => $rewrite_to) +{ + // We have a match! + if (preg_match($rule, $request_uri)) + { + $rewritten_url = preg_replace($rule, $rewrite_to, $request_uri); + $url_parts = explode('?', $rewritten_url); + + // If there is a query string + if (isset($url_parts[1])) + { + $query_string = explode('&', $url_parts[1]); + + // Set $_GET properly for all of the variables + // We also set $_REQUEST if it's not already set + foreach ($query_string as $cur_param) + { + $param_data = explode('=', $cur_param); + + if (!isset($_REQUEST[$param_data[0]])) + $_REQUEST[$param_data[0]] = urldecode($param_data[1]); + + $_GET[$param_data[0]] = urldecode($param_data[1]); + } + } + break; + } +} + +// If we don't know what to rewrite to, we show a bad request messsage +if (empty($rewritten_url)) +{ + header('HTTP/1.x 404 Not Found'); + + // Allow an extension to override the "Bad request" message with a custom 404 page + ($hook = get_hook('re_page_not_found')) ? eval($hook) : null; + + exit('Bad request'); +} + +// We change $_SERVER['PHP_SELF'] so that it reflects the file we're actually loading +$_SERVER['PHP_SELF'] = str_replace('rewrite.php', $url_parts[0], $_SERVER['PHP_SELF']); + +require PUN_ROOT.$url_parts[0]; diff -r e3d7322305bf -r 5e1f1e916419 punbb/schema-work.sql --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/schema-work.sql Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,549 @@ + case 'mysql': + case 'mysqli': + CREATE TABLE {{TABLE_PREFIX}}bans ( + id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + username VARCHAR(200), + ip VARCHAR(255), + email VARCHAR(80), + message VARCHAR(255), + expire INT(10) UNSIGNED, + ban_creator INT(10) UNSIGNED NOT NULL DEFAULT 0, + PRIMARY KEY (id) + ) ENGINE = MyISAM CHARACTER SET utf8 + + case 'pgsql': + CREATE TABLE {{TABLE_PREFIX}}bans ( + id SERIAL, + username VARCHAR(200), + ip VARCHAR(255), + email VARCHAR(80), + message VARCHAR(255), + expire INT, + ban_creator INT NOT NULL DEFAULT 0, + PRIMARY KEY (id) + ) + + case 'mysql': + case 'mysqli': + CREATE TABLE {{TABLE_PREFIX}}categories ( + id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + cat_name VARCHAR(80) NOT NULL DEFAULT 'New Category', + disp_position INT(10) NOT NULL DEFAULT 0, + PRIMARY KEY (id) + ) ENGINE = MyISAM CHARACTER SET utf8 + + case 'pgsql': + CREATE TABLE {{TABLE_PREFIX}}categories ( + id SERIAL, + cat_name VARCHAR(80) NOT NULL DEFAULT 'New Category', + disp_position INT NOT NULL DEFAULT 0, + PRIMARY KEY (id) + ) + + case 'mysql': + case 'mysqli': + CREATE TABLE {{TABLE_PREFIX}}censoring ( + id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + search_for VARCHAR(60) NOT NULL DEFAULT '', + replace_with VARCHAR(60) NOT NULL DEFAULT '', + PRIMARY KEY (id) + ) ENGINE = MyISAM CHARACTER SET utf8 + + case 'pgsql': + CREATE TABLE {{TABLE_PREFIX}}censoring ( + id SERIAL, + search_for VARCHAR(60) NOT NULL DEFAULT '', + replace_with VARCHAR(60) NOT NULL DEFAULT '', + PRIMARY KEY (id) + ) + + case 'mysql': + case 'mysqli': + CREATE TABLE {{TABLE_PREFIX}}config ( + conf_name VARCHAR(255) NOT NULL DEFAULT '', + conf_value TEXT, + PRIMARY KEY (conf_name) + ) ENGINE = MyISAM CHARACTER SET utf8 + + case 'pgsql': + CREATE TABLE {{TABLE_PREFIX}}config ( + conf_name VARCHAR(255) NOT NULL DEFAULT '', + conf_value TEXT, + PRIMARY KEY (conf_name) + ) + + case 'sqlite': + CREATE TABLE {{TABLE_PREFIX}}config ( + conf_name VARCHAR(255) NOT NULL DEFAULT '', + conf_value TEXT, + PRIMARY KEY (conf_name) + ) + + case 'mysql': + case 'mysqli': + CREATE TABLE {{TABLE_PREFIX}}extensions ( + id VARCHAR(50) NOT NULL DEFAULT '', + title VARCHAR(255) NOT NULL DEFAULT '', + version VARCHAR(25) NOT NULL DEFAULT '', + description TEXT, + author VARCHAR(50) NOT NULL DEFAULT '', + uninstall TEXT, + uninstall_note TEXT, + disabled TINYINT(1) NOT NULL DEFAULT 0, + PRIMARY KEY(id) + ) ENGINE = MyISAM CHARACTER SET utf8 + + case 'pgsql': + CREATE TABLE {{TABLE_PREFIX}}extensions ( + id VARCHAR(50) NOT NULL DEFAULT '', + title VARCHAR(255) NOT NULL DEFAULT '', + version VARCHAR(25) NOT NULL DEFAULT '', + description TEXT, + author VARCHAR(50) NOT NULL DEFAULT '', + uninstall TEXT, + uninstall_note TEXT, + disabled SMALLINT NOT NULL DEFAULT 0, + PRIMARY KEY(id) + ) + + case 'mysql': + case 'mysqli': + CREATE TABLE {{TABLE_PREFIX}}extension_hooks ( + id VARCHAR(50) NOT NULL DEFAULT '', + extension_id VARCHAR(50) NOT NULL DEFAULT '', + code TEXT, + installed INT(10) UNSIGNED NOT NULL DEFAULT 0, + PRIMARY KEY(id, extension_id) + ) ENGINE = MyISAM CHARACTER SET utf8 + + case 'pgsql': + CREATE TABLE {{TABLE_PREFIX}}extension_hooks ( + id VARCHAR(50) NOT NULL DEFAULT '', + extension_id VARCHAR(50) NOT NULL DEFAULT '', + code TEXT, + installed INT NOT NULL DEFAULT 0, + PRIMARY KEY(id, extension_id) + ) + + case 'mysql': + case 'mysqli': + CREATE TABLE {{TABLE_PREFIX}}forum_perms ( + group_id INT(10) NOT NULL DEFAULT 0, + forum_id INT(10) NOT NULL DEFAULT 0, + read_forum TINYINT(1) NOT NULL DEFAULT 1, + post_replies TINYINT(1) NOT NULL DEFAULT 1, + post_topics TINYINT(1) NOT NULL DEFAULT 1, + PRIMARY KEY (group_id, forum_id) + ) ENGINE = MyISAM CHARACTER SET utf8 + + case 'pgsql': + CREATE TABLE {{TABLE_PREFIX}}forum_perms ( + group_id INT NOT NULL DEFAULT 0, + forum_id INT NOT NULL DEFAULT 0, + read_forum SMALLINT NOT NULL DEFAULT 1, + post_replies SMALLINT NOT NULL DEFAULT 1, + post_topics SMALLINT NOT NULL DEFAULT 1, + PRIMARY KEY (group_id, forum_id) + ) + + case 'mysql': + case 'mysqli': + CREATE TABLE {{TABLE_PREFIX}}forums ( + id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + forum_name VARCHAR(80) NOT NULL DEFAULT 'New forum', + forum_desc TEXT, + redirect_url VARCHAR(100), + moderators TEXT, + num_topics MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, + num_posts MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, + last_post INT(10) UNSIGNED, + last_post_id INT(10) UNSIGNED, + last_poster VARCHAR(200), + sort_by TINYINT(1) NOT NULL DEFAULT 0, + disp_position INT(10) NOT NULL DEFAULT 0, + cat_id INT(10) UNSIGNED NOT NULL DEFAULT 0, + PRIMARY KEY (id) + ) ENGINE = MyISAM CHARACTER SET utf8 + + case 'pgsql': + CREATE TABLE {{TABLE_PREFIX}}forums ( + id SERIAL, + forum_name VARCHAR(80) NOT NULL DEFAULT 'New forum', + forum_desc TEXT, + redirect_url VARCHAR(100), + moderators TEXT, + num_topics INT NOT NULL DEFAULT 0, + num_posts INT NOT NULL DEFAULT 0, + last_post INT, + last_post_id INT, + last_poster VARCHAR(200), + sort_by SMALLINT NOT NULL DEFAULT 0, + disp_position INT NOT NULL DEFAULT 0, + cat_id INT NOT NULL DEFAULT 0, + PRIMARY KEY (id) + ) + + case 'mysql': + case 'mysqli': + CREATE TABLE {{TABLE_PREFIX}}groups ( + g_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + g_title VARCHAR(50) NOT NULL DEFAULT '', + g_user_title VARCHAR(50), + g_moderator TINYINT(1) NOT NULL DEFAULT 0, + g_mod_edit_users TINYINT(1) NOT NULL DEFAULT 0, + g_mod_rename_users TINYINT(1) NOT NULL DEFAULT 0, + g_mod_change_passwords TINYINT(1) NOT NULL DEFAULT 0, + g_mod_ban_users TINYINT(1) NOT NULL DEFAULT 0, + g_read_board TINYINT(1) NOT NULL DEFAULT 1, + g_view_users TINYINT(1) NOT NULL DEFAULT 1, + g_post_replies TINYINT(1) NOT NULL DEFAULT 1, + g_post_topics TINYINT(1) NOT NULL DEFAULT 1, + g_edit_posts TINYINT(1) NOT NULL DEFAULT 1, + g_delete_posts TINYINT(1) NOT NULL DEFAULT 1, + g_delete_topics TINYINT(1) NOT NULL DEFAULT 1, + g_set_title TINYINT(1) NOT NULL DEFAULT 1, + g_search TINYINT(1) NOT NULL DEFAULT 1, + g_search_users TINYINT(1) NOT NULL DEFAULT 1, + g_edit_subjects_interval SMALLINT(6) NOT NULL DEFAULT 300, + g_post_flood SMALLINT(6) NOT NULL DEFAULT 30, + g_search_flood SMALLINT(6) NOT NULL DEFAULT 30, + PRIMARY KEY (g_id) + ) ENGINE = MyISAM CHARACTER SET utf8 + + case 'pgsql': + CREATE TABLE {{TABLE_PREFIX}}groups ( + g_id SERIAL, + g_title VARCHAR(50) NOT NULL DEFAULT '', + g_user_title VARCHAR(50), + g_moderator SMALLINT NOT NULL DEFAULT 0, + g_mod_edit_users SMALLINT NOT NULL DEFAULT 0, + g_mod_rename_users SMALLINT NOT NULL DEFAULT 0, + g_mod_change_passwords SMALLINT NOT NULL DEFAULT 0, + g_mod_ban_users SMALLINT NOT NULL DEFAULT 0, + g_read_board SMALLINT NOT NULL DEFAULT 1, + g_view_users SMALLINT NOT NULL DEFAULT 1, + g_post_replies SMALLINT NOT NULL DEFAULT 1, + g_post_topics SMALLINT NOT NULL DEFAULT 1, + g_edit_posts SMALLINT NOT NULL DEFAULT 1, + g_delete_posts SMALLINT NOT NULL DEFAULT 1, + g_delete_topics SMALLINT NOT NULL DEFAULT 1, + g_set_title SMALLINT NOT NULL DEFAULT 1, + g_search SMALLINT NOT NULL DEFAULT 1, + g_search_users SMALLINT NOT NULL DEFAULT 1, + g_edit_subjects_interval SMALLINT NOT NULL DEFAULT 300, + g_post_flood SMALLINT NOT NULL DEFAULT 30, + g_search_flood SMALLINT NOT NULL DEFAULT 30, + PRIMARY KEY (g_id) + ) + + case 'mysql': + case 'mysqli': + CREATE TABLE {{TABLE_PREFIX}}online ( + user_id INT(10) UNSIGNED NOT NULL DEFAULT 1, + ident VARCHAR(200) NOT NULL DEFAULT '', + logged INT(10) UNSIGNED NOT NULL DEFAULT 0, + idle TINYINT(1) NOT NULL DEFAULT 0, + csrf_token VARCHAR(40) NOT NULL DEFAULT '', + prev_url VARCHAR(255) + ) TYPE=HEAP; + + case 'pgsql': + CREATE TABLE {{TABLE_PREFIX}}online ( + user_id INT NOT NULL DEFAULT 1, + ident VARCHAR(200) NOT NULL DEFAULT '', + logged INT NOT NULL DEFAULT 0, + idle SMALLINT NOT NULL DEFAULT 0, + csrf_token VARCHAR(40) NOT NULL DEFAULT '', + prev_url VARCHAR(255) + ) + + case 'mysql': + case 'mysqli': + CREATE TABLE {{TABLE_PREFIX}}posts ( + id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + poster VARCHAR(200) NOT NULL DEFAULT '', + poster_id INT(10) UNSIGNED NOT NULL DEFAULT 1, + poster_ip VARCHAR(15), + poster_email VARCHAR(80), + message TEXT, + hide_smilies TINYINT(1) NOT NULL DEFAULT 0, + posted INT(10) UNSIGNED NOT NULL DEFAULT 0, + edited INT(10) UNSIGNED, + edited_by VARCHAR(200), + topic_id INT(10) UNSIGNED NOT NULL DEFAULT 0, + PRIMARY KEY (id) + ) ENGINE = MyISAM CHARACTER SET utf8 + + case 'pgsql': + CREATE TABLE {{TABLE_PREFIX}}posts ( + id SERIAL, + poster VARCHAR(200) NOT NULL DEFAULT '', + poster_id INT NOT NULL DEFAULT 1, + poster_ip VARCHAR(15), + poster_email VARCHAR(80), + message TEXT, + hide_smilies SMALLINT NOT NULL DEFAULT 0, + posted INT NOT NULL DEFAULT 0, + edited INT, + edited_by VARCHAR(200), + topic_id INT NOT NULL DEFAULT 0, + PRIMARY KEY (id) + ) + + case 'mysql': + case 'mysqli': + CREATE TABLE {{TABLE_PREFIX}}ranks ( + id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + rank VARCHAR(50) NOT NULL DEFAULT '', + min_posts MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, + PRIMARY KEY (id) + ) ENGINE = MyISAM CHARACTER SET utf8 + + case 'pgsql': + CREATE TABLE {{TABLE_PREFIX}}ranks ( + id SERIAL, + rank VARCHAR(50) NOT NULL DEFAULT '', + min_posts INT NOT NULL DEFAULT 0, + PRIMARY KEY (id) + ) + + case 'sqlite': + CREATE TABLE {{TABLE_PREFIX}}ranks ( + id INTEGER NOT NULL, + rank VARCHAR(50) NOT NULL DEFAULT '', + min_posts INTEGER NOT NULL DEFAULT 0, + PRIMARY KEY (id) + ) + + case 'mysql': + case 'mysqli': + CREATE TABLE {{TABLE_PREFIX}}reports ( + id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + post_id INT(10) UNSIGNED NOT NULL DEFAULT 0, + topic_id INT(10) UNSIGNED NOT NULL DEFAULT 0, + forum_id INT(10) UNSIGNED NOT NULL DEFAULT 0, + reported_by INT(10) UNSIGNED NOT NULL DEFAULT 0, + created INT(10) UNSIGNED NOT NULL DEFAULT 0, + message TEXT, + zapped INT(10) UNSIGNED, + zapped_by INT(10) UNSIGNED, + PRIMARY KEY (id) + ) ENGINE = MyISAM CHARACTER SET utf8 + + case 'pgsql': + CREATE TABLE {{TABLE_PREFIX}}reports ( + id SERIAL, + post_id INT NOT NULL DEFAULT 0, + topic_id INT NOT NULL DEFAULT 0, + forum_id INT NOT NULL DEFAULT 0, + reported_by INT NOT NULL DEFAULT 0, + created INT NOT NULL DEFAULT 0, + message TEXT, + zapped INT, + zapped_by INT, + PRIMARY KEY (id) + ) + + case 'pgsql': + CREATE TABLE {{TABLE_PREFIX}}search_cache ( + id INT NOT NULL DEFAULT 0, + ident VARCHAR(200) NOT NULL DEFAULT '', + search_data TEXT, + PRIMARY KEY (id) + ) + + case 'pgsql': + CREATE TABLE {{TABLE_PREFIX}}search_matches ( + post_id INT NOT NULL DEFAULT 0, + word_id INT NOT NULL DEFAULT 0, + subject_match SMALLINT NOT NULL DEFAULT 0 + ) + + case 'pgsql': + CREATE TABLE {{TABLE_PREFIX}}search_words ( + id SERIAL, + word VARCHAR(20) NOT NULL DEFAULT '', + PRIMARY KEY (word) + ) + + case 'mysql': + case 'mysqli': + CREATE TABLE {{TABLE_PREFIX}}subscriptions ( + user_id INT(10) UNSIGNED NOT NULL DEFAULT 0, + topic_id INT(10) UNSIGNED NOT NULL DEFAULT 0, + PRIMARY KEY (user_id, topic_id) + ) ENGINE = MyISAM CHARACTER SET utf8 + + case 'pgsql': + CREATE TABLE {{TABLE_PREFIX}}subscriptions ( + user_id INT NOT NULL DEFAULT 0, + topic_id INT NOT NULL DEFAULT 0, + PRIMARY KEY (user_id, topic_id) + ) + + case 'mysql': + case 'mysqli': + CREATE TABLE {{TABLE_PREFIX}}topics ( + id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + poster VARCHAR(200) NOT NULL DEFAULT '', + subject VARCHAR(255) NOT NULL DEFAULT '', + posted INT(10) UNSIGNED NOT NULL DEFAULT 0, + first_post_id INT(10) UNSIGNED NOT NULL DEFAULT 0, + last_post INT(10) UNSIGNED NOT NULL DEFAULT 0, + last_post_id INT(10) UNSIGNED NOT NULL DEFAULT 0, + last_poster VARCHAR(200), + num_views MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, + num_replies MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, + closed TINYINT(1) NOT NULL DEFAULT 0, + sticky TINYINT(1) NOT NULL DEFAULT 0, + moved_to INT(10) UNSIGNED, + forum_id INT(10) UNSIGNED NOT NULL DEFAULT 0, + PRIMARY KEY (id) + ) ENGINE = MyISAM CHARACTER SET utf8 + + case 'pgsql': + CREATE TABLE {{TABLE_PREFIX}}topics ( + id SERIAL, + poster VARCHAR(200) NOT NULL DEFAULT '', + subject VARCHAR(255) NOT NULL DEFAULT '', + posted INT NOT NULL DEFAULT 0, + first_post_id INT NOT NULL DEFAULT 0, + last_post INT NOT NULL DEFAULT 0, + last_post_id INT NOT NULL DEFAULT 0, + last_poster VARCHAR(200), + num_views INT NOT NULL DEFAULT 0, + num_replies INT NOT NULL DEFAULT 0, + closed SMALLINT NOT NULL DEFAULT 0, + sticky SMALLINT NOT NULL DEFAULT 0, + moved_to INT, + forum_id INT NOT NULL DEFAULT 0, + PRIMARY KEY (id) + ) + + case 'mysql': + case 'mysqli': + CREATE TABLE {{TABLE_PREFIX}}users ( + id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + group_id INT(10) UNSIGNED NOT NULL DEFAULT 4, + username VARCHAR(200) NOT NULL DEFAULT '', + password VARCHAR(40) NOT NULL DEFAULT '', + salt VARCHAR(12), + email VARCHAR(80) NOT NULL DEFAULT '', + title VARCHAR(50), + realname VARCHAR(40), + url VARCHAR(100), + jabber VARCHAR(80), + icq VARCHAR(12), + msn VARCHAR(80), + aim VARCHAR(30), + yahoo VARCHAR(30), + location VARCHAR(30), + signature TEXT, + disp_topics TINYINT(3) UNSIGNED, + disp_posts TINYINT(3) UNSIGNED, + email_setting TINYINT(1) NOT NULL DEFAULT 1, + save_pass TINYINT(1) NOT NULL DEFAULT 1, + notify_with_post TINYINT(1) NOT NULL DEFAULT 0, + auto_notify TINYINT(1) NOT NULL DEFAULT 0, + show_smilies TINYINT(1) NOT NULL DEFAULT 1, + show_img TINYINT(1) NOT NULL DEFAULT 1, + show_img_sig TINYINT(1) NOT NULL DEFAULT 1, + show_avatars TINYINT(1) NOT NULL DEFAULT 1, + show_sig TINYINT(1) NOT NULL DEFAULT 1, + timezone FLOAT NOT NULL DEFAULT 0, + dst TINYINT(1) NOT NULL DEFAULT 0, + time_format INT(10) UNSIGNED NOT NULL DEFAULT 0, + date_format INT(10) UNSIGNED NOT NULL DEFAULT 0, + language VARCHAR(25) NOT NULL DEFAULT 'English', + style VARCHAR(25) NOT NULL DEFAULT 'Oxygen', + num_posts INT(10) UNSIGNED NOT NULL DEFAULT 0, + last_post INT(10) UNSIGNED, + registered INT(10) UNSIGNED NOT NULL DEFAULT 0, + registration_ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', + last_visit INT(10) UNSIGNED NOT NULL DEFAULT 0, + admin_note VARCHAR(30), + activate_string VARCHAR(80), + activate_key VARCHAR(8), + PRIMARY KEY (id) + ) ENGINE = MyISAM CHARACTER SET utf8 + + case 'pgsql': + CREATE TABLE {{TABLE_PREFIX}}users ( + id SERIAL, + group_id INT NOT NULL DEFAULT 4, + username VARCHAR(200) NOT NULL DEFAULT '', + password VARCHAR(40) NOT NULL DEFAULT '', + salt VARCHAR(12), + email VARCHAR(80) NOT NULL DEFAULT '', + title VARCHAR(50), + realname VARCHAR(40), + url VARCHAR(100), + jabber VARCHAR(80), + icq VARCHAR(12), + msn VARCHAR(80), + aim VARCHAR(30), + yahoo VARCHAR(30), + location VARCHAR(30), + signature TEXT, + disp_topics SMALLINT, + disp_posts SMALLINT, + email_setting SMALLINT NOT NULL DEFAULT 1, + save_pass SMALLINT NOT NULL DEFAULT 1, + notify_with_post SMALLINT NOT NULL DEFAULT 0, + auto_notify SMALLINT NOT NULL DEFAULT 0, + show_smilies SMALLINT NOT NULL DEFAULT 1, + show_img SMALLINT NOT NULL DEFAULT 1, + show_img_sig SMALLINT NOT NULL DEFAULT 1, + show_avatars SMALLINT NOT NULL DEFAULT 1, + show_sig SMALLINT NOT NULL DEFAULT 1, + timezone REAL NOT NULL DEFAULT 0, + dst SMALLINT NOT NULL DEFAULT 0, + time_format INT NOT NULL DEFAULT 0, + date_format INT NOT NULL DEFAULT 0, + language VARCHAR(25) NOT NULL DEFAULT 'English', + style VARCHAR(25) NOT NULL DEFAULT 'Oxygen', + num_posts INT NOT NULL DEFAULT 0, + last_post INT, + registered INT NOT NULL DEFAULT 0, + registration_ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', + last_visit INT NOT NULL DEFAULT 0, + admin_note VARCHAR(30), + activate_string VARCHAR(80), + activate_key VARCHAR(8), + PRIMARY KEY (id) + ) + + case 'mysql': + case 'mysqli': + // mysql + ALTER TABLE {{TABLE_PREFIX}}online ADD UNIQUE INDEX {{TABLE_PREFIX}}online_user_id_ident_idx(user_id,ident(25)); + ALTER TABLE {{TABLE_PREFIX}}online ADD INDEX {{TABLE_PREFIX}}online_user_id_idx(user_id); + ALTER TABLE {{TABLE_PREFIX}}posts ADD INDEX {{TABLE_PREFIX}}posts_topic_id_idx(topic_id); + ALTER TABLE {{TABLE_PREFIX}}posts ADD INDEX {{TABLE_PREFIX}}posts_multi_idx(poster_id, topic_id); + ALTER TABLE {{TABLE_PREFIX}}posts ADD FULLTEXT {{TABLE_PREFIX}}posts_message_idx(message); + ALTER TABLE {{TABLE_PREFIX}}reports ADD INDEX {{TABLE_PREFIX}}reports_zapped_idx(zapped); + ALTER TABLE {{TABLE_PREFIX}}topics ADD INDEX {{TABLE_PREFIX}}topics_forum_id_idx(forum_id); + ALTER TABLE {{TABLE_PREFIX}}topics ADD INDEX {{TABLE_PREFIX}}topics_moved_to_idx(moved_to); + ALTER TABLE {{TABLE_PREFIX}}topics ADD INDEX {{TABLE_PREFIX}}topics_last_post_idx(last_post); + ALTER TABLE {{TABLE_PREFIX}}topics ADD INDEX {{TABLE_PREFIX}}topics_first_post_id_idx(first_post_id); + ALTER TABLE {{TABLE_PREFIX}}topics ADD FULLTEXT {{TABLE_PREFIX}}topics_subject_idx(subject); + ALTER TABLE {{TABLE_PREFIX}}users ADD INDEX {{TABLE_PREFIX}}users_registered_idx(registered); + ALTER TABLE {{TABLE_PREFIX}}users ADD INDEX {{TABLE_PREFIX}}users_username_idx(username(8)); + + // pgsql + CREATE UNIQUE INDEX {{TABLE_PREFIX}}online_user_id_ident_idx ON {{TABLE_PREFIX}}online(user_id,ident); + CREATE INDEX {{TABLE_PREFIX}}online_user_id_idx ON {{TABLE_PREFIX}}online(user_id); + CREATE INDEX {{TABLE_PREFIX}}posts_topic_id_idx ON {{TABLE_PREFIX}}posts(topic_id); + CREATE INDEX {{TABLE_PREFIX}}posts_multi_idx ON {{TABLE_PREFIX}}posts(poster_id, topic_id); + CREATE INDEX {{TABLE_PREFIX}}reports_zapped_idx ON {{TABLE_PREFIX}}reports(zapped); + CREATE INDEX {{TABLE_PREFIX}}search_matches_word_id_idx ON {{TABLE_PREFIX}}search_matches(word_id); + CREATE INDEX {{TABLE_PREFIX}}search_matches_post_id_idx ON {{TABLE_PREFIX}}search_matches(post_id); + CREATE INDEX {{TABLE_PREFIX}}topics_forum_id_idx ON {{TABLE_PREFIX}}topics(forum_id); + CREATE INDEX {{TABLE_PREFIX}}topics_moved_to_idx ON {{TABLE_PREFIX}}topics(moved_to); + CREATE INDEX {{TABLE_PREFIX}}topics_last_post_idx ON {{TABLE_PREFIX}}topics(last_post); + CREATE INDEX {{TABLE_PREFIX}}topics_first_post_id_idx ON {{TABLE_PREFIX}}topics(first_post_id); + CREATE INDEX {{TABLE_PREFIX}}users_registered_idx ON {{TABLE_PREFIX}}users(registered); + CREATE INDEX {{TABLE_PREFIX}}users_username_idx ON {{TABLE_PREFIX}}users(username); + CREATE INDEX {{TABLE_PREFIX}}search_cache_ident_idx ON {{TABLE_PREFIX}}search_cache(ident); + CREATE INDEX {{TABLE_PREFIX}}search_words_id_idx ON {{TABLE_PREFIX}}search_words(id); + diff -r e3d7322305bf -r 5e1f1e916419 punbb/schema.sql --- a/punbb/schema.sql Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,281 +0,0 @@ --- Punano installation schema - -CREATE TABLE {{TABLE_PREFIX}}categories ( - id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, - cat_name VARCHAR(80) NOT NULL DEFAULT 'New Category', - disp_position INT(10) NOT NULL DEFAULT 0, - PRIMARY KEY (id) -) TYPE=MyISAM; - -CREATE TABLE {{TABLE_PREFIX}}config ( - conf_name VARCHAR(255) NOT NULL DEFAULT '', - conf_value TEXT, - PRIMARY KEY (conf_name) -) TYPE=MyISAM; - -CREATE TABLE {{TABLE_PREFIX}}forum_perms ( - group_id INT(10) NOT NULL DEFAULT 0, - forum_id INT(10) NOT NULL DEFAULT 0, - read_forum TINYINT(1) NOT NULL DEFAULT 1, - post_replies TINYINT(1) NOT NULL DEFAULT 1, - post_topics TINYINT(1) NOT NULL DEFAULT 1, - PRIMARY KEY (group_id, forum_id) -) TYPE=MyISAM; - -CREATE TABLE {{TABLE_PREFIX}}forums ( - id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, - forum_name VARCHAR(80) NOT NULL DEFAULT 'New forum', - forum_desc TEXT, - redirect_url VARCHAR(100), - moderators TEXT, - num_topics MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, - num_posts MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, - last_post INT(10) UNSIGNED, - last_post_id INT(10) UNSIGNED, - last_poster VARCHAR(200), - sort_by TINYINT(1) NOT NULL DEFAULT 0, - disp_position INT(10) NOT NULL DEFAULT 0, - cat_id INT(10) UNSIGNED NOT NULL DEFAULT 0, - PRIMARY KEY (id) -) TYPE=MyISAM; - -CREATE TABLE {{TABLE_PREFIX}}groups ( - g_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, - g_title VARCHAR(50) NOT NULL DEFAULT '', - g_user_title VARCHAR(50), - g_read_board TINYINT(1) NOT NULL DEFAULT 1, - g_post_replies TINYINT(1) NOT NULL DEFAULT 1, - g_post_topics TINYINT(1) NOT NULL DEFAULT 1, - g_post_polls TINYINT(1) NOT NULL DEFAULT 1, - g_edit_posts TINYINT(1) NOT NULL DEFAULT 1, - g_delete_posts TINYINT(1) NOT NULL DEFAULT 1, - g_delete_topics TINYINT(1) NOT NULL DEFAULT 1, - g_set_title TINYINT(1) NOT NULL DEFAULT 1, - g_search TINYINT(1) NOT NULL DEFAULT 1, - g_search_users TINYINT(1) NOT NULL DEFAULT 1, - g_edit_subjects_interval SMALLINT(6) NOT NULL DEFAULT 300, - g_post_flood SMALLINT(6) NOT NULL DEFAULT 30, - g_search_flood SMALLINT(6) NOT NULL DEFAULT 30, - PRIMARY KEY (g_id) -) TYPE=MyISAM; - -CREATE TABLE {{TABLE_PREFIX}}online ( - user_id INT(10) UNSIGNED NOT NULL DEFAULT 1, - ident VARCHAR(200) NOT NULL DEFAULT '', - logged INT(10) UNSIGNED NOT NULL DEFAULT 0, - idle TINYINT(1) NOT NULL DEFAULT 0 -) TYPE=HEAP; - -CREATE TABLE {{TABLE_PREFIX}}posts ( - id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, - poster VARCHAR(200) NOT NULL DEFAULT '', - poster_id INT(10) UNSIGNED NOT NULL DEFAULT 1, - poster_ip VARCHAR(15), - poster_email VARCHAR(50), - message TEXT, - hide_smilies TINYINT(1) NOT NULL DEFAULT 0, - posted INT(10) UNSIGNED NOT NULL DEFAULT 0, - edited INT(10) UNSIGNED, - edited_by VARCHAR(200), - topic_id INT(10) UNSIGNED NOT NULL DEFAULT 0, - PRIMARY KEY (id) -) TYPE=MyISAM; - -CREATE TABLE {{TABLE_PREFIX}}ranks ( - id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, - rank VARCHAR(50) NOT NULL DEFAULT '', - min_posts MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, - PRIMARY KEY (id) -) TYPE=MyISAM; - -CREATE TABLE {{TABLE_PREFIX}}reports ( - id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, - post_id INT(10) UNSIGNED NOT NULL DEFAULT 0, - topic_id INT(10) UNSIGNED NOT NULL DEFAULT 0, - forum_id INT(10) UNSIGNED NOT NULL DEFAULT 0, - reported_by INT(10) UNSIGNED NOT NULL DEFAULT 0, - created INT(10) UNSIGNED NOT NULL DEFAULT 0, - message TEXT, - zapped INT(10) UNSIGNED, - zapped_by INT(10) UNSIGNED, - PRIMARY KEY (id) -) TYPE=MyISAM; - -CREATE TABLE {{TABLE_PREFIX}}search_cache ( - id INT(10) UNSIGNED NOT NULL DEFAULT 0, - ident VARCHAR(200) NOT NULL DEFAULT '', - search_data TEXT, - PRIMARY KEY (id) -) TYPE=MyISAM; - -CREATE TABLE {{TABLE_PREFIX}}search_matches ( - post_id INT(10) UNSIGNED NOT NULL DEFAULT 0, - word_id MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, - subject_match TINYINT(1) NOT NULL DEFAULT 0 -) TYPE=MyISAM; - -CREATE TABLE {{TABLE_PREFIX}}search_words ( - id MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT, - word VARCHAR(20) BINARY NOT NULL DEFAULT '', - PRIMARY KEY (word), - KEY {{TABLE_PREFIX}}search_words_id_idx (id) -) TYPE=MyISAM; - -CREATE TABLE {{TABLE_PREFIX}}subscriptions ( - user_id INT(10) UNSIGNED NOT NULL DEFAULT 0, - topic_id INT(10) UNSIGNED NOT NULL DEFAULT 0, - PRIMARY KEY (user_id, topic_id) -) TYPE=MyISAM; - -CREATE TABLE {{TABLE_PREFIX}}topics ( - id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, - poster VARCHAR(200) NOT NULL DEFAULT '', - subject VARCHAR(255) NOT NULL DEFAULT '', - posted INT(10) UNSIGNED NOT NULL DEFAULT 0, - last_post INT(10) UNSIGNED NOT NULL DEFAULT 0, - last_post_id INT(10) UNSIGNED NOT NULL DEFAULT 0, - last_poster VARCHAR(200), - num_views MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, - num_replies MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0, - closed TINYINT(1) NOT NULL DEFAULT 0, - sticky TINYINT(1) NOT NULL DEFAULT 0, - moved_to INT(10) UNSIGNED, - forum_id INT(10) UNSIGNED NOT NULL DEFAULT 0, - PRIMARY KEY (id) -) TYPE=MyISAM; - -CREATE TABLE {{TABLE_PREFIX}}users ( - id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, - group_id INT(10) UNSIGNED NOT NULL DEFAULT 4, - title VARCHAR(50), - realname VARCHAR(40), - url VARCHAR(100), - jabber VARCHAR(75), - icq VARCHAR(12), - msn VARCHAR(50), - aim VARCHAR(30), - yahoo VARCHAR(30), - location VARCHAR(30), - use_avatar TINYINT(1) NOT NULL DEFAULT 0, - signature TEXT, - disp_topics TINYINT(3) UNSIGNED, - disp_posts TINYINT(3) UNSIGNED, - email_setting TINYINT(1) NOT NULL DEFAULT 1, - save_pass TINYINT(1) NOT NULL DEFAULT 1, - notify_with_post TINYINT(1) NOT NULL DEFAULT 0, - show_smilies TINYINT(1) NOT NULL DEFAULT 1, - show_img TINYINT(1) NOT NULL DEFAULT 1, - show_img_sig TINYINT(1) NOT NULL DEFAULT 1, - show_avatars TINYINT(1) NOT NULL DEFAULT 1, - show_sig TINYINT(1) NOT NULL DEFAULT 1, - timezone FLOAT NOT NULL DEFAULT 0, - language VARCHAR(25) NOT NULL DEFAULT 'English', - style VARCHAR(25) NOT NULL DEFAULT 'Oxygen', - num_posts INT(10) UNSIGNED NOT NULL DEFAULT 0, - last_post INT(10) UNSIGNED, - registered INT(10) UNSIGNED NOT NULL DEFAULT 0, - registration_ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', - last_visit INT(10) UNSIGNED NOT NULL DEFAULT 0, - admin_note VARCHAR(30), - activate_string VARCHAR(50), - activate_key VARCHAR(8), - PRIMARY KEY (id) -) TYPE=MyISAM; - -ALTER TABLE {{TABLE_PREFIX}}online ADD UNIQUE INDEX {{TABLE_PREFIX}}online_user_id_ident_idx(user_id,ident); -ALTER TABLE {{TABLE_PREFIX}}online ADD INDEX {{TABLE_PREFIX}}online_user_id_idx(user_id); -ALTER TABLE {{TABLE_PREFIX}}posts ADD INDEX {{TABLE_PREFIX}}posts_topic_id_idx(topic_id); -ALTER TABLE {{TABLE_PREFIX}}posts ADD INDEX {{TABLE_PREFIX}}posts_multi_idx(poster_id, topic_id); -ALTER TABLE {{TABLE_PREFIX}}reports ADD INDEX {{TABLE_PREFIX}}reports_zapped_idx(zapped); -ALTER TABLE {{TABLE_PREFIX}}search_matches ADD INDEX {{TABLE_PREFIX}}search_matches_word_id_idx(word_id); -ALTER TABLE {{TABLE_PREFIX}}search_matches ADD INDEX {{TABLE_PREFIX}}search_matches_post_id_idx(post_id); -ALTER TABLE {{TABLE_PREFIX}}topics ADD INDEX {{TABLE_PREFIX}}topics_forum_id_idx(forum_id); -ALTER TABLE {{TABLE_PREFIX}}topics ADD INDEX {{TABLE_PREFIX}}topics_moved_to_idx(moved_to); -ALTER TABLE {{TABLE_PREFIX}}users ADD INDEX {{TABLE_PREFIX}}users_registered_idx(registered); -ALTER TABLE {{TABLE_PREFIX}}search_cache ADD INDEX {{TABLE_PREFIX}}search_cache_ident_idx(ident(8)); - -INSERT INTO {{TABLE_PREFIX}}groups (g_title, g_user_title, g_read_board, g_post_replies, g_post_topics, g_post_polls, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood) VALUES('Administrators', 'Administrator', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0); -INSERT INTO {{TABLE_PREFIX}}groups (g_title, g_user_title, g_read_board, g_post_replies, g_post_topics, g_post_polls, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood) VALUES('Moderators', 'Moderator', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0); -INSERT INTO {{TABLE_PREFIX}}groups (g_title, g_user_title, g_read_board, g_post_replies, g_post_topics, g_post_polls, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood) VALUES('Guest', NULL, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0); -INSERT INTO {{TABLE_PREFIX}}groups (g_title, g_user_title, g_read_board, g_post_replies, g_post_topics, g_post_polls, g_edit_posts, g_delete_posts, g_delete_topics, g_set_title, g_search, g_search_users, g_edit_subjects_interval, g_post_flood, g_search_flood) VALUES('Members', NULL, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 300, 60, 30); - -INSERT INTO {{TABLE_PREFIX}}users (id, group_id) VALUES(1, 3); - -INSERT INTO {{TABLE_PREFIX}}config VALUES - ('o_cur_version', '{{PUN_VERSION}}'), - ('o_board_title', 'My PunBB forum'), - ('o_board_desc', 'Unfortunately no one can be told what PunBB is - you have to see it for yourself.'), - ('o_server_timezone', '0'), - ('o_time_format', 'H:i:s'), - ('o_date_format', 'Y-m-d'), - ('o_timeout_visit', '600'), - ('o_timeout_online', '300'), - ('o_redirect_delay', '1'), - ('o_show_version', '0'), - ('o_show_user_info', '1'), - ('o_show_post_count', '1'), - ('o_smilies', '1'), - ('o_smilies_sig', '1'), - ('o_make_links', '1'), - ('o_default_lang', 'English'), - ('o_default_style', 'Oxygen'), - ('o_default_user_group', '4'), - ('o_topic_review', '15'), - ('o_disp_topics_default', '30'), - ('o_disp_posts_default', '25'), - ('o_indent_num_spaces', '4'), - ('o_quickpost', '1'), - ('o_users_online', '1'), - ('o_censoring', '0'), - ('o_ranks', '1'), - ('o_show_dot', '0'), - ('o_quickjump', '1'), - ('o_gzip', '0'), - ('o_additional_navlinks', ''), - ('o_report_method', '0'), - ('o_regs_report', '0'), - ('o_mailing_list', '{{ENANO_ADMIN_EMAIL}}'), - ('o_avatars', '1'), - ('o_avatars_dir', 'img/avatars'), - ('o_avatars_width', '60'), - ('o_avatars_height', '60'), - ('o_avatars_size', '10240'), - ('o_search_all_forums', '1'), - ('o_base_url', ''), - ('o_admin_email', '{{ENANO_ADMIN_EMAIL}}'), - ('o_webmaster_email', '{{ENANO_ADMIN_EMAIL}}'), - ('o_subscriptions', '1'), - ('o_smtp_host', NULL), - ('o_smtp_user', NULL), - ('o_smtp_pass', NULL), - ('o_regs_allow', '1'), - ('o_regs_verify', '0'), - ('o_announcement', '0'), - ('o_announcement_message', 'Enter your announcement here.'), - ('o_rules', '0'), - ('o_rules_message', 'Enter your rules here.'), - ('o_maintenance', '0'), - ('o_maintenance_message', 'The forums are temporarily down for maintenance. Please try again in a few minutes.
    \\n
    \\n--Administrator'), - ('p_mod_edit_users', '1'), - ('p_mod_rename_users', '0'), - ('p_mod_change_passwords', '0'), - ('p_mod_ban_users', '0'), - ('p_message_bbcode', '1'), - ('p_message_img_tag', '1'), - ('p_message_all_caps', '1'), - ('p_subject_all_caps', '1'), - ('p_sig_all_caps', '1'), - ('p_sig_bbcode', '1'), - ('p_sig_img_tag', '0'), - ('p_sig_length', '400'), - ('p_sig_lines', '4'), - ('p_allow_banned_email', '1'), - ('p_allow_dupe_email', '0'), - ('p_force_guest_email', '1'); - -INSERT INTO {{TABLE_PREFIX}}categories (cat_name, disp_position) VALUES('Test category', 1); -INSERT INTO {{TABLE_PREFIX}}forums (forum_name, forum_desc, num_topics, num_posts, last_post, last_post_id, last_poster, disp_position, cat_id) VALUES('Test forum', 'This is just a test forum', 1, 1, UNIX_TIMESTAMP(), 1, 'PunBB', 1, 1); -INSERT INTO {{TABLE_PREFIX}}topics (poster, subject, posted, last_post, last_post_id, last_poster, forum_id) VALUES('PunBB', 'Test post', UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), 1, 'PunBB', 1); -INSERT INTO {{TABLE_PREFIX}}posts (poster, poster_id, poster_ip, message, posted, topic_id) VALUES('PunBB', 2, '127.0.0.1', 'If you are looking at this (which I guess you are), the install of PunBB appears to have worked! Now log in and head over to the administration control panel to configure your forum.', UNIX_TIMESTAMP(), 1); -INSERT INTO {{TABLE_PREFIX}}ranks (rank, min_posts) VALUES('New member', 0), ('Member', 10); - diff -r e3d7322305bf -r 5e1f1e916419 punbb/search.php --- a/punbb/search.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,778 +0,0 @@ -query('SELECT search_data FROM '.$pun_db->prefix.'search_cache WHERE id='.$search_id.' AND ident=\''.$pun_db->escape($ident).'\'') or error('Unable to fetch search results', __FILE__, __LINE__, $pun_db->error()); - if ($row = $pun_db->fetch_assoc($result)) - { - $temp = unserialize($row['search_data']); - - $search_results = $temp['search_results']; - $num_hits = $temp['num_hits']; - $sort_by = $temp['sort_by']; - $sort_dir = $temp['sort_dir']; - $show_as = $temp['show_as']; - - unset($temp); - } - else - message($lang_search['No hits']); - } - else - { - $keyword_results = $author_results = array(); - - // Search a specific forum? - $forum_sql = ($forum != -1 || ($forum == -1 && $pun_config['o_search_all_forums'] == '0')) ? ' AND t.forum_id = '.$forum : ''; - - if (!empty($author) || !empty($keywords)) - { - // If it's a search for keywords - if ($keywords) - { - $stopwords = (array)@file(PUN_ROOT.'lang/'.$pun_user['language'].'/stopwords.txt'); - $stopwords = array_map('trim', $stopwords); - - // Are we searching for multibyte charset text? - if ($multibyte) - { - // Strip out excessive whitespace - $keywords = trim(preg_replace('#\s+#', ' ', $keywords)); - - $keywords_array = explode(' ', $keywords); - } - else - { - // Filter out non-alphabetical chars - $noise_match = array('^', '$', '&', '(', ')', '<', '>', '`', '\'', '"', '|', ',', '@', '_', '?', '%', '~', '[', ']', '{', '}', ':', '\\', '/', '=', '#', '\'', ';', '!', '�'); - $noise_replace = array(' ', ' ', ' ', ' ', ' ', ' ', ' ', '', '', ' ', ' ', ' ', ' ', '', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '' , ' ', ' ', ' ', ' ', ' ', ' ', ' '); - $keywords = str_replace($noise_match, $noise_replace, $keywords); - - // Strip out excessive whitespace - $keywords = trim(preg_replace('#\s+#', ' ', $keywords)); - - // Fill an array with all the words - $keywords_array = explode(' ', $keywords); - - if (empty($keywords_array)) - message($lang_search['No hits']); - - while (list($i, $word) = @each($keywords_array)) - { - $num_chars = pun_strlen($word); - - if ($num_chars < 3 || $num_chars > 20 || in_array($word, $stopwords)) - unset($keywords_array[$i]); - } - - // Should we search in message body or topic subject specifically? - $search_in_cond = ($search_in) ? (($search_in > 0) ? ' AND m.subject_match = 0' : ' AND m.subject_match = 1') : ''; - } - - $word_count = 0; - $match_type = 'and'; - $result_list = array(); - @reset($keywords_array); - while (list(, $cur_word) = @each($keywords_array)) - { - switch ($cur_word) - { - case 'and': - case 'or': - case 'not': - $match_type = $cur_word; - break; - - default: - { - // Are we searching for multibyte charset text? - if ($multibyte) - { - $cur_word = $pun_db->escape('%'.str_replace('*', '', $cur_word).'%'); - $cur_word_like = ($db_type == 'pgsql') ? 'ILIKE \''.$cur_word.'\'' : 'LIKE \''.$cur_word.'\''; - - if ($search_in > 0) - $sql = 'SELECT id FROM '.$pun_db->prefix.'posts WHERE message '.$cur_word_like; - else if ($search_in < 0) - $sql = 'SELECT p.id FROM '.$pun_db->prefix.'posts AS p INNER JOIN '.$pun_db->prefix.'topics AS t ON t.id=p.topic_id WHERE t.subject '.$cur_word_like.' GROUP BY p.id, t.id'; - else - $sql = 'SELECT p.id FROM '.$pun_db->prefix.'posts AS p INNER JOIN '.$pun_db->prefix.'topics AS t ON t.id=p.topic_id WHERE p.message '.$cur_word_like.' OR t.subject '.$cur_word_like.' GROUP BY p.id, t.id'; - } - else - { - $cur_word = str_replace('*', '%', $cur_word); - $sql = 'SELECT m.post_id FROM '.$pun_db->prefix.'search_words AS w INNER JOIN '.$pun_db->prefix.'search_matches AS m ON m.word_id = w.id WHERE w.word LIKE \''.$cur_word.'\''.$search_in_cond; - } - - $result = $pun_db->query($sql, true) or error('Unable to search for posts', __FILE__, __LINE__, $pun_db->error()); - - $row = array(); - while ($temp = $pun_db->fetch_row($result)) - { - $row[$temp[0]] = 1; - - if (!$word_count) - $result_list[$temp[0]] = 1; - else if ($match_type == 'or') - $result_list[$temp[0]] = 1; - else if ($match_type == 'not') - $result_list[$temp[0]] = 0; - } - - if ($match_type == 'and' && $word_count) - { - @reset($result_list); - while (list($post_id,) = @each($result_list)) - { - if (!isset($row[$post_id])) - $result_list[$post_id] = 0; - } - } - - ++$word_count; - $pun_db->free_result($result); - - break; - } - } - } - - @reset($result_list); - while (list($post_id, $matches) = @each($result_list)) - { - if ($matches) - $keyword_results[] = $post_id; - } - - unset($result_list); - } - - // If it's a search for author name (and that author name isn't Guest) - if ($author && strcasecmp($author, 'Guest') && strcasecmp($author, $lang_common['Guest'])) - { - switch ($db_type) - { - case 'pgsql': - $result = $pun_db->query('SELECT id FROM '.$pun_db->prefix.'users WHERE username ILIKE \''.$pun_db->escape($author).'\'') or error('Unable to fetch users', __FILE__, __LINE__, $pun_db->error()); - break; - - default: - $result = $pun_db->query('SELECT id FROM '.$pun_db->prefix.'users WHERE username LIKE \''.$pun_db->escape($author).'\'') or error('Unable to fetch users', __FILE__, __LINE__, $pun_db->error()); - break; - } - - if ($pun_db->num_rows($result)) - { - $user_ids = ''; - while ($row = $pun_db->fetch_row($result)) - $user_ids .= (($user_ids != '') ? ',' : '').$row[0]; - - $result = $pun_db->query('SELECT id FROM '.$pun_db->prefix.'posts WHERE poster_id IN('.$user_ids.')') or error('Unable to fetch matched posts list', __FILE__, __LINE__, $pun_db->error()); - - $search_ids = array(); - while ($row = $pun_db->fetch_row($result)) - $author_results[] = $row[0]; - - $pun_db->free_result($result); - } - } - - - if ($author && $keywords) - { - // If we searched for both keywords and author name we want the intersection between the results - $search_ids = array_intersect($keyword_results, $author_results); - unset($keyword_results, $author_results); - } - else if ($keywords) - $search_ids = $keyword_results; - else - $search_ids = $author_results; - - $num_hits = count($search_ids); - if (!$num_hits) - message($lang_search['No hits']); - - - if ($show_as == 'topics') - { - $result = $pun_db->query('SELECT t.id FROM '.$pun_db->prefix.'posts AS p INNER JOIN '.$pun_db->prefix.'topics AS t ON t.id=p.topic_id INNER JOIN '.$pun_db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$pun_db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND p.id IN('.implode(',', $search_ids).')'.$forum_sql.' GROUP BY t.id', true) or error('Unable to fetch topic list', __FILE__, __LINE__, $pun_db->error()); - - $search_ids = array(); - while ($row = $pun_db->fetch_row($result)) - $search_ids[] = $row[0]; - - $pun_db->free_result($result); - - $num_hits = count($search_ids); - } - else - { - $result = $pun_db->query('SELECT p.id FROM '.$pun_db->prefix.'posts AS p INNER JOIN '.$pun_db->prefix.'topics AS t ON t.id=p.topic_id INNER JOIN '.$pun_db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$pun_db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND p.id IN('.implode(',', $search_ids).')'.$forum_sql, true) or error('Unable to fetch topic list', __FILE__, __LINE__, $pun_db->error()); - - $search_ids = array(); - while ($row = $pun_db->fetch_row($result)) - $search_ids[] = $row[0]; - - $pun_db->free_result($result); - - $num_hits = count($search_ids); - } - } - else if ($action == 'show_new' || $action == 'show_24h' || $action == 'show_user' || $action == 'show_subscriptions' || $action == 'show_unanswered') - { - // If it's a search for new posts - if ($action == 'show_new') - { - if ($pun_user['is_guest']) - message($lang_common['No permission']); - - $result = $pun_db->query('SELECT t.id FROM '.$pun_db->prefix.'topics AS t INNER JOIN '.$pun_db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$pun_db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.last_post>'.$pun_user['last_visit'].' AND t.moved_to IS NULL') or error('Unable to fetch topic list', __FILE__, __LINE__, $pun_db->error()); - $num_hits = $pun_db->num_rows($result); - - if (!$num_hits) - message($lang_search['No new posts']); - } - // If it's a search for todays posts - else if ($action == 'show_24h') - { - $result = $pun_db->query('SELECT t.id FROM '.$pun_db->prefix.'topics AS t INNER JOIN '.$pun_db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$pun_db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.last_post>'.(time() - 86400).' AND t.moved_to IS NULL') or error('Unable to fetch topic list', __FILE__, __LINE__, $pun_db->error()); - $num_hits = $pun_db->num_rows($result); - - if (!$num_hits) - message($lang_search['No recent posts']); - } - // If it's a search for posts by a specific user ID - else if ($action == 'show_user') - { - $result = $pun_db->query('SELECT t.id FROM '.$pun_db->prefix.'topics AS t INNER JOIN '.$pun_db->prefix.'posts AS p ON t.id=p.topic_id INNER JOIN '.$pun_db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$pun_db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND p.poster_id='.$user_id.' GROUP BY t.id') or error('Unable to fetch topic list', __FILE__, __LINE__, $pun_db->error()); - $num_hits = $pun_db->num_rows($result); - - if (!$num_hits) - message($lang_search['No user posts']); - } - // If it's a search for subscribed topics - else if ($action == 'show_subscriptions') - { - if ($pun_user['is_guest']) - message($lang_common['Bad request']); - - $result = $pun_db->query('SELECT t.id FROM '.$pun_db->prefix.'topics AS t INNER JOIN '.$pun_db->prefix.'subscriptions AS s ON (t.id=s.topic_id AND s.user_id='.$pun_user['id'].') INNER JOIN '.$pun_db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$pun_db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1)') or error('Unable to fetch topic list', __FILE__, __LINE__, $pun_db->error()); - $num_hits = $pun_db->num_rows($result); - - if (!$num_hits) - message($lang_search['No subscriptions']); - } - // If it's a search for unanswered posts - else - { - $result = $pun_db->query('SELECT t.id FROM '.$pun_db->prefix.'topics AS t INNER JOIN '.$pun_db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$pun_db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.num_replies=0 AND t.moved_to IS NULL') or error('Unable to fetch topic list', __FILE__, __LINE__, $pun_db->error()); - $num_hits = $pun_db->num_rows($result); - - if (!$num_hits) - message($lang_search['No unanswered']); - } - - // We want to sort things after last post - $sort_by = 4; - - $search_ids = array(); - while ($row = $pun_db->fetch_row($result)) - $search_ids[] = $row[0]; - - $pun_db->free_result($result); - - $show_as = 'topics'; - } - else - message($lang_common['Bad request']); - - - // Prune "old" search results - $old_searches = array(); - $result = $pun_db->query('SELECT ident FROM '.$pun_db->prefix.'online') or error('Unable to fetch online list', __FILE__, __LINE__, $pun_db->error()); - - if ($pun_db->num_rows($result)) - { - while ($row = $pun_db->fetch_row($result)) - $old_searches[] = '\''.$pun_db->escape($row[0]).'\''; - - $pun_db->query('DELETE FROM '.$pun_db->prefix.'search_cache WHERE ident NOT IN('.implode(',', $old_searches).')') or error('Unable to delete search results', __FILE__, __LINE__, $pun_db->error()); - } - - // Final search results - $search_results = implode(',', $search_ids); - - // Fill an array with our results and search properties - $temp['search_results'] = $search_results; - $temp['num_hits'] = $num_hits; - $temp['sort_by'] = $sort_by; - $temp['sort_dir'] = $sort_dir; - $temp['show_as'] = $show_as; - $temp = serialize($temp); - $search_id = mt_rand(1, 2147483647); - - $ident = ($pun_user['is_guest']) ? get_remote_address() : $pun_user['username']; - - $pun_db->query('INSERT INTO '.$pun_db->prefix.'search_cache (id, ident, search_data) VALUES('.$search_id.', \''.$pun_db->escape($ident).'\', \''.$pun_db->escape($temp).'\')') or error('Unable to insert search results', __FILE__, __LINE__, $pun_db->error()); - - if ($action != 'show_new' && $action != 'show_24h') - { - $pun_db->end_transaction(); - $pun_db->close(); - - // Redirect the user to the cached result page - header('Location: search.php?search_id='.$search_id); - exit; - } - } - - - // Fetch results to display - if ($search_results != '') - { - switch ($sort_by) - { - case 1: - $sort_by_sql = ($show_as == 'topics') ? 't.poster' : 'p.poster'; - break; - - case 2: - $sort_by_sql = 't.subject'; - break; - - case 3: - $sort_by_sql = 't.forum_id'; - break; - - case 4: - $sort_by_sql = 't.last_post'; - break; - - default: - $sort_by_sql = ($show_as == 'topics') ? 't.posted' : 'p.posted'; - break; - } - - if ($show_as == 'posts') - { - $substr_sql = ($db_type != 'sqlite') ? 'SUBSTRING' : 'SUBSTR'; - $sql = 'SELECT p.id AS pid, p.poster AS pposter, p.posted AS pposted, p.poster_id, '.$substr_sql.'(p.message, 1, 1000) AS message, t.id AS tid, t.poster, t.subject, t.last_post, t.last_post_id, t.last_poster, t.num_replies, t.forum_id FROM '.$pun_db->prefix.'posts AS p INNER JOIN '.$pun_db->prefix.'topics AS t ON t.id=p.topic_id WHERE p.id IN('.$search_results.') ORDER BY '.$sort_by_sql; - } - else - $sql = 'SELECT t.id AS tid, t.poster, t.subject, t.last_post, t.last_post_id, t.last_poster, t.num_replies, t.closed, t.forum_id FROM '.$pun_db->prefix.'topics AS t WHERE t.id IN('.$search_results.') ORDER BY '.$sort_by_sql; - - - // Determine the topic or post offset (based on $_GET['p']) - $per_page = ($show_as == 'posts') ? $pun_user['disp_posts'] : $pun_user['disp_topics']; - $num_pages = ceil($num_hits / $per_page); - - $p = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p']; - $start_from = $per_page * ($p - 1); - - // Generate paging links - $paging_links = $lang_common['Pages'].': '.pun_paginate($num_pages, $p, 'search.php?search_id='.$search_id); - - - $sql .= ' '.$sort_dir.' LIMIT '.$start_from.', '.$per_page; - - $result = $pun_db->query($sql) or error('Unable to fetch search results', __FILE__, __LINE__, $pun_db->error()); - - $search_set = array(); - while ($row = $pun_db->fetch_assoc($result)) - $search_set[] = $row; - - $pun_db->free_result($result); - - $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_search['Search results']; - require PUN_ROOT.'header.php'; - - -?> -
    -
    - -
    -
    - - -
    -

    -
    -
    - - - - - - - - - - -query('SELECT id, forum_name FROM '.$pun_db->prefix.'forums') or error('Unable to fetch forum list', __FILE__, __LINE__, $pun_db->error()); - - $forum_list = array(); - while ($forum_list[] = $pun_db->fetch_row($result)) - ; - - // Finally, lets loop through the results and output them - for ($i = 0; $i < count($search_set); ++$i) - { - @reset($forum_list); - while (list(, $temp) = @each($forum_list)) - { - if ($temp[0] == $search_set[$i]['forum_id']) - $forum = ''.pun_htmlspecialchars($temp[1]).''; - } - - if ($pun_config['o_censoring'] == '1') - $search_set[$i]['subject'] = censor_words($search_set[$i]['subject']); - - - if ($show_as == 'posts') - { - $icon = '
    '.$lang_common['Normal icon'].'
    '."\n"; - $subject = ''.pun_htmlspecialchars($search_set[$i]['subject']).''; - - if (!$pun_user['is_guest'] && $search_set[$i]['last_post'] > $pun_user['last_visit']) - $icon = '
    '.$lang_common['New icon'].'
    '."\n"; - - - if ($pun_config['o_censoring'] == '1') - $search_set[$i]['message'] = censor_words($search_set[$i]['message']); - - $message = str_replace("\n", '
    ', pun_htmlspecialchars($search_set[$i]['message'])); - $pposter = pun_htmlspecialchars($search_set[$i]['pposter']); - - if ($search_set[$i]['poster_id'] > 1) - $pposter = ''.$pposter.''; - - if (pun_strlen($message) >= 1000) - $message .= ' …'; - - $vtpost1 = ($i == 0) ? ' vtp1' : ''; - - // Switch the background color for every message. - $bg_switch = ($bg_switch) ? $bg_switch = false : $bg_switch = true; - $vtbg = ($bg_switch) ? ' rowodd' : ' roweven'; - - -?> -
    -

     »  » 

    -
    -
    -
    -
    -
    -
    Replies:
    -
    -

    -
    -
    -
    -
    -

    -
    -
    -
    -
    -
    -
    -
    '.$lang_common['Normal icon'].'
    '."\n"; - - $icon_text = $lang_common['Normal icon']; - $item_status = ''; - $icon_type = 'icon'; - - - $subject = ''.pun_htmlspecialchars($search_set[$i]['subject']).''.$lang_common['by'].' '.pun_htmlspecialchars($search_set[$i]['poster']).''; - - if ($search_set[$i]['closed'] != '0') - { - $icon_text = $lang_common['Closed icon']; - $item_status = 'iclosed'; - } - - if (!$pun_user['is_guest'] && $search_set[$i]['last_post'] > $pun_user['last_visit']) - { - $icon_text .= ' '.$lang_common['New icon']; - $item_status .= ' inew'; - $icon_type = 'icon inew'; - $subject = ''.$subject.''; - $subject_new_posts = ''.$lang_common['New posts'].' ]'; - } - else - $subject_new_posts = null; - - $num_pages_topic = ceil(($search_set[$i]['num_replies'] + 1) / $pun_user['disp_posts']); - - if ($num_pages_topic > 1) - $subject_multipage = '[ '.pun_paginate($num_pages_topic, -1, 'viewtopic.php?id='.$search_set[$i]['tid']).' ]'; - else - $subject_multipage = null; - - // Should we show the "New posts" and/or the multipage links? - if (!empty($subject_new_posts) || !empty($subject_multipage)) - { - $subject .= '  '.(!empty($subject_new_posts) ? $subject_new_posts : ''); - $subject .= !empty($subject_multipage) ? ' '.$subject_multipage : ''; - } - -?> - > - - - - - -'."\n\t\t\t".'
    -
    -
    -
    - -
    -
    -
    '.format_time($search_set[$i]['last_post']).' '.$lang_common['by'].' '.pun_htmlspecialchars($search_set[$i]['last_poster']) ?>
    '."\n\t\t".'
    '."\n\t".'
    '."\n".'
    '."\n\n"; - -?> -
    -
    - -
    -
    - -
    -

    -
    - -
    -
    -FIELDSET { - BORDER-STYLE: solid; - BORDER-WIDTH: 1px -} - -/****************************************************************/ -/* 5. VERTICAL AND PAGE SPACING */ -/****************************************************************/ - -/* 5.1 Page margins */ - -HTML, BODY {MARGIN: 0; PADDING: 0} -#punwrap {margin:12px 20px} - -/* 5.2 Creates vertical space between main board elements (Margins) */ - -DIV.blocktable, DIV.block, DIV.blockform, DIV.block2col, #postreview {MARGIN-BOTTOM: 12px} -#punindex DIV.blocktable, DIV.blockpost {MARGIN-BOTTOM: 6px} -DIV.block2col DIV.blockform, DIV.block2col DIV.block {MARGIN-BOTTOM: 0px} - -/* 5.3 Remove space above breadcrumbs, postlinks and pagelinks with a negative top margin */ - -DIV.linkst, DIV.linksb {MARGIN-TOP: -12px} -DIV.postlinksb {MARGIN-TOP: -6px} - -/* 5.4 Put a 12px gap above the board information box in index because the category tables only -have a 6px space beneath them */ - -#brdstats {MARGIN-TOP: 12px} - -/****************************************************************/ -/* 6. SPACING AROUND CONTENT */ -/****************************************************************/ - -/* 6.1 Default padding for main items */ - -DIV.block DIV.inbox, DIV.blockmenu DIV.inbox {PADDING: 3px 6px} -.pun P, .pun UL, .pun DL, DIV.blockmenu LI, .pun LABEL, #announce DIV.inbox DIV {PADDING: 3px 0} -.pun H2 {PADDING: 4px 6px} - -/* 6.2 Special spacing for various elements */ - -.pun H1 {PADDING: 3px 0px 0px 0} -#brdtitle P {PADDING-TOP: 0px} -DIV.linkst {PADDING: 8px 6px 3px 6px} -DIV.linksb, DIV.postlinksb {PADDING: 3px 6px 8px 6px} -#brdwelcome, #brdfooter DL A, DIV.blockmenu LI, DIV.rbox INPUT {LINE-HEIGHT: 1.4em} -#viewprofile DT, #viewprofile DD {PADDING: 0 3px; LINE-HEIGHT: 2em} - -/* 6.4 Create some horizontal spacing for various elements */ - -#brdmenu LI, DIV.rbox INPUT, DIV.blockform P INPUT {MARGIN-RIGHT: 12px} - -/****************************************************************/ -/* 7. SPACING FOR TABLES */ -/****************************************************************/ - -.pun TH, .pun TD {PADDING: 4px 6px} -.pun TD P {PADDING: 5px 0 0 0} - -/****************************************************************/ -/* 8. SPACING FOR POSTS */ -/****************************************************************/ - -/* 8.1 Padding around left and right columns in viewtopic */ - -DIV.postleft DL, DIV.postright {PADDING: 6px} - -/* 8.2 Extra spacing for poster contact details and avatar */ - -DD.usercontacts, DD.postavatar {MARGIN-TOP: 5px} -DD.postavatar {MARGIN-BOTTOM: 5px} - -/* 8.3 Extra top spacing for signatures and edited by */ - -DIV.postsignature, DIV.postmsg P.postedit {PADDING-TOP: 15px} - -/* 8.4 Spacing for code and quote boxes */ - -DIV.postmsg H4 {MARGIN-BOTTOM: 10px} -.pun BLOCKQUOTE, DIV.codebox {MARGIN: 5px 15px 15px 15px; PADDING: 8px} - -/* 8.5 Padding for the action links and online indicator in viewtopic */ - -DIV.postfootleft P, DIV.postfootright UL, DIV.postfootright DIV {PADDING: 10px 6px 5px 6px} - -/* 8.6 This is the input on moderators multi-delete view */ - -DIV.blockpost INPUT, DIV.blockpost LABEL { - PADDING: 3px; - DISPLAY: inline -} - -P.multidelete { - PADDING-TOP: 15px; - PADDING-BOTTOM: 5px -} - -/* 8.7 Make sure paragraphs in posts don't get any padding */ - -DIV.postmsg P {PADDING: 0} - -/****************************************************************/ -/* 9. SPECIAL SPACING FOR FORMS */ -/****************************************************************/ - -/* 9.1 Padding around fieldsets */ - -DIV.blockform FORM, DIV.fakeform {PADDING: 20px 20px 15px 20px} -DIV.inform {PADDING-BOTTOM: 12px} - -/* 9.2 Padding inside fieldsets */ - -.pun FIELDSET {PADDING: 0px 12px 0px 12px} -DIV.infldset {PADDING: 9px 0px 12px 0} -.pun LEGEND {PADDING: 0px 6px} - -/* 9.3 The information box at the top of the registration form and elsewhere */ - -DIV.forminfo { - MARGIN-BOTTOM: 12px; - PADDING: 9px 10px -} - -/* 9.4 BBCode help links in post forms */ - -UL.bblinks LI {PADDING-RIGHT: 20px} - -UL.bblinks {PADDING-BOTTOM: 10px; PADDING-LEFT: 4px} - -/* 9.5 Horizontal positioning for the submit button on forms */ - -DIV.blockform P INPUT {MARGIN-LEFT: 12px} - -/****************************************************************/ -/* 10. POST STATUS INDICATORS */ -/****************************************************************/ - -/* 10.1 These are the post status indicators which appear at the left of some tables. -.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and -.isticky = sticky topics. By default only .inew is different from the default.*/ - -DIV.icon { - FLOAT: left; - MARGIN-TOP: 0.1em; - MARGIN-LEFT: 0.2em; - DISPLAY: block; - BORDER-WIDTH: 0.6em 0.6em 0.6em 0.6em; - BORDER-STYLE: solid -} - -DIV.searchposts DIV.icon {MARGIN-LEFT: 0} - -/* 10.2 Class .tclcon is a div inside the first column of tables with post indicators. The -margin creates space for the post status indicator */ - -TD DIV.tclcon {MARGIN-LEFT: 2.3em} - - - - - - - - - - - diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Cobalt/Cobalt.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/style/Cobalt/Cobalt.css Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,3 @@ +/****************************************************************/ +/* PLACEHOLDER FILE - TO BE REPLACED SHORTLY */ +/****************************************************************/ \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Cobalt/Cobalt_cs.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/style/Cobalt/Cobalt_cs.css Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,3 @@ +/****************************************************************/ +/* PLACEHOLDER FILE - TO BE REPLACED SHORTLY */ +/****************************************************************/ \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Cobalt/Cobalt_fix.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/style/Cobalt/Cobalt_fix.css Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,3 @@ +/****************************************************************/ +/* PLACEHOLDER FILE - TO BE REPLACED SHORTLY */ +/****************************************************************/ \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Lithium.css --- a/punbb/style/Lithium.css Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,258 +0,0 @@ -/****************************************************************/ -/* 1. IMPORTED STYLESHEETS */ -/****************************************************************/ - -/* Import the basic setup styles */ -@import url(imports/base.css); -/* Import the colour scheme */ -@import url(imports/Lithium_cs.css); - -/****************************************************************/ -/* 2. TEXT SETTINGS */ -/****************************************************************/ - -/* 2.1 This sets the default Font Group */ - -.pun, .pun INPUT, .pun SELECT, .pun TEXTAREA, .pun OPTGROUP { - FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif -} - -.pun {FONT-SIZE: 11px; LINE-HEIGHT: normal} - -/* IEWin Font Size only - to allow IEWin to zoom. Do not remove comments \*/ -* HTML .pun {FONT-SIZE: 68.75%} -/* End IE Win Font Size */ - -/* Set font size for tables because IE requires it */ -.pun TABLE, .pun INPUT, .pun SELECT, .pun OPTGROUP, .pun TEXTAREA, DIV.postmsg P.postedit {FONT-SIZE: 1em} - -/* 2.2 Set the font-size for preformatted text i.e in code boxes */ - -.pun PRE {FONT-FAMILY: monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace} - -/* 2.3 Font size for headers */ - -.pun H2, .pun H4 {FONT-SIZE: 1em} -.pun H3 {FONT-SIZE: 1.1em} -#brdtitle H1 {FONT-SIZE: 1.4em} - -/* 2.4 Larger text for particular items */ -DIV.postmsg P {LINE-HEIGHT: 1.4} -DIV.postleft DT {FONT-SIZE: 1.1em} -.pun PRE {FONT-SIZE: 1.2em} - -/* 2.5 Bold text */ - -DIV.postleft DT, DIV.postmsg H4, TD.tcl H3, DIV.forminfo H3, P.postlink, DIV.linkst LI, -DIV.linksb LI, DIV.postlinksb LI, .blockmenu LI, #brdtitle H1, .pun SPAN.warntext, .pun P.warntext {FONT-WEIGHT: bold} - -/****************************************************************/ -/* 3. LINKS */ -/****************************************************************/ - -/* 3.1 Remove underlining for main menu, post header links, post links and vertical menus */ - -#brdmenu A:link, #brdmenu A:visited, .blockpost DT A:link, .blockpost DT A:visited, .blockpost H2 A:link, -.blockpost H2 A:visited, .postlink A:link, .postlink A:visited, .postfootright A:link, .postfootright A:visited, -.blockmenu A:link, .blockmenu A:visited { - TEXT-DECORATION: none -} - -/* 3.2 Underline on hover for links in headers and main menu */ - -#brdmenu A:hover, .blockpost H2 A:hover {TEXT-DECORATION: underline} - -/****************************************************************/ -/* 4. BORDER WIDTH AND STYLE */ -/****************************************************************/ - -/* 4.1 By default borders are 1px solid */ - -DIV.box, .pun TD, .pun TH, .pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL { - BORDER-STYLE: solid; - BORDER-WIDTH: 1px -} - -/* 4.2 Special settings for the board header. */ - -#brdheader DIV.box {BORDER-TOP-WIDTH: 4px} - -/* 4.3 Borders for table cells */ - -.pun TD, .pun TH { - BORDER-BOTTOM: none; - BORDER-RIGHT: none -} - -.pun .tcl {BORDER-LEFT: none} - -/* 4.4 Special setting for fieldsets to preserve IE defaults */ - -DIV>FIELDSET { - BORDER-STYLE: solid; - BORDER-WIDTH: 1px -} - -/****************************************************************/ -/* 5. VERTICAL AND PAGE SPACING */ -/****************************************************************/ - -/* 5.1 Page margins */ - -HTML, BODY {MARGIN: 0; PADDING: 0} -#punwrap {margin:12px 20px} - -/* 5.2 Creates vertical space between main board elements (Margins) */ - -DIV.blocktable, DIV.block, DIV.blockform, DIV.block2col, #postreview {MARGIN-BOTTOM: 12px} -#punindex DIV.blocktable, DIV.blockpost {MARGIN-BOTTOM: 6px} -DIV.block2col DIV.blockform, DIV.block2col DIV.block {MARGIN-BOTTOM: 0px} - -/* 5.3 Remove space above breadcrumbs, postlinks and pagelinks with a negative top margin */ - -DIV.linkst, DIV.linksb {MARGIN-TOP: -12px} -DIV.postlinksb {MARGIN-TOP: -6px} - -/* 5.4 Put a 12px gap above the board information box in index because the category tables only -have a 6px space beneath them */ - -#brdstats {MARGIN-TOP: 12px} - -/****************************************************************/ -/* 6. SPACING AROUND CONTENT */ -/****************************************************************/ - -/* 6.1 Default padding for main items */ - -DIV.block DIV.inbox, DIV.blockmenu DIV.inbox {PADDING: 3px 6px} -.pun P, .pun UL, .pun DL, DIV.blockmenu LI, .pun LABEL, #announce DIV.inbox DIV {PADDING: 3px 0} -.pun H2 {PADDING: 4px 6px} - -/* 6.2 Special spacing for various elements */ - -.pun H1 {PADDING: 3px 0px 0px 0} -#brdtitle P {PADDING-TOP: 0px} -DIV.linkst {PADDING: 8px 6px 3px 6px} -DIV.linksb, DIV.postlinksb {PADDING: 3px 6px 8px 6px} -#brdwelcome, #brdfooter DL A, DIV.blockmenu LI, DIV.rbox INPUT {LINE-HEIGHT: 1.4em} -#viewprofile DT, #viewprofile DD {PADDING: 0 3px; LINE-HEIGHT: 2em} - -/* 6.4 Create some horizontal spacing for various elements */ - -#brdmenu LI, DIV.rbox INPUT, DIV.blockform P INPUT {MARGIN-RIGHT: 12px} - -/****************************************************************/ -/* 7. SPACING FOR TABLES */ -/****************************************************************/ - -.pun TH, .pun TD {PADDING: 4px 6px} -.pun TD P {PADDING: 5px 0 0 0} - -/****************************************************************/ -/* 8. SPACING FOR POSTS */ -/****************************************************************/ - -/* 8.1 Padding around left and right columns in viewtopic */ - -DIV.postleft DL, DIV.postright {PADDING: 6px} - -/* 8.2 Extra spacing for poster contact details and avatar */ - -DD.usercontacts, DD.postavatar {MARGIN-TOP: 5px} -DD.postavatar {MARGIN-BOTTOM: 5px} - -/* 8.3 Extra top spacing for signatures and edited by */ - -DIV.postsignature, DIV.postmsg P.postedit {PADDING-TOP: 15px} - -/* 8.4 Spacing for code and quote boxes */ - -DIV.postmsg H4 {MARGIN-BOTTOM: 10px} -.pun BLOCKQUOTE, DIV.codebox {MARGIN: 5px 15px 15px 15px; PADDING: 8px} - -/* 8.5 Padding for the action links and online indicator in viewtopic */ - -DIV.postfootleft P, DIV.postfootright UL, DIV.postfootright DIV {PADDING: 10px 6px 5px 6px} - -/* 8.6 This is the input on moderators multi-delete view */ - -DIV.blockpost INPUT, DIV.blockpost LABEL { - PADDING: 3px; - DISPLAY: inline -} - -P.multidelete { - PADDING-TOP: 15px; - PADDING-BOTTOM: 5px -} - -/* 8.7 Make sure paragraphs in posts don't get any padding */ - -DIV.postmsg P {PADDING: 0} - -/****************************************************************/ -/* 9. SPECIAL SPACING FOR FORMS */ -/****************************************************************/ - -/* 9.1 Padding around fieldsets */ - -DIV.blockform FORM, DIV.fakeform {PADDING: 20px 20px 15px 20px} -DIV.inform {PADDING-BOTTOM: 12px} - -/* 9.2 Padding inside fieldsets */ - -.pun FIELDSET {PADDING: 0px 12px 0px 12px} -DIV.infldset {PADDING: 9px 0px 12px 0} -.pun LEGEND {PADDING: 0px 6px} - -/* 9.3 The information box at the top of the registration form and elsewhere */ - -DIV.forminfo { - MARGIN-BOTTOM: 12px; - PADDING: 9px 10px -} - -/* 9.4 BBCode help links in post forms */ - -UL.bblinks LI {PADDING-RIGHT: 20px} - -UL.bblinks {PADDING-BOTTOM: 10px; PADDING-LEFT: 4px} - -/* 9.5 Horizontal positioning for the submit button on forms */ - -DIV.blockform P INPUT {MARGIN-LEFT: 12px} - -/****************************************************************/ -/* 10. POST STATUS INDICATORS */ -/****************************************************************/ - -/* 10.1 These are the post status indicators which appear at the left of some tables. -.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and -.isticky = sticky topics. By default only .inew is different from the default.*/ - -DIV.icon { - FLOAT: left; - MARGIN-TOP: 0.1em; - MARGIN-LEFT: 0.2em; - DISPLAY: block; - BORDER-WIDTH: 0.6em 0.6em 0.6em 0.6em; - BORDER-STYLE: solid -} - -DIV.searchposts DIV.icon {MARGIN-LEFT: 0} - -/* 10.2 Class .tclcon is a div inside the first column of tables with post indicators. The -margin creates space for the post status indicator */ - -TD DIV.tclcon {MARGIN-LEFT: 2.3em} - - - - - - - - - - - diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Lithium/Lithium.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/style/Lithium/Lithium.css Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,3 @@ +/****************************************************************/ +/* PLACEHOLDER FILE - TO BE REPLACED SHORTLY */ +/****************************************************************/ \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Lithium/Lithium_cs.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/style/Lithium/Lithium_cs.css Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,3 @@ +/****************************************************************/ +/* PLACEHOLDER FILE - TO BE REPLACED SHORTLY */ +/****************************************************************/ \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Lithium/Lithium_fix.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/style/Lithium/Lithium_fix.css Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,3 @@ +/****************************************************************/ +/* PLACEHOLDER FILE - TO BE REPLACED SHORTLY */ +/****************************************************************/ \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Mercury.css --- a/punbb/style/Mercury.css Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,258 +0,0 @@ -/****************************************************************/ -/* 1. IMPORTED STYLESHEETS */ -/****************************************************************/ - -/* Import the basic setup styles */ -@import url(imports/base.css); -/* Import the colour scheme */ -@import url(imports/Mercury_cs.css); - -/****************************************************************/ -/* 2. TEXT SETTINGS */ -/****************************************************************/ - -/* 2.1 This sets the default Font Group */ - -.pun, .pun INPUT, .pun SELECT, .pun TEXTAREA, .pun OPTGROUP { - FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif -} - -.pun {FONT-SIZE: 11px; LINE-HEIGHT: normal} - -/* IEWin Font Size only - to allow IEWin to zoom. Do not remove comments \*/ -* HTML .pun {FONT-SIZE: 68.75%} -/* End IE Win Font Size */ - -/* Set font size for tables because IE requires it */ -.pun TABLE, .pun INPUT, .pun SELECT, .pun OPTGROUP, .pun TEXTAREA, DIV.postmsg P.postedit {FONT-SIZE: 1em} - -/* 2.2 Set the font-size for preformatted text i.e in code boxes */ - -.pun PRE {FONT-FAMILY: monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace} - -/* 2.3 Font size for headers */ - -.pun H2, .pun H4 {FONT-SIZE: 1em} -.pun H3 {FONT-SIZE: 1.1em} -#brdtitle H1 {FONT-SIZE: 1.4em} - -/* 2.4 Larger text for particular items */ -DIV.postmsg P {LINE-HEIGHT: 1.4} -DIV.postleft DT {FONT-SIZE: 1.1em} -.pun PRE {FONT-SIZE: 1.2em} - -/* 2.5 Bold text */ - -DIV.postleft DT, DIV.postmsg H4, TD.tcl H3, DIV.forminfo H3, P.postlink, DIV.linkst LI, -DIV.linksb LI, DIV.postlinksb LI, .blockmenu LI, #brdtitle H1, .pun SPAN.warntext, .pun P.warntext {FONT-WEIGHT: bold} - -/****************************************************************/ -/* 3. LINKS */ -/****************************************************************/ - -/* 3.1 Remove underlining for main menu, post header links, post links and vertical menus */ - -#brdmenu A:link, #brdmenu A:visited, .blockpost DT A:link, .blockpost DT A:visited, .blockpost H2 A:link, -.blockpost H2 A:visited, .postlink A:link, .postlink A:visited, .postfootright A:link, .postfootright A:visited, -.blockmenu A:link, .blockmenu A:visited { - TEXT-DECORATION: none -} - -/* 3.2 Underline on hover for links in headers and main menu */ - -#brdmenu A:hover, .blockpost H2 A:hover {TEXT-DECORATION: underline} - -/****************************************************************/ -/* 4. BORDER WIDTH AND STYLE */ -/****************************************************************/ - -/* 4.1 By default borders are 1px solid */ - -DIV.box, .pun TD, .pun TH, .pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL { - BORDER-STYLE: solid; - BORDER-WIDTH: 1px -} - -/* 4.2 Special settings for the board header. */ - -#brdheader DIV.box {BORDER-TOP-WIDTH: 4px} - -/* 4.3 Borders for table cells */ - -.pun TD, .pun TH { - BORDER-BOTTOM: none; - BORDER-RIGHT: none -} - -.pun .tcl {BORDER-LEFT: none} - -/* 4.4 Special setting for fieldsets to preserve IE defaults */ - -DIV>FIELDSET { - BORDER-STYLE: solid; - BORDER-WIDTH: 1px -} - -/****************************************************************/ -/* 5. VERTICAL AND PAGE SPACING */ -/****************************************************************/ - -/* 5.1 Page margins */ - -HTML, BODY {MARGIN: 0; PADDING: 0} -#punwrap {margin:12px 20px} - -/* 5.2 Creates vertical space between main board elements (Margins) */ - -DIV.blocktable, DIV.block, DIV.blockform, DIV.block2col, #postreview {MARGIN-BOTTOM: 12px} -#punindex DIV.blocktable, DIV.blockpost {MARGIN-BOTTOM: 6px} -DIV.block2col DIV.blockform, DIV.block2col DIV.block {MARGIN-BOTTOM: 0px} - -/* 5.3 Remove space above breadcrumbs, postlinks and pagelinks with a negative top margin */ - -DIV.linkst, DIV.linksb {MARGIN-TOP: -12px} -DIV.postlinksb {MARGIN-TOP: -6px} - -/* 5.4 Put a 12px gap above the board information box in index because the category tables only -have a 6px space beneath them */ - -#brdstats {MARGIN-TOP: 12px} - -/****************************************************************/ -/* 6. SPACING AROUND CONTENT */ -/****************************************************************/ - -/* 6.1 Default padding for main items */ - -DIV.block DIV.inbox, DIV.blockmenu DIV.inbox {PADDING: 3px 6px} -.pun P, .pun UL, .pun DL, DIV.blockmenu LI, .pun LABEL, #announce DIV.inbox DIV {PADDING: 3px 0} -.pun H2 {PADDING: 4px 6px} - -/* 6.2 Special spacing for various elements */ - -.pun H1 {PADDING: 3px 0px 0px 0} -#brdtitle P {PADDING-TOP: 0px} -DIV.linkst {PADDING: 8px 6px 3px 6px} -DIV.linksb, DIV.postlinksb {PADDING: 3px 6px 8px 6px} -#brdwelcome, #brdfooter DL A, DIV.blockmenu LI, DIV.rbox INPUT {LINE-HEIGHT: 1.4em} -#viewprofile DT, #viewprofile DD {PADDING: 0 3px; LINE-HEIGHT: 2em} - -/* 6.4 Create some horizontal spacing for various elements */ - -#brdmenu LI, DIV.rbox INPUT, DIV.blockform P INPUT {MARGIN-RIGHT: 12px} - -/****************************************************************/ -/* 7. SPACING FOR TABLES */ -/****************************************************************/ - -.pun TH, .pun TD {PADDING: 4px 6px} -.pun TD P {PADDING: 5px 0 0 0} - -/****************************************************************/ -/* 8. SPACING FOR POSTS */ -/****************************************************************/ - -/* 8.1 Padding around left and right columns in viewtopic */ - -DIV.postleft DL, DIV.postright {PADDING: 6px} - -/* 8.2 Extra spacing for poster contact details and avatar */ - -DD.usercontacts, DD.postavatar {MARGIN-TOP: 5px} -DD.postavatar {MARGIN-BOTTOM: 5px} - -/* 8.3 Extra top spacing for signatures and edited by */ - -DIV.postsignature, DIV.postmsg P.postedit {PADDING-TOP: 15px} - -/* 8.4 Spacing for code and quote boxes */ - -DIV.postmsg H4 {MARGIN-BOTTOM: 10px} -.pun BLOCKQUOTE, DIV.codebox {MARGIN: 5px 15px 15px 15px; PADDING: 8px} - -/* 8.5 Padding for the action links and online indicator in viewtopic */ - -DIV.postfootleft P, DIV.postfootright UL, DIV.postfootright DIV {PADDING: 10px 6px 5px 6px} - -/* 8.6 This is the input on moderators multi-delete view */ - -DIV.blockpost INPUT, DIV.blockpost LABEL { - PADDING: 3px; - DISPLAY: inline -} - -P.multidelete { - PADDING-TOP: 15px; - PADDING-BOTTOM: 5px -} - -/* 8.7 Make sure paragraphs in posts don't get any padding */ - -DIV.postmsg P {PADDING: 0} - -/****************************************************************/ -/* 9. SPECIAL SPACING FOR FORMS */ -/****************************************************************/ - -/* 9.1 Padding around fieldsets */ - -DIV.blockform FORM, DIV.fakeform {PADDING: 20px 20px 15px 20px} -DIV.inform {PADDING-BOTTOM: 12px} - -/* 9.2 Padding inside fieldsets */ - -.pun FIELDSET {PADDING: 0px 12px 0px 12px} -DIV.infldset {PADDING: 9px 0px 12px 0} -.pun LEGEND {PADDING: 0px 6px} - -/* 9.3 The information box at the top of the registration form and elsewhere */ - -DIV.forminfo { - MARGIN-BOTTOM: 12px; - PADDING: 9px 10px -} - -/* 9.4 BBCode help links in post forms */ - -UL.bblinks LI {PADDING-RIGHT: 20px} - -UL.bblinks {PADDING-BOTTOM: 10px; PADDING-LEFT: 4px} - -/* 9.5 Horizontal positioning for the submit button on forms */ - -DIV.blockform P INPUT {MARGIN-LEFT: 12px} - -/****************************************************************/ -/* 10. POST STATUS INDICATORS */ -/****************************************************************/ - -/* 10.1 These are the post status indicators which appear at the left of some tables. -.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and -.isticky = sticky topics. By default only .inew is different from the default.*/ - -DIV.icon { - FLOAT: left; - MARGIN-TOP: 0.1em; - MARGIN-LEFT: 0.2em; - DISPLAY: block; - BORDER-WIDTH: 0.6em 0.6em 0.6em 0.6em; - BORDER-STYLE: solid -} - -DIV.searchposts DIV.icon {MARGIN-LEFT: 0} - -/* 10.2 Class .tclcon is a div inside the first column of tables with post indicators. The -margin creates space for the post status indicator */ - -TD DIV.tclcon {MARGIN-LEFT: 2.3em} - - - - - - - - - - - diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Mercury/Mercury.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/style/Mercury/Mercury.css Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,3 @@ +/****************************************************************/ +/* PLACEHOLDER FILE - TO BE REPLACED SHORTLY */ +/****************************************************************/ \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Mercury/Mercury_cs.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/style/Mercury/Mercury_cs.css Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,3 @@ +/****************************************************************/ +/* PLACEHOLDER FILE - TO BE REPLACED SHORTLY */ +/****************************************************************/ \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Mercury/Mercury_fix.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/style/Mercury/Mercury_fix.css Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,3 @@ +/****************************************************************/ +/* PLACEHOLDER FILE - TO BE REPLACED SHORTLY */ +/****************************************************************/ \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Oxygen.css --- a/punbb/style/Oxygen.css Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,258 +0,0 @@ -/****************************************************************/ -/* 1. IMPORTED STYLESHEETS */ -/****************************************************************/ - -/* Import the basic setup styles */ -@import url(imports/base.css); -/* Import the colour scheme */ -@import url(imports/Oxygen_cs.css); - -/****************************************************************/ -/* 2. TEXT SETTINGS */ -/****************************************************************/ - -/* 2.1 This sets the default Font Group */ - -.pun, .pun INPUT, .pun SELECT, .pun TEXTAREA, .pun OPTGROUP { - FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif -} - -.pun {FONT-SIZE: 11px; LINE-HEIGHT: normal} - -/* IEWin Font Size only - to allow IEWin to zoom. Do not remove comments \*/ -* HTML .pun {FONT-SIZE: 68.75%} -/* End IE Win Font Size */ - -/* Set font size for tables because IE requires it */ -.pun TABLE, .pun INPUT, .pun SELECT, .pun OPTGROUP, .pun TEXTAREA, DIV.postmsg P.postedit {FONT-SIZE: 1em} - -/* 2.2 Set the font-size for preformatted text i.e in code boxes */ - -.pun PRE {FONT-FAMILY: monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace} - -/* 2.3 Font size for headers */ - -.pun H2, .pun H4 {FONT-SIZE: 1em} -.pun H3 {FONT-SIZE: 1.1em} -#brdtitle H1 {FONT-SIZE: 1.4em} - -/* 2.4 Larger text for particular items */ - DIV.postmsg P {LINE-HEIGHT: 1.4} -DIV.postleft DT {FONT-SIZE: 1.1em} -.pun PRE {FONT-SIZE: 1.2em} - -/* 2.5 Bold text */ - -DIV.postleft DT, DIV.postmsg H4, TD.tcl H3, DIV.forminfo H3, P.postlink, DIV.linkst LI, -DIV.linksb LI, DIV.postlinksb LI, .blockmenu LI, #brdtitle H1, .pun SPAN.warntext, .pun P.warntext {FONT-WEIGHT: bold} - -/****************************************************************/ -/* 3. LINKS */ -/****************************************************************/ - -/* 3.1 Remove underlining for main menu, post header links, post links and vertical menus */ - -#brdmenu A:link, #brdmenu A:visited, .blockpost DT A:link, .blockpost DT A:visited, .blockpost H2 A:link, -.blockpost H2 A:visited, .postlink A:link, .postlink A:visited, .postfootright A:link, .postfootright A:visited, -.blockmenu A:link, .blockmenu A:visited { - TEXT-DECORATION: none -} - -/* 3.2 Underline on hover for links in headers and main menu */ - -#brdmenu A:hover, .blockpost H2 A:hover {TEXT-DECORATION: underline} - -/****************************************************************/ -/* 4. BORDER WIDTH AND STYLE */ -/****************************************************************/ - -/* 4.1 By default borders are 1px solid */ - -DIV.box, .pun TD, .pun TH, .pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL { - BORDER-STYLE: solid; - BORDER-WIDTH: 1px -} - -/* 4.2 Special settings for the board header. */ - -#brdheader DIV.box {BORDER-TOP-WIDTH: 4px} - -/* 4.3 Borders for table cells */ - -.pun TD, .pun TH { - BORDER-BOTTOM: none; - BORDER-RIGHT: none -} - -.pun .tcl {BORDER-LEFT: none} - -/* 4.4 Special setting for fieldsets to preserve IE defaults */ - -DIV>FIELDSET { - BORDER-STYLE: solid; - BORDER-WIDTH: 1px -} - -/****************************************************************/ -/* 5. VERTICAL AND PAGE SPACING */ -/****************************************************************/ - -/* 5.1 Page margins */ - -HTML, BODY {MARGIN: 0; PADDING: 0} -#punwrap {margin:12px 20px} - -/* 5.2 Creates vertical space between main board elements (Margins) */ - -DIV.blocktable, DIV.block, DIV.blockform, DIV.block2col, #postreview {MARGIN-BOTTOM: 12px} -#punindex DIV.blocktable, DIV.blockpost {MARGIN-BOTTOM: 6px} -DIV.block2col DIV.blockform, DIV.block2col DIV.block {MARGIN-BOTTOM: 0px} - -/* 5.3 Remove space above breadcrumbs, postlinks and pagelinks with a negative top margin */ - -DIV.linkst, DIV.linksb {MARGIN-TOP: -12px} -DIV.postlinksb {MARGIN-TOP: -6px} - -/* 5.4 Put a 12px gap above the board information box in index because the category tables only -have a 6px space beneath them */ - -#brdstats {MARGIN-TOP: 12px} - -/****************************************************************/ -/* 6. SPACING AROUND CONTENT */ -/****************************************************************/ - -/* 6.1 Default padding for main items */ - -DIV.block DIV.inbox, DIV.blockmenu DIV.inbox {PADDING: 3px 6px} -.pun P, .pun UL, .pun DL, DIV.blockmenu LI, .pun LABEL, #announce DIV.inbox DIV {PADDING: 3px 0} -.pun H2 {PADDING: 4px 6px} - -/* 6.2 Special spacing for various elements */ - -.pun H1 {PADDING: 3px 0px 0px 0} -#brdtitle P {PADDING-TOP: 0px} -DIV.linkst {PADDING: 8px 6px 3px 6px} -DIV.linksb, DIV.postlinksb {PADDING: 3px 6px 8px 6px} -#brdwelcome, #brdfooter DL A, DIV.blockmenu LI, DIV.rbox INPUT {LINE-HEIGHT: 1.4em} -#viewprofile DT, #viewprofile DD {PADDING: 0 3px; LINE-HEIGHT: 2em} - -/* 6.4 Create some horizontal spacing for various elements */ - -#brdmenu LI, DIV.rbox INPUT, DIV.blockform P INPUT {MARGIN-RIGHT: 12px} - -/****************************************************************/ -/* 7. SPACING FOR TABLES */ -/****************************************************************/ - -.pun TH, .pun TD {PADDING: 4px 6px} -.pun TD P {PADDING: 5px 0 0 0} - -/****************************************************************/ -/* 8. SPACING FOR POSTS */ -/****************************************************************/ - -/* 8.1 Padding around left and right columns in viewtopic */ - -DIV.postleft DL, DIV.postright {PADDING: 6px} - -/* 8.2 Extra spacing for poster contact details and avatar */ - -DD.usercontacts, DD.postavatar {MARGIN-TOP: 5px} -DD.postavatar {MARGIN-BOTTOM: 5px} - -/* 8.3 Extra top spacing for signatures and edited by */ - -DIV.postsignature, DIV.postmsg P.postedit {PADDING-TOP: 15px} - -/* 8.4 Spacing for code and quote boxes */ - -DIV.postmsg H4 {MARGIN-BOTTOM: 10px} -.pun BLOCKQUOTE, DIV.codebox {MARGIN: 5px 15px 15px 15px; PADDING: 8px} - -/* 8.5 Padding for the action links and online indicator in viewtopic */ - -DIV.postfootleft P, DIV.postfootright UL, DIV.postfootright DIV {PADDING: 10px 6px 5px 6px} - -/* 8.6 This is the input on moderators multi-delete view */ - -DIV.blockpost INPUT, DIV.blockpost LABEL { - PADDING: 3px; - DISPLAY: inline -} - -P.multidelete { - PADDING-TOP: 15px; - PADDING-BOTTOM: 5px -} - -/* 8.7 Make sure paragraphs in posts don't get any padding */ - -DIV.postmsg P {PADDING: 0} - -/****************************************************************/ -/* 9. SPECIAL SPACING FOR FORMS */ -/****************************************************************/ - -/* 9.1 Padding around fieldsets */ - -DIV.blockform FORM, DIV.fakeform {PADDING: 20px 20px 15px 20px} -DIV.inform {PADDING-BOTTOM: 12px} - -/* 9.2 Padding inside fieldsets */ - -.pun FIELDSET {PADDING: 0px 12px 0px 12px} -DIV.infldset {PADDING: 9px 0px 12px 0} -.pun LEGEND {PADDING: 0px 6px} - -/* 9.3 The information box at the top of the registration form and elsewhere */ - -DIV.forminfo { - MARGIN-BOTTOM: 12px; - PADDING: 9px 10px -} - -/* 9.4 BBCode help links in post forms */ - -UL.bblinks LI {PADDING-RIGHT: 20px} - -UL.bblinks {PADDING-BOTTOM: 10px; PADDING-LEFT: 4px} - -/* 9.5 Horizontal positioning for the submit button on forms */ - -DIV.blockform P INPUT {MARGIN-LEFT: 12px} - -/****************************************************************/ -/* 10. POST STATUS INDICATORS */ -/****************************************************************/ - -/* 10.1 These are the post status indicators which appear at the left of some tables. -.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and -.isticky = sticky topics. By default only .inew is different from the default.*/ - -DIV.icon { - FLOAT: left; - MARGIN-TOP: 0.1em; - MARGIN-LEFT: 0.2em; - DISPLAY: block; - BORDER-WIDTH: 0.6em 0.6em 0.6em 0.6em; - BORDER-STYLE: solid -} - -DIV.searchposts DIV.icon {MARGIN-LEFT: 0} - -/* 10.2 Class .tclcon is a div inside the first column of tables with post indicators. The -margin creates space for the post status indicator */ - -TD DIV.tclcon {MARGIN-LEFT: 2.3em} - - - - - - - - - - - diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Oxygen/Oxygen.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/style/Oxygen/Oxygen.css Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,1628 @@ +/************************************************************* +A - SETUP +**************************************************************/ + +/* Start from scratch +-------------------------------------------------------------*/ + +html, body, /* Remove this line if integrating */ +.pun div, .pun p, .pun h1, .pun h2, .pun h3, .pun h4, .pun h5, .pun h6, +.pun blockquote, .pun pre, .pun code, .pun samp, +.pun abbr, .pun acronym, .pun address, .pun small, .pun cite, +.pun span, .pun em, .pun img, .pun strong, +.pun dl, .pun dt, .pun dd, .pun ol, .pun ul, .pun li, +.pun form, .pun fieldset, .pun label, .pun legend, +.pun table, .pun caption, .pun tbody, .pun tfoot, .pun thead, +.pun tr, .pun th, .pun td { + margin: 0; + padding: 0; + font-size: 100%; + vertical-align: baseline; + font-weight: normal; + font-style: normal; + } + +.pun fieldset, .pun img, .pun cite { + border: none; + } + +.pun ol, .pun ul { + list-style: none; + } + +.pun table { + width: 100%; + table-layout: fixed; + empty-cells: show; + border-spacing: 0; + } + +.pun td { + overflow: hidden; + vertical-align: middle; + } + +.pun span.submit input, +.pun span.cancel input { + overflow: visible; + padding-left: 0.5em; + padding-right: 0.5em; + padding-bottom: 2px; + } + +.pun a { + cursor: pointer; + text-decoration: underline; + } + +.pun div.divider, .pun fieldset br { + display: none; + } + + +/* Text Setup +-------------------------------------------------------------*/ + +.pun { /* Needs modifying if body has non default font-size */ + font: 75%/130% Verdana, Arial, Helvetica, sans-serif; + } + +.pun samp, .pun code, .pun pre, .pun option, .pun optgroup { + font-size: 1em; + font-family: Verdana, Arial, sans-serif; + font-style: normal; + } + +.pun input, .pun select, .pun textarea { + font-size: 1.1em; + font-family: Verdana, Arial, sans-serif; + } + +.pun code { + font-size: 1.1em; + line-height: 140%; + font-family: 'andale mono', 'lucida console', monospace + } + +.frm .frm-info li span strong, +.pun .important strong, +.pun .warn strong { + font-weight: bold; + } + +/************************************************************* +B - FLOAT CLEARING AND HIDDEN STUFF +**************************************************************/ + +/* Clear Me +-------------------------------------------------------------*/ + +.pun-page:after, +#pun-visit:after, +#pun-about:after, +#pun-info #stats:after, +#pun-info #onlinelist:after, +.main .paged-head:after, +.main .paged-foot:after, +.main .main-head:after, +.main .main-foot:after, +.sectioned .main-nav:after, +.frm .frm-set div:after, +.frm .link:after, +.frm .frm-group:after, +.user .user-info li.status:after, +.frm .profile:after, +.main .topic .post .postbody:after, +.main .topic .post .postfoot:after { + content: ""; + display: block; + font-size: 0; + height: 0; + line-height: 0.0; + overflow:hidden; + visibility: hidden; + clear: both; + } + +/* Hide Me +-------------------------------------------------------------*/ + +.main h1, +#pun-info .main-head, +#pun-info #stats h3, +#qjump legend, +.crumbs span span, +.crumbs strong span, +.main table .tcmod label span, +.main .main-head h2 span span, +.main .main-foot .h2 strong span, +.frm .frm-legend, +.frm .frm-legend span, +.frm .frm-info h3, +.frm .frm-warn, +.user .user-info .status strong, +.user .user-info .title strong, +.frm .profile h3, +.pun a span span, +.main .post h3 cite, +.main .post .posthead .post-select span, +.main .post .post-entry h4, +.frm .twin .twin2 .fld-label, +.pun .frm .frm-group .nodefault span.noshow, +.main .parted .frm-head { + font-size: 0; + left: -9999px; + text-indent: -9999px; + position:absolute; + line-height: 0em; + } + + +/************************************************************* +C - PAGE LAYOUT and COMMON ELEMENTS +**************************************************************/ + +/* Page Layout +-------------------------------------------------------------*/ + +.pun-page { + width: 95%; + margin: 0 auto; + padding: 20px 0; + } + +#pun-redirect, #pun-maint, #pun-util { + margin: 50px auto 12px auto; + width: 60%; + } + +.pun { /* Confines clearing behaviour within forum wrapper */ + float: left; + width: 100%; + position: relative; + } + + +/* Skip Link +-------------------------------------------------------------*/ + +#pun-access { + text-align: right; + padding: 0; + height: 0; + margin: 0; + position: absolute; + background: transparent; + } + +#pun-access a, #pun-access a:link, #pun-access a:visited { + height: 2em; + padding: 0 1.3em; + line-height: 2em; + position: absolute; + left: -999em; + margin: 1px; + width: 12em; + } + +#pun-access a:hover, #pun-access a:active, #pun-access a:focus { + text-indent: 0; + background: #000; + position: static; + float: right; + } + + +/* Board Title and Description +-------------------------------------------------------------*/ + +#pun-title { + padding: 1.3em 1.3em 0.3em 1.3em; + white-space: nowrap; + } + +#pun-title strong { + font-size: 1.5em; + } + +#pun-desc { + padding: 0 1.3em 1em 1.3em; + } + + +/* Main Menu +-------------------------------------------------------------*/ + +#pun-navlinks ul { + padding: 0.7em 1.3em; + } + +#pun-navlinks ul li { + display: inline; + margin-right: 0.8em; + font-size: 1.2em; + } + + +/* Welcome Box +-------------------------------------------------------------*/ + +#pun-visit { + border-style: none solid solid solid; + border-width: 1px; + padding: 0.8em 1.3em 0.8em 1.3em; + margin: 0 0 1em 0; + } + +#pun-visit ul { + float: right; + } + +#pun-visit ul li { + display: inline; + margin-left: 0.7em; + } + +#pun-visit p span, #pun-visit ul li a { + white-space: nowrap; + } + +#pun-visit p strong, +#pun-visit ul li strong { + font-weight: bold; + } + + +/* Alert Box +-------------------------------------------------------------*/ + +#pun-alert { + border-style: solid; + border-width: 1px; + margin: 0 0 1em 0; + } + +#pun-alert h1 { + padding: 0.6em 0; + margin: 0 1.3em 0.6em 1.3em; + border-bottom-style: dashed; + border-bottom-width: 1px; + } + +#pun-alert h1 strong { + font-size: 1.1em; + } + +#pun-alert p { + padding: 0.2em 0 0.8em 0; + margin: 0 1.3em; + } + +#pun-alert p strong { + display: block; + padding-bottom: 0.2em; + font-weight: bold; + } + + +/* Statistics +-------------------------------------------------------------*/ + + #stats ul { + padding: 0.6em 1.3em; + } + + #stats ul li.st-users { + float: left; + clear: both; + white-space: nowrap; + line-height: 150%; + } + + #stats ul li.st-activity { + text-align: right; + display: block; + white-space: nowrap; + line-height: 150%; + } + +#stats ul li strong { + font-weight: bold; + } + +#onlinelist { + border-top-style: dashed; + border-top-width: 1px; + line-height: 150%; + padding: 0.6em 1.3em; + } + +#onlinelist h3 { + float: left; + margin: 0 0.5em 0 0; + } + +#onlinelist h3 strong { + font-weight: bold; + } + + +/* About Box (Footer / Copyright / Jump Menu) and Home Link +-------------------------------------------------------------*/ + +#pun-about { + border-style: solid; + border-width: 1px; + margin: 0 0 1em 0; + padding: 0.6em 1.3em; + } + +#pun-about p { + text-align: right; + } + +#pun-about #qjump { + float: left; + width: 40%; + } + +#pun-about #qjump label { + font-weight: bold; + display: block; + } + +#pun-home { + font-weight: normal; + float:right; + padding: 0.4em 1.3em 0 0; + } + +/* Announcements +-------------------------------------------------------------*/ + +#pun-announcement .userbox { + margin: 0 0 1em 0; + padding-bottom: 1em; + } + +#pun-announcement .msg-head { + font-size: 1.2em; + padding-bottom: 0.5em; + margin-bottom: 0.5em; + border-bottom-style: dashed; + border-bottom-width: 1px; + font-size: 1.1em; + font-weight: bold; + } + + +/************************************************************* +D - MAIN CONTENT COMMON ELEMENTS +**************************************************************/ + +/* Common Styling +-------------------------------------------------------------*/ + +.main .main-content, .paged .paged-foot { + margin-bottom: 1em; + } + +.paged .main-content { + margin-bottom: 0; + } + +.main .main-content { + border-style: solid; + border-width: 1px; + } + + + +/* Breadcrumbs +-------------------------------------------------------------*/ + +#pun-crumbs-head, +#pun-crumbs-foot { + padding: 0 1.3em; + margin: 0 0 1em 0; + } + +#pun-crumbs-head .crumb, +#pun-crumbs-foot .crumb { + padding-left: 1.5em; + padding-right: 0.5em; + background-image: url(crumb.png); + background-repeat: no-repeat; + background-position: 0; + white-space: nowrap; + } + +#pun-crumbs-head .crumbfirst, +#pun-crumbs-foot .crumbfirst { + background-image: none; + padding-left: 0; + } + +#pun-crumbs-head .crumblast, +#pun-crumbs-foot .crumblast { + font-weight: bold; + } + + +/* Paging and Posting +-------------------------------------------------------------*/ + +.main .paged-head, +.main .paged-foot { + border-style: solid; + border-width: 1px; + padding: 0 1.3em; + min-height: 2.6em; + } + +.main .paged-head .paging, +.main .paged-foot .paging { + float: left; + font-size: 1.1em; + padding: 0.6em 0; + } + +.main .paged-head .posting, +.main .paged-foot .posting { + float: right; + font-size: 1.1em; + padding: 0.6em 0; + } + +.main .paged-head .posting span, +.main .paged-head .paging strong, +.main .paged-foot .posting span, +.main .paged-foot .paging strong { + font-weight: bold; + } + +.main .paged-foot .submitting { + float: right; + padding: 0.3em 0 0.3em 0; + } + +.main .submitting { + text-align: right; + } + +.main .paged-foot .submitting span { + margin-left: 0.8em; + } + + +/* Main Headers and Footers +-------------------------------------------------------------*/ + +.main .main-head, +.main .main-foot { + padding: 0.7em 1.3em; + min-height: 1.3em; + } + +#pun-install .main-head { + padding-left: 1.7em; + } + +.main .main-head h1 { + position: static; + font-size: 1em; + line-height: 1.3em; + text-indent: 0; + } + +.main .main-head h1, +.main .main-head h2, +.main .main-foot .h2 { + float: left; + padding: 0 1px; + } + +.main .main-head h1 span, +.main .main-head h2 span, +.main .main-foot .h2 strong { + font-size: 1.1em; + } + +.main .main-head .main-options, +.main .main-foot .main-options, +.admin .main-head h2, +.admin .main-head h1 { + float: right; + padding: 0 1px; + } + +.main .main-head .main-options a.feed-option { + margin-left: 0.5em; + } + +.main .main-foot .main-options a.mod-option, +.main .main-foot .main-options a.user-option { + margin-left: 0.8em; + } + +.main .main-head .main-options a.feed-option, +.main .main-head .main-options a.feed-option:link, +.main .main-head .main-options a.feed-option:visited { + padding-left: 22px; + background-repeat: no-repeat; + background-position: left; + background-image: url(feed.png); + } + +.main .main-head a.exthelp, +.main-head a.exthelp:link, +.main .main-head a.exthelp:visited { + padding-left: 20px; + background-repeat: no-repeat; + background-position: left; + background-image: url(helpdark.png); + } + +.main .frm-head { + padding: 0.5em 1.7em; + border-style: solid none solid none; + border-width: 1px; + background: #f1f1f1 !important; + border-bottom-color: #bbb !important; + } + +.main .frm-head span, .main .frm-part h3 span { + font-size: 1.1em; + } + +/* Tabbed Navigation (General +-------------------------------------------------------------*/ + +.main .main-nav { + min-width: 50em; + } + +.main .main-nav * { + white-space: nowrap; + } + +.main .main-nav ul { + padding: 0 1.9em; + } + +.main .main-nav ul li { + display: inline; + float:left; + padding: 0 5px 0 0; + } + +.main .main-nav ul li a, +.main .main-nav ul li a:link, +.main .main-nav ul li a:visited { + border-style: solid solid none solid; + border-width: 1px; + float: left; + padding: 0; + } + +.main .main-nav ul li a span, +.main .main-nav ul li a:link span, +.main .main-nav ul li a:visited span { + height: 2.2em; + line-height: 2.2em; + padding: 0 1em; + background:transparent; + float: left; + border-top-style: solid; + border-top-width: 1px; + } + + +/* Tabbed Navigation (with submenu) +-------------------------------------------------------------*/ +.main .submenu { + position: relative; + } + +.main .submenu ul li.topactive ul { + background: transparent; + border: none; + height: 2.5em; + left: 0; + line-height: 2.5em; + margin: 0; + padding: 0 1.7em; + position: absolute; + top: 2.5em; + } + +.main .submenu ul li.topactive ul li a, +.main .submenu ul li.topactive ul li a:link, +.main .submenu ul li.topactive ul li a:visited { + margin-right: 0.8em; + border: none; + padding: 0; + } + +/************************************************************* +E - MAIN TABLES ( Index / Forums / Userlist ) +**************************************************************/ + +/* Table Cells Widths and Alignment +-------------------------------------------------------------*/ + +.main table .tcl { + width: 50%; + text-align: left; + } + +.main table .tc2, +.main table .tc3, +.main table .tcmod { + width: 10%; + text-align: center; + } + +.main table .tcr { + width: 30%; + text-align: left; + } + +#pun-userlist table .tcl, +#pun-searchtopics table .tcl { + width: 40% + } + +#pun-userlist table .tc2, +#pun-searchtopics table .tc2 { + width: 20%; + text-align: left; + } + +#pun-debug table .tcl { + white-space:normal; + width: 15%; + } + +#pun-debug table .tcr { + white-space: normal; + width: 90%; + } + +#pun-admin-users table .tcl { + width: 35%; + line-height: 1.4em; + } + + +#pun-admin-users table .tc2 { + width: 20%; + } + +#pun-admin-users table .tc3 { + width: 10%; + } + +#pun-admin-users table .tcr { + width: 20%; + } + +#pun-admin-users table .actions { + width: 15%; + } + +#pun-admin-users td.tcl span { + display: block; + } + +#pun-admin-users td.tcl strong { + font-weight: bold; + } + + +/* Table Cell Styling +-------------------------------------------------------------*/ + +.main table .tcl h3 span { + font-size: 1.1em; + font-weight: bold; + } + +.main table .tcl span.topic-nav, +.main table .tcl span.topic-nav *, +.main table .tcr a { + white-space: nowrap; + } + +.main table .tcl .modlist { + display: block; + padding-top: 0.3em + } + +.main table td { + padding: 0.6em 1.3em 0.7em 1.3em; + border-width: 1px; + border-style: solid none none solid; + line-height: 130%; + } + +.main table td.tcl { + border-left-style: none; + border-left-width: 0 + } + +.main table th { + padding: 0.5em 1.3em; + border-style: none; + } + +.main table tbody.statused td.tcl { + padding-left: 3.4em; + } + +.main table tbody.statused span.status { + margin-left: -2.4em; + position: absolute; + } + +.main table .tcl img { + border-style: solid; + border-width: 0.6em; + display: inline; + height: 0; + width: 0; + float: left; + margin-right: 0.4em; + margin-top: 0.1em; + } + +#pun-index .main table .tcl img { + border-width: 0.7em; + } + +#pun-index .main table .tcr .byuser { + display: block; + } + +.main table td.actions, .main table th.actions { + text-align: right; + } + +.main table td.actions span { + display: block; + } + +/************************************************************* +E - MAIN FORMS +**************************************************************/ + +/* General Styling +-------------------------------------------------------------*/ + +.frm .frm-form { + margin: 1.7em 1.7em 0.7em 1.7em; + } + +.frm .frm-set { + border-top-style: dashed; + border-top-width: 1px; + padding: 1.3em 0 0.5em 0; + } + +.frm .set1 { + border-top-style: none; + padding-top: 0; + } + +.frm .frm-buttons { + padding: 0.8em 0 0.3em 15.6em; + border-top-style: double; + border-top-width: 3px; + margin-top: 0.5em; + } + +.frm .frm-buttons span { + margin-right: 1em; + } + +.frm .frm-fld span.submit { + clear: left; + display: block; + padding-top: 0.3em; + } + +.frm table { + border-style: solid; + border-width: 1px; + margin-bottom: 1em; + } + +/* Text, Select. Link Field and Textarea +-------------------------------------------------------------*/ + +.main form .frm-fld { + padding: 0 0 0.7em 0; + margin: 0 0 0 15.6em; + position: relative; + line-height: 1.3em; + } + +.main form .frm-fld .fld-label { + float: left; + width: 14.6em; + position: relative; + margin-left: -15.6em; + text-align: right; + font-weight: bold; + padding: 3px 1em 2px 0; + } + +.main form .link .fld-label { + padding: 0 1em 0 0; + } + +.admin .frm form fieldset .link .fld-input { + float: left; + } + +.main form .frm-fld .fld-input, +.main form .frm-fld .fld-input input, +.main form .frm-fld .fld-input select { + float: left; + } + +.main form .frm-fld .fld-input { + padding-right: 0.5em; + } + +.main form .frm-fld label span.fld-help, +.main form .frm-fld label span.fld-extra { + float: left; + width: 98%; + display: block; + font-size: 0.9em; + margin-left: -2px; + position: relative; + } + +.main form .textarea label span.fld-help { + width: 86%; + } + +.main form .frm-fld label span.fld-extra { + display: inline; + width: auto; + margin: 0; + padding-top: 3px; + } + +.main form .frm-fld label small.extra { + font-size: 1em; + } + +.main form .frm-fld .fld-label a { + margin-left: 0.5em; + } + +.main form .frm-fld .fld-label a span { + font-weight: bold; + } + +.main form .textarea .fld-input, +.main form .longtext .fld-input { + width: 84%; + padding-right: 0.8em; + } + +.main form .textarea textarea, +.main form .longtext input { + width: 100%; + } + +.main form .frm-fld em.req-text { + float: left; + padding-top: 2px; + } + + .main .frm .frm-part { + margin: 0 -1.7em; + padding: 0 1.7em; + border-top: 1px solid #ddd; + margin-top: 1em; + } + + .main .frm .frm-part h3 { + margin-top: 0; + background: #f1f1f1; + margin: 1em -1.7em; + margin-top: 0; + margin-bottom: 1.3em; + padding: 0.5em 1.7em; + border-top: 1px solid #fff; + border-bottom: 1px solid #bbb; + } + + .main .frm .part1 { + margin-top: -1.7em; + border-top: none; + } + + .main .frm .frm-part h3 * { + color: #113C5E; + } + + /* Checkboxes and Radio Buttons +-------------------------------------------------------------*/ + +.main form .frm-group { + padding: 0 0 0.7em 0; + position: relative; + } + +.main form .radbox { + margin: 0 0 0 15.6em; + padding: 3px 0 0.3em 23px; + line-height: 1.3em; + position: relative; + } + +.main form .checkbox { + padding-bottom: 1em; + } + +.main form .radbox input { + float: left; + position: relative; + left: -20px; + top: 0.65em; + margin: -7px -13px 0 0; + min-width: 13px; + min-height: 13px; + } + +.main form .checkbox .fld-label { + float: left; + width: 14.6em; + text-align: right; + position: relative; + left: -23px; + padding: 0; + margin-left: -15.6em; + font-weight: bold; + } + +.main form .frm-yesno label, +.main form .frm-choice label { + float: left; + } + +.main form .frm-yesno label { + width: 8em; + } + +.main form .frm-choice label { + width: 11em; + } + +.main form .frm-group legend span { + position: absolute; + left: 0; + width: 14.6em; + text-align: right; + padding-top: 3px; + font-weight: bold; + } + + + /* Form Information Boxes +-------------------------------------------------------------*/ + +.frm .frm-info, +.frm .frm-error, +.frm .req-warn { + margin: 1.7em; + padding: 1em 1em 0.3em 1em; + border-style: solid; + border-width: 1px; + } + +.frm .frm-form .frm-info { + margin: 0.7em 0 1.7em 0; + } + +.frm .frm-info p, +.frm .frm-error .warn, +.frm .frm-error .important { + padding: 0 0 0.8em 0; + } + +.frm .frm-info ul { + padding: 0 0 0.2em 1em; + margin: 0 0 0 8px; + } + +.frm .frm-info li, +.frm .frm-error li { + padding: 0 0 0.7em 0.5em; + list-style-type: square; + line-height: normal; + } + +#pun-main .frm .actions a, #pun-main .frm .actions a * { + font-weight: bold; + } + +.frm .frm-info .actions { + padding-left: 2em; + } + +.frm .actions a { + margin-right: 0.7em; + white-space: nowrap; + } + +#pun-search .frm .frm-info .actions { + background: url('searchicon.png') no-repeat top left; + padding-left: 2.2em; + } + +.frm .frm-error ul { + margin-top: 0; + margin-bottom: 0; + padding-left: 0; + margin-left: 1.6em; + } + +.frm .frm-error li { + line-height: 1.5em; + } + +.main form .item-select { + position: relative; + float: right; + margin-top: -2.8em; + z-index: 100; + padding-bottom: 0; + } + +.main form div.item-select * { + font-weight: bold; + } + +.main form div.item-select .fld-label { + font-weight: normal; + } + + + /* Data Boxes +-------------------------------------------------------------*/ + +.main .frm-form .databox { + margin: 1.7em 0; + } + +.main .databox { + margin: 1.7em; + padding: 1em 1em 0.3em 1em; + border-style: solid; + border-width: 1px; + overflow: hidden; + } + +.main .databox p, +.main .databox ul { + padding-bottom: 0.8em; + overflow: hidden; + } + +.main .databox .legend { + padding-bottom: 0.5em; + border-bottom-style: dashed; + border-bottom-width: 1px; + margin-bottom: 0.7em; + } + +.main .databox .legend span, +.main .databox .term span { + font-weight: bold; + } + +.main .databox .legend strong { + float: right; + font-weight: bold; + } + +.main .databox .note { + font-weight: bold; + padding-bottom: 0.3em; + } + + /* Multiple Data Boxes (Data Sets) +-------------------------------------------------------------*/ + + +.main .dataset { + margin: 1.7em; + border-style: solid solid solid solid; + border-width: 1px; + } + +.main .frm-form .dataset { + margin: 1.7em 0; + } + +.main .dataset .databox { + margin: 0; + border-style: dashed none none none; + padding: 0.8em 1em 0 1em; + } + +.main .dataset .db1 { + border: none; + } + +.main .dataset .databox .legend { + padding: 0; + margin: 0; + border: none; + } + + /* Multiple Data Boxes with Grid layout (Data Grids) +-------------------------------------------------------------*/ + +.main .datagrid { + margin: 1.7em; + border-style: solid solid solid solid; + border-width: 1px; + } + +.main .datagrid .databox { + margin: 0; + padding: 0; + width: 100%; + position: relative; + border-style: dashed none none none; + } + +.main .datagrid .db1 { + border: none; + } + +.main .datagrid .databox .data { + padding: 0.8em 1em 0.8em 1em; + margin: 0 0 0 16em; + border-left-style: dashed; + border-left-width: 1px; + } + +.main .datagrid .legend { + position: absolute; + padding: 0.8em 1em 0 1em; + margin: 0; + border: none; + left: 0; + top: 0; + } + +/************************************************************* +F - USER PROFILES +**************************************************************/ + + /* User Identity (Profile and Viewtopic) +-------------------------------------------------------------*/ + +.user .user-ident { + position: relative; + padding-top: 1.6em; + white-space: normal; + } + +.user .user-ident img { + display: block; + margin-bottom: 0.3em; + } + +.user .user-ident .username { + font-size: 1.2em; + font-weight: bold; + display: block; + position: absolute; + top: 0; + margin: 0; + line-height:1.2em; + } + +.user .user-ident a { + text-decoration: none; + } + +.user .user-info li { + padding-bottom: 0.2em; + line-height: 1.3em; + } + +.user .user-info .status, +.user .user-info .title { + padding-bottom: 0.8em; + } + +.user .user-info .title span { + font-weight: bold; + } + +.user .user-info .status span { + border-left-style: solid; + border-left-width: 0.7em; + float:left; + font-weight: normal; + height: 0.8em; + line-height: 0.8em; + padding-left: 0.4em; + position: relative; + font-style: normal; + } + + + /* Profile normal view and edit profile about page +-------------------------------------------------------------*/ + +.frm .profile { + margin: 1.7em; + padding: 1em 1em 0.3em 17em; + border-style: solid; + border-width: 1px; + } + +.frm .profile .user, +.frm .profile .user-data, +.frm .profile .user-actions { + float: left; + margin: 0; + padding-bottom: 1em; + padding-left: 4em; + display: inline; + } + +.frm .profile .user { + margin: 0 0 0 -16em; + padding-left: 0; + white-space: normal; + padding-bottom: 0; + overflow: hidden; + width: 16em; + } + +.frm .profile .username { + width: 14em; + overflow: hidden; + } + +.frm .profile .user-actions li, +.frm .profile .user-data li { + line-height: 1.4em; + padding-bottom: 0.8em; + list-style-position: outside; + list-style-type: disc; + white-space: nowrap; + } + +.frm .profile .user-actions li a { + font-weight: bold; + } + +.frm .sig-demo { + margin-left: 15.6em; + margin-right: 13%; + padding-top: 0.8em; + padding-bottom: 1em; + border-top: 1px dashed #ccc; + clear:left; + } + +.frm .profile .sig-demo { + margin-left: 3em; + } + +.frm .av-preview img { + float: right; + margin-left: 2em; + margin-bottom: 1em; + } + +/************************************************************* +G - TOPICS / POSTS +**************************************************************/ + +/* Parsed Content +-------------------------------------------------------------*/ + +.main .post-entry { + padding: 0.3em 1em 0 1em; + } + +.main .entry-content { + padding-bottom: 0.8em; + overflow: hidden; + width: 100% + } + +.main .sig-content { + padding-top: 0.8em + } + +.main .sig-content .sig-line { + border-top-style: solid; + border-top-width: 1px; + display: block; + padding-bottom: 0.5em; + width: 250px; + } + +.main .entry-content .quotebox, +.main .entry-content .codebox { + border-style: solid; + border-width: 1px; + margin: 0 1em 1em 1em; + padding: 1em 1em 0.3em 1em; + } + +.main .entry-content blockquote { + overflow: hidden; + width: 100%; + } + +.main .entry-content .quotebox cite { + display: block; + font-style: normal; + font-weight: bold; + margin-bottom: 0.8em; + } + +.main .entry-content .codebox strong { + display: block; + margin-bottom: 0.8em; + } + +.main .entry-content pre { + margin: 0; + max-height: 35em; + min-height: 2em; + overflow: auto; + padding: 0 2% 0.1em 0; + width: 98%; + } + +.main .entry-content em { + font-style: italic + } + +.main .entry-content em.bbuline { + font-style: normal; + text-decoration: underline; + } + +.main .entry-content p { + margin: 0 0 1em 0; + } + +.frm .post-entry { + margin: 1.7em; + border-style: solid; + border-width: 1px; + } + +/* Topic / Post Layout +-------------------------------------------------------------*/ + +.main .topic .post { + border-style: solid none none none; + border-width: 1px; + } + +.main .topic .firstpost { + border-top: none; + margin-top: 0; + } + +.main .topic .post .postmain { + margin-left: 17em; + position: relative; + border-left-style: solid; + border-left-width: 1px; + } + +.main .topic .post .posthead { + border-bottom-style: dashed; + border-bottom-width: 1px; + margin-bottom: 0.7em; + } + +.main .topic .post .posthead h3 { + padding: 0.5em 0 0.5em 1em; + margin: 0; + } + +.main .topic .post .posthead h3 strong { + float: right; + font-weight: bold; + position: relative; + text-decoration: none; + padding-right: 1em; + } + +.main .topic .post .postmain .user { + float: left; + margin: -2.6em 0 0 -16em; + width: 15em; + } + +.main .topic .user-info { + overflow: hidden; + width: 15em; + } + +.main .topic .user-ident .username { + overflow: hidden; + width: 13em; + } + +.main .topic .post .user .user-info { + padding-bottom: 1em; + } + +.main .topic .post .postmain .postfoot { + margin-left: -17em; + text-align: right; + border-top-style: dashed; + border-top-width: 1px; + padding: 0.5em 1em; + } + +.main .topic .post .postmain .postfoot .post-options a { + margin-left: 1em; + } + +.main .topic .post .postmain .postfoot .post-options a.contact { + float: left; + margin-right: 1em; + margin-left: 0; + } + +.main .topic .post .postmain .entry-info { + padding: 0 0 1em 0; + margin: 0 0 0 1.5em; + } + +.main .post .item-select { + padding-right: 1em; + } + +#pun-searchposts .main .post h3 cite { + position: static; + font-size: 1em; + } + +#pun-searchposts .main .post h4.entry-title { + position: static; + font-size: 1em; + padding-bottom: 1em; + font-weight: normal; + line-height: 1.3em; + text-indent: 0; + } + +#pun-searchposts .main h3 strong { + text-decoration: none; + } + +#pun-searchposts .main h4.entry-title strong { + display: block; + font-weight: bold; + } + + +/************************************************************* +H - OTHER MAIN CONTENT ITEMS +**************************************************************/ + +/* Message Boxes / Redirect +-------------------------------------------------------------*/ + +.main .message { + padding-bottom: 0.3em; + } + +.main .message p { + padding: 0 1.3em 0; + margin: 1em 0; + } + +.main .message p span { + display: block; + padding-top: 1em; + } + + +/* Help File +-------------------------------------------------------------*/ + +.frm .example code { + display: block; + } + +.frm .example li, +.frm div.example { + padding: 0 0 1em 0; + line-height: normal; + margin: 0 0 0 1.5em; + list-style: disc; + } + +.frm .example code { + padding-bottom: 0.1em; + } + +.frm ul.example { + padding: 0 0 0 0.5em; + margin: 0; + } + +.frm .example span { + font-size: 0.9em; + } + +#pun-help h3 { + padding: 0 0 0.7em 0; + margin: 0; + } + +#pun-help .quotebox, #pun-help .codebox { + margin: 0.3em 0 0 0; + } + +.frm .example code * { + vertical-align: middle; + } + + +/* Rules +-------------------------------------------------------------*/ + +.pun .userbox { + padding: 1em 1.3em 0.7em 1.3em; + margin: 1.7em; + border-style: solid; + border-width: 1px; + } + +.pun .userbox p, .pun .userbox h2, .pun .userbox h3, .pun .userbox h4 { + margin: 0 0 0.8em 0; + list-style: disc; + } + +.pun .userbox h2 { + font-size: 1.2em; + font-weight: bold; + } + +.pun .userbox h3 { + font-size: 1.1em; + font-weight: bold; + } + +.pun .userbox ul, .pun .userbox ol { + margin: 0 0 0.3em 1.5em; + list-style: disc; + } + +.pun .userbox li { + margin-bottom: 0.5em; + } + +.pun .userbox strong { + font-weight: bold; + } + +.pun .userbox em { + font-style: italic; + } \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Oxygen/Oxygen.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/style/Oxygen/Oxygen.php Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,4 @@ + + + + diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Oxygen/Oxygen_cs.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/style/Oxygen/Oxygen_cs.css Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,249 @@ +/************************************************************* +COLOUR CHART +**************************************************************/ + +/* Basic #fff / #333 */ +/* (Light back) a, a:link, a:visited #00569c */ +/* (Light back) a:hover, a:active, a:focus #b42000 */ +/* (Dark back) a, a:link, a:visited #ddd */ +/* (Dark back) a:hover, a:active, a:focus #fff */ +/* Logo #296fa5 / #fff */ +/* Main menu #113C5E / #ddd */ +/* Main headings #1f537b / #ddd */ +/* Info Boxes (Yellow) #ffffe1 */ +/* Info Boxes (Blue) #f4f9fd */ +/* General Background (Lightest) #fbfbfb */ +/* General Background (Slightly darker) #f4f4f4 */ +/* Strong text (not in bold) #000 */ + + +/************************************************************* +A - BACKGROUND and BORDERS +**************************************************************/ + +.main-content, #pun-visit, .paged-head, .paged-foot, .postmain { + background: #fbfbfb; + } + +#pun-about, .main th, .main td.tc2, .main td.tc3, #pun-debug td.tcl { + background: #f4f4f4; + } + +.posthead { + background: #f1f1f1; + } + +#pun-title, #pun-desc { + background:#296fa5; + } + +#pun-navlinks { + background: #113c5e; + } + +.main-head, .main-foot { + background: #1f537b; + } + +.frm-info, .frm-error, #pun-alert, .dataset .ext-error { + background: #ffffe1; + } + +.entry-content .codebox, .entry-content .quotebox { + background: #fff; + } + +.pun div, div.pun, .pun td, .pun table, #stats h3, .frm .frm-set { + border-color: #ddd; + } + +.profile, .user, .topic, .databox, .userbox { + background: #f4f9fd; + } + +.status span, .sig-content span.sig-line, .databox .legend, #pun-announcement .msg-head, #pun-alert p, #pun-alert h1 { + border-color: #bbb; + } + +.online .status span { + border-color: #296FA5; + } + +.main .frm-head { + border-color: #fff #fff #bbb #fff; + } + +.main .frm-head { + background: #f1f1f1; + } + +.frm .frm-subhead, .frm .frm-info, .dataset, .datagrid, .databox, .databox .data { + border-color: #ddd; + } + +/************************************************************* +B - TEXT +**************************************************************/ + +.pun { + color: #333; + } + +#pun-title { + color: #fff; + } + +#pun-desc, #pun-navlinks, .main-head, .main-foot, #pun-home { + color: #ddd; + } + +.main-content li span, .frm-info, .frm-info span, #pun-alert div, .frm-set, .fld-label, +.isonline, .example code, .example li code, .example li samp, .frm .frm-group legend, +.example li span, .example li .samp, p.item span, .entry-info li * { + color: #666; + } + +.main-content li strong, .important strong, .user-info li.title span, #pun-alert strong, +.frm-error li span, .frm-info li span strong, .online .isonline, .frm h3.link *, .frm h4.link *, +#pun-help h3, .main th { + color: #000; + } + +.user .username { + color: #00569c; + } + +.main .frm-head, .main .databox .legend, .pun .userbox .msg-head { + color: #113C5E; + } + +.main-content li { + color: #9AAFB4; + } + +.main-content .userbox li { + color: #333; + } + +.user-actions li { + color: #CD9C96; + } + +em.req-text, .pun li.warn, .pun .warn strong, .pun .frm-group .warn, .main .ext-error .legend, #pun-alert h1 strong { + color: #b42000; + } + +/************************************************************* +C - LINKS +**************************************************************/ + +.pun a, .pun a:link, .pun a:visited { + color: #00569c; + } + +#pun-home a, #pun-home a:link, #pun-home a:visited, +.main-head a, .main-head a:link, .main-head a:visited, +#pun-navlinks a, #pun-navlinks a:link, #pun-navlinks a:visited { + color: #ddd; + text-decoration: none; + } + +.main-foot a, .main-foot a:link, .main-foot a:visited { + color: #ddd; + } + +.pun a:hover, .pun a:active, .pun a:focus { + color: #b42000; + } + +.main-head a:hover, .main-head a:active, .main-head a:focus, +.main-foot a:hover, .main-foot a:active, .main-foot a:focus, +#pun-home a:hover, #pun-home a:active, #pun-home a:focus, +#pun-navlinks a:hover, #pun-navlinks a:active, #pun-navlinks a:focus, +#pun-access a:hover, #pun-access a:active, #pun-access a:focus { + color: #fff; + text-decoration: underline; + } + +.posting a, p.crumbs a { + text-decoration: none; + } + +.main .topic .post .posthead h3 a strong { + text-decoration: none; + } + + +/************************************************************* +D - TABBED NAVIGATION +**************************************************************/ + +.main-nav ul li a, .main-nav ul li a:link, .main-nav ul li a:visited { + text-decoration: none; + background: #f1f1f1; + border-color: #ddd; + } + +.main-nav ul li a span { + border-color: #fff; + } + +.main-nav ul li a:hover, .main-nav ul li a:active, .main-nav ul li a:focus { + background: #fbfbfb; + } + +.main-nav ul li.topactive a, .main-nav ul li.topactive a:link, +.main-nav ul li.topactive a:visited { + color: #F4F9FD; + text-decoration: underline; + background: #1f537b; + border-color: #1f537b; + } + +.main-nav ul li.topactive a span { + border-color: #1f537b + } + +.submenu ul li.topactive ul li a, +.submenu ul li.topactive ul li a:link, +.submenu ul li.topactive ul li a:visited { + background: transparent; + text-decoration: none; + color: #dedfdf; + } + +.submenu ul li.topactive ul li.isactive a, +.submenu ul li.topactive ul li.isactive a:link, +.submenu ul li.topactive ul li.isactive a:visited { + text-decoration: underline; + color: #fff; + background:#1f537b; + } + +.submenu ul li.topactive ul li a:hover, +.submenu ul li.topactive ul li a:active, +.submenu ul li.topactive ul li a:focus { + text-decoration: underline; + color: #fff; + background: #1f537b; + } + + + + +/************************************************************* +E - POST STATUS INDICATORS +**************************************************************/ + +td.tcl span.status img { + border-color: #E6E6E6 #DEDEDE #DADADA #E2E2E2 + } + +tr.redirect td.tcl img { + border-color: #f4f4f4 #f4f4f4 #f4f4f4 #f4f4f4 + } + +td.tcl span.new img { + border-color: #2B75AD #235E8C #1F537B #266799 + } + \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Oxygen/Oxygen_ie6.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/style/Oxygen/Oxygen_ie6.css Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,139 @@ +/************************************************************* +A - SETUP +**************************************************************/ + +/* Start from scratch +----------------------------------------------------------=--*/ + +* html .main table { + border-collapse: collapse + } + +* html .pun legend { + margin-left: -7px; + } + + +/* Make the skip link work +----------------------------------------------------------=--*/ + +.ietabfix:active, #pun-main { + zoom: 1; + } + +/* Welcome Box +----------------------------------------------------------=--*/ + +#pun-visit { + zoom: 1; + } + +/* Alert Box +----------------------------------------------------------=--*/ + +#pun-alert, #pun-alert h1 { + zoom: 1; + } + + +/* Statistics +-------------------------------------------------------------*/ + + #pun-info { + height: 1px; + } + + #pun-info #stats ul, #pun-info #onlinelist { + zoom: 1; + } + +/* About Box (Footer / Copyright / Jump Menu) +----------------------------------------------------------=--*/ + +#pun-about, +.pun .userbox { + zoom: 1; + } + +/* Paging and Posting +----------------------------------------------------------=--*/ + +.main .paged-head, +.main .paged-foot, +.main .paged-foot .submitting { + zoom: 1; + } + +/* Main Headings +----------------------------------------------------------=--*/ + +.main .main-head, +.main .main-foot { + zoom: 1; + } + +/* Tabbed Navigation +-------------------------------------------------------------*/ + +.main .main-nav { + zoom: 1; + } + + +/* Forms +-------------------------------------------------------------*/ + +.frm .frm-set div, +.frm .link, +.frm .frm-group, +.frm .radbox { + height: 1px; + } + +* html .radbox input, +* html .post-select input { + height: 13px; + width: 13px; + } + +.pun span.submit input, +.pun span.cancel input { + padding-bottom: 0; + } + +.pun .frm, +.frm .profile { + height: 1px + } + +.frm .profile .sig-demo { + zoom: 1; + } + +.frm .radbox label { + float: left; + } + +.main .dataset, .main .datagrid { + height: 1%; + } + + +/* Posts +-------------------------------------------------------------*/ + +.main .topic, .main .post, .main .post .postbody, .main .topic .post .postfoot { + zoom: 1; + position: relative; + } + +.main .post .user { + zoom: 1; + position: relative; + } + +* html .entry-content .codebox pre { /* 6 Only */ + overflow: visible; + overflow-x:auto; + padding-bottom: 2em; + } \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Oxygen/Oxygen_ie7.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/style/Oxygen/Oxygen_ie7.css Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,145 @@ +/************************************************************* +A - SETUP +**************************************************************/ + +/* Start from scratch +----------------------------------------------------------=--*/ + +.main table { + border-collapse: collapse + } + +.pun legend { + margin-left: -7px; + } + + +/* Make the skip link work +----------------------------------------------------------=--*/ + +.ietabfix:active, #pun-main { + zoom: 1; + } + +/* Welcome Box +----------------------------------------------------------=--*/ + +#pun-visit { + zoom: 1; + } + +/* Alert Box +----------------------------------------------------------=--*/ + +#pun-alert, #pun-alert h1 { + zoom: 1; + } + + +/* Statistics +-------------------------------------------------------------*/ + + #pun-info { + min-height: 1px; + } + + #pun-info #stats ul, #pun-info #onlinelist { + min-height: 1px; + } + +/* About Box (Footer / Copyright / Jump Menu) +----------------------------------------------------------=--*/ + +#pun-about { + min-height: 1px; + } + +/* Paging and Posting +----------------------------------------------------------=--*/ + +.main .paged-head, +.main .paged-foot, +.main .paged-foot .submitting { + min-height: 1px; + } + +/* Main Headings +----------------------------------------------------------=--*/ + +.main .main-head, +.main .main-foot { + min-height: 1px; + } + +/* Tabbed Navigation +-------------------------------------------------------------*/ + +.main .main-nav { + min-height: 1px; + } + + +/* Forms +-------------------------------------------------------------*/ + +.frm .frm-set div, +.frm .link, +.frm .frm-group, +.frm .radbox { + min-height: 1px; + } + +.radbox input, +.post-select input { + height: 13px; + width: 13px; + } + +.pun span.submit input, +.pun span.cancel input { + padding-bottom: 0; + } + +.pun .frm, +.frm .profile { + min-height: 1px + } + +.frm .profile .sig-demo { + min-height: 1px; + } + +.frm .radbox label { + float: left; + } + +.main .dataset, .main .datagrid { + min-height: 1px; + } + + +/* Posts +-------------------------------------------------------------*/ + +.main .topic, .main .post, .main .post .postbody, .main .topic .post .postfoot { + min-height: 1px; + position: relative; + } + +.main .post .user { + min-height: 1px; + position: relative; + } + +* html .entry-content .codebox pre { /* 6 Only */ + overflow: visible; + overflow-x:auto; + padding-bottom: 2em; + } + +.entry-content .codebox pre { /* 7 Only */ + min-height: 3em + } + + + diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Oxygen/blue.png Binary file punbb/style/Oxygen/blue.png has changed diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Oxygen/crumb.png Binary file punbb/style/Oxygen/crumb.png has changed diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Oxygen/error.png Binary file punbb/style/Oxygen/error.png has changed diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Oxygen/feed.png Binary file punbb/style/Oxygen/feed.png has changed diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Oxygen/help.png Binary file punbb/style/Oxygen/help.png has changed diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Oxygen/helpdark.png Binary file punbb/style/Oxygen/helpdark.png has changed diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Oxygen/info.png Binary file punbb/style/Oxygen/info.png has changed diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Oxygen/searchicon.png Binary file punbb/style/Oxygen/searchicon.png has changed diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Oxygen/star.png Binary file punbb/style/Oxygen/star.png has changed diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Oxygen/status.png Binary file punbb/style/Oxygen/status.png has changed diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Radium.css --- a/punbb/style/Radium.css Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,258 +0,0 @@ -/****************************************************************/ -/* 1. IMPORTED STYLESHEETS */ -/****************************************************************/ - -/* Import the basic setup styles */ -@import url(imports/base.css); -/* Import the colour scheme */ -@import url(imports/Radium_cs.css); - -/****************************************************************/ -/* 2. TEXT SETTINGS */ -/****************************************************************/ - -/* 2.1 This sets the default Font Group */ - -.pun, .pun INPUT, .pun SELECT, .pun TEXTAREA, .pun OPTGROUP { - FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif -} - -.pun {FONT-SIZE: 11px; LINE-HEIGHT: normal} - -/* IEWin Font Size only - to allow IEWin to zoom. Do not remove comments \*/ -* HTML .pun {FONT-SIZE: 68.75%} -/* End IE Win Font Size */ - -/* Set font size for tables because IE requires it */ -.pun TABLE, .pun INPUT, .pun SELECT, .pun OPTGROUP, .pun TEXTAREA, DIV.postmsg P.postedit {FONT-SIZE: 1em} - -/* 2.2 Set the font-size for preformatted text i.e in code boxes */ - -.pun PRE {FONT-FAMILY: monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace} - -/* 2.3 Font size for headers */ - -.pun H2, .pun H4 {FONT-SIZE: 1em} -.pun H3 {FONT-SIZE: 1.1em} -#brdtitle H1 {FONT-SIZE: 1.4em} - -/* 2.4 Larger text for particular items */ -DIV.postmsg P {LINE-HEIGHT: 1.4} -DIV.postleft DT {FONT-SIZE: 1.1em} -.pun PRE {FONT-SIZE: 1.2em} - -/* 2.5 Bold text */ - -DIV.postleft DT, DIV.postmsg H4, TD.tcl H3, DIV.forminfo H3, P.postlink, DIV.linkst LI, -DIV.linksb LI, DIV.postlinksb LI, .blockmenu LI, #brdtitle H1, .pun SPAN.warntext, .pun P.warntext {FONT-WEIGHT: bold} - -/****************************************************************/ -/* 3. LINKS */ -/****************************************************************/ - -/* 3.1 Remove underlining for main menu, post header links, post links and vertical menus */ - -#brdmenu A:link, #brdmenu A:visited, .blockpost DT A:link, .blockpost DT A:visited, .blockpost H2 A:link, -.blockpost H2 A:visited, .postlink A:link, .postlink A:visited, .postfootright A:link, .postfootright A:visited, -.blockmenu A:link, .blockmenu A:visited { - TEXT-DECORATION: none -} - -/* 3.2 Underline on hover for links in headers and main menu */ - -#brdmenu A:hover, .blockpost H2 A:hover {TEXT-DECORATION: underline} - -/****************************************************************/ -/* 4. BORDER WIDTH AND STYLE */ -/****************************************************************/ - -/* 4.1 By default borders are 1px solid */ - -DIV.box, .pun TD, .pun TH, .pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL { - BORDER-STYLE: solid; - BORDER-WIDTH: 1px -} - -/* 4.2 Special settings for the board header. */ - -#brdheader DIV.box {BORDER-TOP-WIDTH: 4px} - -/* 4.3 Borders for table cells */ - -.pun TD, .pun TH { - BORDER-BOTTOM: none; - BORDER-RIGHT: none -} - -.pun .tcl {BORDER-LEFT: none} - -/* 4.4 Special setting for fieldsets to preserve IE defaults */ - -DIV>FIELDSET { - BORDER-STYLE: solid; - BORDER-WIDTH: 1px -} - -/****************************************************************/ -/* 5. VERTICAL AND PAGE SPACING */ -/****************************************************************/ - -/* 5.1 Page margins */ - -HTML, BODY {MARGIN: 0; PADDING: 0} -#punwrap {margin:12px 20px} - -/* 5.2 Creates vertical space between main board elements (Margins) */ - -DIV.blocktable, DIV.block, DIV.blockform, DIV.block2col, #postreview {MARGIN-BOTTOM: 12px} -#punindex DIV.blocktable, DIV.blockpost {MARGIN-BOTTOM: 6px} -DIV.block2col DIV.blockform, DIV.block2col DIV.block {MARGIN-BOTTOM: 0px} - -/* 5.3 Remove space above breadcrumbs, postlinks and pagelinks with a negative top margin */ - -DIV.linkst, DIV.linksb {MARGIN-TOP: -12px} -DIV.postlinksb {MARGIN-TOP: -6px} - -/* 5.4 Put a 12px gap above the board information box in index because the category tables only -have a 6px space beneath them */ - -#brdstats {MARGIN-TOP: 12px} - -/****************************************************************/ -/* 6. SPACING AROUND CONTENT */ -/****************************************************************/ - -/* 6.1 Default padding for main items */ - -DIV.block DIV.inbox, DIV.blockmenu DIV.inbox {PADDING: 3px 6px} -.pun P, .pun UL, .pun DL, DIV.blockmenu LI, .pun LABEL, #announce DIV.inbox DIV {PADDING: 3px 0} -.pun H2 {PADDING: 4px 6px} - -/* 6.2 Special spacing for various elements */ - -.pun H1 {PADDING: 3px 0px 0px 0} -#brdtitle P {PADDING-TOP: 0px} -DIV.linkst {PADDING: 8px 6px 3px 6px} -DIV.linksb, DIV.postlinksb {PADDING: 3px 6px 8px 6px} -#brdwelcome, #brdfooter DL A, DIV.blockmenu LI, DIV.rbox INPUT {LINE-HEIGHT: 1.4em} -#viewprofile DT, #viewprofile DD {PADDING: 0 3px; LINE-HEIGHT: 2em} - -/* 6.4 Create some horizontal spacing for various elements */ - -#brdmenu LI, DIV.rbox INPUT, DIV.blockform P INPUT {MARGIN-RIGHT: 12px} - -/****************************************************************/ -/* 7. SPACING FOR TABLES */ -/****************************************************************/ - -.pun TH, .pun TD {PADDING: 4px 6px} -.pun TD P {PADDING: 5px 0 0 0} - -/****************************************************************/ -/* 8. SPACING FOR POSTS */ -/****************************************************************/ - -/* 8.1 Padding around left and right columns in viewtopic */ - -DIV.postleft DL, DIV.postright {PADDING: 6px} - -/* 8.2 Extra spacing for poster contact details and avatar */ - -DD.usercontacts, DD.postavatar {MARGIN-TOP: 5px} -DD.postavatar {MARGIN-BOTTOM: 5px} - -/* 8.3 Extra top spacing for signatures and edited by */ - -DIV.postsignature, DIV.postmsg P.postedit {PADDING-TOP: 15px} - -/* 8.4 Spacing for code and quote boxes */ - -DIV.postmsg H4 {MARGIN-BOTTOM: 10px} -.pun BLOCKQUOTE, DIV.codebox {MARGIN: 5px 15px 15px 15px; PADDING: 8px} - -/* 8.5 Padding for the action links and online indicator in viewtopic */ - -DIV.postfootleft P, DIV.postfootright UL, DIV.postfootright DIV {PADDING: 10px 6px 5px 6px} - -/* 8.6 This is the input on moderators multi-delete view */ - -DIV.blockpost INPUT, DIV.blockpost LABEL { - PADDING: 3px; - DISPLAY: inline -} - -P.multidelete { - PADDING-TOP: 15px; - PADDING-BOTTOM: 5px -} - -/* 8.7 Make sure paragraphs in posts don't get any padding */ - -DIV.postmsg P {PADDING: 0} - -/****************************************************************/ -/* 9. SPECIAL SPACING FOR FORMS */ -/****************************************************************/ - -/* 9.1 Padding around fieldsets */ - -DIV.blockform FORM, DIV.fakeform {PADDING: 20px 20px 15px 20px} -DIV.inform {PADDING-BOTTOM: 12px} - -/* 9.2 Padding inside fieldsets */ - -.pun FIELDSET {PADDING: 0px 12px 0px 12px} -DIV.infldset {PADDING: 9px 0px 12px 0} -.pun LEGEND {PADDING: 0px 6px} - -/* 9.3 The information box at the top of the registration form and elsewhere */ - -DIV.forminfo { - MARGIN-BOTTOM: 12px; - PADDING: 9px 10px -} - -/* 9.4 BBCode help links in post forms */ - -UL.bblinks LI {PADDING-RIGHT: 20px} - -UL.bblinks {PADDING-BOTTOM: 10px; PADDING-LEFT: 4px} - -/* 9.5 Horizontal positioning for the submit button on forms */ - -DIV.blockform P INPUT {MARGIN-LEFT: 12px} - -/****************************************************************/ -/* 10. POST STATUS INDICATORS */ -/****************************************************************/ - -/* 10.1 These are the post status indicators which appear at the left of some tables. -.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and -.isticky = sticky topics. By default only .inew is different from the default.*/ - -DIV.icon { - FLOAT: left; - MARGIN-TOP: 0.1em; - MARGIN-LEFT: 0.2em; - DISPLAY: block; - BORDER-WIDTH: 0.6em 0.6em 0.6em 0.6em; - BORDER-STYLE: solid -} - -DIV.searchposts DIV.icon {MARGIN-LEFT: 0} - -/* 10.2 Class .tclcon is a div inside the first column of tables with post indicators. The -margin creates space for the post status indicator */ - -TD DIV.tclcon {MARGIN-LEFT: 2.3em} - - - - - - - - - - - diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Radium/Radium.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/style/Radium/Radium.css Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,3 @@ +/****************************************************************/ +/* PLACEHOLDER FILE - TO BE REPLACED SHORTLY */ +/****************************************************************/ \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Radium/Radium_cs.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/style/Radium/Radium_cs.css Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,3 @@ +/****************************************************************/ +/* PLACEHOLDER FILE - TO BE REPLACED SHORTLY */ +/****************************************************************/ \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Radium/Radium_fix.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/style/Radium/Radium_fix.css Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,3 @@ +/****************************************************************/ +/* PLACEHOLDER FILE - TO BE REPLACED SHORTLY */ +/****************************************************************/ \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Sulfur.css --- a/punbb/style/Sulfur.css Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,258 +0,0 @@ -/****************************************************************/ -/* 1. IMPORTED STYLESHEETS */ -/****************************************************************/ - -/* Import the basic setup styles */ -@import url(imports/base.css); -/* Import the colour scheme */ -@import url(imports/Sulfur_cs.css); - -/****************************************************************/ -/* 2. TEXT SETTINGS */ -/****************************************************************/ - -/* 2.1 This sets the default Font Group */ - -.pun, .pun INPUT, .pun SELECT, .pun TEXTAREA, .pun OPTGROUP { - FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif -} - -.pun {FONT-SIZE: 11px; LINE-HEIGHT: normal} - -/* IEWin Font Size only - to allow IEWin to zoom. Do not remove comments \*/ -* HTML .pun {FONT-SIZE: 68.75%} -/* End IE Win Font Size */ - -/* Set font size for tables because IE requires it */ -.pun TABLE, .pun INPUT, .pun SELECT, .pun OPTGROUP, .pun TEXTAREA, DIV.postmsg P.postedit {FONT-SIZE: 1em} - -/* 2.2 Set the font-size for preformatted text i.e in code boxes */ - -.pun PRE {FONT-FAMILY: monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace} - -/* 2.3 Font size for headers */ - -.pun H2, .pun H4 {FONT-SIZE: 1em} -.pun H3 {FONT-SIZE: 1.1em} -#brdtitle H1 {FONT-SIZE: 1.4em} - -/* 2.4 Larger text for particular items */ -DIV.postmsg P {LINE-HEIGHT: 1.4} -DIV.postleft DT {FONT-SIZE: 1.1em} -.pun PRE {FONT-SIZE: 1.2em} - -/* 2.5 Bold text */ - -DIV.postleft DT, DIV.postmsg H4, TD.tcl H3, DIV.forminfo H3, P.postlink, DIV.linkst LI, -DIV.linksb LI, DIV.postlinksb LI, .blockmenu LI, #brdtitle H1, .pun SPAN.warntext, .pun P.warntext {FONT-WEIGHT: bold} - -/****************************************************************/ -/* 3. LINKS */ -/****************************************************************/ - -/* 3.1 Remove underlining for main menu, post header links, post links and vertical menus */ - -#brdmenu A:link, #brdmenu A:visited, .blockpost DT A:link, .blockpost DT A:visited, .blockpost H2 A:link, -.blockpost H2 A:visited, .postlink A:link, .postlink A:visited, .postfootright A:link, .postfootright A:visited, -.blockmenu A:link, .blockmenu A:visited { - TEXT-DECORATION: none -} - -/* 3.2 Underline on hover for links in headers and main menu */ - -#brdmenu A:hover, .blockpost H2 A:hover {TEXT-DECORATION: underline} - -/****************************************************************/ -/* 4. BORDER WIDTH AND STYLE */ -/****************************************************************/ - -/* 4.1 By default borders are 1px solid */ - -DIV.box, .pun TD, .pun TH, .pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL { - BORDER-STYLE: solid; - BORDER-WIDTH: 1px -} - -/* 4.2 Special settings for the board header. */ - -#brdheader DIV.box {BORDER-TOP-WIDTH: 4px} - -/* 4.3 Borders for table cells */ - -.pun TD, .pun TH { - BORDER-BOTTOM: none; - BORDER-RIGHT: none -} - -.pun .tcl {BORDER-LEFT: none} - -/* 4.4 Special setting for fieldsets to preserve IE defaults */ - -DIV>FIELDSET { - BORDER-STYLE: solid; - BORDER-WIDTH: 1px -} - -/****************************************************************/ -/* 5. VERTICAL AND PAGE SPACING */ -/****************************************************************/ - -/* 5.1 Page margins */ - -HTML, BODY {MARGIN: 0; PADDING: 0} -#punwrap {margin:12px 20px} - -/* 5.2 Creates vertical space between main board elements (Margins) */ - -DIV.blocktable, DIV.block, DIV.blockform, DIV.block2col, #postreview {MARGIN-BOTTOM: 12px} -#punindex DIV.blocktable, DIV.blockpost {MARGIN-BOTTOM: 6px} -DIV.block2col DIV.blockform, DIV.block2col DIV.block {MARGIN-BOTTOM: 0px} - -/* 5.3 Remove space above breadcrumbs, postlinks and pagelinks with a negative top margin */ - -DIV.linkst, DIV.linksb {MARGIN-TOP: -12px} -DIV.postlinksb {MARGIN-TOP: -6px} - -/* 5.4 Put a 12px gap above the board information box in index because the category tables only -have a 6px space beneath them */ - -#brdstats {MARGIN-TOP: 12px} - -/****************************************************************/ -/* 6. SPACING AROUND CONTENT */ -/****************************************************************/ - -/* 6.1 Default padding for main items */ - -DIV.block DIV.inbox, DIV.blockmenu DIV.inbox {PADDING: 3px 6px} -.pun P, .pun UL, .pun DL, DIV.blockmenu LI, .pun LABEL, #announce DIV.inbox DIV {PADDING: 3px 0} -.pun H2 {PADDING: 4px 6px} - -/* 6.2 Special spacing for various elements */ - -.pun H1 {PADDING: 3px 0px 0px 0} -#brdtitle P {PADDING-TOP: 0px} -DIV.linkst {PADDING: 8px 6px 3px 6px} -DIV.linksb, DIV.postlinksb {PADDING: 3px 6px 8px 6px} -#brdwelcome, #brdfooter DL A, DIV.blockmenu LI, DIV.rbox INPUT {LINE-HEIGHT: 1.4em} -#viewprofile DT, #viewprofile DD {PADDING: 0 3px; LINE-HEIGHT: 2em} - -/* 6.4 Create some horizontal spacing for various elements */ - -#brdmenu LI, DIV.rbox INPUT, DIV.blockform P INPUT {MARGIN-RIGHT: 12px} - -/****************************************************************/ -/* 7. SPACING FOR TABLES */ -/****************************************************************/ - -.pun TH, .pun TD {PADDING: 4px 6px} -.pun TD P {PADDING: 5px 0 0 0} - -/****************************************************************/ -/* 8. SPACING FOR POSTS */ -/****************************************************************/ - -/* 8.1 Padding around left and right columns in viewtopic */ - -DIV.postleft DL, DIV.postright {PADDING: 6px} - -/* 8.2 Extra spacing for poster contact details and avatar */ - -DD.usercontacts, DD.postavatar {MARGIN-TOP: 5px} -DD.postavatar {MARGIN-BOTTOM: 5px} - -/* 8.3 Extra top spacing for signatures and edited by */ - -DIV.postsignature, DIV.postmsg P.postedit {PADDING-TOP: 15px} - -/* 8.4 Spacing for code and quote boxes */ - -DIV.postmsg H4 {MARGIN-BOTTOM: 10px} -.pun BLOCKQUOTE, DIV.codebox {MARGIN: 5px 15px 15px 15px; PADDING: 8px} - -/* 8.5 Padding for the action links and online indicator in viewtopic */ - -DIV.postfootleft P, DIV.postfootright UL, DIV.postfootright DIV {PADDING: 10px 6px 5px 6px} - -/* 8.6 This is the input on moderators multi-delete view */ - -DIV.blockpost INPUT, DIV.blockpost LABEL { - PADDING: 3px; - DISPLAY: inline -} - -P.multidelete { - PADDING-TOP: 15px; - PADDING-BOTTOM: 5px -} - -/* 8.7 Make sure paragraphs in posts don't get any padding */ - -DIV.postmsg P {PADDING: 0} - -/****************************************************************/ -/* 9. SPECIAL SPACING FOR FORMS */ -/****************************************************************/ - -/* 9.1 Padding around fieldsets */ - -DIV.blockform FORM, DIV.fakeform {PADDING: 20px 20px 15px 20px} -DIV.inform {PADDING-BOTTOM: 12px} - -/* 9.2 Padding inside fieldsets */ - -.pun FIELDSET {PADDING: 0px 12px 0px 12px} -DIV.infldset {PADDING: 9px 0px 12px 0} -.pun LEGEND {PADDING: 0px 6px} - -/* 9.3 The information box at the top of the registration form and elsewhere */ - -DIV.forminfo { - MARGIN-BOTTOM: 12px; - PADDING: 9px 10px -} - -/* 9.4 BBCode help links in post forms */ - -UL.bblinks LI {PADDING-RIGHT: 20px} - -UL.bblinks {PADDING-BOTTOM: 10px; PADDING-LEFT: 4px} - -/* 9.5 Horizontal positioning for the submit button on forms */ - -DIV.blockform P INPUT {MARGIN-LEFT: 12px} - -/****************************************************************/ -/* 10. POST STATUS INDICATORS */ -/****************************************************************/ - -/* 10.1 These are the post status indicators which appear at the left of some tables. -.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and -.isticky = sticky topics. By default only .inew is different from the default.*/ - -DIV.icon { - FLOAT: left; - MARGIN-TOP: 0.1em; - MARGIN-LEFT: 0.2em; - DISPLAY: block; - BORDER-WIDTH: 0.6em 0.6em 0.6em 0.6em; - BORDER-STYLE: solid -} - -DIV.searchposts DIV.icon {MARGIN-LEFT: 0} - -/* 10.2 Class .tclcon is a div inside the first column of tables with post indicators. The -margin creates space for the post status indicator */ - -TD DIV.tclcon {MARGIN-LEFT: 2.3em} - - - - - - - - - - - diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Sulfur/Sulfur.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/style/Sulfur/Sulfur.css Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,3 @@ +/****************************************************************/ +/* PLACEHOLDER FILE - TO BE REPLACED SHORTLY */ +/****************************************************************/ \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Sulfur/Sulfur_cs.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/style/Sulfur/Sulfur_cs.css Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,3 @@ +/****************************************************************/ +/* PLACEHOLDER FILE - TO BE REPLACED SHORTLY */ +/****************************************************************/ \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/Sulfur/Sulfur_fix.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/style/Sulfur/Sulfur_fix.css Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,3 @@ +/****************************************************************/ +/* PLACEHOLDER FILE - TO BE REPLACED SHORTLY */ +/****************************************************************/ \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/imports/Cobalt_cs.css --- a/punbb/style/imports/Cobalt_cs.css Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +0,0 @@ -/****************************************************************/ -/* 1. BACKGROUND AND TEXT COLOURS */ -/****************************************************************/ - -/* 1.1 Default background colour and text colour */ - -BODY {BACKGROUND-COLOR: #2A2A2A} - -.pun {COLOR: #D4D4D4} - -DIV.box, #adminconsole FIELDSET TH, .rowodd, .roweven {BACKGROUND-COLOR: #383838} -#adminconsole TD, #adminconsole TH {BORDER-COLOR: #383838} - -/* 1. 2 Darker background colours */ - -TD.tc2, TD.tc3, TD.tcmod, #brdfooter DIV.box {BACKGROUND-COLOR: #424242} -#adminconsole FIELDSET TD, #viewprofile DD, DIV.forminfo, DIV.blockmenu DIV.box, #adstats DD {BACKGROUND-COLOR: #484848} - -.pun BLOCKQUOTE, DIV.codebox {BACKGROUND-COLOR: #353533} - -/* 1.3 Main headers and navigation bar background and text colour */ - -.pun H2, #brdmenu {BACKGROUND-COLOR: #565656; COLOR: #D4D4D4} - -/* 1.4 Table header rows */ - -.pun TH, .bgc4 {BACKGROUND-COLOR: #484848} - -/* 1.5 Fieldset legend text colour */ - -.pun LEGEND {COLOR: #60A0DC} - -/* 1.6 Highlighted text for various items */ - -.pun DIV.blockmenu LI.isactive A, #posterror LI STRONG {COLOR: #D4D4D4} - -/* 1.7 Dark background for form elements */ - -.pun TEXTAREA, .pun INPUT, .pun SELECT {BACKGROUND-COLOR: #2A2A2A; COLOR: #D4D4D4} - -/****************************************************************/ -/* 2. POST BACKGROUNDS AND TEXT */ -/****************************************************************/ - -/* 2.1 This is the setup for posts. */ - -DIV.blockpost DIV.box, DIV.postright, DIV.postfootright, #postpreview {BACKGROUND-COLOR: #383838} -DIV.postright, DIV.postfootright {BORDER-LEFT-COLOR: #424242} -DIV.postleft, DIV.postfootleft, DIV.blockpost LABEL {BACKGROUND-COLOR: #424242} - -/* 2.2 Background for post headers and text colour for post numbers in viewtopic */ - -DIV.blockpost H2 {BACKGROUND-COLOR: #565656} -DIV.blockpost H2 SPAN.conr {COLOR: #A19E96} - -/* 2.3 This is the line above the signature in posts. Colour and background should be the same */ - -.pun HR {BACKGROUND-COLOR: #606060; COLOR: #606060} - -/****************************************************************/ -/* 3. BORDER COLOURS */ -/****************************************************************/ - -/* 3.1 All external borders (H1 is the board title) */ - -DIV.box {BORDER-COLOR: #565656} - -/* 3.2 Makes the top border of posts match the colour used for post headers */ - -DIV.blockpost DIV.box {BORDER-COLOR: #565656 #525252 #525252} - -/* 3.3 Table internal borders. By default TH is same as background so border is invisible */ - -.pun TD {BORDER-COLOR: #565656} -.pun TH {BORDER-COLOR: #484848} - -/* 3.4 Creates the inset border for quote boxes, code boxes and form info boxes */ - -.pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL {BORDER-COLOR: #606060} - -/* 3.5 Gecko's default fieldset borders are really nasty so this gives them a colour -without interferring with IE's rather nice default */ - -.pun DIV>FIELDSET {BORDER-COLOR: #ACA899} - -/****************************************************************/ -/* 4. LINK COLOURS */ -/****************************************************************/ - -/* 4.1 This is the default for all links */ - -.pun A:link, .pun A:visited {COLOR: #60A0DC} -.pun A:hover {COLOR: #80D6FF} - -/* 4.2 This is the colour for links in header rows and the navigation bar */ - -.pun H2 A:link, .pun H2 A:visited {COLOR: #D4D4D4} -.pun H2 A:hover {COLOR: #D4D4D4} - -/* 4.3 This is for closed topics and "hot" links */ - -LI.postreport A:link, LI.postreport A:visited, TR.iclosed TD.tcl A:link, TR.iclosed TD.tcl A:visited {COLOR: #888} -LI.postreport A:hover, TR.iclosed TD.tcl A:hover {COLOR: #AAA} -LI.maintenancelink A:link, LI.maintenancelink A:visited {COLOR: #FF4000} -LI.maintenancelink A:hover {COLOR: #FF5010} - -/****************************************************************/ -/* 5. POST STATUS INDICATORS */ -/****************************************************************/ - -/* These are the post status indicators which appear at the left of some tables. -.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and -.isticky = sticky topics. The default is "icon". By default only .inew is different.*/ - -DIV.icon {BORDER-COLOR: #484848 #404040 #3C3C3C #444444} -TR.iredirect DIV.icon {BORDER-COLOR: #383838 #383838 #383838 #383838} -DIV.inew {BORDER-COLOR: #5496D8 #4B85C0 #4377AC #4F8DCB} \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/imports/Lithium_cs.css --- a/punbb/style/imports/Lithium_cs.css Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,111 +0,0 @@ -/****************************************************************/ -/* 1. BACKGROUND AND TEXT COLOURS */ -/****************************************************************/ - -/* 1.1 Default background colour and text colour */ - -BODY {BACKGROUND-COLOR: #FFF} - -.pun {COLOR: #333} - -DIV.box, .pun BLOCKQUOTE, DIV.codebox, #adminconsole FIELDSET TH, .rowodd, .roweven {BACKGROUND-COLOR: #F1F1F1} -#adminconsole TD, #adminconsole TH {BORDER-COLOR: #F1F1F1} - -/* 1. 2 Darker background colours */ - -TD.tc2, TD.tc3, TD.tcmod, #postpreview, #viewprofile DD, DIV.forminfo, -#adminconsole FIELDSET TD, DIV.blockmenu DIV.box, #adstats DD {BACKGROUND-COLOR: #DEDFDF} - -/* 1.3 Main headers and navigation bar background and text colour */ - -.pun H2, #brdmenu {BACKGROUND-COLOR: #6C8A3F; COLOR: #FFF} - -/* 1.4 Table header rows */ - -.pun TH, .bgc4 {BACKGROUND-COLOR: #D1D1D1} - -/* 1.5 Fieldset legend text colour */ - -.pun LEGEND {COLOR: #6C8A3F} - -/* 1.6 Highlighted text for various items */ - -.pun DIV.blockmenu LI.isactive A, #posterror LI STRONG {COLOR: #333} - -/****************************************************************/ -/* 2. POST BACKGROUNDS AND TEXT */ -/****************************************************************/ - -/* 2.1 This is the setup for posts. */ - -DIV.blockpost DIV.box, DIV.postright, DIV.postfootright {BACKGROUND-COLOR: #DEDFDF} -DIV.postright, DIV.postfootright {BORDER-LEFT-COLOR: #F1F1F1} -DIV.postleft, DIV.postfootleft, DIV.blockpost LABEL {BACKGROUND-COLOR: #F1F1F1} - -/* 2.2 Background for post headers and text colour for post numbers in viewtopic */ - -DIV.blockpost H2 {BACKGROUND-COLOR: #7EA34B} -DIV.blockpost H2 SPAN.conr {COLOR: #B7D094} - -/* 2.3 This is the line above the signature in posts. Colour and background should be the same */ - -.pun HR {BACKGROUND-COLOR: #333; COLOR: #333} - -/****************************************************************/ -/* 3. BORDER COLOURS */ -/****************************************************************/ - -/* 3.1 All external borders */ - -DIV.box {BORDER-COLOR: #6C8A3F} - -/* 3.2 Makes the top border of posts match the colour used for post headers */ - -DIV.blockpost DIV.box {BORDER-COLOR: #7EA34B #6C8A3F #6C8A3F} - -/* 3.3 Table internal borders. By default TH is same as background so border is invisible */ - -.pun TD {BORDER-COLOR: #CEDEB9} -.pun TH {BORDER-COLOR: #D1D1D1} - -/* 3.4 Creates the inset border for quote boxes, code boxes and form info boxes */ - -.pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL {BORDER-COLOR: #ACA899 #FFF #FFF #ACA899} - -/* 3.5 Gecko's default fieldset borders are really nasty so this gives them a colour -without interferring with IE's rather nice default */ - -.pun DIV>FIELDSET {BORDER-COLOR: #ACA899} - -/****************************************************************/ -/* 4. LINK COLOURS */ -/****************************************************************/ - -/* 4.1 This is the default for all links */ - -.pun A:link, .pun A:visited {COLOR: #638137} -.pun A:hover {COLOR: #8EB653} - -/* 4.2 This is the colour for links in header rows and the navigation bar */ - -.pun H2 A:link, .pun H2 A:visited, #brdmenu A:link, #brdmenu A:visited {COLOR: #FFF} -.pun H2 A:hover, #brdmenu A:hover {COLOR: #FFF} - -/* 4.3 This is for closed topics and "hot" links */ - -LI.postreport A:link, LI.postreport A:visited, TR.iclosed TD.tcl A:link, TR.iclosed TD.tcl A:visited {COLOR: #888} -LI.postreport A:hover, TR.iclosed TD.tcl A:hover {COLOR: #AAA} -LI.maintenancelink A:link, LI.maintenancelink A:visited {COLOR: #B42000} -LI.maintenancelink A:hover {COLOR: #B42000} - -/****************************************************************/ -/* 5. POST STATUS INDICATORS */ -/****************************************************************/ - -/* These are the post status indicators which appear at the left of some tables. -.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and -.isticky = sticky topics. The default is "icon". By default only .inew is different.*/ - -DIV.icon {BORDER-COLOR: #E6E6E6 #DEDEDE #DADADA #E2E2E2} -TR.iredirect DIV.icon {BORDER-COLOR: #F1F1F1 #F1F1F1 #F1F1F1 #F1F1F1} -DIV.inew {BORDER-COLOR: #8BB453 #7A9E48 #709142 #799C47} \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/imports/Mercury_cs.css --- a/punbb/style/imports/Mercury_cs.css Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +0,0 @@ -/****************************************************************/ -/* 1. BACKGROUND AND TEXT COLOURS */ -/****************************************************************/ - -/* 1.1 Default background colour and text colour */ - -BODY {BACKGROUND-COLOR: #2A2A2A} - -.pun {COLOR: #D4D4D4} - -DIV.box, #adminconsole FIELDSET TH, .rowodd, .roweven {BACKGROUND-COLOR: #383838} -#adminconsole TD, #adminconsole TH {BORDER-COLOR: #383838} - -/* 1. 2 Darker background colours */ - -TD.tc2, TD.tc3, TD.tcmod, #brdfooter DIV.box {BACKGROUND-COLOR: #424242} -#adminconsole FIELDSET TD, #viewprofile DD, DIV.forminfo, DIV.blockmenu DIV.box, #adstats DD {BACKGROUND-COLOR: #484848} - -.pun BLOCKQUOTE, DIV.codebox {BACKGROUND-COLOR: #353533} - -/* 1.3 Main headers and navigation bar background and text colour */ - -.pun H2, #brdmenu {BACKGROUND-COLOR: #565656; COLOR: #D4D4D4} - -/* 1.4 Table header rows */ - -.pun TH {BACKGROUND-COLOR: #484848} - -/* 1.5 Fieldset legend text colour */ - -.pun LEGEND {COLOR: #F6B620} - -/* 1.6 Highlighted text for various items */ - -.pun DIV.blockmenu LI.isactive A, #posterror LI STRONG {COLOR: #D4D4D4} - -/* 1.7 Dark background for form elements */ - -.pun TEXTAREA, .pun INPUT, .pun SELECT {BACKGROUND-COLOR: #2A2A2A; COLOR: #D4D4D4} - -/****************************************************************/ -/* 2. POST BACKGROUNDS AND TEXT */ -/****************************************************************/ - -/* 2.1 This is the setup for posts. */ - -DIV.blockpost DIV.box, DIV.postright, DIV.postfootright, #postpreview {BACKGROUND-COLOR: #383838} -DIV.postright, DIV.postfootright {BORDER-LEFT-COLOR: #424242} -DIV.postleft, DIV.postfootleft, DIV.blockpost LABEL {BACKGROUND-COLOR: #424242} - -/* 2.2 Background for post headers and text colour for post numbers in viewtopic */ - -DIV.blockpost H2 {BACKGROUND-COLOR: #565656} -DIV.blockpost H2 SPAN.conr {COLOR: #A19E96} - -/* 2.3 This is the line above the signature in posts. Colour and background should be the same */ - -.pun HR {BACKGROUND-COLOR: #606060; COLOR: #606060} - -/****************************************************************/ -/* 3. BORDER COLOURS */ -/****************************************************************/ - -/* 3.1 All external borders (H1 is the board title) */ - -DIV.box {BORDER-COLOR: #565656} - -/* 3.2 Makes the top border of posts match the colour used for post headers */ - -DIV.blockpost DIV.box {BORDER-COLOR: #565656 #525252 #525252} - -/* 3.3 Table internal borders. By default TH is same as background so border is invisible */ - -.pun TD {BORDER-COLOR: #565656} -.pun TH {BORDER-COLOR: #484848} - -/* 3.4 Creates the inset border for quote boxes, code boxes and form info boxes */ - -.pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL {BORDER-COLOR: #565656} - -/* 3.5 Gecko's default fieldset borders are really nasty so this gives them a colour -without interferring with IE's rather nice default */ - -.pun DIV>FIELDSET {BORDER-COLOR: #909090} - -/****************************************************************/ -/* 4. LINK COLOURS */ -/****************************************************************/ - -/* 4.1 This is the default for all links */ - -.pun A:link, .pun A:visited {COLOR: #F6B620} -.pun A:hover {COLOR: #FFEE40} - -/* 4.2 This is the colour for links in header rows and the navigation bar */ - -.pun H2 A:link, .pun H2 A:visited {COLOR: #D4D4D4} -.pun H2 A:hover {COLOR: #D4D4D4} - -/* 4.3 This is for closed topics and "hot" links */ - -LI.postreport A:link, LI.postreport A:visited, TR.iclosed TD.tcl A:link, TR.iclosed TD.tcl A:visited {COLOR: #888} -LI.postreport A:hover, TR.iclosed TD.tcl A:hover {COLOR: #AAA} -LI.maintenancelink A:link, LI.maintenancelink A:visited {COLOR: #FF4000} -LI.maintenancelink A:hover {COLOR: #FF5010} - -/****************************************************************/ -/* 5. POST STATUS INDICATORS */ -/****************************************************************/ - -/* These are the post status indicators which appear at the left of some tables. -.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and -.isticky = sticky topics. The default is "icon". By default only .inew is different.*/ - -DIV.icon {BORDER-COLOR: #484848 #404040 #3C3C3C #444444} -TR.iredirect DIV.icon {BORDER-COLOR: #383838 #383838 #383838 #383838} -DIV.inew {BORDER-COLOR: #F6B620 #ECAE1F #D09A1B #E1A61D} \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/imports/Oxygen_cs.css --- a/punbb/style/imports/Oxygen_cs.css Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,111 +0,0 @@ -/****************************************************************/ -/* 1. BACKGROUND AND TEXT COLOURS */ -/****************************************************************/ - -/* 1.1 Default background colour and text colour */ - -BODY {BACKGROUND-COLOR: #FFF} - -.pun {COLOR: #333} - -DIV.box, .pun BLOCKQUOTE, DIV.codebox, #adminconsole FIELDSET TH, .rowodd, .roweven {BACKGROUND-COLOR: #F1F1F1} -#adminconsole TD, #adminconsole TH {BORDER-COLOR: #F1F1F1} - -/* 1. 2 Darker background colours */ - -TD.tc2, TD.tc3, TD.tcmod, #postpreview, #viewprofile DD, DIV.forminfo, -#adminconsole FIELDSET TD, DIV.blockmenu DIV.box, #adstats DD {BACKGROUND-COLOR: #DEDFDF} - -/* 1.3 Main headers and navigation bar background and text colour */ - -.pun H2, #brdmenu {BACKGROUND-COLOR: #0066B9; COLOR: #FFF} - -/* 1.4 Table header rows */ - -.pun TH {BACKGROUND-COLOR: #D1D1D1} - -/* 1.5 Fieldset legend text colour */ - -.pun LEGEND {COLOR: #005CB1} - -/* 1.6 Highlighted text for various items */ - -.pun DIV.blockmenu LI.isactive A, #posterror LI STRONG {COLOR: #333} - -/****************************************************************/ -/* 2. POST BACKGROUNDS AND TEXT */ -/****************************************************************/ - -/* 2.1 This is the setup for posts. */ - -DIV.blockpost DIV.box, DIV.postright, DIV.postfootright {BACKGROUND-COLOR: #DEDFDF} -DIV.postright, DIV.postfootright {BORDER-LEFT-COLOR: #f1f1f1} -DIV.postleft, DIV.postfootleft, DIV.blockpost LABEL {BACKGROUND-COLOR: #F1F1F1} - -/* 2.2 Background for post headers and text colour for post numbers in viewtopic */ - -DIV.blockpost H2 {BACKGROUND-COLOR: #006FC9} -DIV.blockpost H2 SPAN.conr {COLOR: #AABDCD} - -/* 2.3 This is the line above the signature in posts. Colour and background should be the same */ - -.pun HR {BACKGROUND-COLOR: #333; COLOR: #333} - -/****************************************************************/ -/* 3. BORDER COLOURS */ -/****************************************************************/ - -/* 3.1 All external borders */ - -DIV.box {BORDER-COLOR: #0066B9} - -/* 3.2 Makes the top border of posts match the colour used for post headers */ - -DIV.blockpost DIV.box {BORDER-COLOR: #006fC9 #0066B9 #0066B9} - -/* 3.3 Table internal borders. By default TH is same as background so border is invisible */ - -.pun TD {BORDER-COLOR: #BBCEDE} -.pun TH {BORDER-COLOR: #D1D1D1} - -/* 3.4 Creates the inset border for quote boxes, code boxes and form info boxes */ - -.pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL {BORDER-COLOR: #ACA899 #FFF #FFF #ACA899} - -/* 3.5 Gecko's default fieldset borders are really nasty so this gives them a colour -without interferring with IE's rather nice default */ - -.pun DIV>FIELDSET {BORDER-COLOR: #ACA899} - -/****************************************************************/ -/* 4. LINK COLOURS */ -/****************************************************************/ - -/* 4.1 This is the default for all links */ - -.pun A:link, .pun A:visited {COLOR: #005CB1} -.pun A:hover {COLOR: #B42000} - -/* 4.2 This is the colour for links in header rows and the navigation bar */ - -.pun H2 A:link, .pun H2 A:visited, #brdmenu A:link, #brdmenu A:visited {COLOR: #FFF} -.pun H2 A:hover, #brdmenu A:hover {COLOR: #FFF} - -/* 4.3 This is for closed topics and "hot" links */ - -LI.postreport A:link, LI.postreport A:visited, TR.iclosed TD.tcl A:link, TR.iclosed TD.tcl A:visited {COLOR: #888} -LI.postreport A:hover, TR.iclosed TD.tcl A:hover {COLOR: #AAA} -LI.maintenancelink A:link, LI.maintenancelink A:visited {COLOR: #B42000} -LI.maintenancelink A:hover {COLOR: #B42000} - -/****************************************************************/ -/* 5. POST STATUS INDICATORS */ -/****************************************************************/ - -/* These are the post status indicators which appear at the left of some tables. -.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and -.isticky = sticky topics. The default is "icon". By default only .inew is different.*/ - -DIV.icon {BORDER-COLOR: #E6E6E6 #DEDEDE #DADADA #E2E2E2} -TR.iredirect DIV.icon {BORDER-COLOR: #F1F1F1 #F1F1F1 #F1F1F1 #F1F1F1} -DIV.inew {BORDER-COLOR: #0080D7 #0065C0 #0058B3 #0072CA} \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/imports/Radium_cs.css --- a/punbb/style/imports/Radium_cs.css Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -/****************************************************************/ -/* 1. BACKGROUND AND TEXT COLOURS */ -/****************************************************************/ - -/* 1.1 Default background colour and text colour */ - -BODY {BACKGROUND-COLOR: #2A2A2A} - -.pun {COLOR: #D4D4D4} - -DIV.box, #adminconsole FIELDSET TH, .rowodd, .roweven {BACKGROUND-COLOR: #383838} -#adminconsole TD, #adminconsole TH {BORDER-COLOR: #383838} - -/* 1. 2 Darker background colours */ - -TD.tc2, TD.tc3, TD.tcmod, #brdfooter DIV.box {BACKGROUND-COLOR: #424242} -#adminconsole FIELDSET TD, #viewprofile DD, DIV.forminfo, DIV.blockmenu DIV.box, #adstats DD {BACKGROUND-COLOR: #484848} - -.pun BLOCKQUOTE, DIV.codebox {BACKGROUND-COLOR: #353533} - -/* 1.3 Main headers and navigation bar background and text colour */ - -.pun H2, #brdmenu {BACKGROUND-COLOR: #565656; COLOR: #D4D4D4} - -/* 1.4 Table header rows */ - -.pun TH, .bgc4 {BACKGROUND-COLOR: #484848} - -/* 1.5 Fieldset legend text colour */ - -.pun LEGEND {COLOR: #60C860} - -/* 1.6 Highlighted text for various items */ - -.pun DIV.blockmenu LI.isactive A, #posterror LI STRONG {COLOR: #D4D4D4} - -/* 1.7 Dark background for form elements */ - -.pun TEXTAREA, .pun INPUT, .pun SELECT {BACKGROUND-COLOR: #2A2A2A; COLOR: #D4D4D4} - -/****************************************************************/ -/* 2. POST BACKGROUNDS AND TEXT */ -/****************************************************************/ - -/* 2.1 This is the setup for posts. */ - -DIV.blockpost DIV.box, DIV.postright, DIV.postfootright, #postpreview {BACKGROUND-COLOR: #383838} -DIV.postright, DIV.postfootright {BORDER-LEFT-COLOR: #424242} -DIV.postleft, DIV.postfootleft, DIV.blockpost LABEL {BACKGROUND-COLOR: #424242} - -/* 2.2 Background for post headers and text colour for post numbers in viewtopic */ - -DIV.blockpost H2 {BACKGROUND-COLOR: #565656} -DIV.blockpost H2 SPAN.conr {COLOR: #A19E96} - -/* 2.3 This is the line above the signature in posts. Colour and background should be the same */ - -.pun HR {BACKGROUND-COLOR: #606060; COLOR: #606060} - -/****************************************************************/ -/* 3. BORDER COLOURS */ -/****************************************************************/ - -/* 3.1 All external borders (H1 is the board title) */ - -DIV.box {BORDER-COLOR: #565656} - -/* 3.2 Makes the top border of posts match the colour used for post headers */ - -DIV.blockpost DIV.box {BORDER-COLOR: #565656 #525252 #525252} - -/* 3.3 Table internal borders. By default TH is same as background so border is invisible */ - -.pun TD {BORDER-COLOR: #565656} -.pun TH {BORDER-COLOR: #484848} - -/* 3.4 Creates the inset border for quote boxes, code boxes and form info boxes */ - -.pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL {BORDER-COLOR: #606060} - -/* 3.5 Gecko's default fieldset borders are really nasty so this gives them a colour -without interferring with IE's rather nice default */ - -.pun DIV>FIELDSET {BORDER-COLOR: #ACA899} - -/****************************************************************/ -/* 4. LINK COLOURS */ -/****************************************************************/ - -/* 4.1 This is the default for all links */ - -.pun A:link, .pun A:visited {COLOR: #60C860} -.pun A:hover {COLOR: #80EE80} - -/* 4.2 This is the colour for links in header rows and the navigation bar */ - -.pun H2 A:link, .pun H2 A:visited {COLOR: #D4D4D4} -.pun H2 A:hover {COLOR: #D4D4D4} - -/* 4.3 This is for closed topics and "hot" links */ - -LI.postreport A:link, LI.postreport A:visited, TR.iclosed TD.tcl A:link, TR.iclosed TD.tcl A:visited {COLOR: #888} -LI.postreport A:hover, TR.iclosed TD.tcl A:hover {COLOR: #AAA} -LI.maintenancelink A:link, LI.maintenancelink A:visited {COLOR: #FF4000} -LI.maintenancelink A:hover {COLOR: #FF5010} - -/****************************************************************/ -/* 5. POST STATUS INDICATORS */ -/****************************************************************/ - -/* These are the post status indicators which appear at the left of some tables. -.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and -.isticky = sticky topics. The default is "icon". By default only .inew is different.*/ - -DIV.icon {BORDER-COLOR: #484848 #404040 #3C3C3C #444444} -TR.iredirect DIV.icon {BORDER-COLOR: #383838 #383838 #383838 #383838} -DIV.inew {BORDER-COLOR: #60C860 #54AF54 #499849 #59B657} - -/* 5.2 Class .tclcon is a div inside the first column of tables with post indicators. The -margin creates space for the post status indicator */ - -TD DIV.tclcon {MARGIN-LEFT: 2.3em} diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/imports/Sulfur_cs.css --- a/punbb/style/imports/Sulfur_cs.css Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,111 +0,0 @@ -/****************************************************************/ -/* 1. BACKGROUND AND TEXT COLOURS */ -/****************************************************************/ - -/* 1.1 Default background colour and text colour */ - -BODY {BACKGROUND-COLOR: #FFF} - -.pun {COLOR: #333} - -DIV.box, .pun BLOCKQUOTE, DIV.codebox, #adminconsole FIELDSET TH, .rowodd, .roweven {BACKGROUND-COLOR: #F1F1F1} -#adminconsole TD, #adminconsole TH {BORDER-COLOR: #F1F1F1} - -/* 1. 2 Darker background colours */ - -TD.tc2, TD.tc3, TD.tcmod, #postpreview, #viewprofile DD, DIV.forminfo, -#adminconsole FIELDSET TD, DIV.blockmenu DIV.box, #adstats DD {BACKGROUND-COLOR: #DEDFDF} - -/* 1.3 Main headers and navigation bar background and text colour */ - -.pun H2, #brdmenu {BACKGROUND-COLOR: #B84623; COLOR: #FFF} - -/* 1.4 Table header rows */ - -.pun TH {BACKGROUND-COLOR: #D1D1D1} - -/* 1.5 Fieldset legend text colour */ - -.pun LEGEND {COLOR: #822100} - -/* 1.6 Highlighted text for various items */ - -.pun DIV.blockmenu LI.isactive A, #posterror LI STRONG {COLOR: #333} - -/****************************************************************/ -/* 2. POST BACKGROUNDS AND TEXT */ -/****************************************************************/ - -/* 2.1 This is the setup for posts. */ - -DIV.blockpost DIV.box, DIV.postright, DIV.postfootright {BACKGROUND-COLOR: #DEDFDF} -DIV.postright, DIV.postfootright {BORDER-LEFT-COLOR: #F1F1F1} -DIV.postleft, DIV.postfootleft, DIV.blockpost LABEL {BACKGROUND-COLOR: #F1F1F1} - -/* 2.2 Background for post headers and text colour for post numbers in viewtopic */ - -DIV.blockpost H2 {BACKGROUND-COLOR: #D25028} -DIV.blockpost H2 SPAN.conr {COLOR: #FCCFC1} - -/* 2.3 This is the line above the signature in posts. Colour and background should be the same */ - -.pun HR {BACKGROUND-COLOR: #333; COLOR: #333} - -/****************************************************************/ -/* 3. BORDER COLOURS */ -/****************************************************************/ - -/* 3.1 All external borders */ - -DIV.box {BORDER-COLOR: #B84623} - -/* 3.2 Makes the top border of posts match the colour used for post headers */ - -DIV.blockpost DIV.box {BORDER-COLOR: #D25028 #B84623 #B84623} - -/* 3.3 Table internal borders. By default TH is same as background so border is invisible */ - -.pun TD {BORDER-COLOR: #E1C3C3} -.pun TH {BORDER-COLOR: #D1D1D1} - -/* 3.4 Creates the inset border for quote boxes, code boxes and form info boxes */ - -.pun BLOCKQUOTE, DIV.codebox, DIV.forminfo, DIV.blockpost LABEL {BORDER-COLOR: #ACA899 #FFF #FFF #ACA899} - -/* 3.5 Gecko's default fieldset borders are really nasty so this gives them a colour -without interferring with IE's rather nice default */ - -.pun DIV>FIELDSET {BORDER-COLOR: #ACA899} - -/****************************************************************/ -/* 4. LINK COLOURS */ -/****************************************************************/ - -/* 4.1 This is the default for all links */ - -.pun A:link, .pun A:visited {COLOR: #822100} -.pun A:hover {COLOR: #CA3300} - -/* 4.2 This is the colour for links in header rows and the navigation bar */ - -.pun H2 A:link, .pun H2 A:visited, #brdmenu A:link, #brdmenu A:visited {COLOR: #FFF} -.pun H2 A:hover, #brdmenu A:hover {COLOR: #FFF} - -/* 4.3 This is for closed topics and "hot" links */ - -LI.postreport A:link, LI.postreport A:visited, TR.iclosed TD.tcl A:link, TR.iclosed TD.tcl A:visited {COLOR: #888} -LI.postreport A:hover, TR.iclosed TD.tcl A:hover {COLOR: #AAA} -LI.maintenancelink A:link, LI.maintenancelink A:visited {COLOR: #B42000} -LI.maintenancelink A:hover {COLOR: #B42000} - -/****************************************************************/ -/* 5. POST STATUS INDICATORS */ -/****************************************************************/ - -/* These are the post status indicators which appear at the left of some tables. -.inew = new posts, .iredirect = redirect forums, .iclosed = closed topics and -.isticky = sticky topics. The default is "icon". By default only .inew is different.*/ - -DIV.icon {BORDER-COLOR: #E6E6E6 #DEDEDE #DADADA #E2E2E2} -TR.iredirect DIV.icon {BORDER-COLOR: #F1F1F1 #F1F1F1 #F1F1F1 #F1F1F1} -DIV.inew {BORDER-COLOR: #C23000 #AF2C00 #992600 #AC2B00} \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/imports/base.css --- a/punbb/style/imports/base.css Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,273 +0,0 @@ -/****************************************************************/ -/* 1. INITIAL SETTINGS */ -/****************************************************************/ - -.pun TABLE, .pun DIV, .pun FORM, .pun P, .pun H1, .pun H2, .pun H3, -.pun H4, .pun PRE, .pun BLOCKQUOTE, .pun UL, .pun OL, .pun LI, .pun DL, -.pun DT, .pun DD, .pun TH, .pun TD, .pun FIELDSET, .pun IMG { - MARGIN: 0px; - PADDING: 0px; - FONT-WEIGHT: normal; - LIST-STYLE: none; -} - -.pun IMG {BORDER: none} - -.pun INPUT, .pun SELECT, .pun TEXTAREA, .pun OPTGROUP {MARGIN: 0} - -/****************************************************************/ -/* 2. STRUCTURAL SETTINGS - VERY IMPORTANT - DO NOT CHANGE */ -/****************************************************************/ - -/* 2.1 Clearing floats and invisible items */ -.pun .clearer, .pun .nosize { - HEIGHT: 0; - WIDTH: 0; - LINE-HEIGHT: 0; - FONT-SIZE: 0; - OVERFLOW: hidden -} - -.pun .clearer, .pun .clearb {CLEAR: both} -.pun .nosize {POSITION: absolute; LEFT: -10000px} - -/* 2.2 Overflow settings for posts */ - -DIV.blockpost DIV.box, DIV.postleft, DIV.postsignature, DIV.postmsg {OVERFLOW: hidden} - -/****************************************************************/ -/* 3. BUG FIXES - VERY IMPORTANT - DO NOT CHANGE */ -/****************************************************************/ - -/* 3.1 This attempts to eliminate rounding errors in Gecko browsers. */ - -DIV>DIV>DIV.postfootleft, DIV>DIV>DIV.postfootright {PADDING-TOP: 1px; MARGIN-TOP: -1px} - -/* 3.2 This is only visible to IE6 Windows and cures various bugs. Do not alter comments */ - -/* Begin IE6Win Fix \*/ -* HTML .inbox, * HTML .inform, * HTML .pun, * HTML .intd, * HTML .tclcon {HEIGHT: 1px} -* HTML .inbox DIV.postmsg {WIDTH: 98%} -/* End of IE6Win Fix */ - -/* 3.3 This is the equivelant of 3.2 but for IE7. It is visible to other browsers -but does no harm */ - -/*Begin IE7Win Fix */ -.pun, .pun .inbox, .pun .inform, .pun .intd, .pun .tclcon {min-height: 1px} -/* End of IE7Win Fix */ - -/****************************************************************/ -/* 4. HIDDEN ELEMENTS */ -/****************************************************************/ - -/* These are hidden in normal display. Add comments to make them visible */ - -#brdfooter H2, #brdstats H2, #brdstats .conl DT, #brdstats .conr DT, -#modcontrols DT, #searchlinks DT, DIV.postright H3 { - POSITION: absolute; - DISPLAY: block; - OVERFLOW: hidden; - WIDTH: 1em; - LEFT: -999em -} - -/****************************************************************/ -/* 5. BOX CONTAINERS AND FLOATS */ -/****************************************************************/ - -/* 5.1. Setup all left and right content using floats. */ - -.conr { - FLOAT: right; - TEXT-ALIGN: right; - CLEAR: right; - WIDTH: 40% -} - -.conl { - FLOAT: left; - WIDTH: 55%; - OVERFLOW: hidden; - WHITE-SPACE: nowrap -} - -LABEL.conl { - WIDTH: auto; - OVERFLOW: visible; - MARGIN-RIGHT: 10px -} - -/* 5.2 Set up page numbering and posts links */ - -DIV.linkst .conl, DIV.linksb .conl, DIV.postlinksb .conl {WIDTH:18em} - -DIV.linkst .conr, DIV.linksb .conr, DIV.postlinksb .conr {WIDTH:16em} - -FORM DIV.linksb .conr {WIDTH: 32em} - -/* 5.3 Keep breadcrumbs from shifting to the right when wrapping */ - -.linkst UL, linksb UL, .postlinksb UL {MARGIN-LEFT: 18em} - -/* 5.4 Settings for Profile and Admin interface.*/ - -DIV.block2col {PADDING-BOTTOM: 1px} - -DIV.block2col DIV.blockform, DIV.block2col DIV.block, #viewprofile DD {MARGIN-LEFT: 14em} - -DIV.blockmenu, #viewprofile DT { - FLOAT:left; - WIDTH: 13em -} - -#profileavatar IMG { - FLOAT: right; - MARGIN-LEFT: 1em -} - -#viewprofile DL {FLOAT: left; WIDTH: 100%; OVERFLOW: hidden} - -/****************************************************************/ -/* 6. TABLE SETUP */ -/****************************************************************/ - -/* 6.1 Table Basic Setup */ - -.pun TABLE {WIDTH: 100%} - -/* 6.2 Fixed Table Setup */ - -#punindex TABLE, #vf TABLE {TABLE-LAYOUT: fixed} - -.tcl {TEXT-ALIGN: left; WIDTH: 50%} - -.tc2, .tc3, .tcmod {WIDTH: 9%; TEXT-ALIGN: center} - -.tcr {WIDTH: 32%; TEXT-ALIGN: left} - -#punsearch #vf .tcl, #punmoderate #vf .tcl {WIDTH: 41%} - -#punsearch #vf .tc2 {WIDTH: 18%; TEXT-ALIGN: left} - -.tcl, .tcr {OVERFLOW: HIDDEN} - -/* 6.3 Other Table Setup */ - -#users1 .tcl {WIDTH: 40%} - -#users1 .tcr {WIDTH: 25%} - -#users1 .tc2 {WIDTH: 25%; TEXT-ALIGN: left} - -#users1 .tc3 {WIDTH: 10%; TEXT-ALIGN: center} - -#debug .tcr {WIDTH: 85%; WHITE-SPACE: normal} - -#punindex TD.tcr SPAN.byuser {DISPLAY: block} - -/****************************************************************/ -/* 7. VIEWTOPIC SETUP */ -/****************************************************************/ - -/* 7.1 This is the basic structure. */ - -DIV.postleft, DIV.postfootleft { - FLOAT:left; - WIDTH: 18em; - OVERFLOW: hidden; - POSITION: relative; -} - -DIV.postright, DIV.postfootright { - BORDER-LEFT-WIDTH: 18em; - BORDER-LEFT-STYLE: solid -} - -DIV.postfootright, P.multidelete {TEXT-ALIGN: right} - -DIV.blockpost>DIV>DIV.inbox {PADDING-BOTTOM: 1px} - -/* 7.3 This is the div which actually contains the post and is inside .postright */ - -DIV.postmsg {WIDTH:100%} - -/* 7.4 These items control overflow and scrolling within posts. */ - -DIV.incqbox {WIDTH: 100%; OVERFLOW: hidden} -DIV.scrollbox {WIDTH: 100%; OVERFLOW: auto} -IMG.postimg {max-width: 100%} -A .postimg {max-width: 100%} - -/* 7.5 Turn off the poster information column for preview */ - -#postpreview DIV.postright {BORDER-LEFT: none} - -/* 7.6 Create the horizontal line above signatures */ - -DIV.postsignature HR { - MARGIN-LEFT: 0px; - WIDTH: 200px; - TEXT-ALIGN: left; - HEIGHT: 1px; - BORDER:none -} - -/* 7.7 Maximum height for search results as posts. Position go to post link */ - -DIV.searchposts DIV.postmsg {HEIGHT: 8em} -DIV.searchposts DD P {PADDING-TOP: 3em} - -/* 7.8 Class for bbcode [u] */ - -SPAN.bbu {TEXT-DECORATION: underline} - -/****************************************************************/ -/* 8. LISTS SPECIAL SETTINGS */ -/****************************************************************/ - -/* 8.1 Horizontal display of online list, main navigation menu and breadcrumbs */ - -#onlinelist DD, #onlinelist DT, #brdmenu LI, DIV.linkst LI, DIV.linksb LI, DIV.postlinksb LI, -DIV.postfootright LI, UL.bblinks LI { - DISPLAY: inline; - HEIGHT: 0 -} - -/* 8.2 Turn on square icon for posterror list */ - -#posterror UL LI {LIST-STYLE: square inside} - -/* 8.3 Right alignment of descriptions in ordinary member view of other members profiles */ - -#viewprofile DT {TEXT-ALIGN: right} - -/****************************************************************/ -/* 9. FORM SETTINGS */ -/****************************************************************/ - -/* 9.1 Makes textareas and long text inputs shrink with page */ - -DIV.txtarea {WIDTH: 75%} - -DIV.txtarea TEXTAREA, INPUT.longinput {WIDTH: 100%} - -.pun LABEL {DISPLAY: block} - -#qjump SELECT {WIDTH: 50%} - -/****************************************************************/ -/* 10. HELP FILES AND MISC. */ -/****************************************************************/ - -/* 10.1 Put some space between sections of the help file */ - -#helpfile H2 {MARGIN-TOP: 12px} - -/* 10.2 Internal padding */ - -#helpfile DIV.box {PADDING: 10px} - -/* 10.3 Other templates */ - -#punredirect DIV.block, #punmaint DIV.block {MARGIN: 50px 20% 12px 20%} diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/imports/base_admin.css --- a/punbb/style/imports/base_admin.css Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -#adminconsole .block2 {MARGIN-TOP: 12px} - -/*** Admin Main Content ***/ -* HTML #adstats DD {HEIGHT: 1%} -#adstats DD {MARGIN-LEFT: 14em; PADDING: 3px; MARGIN-BOTTOM: 5px; LINE-HEIGHT: 1.5em} -#adstats DT {FLOAT:left; WIDTH: 13em; PADDING: 3px; line-height: 1.5em} -#adstats {PADDING: 15px 15px 5px 10px} -#adintro {PADDING: 5px} -#adintro P {PADDING: 10px} -#adstats DL {PADDING: 5px 0 10px 5px} - -#adminconsole FIELDSET TD {TEXT-ALIGN: left; PADDING: 4px; WHITE-SPACE: normal} -#adminconsole FIELDSET TH {TEXT-ALIGN: left; PADDING: 4px; WHITE-SPACE: normal} -#adminconsole FIELDSET TD SPAN, #adminconsole FIELDSET TH SPAN {DISPLAY: block; FONT-SIZE: 1em; FONT-WEIGHT: normal} -#adminconsole TH {WIDTH: 15em; FONT-WEIGHT: bold} -#adminconsole INPUT, #adminconsole SELECT, #adminconsole TEXTAREA {MARGIN-BOTTOM: 0; MARGIN-TOP: 0; FONT-WEIGHT: normal} -#adminconsole TABLE.aligntop TH, #adminconsole TABLE.aligntop TD {VERTICAL-ALIGN: top} -#adminconsole TABLE.aligntop TH {PADDING-TOP: 0.7em} -#adminconsole TD, #adminconsole TH {BORDER-STYLE: solid; BORDER-WIDTH: 3px 0px 3px 0px} -#adminconsole P {PADDING-BOTTOM: 6px} -#adminconsole .topspace {PADDING-TOP: 6px} -#adminconsole P.submittop, #adminconsole P.submitend {TEXT-ALIGN: center} -#adminconsole TH.hidehead {COLOR: #f1f1f1} -#adminconsole THEAD TH {PADDING-BOTTOM: 0px} -#adminconsole P.linkactions {FONT-WEIGHT: bold; PADDING-LEFT: 5px} -#adminconsole TH INPUT, #adminconsole DIV.fsetsubmit {MARGIN-TOP: 6px} - -/*** Particular table settings ***/ -#categoryedit .tcl {WIDTH: 25%} -#censoring .tcl, #censoring .tc2, #ranks .tcl, #ranks .tc2 {WIDTH: 20%} -TABLE#forumperms TH, TABLE#forumperms TD {WHITE-SPACE: normal; WIDTH: auto; TEXT-ALIGN: center} -TABLE#forumperms .atcl {TEXT-ALIGN: left; WIDTH: 15em; WHITE-SPACE: nowrap} -#adminconsole TD.nodefault {BACKGROUND-COLOR: #D59B9B} - -/*** User Search Result Tables ***/ -#users2 TH, #users2 TH {TEXT-ALIGN: left} -#users2 .tcl, #users2 .tc3, #users2 .tc5 {WIDTH: 15%; TEXT-ALIGN: left} -#users2 .tc2 {WIDTH: 22%; TEXT-ALIGN: left} -#users2 .tc4 {WIDTH: 8%} -#users2 .tc4 {TEXT-ALIGN: center} -#users2 .tcr {WHITE-SPACE: nowrap} -#adminconsole #linkst, #adminconsole #linksb A {FONT-WEIGHT: bold} - -/*** Plugins ***/ -#exampleplugin .inbox {PADDING: 6px 6px 0px 6px} diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/imports/index.html --- a/punbb/style/imports/index.html Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - -. - - -. - - \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/imports/minmax.js --- a/punbb/style/imports/minmax.js Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -// minmax.js - written by Andrew Clover -// Adapted for PunBB by Rickard Andersson and Paul Sullivan - -/*@cc_on -@if (@_win32 && @_jscript_version>4) - -var minmax_elements; - -function minmax_bind(el) { - var em, ms; - var st= el.style, cs= el.currentStyle; - - if (minmax_elements==window.undefined) { - if (!document.body || !document.body.currentStyle) return; - minmax_elements= new Array(); - window.attachEvent('onresize', minmax_delayout); - } - - if (cs['max-width']) - st['maxWidth']= cs['max-width']; - - ms= cs['maxWidth']; - if (ms && ms!='auto' && ms!='none' && ms!='0' && ms!='') { - st.minmaxWidth= cs.width; - minmax_elements[minmax_elements.length]= el; - minmax_delayout(); - } -} - -var minmax_delaying= false; -function minmax_delayout() { - if (minmax_delaying) return; - minmax_delaying= true; - window.setTimeout(minmax_layout, 0); -} - -function minmax_stopdelaying() { - minmax_delaying= false; -} - -function minmax_layout() { - window.setTimeout(minmax_stopdelaying, 100); - var i, el, st, cs, optimal, inrange; - for (i= minmax_elements.length; i-->0;) { - el= minmax_elements[i]; st= el.style; cs= el.currentStyle; - - st.width= st.minmaxWidth; optimal= el.offsetWidth; - inrange= true; - if (inrange && cs.minWidth && cs.minWidth!='0' && cs.minWidth!='auto' && cs.minWidth!='') { - st.width= cs.minWidth; - inrange= (el.offsetWidthoptimal); - } - if (inrange) st.width= st.minmaxWidth; - } -} - -var minmax_SCANDELAY= 500; - -function minmax_scan() { - var el; - for (var i= 0; i - -. - - -. - - \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/style/print.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/style/print.css Sat Apr 05 23:56:45 2008 -0400 @@ -0,0 +1,36 @@ +/* This is just a test stylesheet to be completed later */ + +.pun-common, +.pun-form, +.pun-modmenu, +.pun-mainhead, +.pun-mainfoot, +.postlinks, +#pun-maintitle, +.post dt span, +.pun-main h2 span.item2 { + display: none + } + +.post { + border-bottom: 1px dashed black; + margin-bottom: 2em; + padding-bottom: 1em; + } + +.post ul, .post dd { + list-style: none; + padding: 0; + margin: 0; + } + +.post dt { + border-top: 1px dotted #666; + width: 40%; + padding-bottom: 0.5em; + } + +.pun-main h2 { + padding-bottom: 0.2em; + border-bottom: 1px solid black; + } \ No newline at end of file diff -r e3d7322305bf -r 5e1f1e916419 punbb/userlist.php --- a/punbb/userlist.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,196 +0,0 @@ -= USER_LEVEL_MEMBER) ? true : false; - -$username = (isset($_GET['username']) && $pun_user['g_search_users'] == '1') ? pun_trim($_GET['username']) : ''; -$show_group = (!isset($_GET['show_group']) || intval($_GET['show_group']) < -1 && intval($_GET['show_group']) > 2) ? -1 : intval($_GET['show_group']); -$sort_by = (!isset($_GET['sort_by']) || $_GET['sort_by'] != 'username' && $_GET['sort_by'] != 'registered' && ($_GET['sort_by'] != 'num_posts' || !$show_post_count)) ? 'username' : $_GET['sort_by']; -$sort_dir = (!isset($_GET['sort_dir']) || $_GET['sort_dir'] != 'ASC' && $_GET['sort_dir'] != 'DESC') ? 'ASC' : strtoupper($_GET['sort_dir']); - - -$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['User list']; -if ($pun_user['g_search_users'] == '1') - $focus_element = array('userlist', 'username'); - -define('PUN_ALLOW_INDEX', 1); -require PUN_ROOT.'header.php'; - -?> -
    -

    -
    -
    -
    -
    - -
    - - - - -

    -
    -
    -
    -

    -
    -
    -
    -escape(str_replace('*', '%', $username)).'\''; -if ($show_group > -1) - $where_sql[] = 'u.group_id='.$show_group; - -// Fetch user count -$result = $pun_db->query('SELECT COUNT(id) FROM '.$pun_db->prefix.'users AS u LEFT JOIN '.table_prefix.'users AS eu ON eu.user_id=u.id WHERE u.id>1'.(!empty($where_sql) ? ' AND '.implode(' AND ', $where_sql) : '')) or error('Unable to fetch user list count', __FILE__, __LINE__, $pun_db->error()); -$num_users = $pun_db->result($result); - - -// Determine the user offset (based on $_GET['p']) -$num_pages = ceil($num_users / 50); - -$p = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p']; -$start_from = 50 * ($p - 1); - -// Generate paging links -$paging_links = $lang_common['Pages'].': '.pun_paginate($num_pages, $p, 'userlist.php?username='.urlencode($username).'&show_group='.$show_group.'&sort_by='.$sort_by.'&sort_dir='.strtoupper($sort_dir)); - - -?> -
    -
    - -
    -
    - -
    -

    -
    -
    - - - - - - - - - - -query('SELECT u.id, eu.username, u.title, u.num_posts, eu.reg_time AS registered, g.g_id, g.g_user_title FROM '.$pun_db->prefix.'users AS u LEFT JOIN '.table_prefix.'users AS eu ON eu.user_id=u.id LEFT JOIN '.$pun_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__, $pun_db->error()); -if ($pun_db->num_rows($result)) -{ - while ($user_data = $pun_db->fetch_assoc($result)) - { - $user_title_field = get_title($user_data); - -?> - - - - - - - -'."\n\t\t\t\t\t".''."\n"; - -?> - -
    '.pun_htmlspecialchars($user_data['username']).'' ?>
    '.$lang_search['No hits'].'
    -
    -
    -
    - -
    -
    - -
    -
    -query('SELECT f.forum_name, f.redirect_url, f.moderators, f.num_topics, f.sort_by, fp.post_topics FROM '.$pun_db->prefix.'forums AS f LEFT JOIN '.$pun_db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND f.id='.$id) or error('Unable to fetch forum info', __FILE__, __LINE__, $pun_db->error()); -if (!$pun_db->num_rows($result)) - message($lang_common['Bad request']); - -$cur_forum = $pun_db->fetch_assoc($result); - -// Is this a redirect forum? In that case, redirect! -if ($cur_forum['redirect_url'] != '') -{ - header('Location: '.$cur_forum['redirect_url']); - exit; -} - -// Sort out who the moderators are and if we are currently a moderator (or an admin) -$mods_array = array(); -if ($cur_forum['moderators'] != '') - $mods_array = unserialize($cur_forum['moderators']); - -$is_admmod = ($pun_user['g_id'] == PUN_ADMIN || ($pun_user['g_id'] == PUN_MOD && array_key_exists($pun_user['username'], $mods_array))) ? true : false; - -// Can we or can we not post new topics? -if (($cur_forum['post_topics'] == '' && $pun_user['g_post_topics'] == '1') || $cur_forum['post_topics'] == '1' || $is_admmod) - $post_link = "\t\t".''."\n"; -else - $post_link = ''; - - -// Determine the topic offset (based on $_GET['p']) -$num_pages = ceil($cur_forum['num_topics'] / $pun_user['disp_topics']); - -$p = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p']; -$start_from = $pun_user['disp_topics'] * ($p - 1); - -// Generate paging links -$paging_links = $lang_common['Pages'].': '.pun_paginate($num_pages, $p, makeUrlNS('Special', 'Forum/ViewForum', 'id=' . $id)); - - -$page_title = pun_htmlspecialchars($pun_config['o_board_title'].' / '.$cur_forum['forum_name']); -define('PUN_ALLOW_INDEX', 1); -require PUN_ROOT.'header.php'; - -?> -
    -
    - - -
    •  
    • » 
    -
    -
    -
    - -
    -

    -
    -
    - - - - - - - - - - -prefix.'topics WHERE forum_id='.$id.' ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics']; -} -else -{ - // With "the dot" - switch ($db_type) - { - case 'mysql': - case 'mysqli': - $sql = 'SELECT p.poster_id AS has_posted, t.id, t.subject, t.poster, 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 FROM '.$pun_db->prefix.'topics AS t LEFT JOIN '.$pun_db->prefix.'posts AS p ON t.id=p.topic_id AND p.poster_id='.$pun_user['id'].' WHERE t.forum_id='.$id.' GROUP BY t.id ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics']; - break; - - case 'sqlite': - $sql = 'SELECT p.poster_id AS has_posted, t.id, t.subject, t.poster, 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 FROM '.$pun_db->prefix.'topics AS t LEFT JOIN '.$pun_db->prefix.'posts AS p ON t.id=p.topic_id AND p.poster_id='.$pun_user['id'].' WHERE t.id IN(SELECT id FROM '.$pun_db->prefix.'topics WHERE forum_id='.$id.' ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'].') GROUP BY t.id ORDER BY t.sticky DESC, t.last_post DESC'; - break; - - default: - $sql = 'SELECT p.poster_id AS has_posted, t.id, t.subject, t.poster, 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 FROM '.$pun_db->prefix.'topics AS t LEFT JOIN '.$pun_db->prefix.'posts AS p ON t.id=p.topic_id AND p.poster_id='.$pun_user['id'].' WHERE t.forum_id='.$id.' GROUP BY t.id, t.subject, t.poster, 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, p.poster_id ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics']; - break; - - } -} - -$result = $pun_db->query($sql) or error('Unable to fetch topic list', __FILE__, __LINE__, $pun_db->error()); - -// If there are topics in this forum. -if ($pun_db->num_rows($result)) -{ - while ($cur_topic = $pun_db->fetch_assoc($result)) - { - $icon_text = $lang_common['Normal icon']; - $item_status = ''; - $icon_type = 'icon'; - - if ($cur_topic['moved_to'] == null) - $last_post = ''.format_time($cur_topic['last_post']).''.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['last_poster']).''; - else - $last_post = ' '; - - if ($pun_config['o_censoring'] == '1') - $cur_topic['subject'] = censor_words($cur_topic['subject']); - - if ($cur_topic['moved_to'] != 0) - $subject = $lang_forum['Moved'].': '.pun_htmlspecialchars($cur_topic['subject']).''.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).''; - else if ($cur_topic['closed'] == '0') - $subject = ''.pun_htmlspecialchars($cur_topic['subject']).''.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).''; - else - { - $subject = ''.pun_htmlspecialchars($cur_topic['subject']).''.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).''; - $icon_text = $lang_common['Closed icon']; - $item_status = 'iclosed'; - } - - if (!$pun_user['is_guest'] && $cur_topic['last_post'] > $pun_user['last_visit'] && $cur_topic['moved_to'] == null) - { - $icon_text .= ' '.$lang_common['New icon']; - $item_status .= ' inew'; - $icon_type = 'icon inew'; - $subject = ''.$subject.''; - $subject_new_posts = ''.$lang_common['New posts'].' ]'; - } - else - $subject_new_posts = null; - - // Should we display the dot or not? :) - if (!$pun_user['is_guest'] && $pun_config['o_show_dot'] == '1') - { - if ($cur_topic['has_posted'] == $pun_user['id']) - $subject = '· '.$subject; - else - $subject = '  '.$subject; - } - - if ($cur_topic['sticky'] == '1') - { - $subject = ''.$lang_forum['Sticky'].': '.$subject; - $item_status .= ' isticky'; - $icon_text .= ' '.$lang_forum['Sticky']; - } - - $num_pages_topic = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']); - - if ($num_pages_topic > 1) - $subject_multipage = '[ '.pun_paginate($num_pages_topic, -1, 'viewtopic.php?id='.$cur_topic['id']).' ]'; - else - $subject_multipage = null; - - // Should we show the "New posts" and/or the multipage links? - if (!empty($subject_new_posts) || !empty($subject_multipage)) - { - $subject .= '  '.(!empty($subject_new_posts) ? $subject_new_posts : ''); - $subject .= !empty($subject_multipage) ? ' '.$subject_multipage : ''; - } - -?> - > - - - - - - - - - - - -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    - -
    -
    - - -
    •  
    • » 
    -
    -
    -
    -query('SELECT topic_id FROM '.$pun_db->prefix.'posts WHERE id='.$pid) or error('Unable to fetch post info', __FILE__, __LINE__, $pun_db->error()); - if (!$pun_db->num_rows($result)) - message($lang_common['Bad request']); - - $id = $pun_db->result($result); - - // Determine on what page the post is located (depending on $pun_user['disp_posts']) - $result = $pun_db->query('SELECT id FROM '.$pun_db->prefix.'posts WHERE topic_id='.$id.' ORDER BY posted') or error('Unable to fetch post info', __FILE__, __LINE__, $pun_db->error()); - $num_posts = $pun_db->num_rows($result); - - for ($i = 0; $i < $num_posts; ++$i) - { - $cur_id = $pun_db->result($result, $i); - if ($cur_id == $pid) - break; - } - ++$i; // we started at 0 - - $_GET['p'] = ceil($i / $pun_user['disp_posts']); -} - -// If action=new, we redirect to the first new post (if any) -else if ($action == 'new' && !$pun_user['is_guest']) -{ - $result = $pun_db->query('SELECT MIN(id) FROM '.$pun_db->prefix.'posts WHERE topic_id='.$id.' AND posted>'.$pun_user['last_visit']) or error('Unable to fetch post info', __FILE__, __LINE__, $pun_db->error()); - $first_new_post_id = $pun_db->result($result); - - if ($first_new_post_id) - header('Location: viewtopic.php?pid='.$first_new_post_id.'#p'.$first_new_post_id); - else // If there is no new post, we go to the last post - header('Location: viewtopic.php?id='.$id.'&action=last'); - - exit; -} - -// If action=last, we redirect to the last post -else if ($action == 'last') -{ - $result = $pun_db->query('SELECT MAX(id) FROM '.$pun_db->prefix.'posts WHERE topic_id='.$id) or error('Unable to fetch post info', __FILE__, __LINE__, $pun_db->error()); - $last_post_id = $pun_db->result($result); - - if ($last_post_id) - { - header('Location: viewtopic.php?pid='.$last_post_id.'#p'.$last_post_id); - exit; - } -} - - -// Fetch some info about the topic -if (!$pun_user['is_guest']) - $result = $pun_db->query('SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, s.user_id AS is_subscribed FROM '.$pun_db->prefix.'topics AS t INNER JOIN '.$pun_db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$pun_db->prefix.'subscriptions AS s ON (t.id=s.topic_id AND s.user_id='.$pun_user['id'].') LEFT JOIN '.$pun_db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $pun_db->error()); -else - $result = $pun_db->query('SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM '.$pun_db->prefix.'topics AS t INNER JOIN '.$pun_db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$pun_db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $pun_db->error()); - -if (!$pun_db->num_rows($result)) - message($lang_common['Bad request']); - -$cur_topic = $pun_db->fetch_assoc($result); - -// Sort out who the moderators are and if we are currently a moderator (or an admin) -$mods_array = ($cur_topic['moderators'] != '') ? unserialize($cur_topic['moderators']) : array(); -$is_admmod = ($pun_user['g_id'] == PUN_ADMIN || ($pun_user['g_id'] == PUN_MOD && array_key_exists($pun_user['username'], $mods_array))) ? true : false; - -// Can we or can we not post replies? -if ($cur_topic['closed'] == '0') -{ - if (($cur_topic['post_replies'] == '' && $pun_user['g_post_replies'] == '1') || $cur_topic['post_replies'] == '1' || $is_admmod) - $post_link = ''.$lang_topic['Post reply'].''; - else - $post_link = ' '; -} -else -{ - $post_link = $lang_topic['Topic closed']; - - if ($is_admmod) - $post_link .= ' / '.$lang_topic['Post reply'].''; -} - - -// Determine the post offset (based on $_GET['p']) -$num_pages = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']); - -$p = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p']; -$start_from = $pun_user['disp_posts'] * ($p - 1); - -// Generate paging links -$paging_links = $lang_common['Pages'].': '.pun_paginate($num_pages, $p, 'viewtopic.php?id='.$id); - - -if ($pun_config['o_censoring'] == '1') - $cur_topic['subject'] = censor_words($cur_topic['subject']); - - -$quickpost = false; -if ($pun_config['o_quickpost'] == '1' && - !$pun_user['is_guest'] && - ($cur_topic['post_replies'] == '1' || ($cur_topic['post_replies'] == '' && $pun_user['g_post_replies'] == '1')) && - ($cur_topic['closed'] == '0' || $is_admmod)) -{ - $required_fields = array('req_message' => $lang_common['Message']); - $quickpost = true; -} - -if (!$pun_user['is_guest'] && $pun_config['o_subscriptions'] == '1') -{ - if ($cur_topic['is_subscribed']) - // I apologize for the variable naming here. It's a mix of subscription and action I guess :-) - $subscraction = ''."\n"; - else - $subscraction = ''."\n"; -} -else - $subscraction = '
    '."\n"; - -$page_title = pun_htmlspecialchars($pun_config['o_board_title'].' / '.$cur_topic['subject']); -define('PUN_ALLOW_INDEX', 1); -require PUN_ROOT.'header.php'; - -?> -
    -
    - - -
    •  » 
    •  » 
    -
    -
    -
    - -query('SELECT eu.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM '.$pun_db->prefix.'posts AS p INNER JOIN '.$pun_db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.table_prefix.'users AS eu ON eu.user_id=u.id INNER JOIN '.$pun_db->prefix.'groups AS g ON g.g_id=u.group_id LEFT JOIN '.$pun_db->prefix.'online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id='.$id.' ORDER BY p.id LIMIT '.$start_from.','.$pun_user['disp_posts'], true) or error('Unable to fetch post info', __FILE__, __LINE__, $pun_db->error()); -while ($cur_post = $pun_db->fetch_assoc($result)) -{ - $post_count++; - $user_avatar = ''; - $user_info = array(); - $user_contacts = array(); - $post_actions = array(); - $is_online = ''; - $signature = ''; - - // If the poster is a registered user. - if ($cur_post['poster_id'] > 1) - { - $username = ''.pun_htmlspecialchars($cur_post['username']).''; - $user_title = get_title($cur_post); - - if ($pun_config['o_censoring'] == '1') - $user_title = censor_words($user_title); - - // Format the online indicator - $is_online = ($cur_post['is_online'] == $cur_post['poster_id']) ? ''.$lang_topic['Online'].'' : $lang_topic['Offline']; - - if ($pun_config['o_avatars'] == '1' && $cur_post['use_avatar'] == '1' && $pun_user['show_avatars'] != '0') - { - if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.gif')) - $user_avatar = ''; - else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.jpg')) - $user_avatar = ''; - else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.png')) - $user_avatar = ''; - } - else - $user_avatar = ''; - - // We only show location, register date, post count and the contact links if "Show user info" is enabled - if ($pun_config['o_show_user_info'] == '1') - { - if ($cur_post['location'] != '') - { - if ($pun_config['o_censoring'] == '1') - $cur_post['location'] = censor_words($cur_post['location']); - - $user_info[] = '
    '.$lang_topic['From'].': '.pun_htmlspecialchars($cur_post['location']); - } - - $user_info[] = '
    '.$lang_common['Registered'].': '.date($pun_config['o_date_format'], $cur_post['registered']); - - if ($pun_config['o_show_post_count'] == '1' || $pun_user['g_id'] >= USER_LEVEL_MEMBER) - $user_info[] = '
    '.$lang_common['Posts'].': '.$cur_post['num_posts']; - - // Now let's deal with the contact links (E-mail and URL) - if (($cur_post['email_setting'] == '0' && !$pun_user['is_guest']) || $pun_user['g_id'] >= USER_LEVEL_MEMBER) - $user_contacts[] = ''.$lang_common['E-mail'].''; - else if ($cur_post['email_setting'] == '1' && !$pun_user['is_guest']) - $user_contacts[] = ''.$lang_common['E-mail'].''; - - if ($cur_post['url'] != '') - $user_contacts[] = ''.$lang_topic['Website'].''; - } - - if ($pun_user['g_id'] >= USER_LEVEL_MEMBER) - { - $user_info[] = '
    IP: '.$cur_post['poster_ip'].''; - - if ($cur_post['admin_note'] != '') - $user_info[] = '
    '.$lang_topic['Note'].': '.pun_htmlspecialchars($cur_post['admin_note']).''; - } - } - // If the poster is a guest (or a user that has been deleted) - else - { - $username = pun_htmlspecialchars($cur_post['username']); - $user_title = get_title($cur_post); - - if ($pun_user['g_id'] >= USER_LEVEL_MEMBER) - $user_info[] = '
    IP: '.$cur_post['poster_ip'].''; - - if ($pun_config['o_show_user_info'] == '1' && $cur_post['poster_email'] != '' && !$pun_user['is_guest']) - $user_contacts[] = ''.$lang_common['E-mail'].''; - } - - // Generation post action array (quote, edit, delete etc.) - if (!$is_admmod) - { - if (!$pun_user['is_guest']) - $post_actions[] = '
  • '.$lang_topic['Report'].''; - - if ($cur_topic['closed'] == '0') - { - if ($cur_post['poster_id'] == $pun_user['id']) - { - if ((($start_from + $post_count) == 1 && $pun_user['g_delete_topics'] == '1') || (($start_from + $post_count) > 1 && $pun_user['g_delete_posts'] == '1')) - $post_actions[] = '
  • '.$lang_topic['Delete'].''; - if ($pun_user['g_edit_posts'] == '1') - $post_actions[] = '
  • '.$lang_topic['Edit'].''; - } - - if (($cur_topic['post_replies'] == '' && $pun_user['g_post_replies'] == '1') || $cur_topic['post_replies'] == '1') - $post_actions[] = '
  • '.$lang_topic['Quote'].''; - } - } - else - $post_actions[] = '
  • '.$lang_topic['Report'].''.$lang_topic['Link separator'].'
  • '.$lang_topic['Delete'].''.$lang_topic['Link separator'].'
  • '.$lang_topic['Edit'].''.$lang_topic['Link separator'].'
  • '.$lang_topic['Quote'].''; - - - // Switch the background color for every message. - $bg_switch = ($bg_switch) ? $bg_switch = false : $bg_switch = true; - $vtbg = ($bg_switch) ? ' roweven' : ' rowodd'; - - - // Perform the main parsing of the message (BBCode, smilies, censor words etc) - $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']); - - // Do signature parsing/caching - if ($cur_post['signature'] != '' && $pun_user['show_sig'] != '0') - { - if (isset($signature_cache[$cur_post['poster_id']])) - $signature = $signature_cache[$cur_post['poster_id']]; - else - { - $signature = parse_signature($cur_post['signature']); - $signature_cache[$cur_post['poster_id']] = $signature; - } - } - -?> -
    -

    # 

    -
    -
    -
    -
    -
    -
    -
    -'."\n\t\t\t\t\t", $user_info).'
  • '."\n"; ?> -'.implode('  ', $user_contacts).''."\n"; ?> - - -
    -

    1) echo ' Re: '; ?>

    -
    - -'.$lang_topic['Last edit'].' '.pun_htmlspecialchars($cur_post['edited_by']).' ('.format_time($cur_post['edited']).')

    '."\n"; ?> -
    -
    '.$signature.'
    '."\n"; ?> - -
    -
    1) echo '

    '.$is_online.'

    '; ?>
    -
    '.implode($lang_topic['Link separator'].'', $post_actions).'
    '."\n" : '
     
    '."\n" ?> - - - - - -
    -
    - - -
    •  » 
    •  » 
    - -
    -
    - - -
    -

    -
    -
    -
    -
    - -
    - - - - -
    -
    -
    -

    -
    -
    -
    -query('UPDATE '.$low_prio.$pun_db->prefix.'topics SET num_views=num_views+1 WHERE id='.$id) or error('Unable to update topic', __FILE__, __LINE__, $pun_db->error()); - -$forum_id = $cur_topic['forum_id']; -$footer_style = 'viewtopic'; -require PUN_ROOT.'footer.php';