Big upgrade to 1.3 beta. Basic things are working.
--- 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';
}
--- 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.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- 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.
-
- <signature of Ty Coon>, 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.
--- /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 @@
+<?php
+/***********************************************************************
+
+ Copyright (C) 2002-2008 PunBB.org
+
+ This file is part of PunBB.
+
+ PunBB 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.
+
+ PunBB 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
+
+************************************************************************/
+
+
+// if (!defined('PUN_ROOT'))
+// define('PUN_ROOT', '../');
+// require PUN_ROOT.'include/common.php';
+require PUN_ROOT.'include/common_admin.php';
+
+// import globals (I really hope this isn't dangerous)
+foreach ( $GLOBALS as $key => $_ )
+{
+ $$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';
+
+?>
+<div id="pun-main" class="main admin sectioned">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Ban advanced heading'] ?></span></h2>
+ </div>
+ <div class="frm-info">
+ <p class="warn"><?php echo $lang_admin['Ban IP warning'] ?></p>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_bans']) ?>">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_bans'])) ?>" />
+ <input type="hidden" name="mode" value="<?php echo $mode ?>" />
+<?php if ($mode == 'edit'): ?> <input type="hidden" name="ban_id" value="<?php echo $ban_id ?>" />
+<?php endif; ?> </div>
+<?php ($hook = get_hook('aba_add_edit_ban_pre_criteria_fieldset')) ? eval($hook) : null; ?>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><span><?php echo $lang_admin['Ban criteria legend'] ?></span></legend>
+<?php ($hook = get_hook('aba_add_edit_ban_pre_username')) ? eval($hook) : null; ?>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Username to ban'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="ban_user" size="25" maxlength="25" value="<?php if (isset($ban_user)) echo htmlspecialchars($ban_user); ?>" /></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['E-mail/domain to ban'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="ban_email" size="40" maxlength="80" value="<?php if (isset($ban_email)) echo strtolower($ban_email); ?>" /></span>
+ <span class="fld-help"><?php echo $lang_admin['E-mail/domain info'] ?></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['IP-addresses to ban'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="ban_ip" size="45" maxlength="255" value="<?php if (isset($ban_ip)) echo $ban_ip; ?>" /></span>
+ <span class="fld-help"><?php echo $lang_admin['IP-addresses info']; if ($ban_user != '' && isset($user_id)) echo ' '.$lang_admin['IP-addresses info 2'].'<a href="'.pun_link($pun_url['admin_users']).'&ip_stats='.$user_id.'">'.$lang_admin['IP-addresses info link'].'</a>' ?></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('aba_add_edit_ban_criteria_end')) ? eval($hook) : null; ?>
+ </fieldset>
+<?php ($hook = get_hook('aba_add_edit_ban_pre_settings_fieldset')) ? eval($hook) : null; ?>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><span><?php echo $lang_admin['Ban settings legend'] ?></span></legend>
+<?php ($hook = get_hook('aba_add_edit_ban_pre_message')) ? eval($hook) : null; ?>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Ban message'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="ban_message" size="50" maxlength="255" value="<?php if (isset($ban_message)) echo htmlspecialchars($ban_message); ?>" /></span>
+ <span class="fld-help"><?php echo $lang_admin['Ban message info'] ?></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Expire date'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="ban_expire" size="17" maxlength="10" value="<?php if (isset($ban_expire)) echo $ban_expire; ?>" /></span>
+ <span class="fld-help"><?php echo $lang_admin['Expire date info'] ?></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('aba_add_edit_ban_settings_end')) ? eval($hook) : null; ?>
+ </fieldset>
+<?php ($hook = get_hook('aba_add_edit_ban_pre_buttons')) ? eval($hook) : null; ?>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" class="button" name="add_edit_ban" value=" <?php echo $lang_admin['Save'] ?>" /></span>
+ </div>
+ </form>
+ </div>
+
+</div>
+<?php
+
+ require PUN_ROOT.'footer.php';
+}
+
+
+// Add/edit a ban (stage 2)
+else if (isset($_POST['add_edit_ban']))
+{
+ $ban_user = trim($_POST['ban_user']);
+ $ban_ip = trim($_POST['ban_ip']);
+ $ban_email = strtolower(trim($_POST['ban_email']));
+ $ban_message = trim($_POST['ban_message']);
+ $ban_expire = trim($_POST['ban_expire']);
+
+ if ($ban_user == '' && $ban_ip == '' && $ban_email == '')
+ message($lang_admin['Must enter message']);
+ else if (strtolower($ban_user) == 'guest')
+ message($lang_admin['Can\'t ban guest user']);
+
+ ($hook = get_hook('aba_add_edit_ban_form_submitted2')) ? eval($hook) : null;
+
+ // Validate IP/IP range (it's overkill, I know)
+ if ($ban_ip != '')
+ {
+ $ban_ip = preg_replace('/[\s]{2,}/', ' ', $ban_ip);
+ $addresses = explode(' ', $ban_ip);
+ $addresses = array_map('trim', $addresses);
+
+ for ($i = 0; $i < count($addresses); ++$i)
+ {
+ $octets = explode('.', $addresses[$i]);
+
+ for ($c = 0; $c < count($octets); ++$c)
+ {
+ $octets[$c] = (strlen($octets[$c]) > 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';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['New ban heading'] ?></span></h2>
+ </div>
+ <div class="frm-info">
+ <p><?php echo $lang_admin['Advanced ban info'] ?></p>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_bans']) ?>&action=more">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_bans']).'&action=more') ?>" />
+ </div>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['New ban legend'] ?></strong></legend>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Username to ban'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="new_ban_user" size="25" maxlength="25" /></span>
+ </label>
+ </div>
+ </fieldset>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" class="button" name="add_ban" value=" Add " /></span>
+ </div>
+ </form>
+ </div>
+<?php
+
+// Reset fieldset counter
+$pun_page['set_count'] = 0;
+
+?>
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Existing bans heading'] ?></span></h2>
+ </div>
+<?php
+
+if (!empty($pun_bans))
+{
+ $pun_page['item_num'] = 0;
+ foreach ($pun_bans as $ban_key => $cur_ban)
+ {
+ $pun_page['ban_info'] = array();
+ $pun_page['ban_creator'] = ($cur_ban['ban_creator_username'] != '') ? '<a href="'.pun_link($pun_url['user'], $cur_ban['ban_creator']).'">'.htmlspecialchars($cur_ban['ban_creator_username']).'</a>' : $lang_admin['Unknown'];
+
+ if ($cur_ban['username'] != '')
+ $pun_page['ban_info'][] = '<span>'.$lang_admin['Username'].': '.htmlspecialchars($cur_ban['username']).'</span>';
+
+ if ($cur_ban['email'] != '')
+ $pun_page['ban_info'][] = '<span>'.$lang_admin['E-mail'].': '.$cur_ban['email'].'</span>';
+
+ if ($cur_ban['ip'] != '')
+ $pun_page['ban_info'][] = '<span>'.$lang_admin['IP-ranges'].': '.$cur_ban['ip'].'</span>';
+
+ if ($cur_ban['expire'] != '')
+ $pun_page['ban_info'][] = '<span>'.$lang_admin['Expire date'].': '.format_time($cur_ban['expire'], true).'</span>';
+
+ ($hook = get_hook('aba_view_ban_pre_display')) ? eval($hook) : null;
+
+?>
+ <div class="ban-item databox db<?php echo ++$pun_page['item_num'] ?>">
+ <h3 class="legend"><span><?php printf($lang_admin['Current ban head'], $pun_page['ban_creator']) ?></span></h3>
+<?php if (!empty($pun_page['ban_info'])): ?> <p class="data">
+ <?php echo implode('<br />', $pun_page['ban_info'])."\n" ?>
+ </p>
+<?php endif; if ($cur_ban['message'] != ''): ?> <p><?php echo $lang_admin['Reason'].': '.htmlspecialchars($cur_ban['message']) ?></p>
+<?php endif; ?> <p class="actions"><a href="<?php echo pun_link($pun_url['admin_bans']).'&edit_ban='.$cur_ban['id'] ?>"><?php echo $lang_admin['Edit'] ?></a> <a href="<?php echo pun_link($pun_url['admin_bans']).'&del_ban='.$cur_ban['id'].'&csrf_token='.generate_form_token('del_ban'.$cur_ban['id']) ?>"><?php echo $lang_admin['Remove'] ?></a></p>
+</div>
+<?php
+
+ }
+}
+else
+{
+
+?>
+ <div class="frm-info">
+ <p><?php echo $lang_admin['No bans'] ?></p>
+ </div>
+<?php
+
+}
+
+?>
+ </div>
+
+</div>
+<?php
+
+require PUN_ROOT.'footer.php';
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/admin/categories.php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,414 @@
+<?php
+/***********************************************************************
+
+ Copyright (C) 2002-2008 PunBB.org
+
+ This file is part of PunBB.
+
+ PunBB 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.
+
+ PunBB 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
+
+************************************************************************/
+
+
+// if (!defined('PUN_ROOT'))
+// define('PUN_ROOT', '../');
+// require PUN_ROOT.'include/common.php';
+require PUN_ROOT.'include/common_admin.php';
+
+// import globals (I really hope this isn't dangerous)
+foreach ( $GLOBALS as $key => $_ )
+{
+ $$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';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php printf($lang_admin['Confirm delete cat'], htmlspecialchars($cat_name)) ?></span></h2>
+ </div>
+ <div class="frm-info">
+ <p class="warn"><?php echo $lang_admin['Delete category warning'] ?></p>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_categories']) ?>">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_categories'])) ?>" />
+ <input type="hidden" name="cat_to_delete" value="<?php echo $cat_to_delete ?>" />
+ </div>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" name="del_cat_comply" value="<?php echo $lang_admin['Delete'] ?>" /></span>
+ <span class="cancel"><input type="submit" name="del_cat_cancel" value="<?php echo $lang_admin['Cancel'] ?>" /></span>
+ </div>
+ </form>
+ </div>
+
+</div>
+<?php
+
+ require PUN_ROOT.'footer.php';
+ }
+}
+
+
+else if (isset($_POST['update'])) // Change position and name of the categories
+{
+ $cat_order = array_map('intval', $_POST['cat_order']);
+ $cat_name = array_map('trim', $_POST['cat_name']);
+
+ ($hook = get_hook('acg_update_cats_form_submitted')) ? eval($hook) : null;
+
+ $query = array(
+ 'SELECT' => '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';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php printf($lang_admin['Add category head'], '<strong>'.$lang_admin['Add category'].'</strong>') ?></span></h2>
+ </div>
+ <div class="frm-info">
+ <p><?php printf($lang_admin['Add category info'], '<a href="'.pun_link($pun_url['admin_forums']).'">'.strtolower($lang_admin['Forums']).'</a>') ?></p>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_categories']) ?>&action=foo">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_categories']).'&action=foo') ?>" />
+ </div>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['Add category'] ?></strong></legend>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['New category name'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="new_cat_name" size="35" maxlength="80" /></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Position'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="position" size="3" maxlength="3" /></span>
+ <span class="fld-extra"><?php echo $lang_admin['Category position help'] ?></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('acg_add_cat_fieldset_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" name="add_cat" value="<?php echo $lang_admin['Add category'] ?>" /></span>
+ </div>
+ </form>
+ </div>
+<?php
+
+($hook = get_hook('acg_new_form')) ? eval($hook) : null;
+
+// Reset fieldset counter
+$pun_page['set_count'] = 0;
+
+if ($num_cats)
+{
+
+?>
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php printf($lang_admin['Del category head'], '<strong>'.$lang_admin['Delete category'].'</strong>') ?></span></h2>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_categories']) ?>&action=foo">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_categories']).'&action=foo') ?>" />
+ </div>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['Delete category'] ?></strong></legend>
+ <div class="frm-fld select">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Category to delete'] ?></span><br />
+ <span class="fld-input"><select id="fld<?php echo $pun_page['fld_count'] ?>" name="cat_to_delete">
+<?php
+
+ while (list(, list($cat_id, $cat_name, ,)) = @each($cat_list))
+ echo "\t\t\t\t\t\t\t".'<option value="'.$cat_id.'">'.htmlspecialchars($cat_name).'</option>'."\n";
+
+?>
+ </select></span>
+ <span class="fld-help"><?php echo $lang_admin['Requires confirmation'] ?></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('acg_del_cat_fieldset_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" name="del_cat" value="<?php echo $lang_admin['Delete category'] ?>" /></span>
+ </div>
+ </form>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php printf($lang_admin['Edit categories head'], '<strong>'.$lang_admin['Edit categories'].'</strong>') ?></span></h2>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_categories']) ?>&action=foo">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_categories']).'&action=foo') ?>" />
+ </div>
+
+<?php
+
+ @reset($cat_list);
+ for ($i = 0; $i < $num_cats; ++$i)
+ {
+ list(, list($cat_id, $cat_name, $position)) = @each($cat_list);
+ // Reset fieldset counter
+ $pun_page['set_count'] = 0;
+
+?>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo htmlspecialchars($cat_name) ?>: </strong></legend>
+ <div class="frm-fld text twin">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>" class="twin1">
+ <span class="fld-label"><?php echo $lang_admin['Edit category name'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="cat_name[<?php echo $cat_id ?>]" value="<?php echo htmlspecialchars($cat_name) ?>" size="35" maxlength="80" /></span>
+ </label><br />
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>" class="twin2">
+ <span class="fld-label"><?php echo $lang_admin['Change category position'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="cat_order[<?php echo $cat_id ?>]" value="<?php echo $position ?>" size="3" maxlength="3" /></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('acg_edit_cat_fieldset_end')) ? eval($hook) : null; ?>
+ </fieldset>
+<?php
+
+ }
+
+?>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" class="button" name="update" value="<?php echo $lang_admin['Update all'] ?>" /></span>
+ </div>
+ </form>
+ </div>
+<?php
+
+ ($hook = get_hook('acg_has_cats_new_form')) ? eval($hook) : null;
+}
+
+?>
+
+</div>
+<?php
+
+require PUN_ROOT.'footer.php';
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/admin/censoring.php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,272 @@
+<?php
+/***********************************************************************
+
+ Copyright (C) 2002-2008 PunBB.org
+
+ This file is part of PunBB.
+
+ PunBB 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.
+
+ PunBB 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
+
+************************************************************************/
+
+
+// if (!defined('PUN_ROOT'))
+// define('PUN_ROOT', '../');
+// require PUN_ROOT.'include/common.php';
+require PUN_ROOT.'include/common_admin.php';
+
+// import globals (I really hope this isn't dangerous)
+foreach ( $GLOBALS as $key => $_ )
+{
+ $$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';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Add censored word head'] ?></span></h2>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_censoring']) ?>&action=foo">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_censoring']).'&action=foo') ?>" />
+ </div>
+ <div class="frm-info">
+ <p><?php printf($lang_admin['Add censored word intro'], '<strong><a href="'.pun_link($pun_url['admin_options_features']).'#fs4">'.$lang_admin['Options'].' - '.$lang_admin['Features'].'</a></strong>') ?></p>
+ </div>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><span><?php echo $lang_admin['Add censored word legend'] ?></span></legend>
+<?php ($hook = get_hook('acs_add_word_pre_search_for')) ? eval($hook) : null; ?>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Censored word'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="new_search_for" size="24" maxlength="60" /></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('acs_add_word_pre_replace_with')) ? eval($hook) : null; ?>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Censored replacement text'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="new_replace_with" size="24" maxlength="60" /></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('acs_add_word_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" class="button" name="add_word" value=" <?php echo $lang_admin['Add'] ?> " /></span>
+ </div>
+ </form>
+ </div>
+<?php
+
+if (!empty($pun_censors))
+{
+ // Reset fieldset counter
+ $pun_page['set_count'] = 0;
+
+?>
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Edit censored word legend'] ?></span></h2>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_censoring']) ?>&action=foo">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_censoring']).'&action=foo') ?>" />
+ </div>
+<?php
+
+ foreach ($pun_censors as $censor_key => $cur_word)
+ {
+
+ ?>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><span><?php echo $lang_admin['Edit censored word legend'] ?></span></legend>
+<?php ($hook = get_hook('acs_edit_word_pre_search_for')) ? eval($hook) : null; ?>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Censored word'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="search_for[<?php echo $cur_word['id'] ?>]" value="<?php echo htmlspecialchars($cur_word['search_for']) ?>" size="24" maxlength="60" /></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('acs_edit_word_pre_replace_with')) ? eval($hook) : null; ?>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Censored replacement text'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="replace_with[<?php echo $cur_word['id'] ?>]" value="<?php echo htmlspecialchars($cur_word['replace_with']) ?>" size="24" maxlength="60" /></span>
+ </label>
+ <span class="submit"><input type="submit" name="update[<?php echo $cur_word['id'] ?>]" value="<?php echo $lang_admin['Update'] ?>" /> <input type="submit" name="remove[<?php echo $cur_word['id'] ?>]" value="<?php echo $lang_admin['Remove'] ?>" /></span>
+ </div>
+<?php ($hook = get_hook('acs_edit_word_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ <?php
+
+ }
+
+?>
+ </form>
+ </div>
+<?php
+
+}
+else
+{
+
+?>
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Edit censored word legend'] ?></span></h2>
+ </div>
+ <div class="frm-form">
+ <div class="frm-info">
+ <p><?php echo $lang_admin['No censored words'] ?></p>
+ </div>
+ </div>
+ </div>
+<?php
+
+}
+
+?>
+</div>
+<?php
+
+require PUN_ROOT.'footer.php';
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/admin/extensions.php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,738 @@
+<?php
+/***********************************************************************
+
+ Copyright (C) 2002-2008 PunBB.org
+
+ This file is part of PunBB.
+
+ PunBB 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.
+
+ PunBB 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
+
+************************************************************************/
+
+
+// if (!defined('PUN_ROOT'))
+// define('PUN_ROOT', '../');
+// require PUN_ROOT.'include/common.php';
+require PUN_ROOT.'include/common_admin.php';
+
+// import globals (I really hope this isn't dangerous)
+foreach ( $GLOBALS as $key => $_ )
+{
+ $$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';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo end($pun_page['crumbs']) ?> "<?php echo htmlspecialchars($ext_data['extension']['title']) ?>"</span></h2>
+ </div>
+ <div class="frm-info">
+ <p><?php echo $lang_admin['Extension installed info'] ?></p>
+ <ul>
+<?php
+
+ while (list(, $cur_notice) = each($notices))
+ echo "\t\t\t\t".'<li><span>'.$cur_notice.'</span></li>'."\n";
+
+?>
+ </ul>
+ <p><a href="<?php echo pun_link($pun_url['admin_extensions_manage']) ?>"><?php echo $lang_admin['Manage extensions'] ?></a></p>
+ </div>
+ </div>
+
+</div>
+<?php
+
+ require PUN_ROOT.'footer.php';
+ }
+ else
+ pun_redirect(pun_link($pun_url['admin_extensions_manage']), $lang_admin['Extension installed'].' '.$lang_admin['Redirect']);
+ }
+
+
+ ($hook = get_hook('aex_install_pre_header_load')) ? eval($hook) : null;
+
+ define('PUN_PAGE_SECTION', 'extensions');
+ define('PUN_PAGE', 'admin-extensions-install');
+ require PUN_ROOT.'header.php';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo end($pun_page['crumbs']) ?> "<?php echo htmlspecialchars($ext_data['extension']['title']) ?>"</span></h2>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo $base_url.'/admin/extensions.php'.(isset($_GET['install']) ? '?install=' : '?install_hotfix=').$id ?>">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token($base_url.'/admin/extensions.php'.(isset($_GET['install']) ? '?install=' : '?install_hotfix=').$id) ?>" />
+ </div>
+ <div class="ext-item databox">
+ <h3 class="legend"><span><?php echo htmlspecialchars($ext_data['extension']['title']).((strpos($id, 'hotfix_') !== 0) ? ' v'.$ext_data['extension']['version'] : '') ?></span></h3>
+ <p><span><?php printf($lang_admin['Extension by'], $ext_data['extension']['author']) ?></span><br /><span><?php echo htmlspecialchars($ext_data['extension']['description']) ?></span></p>
+<?php
+
+ // Setup an array of warnings to display in the form
+ $form_warnings = array();
+ $pun_page['num_items'] = 0;
+
+ foreach ($ext_data['extension']['note'] as $cur_note)
+ {
+ if ($cur_note['attributes']['type'] == 'install')
+ $form_warnings[] = '<p>'.++$pun_page['num_items'].'. '.htmlspecialchars($cur_note['content']).'</p>';
+ }
+
+ if (version_compare(clean_version($pun_config['o_cur_version']), clean_version($ext_data['extension']['maxtestedon']), '>'))
+ $form_warnings[] = '<p>'.++$pun_page['num_items'].'. '.$lang_admin['Maxtestedon warning'].'</p>';
+
+ if (!empty($form_warnings))
+ {
+
+?>
+ <h4 class="note"><?php echo $lang_admin['Install note'] ?></h4>
+<?php
+
+ echo implode("\n\t\t\t\t\t", $form_warnings)."\n";
+ }
+
+?>
+ </div>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" name="install_comply" value="<?php echo ((strpos($id, 'hotfix_') !== 0) ? $lang_admin['Install extension'] : $lang_admin['Install hotfix']) ?>" /></span>
+ <span class="cancel"><input type="submit" name="install_cancel" value="<?php echo $lang_admin['Cancel'] ?>" /></span>
+ </div>
+ </form>
+ </div>
+
+</div>
+<?php
+
+ require PUN_ROOT.'footer.php';
+}
+
+
+// Uninstall an extension
+else if (isset($_GET['uninstall']))
+{
+ // User pressed the cancel button
+ if (isset($_POST['uninstall_cancel']))
+ pun_redirect(pun_link($pun_url['admin_extensions_manage']), $lang_admin['Cancel redirect']);
+
+ ($hook = get_hook('aex_uninstall_selected')) ? eval($hook) : null;
+
+ $id = preg_replace('/[^0-9a-z_]/', '', $_GET['uninstall']);
+
+ // Fetch info about the extension
+ $query = array(
+ 'SELECT' => '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';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo end($pun_page['crumbs']) ?> "<?php echo htmlspecialchars($ext_data['title']) ?>"</span></h2>
+ </div>
+ <div class="frm-info">
+ <p><?php echo $lang_admin['Extension uninstalled info'] ?></p>
+ <ul>
+<?php
+
+ while (list(, $cur_notice) = each($notices))
+ echo "\t\t\t\t".'<li><span>'.$cur_notice.'</span></li>'."\n";
+
+?>
+ </ul>
+ <p><a href="<?php echo pun_link($pun_url['admin_extensions_manage']) ?>"><?php echo $lang_admin['Manage extensions'] ?></a></p>
+ </div>
+ </div>
+
+</div>
+<?php
+
+ require PUN_ROOT.'footer.php';
+ }
+ else
+ pun_redirect(pun_link($pun_url['admin_extensions_manage']), $lang_admin['Extension uninstalled'].' '.$lang_admin['Redirect']);
+ }
+ else // If the user hasn't confirmed the uninstall
+ {
+ ($hook = get_hook('aex_uninstall_pre_header_loaded')) ? eval($hook) : null;
+
+ define('PUN_PAGE_SECTION', 'extensions');
+ define('PUN_PAGE', 'admin-extensions-manage');
+ require PUN_ROOT.'header.php';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo end($pun_page['crumbs']) ?> "<?php echo htmlspecialchars($ext_data['title']) ?>"</span></h2>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo $base_url ?>/admin/extensions.php?section=manage&uninstall=<?php echo $id ?>">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token($base_url.'/admin/extensions.php?section=manage&uninstall='.$id) ?>" />
+ </div>
+ <div class="ext-item databox">
+ <h3 class="legend"><span><?php echo htmlspecialchars($ext_data['title']).((strpos($id, 'hotfix_') !== 0) ? ' v'.$ext_data['version'] : '') ?></span></h3>
+ <p><span><?php printf($lang_admin['Extension by'], $ext_data['author']) ?></span><br /><span><?php echo htmlspecialchars($ext_data['description']) ?></span></p>
+<?php if ($ext_data['uninstall_note'] != ''): ?> <h4><?php echo $lang_admin['Uninstall note'] ?></h4>
+ <p><?php echo htmlspecialchars($ext_data['uninstall_note']) ?></p>
+<?php endif; ?> </div>
+ <div class="frm-info">
+ <p class="warn"><?php echo $lang_admin['Installed extensions warn'] ?></p>
+ </div>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" class="button" name="uninstall_comply" value="<?php echo $lang_admin['Uninstall'] ?>" /></span>
+ <span class="cancel"><input type="submit" class="button" name="uninstall_cancel" value="<?php echo $lang_admin['Cancel'] ?>" /></span>
+ </div>
+ </form>
+ </div>
+
+</div>
+<?php
+
+ require PUN_ROOT.'footer.php';
+ }
+}
+
+
+// Enable or disable an extension
+else if (isset($_GET['flip']))
+{
+ $id = preg_replace('/[^0-9a-z_]/', '', $_GET['flip']);
+
+ // We validate the CSRF token. If it's set in POST and we're at this point, the token is valid.
+ // If it's in GET, we need to make sure it's valid.
+ if (!isset($_POST['csrf_token']) && (!isset($_GET['csrf_token']) || $_GET['csrf_token'] !== generate_form_token('flip'.$id)))
+ csrf_confirm_form();
+
+ ($hook = get_hook('aex_flip_selected')) ? eval($hook) : null;
+
+ // Fetch the current status of the extension
+ $query = array(
+ 'SELECT' => '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';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Extensions available'] ?></span></h2>
+ </div>
+<?php
+
+ $num_exts = 0;
+ $num_failed = 0;
+ $pun_page['item_num'] = 1;
+ $pun_page['ext_item'] = array();
+ $pun_page['ext_error'] = array();
+
+ // Loop through any available hotfixes
+ if (isset($pun_updates['hotfix']))
+ {
+ // If there's only one hotfix, add one layer of arrays so we can foreach over it
+ if (!is_array(current($pun_updates['hotfix'])))
+ $pun_updates['hotfix'] = array($pun_updates['hotfix']);
+
+ foreach ($pun_updates['hotfix'] as $hotfix)
+ {
+ if (!array_key_exists($hotfix['attributes']['id'], $inst_exts))
+ {
+ $pun_page['ext_item'][] = '<div class="hotfix-item databox">'."\n\t\t\t".'<h3 class="legend"><span>'.htmlspecialchars($hotfix['content']).'</span></h3>'."\n\t\t\t".'<p><span>'.sprintf($lang_admin['Extension by'], 'PunBB').'</span><br /><span>'.$lang_admin['Hotfix description'].'</span></p>'."\n\t\t\t".'<p class="actions"><a href="'.$base_url.'/admin/extensions.php?install_hotfix='.urlencode($hotfix['attributes']['id']).'">'.$lang_admin['Install hotfix'].'</a></p>'."\n\t\t".'</div>';
+ ++$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'][] = '<div class="ext-error databox db'.++$pun_page['item_num'].'">'."\n\t\t\t\t".'<h3 class="legend"><span>'.sprintf($lang_admin['Extension loading error'], htmlspecialchars($entry)).'<span></h3>'."\n\t\t\t\t".'<p>'.$lang_admin['Illegal ID'].'</p>'."\n\t\t\t".'</div>';
+ ++$num_failed;
+ continue;
+ }
+ else if (!file_exists(PUN_ROOT.'extensions/'.$entry.'/manifest.xml'))
+ {
+ $pun_page['ext_error'][] = '<div class="ext-error databox db'.++$pun_page['item_num'].'">'."\n\t\t\t\t".'<h3 class="legend"><span>'.sprintf($lang_admin['Extension loading error'], htmlspecialchars($entry)).'<span></h3>'."\n\t\t\t\t".'<p>'.$lang_admin['Missing manifest'].'</p>'."\n\t\t\t".'</div>';
+ ++$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'][] = '<div class="ext-error databox db'.++$pun_page['item_num'].'">'."\n\t\t\t\t".'<h3 class="legend"><span>'.sprintf($lang_admin['Extension loading error'], htmlspecialchars($entry)).'<span></h3>'."\n\t\t\t\t".'<p>'.$lang_admin['Failed parse manifest'].'</p>'."\n\t\t\t".'</div>';
+ ++$num_failed;
+ continue;
+ }
+
+ // Validate manifest
+ $errors = validate_manifest($ext_data, $entry);
+ if (!empty($errors))
+ {
+ $pun_page['ext_error'][] = '<div class="ext-error databox db'.++$pun_page['item_num'].'">'."\n\t\t\t\t".'<h3 class="legend"><span>'.sprintf($lang_admin['Extension loading error'], htmlspecialchars($entry)).'</span></h3>'."\n\t\t\t\t".'<p>'.implode(' ', $errors).'</p>'."\n\t\t\t".'</div>';
+ ++$num_failed;
+ }
+ else
+ {
+ if (!array_key_exists($entry, $inst_exts) || version_compare($inst_exts[$entry]['version'], $ext_data['extension']['version'], '!='))
+ {
+ $pun_page['ext_item'][] = '<div class="ext-item databox">'."\n\t\t\t".'<h3 class="legend"><span>'.htmlspecialchars($ext_data['extension']['title']).' v'.$ext_data['extension']['version'].'</span></h3>'."\n\t\t\t".'<p><span>'.sprintf($lang_admin['Extension by'], htmlspecialchars($ext_data['extension']['author'])).'</span>'.(($ext_data['extension']['description'] != '') ? '<br /><span>'.htmlspecialchars($ext_data['extension']['description']).'</span>' : '').'</p>'."\n\t\t\t".'<p class="actions"><a href="'.$base_url.'/admin/extensions.php?install='.urlencode($entry).'">'.$lang_admin['Install extension'].'</a></p>'."\n\t\t".'</div>';
+ ++$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
+ {
+
+?>
+ <div class="frm-info">
+ <p><?php echo $lang_admin['No available extensions'] ?></p>
+ </div>
+<?php
+
+ }
+
+ // If any of the extensions had errors
+ if ($num_failed)
+ {
+
+?>
+ <div class="dataset">
+ <div class="ext-error databox db1">
+ <p class="important"><?php echo $lang_admin['Invalid extensions'] ?></p>
+ </div>
+ <?php echo implode("\n\t\t\t", $pun_page['ext_error'])."\n" ?>
+ </div>
+<?php
+
+ }
+
+?>
+ </div>
+
+</div>
+<?php
+
+ require PUN_ROOT.'footer.php';
+}
+else
+{
+ // 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['Manage extensions']
+ );
+
+ ($hook = get_hook('aex_section_manage_pre_header_load')) ? eval($hook) : null;
+
+ define('PUN_PAGE_SECTION', 'extensions');
+ define('PUN_PAGE', 'admin-extensions-manage');
+
+ require PUN_ROOT.'header.php';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Installed extensions'] ?></span></h2>
+ </div>
+<?php
+
+ if (!empty($inst_exts))
+ {
+
+?>
+ <div class="frm-info">
+ <p class="warn"><?php echo $lang_admin['Installed extensions warn'] ?></p>
+ </div>
+<?php
+
+ while (list($id, $ext) = @each($inst_exts))
+ {
+ $pun_page['ext_actions'] = array(
+ '<a href="'.$base_url.'/admin/extensions.php?section=manage&flip='.$id.'&csrf_token='.generate_form_token('flip'.$id).'">'.($ext['disabled'] != '1' ? $lang_admin['Disable'] : $lang_admin['Enable']).'</a>',
+ '<a href="'.$base_url.'/admin/extensions.php?section=manage&uninstall='.$id.'">'.$lang_admin['Uninstall'].'</a>'
+ );
+
+ ($hook = get_hook('aex_section_manage_pre_ext_actions')) ? eval($hook) : null;
+
+?>
+ <div class="ext-item databox<?php if ($ext['disabled'] == '1') echo ' extdisabled' ?>">
+ <h3 class="legend"><span><?php echo htmlspecialchars($ext['title']).((strpos($id, 'hotfix_') !== 0) ? ' v'.$ext['version'] : '') ?><?php if ($ext['disabled'] == '1') echo ' ( <span>'.$lang_admin['Extension disabled'].'</span> )' ?></span></h3>
+ <p><span><?php printf($lang_admin['Extension by'], $ext['author']) ?></span><?php if ($ext['description'] != ''): ?><br /><span><?php echo htmlspecialchars($ext['description']) ?></span><?php endif; ?></p>
+ <p class="actions"><?php echo implode('', $pun_page['ext_actions']) ?></p>
+ </div>
+<?php
+
+ }
+ }
+ else
+ {
+
+?>
+ <div class="frm-info">
+ <p><?php echo $lang_admin['No installed extensions'] ?></p>
+ </div>
+<?php
+
+ }
+
+?>
+ </div>
+
+</div>
+<?php
+
+ require PUN_ROOT.'footer.php';
+}
+
+($hook = get_hook('aex_end')) ? eval($hook) : null;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/admin/forums.php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,726 @@
+<?php
+/***********************************************************************
+
+ Copyright (C) 2002-2008 PunBB.org
+
+ This file is part of PunBB.
+
+ PunBB 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.
+
+ PunBB 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
+
+************************************************************************/
+
+
+// if (!defined('PUN_ROOT'))
+// define('PUN_ROOT', '../');
+// require PUN_ROOT.'include/common.php';
+require PUN_ROOT.'include/common_admin.php';
+
+// import globals (I really hope this isn't dangerous)
+foreach ( $GLOBALS as $key => $_ )
+{
+ $$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';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php printf($lang_admin['Confirm delete forum'], htmlspecialchars($forum_name)) ?></span></h2>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_forums']) ?>&del_forum=<?php echo $forum_id ?>">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_forums']).'&del_forum='.$forum_id) ?>" />
+ </div>
+ <div class="frm-info">
+ <p class="warn"><?php echo $lang_admin['Delete forum warning'] ?></p>
+ </div>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" name="del_forum_comply" value="<?php echo $lang_admin['Delete'] ?>" /></span>
+ <span class="cancel"><input type="submit" name="del_forum_cancel" value="<?php echo $lang_admin['Cancel'] ?>" /></span>
+ </div>
+ </form>
+ </div>
+
+</div>
+<?php
+
+ require PUN_ROOT.'footer.php';
+ }
+}
+
+
+// Update forum positions
+else if (isset($_POST['update_positions']))
+{
+ $positions = array_map('intval', $_POST['position']);
+
+ ($hook = get_hook('afo_update_positions_form_submitted')) ? eval($hook) : null;
+
+ $query = array(
+ 'SELECT' => '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'][] = '<li><span>'.$lang_admin['Forum perms info 2'].'</span></li>';
+
+ $pun_page['form_info'][] = '<li><span>'.$lang_admin['Forum perms info 1'].'</span></li>';
+ $pun_page['form_info'][] = '<li><span>'.$lang_admin['Forum perms info 3'].'</span></li>';
+ $pun_page['form_info'][] = '<li><span>'. sprintf($lang_admin['Group key'], '<a href="'.pun_link($pun_url['admin_groups']).'">'.$lang_admin['User groups'].'</a>').'</span></li>';
+
+ // 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';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <form method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_forums']) ?>&edit_forum=<?php echo $forum_id ?>">
+
+ <div class="main-content frm parted">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_forums']).'&edit_forum='.$forum_id) ?>" />
+ </div>
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Edit forum head'] ?></span></h2>
+ </div>
+ <div class="frm-form">
+<?php ($hook = get_hook('afo_edit_forum_pre_details_part')) ? eval($hook) : null; ?>
+ <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>">
+ <h3><span><?php printf($lang_admin['Edit details head'], $pun_page['part_count']) ?></span></h3>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['Edit forum details legend'] ?></strong></legend>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Forum name'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="forum_name" size="35" maxlength="80" value="<?php echo htmlspecialchars($cur_forum['forum_name']) ?>" /></span>
+ </label>
+ </div>
+ <div class="frm-fld text textarea">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Forum description'] ?></span><br />
+ <span class="fld-input"><textarea id="fld<?php echo $pun_page['fld_count'] ?>" name="forum_desc" rows="3" cols="50"><?php echo htmlspecialchars($cur_forum['forum_desc']) ?></textarea></span>
+ <span class="fld-help"><?php echo $lang_admin['Forum description help'] ?></span>
+ </label>
+ </div>
+ <div class="frm-fld select">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Category assignment'] ?></span><br />
+ <span class="fld-input"><select id="fld<?php echo $pun_page['fld_count'] ?>" name="cat_id">
+<?php
+
+ $query = array(
+ 'SELECT' => 'c.id, c.cat_name',
+ 'FROM' => 'categories AS c',
+ 'ORDER BY' => 'c.disp_position'
+ );
+
+ ($hook = get_hook('afo_qr_get_categories')) ? eval($hook) : null;
+ $result = $pun_db->query_build($query) or error(__FILE__, __LINE__);
+ while ($cur_cat = $pun_db->fetch_assoc($result))
+ {
+ $selected = ($cur_cat['id'] == $cur_forum['cat_id']) ? ' selected="selected"' : '';
+ echo "\t\t\t\t\t\t\t\t".'<option value="'.$cur_cat['id'].'"'.$selected.'>'.htmlspecialchars($cur_cat['cat_name']).'</option>'."\n";
+ }
+
+?>
+ </select></span>
+ </label>
+ </div>
+ <div class="frm-fld select">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Sort topics by'] ?></span><br />
+ <span class="fld-input"><select id="fld<?php echo $pun_page['fld_count'] ?>" name="sort_by">
+ <option value="0"<?php if ($cur_forum['sort_by'] == '0') echo ' selected="selected"' ?>><?php echo $lang_admin['Sort last post'] ?></option>
+ <option value="1"<?php if ($cur_forum['sort_by'] == '1') echo ' selected="selected"' ?>><?php echo $lang_admin['Sort topic start'] ?></option>
+ </select></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Redirect URL'] ?></span><br />
+ <span class="fld-input"><?php echo ($cur_forum['num_topics']) ? '<input type="text" id="fld'.$pun_page['fld_count'].'" name="redirect_url" size="45" maxlength="100" value="Only available in empty forums" disabled="disabled" />' : '<input type="text" id="fld'.$pun_page['fld_count'].'" name="redirect_url" size="45" maxlength="100" value="'.htmlspecialchars($cur_forum['redirect_url']).'" />'; ?></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('afo_edit_forum_details_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ </div>
+<?php
+
+// Reset fieldset counter
+$pun_page['set_count'] = 0;
+
+($hook = get_hook('afo_edit_forum_pre_permissions_part')) ? eval($hook) : null;
+
+?>
+ <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>">
+ <h3><span><?php printf($lang_admin['Edit permissions head'], $pun_page['part_count']) ?></span></h3>
+ <div class="frm-info">
+ <ul>
+ <?php echo implode("\n\t\t\t\t\t", $pun_page['form_info'])."\n" ?>
+ </ul>
+ </div>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['Edit forum perms legend'] ?></strong></legend>
+<?php
+
+ $i = 2;
+
+ $query = array(
+ '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' => '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;
+
+?>
+ <fieldset class="frm-group">
+ <legend><span><?php echo htmlspecialchars($cur_perm['g_title']) ?></span></legend>
+ <div class="radbox frm-choice">
+ <input type="hidden" name="read_forum_old[<?php echo $cur_perm['g_id'] ?>]" value="<?php echo ($read_forum) ? '1' : '0'; ?>" />
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>"<?php if (!$read_forum_def) echo ' class="warn"' ?>><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="read_forum_new[<?php echo $cur_perm['g_id'] ?>]" value="1"<?php if ($read_forum) echo ' checked="checked"'; echo ($cur_perm['g_read_board'] == '0') ? ' disabled="disabled"' : ''; ?> /> <?php echo $lang_admin['Read forum'] ?> <?php if (!$read_forum_def) echo $lang_admin['Not default'] ?></label>
+ <input type="hidden" name="post_replies_old[<?php echo $cur_perm['g_id'] ?>]" value="<?php echo ($post_replies) ? '1' : '0'; ?>" />
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>"<?php if (!$post_replies_def) echo ' class="warn"'; ?>><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="post_replies_new[<?php echo $cur_perm['g_id'] ?>]" value="1"<?php if ($post_replies) echo ' checked="checked"'; echo ($cur_forum['redirect_url'] != '') ? ' disabled="disabled"' : ''; ?> /> <?php echo $lang_admin['Post replies'] ?> <?php if (!$post_replies_def) echo $lang_admin['Not default'] ?></label>
+ <input type="hidden" name="post_topics_old[<?php echo $cur_perm['g_id'] ?>]" value="<?php echo ($post_topics) ? '1' : '0'; ?>" />
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>"<?php if (!$post_topics_def) echo ' class="warn"'; ?>><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="post_topics_new[<?php echo $cur_perm['g_id'] ?>]" value="1"<?php if ($post_topics) echo ' checked="checked"'; echo ($cur_forum['redirect_url'] != '') ? ' disabled="disabled"' : ''; ?> /> <?php echo $lang_admin['Post topics'] ?> <?php if (!$post_topics_def) echo $lang_admin['Not default'] ?></label>
+<?php ($hook = get_hook('afo_edit_forum_new_permission')) ? eval($hook) : null; ?>
+ </div>
+ </fieldset>
+<?php
+
+ ++$i;
+ }
+
+?>
+ <p class="frm-fld link"><span class="fld-label"><?php echo $lang_admin['Administrators'] ?></span> <span class="fld-input"><?php echo $lang_admin['Admin full perms'] ?></span></p>
+<?php ($hook = get_hook('afo_edit_forum_permissions_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ </div>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" name="save" value="<?php echo $lang_admin['Save changes'] ?>" /></span>
+ <span class="submit"><input type="submit" name="revert_perms" value="<?php echo $lang_admin['Restore defaults'] ?>" /></span>
+ </div>
+ </div>
+ </div>
+ </form>
+
+</div>
+
+<?php
+
+ require PUN_ROOT.'footer.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['Forums']
+);
+
+($hook = get_hook('afo_pre_header_load')) ? eval($hook) : null;
+
+define('PUN_PAGE_SECTION', 'start');
+define('PUN_PAGE', 'admin-forums');
+require PUN_ROOT.'header.php';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Add forum head'] ?></span></h2>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_forums']) ?>&action=adddel">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_forums']).'&action=adddel') ?>" />
+ </div>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['Add forum legend'] ?></strong></legend>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Forum name'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="forum_name" size="35" maxlength="80" /></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Position'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="position" size="3" maxlength="3" /></span>
+ <span class="fld-extra"><?php echo $lang_admin['Forum position help'] ?></span>
+ </label>
+ </div>
+ <div class="frm-fld select">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Add to category'] ?></span><br />
+ <span class="fld-input"><select id="fld<?php echo $pun_page['fld_count'] ?>" name="add_to_cat">
+<?php
+
+ $query = array(
+ 'SELECT' => 'c.id, c.cat_name',
+ 'FROM' => 'categories AS c',
+ 'ORDER BY' => 'c.disp_position'
+ );
+
+ ($hook = get_hook('afo_qr_get_categories2')) ? eval($hook) : null;
+ $result = $pun_db->query_build($query) or error(__FILE__, __LINE__);
+ while ($cur_cat = $pun_db->fetch_assoc($result))
+ echo "\t\t\t\t\t\t\t".'<option value="'.$cur_cat['id'].'">'.htmlspecialchars($cur_cat['cat_name']).'</option>'."\n";
+
+?>
+ </select></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('afo_add_forum_fieldset_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" class="button" name="add_forum" value=" <?php echo $lang_admin['Add forum'] ?> " /></span>
+ </div>
+ </form>
+ </div>
+
+<?php
+
+// Display all the categories and forums
+$query = array(
+ 'SELECT' => '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;
+
+?>
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Edit forums head'] ?></span></h2>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_forums']) ?>&action=edit">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_forums']).'&action=edit') ?>" />
+ </div>
+
+<?php
+
+ $cur_category = 0;
+ $i = 2;
+
+ while ($cur_forum = $pun_db->fetch_assoc($result))
+ {
+ if ($cur_forum['cid'] != $cur_category) // A new category since last iteration?
+ {
+ if ($i > 2) echo "\t\t\t".'</fieldset>'."\n";
+
+?>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo htmlspecialchars($cur_forum['cat_name']) ?></strong></legend>
+ <h3 class="frm-fld link">
+ <span class="fld-label"><?php echo $lang_admin['Category'] ?></span>
+ <span class="fld-input">[ <?php echo htmlspecialchars($cur_forum['cat_name']) ?> ]</span>
+ </h3>
+<?php
+
+ $cur_category = $cur_forum['cid'];
+ }
+
+?>
+ <div class="frm-fld text twin">
+ <span class="fld-label"><a href="<?php echo pun_link($pun_url['admin_forums']) ?>&edit_forum=<?php echo $cur_forum['fid'] ?>"><span><?php echo $lang_admin['Edit'].'<span> '.htmlspecialchars($cur_forum['forum_name']).' </span></span>' ?></a><br /> <a href="<?php echo pun_link($pun_url['admin_forums']) ?>&del_forum=<?php echo $cur_forum['fid'] ?>"><span><?php echo $lang_admin['Delete'].'<span> '.htmlspecialchars($cur_forum['forum_name']).'</span></span>' ?></a></span><br />
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>" class="twin2">
+ <span class="fld-label"><?php echo $lang_admin['Position'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="position[<?php echo $cur_forum['fid'] ?>]" size="3" maxlength="3" value="<?php echo $cur_forum['disp_position'] ?>" /></span>
+ <small class="extra"><?php echo htmlspecialchars($cur_forum['forum_name']) ?></span>
+ </label>
+ </div>
+<?php
+
+ ++$i;
+ }
+
+?>
+ </fieldset>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" class="button" name="update_positions" value="<?php echo $lang_admin['Update positions'] ?>" /></span>
+ </div>
+ </form>
+<?php
+
+}
+
+?>
+ </div>
+
+</div>
+<?php
+
+require PUN_ROOT.'footer.php';
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/admin/groups.php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,738 @@
+<?php
+/***********************************************************************
+
+ Copyright (C) 2002-2008 PunBB.org
+
+ This file is part of PunBB.
+
+ PunBB 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.
+
+ PunBB 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
+
+************************************************************************/
+
+
+// if (!defined('PUN_ROOT'))
+// define('PUN_ROOT', '../');
+// require PUN_ROOT.'include/common.php';
+require PUN_ROOT.'include/common_admin.php';
+
+// import globals (I really hope this isn't dangerous)
+foreach ( $GLOBALS as $key => $_ )
+{
+ $$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';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm parted">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Group settings heading'] ?></span></h2>
+ </div>
+ <div id="req-msg" class="frm-warn">
+ <p class="important"><?php printf($lang_common['Required warn'], '<em class="req-text">'.$lang_common['Required'].'</em>') ?></p>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_groups']) ?>">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_groups'])) ?>" />
+ <input type="hidden" name="mode" value="<?php echo $mode ?>" />
+<?php if ($mode == 'edit'): ?> <input type="hidden" name="group_id" value="<?php echo $group_id ?>" />
+<?php endif; if ($mode == 'add'): ?> <input type="hidden" name="base_group" value="<?php echo $base_group ?>" />
+<?php endif; ?> </div>
+<?php ($hook = get_hook('agr_add_edit_group_pre_title_part')) ? eval($hook) : null; ?>
+ <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>">
+ <h3><span><?php printf($lang_admin['Group title head'], $pun_page['part_count']) ?></span></h3>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><span><?php echo $lang_admin['Options'] ?></span></legend>
+ <div class="frm-fld text required">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Group title'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="req_title" size="25" maxlength="50" value="<?php if ($mode == 'edit') echo htmlspecialchars($group['g_title']); ?>" /></span>
+ <em class="req-text"><?php echo $lang_common['Required'] ?></em>
+ </label>
+ </div>
+ <div class="frm-fld text required">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['User title'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="user_title" size="25" maxlength="50" value="<?php echo htmlspecialchars($group['g_user_title']) ?>" /></span>
+ <span class="fld-help"><?php echo $lang_admin['User title info'] ?></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('agr_add_edit_group_title_end')) ? eval($hook) : null; ?>
+ </fieldset>
+<?php
+
+ // The rest of the form is for non-admin groups only
+ if ($group['g_id'] != PUN_ADMIN)
+ {
+ // Reset fieldset counter
+ $pun_page['set_count'] = 0;
+
+?>
+ </div>
+<?php ($hook = get_hook('agr_add_edit_group_pre_permissions_part')) ? eval($hook) : null; ?>
+ <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>">
+ <h3><span><?php printf($lang_admin['Group perms head'], $pun_page['part_count']) ?></span></h3>
+<?php if ($mode == 'edit' && $pun_config['o_default_user_group'] == $group['g_id']): ?> <div class="frm-info">
+ <p class="warn"><?php echo $lang_admin['Moderator default group'] ?></p>
+ </div>
+<?php endif; ?> <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['Permissions'] ?></strong></legend>
+<?php if ($group['g_id'] != PUN_GUEST): if ($mode != 'edit' || $pun_config['o_default_user_group'] != $group['g_id']): ?><fieldset class="frm-group">
+ <legend><span><?php echo $lang_admin['Mod permissions'] ?></span></legend>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="moderator" value="1"<?php if ($group['g_moderator'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow moderate'] ?> <em class="field-info"><?php echo $lang_admin['Mods warning'] ?></em></label></div>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="mod_edit_users" value="1"<?php if ($group['g_mod_edit_users'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow mod edit profiles'] ?></label></div>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="mod_rename_users" value="1"<?php if ($group['g_mod_rename_users'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow mod edit username'] ?></label></div>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="mod_change_passwords" value="1"<?php if ($group['g_mod_change_passwords'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow mod change pass'] ?></label></div>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="mod_ban_users" value="1"<?php if ($group['g_mod_ban_users'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow mod bans'] ?></label></div>
+ </fieldset>
+<?php endif; endif; ?> <fieldset class="frm-group">
+ <legend><span><?php echo $lang_admin['User permissions'] ?></span></legend>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="read_board" value="1"<?php if ($group['g_read_board'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow read board'] ?></label><br /> <em class="field-info"><?php echo $lang_admin['Allow read board info'] ?></em></div>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="view_users" value="1"<?php if ($group['g_view_users'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow view users'] ?></label></div>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="post_replies" value="1"<?php if ($group['g_post_replies'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow post replies'] ?></label></div>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="post_topics" value="1"<?php if ($group['g_post_topics'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow post topics'] ?></label></div>
+<?php if ($group['g_id'] != PUN_GUEST): ?> <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="edit_posts" value="1"<?php if ($group['g_edit_posts'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow edit posts'] ?></label></div>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="delete_posts" value="1"<?php if ($group['g_delete_posts'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow delete posts'] ?></label></div>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="delete_topics" value="1"<?php if ($group['g_delete_topics'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow delete topics'] ?></label></div>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="set_title" value="1"<?php if ($group['g_set_title'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow set user title'] ?></label></div>
+<?php endif; ?> <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="search" value="1"<?php if ($group['g_search'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow use search'] ?></label></div>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="search_users" value="1"<?php if ($group['g_search_users'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow search users'] ?></label></div>
+ </fieldset>
+<?php ($hook = get_hook('agr_add_edit_group_permissions_end')) ? eval($hook) : null; ?>
+ </fieldset>
+<?php
+
+ // Reset fieldset counter
+ $pun_page['set_count'] = 0;
+
+ // The rest of the form is for non-guest groups only
+ if ($group['g_id'] != PUN_GUEST)
+ {
+
+?>
+ </div>
+<?php ($hook = get_hook('agr_add_edit_group_pre_flood_part')) ? eval($hook) : null; ?>
+ <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>">
+ <h3><span><?php printf($lang_admin['Group flood head'], $pun_page['part_count']) ?></span></h3>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><span><?php echo $lang_admin['Restrictions'] ?></span></legend>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Edit interval'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="edit_subjects_interval" size="5" maxlength="5" value="<?php echo $group['g_edit_subjects_interval'] ?>" /></span>
+ <span class="fld-help"><?php echo $lang_admin['Edit interval info'] ?></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Flood interval'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="post_flood" size="5" maxlength="4" value="<?php echo $group['g_post_flood'] ?>" /></span>
+ <span class="fld-help"><?php echo $lang_admin['Flood interval info'] ?></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Search interval'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="search_flood" size="5" maxlength="4" value="<?php echo $group['g_search_flood'] ?>" /></span>
+ <span class="fld-help"><?php echo $lang_admin['Search interval info'] ?></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('agr_add_edit_group_flood_end')) ? eval($hook) : null; ?>
+ </fieldset>
+<?php
+
+ }
+ }
+
+?>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" class="button" name="add_edit_group" value=" <?php echo $lang_admin['Save'] ?> " /></span>
+ </div>
+ </div>
+ </form>
+ </div>
+
+</div>
+<?php
+
+ require PUN_ROOT.'footer.php';
+}
+
+
+// Add/edit a group (stage 2)
+else if (isset($_POST['add_edit_group']))
+{
+ // Is this the admin group? (special rules apply)
+ $is_admin_group = (isset($_POST['group_id']) && $_POST['group_id'] == PUN_ADMIN) ? true : false;
+
+ $title = trim($_POST['req_title']);
+ $user_title = trim($_POST['user_title']);
+ $moderator = isset($_POST['moderator']) && $_POST['moderator'] == '1' ? '1' : '0';
+ $mod_edit_users = $moderator == '1' && isset($_POST['mod_edit_users']) && $_POST['mod_edit_users'] == '1' ? '1' : '0';
+ $mod_rename_users = $moderator == '1' && isset($_POST['mod_rename_users']) && $_POST['mod_rename_users'] == '1' ? '1' : '0';
+ $mod_change_passwords = $moderator == '1' && isset($_POST['mod_change_passwords']) && $_POST['mod_change_passwords'] == '1' ? '1' : '0';
+ $mod_ban_users = $moderator == '1' && isset($_POST['mod_ban_users']) && $_POST['mod_ban_users'] == '1' ? '1' : '0';
+ $read_board = (isset($_POST['read_board']) && $_POST['read_board'] == '1') || $is_admin_group ? '1' : '0';
+ $view_users = (isset($_POST['view_users']) && $_POST['view_users'] == '1') || $is_admin_group ? '1' : '0';
+ $post_replies = (isset($_POST['post_replies']) && $_POST['post_replies'] == '1') || $is_admin_group ? '1' : '0';
+ $post_topics = (isset($_POST['post_topics']) && $_POST['post_topics'] == '1') || $is_admin_group ? '1' : '0';
+ $edit_posts = (isset($_POST['edit_posts']) && $_POST['edit_posts'] == '1') || $is_admin_group ? '1' : '0';
+ $delete_posts = (isset($_POST['delete_posts']) && $_POST['delete_posts'] == '1') || $is_admin_group ? '1' : '0';
+ $delete_topics = (isset($_POST['delete_topics']) && $_POST['delete_topics'] == '1') || $is_admin_group ? '1' : '0';
+ $set_title = (isset($_POST['set_title']) && $_POST['set_title'] == '1') || $is_admin_group ? '1' : '0';
+ $search = (isset($_POST['search']) && $_POST['search'] == '1') || $is_admin_group ? '1' : '0';
+ $search_users = (isset($_POST['search_users']) && $_POST['search_users'] == '1') || $is_admin_group ? '1' : '0';
+ $edit_subjects_interval = isset($_POST['edit_subjects_interval']) ? intval($_POST['edit_subjects_interval']) : '0';
+ $post_flood = isset($_POST['post_flood']) ? intval($_POST['post_flood']) : '0';
+ $search_flood = isset($_POST['search_flood']) ? intval($_POST['search_flood']) : '0';
+
+ if ($title == '')
+ message($lang_admin['Must enter group message']);
+
+ $user_title = ($user_title != '') ? '\''.$pun_db->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';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php printf($lang_admin['Remove group head'], htmlspecialchars($group_title), $num_members) ?></span></h2>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_groups']) ?>&del_group=<?php echo $group_id ?>">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_groups']).'&del_group='.$group_id) ?>" />
+ </div>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><span><?php echo $lang_admin['Options'] ?></span></legend>
+ <div class="frm-fld select">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Move users to'] ?></span><br />
+ <span class="fld-input"><select id="fld<?php echo $pun_page['fld_count'] ?>" name="move_to_group">
+<?php
+
+ $query = array(
+ 'SELECT' => 'g.g_id, g.g_title',
+ 'FROM' => 'groups AS g',
+ 'WHERE' => 'g.g_id!='.PUN_GUEST.' AND g.g_id!='.$group_id,
+ 'ORDER BY' => 'g.g_title'
+ );
+
+ ($hook = get_hook('agr_qr_get_groups')) ? eval($hook) : null;
+ $result = $pun_db->query_build($query) or error(__FILE__, __LINE__);
+ while ($cur_group = $pun_db->fetch_assoc($result))
+ {
+ if ($cur_group['g_id'] == PUN_MEMBER) // Pre-select the pre-defined Members group
+ echo "\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'" selected="selected">'.htmlspecialchars($cur_group['g_title']).'</option>'."\n";
+ else
+ echo "\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'">'.htmlspecialchars($cur_group['g_title']).'</option>'."\n";
+ }
+
+?>
+
+ </select></span>
+ <span class="fld-extra"><?php echo $lang_admin['Remove group help'] ?></span>
+ </label>
+ </div>
+ </fieldset>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" name="del_group" value="<?php echo $lang_admin['Remove group'] ?>" /></span>
+ <span class="cancel"><input type="submit" name="del_group_cancel" value="<?php echo $lang_admin['Cancel'] ?>" /></span>
+ </div>
+ </form>
+ </div>
+
+</div>
+<?php
+
+ require PUN_ROOT.'footer.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['Groups']
+);
+
+($hook = get_hook('agr_pre_header_load')) ? eval($hook) : null;
+
+define('PUN_PAGE_SECTION', 'users');
+define('PUN_PAGE', 'admin-groups');
+require PUN_ROOT.'header.php';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Add group heading'] ?></span></h2>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_groups']) ?>&action=foo">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_groups']).'&action=foo') ?>" />
+ </div>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><span><?php echo $lang_admin['Options'] ?></span></legend>
+ <div class="frm-fld select">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Base new group'] ?></span><br />
+ <span class="fld-input"><select id="fld<?php echo $pun_page['fld_count'] ?>" name="base_group">
+<?php
+
+$query = array(
+ 'SELECT' => 'g.g_id, g.g_title',
+ 'FROM' => 'groups AS g',
+ 'WHERE' => 'g_id>'.PUN_GUEST,
+ 'ORDER BY' => 'g.g_title'
+);
+
+($hook = get_hook('agr_qr_get_groups2')) ? eval($hook) : null;
+$result = $pun_db->query_build($query) or error(__FILE__, __LINE__);
+while ($cur_group = $pun_db->fetch_assoc($result))
+{
+ if ($cur_group['g_id'] == $pun_config['o_default_user_group'])
+ echo "\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'" selected="selected">'.htmlspecialchars($cur_group['g_title']).'</option>'."\n";
+ else
+ echo "\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'">'.htmlspecialchars($cur_group['g_title']).'</option>'."\n";
+}
+
+?>
+ </select></span>
+ </label>
+ </div>
+ </fieldset>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" name="add_group" value="<?php echo $lang_admin['Add group'] ?> " /></span>
+ </div>
+ </form>
+ </div>
+<?php
+
+ // Reset fieldset counter
+ $pun_page['set_count'] = 0;
+
+?>
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Default group heading'] ?></span></h2>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_groups']) ?>&action=foo">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_groups']).'&action=foo') ?>" />
+ </div>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><span><?php echo $lang_admin['Options'] ?></span></legend>
+ <div class="frm-fld select">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Default group'] ?></span><br />
+ <span class="fld-input"><select id="fld<?php echo $pun_page['fld_count'] ?>" name="default_group">
+<?php
+
+$query = array(
+ 'SELECT' => 'g.g_id, g.g_title',
+ 'FROM' => 'groups AS g',
+ 'WHERE' => 'g_id>'.PUN_GUEST.' AND g_moderator=0',
+ 'ORDER BY' => 'g.g_title'
+);
+
+($hook = get_hook('agr_qr_get_groups3')) ? eval($hook) : null;
+$result = $pun_db->query_build($query) or error(__FILE__, __LINE__);
+while ($cur_group = $pun_db->fetch_assoc($result))
+{
+ if ($cur_group['g_id'] == $pun_config['o_default_user_group'])
+ echo "\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'" selected="selected">'.htmlspecialchars($cur_group['g_title']).'</option>'."\n";
+ else
+ echo "\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'">'.htmlspecialchars($cur_group['g_title']).'</option>'."\n";
+}
+
+?>
+ </select></span>
+ </label>
+ </div>
+ </fieldset>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" class="button" name="set_default_group" value="<?php echo $lang_admin['Set default'] ?>" /></span>
+ </div>
+ </form>
+ </div>
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Existing groups heading'] ?></span></h2>
+ </div>
+ <div class="frm-info">
+ <p><?php echo $lang_admin['Existing groups intro'] ?></p>
+ </div>
+ <div class="datagrid">
+<?php
+
+$query = array(
+ 'SELECT' => '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))
+{
+
+?>
+ <div class="grp-item databox db<?php echo ++$pun_page['item_num'] ?>">
+ <h3 class="data"><span><?php echo htmlspecialchars($cur_group['g_title']) ?></span></h3>
+ <p class="legend actions"><a href="<?php echo pun_link($pun_url['admin_groups']).'&edit_group='.$cur_group['g_id'] ?>"><span><?php echo $lang_admin['Edit'] ?><span><?php echo htmlspecialchars($cur_group['g_title']) ?></span></span></a><?php if ($cur_group['g_id'] > PUN_MEMBER) echo ' <a href="'.pun_link($pun_url['admin_groups']).'&del_group='.$cur_group['g_id'].'"><span>'.$lang_admin['Remove'].'<span> '.htmlspecialchars($cur_group['g_title']).'</span></span></a>' ?></p>
+ </div>
+<?php
+
+}
+
+?>
+ </div>
+ </div>
+
+</div>
+<?php
+
+require PUN_ROOT.'footer.php';
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/admin/index.php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,244 @@
+<?php
+/***********************************************************************
+
+ Copyright (C) 2002-2008 PunBB.org
+
+ This file is part of PunBB.
+
+ PunBB 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.
+
+ PunBB 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
+
+************************************************************************/
+
+
+// if (!defined('PUN_ROOT'))
+// define('PUN_ROOT', '../');
+// require PUN_ROOT.'include/common.php';
+require PUN_ROOT.'include/common_admin.php';
+
+// import globals (I really hope this isn't dangerous)
+foreach ( $GLOBALS as $key => $_ )
+{
+ $$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 = '<a href="http://punbb.org/update/?version='.urlencode($pun_config['o_cur_version']).'&hotfixes='.implode(',', $hotfixes).'">'.$lang_admin['Check for updates manual'].'</a>';
+}
+
+
+// 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 = '<a href="http://turck-mmcache.sourceforge.net/">Turck MMCache</a>';
+else if (isset($_PHPA))
+ $php_accelerator = '<a href="http://www.php-accelerator.co.uk/">ionCube PHP Accelerator</a>';
+else if (ini_get('apc.enabled'))
+ $php_accelerator ='<a href="http://www.php.net/apc/">Alternative PHP Cache (APC)</a>';
+else if (ini_get('zend_optimizer.optimization_level'))
+ $php_accelerator = '<a href="http://www.zend.com/products/zend_optimizer/">Zend Optimizer</a>';
+else if (ini_get('eaccelerator.enable'))
+ $php_accelerator = '<a href="http://eaccelerator.net/">eAccelerator</a>';
+else if (ini_get('xcache.cacher'))
+ $php_accelerator = '<a href="http://trac.lighttpd.net/xcache/">XCache</a>';
+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';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Information head'] ?></span></h2>
+ </div>
+ <div class="frm-info">
+ <p><?php echo $lang_admin['Welcome info'] ?></p>
+ </div>
+ <div class="datagrid">
+<?php ($hook = get_hook('ain_pre_version')) ? eval($hook) : null; ?>
+ <div class="idx-item databox db<?php echo ++$pun_page['item_num']?>">
+ <h3 class="legend"><span><?php echo $lang_admin['PunBB version'] ?></span></h3>
+ <ul class="data">
+ <li><span>PunBB <?php echo $pun_config['o_cur_version'] ?></span></li>
+ <li><span>© Copyright 2002-2008 <a href="http://punbb.org/">PunBB.org</a></span></li>
+ <li><span><?php echo $punbb_updates ?></span></li>
+ </ul>
+ </div>
+<?php ($hook = get_hook('ain_pre_server_load')) ? eval($hook) : null; ?>
+ <div class="idx-item databox db<?php echo ++$pun_page['item_num']?>">
+ <h3 class="legend"><span><?php echo $lang_admin['Server load'] ?></span></h3>
+ <p class="data"><?php echo $server_load ?> (<?php echo $num_online.' '.$lang_admin['users online']?>)</p>
+ </div>
+<?php ($hook = get_hook('ain_pre_environment')) ? eval($hook) : null; if ($pun_user['g_id'] == PUN_ADMIN): ?> <div class="idx-item databox db<?php echo ++$pun_page['item_num']?>">
+ <h3 class="legend"><span><?php echo $lang_admin['Environment'] ?></span></h3>
+ <ul class="data">
+ <li><span><?php echo $lang_admin['Operating system'] ?>: <?php echo PHP_OS ?></span></li>
+ <li><span>PHP: <?php echo PHP_VERSION ?> - <a href="<?php echo pun_link($pun_url['admin_index']) ?>&action=phpinfo"><?php echo $lang_admin['Show info'] ?></a></span></li>
+ <li><span><?php echo $lang_admin['Accelerator'] ?>: <?php echo $php_accelerator ?></span></li>
+ </ul>
+ </div>
+<?php ($hook = get_hook('ain_pre_database')) ? eval($hook) : null; ?>
+ <div class="idx-item databox db<?php echo ++$pun_page['item_num']?>">
+ <h3 class="legend"><span><?php echo $lang_admin['Database'] ?></span></h3>
+ <ul class="data">
+ <li><span><?php echo $db_version ?></span></li>
+<?php if (isset($total_records) && isset($total_size)): ?> <li><span><?php echo $lang_admin['Rows'] ?>: <?php echo $total_records ?></span></li>
+ <li><span><?php echo $lang_admin['Size'] ?>: <?php echo $total_size ?></span></li>
+ </ul>
+ </div>
+<?php endif; endif; ($hook = get_hook('ain_items_end')) ? eval($hook) : null; ?> </div>
+ </div>
+
+</div>
+<?php
+
+require PUN_ROOT.'footer.php';
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/admin/options.php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,1177 @@
+<?php
+/***********************************************************************
+
+ Copyright (C) 2002-2008 PunBB.org
+
+ This file is part of PunBB.
+
+ PunBB 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.
+
+ PunBB 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
+
+************************************************************************/
+
+
+// if (!defined('PUN_ROOT'))
+// define('PUN_ROOT', '../');
+// require PUN_ROOT.'include/common.php';
+require PUN_ROOT.'include/common_admin.php';
+
+// import globals (I really hope this isn't dangerous)
+foreach ( $GLOBALS as $key => $_ )
+{
+ $$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';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm parted">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Essentials head'] ?></span></h2>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_options_setup']) ?>">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_options_setup'])) ?>" />
+ <input type="hidden" name="form_sent" value="1" />
+ </div>
+<?php ($hook = get_hook('aop_setup_pre_personal_part')) ? eval($hook) : null; ?>
+ <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>">
+ <h3><span><?php printf($lang_admin['Essentials personal head'], $pun_page['part_count']) ?></span></h3>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['Personalize legend'] ?></strong></legend>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Board title'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[board_title]" size="50" maxlength="255" value="<?php echo htmlspecialchars($pun_config['o_board_title']) ?>" /></span><br />
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Board description'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[board_desc]" size="50" maxlength="255" value="<?php echo htmlspecialchars($pun_config['o_board_desc']) ?>" /></span><br />
+ <span class="fld-help"><?php echo $lang_admin['Board description help'] ?></span>
+ </label>
+ </div>
+ <div class="frm-fld select">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Default style'] ?></span><br />
+ <span class="fld-input"><select id="fld<?php echo $pun_page['fld_count'] ?>" name="form[default_style]">
+<?php
+
+ $styles = array();
+ $d = dir(PUN_ROOT.'style');
+ while (($entry = $d->read()) !== false)
+ {
+ if ($entry != '.' && $entry != '..' && is_dir(PUN_ROOT.'style/'.$entry) && file_exists(PUN_ROOT.'style/'.$entry.'/'.$entry.'.css'))
+ $styles[] = $entry;
+ }
+ $d->close();
+
+ @natcasesort($styles);
+
+ while (list(, $temp) = @each($styles))
+ {
+ if ($pun_config['o_default_style'] == $temp)
+ echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'" selected="selected">'.str_replace('_', ' ', $temp).'</option>'."\n";
+ else
+ echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'">'.str_replace('_', ' ', $temp).'</option>'."\n";
+ }
+
+?>
+ </select></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('aop_setup_personal_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ </div>
+<?php
+
+// Reset fieldset counter
+$pun_page['set_count'] = 0;
+
+($hook = get_hook('aop_setup_pre_local_part')) ? eval($hook) : null;
+
+?>
+ <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>">
+ <h3><span><?php printf($lang_admin['Essentials local head'], $pun_page['part_count']) ?></span></h3>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['Board defaults legend'] ?></strong></legend>
+ <div class="frm-fld">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Default language'] ?></span><br />
+ <span class="fld-input"><select id="fld<?php echo $pun_page['fld_count'] ?>" name="form[default_lang]">
+<?php
+
+ $languages = array();
+ $d = dir(PUN_ROOT.'lang');
+ while (($entry = $d->read()) !== false)
+ {
+ if ($entry != '.' && $entry != '..' && is_dir(PUN_ROOT.'lang/'.$entry) && file_exists(PUN_ROOT.'lang/'.$entry.'/common.php'))
+ $languages[] = $entry;
+ }
+ $d->close();
+
+ @natcasesort($languages);
+
+ while (list(, $temp) = @each($languages))
+ {
+ if ($pun_config['o_default_lang'] == $temp)
+ echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'" selected="selected">'.$temp.'</option>'."\n";
+ else
+ echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'">'.$temp.'</option>'."\n";
+ }
+
+?>
+ </select></span>
+ <span class="fld-help"><?php echo $lang_admin['Default language help'] ?></span>
+ </label>
+ </div>
+ <div class="frm-fld select">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Default timezone'] ?></span><br />
+ <span class="fld-input"><select id="fld<?php echo $pun_page['fld_count'] ?>" name="form[default_timezone]">
+ <option value="-12"<?php if ($pun_config['o_default_timezone'] == -12 ) echo ' selected="selected"' ?>>-12</option>
+ <option value="-11"<?php if ($pun_config['o_default_timezone'] == -11) echo ' selected="selected"' ?>>-11</option>
+ <option value="-10"<?php if ($pun_config['o_default_timezone'] == -10) echo ' selected="selected"' ?>>-10</option>
+ <option value="-9.5"<?php if ($pun_config['o_default_timezone'] == -9.5) echo ' selected="selected"' ?>>-09.5</option>
+ <option value="-9"<?php if ($pun_config['o_default_timezone'] == -9 ) echo ' selected="selected"' ?>>-09</option>
+ <option value="-8.5"<?php if ($pun_config['o_default_timezone'] == -8.5) echo ' selected="selected"' ?>>-08.5</option>
+ <option value="-8"<?php if ($pun_config['o_default_timezone'] == -8 ) echo ' selected="selected"' ?>>-08 PST</option>
+ <option value="-7"<?php if ($pun_config['o_default_timezone'] == -7 ) echo ' selected="selected"' ?>>-07 MST</option>
+ <option value="-6"<?php if ($pun_config['o_default_timezone'] == -6 ) echo ' selected="selected"' ?>>-06 CST</option>
+ <option value="-5"<?php if ($pun_config['o_default_timezone'] == -5 ) echo ' selected="selected"' ?>>-05 EST</option>
+ <option value="-4"<?php if ($pun_config['o_default_timezone'] == -4 ) echo ' selected="selected"' ?>>-04 AST</option>
+ <option value="-3.5"<?php if ($pun_config['o_default_timezone'] == -3.5) echo ' selected="selected"' ?>>-03.5</option>
+ <option value="-3"<?php if ($pun_config['o_default_timezone'] == -3 ) echo ' selected="selected"' ?>>-03 ADT</option>
+ <option value="-2"<?php if ($pun_config['o_default_timezone'] == -2 ) echo ' selected="selected"' ?>>-02</option>
+ <option value="-1"<?php if ($pun_config['o_default_timezone'] == -1) echo ' selected="selected"' ?>>-01</option>
+ <option value="0"<?php if ($pun_config['o_default_timezone'] == 0) echo ' selected="selected"' ?>>00 GMT</option>
+ <option value="1"<?php if ($pun_config['o_default_timezone'] == 1) echo ' selected="selected"' ?>>+01 CET</option>
+ <option value="2"<?php if ($pun_config['o_default_timezone'] == 2 ) echo ' selected="selected"' ?>>+02</option>
+ <option value="3"<?php if ($pun_config['o_default_timezone'] == 3 ) echo ' selected="selected"' ?>>+03</option>
+ <option value="3.5"<?php if ($pun_config['o_default_timezone'] == 3.5) echo ' selected="selected"' ?>>+03.5</option>
+ <option value="4"<?php if ($pun_config['o_default_timezone'] == 4 ) echo ' selected="selected"' ?>>+04</option>
+ <option value="4.5"<?php if ($pun_config['o_default_timezone'] == 4.5) echo ' selected="selected"' ?>>+04.5</option>
+ <option value="5"<?php if ($pun_config['o_default_timezone'] == 5 ) echo ' selected="selected"' ?>>+05</option>
+ <option value="5.5"<?php if ($pun_config['o_default_timezone'] == 5.5) echo ' selected="selected"' ?>>+05.5</option>
+ <option value="6"<?php if ($pun_config['o_default_timezone'] == 6 ) echo ' selected="selected"' ?>>+06</option>
+ <option value="6.5"<?php if ($pun_config['o_default_timezone'] == 6.5) echo ' selected="selected"' ?>>+06.5</option>
+ <option value="7"<?php if ($pun_config['o_default_timezone'] == 7 ) echo ' selected="selected"' ?>>+07</option>
+ <option value="8"<?php if ($pun_config['o_default_timezone'] == 8 ) echo ' selected="selected"' ?>>+08</option>
+ <option value="9"<?php if ($pun_config['o_default_timezone'] == 9 ) echo ' selected="selected"' ?>>+09</option>
+ <option value="9.5"<?php if ($pun_config['o_default_timezone'] == 9.5) echo ' selected="selected"' ?>>+09.5</option>
+ <option value="10"<?php if ($pun_config['o_default_timezone'] == 10) echo ' selected="selected"' ?>>+10</option>
+ <option value="10.5"<?php if ($pun_config['o_default_timezone'] == 10.5) echo ' selected="selected"' ?>>+10.5</option>
+ <option value="11"<?php if ($pun_config['o_default_timezone'] == 11) echo ' selected="selected"' ?>>+11</option>
+ <option value="11.5"<?php if ($pun_config['o_default_timezone'] == 11.5) echo ' selected="selected"' ?>>+11.5</option>
+ <option value="12"<?php if ($pun_config['o_default_timezone'] == 12 ) echo ' selected="selected"' ?>>+12</option>
+ <option value="13"<?php if ($pun_config['o_default_timezone'] == 13 ) echo ' selected="selected"' ?>>+13</option>
+ </select></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Time format'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[time_format]" size="25" maxlength="25" value="<?php echo htmlspecialchars($pun_config['o_time_format']) ?>" /></span><br />
+ <span class="fld-help">[<?php echo $lang_admin['Current format'].' '.gmdate($pun_config['o_time_format']) ?>]</span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Date format'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[date_format]" size="25" maxlength="25" value="<?php echo htmlspecialchars($pun_config['o_date_format']) ?>" /></span><br />
+ <span class="fld-help">[<?php echo $lang_admin['Current format'].' '.gmdate($pun_config['o_date_format']) ?>]</span>
+ </label>
+ </div>
+<?php ($hook = get_hook('aop_setup_local_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ </div>
+<?php
+
+// Reset fieldset counter
+$pun_page['set_count'] = 0;
+
+($hook = get_hook('aop_setup_pre_timeouts_part')) ? eval($hook) : null;
+
+?>
+ <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>">
+ <h3><span><?php printf($lang_admin['Timeout part head'], $pun_page['part_count']) ?></span></h3>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['Timeouts legend'] ?></strong></legend>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Visit timeout'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[timeout_visit]" size="5" maxlength="5" value="<?php echo $pun_config['o_timeout_visit'] ?>" /></span><br />
+ <span class="fld-extra"><?php echo $lang_admin['Visit timeout info'] ?></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Online timeout'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[timeout_online]" size="5" maxlength="5" value="<?php echo $pun_config['o_timeout_online'] ?>" /></span><br />
+ <span class="fld-extra"><?php echo $lang_admin['Online timeout info'] ?></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Redirect time'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[redirect_delay]" size="5" maxlength="5" value="<?php echo $pun_config['o_redirect_delay'] ?>" /></span><br />
+ <span class="fld-extra"><?php echo $lang_admin['Redirect time info'] ?></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('aop_setup_timeouts_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ </div>
+<?php
+
+// Reset fieldset counter
+$pun_page['set_count'] = 0;
+
+($hook = get_hook('aop_setup_pre_pagination_part')) ? eval($hook) : null;
+
+?>
+ <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>">
+ <h3><span><?php printf($lang_admin['Pagination'], $pun_page['part_count']) ?></span></h3>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['Updates legend'] ?></strong></legend>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Topics per page'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[disp_topics_default]" size="3" maxlength="3" value="<?php echo $pun_config['o_disp_topics_default'] ?>" /></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Posts per page'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[disp_posts_default]" size="3" maxlength="3" value="<?php echo $pun_config['o_disp_posts_default'] ?>" /></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Topic review'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[topic_review]" size="3" maxlength="3" value="<?php echo $pun_config['o_topic_review'] ?>" /></span>
+ <span class="fld-extra"><?php echo $lang_admin['Topic review info'] ?></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('aop_setup_pagination_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ </div>
+<?php
+
+// Reset fieldset counter
+$pun_page['set_count'] = 0;
+
+($hook = get_hook('aop_setup_pre_reports_part')) ? eval($hook) : null;
+
+?>
+ <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>">
+ <h3><span><?php printf($lang_admin['Report part head'], $pun_page['part_count']) ?></span></h3>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['General features'] ?></strong></legend>
+ <fieldset class="frm-group">
+ <legend><span><?php echo $lang_admin['Report method'] ?></span></legend>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="radio" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[report_method]" value="0"<?php if ($pun_config['o_report_method'] == '0') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Report internal'] ?></label></div>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="radio" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[report_method]" value="1"<?php if ($pun_config['o_report_method'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Report email'] ?></label></div>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="radio" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[report_method]" value="2"<?php if ($pun_config['o_report_method'] == '2') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Report both'] ?></label></div>
+ </fieldset>
+<?php ($hook = get_hook('aop_setup_reports_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ </div>
+<?php
+
+// Reset fieldset counter
+$pun_page['set_count'] = 0;
+
+($hook = get_hook('aop_setup_pre_url_scheme_part')) ? eval($hook) : null;
+
+?>
+ <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>">
+ <h3><span><?php printf($lang_admin['Essentials URL head'], $pun_page['part_count']) ?></span></h3>
+ <div class="frm-info">
+ <p class="warn"><?php echo $lang_admin['URL scheme info'] ?></p>
+ </div>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['Addressing legend'] ?></strong></legend>
+ <div class="frm-fld select">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['URL scheme'] ?></span><br />
+ <span class="fld-input"><select id="fld<?php echo $pun_page['fld_count'] ?>" name="form[sef]">
+<?php
+
+ $url_schemes = array();
+ $d = dir(PUN_ROOT.'include/url');
+ while (($entry = $d->read()) !== false)
+ {
+ if ($entry != '.' && $entry != '..' && substr($entry, strlen($entry)-4) == '.php')
+ $url_schemes[] = $entry;
+ }
+ $d->close();
+
+ @natcasesort($url_schemes);
+
+ while (list(, $temp) = @each($url_schemes))
+ {
+ $temp = substr($temp,0,-4);
+ if ($pun_config['o_sef'] == $temp)
+ echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'" selected="selected">'.str_replace('_', ' ', $temp).'</option>'."\n";
+ else
+ echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'">'.str_replace('_', ' ', $temp).'</option>'."\n";
+ }
+
+?>
+ </select></span>
+ <span class="fld-help"><?php echo $lang_admin['URL scheme help'] ?></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('aop_setup_url_scheme_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ </div>
+<?php
+
+// Reset fieldset counter
+$pun_page['set_count'] = 0;
+
+($hook = get_hook('aop_setup_pre_links_part')) ? eval($hook) : null;
+
+?>
+ <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>">
+ <h3><span><?php printf($lang_admin['Essentials links head'], $pun_page['part_count']) ?></span></h3>
+ <div class="frm-info">
+ <p class="warn"><?php echo $lang_admin['Essentials links info'] ?></p>
+ </div>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['Board menu legend'] ?></strong></legend>
+ <div class="frm-fld text textarea">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Additional menu items'] ?></span><br />
+ <span class="fld-input"><textarea id="fld<?php echo $pun_page['fld_count'] ?>" name="form[additional_navlinks]" rows="3" cols="55"><?php echo htmlspecialchars($pun_config['o_additional_navlinks']) ?></textarea></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('aop_setup_links_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ </div>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" name="save" value="<?php echo $lang_admin['Save changes'] ?>" /></span>
+ </div>
+ </form>
+ </div>
+
+</div>
+<?php
+
+}
+
+else if ($section == 'features')
+{
+ // 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['Features']
+ );
+
+ ($hook = get_hook('aop_features_pre_header_load')) ? eval($hook) : null;
+
+ define('PUN_PAGE_SECTION', 'options');
+ define('PUN_PAGE', 'admin-options-features');
+ require PUN_ROOT.'header.php';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm parted">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Features'] ?></span></h2>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_options_features']) ?>">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_options_features'])) ?>" />
+ <input type="hidden" name="form_sent" value="1" />
+ </div>
+<?php ($hook = get_hook('aop_features_pre_general_part')) ? eval($hook) : null; ?>
+ <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>">
+ <h3><span><?php printf($lang_admin['General part head'], $pun_page['part_count'], '<a href="'.pun_link($pun_url['admin_censoring']).'">'.strtolower($lang_admin['Censoring']).'</a>') ?></span></h3>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['General features'] ?></strong></legend>
+ <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Searching'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[search_all_forums]" value="1"<?php if ($pun_config['o_search_all_forums'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Search all forums'] ?></label></div>
+ <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['User ranks'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[ranks]" value="1"<?php if ($pun_config['o_ranks'] == '1') echo ' checked="checked"' ?> /><?php echo $lang_admin['User ranks info'] ?></label></div>
+ <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Censor words'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[censoring]" value="1"<?php if ($pun_config['o_censoring'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Censor words info'] ?></label></div>
+ <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Quick jump'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[quickjump]" value="1"<?php if ($pun_config['o_quickjump'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Quick jump info'] ?></label></div>
+ <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Show version'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[show_version]" value="1"<?php if ($pun_config['o_show_version'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Show version info'] ?></label></div>
+ <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Online list'] ?></span> <input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[users_online]" value="1"<?php if ($pun_config['o_users_online'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Users online info'] ?></label></div>
+<?php ($hook = get_hook('aop_features_general_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ </div>
+<?php
+
+// Reset fieldset counter
+$pun_page['set_count'] = 0;
+
+($hook = get_hook('aop_features_pre_posting_part')) ? eval($hook) : null;
+
+?>
+ <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>">
+ <h3><span><?php printf($lang_admin['Posting part head'], $pun_page['part_count']) ?></span></h3>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><span><?php echo $lang_admin['Posts'] ?></span></legend>
+ <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Quick post'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[quickpost]" value="1"<?php if ($pun_config['o_quickpost'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Quick post info'] ?></label></div>
+ <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Subscriptions'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[subscriptions]" value="1"<?php if ($pun_config['o_subscriptions'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Subscriptions info'] ?></label></div>
+ <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Guest posting'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[force_guest_email]" value="1"<?php if ($pun_config['p_force_guest_email'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Require guest email'] ?></label></div>
+ <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['User has posted'] ?></span> <input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[show_dot]" value="1"<?php if ($pun_config['o_show_dot'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['User has posted info'] ?></label></div>
+ <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Topic views'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[topic_views]" value="1"<?php if ($pun_config['o_topic_views'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Topic views info'] ?></label></div>
+ <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['User post count'] ?></span> <input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[show_post_count]" value="1"<?php if ($pun_config['o_show_post_count'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['User post count info'] ?></label></div>
+ <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['User info'] ?></span> <input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[show_user_info]" value="1"<?php if ($pun_config['o_show_user_info'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['User info in posts'] ?></label></div>
+<?php ($hook = get_hook('aop_features_posting_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ </div>
+<?php
+
+// Reset fieldset counter
+$pun_page['set_count'] = 0;
+
+($hook = get_hook('aop_features_pre_message_part')) ? eval($hook) : null;
+
+?>
+ <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>">
+ <h3><span><?php printf($lang_admin['Message part head'], $pun_page['part_count']) ?></span></h3>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><span><?php echo $lang_admin['Posts'] ?></span></legend>
+ <fieldset class="frm-group">
+ <legend><span><?php echo $lang_admin['Post content'] ?></span></legend>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[message_bbcode]" value="1"<?php if ($pun_config['p_message_bbcode'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow BBCode'] ?></label></div>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[message_img_tag]" value="1"<?php if ($pun_config['p_message_img_tag'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow img'] ?></label></div>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[smilies]" value="1"<?php if ($pun_config['o_smilies'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Smilies in posts'] ?></label></div>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[make_links]" value="1"<?php if ($pun_config['o_make_links'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Make clickable links'] ?></label></div>
+ </fieldset>
+ <fieldset class="frm-group">
+ <legend><span><?php echo $lang_admin['Allow capitals'] ?></span></legend>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[message_all_caps]" value="1"<?php if ($pun_config['p_message_all_caps'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['All caps message'] ?></label></div>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[subject_all_caps]" value="1"<?php if ($pun_config['p_subject_all_caps'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['All caps subject'] ?></label></div>
+ </fieldset>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Indent size'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[indent_num_spaces]" size="3" maxlength="3" value="<?php echo $pun_config['o_indent_num_spaces'] ?>" /></span><br />
+ <span class="fld-extra"><?php echo $lang_admin['Indent size info'] ?></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('aop_features_message_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ </div>
+<?php
+
+// Reset fieldset counter
+$pun_page['set_count'] = 0;
+
+($hook = get_hook('aop_features_pre_sigs_part')) ? eval($hook) : null;
+
+?>
+ <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>">
+ <h3><span><?php printf($lang_admin['Sigs part head'], $pun_page['part_count']) ?></span></h3>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><span><?php echo $lang_admin['Signatures'] ?></span></legend>
+ <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Allow signatures'] ?></span> <input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[signatures]" value="1"<?php if ($pun_config['o_signatures'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow signatures info'] ?></label></div>
+ <fieldset class="frm-group">
+ <legend><span><?php echo $lang_admin['Signature content'] ?></span></legend>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[sig_bbcode]" value="1"<?php if ($pun_config['p_sig_bbcode'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['BBCode in sigs'] ?></label></div>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[sig_img_tag]" value="1"<?php if ($pun_config['p_sig_img_tag'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Img in sigs'] ?></label></div>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[smilies_sig]" value="1"<?php if ($pun_config['o_smilies_sig'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Smilies in signatures'] ?></label></div>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[sig_all_caps]" value="1"<?php if ($pun_config['p_sig_all_caps'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['All caps sigs'] ?></label></div>
+ </fieldset>
+ <div class="frm-fld">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Max sig length'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[sig_length]" size="5" maxlength="5" value="<?php echo $pun_config['p_sig_length'] ?>" /></span>
+ <span class="fld-extra"><?php echo $lang_admin['Max sig length info'] ?></span>
+ </label>
+ </div>
+ <div class="frm-fld">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Max sig lines'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[sig_lines]" size="5" maxlength="3" value="<?php echo $pun_config['p_sig_lines'] ?>" /></span>
+ <span class="fld-extra"><?php echo $lang_admin['Max sig lines info'] ?></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('aop_features_sigs_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ </div>
+<?php
+
+// Reset fieldset counter
+$pun_page['set_count'] = 0;
+
+($hook = get_hook('aop_features_pre_avatars_part')) ? eval($hook) : null;
+
+?>
+ <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>">
+ <h3><span><?php printf($lang_admin['Avatars part head'], $pun_page['part_count']) ?></span></h3>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><span><?php echo $lang_admin['Use avatars'] ?></span></legend>
+ <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Allow avatars'] ?></span> <input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[avatars]" value="1"<?php if ($pun_config['o_avatars'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Use avatars info'] ?></label></div>
+ <div class="frm-fld">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Upload directory'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[avatars_dir]" size="35" maxlength="50" value="<?php echo htmlspecialchars($pun_config['o_avatars_dir']) ?>" /></span>
+ <span class="fld-help"><?php echo $lang_admin['Upload directory info'] ?></span>
+ </label>
+ </div>
+ <div class="frm-fld">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Max width'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[avatars_width]" size="6" maxlength="5" value="<?php echo $pun_config['o_avatars_width'] ?>" /></span>
+ <span class="fld-extra"><?php echo $lang_admin['Max width info'] ?></span>
+ </label>
+ </div>
+ <div class="frm-fld">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Max height'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[avatars_height]" size="6" maxlength="5" value="<?php echo $pun_config['o_avatars_height'] ?>" /></span>
+ <span class="fld-extra"><?php echo $lang_admin['Max height info'] ?></span>
+ </label>
+ </div>
+ <div class="frm-fld">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Max size'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[avatars_size]" size="6" maxlength="6" value="<?php echo $pun_config['o_avatars_size'] ?>" /></span>
+ <span class="fld-extra"><?php echo $lang_admin['Max size info'] ?></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('aop_features_avatars_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ </div>
+<?php
+
+// Reset fieldset counter
+$pun_page['set_count'] = 0;
+
+($hook = get_hook('aop_features_pre_updates_part')) ? eval($hook) : null;
+
+?>
+ <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>">
+ <h3><span><?php printf($lang_admin['Essentials automatic head'], $pun_page['part_count']) ?></span></h3>
+ <div class="frm-info">
+ <p><?php echo $lang_admin['Essentials automatic info'] ?></p>
+ </div>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['Updates legend'] ?></strong></legend>
+<?php if (function_exists('curl_init') || function_exists('fsockopen') || in_array(strtolower(@ini_get('allow_url_fopen')), array('on', 'true', '1'))): ?> <div class="radbox checkbox">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Check for updates'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[check_for_updates]" value="1"<?php if ($pun_config['o_check_for_updates'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Auto check for updates'] ?></label>
+ </div>
+<?php else: ?> <div class="frm-fld link">
+ <span class="fld-label"><?php echo $lang_admin['Check for updates'] ?></span>
+ <span class="fld-input">[ <?php echo $lang_admin['Auto check disabled'] ?> ]</span>
+ </div>
+<?php endif; ($hook = get_hook('aop_features_updates_end')) ? eval($hook) : null; ?> </fieldset>
+ </div>
+<?php
+
+// Reset fieldset counter
+$pun_page['set_count'] = 0;
+
+($hook = get_hook('aop_features_pre_gzip_part')) ? eval($hook) : null;
+
+?>
+ <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>">
+ <h3><span><?php printf($lang_admin['Essentials gzip head'], $pun_page['part_count']) ?></span></h3>
+ <div class="frm-info">
+ <p><?php echo $lang_admin['GZip info'] ?></p>
+ </div>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['Compression legend'] ?></strong></legend>
+ <div class="radbox checkbox">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Enable gzip'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[gzip]" value="1"<?php if ($pun_config['o_gzip'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['GZip output'] ?></label>
+ </div>
+<?php ($hook = get_hook('aop_features_gzip_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ </div>
+<?php
+
+// Reset fieldset counter
+$pun_page['set_count'] = 0;
+
+($hook = get_hook('aop_features_pre_announcement_part')) ? eval($hook) : null;
+
+?>
+ <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>">
+ <h3><span><?php printf($lang_admin['Announcement part head'], $pun_page['part_count']) ?></span></h3>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['Announcement legend'] ?></strong></legend>
+ <div class="radbox checkbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Enable announcement'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[announcement]" value="1"<?php if ($pun_config['o_announcement'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Enable announcement info'] ?></label></div>
+ <div class="frm-fld">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Announcement heading'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[announcement_heading]" size="50" maxlength="255" value="<?php echo $pun_config['o_announcement_heading'] ?>" /></span>
+ </label>
+ </div>
+ <div class="frm-fld text textarea">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Announcement message'] ?></span><br />
+ <span class="fld-input"><textarea id="fld<?php echo $pun_page['fld_count'] ?>" name="form[announcement_message]" rows="5" cols="55"><?php echo htmlspecialchars($pun_config['o_announcement_message']) ?></textarea></span>
+ <span class="fld-help"><?php echo $lang_admin['Announcement message help'] ?></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('aop_features_announcement_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ </div>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" name="save" value="<?php echo $lang_admin['Save changes'] ?>" /></span>
+ </div>
+ </form>
+ </div>
+
+</div>
+<?php
+
+}
+
+else if ($section == 'registration')
+{
+ // 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['Registration']
+ );
+
+ ($hook = get_hook('aop_registration_pre_header_load')) ? eval($hook) : null;
+
+ define('PUN_PAGE_SECTION', 'options');
+ define('PUN_PAGE', 'admin-options-registration');
+ require PUN_ROOT.'header.php';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm parted">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Registration head'] ?></span></h2>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_options_registration']) ?>">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_options_registration'])) ?>" />
+ <input type="hidden" name="form_sent" value="1" />
+ </div>
+<?php ($hook = get_hook('aop_registration_pre_new_regs_part')) ? eval($hook) : null; ?>
+ <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>">
+ <h3><span><?php printf($lang_admin['Allow reg head'], $pun_page['part_count']) ?></span></h3>
+ <div class="frm-info">
+ <p><?php echo $lang_admin['New reg info'] ?></p>
+ </div>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><span><?php echo $lang_admin['Registration legend'] ?></span></legend>
+ <div class="radbox checkbox">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Allow registrations'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[regs_allow]" value="1"<?php if ($pun_config['o_regs_allow'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow new registrations'] ?></label>
+ </div>
+ <div class="radbox checkbox">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Verify registrations'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[regs_verify]" value="1"<?php if ($pun_config['o_regs_verify'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Enable verify registrations'] ?></label>
+ </div>
+ <fieldset class="frm-group">
+ <legend><span><?php echo $lang_admin['Registration e-mail'] ?></span></legend>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[allow_banned_email]" value="1"<?php if ($pun_config['p_allow_banned_email'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow banned email'] ?></label></div>
+ <div class="radbox"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[allow_dupe_email]" value="1"<?php if ($pun_config['p_allow_dupe_email'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Allow dupe email'] ?></label></div>
+ </fieldset>
+ <div class="radbox checkbox">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Report new registrations'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[regs_report]" value="1"<?php if ($pun_config['o_regs_report'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Report new registrations info'] ?></label>
+ </div>
+<?php ($hook = get_hook('aop_registration_new_regs_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ </div>
+<?php
+
+// Reset fieldset counter
+$pun_page['set_count'] = 0;
+
+($hook = get_hook('aop_registration_pre_rules_part')) ? eval($hook) : null;
+
+?>
+ <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>">
+ <h3><span><?php printf($lang_admin['Rules part head'], $pun_page['part_count']) ?></span></h3>
+ <div class="frm-info">
+ <p><?php echo $lang_admin['Rules info'] ?></p>
+ </div>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><span><?php echo $lang_admin['Rules legend'] ?></span></legend>
+ <div class="radbox checkbox">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Use rules'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[rules]" value="1"<?php if ($pun_config['o_rules'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Require rules'] ?></label>
+ </div>
+ <div class="frm-fld text textarea">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Compose rules'] ?></span><br />
+ <span class="fld-input"><textarea id="fld<?php echo $pun_page['fld_count'] ?>" name="form[rules_message]" rows="10" cols="55"><?php echo htmlspecialchars($pun_config['o_rules_message']) ?></textarea></span>
+ <span class="fld-help"><?php echo $lang_admin['Compose rules help'] ?></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('aop_registration_rules_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" name="save" value="<?php echo $lang_admin['Save changes'] ?>" /></span>
+ </div>
+ </div>
+ </form>
+ </div>
+
+</div>
+<?php
+
+}
+
+else if ($section == 'maintenance')
+{
+ // 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['Maintenance mode']
+ );
+
+ ($hook = get_hook('aop_maintenance_pre_header_load')) ? eval($hook) : null;
+
+ define('PUN_PAGE_SECTION', 'management');
+ define('PUN_PAGE', 'admin-options-maintenance');
+ require PUN_ROOT.'header.php';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Maintenance head'] ?></span></h2>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_options_maintenance']) ?>">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_options_maintenance'])) ?>" />
+ <input type="hidden" name="form_sent" value="1" />
+ </div>
+ <div class="frm-info">
+ <p class="important"><?php echo $lang_admin['Maintenance mode info'] ?></p>
+ <p class="warn"><?php echo $lang_admin['Maintenance mode warn'] ?></p>
+ </div>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['Board maintenance legend'] ?></strong></legend>
+ <div id="maintenance" class="radbox checkbox">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Maintenance mode'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[maintenance]" value="1"<?php if ($pun_config['o_maintenance'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['Maintenance mode label'] ?></label>
+ </div>
+ <div class="frm-fld text textarea">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Maintenance message'] ?></span><br />
+ <span class="fld-input"><textarea id="fld<?php echo $pun_page['fld_count'] ?>" name="form[maintenance_message]" rows="5" cols="55"><?php echo htmlspecialchars($pun_config['o_maintenance_message']) ?></textarea></span>
+ <span class="fld-help"><?php echo $lang_admin['Maintenance message help'] ?></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('aop_maintenance_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" name="save" value="<?php echo $lang_admin['Save changes'] ?>" /></span>
+ </div>
+ </form>
+ </div>
+
+</div>
+<?php
+
+}
+
+else if ($section == 'email')
+{
+ // 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['E-mail']
+ );
+
+ ($hook = get_hook('aop_email_pre_header_load')) ? eval($hook) : null;
+
+ define('PUN_PAGE_SECTION', 'options');
+ define('PUN_PAGE', 'admin-options-email');
+ require PUN_ROOT.'header.php';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm parted">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['E-mail head'] ?></span></h2>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_options_email']) ?>">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_options_email'])) ?>" />
+ <input type="hidden" name="form_sent" value="1" />
+ </div>
+<?php ($hook = get_hook('aop_email_pre_addresses_part')) ? eval($hook) : null; ?>
+ <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>">
+ <h3><span><?php printf($lang_admin['Essentials mail head'], $pun_page['part_count']) ?></span></h3>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['E-mail addresses legend'] ?></strong></legend>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Admin e-mail'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[admin_email]" size="50" maxlength="80" value="<?php echo $pun_config['o_admin_email'] ?>" /></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Webmaster e-mail'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[webmaster_email]" size="50" maxlength="80" value="<?php echo $pun_config['o_webmaster_email'] ?>" /></span>
+ <span class="fld-help"><?php echo $lang_admin['Webmaster e-mail help'] ?></span>
+ </label>
+ </div>
+ </fieldset>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['Mail list legend'] ?></strong></legend>
+ <div class="frm-fld text textarea">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Mailing list'] ?></span><br />
+ <span class="fld-input"><textarea id="fld<?php echo $pun_page['fld_count'] ?>" name="form[mailing_list]" rows="5" cols="55"><?php echo htmlspecialchars($pun_config['o_mailing_list']) ?></textarea></span><br />
+ <span class="fld-help"><?php echo $lang_admin['Mailing list help'] ?></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('aop_email_addresses_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ </div>
+<?php
+
+// Reset fieldset counter
+$pun_page['set_count'] = 0;
+
+($hook = get_hook('aop_email_pre_smtp_part')) ? eval($hook) : null;
+
+?>
+ <div class="frm-part part<?php echo ++ $pun_page['part_count'] ?>">
+ <h3><span><?php printf($lang_admin['Essentials e-mail head'], $pun_page['part_count']) ?></span></h3>
+ <div class="frm-info">
+ <p><?php echo $lang_admin['SMTP server info'] ?></p>
+ </div>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['E-mail server legend'] ?></strong></legend>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['SMTP server address'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[smtp_host]" size="35" maxlength="100" value="<?php echo htmlspecialchars($pun_config['o_smtp_host']) ?>" /></span><br />
+ <span class="fld-help"><?php echo $lang_admin['SMTP server address help'] ?></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['SMTP username'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[smtp_user]" size="35" maxlength="50" value="<?php echo htmlspecialchars($pun_config['o_smtp_user']) ?>" /></span><br />
+ <span class="fld-help"><?php echo $lang_admin['SMTP username help'] ?></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['SMTP password'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[smtp_pass]" size="35" maxlength="50" value="<?php echo htmlspecialchars($pun_config['o_smtp_pass']) ?>" /></span><br />
+ <span class="fld-help"><?php echo $lang_admin['SMTP password help'] ?></span>
+ </label>
+ </div>
+ <div class="radbox checkbox">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['SMTP SSL'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[smtp_ssl]" value="1"<?php if ($pun_config['o_smtp_ssl'] == '1') echo ' checked="checked"' ?> /> <?php echo $lang_admin['SMTP SSL info'] ?></label>
+ </div>
+<?php ($hook = get_hook('aop_email_smtp_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ </div>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" name="save" value="<?php echo $lang_admin['Save changes'] ?>" /></span>
+ </div>
+ </form>
+ </div>
+
+</div>
+<?php
+
+}
+
+($hook = get_hook('aop_new_section')) ? eval($hook) : null;
+
+require PUN_ROOT.'footer.php';
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/admin/prune.php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,302 @@
+<?php
+/***********************************************************************
+
+ Copyright (C) 2002-2008 PunBB.org
+
+ This file is part of PunBB.
+
+ PunBB 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.
+
+ PunBB 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
+
+************************************************************************/
+
+
+// if (!defined('PUN_ROOT'))
+// define('PUN_ROOT', '../');
+// require PUN_ROOT.'include/common.php';
+require PUN_ROOT.'include/common_admin.php';
+
+// import globals (I really hope this isn't dangerous)
+foreach ( $GLOBALS as $key => $_ )
+{
+ $$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';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php printf($lang_admin['Prune details head'], ($forum == 'all forums') ? $lang_admin['All forums'] : $forum ) ?></span></h2>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_prune']) ?>&action=foo">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_prune']).'&action=foo') ?>" />
+ <input type="hidden" name="prune_days" value="<?php echo $prune_days ?>" />
+ <input type="hidden" name="prune_sticky" value="<?php echo intval($_POST['prune_sticky']) ?>" />
+ <input type="hidden" name="prune_from" value="<?php echo $prune_from ?>" />
+ </div>
+ <div class="frm-info">
+ <p class="warn"><span><?php printf($lang_admin['Prune topics info 1'], $num_topics, isset($_POST['prune_sticky']) ? ' ('.$lang_admin['Include sticky'].')' : '') ?></span></p>
+ <p class="warn"><span><?php printf($lang_admin['Prune topics info 2'], $prune_days) ?></span></p>
+ </div>
+<?php ($hook = get_hook('apr_prune_comply_pre_buttons')) ? eval($hook) : null; ?>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" name="prune_comply" value="<?php echo $lang_admin['Prune topics'] ?>" /></span>
+ </div>
+ </form>
+ </div>
+
+</div>
+<?php
+
+ require PUN_ROOT.'footer.php';
+}
+
+
+else
+{
+ // 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['Prune topics']
+ );
+
+ ($hook = get_hook('apr_pre_header_load')) ? eval($hook) : null;
+
+ define('PUN_PAGE_SECTION', 'management');
+ define('PUN_PAGE', 'admin-prune');
+ require PUN_ROOT.'header.php';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2 class="prefix"><span><?php echo $lang_admin['Prune settings head'] ?></span></h2>
+ </div>
+ <div class="frm-info">
+ <p><?php echo $lang_admin['Prune intro'] ?></p>
+ <p class="important"><?php echo $lang_admin['Prune caution'] ?></p>
+ </div>
+ <div id="req-msg" class="frm-warn">
+ <p class="important"><?php printf($lang_common['Required warn'], '<em class="req-text">'.$lang_common['Required'].'</em>') ?></p>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_prune']) ?>&action=foo">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_prune']).'&action=foo') ?>" />
+ <input type="hidden" name="form_sent" value="1" />
+ </div>
+<?php ($hook = get_hook('apr_pre_prune_fieldset')) ? eval($hook) : null; ?>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><span><?php echo $lang_admin['Prune legend'] ?></span></legend>
+<?php ($hook = get_hook('apr_pre_prune_from')) ? eval($hook) : null; ?>
+ <div class="frm-fld select">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Prune from'] ?></span><br />
+ <span class="fld-input"><select id="fld<?php echo $pun_page['fld_count'] ?>" name="prune_from">
+ <option value="all"><?php echo $lang_admin['All forums'] ?></option>
+<?php
+
+ $query = array(
+ 'SELECT' => 'c.id AS cid, c.cat_name, f.id AS fid, f.forum_name',
+ 'FROM' => 'categories AS c',
+ 'JOINS' => array(
+ array(
+ 'INNER JOIN' => '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'
+ );
+
+ ($hook = get_hook('apr_qr_get_forum_list')) ? eval($hook) : null;
+ $result = $pun_db->query_build($query) or error(__FILE__, __LINE__);
+
+ $cur_category = 0;
+ while ($forum = $pun_db->fetch_assoc($result))
+ {
+ if ($forum['cid'] != $cur_category) // Are we still in the same category?
+ {
+ if ($cur_category)
+ echo "\t\t\t\t\t\t\t\t".'</optgroup>'."\n";
+
+ echo "\t\t\t\t\t\t\t\t".'<optgroup label="'.htmlspecialchars($forum['cat_name']).'">'."\n";
+ $cur_category = $forum['cid'];
+ }
+
+ echo "\t\t\t\t\t\t\t\t\t".'<option value="'.$forum['fid'].'">'.htmlspecialchars($forum['forum_name']).'</option>'."\n";
+ }
+
+?>
+ </optgroup>
+ </select></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Days old'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="req_prune_days" size="4" maxlength="4" /></span>
+ <em class="req-text"><?php echo $lang_common['Required'] ?></em>
+ </label>
+ </div>
+ <div class="radbox checkbox">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Prune sticky'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="prune_sticky" value="1" checked="checked" /> <?php echo $lang_admin['Prune sticky enable'] ?></label>
+ </div>
+<?php ($hook = get_hook('apr_prune_end')) ? eval($hook) : null; ?>
+ </fieldset>
+<?php ($hook = get_hook('apr_pre_buttons')) ? eval($hook) : null; ?>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" name="prune" value="<?php echo $lang_admin['Prune topics'] ?>" /></span>
+ </div>
+ </form>
+ </div>
+
+</div>
+<?php
+
+ require PUN_ROOT.'footer.php';
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/admin/ranks.php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,302 @@
+<?php
+/***********************************************************************
+
+ Copyright (C) 2002-2008 PunBB.org
+
+ This file is part of PunBB.
+
+ PunBB 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.
+
+ PunBB 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
+
+************************************************************************/
+
+
+// if (!defined('PUN_ROOT'))
+// define('PUN_ROOT', '../');
+// require PUN_ROOT.'include/common.php';
+require PUN_ROOT.'include/common_admin.php';
+
+// import globals (I really hope this isn't dangerous)
+foreach ( $GLOBALS as $key => $_ )
+{
+ $$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';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Add new rank'] ?></span></h2>
+ </div>
+ <div class="frm-info">
+ <p><?php printf($lang_admin['Add rank intro'], '<strong><a href="'.pun_link($pun_url['admin_options_features']).'#fs4">'.$lang_admin['Settings'].' - '.$lang_admin['Features'].'</a></strong>') ?></p>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_ranks']) ?>&action=foo">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_ranks']).'&action=foo') ?>" />
+ </div>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['Add rank legend'] ?></strong></legend>
+<?php ($hook = get_hook('ark_add_rank_pre_rank')) ? eval($hook) : null; ?>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Rank title'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="new_rank" size="24" maxlength="50" /></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('ark_add_rank_pre_min_posts')) ? eval($hook) : null; ?>
+ <div class="frm-fld">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Min posts'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="new_min_posts" size="7" maxlength="7" /></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('ark_add_rank_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" name="add_rank" value="<?php echo $lang_admin['Add rank'] ?>" /></span>
+ </div>
+ </form>
+ </div>
+<?php
+
+if (!empty($pun_ranks))
+{
+ // Reset fieldset counter
+ $pun_page['set_count'] = 0;
+
+?>
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Existing ranks intro'] ?></span></h2>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_ranks']) ?>&action=foo">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_ranks']).'&action=foo') ?>" />
+ </div>
+<?php
+
+ foreach ($pun_ranks as $rank_key => $cur_rank)
+ {
+
+ ?>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><span><?php echo $lang_admin['Rank'].' '.($rank_key + 1) ?></span></legend>
+<?php ($hook = get_hook('ark_edit_rank_pre_rank')) ? eval($hook) : null; ?>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Rank title'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="rank[<?php echo $cur_rank['id'] ?>]" value="<?php echo htmlspecialchars($cur_rank['rank']) ?>" size="24" maxlength="50" /></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('ark_edit_rank_pre_min_posts')) ? eval($hook) : null; ?>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Min posts'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="min_posts[<?php echo $cur_rank['id'] ?>]" value="<?php echo $cur_rank['min_posts'] ?>" size="7" maxlength="7" /></span>
+ </label>
+ <span class="submit"><input type="submit" name="update[<?php echo $cur_rank['id'] ?>]" value="<?php echo $lang_admin['Update'] ?>" /> <input type="submit" name="remove[<?php echo $cur_rank['id'] ?>]" value="<?php echo $lang_admin['Remove'] ?>" /></span>
+ </div>
+<?php ($hook = get_hook('ark_edit_rank_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ <?php
+
+ }
+
+?>
+ </form>
+ </div>
+<?php
+
+}
+else
+{
+
+?>
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Existing ranks intro'] ?></span></h2>
+ </div>
+ <div class="frm-form">
+ <div class="frm-info">
+ <p><?php echo $lang_admin['No ranks'] ?></p>
+ </div>
+ </div>
+ </div>
+<?php
+
+}
+
+?>
+</div>
+<?php
+
+require PUN_ROOT.'footer.php';
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/admin/reindex.php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,252 @@
+<?php
+/***********************************************************************
+
+ Copyright (C) 2002-2008 PunBB.org
+
+ This file is part of PunBB.
+
+ PunBB 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.
+
+ PunBB 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
+
+************************************************************************/
+
+
+if (!defined('PUN_ROOT'))
+ define('PUN_ROOT', '../');
+
+// Tell common.php that we don't want output buffering
+define('PUN_DISABLE_BUFFERING', 1);
+
+require PUN_ROOT.'include/common.php';
+require PUN_ROOT.'include/common_admin.php';
+
+// import globals (I really hope this isn't dangerous)
+foreach ( $GLOBALS as $key => $_ )
+{
+ $$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__);
+ }
+
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html lang="<?php $lang_common['lang_identifier'] ?>" dir="<?php echo $lang_common['lang_direction'] ?>">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+<title><?php echo htmlspecialchars($pun_config['o_board_title']) ?> - Rebuilding search index …</title>
+<style type="text/css">
+body {
+ font: 68.75% Verdana, Arial, Helvetica, sans-serif;
+ color: #333333;
+ background-color: #FFFFFF
+}
+</style>
+</head>
+<body>
+
+<p><?php echo $lang_admin['Rebuilding index'] ?></p>
+
+<?php
+
+ require PUN_ROOT.'include/search_idx.php';
+
+ // Fetch posts to process
+ $query = array(
+ 'SELECT' => '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 '<p>';
+ while ($cur_post = $pun_db->fetch_row($result))
+ {
+ printf($lang_admin['Processing post'], $cur_post[0], $cur_post[2]).'<br />'."\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 '</p>';
+
+ // 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('<script type="text/javascript">window.location="'.pun_link($pun_url['admin_reindex']).$query_str.'"</script><br />'.$lang_admin['Javascript redirect'].' <a href="'.pun_link($pun_url['admin_reindex']).$query_str.'">'.$lang_admin['Click to continue'].'</a>.');
+}
+
+
+// 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';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Reindex heading'] ?></span></h2>
+ </div>
+ <div class="frm-info">
+ <p><?php echo $lang_admin['Reindex info'] ?></p>
+ </div>
+ <form class="frm-form" method="get" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_reindex']) ?>">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_reindex'])) ?>" />
+ </div>
+<?php ($hook = get_hook('ari_pre_rebuild_fieldset')) ? eval($hook) : null; ?>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><span><?php echo $lang_admin['Rebuild index legend'] ?></span></legend>
+<?php ($hook = get_hook('ari_pre_per_page')) ? eval($hook) : null; ?>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Posts per cycle'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="i_per_page" size="7" maxlength="7" value="100" /></span>
+ <span class="fld-help"><?php echo $lang_admin['Posts per cycle info'] ?></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Starting post'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="i_start_at" size="7" maxlength="7" value="<?php echo (isset($first_id)) ? $first_id : 0 ?>" /></span>
+ <span class="fld-help"><?php echo $lang_admin['Starting post info'] ?></span>
+ </label>
+ </div>
+ <div class="radbox checkbox">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Empty index'] ?></span><br /><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="i_empty_index" value="1" checked="checked" /> <?php echo $lang_admin['Empty index info'] ?></label>
+ </div>
+<?php ($hook = get_hook('ari_rebuild_end')) ? eval($hook) : null; ?>
+ </fieldset>
+<?php ($hook = get_hook('ari_pre_infobox')) ? eval($hook) : null; ?>
+ <div class="frm-info">
+ <p class="important"><?php echo $lang_admin['Reindex warning'] ?></p>
+ <p class="warn"><?php echo $lang_admin['Empty index warning'] ?></p>
+ </div>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" name="rebuild_index" value="<?php echo $lang_admin['Rebuild index'] ?>" /></span>
+ </div>
+ </form>
+ </div>
+
+</div>
+<?php
+
+require PUN_ROOT.'footer.php';
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/admin/reports.php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,254 @@
+<?php
+/***********************************************************************
+
+ Copyright (C) 2002-2008 PunBB.org
+
+ This file is part of PunBB.
+
+ PunBB 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.
+
+ PunBB 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
+
+************************************************************************/
+
+
+// if (!defined('PUN_ROOT'))
+// define('PUN_ROOT', '../');
+// require PUN_ROOT.'include/common.php';
+require PUN_ROOT.'include/common_admin.php';
+
+// import globals (I really hope this isn't dangerous)
+foreach ( $GLOBALS as $key => $_ )
+{
+ $$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';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['New reports heading'] ?></span></h2>
+ </div>
+<?php
+
+// Fetch any unread reports
+$query = array(
+ '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' => '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))
+{
+
+?>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_reports']) ?>&action=zap">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_reports']).'&action=zap') ?>" />
+ </div>
+<?php
+
+ $pun_page['num_items'] = 0;
+
+ while ($cur_report = $pun_db->fetch_assoc($result))
+ {
+ $reporter = ($cur_report['reporter'] != '') ? '<a href="'.pun_link($pun_url['user'], $cur_report['reported_by']).'">'.htmlspecialchars($cur_report['reporter']).'</a>' : $lang_admin['Deleted user'];
+ $forum = ($cur_report['forum_name'] != '') ? '<a href="'.pun_link($pun_url['forum'], $cur_report['forum_id']).'">'.htmlspecialchars($cur_report['forum_name']).'</a>' : $lang_admin['Deleted forum'];
+ $topic = ($cur_report['subject'] != '') ? '<a href="'.pun_link($pun_url['topic'], $cur_report['topic_id']).'">'.htmlspecialchars($cur_report['subject']).'</a>' : $lang_admin['Deleted topic'];
+ $post = ($cur_report['post_id'] != '') ? str_replace("\n", '<br />', htmlspecialchars($cur_report['message'])) : $lang_admin['Deleted post'];
+ $post_id = ($cur_report['post_id'] != '') ? '<a href="'.pun_link($pun_url['post'], $cur_report['post_id']).'">Post #'.$cur_report['post_id'].'</a>' : $lang_admin['Deleted post'];
+
+?>
+ <div class="rep-item databox">
+ <h3 class="legend"><span><?php printf($lang_admin['Reported by'], format_time($cur_report['created']), $reporter) ?></span></h3>
+ <div class="radbox checkbox item-select"><label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Select report'] ?></span><input type="checkbox" id="fld<?php echo $pun_page['fld_count'] ?>" name="reports[<?php echo $cur_report['id'] ?>]" value="1" /> <?php echo ++$pun_page['num_items'] ?></label></div>
+ <p><?php echo $forum ?> Â» <?php echo $topic ?> Â» <?php echo $post_id ?></p>
+ <p><?php echo $post ?></p>
+<?php ($hook = get_hook('arp_new_report_new_block')) ? eval($hook) : null; ?>
+ </div>
+<?php
+
+ }
+
+?>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" name="mark_as_read" value="<?php echo $lang_admin['Mark read'] ?>" /></span>
+ </div>
+ </form>
+<?php
+
+}
+else
+{
+
+?>
+ <div class="frm-info">
+ <p><?php echo $lang_admin['No new reports'] ?></p>
+ </div>
+<?php
+
+}
+
+?>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Read reports heading'] ?></span></h2>
+ </div>
+<?php
+
+// Fetch the last 10 reports marked as read
+$query = array(
+ 'SELECT' => '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'] != '') ? '<a href="'.pun_link($pun_url['user'], $cur_report['reported_by']).'">'.htmlspecialchars($cur_report['reporter']).'</a>' : $lang_admin['Deleted user'];
+ $forum = ($cur_report['forum_name'] != '') ? '<a href="'.pun_link($pun_url['forum'], $cur_report['forum_id']).'">'.htmlspecialchars($cur_report['forum_name']).'</a>' : $lang_admin['Deleted forum'];
+ $topic = ($cur_report['subject'] != '') ? '<a href="'.pun_link($pun_url['topic'], $cur_report['topic_id']).'">'.htmlspecialchars($cur_report['subject']).'</a>' : $lang_admin['Deleted topic'];
+ $post = ($cur_report['post_id'] != '') ? str_replace("\n", '<br />', htmlspecialchars($cur_report['message'])) : $lang_admin['Deleted post'];
+ $post_id = ($cur_report['post_id'] != '') ? '<a href="'.pun_link($pun_url['post'], $cur_report['post_id']).'">Post #'.$cur_report['post_id'].'</a>' : $lang_admin['Deleted post'];
+ $zapped_by = ($cur_report['zapped_by'] != '') ? '<a href="'.pun_link($pun_url['user'], $cur_report['zapped_by_id']).'">'.htmlspecialchars($cur_report['zapped_by']).'</a>' : $lang_admin['Deleted user'];
+
+?>
+ <div class="rep-item databox">
+ <h3 class="legend"><span><strong><?php echo ++$pun_page['num_items'] ?></strong> <?php printf($lang_admin['Reported by'], format_time($cur_report['created']), $reporter) ?></span></h3>
+ <p><?php echo $forum ?> Â» <?php echo $topic ?> Â» <?php echo $post_id ?></p>
+ <p><?php echo $post ?></p>
+ <p><?php printf($lang_admin['Marked read by'], format_time($cur_report['zapped']), $zapped_by) ?></p>
+<?php ($hook = get_hook('arp_report_new_block')) ? eval($hook) : null; ?>
+ </div>
+<?php
+
+ }
+}
+else
+{
+
+?>
+ <div class="frm-info">
+ <p><?php echo $lang_admin['No read reports'] ?></p>
+ </div>
+<?php
+
+}
+
+?>
+ </div>
+
+</div>
+<?php
+
+require PUN_ROOT.'footer.php';
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/admin/users.php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,1138 @@
+<?php
+/***********************************************************************
+
+ Copyright (C) 2002-2008 PunBB.org
+
+ This file is part of PunBB.
+
+ PunBB 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.
+
+ PunBB 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
+
+************************************************************************/
+
+
+// if (!defined('PUN_ROOT'))
+// define('PUN_ROOT', '../');
+// require PUN_ROOT.'include/common.php';
+require PUN_ROOT.'include/common_admin.php';
+
+// import globals (I really hope this isn't dangerous)
+foreach ( $GLOBALS as $key => $_ )
+{
+ $$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';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php printf($lang_admin['IP addresses found'], $pun_page['num_users']) ?></span></h2>
+ </div>
+ <div class="frm-form">
+ <table cellspacing="0">
+ <thead>
+ <tr>
+ <th class="tcl" scope="col"><?php echo $lang_admin['IP address'] ?></th>
+ <th class="tc2" scope="col"><?php echo $lang_admin['Last used'] ?></th>
+ <th class="tc3" scope="col"><?php echo $lang_admin['Times found'] ?></th>
+<?php ($hook = get_hook('aus_ip_stats_table_header_after_used_times')) ? eval($hook) : null; ?>
+ <th class="tcr" scope="col"><?php echo $lang_admin['Actions'] ?></th>
+<?php ($hook = get_hook('aus_ip_stats_table_header_after_actions')) ? eval($hook) : null; ?>
+ </tr>
+ </thead>
+ <tbody>
+<?php
+
+ if ($pun_page['num_users'])
+ {
+ while ($cur_ip = $pun_db->fetch_assoc($result))
+ {
+ $pun_page['actions'] = '<a href="'.pun_link($pun_url['admin_users']).'&show_users='.$cur_ip['poster_ip'].'">'.$lang_admin['Find more users'].'</a>';
+
+?>
+ <tr>
+ <td class="tcl"><a href="<?php echo pun_link($pun_url['get_host'], $cur_ip['poster_ip']) ?>"><?php echo $cur_ip['poster_ip'] ?></a></td>
+ <td class="tc2"><?php echo format_time($cur_ip['last_used']) ?></td>
+ <td class="tc3"><?php echo $cur_ip['used_times'] ?></td>
+<?php ($hook = get_hook('aus_ip_stats_table_contents_after_used_times')) ? eval($hook) : null; ?>
+ <td class="tcr actions"><?php echo $pun_page['actions'] ?></td>
+<?php ($hook = get_hook('aus_ip_stats_table_contents_after_actions')) ? eval($hook) : null; ?>
+ </tr>
+<?php
+
+ }
+ }
+ else
+ echo "\t\t\t\t\t\t".'<tr><td class="tcl" colspan="4">'.$lang_admin['No posts by user'].'</td></tr>'."\n";
+
+?>
+ </tbody>
+ </table>
+ </div>
+ </div>
+
+</div>
+<?php
+
+ require PUN_ROOT.'footer.php';
+}
+
+
+// Show users that have at one time posted with the specified IP address
+else if (isset($_GET['show_users']))
+{
+ $ip = $_GET['show_users'];
+
+ if (!@preg_match('/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/', $ip))
+ message('The supplied IP address is not correctly formatted.');
+
+ ($hook = get_hook('aus_show_users_selected')) ? eval($hook) : null;
+
+ // Load the misc.php language file
+ require PUN_ROOT.'lang/'.$pun_user['language'].'/misc.php';
+
+ $query = array(
+ 'SELECT' => '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';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php printf($lang_admin['Users found'], $pun_page['num_users']) ?></span></h2>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_users']) ?>&action=modify_users">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_users']).'&action=modify_users') ?>" />
+ </div>
+ <table cellspacing="0">
+ <thead>
+ <tr>
+ <th class="tcl" scope="col"><?php echo $lang_admin['Username column'] ?></th>
+ <th class="tc2" scope="col"><?php echo $lang_admin['Title column'] ?></th>
+ <th class="tc3" scope="col"><?php echo $lang_admin['Posts'] ?></th>
+<?php ($hook = get_hook('aus_show_users_table_header_after_num_posts')) ? eval($hook) : null; ?>
+ <th class="tcr actions" scope="col"><?php echo $lang_admin['Actions'] ?></th>
+<?php ($hook = get_hook('aus_show_users_table_header_after_actions')) ? eval($hook) : null; if ($pun_user['g_id'] == PUN_ADMIN): ?> <th class="tcmod" scope="col"><?php echo $lang_misc['Select'] ?></th>
+<?php endif; ?> </tr>
+ </thead>
+ <tbody>
+<?php
+
+ $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);
+
+ $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'] = '<span><a href="'.pun_link($pun_url['admin_users']).'&ip_stats='.$user_data['id'].'">'.$lang_admin['View IP stats'].'</a></span> <span><a href="'.pun_link($pun_url['search_user_posts'], $user_data['id']).'">'.$lang_admin['Show posts'].'</a></span>';
+
+?>
+ <tr>
+ <td class="tcl"><strong><a href="<?php echo pun_link($pun_url['user'], $user_data['id']) ?>"><?php echo htmlspecialchars($user_data['username']) ?></a></strong> <span class="usermail"><a href="mailto:<?php echo $user_data['email'] ?>"><?php echo $user_data['email'] ?></a></span> <?php if ($user_data['admin_note'] != '') echo '<span class="usernote">'.htmlspecialchars($user_data['admin_note']).'</span>' ?></td>
+ <td class="tc2"><?php echo $pun_page['user_title'] ?></td>
+ <td class="tc3"><?php echo $user_data['num_posts'] ?></td>
+<?php ($hook = get_hook('aus_show_users_table_contents_after_num_posts')) ? eval($hook) : null; ?>
+ <td class="tcr actions"><?php echo $pun_page['actions'] ?></td>
+<?php ($hook = get_hook('aus_show_users_table_contents_after_actions')) ? eval($hook) : null; if ($pun_user['g_id'] == PUN_ADMIN): ?> <td class="tcmod"><input type="checkbox" name="users[<?php echo $user_data['id'] ?>]" value="1" /></td>
+<?php endif; ?> </tr>
+<?php
+
+ }
+ else
+ {
+
+?>
+ <tr>
+ <td class="tcl"><?php echo htmlspecialchars($poster) ?></td>
+ <td class="tc2"><?php echo $lang_admin['Guest'] ?></td>
+ <td class="tc3"> </td>
+<?php ($hook = get_hook('aus_show_users_table_contents_after_num_posts_guest')) ? eval($hook) : null; ?>
+ <td class="tcr"> </td>
+<?php ($hook = get_hook('aus_show_users_table_contents_after_actions_guest')) ? eval($hook) : null; if ($pun_user['g_id'] == PUN_ADMIN): ?> <td class="tcmod"> </td>
+<?php endif; ?> </tr>
+<?php
+
+ }
+ }
+ }
+ else
+ echo "\t\t\t\t\t".'<tr><td class="tcl" colspan="'.(($pun_user['g_id'] == PUN_ADMIN) ? '5' : '4').'">'.$lang_admin['Cannot find IP'].'</td></tr>'."\n";
+
+?>
+ </tbody>
+ </table>
+<?php
+
+// Setup control buttons
+$pun_page['main_submit'] = array(
+ '<span class="submit"><input type="submit" name="ban_users" value="'.$lang_admin['Ban'].'" /></span>',
+ '<span class="submit"><input type="submit" name="delete_users" value="'.$lang_admin['Delete'].'" /></span>',
+ '<span class="submit"><input type="submit" name="change_group" value="'.$lang_admin['Change group'].'" /></span>'
+);
+
+($hook = get_hook('aus_show_users_pre_moderation_buttons')) ? eval($hook) : null;
+
+?>
+ <p class="submitting"><?php echo implode("\n\t\t\t", $pun_page['main_submit'])."\n" ?></p>
+ </form>
+ </div>
+
+</div>
+<?php
+
+ require PUN_ROOT.'footer.php';
+}
+
+
+else if (isset($_POST['delete_users']) || isset($_POST['delete_users_comply']) || isset($_POST['delete_users_cancel']))
+{
+ // User pressed the cancel button
+ if (isset($_POST['delete_users_cancel']))
+ pun_redirect(pun_link($pun_url['admin_users']), $lang_common['Cancel redirect']);
+
+ if ($session->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';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Confirm delete'] ?></span></h2>
+ </div>
+ <div class="frm-info">
+ <p class="warn"><?php echo $lang_admin['Delete warning'] ?></p>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_users']) ?>&action=modify_users">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_users']).'&action=modify_users') ?>" />
+ <input type="hidden" name="users" value="<?php echo implode(',', $users) ?>" />
+ </div>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><span><?php echo $lang_admin['Delete posts legend'] ?></span></legend>
+ <div class="radbox checkbox">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>"><span class="fld-label"><?php echo $lang_admin['Delete posts'] ?></span><br /><input type="checkbox" id="fld<?php echo ++$fld_count ?>" name="delete_posts" value="1" checked="checked" /> <?php echo $lang_admin['Delete posts label'] ?></label>
+ </div>
+ </fieldset>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" name="delete_users_comply" value="<?php echo $lang_admin['Delete'] ?>" /></span>
+ <span class="cancel"><input type="submit" name="delete_users_cancel" value="<?php echo $lang_common['Cancel'] ?>" /></span>
+ </div>
+ </form>
+ </div>
+
+</div>
+<?php
+
+ require PUN_ROOT.'footer.php';
+}
+
+
+else if (isset($_POST['ban_users']) || isset($_POST['ban_users_comply']))
+{
+ if ($session->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';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Ban advanced heading'] ?></span></h2>
+ </div>
+ <div class="frm-info">
+ <p><?php echo $lang_admin['Mass ban info'] ?></p>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_users']) ?>&action=modify_users">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_users']).'&action=modify_users') ?>" />
+ <input type="hidden" name="users" value="<?php echo implode(',', $users) ?>" />
+ </div>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><span><?php echo $lang_admin['Ban settings legend'] ?></span></legend>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Ban message'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="ban_message" size="50" maxlength="255" /></span>
+ <span class="fld-help"><?php echo $lang_admin['Ban message info'] ?></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Expire date'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="ban_expire" size="17" maxlength="10" /></span>
+ <span class="fld-help"><?php echo $lang_admin['Expire date info'] ?></span>
+ </label>
+ </div>
+ </fieldset>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" class="button" name="ban_users_comply" value="<?php echo $lang_admin['Ban'] ?>" /></span>
+ </div>
+ </form>
+ </div>
+
+</div>
+<?php
+
+ require PUN_ROOT.'footer.php';
+}
+
+
+else if (isset($_POST['change_group']) || isset($_POST['change_group_comply']) || isset($_POST['change_group_cancel']))
+{
+ if ($session->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';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['Change group head'] ?></span></h2>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_users']) ?>&action=modify_users">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_users']).'&action=modify_users') ?>" />
+ <input type="hidden" name="users" value="<?php echo implode(',', $users) ?>" />
+ </div>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><span><?php echo $lang_admin['Move users legend'] ?></span></legend>
+ <div class="frm-fld select">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Move users to'] ?></span><br />
+ <span class="fld-input"><select id="fld<?php echo $pun_page['fld_count'] ?>" name="move_to_group">
+<?php
+
+ $query = array(
+ 'SELECT' => 'g.g_id, g.g_title',
+ 'FROM' => 'groups AS g',
+ 'WHERE' => 'g.g_id!='.PUN_GUEST,
+ 'ORDER BY' => 'g.g_title'
+ );
+
+ ($hook = get_hook('aus_qr_get_groups')) ? eval($hook) : null;
+ $result = $pun_db->query_build($query) or error(__FILE__, __LINE__);
+ while ($cur_group = $pun_db->fetch_assoc($result))
+ {
+ if ($cur_group['g_id'] == PUN_MEMBER) // Pre-select the pre-defined Members group
+ echo "\t\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'" selected="selected">'.htmlspecialchars($cur_group['g_title']).'</option>'."\n";
+ else
+ echo "\t\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'">'.htmlspecialchars($cur_group['g_title']).'</option>'."\n";
+ }
+
+?>
+ </select></span>
+ </label>
+ </div>
+ </fieldset>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" name="change_group_comply" value="<?php echo $lang_admin['Change group'] ?>" /></span>
+ <span class="cancel"><input type="submit" name="change_group_cancel" value="<?php echo $lang_admin['Cancel'] ?>" /></span>
+ </div>
+ </form>
+ </div>
+
+</div>
+<?php
+
+ require PUN_ROOT.'footer.php';
+}
+
+
+else if (isset($_POST['find_user']))
+{
+ $form = $_POST['form'];
+ $form['username'] = $_POST['username'];
+
+ ($hook = get_hook('aus_find_user_selected')) ? eval($hook) : null;
+
+ // trim() all elements in $form
+ $form = array_map('trim', $form);
+ $conditions = array();
+
+ $posts_greater = trim($_POST['posts_greater']);
+ $posts_less = trim($_POST['posts_less']);
+ $last_post_after = trim($_POST['last_post_after']);
+ $last_post_before = trim($_POST['last_post_before']);
+ $registered_after = trim($_POST['registered_after']);
+ $registered_before = trim($_POST['registered_before']);
+ $order_by = $_POST['order_by'];
+ $direction = $_POST['direction'];
+ $user_group = $_POST['user_group'];
+
+ if ((!empty($posts_greater) || !empty($posts_less)) && !ctype_digit($posts_greater.$posts_less))
+ message($lang_admin['Non numeric value message']);
+
+ // Try to convert date/time to timestamps
+ if ($last_post_after != '')
+ $last_post_after = strtotime($last_post_after);
+ if ($last_post_before != '')
+ $last_post_before = strtotime($last_post_before);
+ if ($registered_after != '')
+ $registered_after = strtotime($registered_after);
+ if ($registered_before != '')
+ $registered_before = strtotime($registered_before);
+
+ if ($last_post_after == -1 || $last_post_before == -1 || $registered_after == -1 || $registered_before == -1)
+ message($lang_admin['Invalid date/time message']);
+
+ if ($last_post_after != '')
+ $conditions[] = 'u.last_post>'.$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';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php printf($lang_admin['Users found'], $pun_page['num_users']) ?></span></h2>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_users']) ?>&action=modify_users">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_users']).'&action=modify_users') ?>" />
+ </div>
+ <table cellspacing="0">
+ <thead>
+ <tr>
+ <th class="tcl" scope="col"><?php echo $lang_admin['Username column'] ?></th>
+ <th class="tc2" scope="col"><?php echo $lang_admin['Title column'] ?></th>
+ <th class="tc3" scope="col"><?php echo $lang_admin['Posts'] ?></th>
+<?php ($hook = get_hook('aus_find_user_table_header_after_num_posts')) ? eval($hook) : null; ?>
+ <th class="tcr actions" scope="col"><?php echo $lang_admin['Actions'] ?></th>
+<?php ($hook = get_hook('aus_find_user_table_header_after_actions')) ? eval($hook) : null; if ($pun_user['g_id'] == PUN_ADMIN): ?> <th class="tcmod" scope="col"><?php echo $lang_misc['Select'] ?></th>
+<?php endif; ?> </tr>
+ </thead>
+ <tbody>
+<?php
+
+ if ($pun_page['num_users'])
+ {
+ 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 = '<strong>'.$lang_admin['Not verified'].'</strong>';
+
+ $pun_page['actions'] = '<span><a href="'.pun_link($pun_url['admin_users']).'&ip_stats='.$user_data['id'].'">'.$lang_admin['View IP stats'].'</a></span> <span><a href="'.pun_link($pun_url['search_user_posts'], $user_data['id']).'">'.$lang_admin['Show posts'].'</a></span>';
+
+?>
+ <tr>
+ <td class="tcl"><?php echo '<strong><a href="'.pun_link($pun_url['user'], $user_data['id']).'">'.htmlspecialchars($user_data['username']).'</a></strong>' ?> <span class="usermail"><a href="mailto:<?php echo $user_data['email'] ?>"><?php echo $user_data['email'] ?></a></span> <?php if ($user_data['admin_note'] != '') echo '<span class="usernote">'.htmlspecialchars($user_data['admin_note']).'</span>' ?></td>
+ <td class="tc2"><?php echo $user_title ?></td>
+ <td class="tc3"><?php echo $user_data['num_posts'] ?></td>
+<?php ($hook = get_hook('aus_find_user_table_contents_after_num_posts')) ? eval($hook) : null; ?>
+ <td class="tcr actions"><?php echo $pun_page['actions'] ?></td>
+<?php ($hook = get_hook('aus_find_user_table_contents_after_actions')) ? eval($hook) : null; if ($pun_user['g_id'] == PUN_ADMIN): ?> <td class="tcmod"><input type="checkbox" name="users[<?php echo $user_data['id'] ?>]" value="1" /></td>
+<?php endif; ?> </tr>
+<?php
+
+ }
+ }
+ else
+ echo "\t\t\t\t\t".'<tr><td class="tcl" colspan="'.(($pun_user['g_id'] == PUN_ADMIN) ? '5' : '4').'">'.$lang_admin['No match'].'</td></tr>'."\n";
+
+?>
+ </tbody>
+ </table>
+<?php
+
+// Setup control buttons
+$pun_page['main_submit'] = array(
+ '<span class="submit"><input type="submit" name="ban_users" value="'.$lang_admin['Ban'].'" /></span>',
+ '<span class="submit"><input type="submit" name="delete_users" value="'.$lang_admin['Delete'].'" /></span>',
+ '<span class="submit"><input type="submit" name="change_group" value="'.$lang_admin['Change group'].'" /></span>'
+);
+
+($hook = get_hook('aus_find_user_pre_moderation_buttons')) ? eval($hook) : null;
+
+?>
+ <p class="submitting">
+ <?php echo implode("\n\t\t\t\t", $pun_page['main_submit'])."\n" ?>
+ </p>
+ </form>
+ </div>
+</div>
+<?php
+
+ require PUN_ROOT.'footer.php';
+}
+
+
+else
+{
+ // Setup form
+ $pun_page['set_count'] = $pun_page['fld_count'] = 0;
+ $pun_page['form_action'] = '';
+
+ // 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['Searches']
+ );
+
+ ($hook = get_hook('aus_search_form_pre_header_load')) ? eval($hook) : null;
+
+ define('PUN_PAGE_SECTION', 'users');
+ define('PUN_PAGE', 'admin-users');
+ require PUN_ROOT.'header.php';
+
+?>
+<div id="pun-main" class="main sectioned admin">
+
+<?php echo generate_admin_menu(); ?>
+
+ <div class="main-head">
+ <h1><span>{ <?php echo end($pun_page['crumbs']) ?> }</span></h1>
+ </div>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['User search head'] ?></span></h2>
+ </div>
+ <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_users']) ?>&action=find_user">
+ <div class="hidden">
+ <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(pun_link($pun_url['admin_users']).'&action=find_user') ?>" />
+ </div>
+<?php ($hook = get_hook('aus_search_pre_user_search_fieldset')) ? eval($hook) : null; ?>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['User search legend'] ?></strong></legend>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Username'] ?></span><br />
+ <span class="input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="username" size="25" maxlength="25" /></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['E-mail address'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[email]" size="30" maxlength="80" /></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Title'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[title]" size="30" maxlength="50" /></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Real name'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[realname]" size="30" maxlength="40" /></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Website'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[url]" size="35" maxlength="100" /></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label">Jabber</span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[jabber]" size="30" maxlength="80" /></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label">ICQ</span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[icq]" size="12" maxlength="12" /></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label">MSN Messenger</span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[msn]" size="30" maxlength="80" /></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label">AOL IM</span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[aim]" size="20" maxlength="20" /></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label">Yahoo! Messenger</span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[yahoo]" size="20" maxlength="20" /></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Location'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[location]" size="30" maxlength="30" /></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Signature'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[signature]" size="35" maxlength="512" /></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Admin note'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="form[admin_note]" size="30" maxlength="30" /></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['More posts than'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="posts_greater" size="5" maxlength="8" /></span>
+ <span class="fld-extra"><?php echo $lang_admin['Number of posts'] ?></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Less posts than'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="posts_less" size="5" maxlength="8" /></span>
+ <span class="fld-extra"><?php echo $lang_admin['Number of posts'] ?></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Last post after'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="last_post_after" size="24" maxlength="19" /></span>
+ <span class="fld-extra">(yyyy-mm-dd hh:mm:ss)</span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Last post before'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="last_post_before" size="24" maxlength="19" /></span>
+ <span class="fld-extra">(yyyy-mm-dd hh:mm:ss)</span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Registered after'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="registered_after" size="24" maxlength="19" /></span>
+ <span class="fld-extra">(yyyy-mm-dd hh:mm:ss)</span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Registered before'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="registered_before" size="24" maxlength="19" /></span>
+ <span class="fld-extra">(yyyy-mm-dd hh:mm:ss)</span>
+ </label>
+ </div>
+<?php ($hook = get_hook('aus_search_user_search_end')) ? eval($hook) : null; ?>
+ </fieldset>
+<?php ($hook = get_hook('aus_search_pre_results_fieldset')) ? eval($hook) : null; ?>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['User results legend'] ?></strong></legend>
+ <div class="frm-fld select">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Order by'] ?></span><br />
+ <span class="fld-input"><select id="fld<?php echo $pun_page['fld_count'] ?>" name="order_by">
+ <option value="username" selected="selected"><?php echo strtolower($lang_admin['Username']) ?></option>
+ <option value="email"><?php echo strtolower($lang_admin['E-mail']) ?></option>
+ <option value="num_posts"><?php echo strtolower($lang_admin['Posts']) ?></option>
+ <option value="last_post"><?php echo $lang_admin['Last post'] ?></option>
+ <option value="registered"><?php echo $lang_admin['Registered'] ?></option>
+ </select></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['Sort order'] ?></span><br />
+ <span class="fld-input"><select id="fld<?php echo $pun_page['fld_count'] ?>" name="direction">
+ <option value="ASC" selected="selected"><?php echo $lang_admin['Ascending'] ?></option>
+ <option value="DESC"><?php echo $lang_admin['Descending'] ?></option>
+ </select></span>
+ </label>
+ </div>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['User group'] ?></span><br />
+ <span class="fld-input"><select id="fld<?php echo $pun_page['fld_count'] ?>" name="user_group">
+ <option value="all" selected="selected"><?php echo $lang_admin['All groups'] ?></option>
+ <option value="<?php echo PUN_UNVERIFIED ?>"><?php echo $lang_admin['Unverified users'] ?></option>
+<?php
+
+ $query = array(
+ 'SELECT' => 'g.g_id, g.g_title',
+ 'FROM' => 'groups AS g',
+ 'WHERE' => 'g.g_id!='.PUN_GUEST,
+ 'ORDER BY' => 'g.g_title'
+ );
+
+ ($hook = get_hook('aus_qr_get_groups2')) ? eval($hook) : null;
+ $result = $pun_db->query_build($query) or error(__FILE__, __LINE__);
+ while ($cur_group = $pun_db->fetch_assoc($result))
+ echo "\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'">'.htmlspecialchars($cur_group['g_title']).'</option>'."\n";
+
+?>
+ </select></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('aus_search_results_fieldset_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" class="button" name="find_user" value="<?php echo $lang_admin['Submit search'] ?>" /></span>
+ </div>
+ </form>
+ </div>
+<?php
+
+// Reset fieldset counter
+$pun_page['set_count'] = 0;
+
+?>
+
+ <div class="main-content frm">
+ <div class="frm-head">
+ <h2><span><?php echo $lang_admin['IP search head'] ?></span></h2>
+ </div>
+ <form class="frm-form" method="get" accept-charset="utf-8" action="<?php echo pun_link($pun_url['admin_users']) ?>">
+<?php ($hook = get_hook('aus_search_pre_ip_search_fieldset')) ? eval($hook) : null; ?>
+ <fieldset class="frm-set set<?php echo ++$pun_page['set_count'] ?>">
+ <legend class="frm-legend"><strong><?php echo $lang_admin['IP search legend'] ?></strong></legend>
+ <div class="frm-fld text">
+ <label for="fld<?php echo ++$pun_page['fld_count'] ?>">
+ <span class="fld-label"><?php echo $lang_admin['IP address'] ?></span><br />
+ <span class="fld-input"><input type="text" id="fld<?php echo $pun_page['fld_count'] ?>" name="show_users" size="18" maxlength="15" /></span>
+ </label>
+ </div>
+<?php ($hook = get_hook('aus_search_ip_search_fieldset_end')) ? eval($hook) : null; ?>
+ </fieldset>
+ <div class="frm-buttons">
+ <span class="submit"><input type="submit" value=" <?php echo $lang_admin['Submit search'] ?> " /></span>
+ </div>
+ </form>
+ </div>
+
+</div>
+<?php
+
+ require PUN_ROOT.'footer.php';
+}
--- a/punbb/admin_bans.php Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,365 +0,0 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// Tell header.php to use the admin template
-define('PUN_ADMIN_CONSOLE', 1);
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-require PUN_ROOT.'include/common_admin.php';
-
-
-if ($pun_user['g_id'] < PUN_MOD || ($pun_user['g_id'] == PUN_MOD && $pun_config['p_mod_ban_users'] == '0'))
- message($lang_common['No permission']);
-
-
-// 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;
-
- $result = $pun_db->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');
-
-
-?>
- <div class="blockform">
- <h2><span>Ban advanced settings</span></h2>
- <div class="box">
- <form id="bans2" method="post" action="admin_bans.php">
- <div class="inform">
- <input type="hidden" name="mode" value="<?php echo $mode ?>" />
-<?php if ($mode == 'edit'): ?> <input type="hidden" name="ban_id" value="<?php echo $ban_id ?>" />
-<?php endif; ?> <fieldset>
- <legend>Supplement ban with IP and e-mail</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">Username</th>
- <td>
- <input type="text" name="ban_user" size="25" maxlength="25" value="<?php if (isset($ban_user)) echo pun_htmlspecialchars($ban_user); ?>" tabindex="1" />
- <span>The username to ban.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">IP-adresses</th>
- <td>
- <input type="text" name="ban_ip" size="45" maxlength="255" value="<?php if (isset($ban_ip)) echo $ban_ip; ?>" tabindex="2" />
- <span>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.<?php if ($ban_user != '' && isset($user_id)) echo ' Click <a href="admin_users.php?ip_stats='.$user_id.'">here</a> to see IP statistics for this user.' ?></span>
- </td>
- </tr>
- <tr>
- <th scope="row">E-mail/domain</th>
- <td>
- <input type="text" name="ban_email" size="40" maxlength="50" value="<?php if (isset($ban_email)) echo strtolower($ban_email); ?>" tabindex="3" />
- <span>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.</span>
- </td>
- </tr>
- </table>
- <p class="topspace"><strong class="warntext">You should be very careful when banning an IP-range because of the possibility of multiple users matching the same partial IP.</strong></p>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend>Ban message and expiry</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">Ban message</th>
- <td>
- <input type="text" name="ban_message" size="50" maxlength="255" value="<?php if (isset($ban_message)) echo pun_htmlspecialchars($ban_message); ?>" tabindex="4" />
- <span>A message that will be displayed to the banned user when he/she visits the forums.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Expire date</th>
- <td>
- <input type="text" name="ban_expire" size="17" maxlength="10" value="<?php if (isset($ban_expire)) echo $ban_expire; ?>" tabindex="5" />
- <span>The date when this ban should be automatically removed (format: YYYY-MM-DD). Leave blank to remove manually.</span>
- </td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
- <p class="submitend"><input type="submit" name="add_edit_ban" value=" Save " tabindex="6" /></p>
- </form>
- </div>
- </div>
- <div class="clearer"></div>
-</div>
-<?php
-
- require PUN_ROOT.'footer.php';
-}
-
-
-// Add/edit a ban (stage 2)
-else if (isset($_POST['add_edit_ban']))
-{
- confirm_referrer('admin_bans.php');
-
- $ban_user = trim($_POST['ban_user']);
- $ban_ip = trim($_POST['ban_ip']);
- $ban_email = strtolower(trim($_POST['ban_email']));
- $ban_message = trim($_POST['ban_message']);
- $ban_expire = trim($_POST['ban_expire']);
-
- if ($ban_user == '' && $ban_ip == '' && $ban_email == '')
- message('You must enter either a username, an IP address or an e-mail address (at least).');
- else if (strtolower($ban_user) == 'guest')
- message('The guest user cannot be banned.');
-
- // Validate IP/IP range (it's overkill, I know)
- if ($ban_ip != '')
- {
- $ban_ip = preg_replace('/[\s]{2,}/', ' ', $ban_ip);
- $addresses = explode(' ', $ban_ip);
- $addresses = array_map('trim', $addresses);
-
- for ($i = 0; $i < count($addresses); ++$i)
- {
- $octets = explode('.', $addresses[$i]);
-
- for ($c = 0; $c < count($octets); ++$c)
- {
- $octets[$c] = (strlen($octets[$c]) > 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');
-
-?>
- <div class="blockform">
- <h2><span>New ban</span></h2>
- <div class="box">
- <form id="bans" method="post" action="<?php echo makeUrlNS('Special', 'Forum/Admin_Bans', 'action=more', true); ?>">
- <div class="inform">
- <fieldset>
- <legend>Add ban</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">Username<div><input type="submit" name="add_ban" value=" Add " tabindex="2" /></div></th>
- <td>
- <input type="text" name="new_ban_user" size="25" maxlength="25" tabindex="1" />
- <span>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.</span>
- </td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
- </form>
- </div>
-
- <h2 class="block2"><span>Existing bans</span></h2>
- <div class="box">
- <div class="fakeform">
-<?php
-
-$result = $pun_db->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);
-
-?>
- <div class="inform">
- <fieldset>
- <legend>Ban expires: <?php echo $expire ?></legend>
- <div class="infldset">
- <table cellspacing="0">
-<?php if ($cur_ban['username'] != ''): ?> <tr>
- <th>Username</th>
- <td><?php echo pun_htmlspecialchars($cur_ban['username']) ?></td>
- </tr>
-<?php endif; ?><?php if ($cur_ban['email'] != ''): ?> <tr>
- <th>E-mail</th>
- <td><?php echo $cur_ban['email'] ?></td>
- </tr>
-<?php endif; ?><?php if ($cur_ban['ip'] != ''): ?> <tr>
- <th>IP/IP-ranges</th>
- <td><?php echo $cur_ban['ip'] ?></td>
- </tr>
-<?php endif; ?><?php if ($cur_ban['message'] != ''): ?> <tr>
- <th>Reason</th>
- <td><?php echo pun_htmlspecialchars($cur_ban['message']) ?></td>
- </tr>
-<?php endif; ?> </table>
- <p class="linkactions"><a href="admin_bans.php?edit_ban=<?php echo $cur_ban['id'] ?>">Edit</a> - <a href="admin_bans.php?del_ban=<?php echo $cur_ban['id'] ?>">Remove</a></p>
- </div>
- </fieldset>
- </div>
-<?php
-
- }
-}
-else
- echo "\t\t\t\t".'<p>No bans in list.</p>'."\n";
-
-?>
- </div>
- </div>
- </div>
- <div class="clearer"></div>
-</div>
-<?php
-
-require PUN_ROOT.'footer.php';
--- a/punbb/admin_categories.php Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,261 +0,0 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// Tell header.php to use the admin template
-define('PUN_ADMIN_CONSOLE', 1);
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-require PUN_ROOT.'include/common_admin.php';
-
-
-if ($pun_user['g_id'] < PUN_ADMIN)
- message($lang_common['No permission']);
-
-
-// Add a new category
-if (isset($_POST['add_cat']))
-{
- confirm_referrer('admin_categories.php');
-
- $new_cat_name = trim($_POST['new_cat_name']);
- if ($new_cat_name == '')
- message('You must enter a name for the category.');
-
- $pun_db->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');
-
-?>
- <div class="blockform">
- <h2><span>Category delete</span></h2>
- <div class="box">
- <form method="post" action="<?php echo makeUrlNS('Special', 'Forum/Admin_categories'); ?>">
- <div class="inform">
- <input type="hidden" name="cat_to_delete" value="<?php echo $cat_to_delete ?>" />
- <fieldset>
- <legend>Confirm delete category</legend>
- <div class="infldset">
- <p>Are you sure that you want to delete the category "<?php echo pun_htmlspecialchars($cat_name) ?>"?</p>
- <p>WARNING! Deleting a category will delete all forums and posts (if any) in that category!</p>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="del_cat_comply" value="Delete" /><a href="javascript:history.go(-1)">Go back</a></p>
- </form>
- </div>
- </div>
- <div class="clearer"></div>
-</div>
-<?php
-
- require PUN_ROOT.'footer.php';
- }
-}
-
-
-else if (isset($_POST['update'])) // Change position and name of the categories
-{
- confirm_referrer('admin_categories.php');
-
- $cat_order = $_POST['cat_order'];
- $cat_name = $_POST['cat_name'];
-
- $result = $pun_db->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');
-
-?>
- <div class="blockform">
- <h2><span>Add/remove/edit categories</span></h2>
- <div class="box">
- <form method="post" action="<?php echo makeUrlNS('Special', 'Forum/Admin_categories', 'action=foo', true); ?>">
- <div class="inform">
- <fieldset>
- <legend>Add/delete categories</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">Add a new category<div><input type="submit" name="add_cat" value="Add New" tabindex="2" /></div></th>
- <td>
- <input type="text" name="new_cat_name" size="35" maxlength="80" tabindex="1" />
- <span>The name of the new category you want to add. You can edit the name of the category later (see below). Go to <a href="<?php echo makeUrlNS('Special', 'Forum/Admin_forums'); ?>">Forums</a> to add forums to your new category.</span>
- </td>
- </tr>
-<?php if ($num_cats): ?> <tr>
- <th scope="row">Delete a category<div><input type="submit" name="del_cat" value="Delete" tabindex="4" /></div></th>
- <td>
- <select name="cat_to_delete" tabindex="3">
-<?php
-
- while (list(, list($cat_id, $cat_name, ,)) = @each($cat_list))
- echo "\t\t\t\t\t\t\t\t\t\t".'<option value="'.$cat_id.'">'.pun_htmlspecialchars($cat_name).'</option>'."\n";
-
-?>
- </select>
- <span>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.</span>
- </td>
- </tr>
-<?php endif; ?> </table>
- </div>
- </fieldset>
- </div>
-<?php if ($num_cats): ?> <div class="inform">
- <fieldset>
- <legend>Edit categories</legend>
- <div class="infldset">
- <table id="categoryedit" cellspacing="0" >
- <thead>
- <tr>
- <th class="tcl" scope="col">Name</th>
- <th scope="col">Position</th>
- <th> </th>
- </tr>
- </thead>
- <tbody>
-<?php
-
- @reset($cat_list);
- for ($i = 0; $i < $num_cats; ++$i)
- {
- list(, list($cat_id, $cat_name, $position)) = @each($cat_list);
-
-?>
- <tr><td><input type="text" name="cat_name[<?php echo $i ?>]" value="<?php echo pun_htmlspecialchars($cat_name) ?>" size="35" maxlength="80" /></td><td><input type="text" name="cat_order[<?php echo $i ?>]" value="<?php echo $position ?>" size="3" maxlength="3" /></td><td> </td></tr>
-<?php
-
- }
-
-?>
- </tbody>
- </table>
- <div class="fsetsubmit"><input type="submit" name="update" value="Update" /></div>
- </div>
- </fieldset>
- </div>
-<?php endif; ?> </form>
- </div>
- </div>
- <div class="clearer"></div>
-</div>
-<?php
-
-require PUN_ROOT.'footer.php';
--- a/punbb/admin_censoring.php Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,170 +0,0 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// Tell header.php to use the admin template
-define('PUN_ADMIN_CONSOLE', 1);
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-require PUN_ROOT.'include/common_admin.php';
-
-
-if ($pun_user['g_id'] < PUN_MOD)
- message($lang_common['No permission']);
-
-
-// Add a censor word
-if (isset($_POST['add_word']))
-{
- confirm_referrer('admin_censoring.php');
-
- $search_for = trim($_POST['new_search_for']);
- $replace_with = trim($_POST['new_replace_with']);
-
- if ($search_for == '' || $replace_with == '')
- message('You must enter both a word to censor and text to replace it with.');
-
- $pun_db->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');
-
-?>
- <div class="blockform">
- <h2><span>Censoring</span></h2>
- <div class="box">
- <form id="censoring" method="post" action="<?php echo makeUrlNS('Special', 'Forum/Admin_censoring', 'action=foo', true); ?>">
- <div class="inform">
- <fieldset>
- <legend>Add word</legend>
- <div class="infldset">
- <p>Enter a word that you want to censor and the replacement text for this word. Wildcards are accepted (i.e. *some* would match somewhere and lonesome). Censor words also affect usernames. New users will not be able to register with usernames containing any censored words. The search is case insensitive. <strong>Censor words must be enabled in <a href="admin_options.php#censoring">Options</a> for this to have any effect.</strong></p>
- <table cellspacing="0">
- <thead>
- <tr>
- <th class="tcl" scope="col">Censored word</th>
- <th class="tc2" scope="col">Replacement text</th>
- <th class="hidehead" scope="col">Action</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><input type="text" name="new_search_for" size="24" maxlength="60" tabindex="1" /></td>
- <td><input type="text" name="new_replace_with" size="24" maxlength="60" tabindex="2" /></td>
- <td><input type="submit" name="add_word" value=" Add " tabindex="3" /></td>
- </tr>
- </tbody>
- </table>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend>Edit/remove words</legend>
- <div class="infldset">
-<?php
-
-$result = $pun_db->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))
-{
-
-?>
- <table cellspacing="0" >
- <thead>
- <tr>
- <th class="tcl" scope="col">Censored word</th>
- <th class="tc2" scope="col">Replacement text</th>
- <th class="hidehead" scope="col">Actions</th>
- </tr>
- </thead>
- <tbody>
-<?php
-
- while ($cur_word = $pun_db->fetch_assoc($result))
- echo "\t\t\t\t\t\t\t\t".'<tr><td><input type="text" name="search_for['.$cur_word['id'].']" value="'.pun_htmlspecialchars($cur_word['search_for']).'" size="24" maxlength="60" /></td><td><input type="text" name="replace_with['.$cur_word['id'].']" value="'.pun_htmlspecialchars($cur_word['replace_with']).'" size="24" maxlength="60" /></td><td><input type="submit" name="update['.$cur_word['id'].']" value="Update" /> <input type="submit" name="remove['.$cur_word['id'].']" value="Remove" /></td></tr>'."\n";
-
-?>
- </tbody>
- </table>
-<?php
-
-}
-else
- echo "\t\t\t\t\t\t\t".'<p>No censor words in list.</p>'."\n";
-
-?>
- </div>
- </fieldset>
- </div>
- </form>
- </div>
- </div>
- <div class="clearer"></div>
-</div>
-<?php
-
-require PUN_ROOT.'footer.php';
--- a/punbb/admin_forums.php Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,460 +0,0 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// Tell header.php to use the admin template
-define('PUN_ADMIN_CONSOLE', 1);
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-require PUN_ROOT.'include/common_admin.php';
-
-
-if ($pun_user['g_id'] < PUN_ADMIN)
- message($lang_common['No permission']);
-
-
-// Add a "default" forum
-if (isset($_POST['add_forum']))
-{
- confirm_referrer('admin_forums.php');
-
- $add_to_cat = intval($_POST['add_to_cat']);
- if ($add_to_cat < 1)
- message($lang_common['Bad request']);
-
- $pun_db->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');
-
-?>
- <div class="blockform">
- <h2><span>Confirm delete forum</span></h2>
- <div class="box">
- <form method="post" action="<?php echo makeUrlNS('Special', 'Forum/Admin_forums', 'del_forum=' . $forum_id, true); ?>">
- <div class="inform">
- <fieldset>
- <legend>Important! Read before deleting</legend>
- <div class="infldset">
- <p>Are you sure that you want to delete the forum "<?php echo $forum_name ?>"?</p>
- <p>WARNING! Deleting a forum will delete all posts (if any) in that forum!</p>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="del_forum_comply" value="Delete" /><a href="javascript:history.go(-1)">Go back</a></p>
- </form>
- </div>
- </div>
- <div class="clearer"></div>
-</div>
-<?php
-
- require PUN_ROOT.'footer.php';
- }
-}
-
-
-// Update forum positions
-else if (isset($_POST['update_positions']))
-{
- confirm_referrer('admin_forums.php');
-
- while (list($forum_id, $disp_position) = @each($_POST['position']))
- {
- if (!@preg_match('#^\d+$#', $disp_position))
- message('Position must be a positive integer value.');
-
- $pun_db->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');
-
-?>
- <div class="blockform">
- <h2><span>Edit forum</span></h2>
- <div class="box">
- <form id="edit_forum" method="post" action="<?php echo makeUrlNS('Special', 'Forum/Admin_forums', 'edit_forum=' . $forum_id, true); ?>">
- <p class="submittop"><input type="submit" name="save" value="Save changes" tabindex="6" /></p>
- <div class="inform">
- <fieldset>
- <legend>Edit forum details</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">Forum name</th>
- <td><input type="text" name="forum_name" size="35" maxlength="80" value="<?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?>" tabindex="1" /></td>
- </tr>
- <tr>
- <th scope="row">Description (HTML)</th>
- <td><textarea name="forum_desc" rows="3" cols="50" tabindex="2"><?php echo pun_htmlspecialchars($cur_forum['forum_desc']) ?></textarea></td>
- </tr>
- <tr>
- <th scope="row">Category</th>
- <td>
- <select name="cat_id" tabindex="3">
-<?php
-
- $result = $pun_db->query('SELECT id, cat_name FROM '.$pun_db->prefix.'categories ORDER BY disp_position') or error('Unable to fetch category list', __FILE__, __LINE__, $pun_db->error());
- while ($cur_cat = $pun_db->fetch_assoc($result))
- {
- $selected = ($cur_cat['id'] == $cur_forum['cat_id']) ? ' selected="selected"' : '';
- echo "\t\t\t\t\t\t\t\t\t\t\t".'<option value="'.$cur_cat['id'].'"'.$selected.'>'.pun_htmlspecialchars($cur_cat['cat_name']).'</option>'."\n";
- }
-
-?>
- </select>
- </td>
- </tr>
- <tr>
- <th scope="row">Sort topics by</th>
- <td>
- <select name="sort_by" tabindex="4">
- <option value="0"<?php if ($cur_forum['sort_by'] == '0') echo ' selected="selected"' ?>>Last post</option>
- <option value="1"<?php if ($cur_forum['sort_by'] == '1') echo ' selected="selected"' ?>>Topic start</option>
- </select>
- </td>
- </tr>
- <tr>
- <th scope="row">Redirect URL</th>
- <td><?php echo ($cur_forum['num_topics']) ? 'Only available in empty forums' : '<input type="text" name="redirect_url" size="45" maxlength="100" value="'.pun_htmlspecialchars($cur_forum['redirect_url']).'" tabindex="5" />'; ?></td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend>Edit group permissions for this forum</legend>
- <div class="infldset">
- <p>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 <a href="admin_groups.php">User groups</a>. 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.</p>
- <table id="forumperms" cellspacing="0">
- <thead>
- <tr>
- <th class="atcl"> </th>
- <th>Read forum</th>
- <th>Post replies</th>
- <th>Post topics</th>
- </tr>
- </thead>
- <tbody>
-<?php
-
- $result = $pun_db->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;
-
-?>
- <tr>
- <th class="atcl"><?php echo pun_htmlspecialchars($cur_perm['g_title']) ?></th>
- <td<?php if (!$read_forum_def) echo ' class="nodefault"'; ?>>
- <input type="hidden" name="read_forum_old[<?php echo $cur_perm['g_id'] ?>]" value="<?php echo ($read_forum) ? '1' : '0'; ?>" />
- <input type="checkbox" name="read_forum_new[<?php echo $cur_perm['g_id'] ?>]" value="1"<?php echo ($read_forum) ? ' checked="checked"' : ''; ?><?php echo ($cur_perm['g_read_board'] == '0') ? ' disabled="disabled"' : ''; ?> />
- </td>
- <td<?php if (!$post_replies_def && $cur_forum['redirect_url'] == '') echo ' class="nodefault"'; ?>>
- <input type="hidden" name="post_replies_old[<?php echo $cur_perm['g_id'] ?>]" value="<?php echo ($post_replies) ? '1' : '0'; ?>" />
- <input type="checkbox" name="post_replies_new[<?php echo $cur_perm['g_id'] ?>]" value="1"<?php echo ($post_replies) ? ' checked="checked"' : ''; ?><?php echo ($cur_forum['redirect_url'] != '') ? ' disabled="disabled"' : ''; ?> />
- </td>
- <td<?php if (!$post_topics_def && $cur_forum['redirect_url'] == '') echo ' class="nodefault"'; ?>>
- <input type="hidden" name="post_topics_old[<?php echo $cur_perm['g_id'] ?>]" value="<?php echo ($post_topics) ? '1' : '0'; ?>" />
- <input type="checkbox" name="post_topics_new[<?php echo $cur_perm['g_id'] ?>]" value="1"<?php echo ($post_topics) ? ' checked="checked"' : ''; ?><?php echo ($cur_forum['redirect_url'] != '') ? ' disabled="disabled"' : ''; ?> />
- </td>
- </tr>
-<?php
-
- }
-
-?>
- </tbody>
- </table>
- <div class="fsetsubmit"><input type="submit" name="revert_perms" value="Revert to default" /></div>
- </div>
- </fieldset>
- </div>
- <p class="submitend"><input type="submit" name="save" value="Save changes" /></p>
- </form>
- </div>
- </div>
- <div class="clearer"></div>
-</div>
-
-<?php
-
- require PUN_ROOT.'footer.php';
-}
-
-
-$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Forums';
-require PUN_ROOT.'header.php';
-
-generate_admin_menu('forums');
-
-?>
- <div class="blockform">
- <h2><span>Add forum</span></h2>
- <div class="box">
- <form method="post" action="<?php echo makeUrlNS('Special', 'Forum/Admin_forums', 'action=adddel', true); ?>">
- <div class="inform">
- <fieldset>
- <legend>Create a new forum</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">Add forum to category<div><input type="submit" name="add_forum" value=" Add " tabindex="2" /></div></th>
- <td>
- <select name="add_to_cat" tabindex="1">
-<?php
-
- $result = $pun_db->query('SELECT id, cat_name FROM '.$pun_db->prefix.'categories ORDER BY disp_position') or error('Unable to fetch category list', __FILE__, __LINE__, $pun_db->error());
- while ($cur_cat = $pun_db->fetch_assoc($result))
- echo "\t\t\t\t\t\t\t\t\t".'<option value="'.$cur_cat['id'].'">'.pun_htmlspecialchars($cur_cat['cat_name']).'</option>'."\n";
-
-?>
- </select>
- <span>Select the category to which you wish to add a new forum.</span>
- </td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
- </form>
- </div>
-
- <h2 class="block2"><span>Edit forums</span></h2>
- <div class="box">
- <form id="edforum" method="post" action="<?php echo makeUrlNS('Special', 'Forum/Admin_forums', 'action=edit', true); ?>">
- <p class="submittop"><input type="submit" name="update_positions" value="Update positions" tabindex="3" /></p>
-<?php
-
-$tabindex_count = 4;
-
-// Display all the categories and forums
-$result = $pun_db->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".'</table>'."\n\t\t\t\t\t\t".'</div>'."\n\t\t\t\t\t".'</fieldset>'."\n\t\t\t\t".'</div>'."\n";
-
-?>
- <div class="inform">
- <fieldset>
- <legend>Category: <?php echo pun_htmlspecialchars($cur_forum['cat_name']) ?></legend>
- <div class="infldset">
- <table cellspacing="0">
-<?php
-
- $cur_category = $cur_forum['cid'];
- }
-
-?>
- <tr>
- <th><a href="<?php echo makeUrlNS('Special', 'Forum/Admin_forums', 'edit_forum=' . $cur_forum['fid'], true); ?>">Edit</a> - <a href="<?php echo makeUrlNS('Special', 'Forum/Admin_forums', 'del_forum=' . $cur_forum['fid'], true); ?>">Delete</a></th>
- <td>Position <input type="text" name="position[<?php echo $cur_forum['fid'] ?>]" size="3" maxlength="3" value="<?php echo $cur_forum['disp_position'] ?>" tabindex="<?php echo $tabindex_count ?>" />
- <strong><?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></strong></td>
- </tr>
-<?php
-
- $tabindex_count += 2;
-}
-
-?>
- </table>
- </div>
- </fieldset>
- </div>
- <p class="submitend"><input type="submit" name="update_positions" value="Update positions" tabindex="<?php echo $tabindex_count ?>" /></p>
- </form>
- </div>
- </div>
- <div class="clearer"></div>
-</div>
-<?php
-
-require PUN_ROOT.'footer.php';
--- a/punbb/admin_groups.php Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,471 +0,0 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// Tell header.php to use the admin template
-define('PUN_ADMIN_CONSOLE', 1);
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-require PUN_ROOT.'include/common_admin.php';
-
-
-if ($pun_user['g_id'] < PUN_ADMIN)
- message($lang_common['No permission']);
-
-
-// Add/edit a group (stage 1)
-if (isset($_POST['add_group']) || isset($_GET['edit_group']))
-{
- if (isset($_POST['add_group']))
- {
- $base_group = intval($_POST['base_group']);
-
- $result = $pun_db->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');
-
-?>
- <div class="blockform">
- <h2><span>Group settings</span></h2>
- <div class="box">
- <form id="groups2" method="post" action="admin_groups.php" onsubmit="return process_form(this)">
- <p class="submittop"><input type="submit" name="add_edit_group" value=" Save " /></p>
- <div class="inform">
- <input type="hidden" name="mode" value="<?php echo $mode ?>" />
-<?php if ($mode == 'edit'): ?> <input type="hidden" name="group_id" value="<?php echo $group_id ?>" />
-<?php endif; ?><?php if ($mode == 'add'): ?> <input type="hidden" name="base_group" value="<?php echo $base_group ?>" />
-<?php endif; ?> <fieldset>
- <legend>Setup group options and permissions</legend>
- <div class="infldset">
- <p>Below options and permissions are the default permissions for the user group. These options apply if no forum specific permissions are in effect.</p>
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">Group title</th>
- <td>
- <input type="text" name="req_title" size="25" maxlength="50" value="<?php if ($mode == 'edit') echo pun_htmlspecialchars($group['g_title']); ?>" tabindex="1" />
- </td>
- </tr>
- <tr>
- <th scope="row">User title</th>
- <td>
- <input type="text" name="user_title" size="25" maxlength="50" value="<?php echo pun_htmlspecialchars($group['g_user_title']) ?>" tabindex="2" />
- <span>This title will override any rank users in this group have attained. Leave blank to use default title or rank.</span>
- </td>
- </tr>
-<?php if ($group['g_id'] != PUN_ADMIN): ?> <tr>
- <th scope="row">Read board</th>
- <td>
- <input type="radio" name="read_board" value="1"<?php if ($group['g_read_board'] == '1') echo ' checked="checked"' ?> tabindex="3" /> <strong>Yes</strong> <input type="radio" name="read_board" value="0"<?php if ($group['g_read_board'] == '0') echo ' checked="checked"' ?> tabindex="4" /> <strong>No</strong>
- <span>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.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Post replies</th>
- <td>
- <input type="radio" name="post_replies" value="1"<?php if ($group['g_post_replies'] == '1') echo ' checked="checked"' ?> tabindex="5" /> <strong>Yes</strong> <input type="radio" name="post_replies" value="0"<?php if ($group['g_post_replies'] == '0') echo ' checked="checked"' ?> tabindex="6" /> <strong>No</strong>
- <span>Allow users in this group to post replies in topics.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Post topics</th>
- <td>
- <input type="radio" name="post_topics" value="1"<?php if ($group['g_post_topics'] == '1') echo ' checked="checked"' ?> tabindex="7" /> <strong>Yes</strong> <input type="radio" name="post_topics" value="0"<?php if ($group['g_post_topics'] == '0') echo ' checked="checked"' ?> tabindex="8" /> <strong>No</strong>
- <span>Allow users in this group to post new topics.</span>
- </td>
- </tr>
-<?php if ($group['g_id'] != PUN_GUEST): ?> <tr>
- <th scope="row">Edit posts</th>
- <td>
- <input type="radio" name="edit_posts" value="1"<?php if ($group['g_edit_posts'] == '1') echo ' checked="checked"' ?> tabindex="11" /> <strong>Yes</strong> <input type="radio" name="edit_posts" value="0"<?php if ($group['g_edit_posts'] == '0') echo ' checked="checked"' ?> tabindex="12" /> <strong>No</strong>
- <span>Allow users in this group to edit their own posts.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Delete posts</th>
- <td>
- <input type="radio" name="delete_posts" value="1"<?php if ($group['g_delete_posts'] == '1') echo ' checked="checked"' ?> tabindex="13" /> <strong>Yes</strong> <input type="radio" name="delete_posts" value="0"<?php if ($group['g_delete_posts'] == '0') echo ' checked="checked"' ?> tabindex="14" /> <strong>No</strong>
- <span>Allow users in this group to delete their own posts.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Delete topics</th>
- <td>
- <input type="radio" name="delete_topics" value="1"<?php if ($group['g_delete_topics'] == '1') echo ' checked="checked"' ?> tabindex="15" /> <strong>Yes</strong> <input type="radio" name="delete_topics" value="0"<?php if ($group['g_delete_topics'] == '0') echo ' checked="checked"' ?> tabindex="16" /> <strong>No</strong>
- <span>Allow users in this group to delete their own topics (including any replies).</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Set user title</th>
- <td>
- <input type="radio" name="set_title" value="1"<?php if ($group['g_set_title'] == '1') echo ' checked="checked"' ?> tabindex="17" /> <strong>Yes</strong> <input type="radio" name="set_title" value="0"<?php if ($group['g_set_title'] == '0') echo ' checked="checked"' ?> tabindex="18" /> <strong>No</strong>
- <span>Allow users in this group to set their own user title.</span>
- </td>
- </tr>
-<?php endif; ?> <tr>
- <th scope="row">Use search</th>
- <td>
- <input type="radio" name="search" value="1"<?php if ($group['g_search'] == '1') echo ' checked="checked"' ?> tabindex="19" /> <strong>Yes</strong> <input type="radio" name="search" value="0"<?php if ($group['g_search'] == '0') echo ' checked="checked"' ?> tabindex="20" /> <strong>No</strong>
- <span>Allow users in this group to use the search feature.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Search user list</th>
- <td>
- <input type="radio" name="search_users" value="1"<?php if ($group['g_search_users'] == '1') echo ' checked="checked"' ?> tabindex="21" /> <strong>Yes</strong> <input type="radio" name="search_users" value="0"<?php if ($group['g_search_users'] == '0') echo ' checked="checked"' ?> tabindex="22" /> <strong>No</strong>
- <span>Allow users in this group to freetext search for users in the user list.</span>
- </td>
- </tr>
-<?php if ($group['g_id'] != PUN_GUEST): ?> <tr>
- <th scope="row">Edit subjects interval</th>
- <td>
- <input type="text" name="edit_subjects_interval" size="5" maxlength="5" value="<?php echo $group['g_edit_subjects_interval'] ?>" tabindex="23" />
- <span>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.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Post flood interval</th>
- <td>
- <input type="text" name="post_flood" size="5" maxlength="4" value="<?php echo $group['g_post_flood'] ?>" tabindex="24" />
- <span>Number of seconds that users in this group have to wait between posts. Set to 0 to disable.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Search flood interval</th>
- <td>
- <input type="text" name="search_flood" size="5" maxlength="4" value="<?php echo $group['g_search_flood'] ?>" tabindex="25" />
- <span>Number of seconds that users in this group have to wait between searches. Set to 0 to disable.</span>
- </td>
- </tr>
-<?php endif; ?><?php endif; ?> </table>
-<?php if ($group['g_id'] == PUN_MOD ): ?> <p class="warntext">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.</p>
-<?php endif; ?> </div>
- </fieldset>
- </div>
- <p class="submitend"><input type="submit" name="add_edit_group" value=" Save " tabindex="26" /></p>
- </form>
- </div>
- </div>
- <div class="clearer"></div>
-</div>
-<?php
-
- require PUN_ROOT.'footer.php';
-}
-
-
-// Add/edit a group (stage 2)
-else if (isset($_POST['add_edit_group']))
-{
- confirm_referrer('admin_groups.php');
-
- // Is this the admin group? (special rules apply)
- $is_admin_group = (isset($_POST['group_id']) && $_POST['group_id'] == PUN_ADMIN) ? true : false;
-
- $title = trim($_POST['req_title']);
- $user_title = trim($_POST['user_title']);
- $read_board = isset($_POST['read_board']) ? intval($_POST['read_board']) : '1';
- $post_replies = isset($_POST['post_replies']) ? intval($_POST['post_replies']) : '1';
- $post_topics = isset($_POST['post_topics']) ? intval($_POST['post_topics']) : '1';
- $edit_posts = isset($_POST['edit_posts']) ? intval($_POST['edit_posts']) : ($is_admin_group) ? '1' : '0';
- $delete_posts = isset($_POST['delete_posts']) ? intval($_POST['delete_posts']) : ($is_admin_group) ? '1' : '0';
- $delete_topics = isset($_POST['delete_topics']) ? intval($_POST['delete_topics']) : ($is_admin_group) ? '1' : '0';
- $set_title = isset($_POST['set_title']) ? intval($_POST['set_title']) : ($is_admin_group) ? '1' : '0';
- $search = isset($_POST['search']) ? intval($_POST['search']) : '1';
- $search_users = isset($_POST['search_users']) ? intval($_POST['search_users']) : '1';
- $edit_subjects_interval = isset($_POST['edit_subjects_interval']) ? intval($_POST['edit_subjects_interval']) : '0';
- $post_flood = isset($_POST['post_flood']) ? intval($_POST['post_flood']) : '0';
- $search_flood = isset($_POST['search_flood']) ? intval($_POST['search_flood']) : '0';
-
- if ($title == '')
- message('You must enter a group title.');
-
- $user_title = ($user_title != '') ? '\''.$pun_db->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');
-
-?>
- <div class="blockform">
- <h2><span>Remove group</span></h2>
- <div class="box">
- <form id="groups" method="post" action="<?php echo makeUrlNS('Special', 'Forum/Admin_groups', 'del_group=' . $group_id, true); ?>">
- <div class="inform">
- <fieldset>
- <legend>Move users currently in group</legend>
- <div class="infldset">
- <p>The group "<?php echo pun_htmlspecialchars($group_title) ?>" currently has <?php echo $group_members ?> members. Please select a group to which these members will be assigned upon removal.</p>
- <label>Move users to
- <select name="move_to_group">
-<?php
-
- $result = $pun_db->query('SELECT g_id, g_title FROM '.$pun_db->prefix.'groups WHERE g_id!='.PUN_GUEST.' AND g_id!='.$group_id.' ORDER BY g_title') or error('Unable to fetch user group list', __FILE__, __LINE__, $pun_db->error());
-
- while ($cur_group = $pun_db->fetch_assoc($result))
- {
- if ($cur_group['g_id'] == PUN_MEMBER) // Pre-select the pre-defined Members group
- echo "\t\t\t\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'" selected="selected">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";
- else
- echo "\t\t\t\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";
- }
-
-?>
- </select>
- </br></label>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="del_group" value="Delete group" /></p>
- </form>
- </div>
- </div>
- <div class="clearer"></div>
-</div>
-<?php
-
- require PUN_ROOT.'footer.php';
-}
-
-
-$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / User groups';
-require PUN_ROOT.'header.php';
-
-generate_admin_menu('groups');
-
-?>
- <div class="blockform">
- <h2><span>Add/setup groups</span></h2>
- <div class="box">
- <form id="groups" method="post" action="<?php echo makeUrlNS('Special', 'Forum/Admin_groups', 'action=foo', true); ?>">
- <div class="inform">
- <fieldset>
- <legend>Add new group</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">Base new group on<div><input type="submit" name="add_group" value=" Add " tabindex="2" /></div></th>
- <td>
- <select id="base_group" name="base_group" tabindex="1">
-<?php
-
-$result = $pun_db->query('SELECT g_id, g_title FROM '.$pun_db->prefix.'groups WHERE g_id>'.PUN_GUEST.' ORDER BY g_title') or error('Unable to fetch user group list', __FILE__, __LINE__, $pun_db->error());
-
-while ($cur_group = $pun_db->fetch_assoc($result))
-{
- if ($cur_group['g_id'] == $pun_config['o_default_user_group'])
- echo "\t\t\t\t\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'" selected="selected">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";
- else
- echo "\t\t\t\t\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";
-}
-
-?>
- </select>
- <span>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.</span>
- </td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend>Set default group</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">Default group<div><input type="submit" name="set_default_group" value=" Save " tabindex="4" /></div></th>
- <td>
- <select id="default_group" name="default_group" tabindex="3">
-<?php
-
-$result = $pun_db->query('SELECT g_id, g_title FROM '.$pun_db->prefix.'groups WHERE g_id>'.PUN_GUEST.' ORDER BY g_title') or error('Unable to fetch user group list', __FILE__, __LINE__, $pun_db->error());
-
-while ($cur_group = $pun_db->fetch_assoc($result))
-{
- if ($cur_group['g_id'] == $pun_config['o_default_user_group'])
- echo "\t\t\t\t\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'" selected="selected">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";
- else
- echo "\t\t\t\t\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";
-}
-
-?>
- </select>
- <span>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.</span>
- </td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
- </form>
- </div>
-
- <h2 class="block2"><span>Existing groups</span></h2>
- <div class="box">
- <div class="fakeform">
- <div class="inform">
- <fieldset>
- <legend>Edit/remove groups</legend>
- <div class="infldset">
- <p>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 <em>edit posts</em> permission for guests). Administrators always have full permissions.</p>
- <table cellspacing="0">
-<?php
-
-$result = $pun_db->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".'<tr><th scope="row"><a href="admin_groups.php?edit_group='.$cur_group['g_id'].'">Edit</a>'.(($cur_group['g_id'] > PUN_MEMBER) ? ' - <a href="admin_groups.php?del_group='.$cur_group['g_id'].'">Remove</a>' : '').'</th><td>'.pun_htmlspecialchars($cur_group['g_title']).'</td></tr>'."\n";
-
-?>
- </table>
- </div>
- </fieldset>
- </div>
- </div>
- </div>
- </div>
- <div class="clearer"></div>
-</div>
-<?php
-
-require PUN_ROOT.'footer.php';
--- a/punbb/admin_index.php Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,208 +0,0 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// Tell header.php to use the admin template
-define('PUN_ADMIN_CONSOLE', 1);
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-require PUN_ROOT.'include/common_admin.php';
-
-
-if ($pun_user['g_id'] < PUN_MOD)
- message($lang_common['No permission']);
-
-
-$action = isset($_GET['action']) ? $_GET['action'] : null;
-
-// Check for upgrade
-if ($action == 'check_upgrade')
-{
- if (!ini_get('allow_url_fopen'))
- message('Unable to check for upgrade since \'allow_url_fopen\' is disabled on this system.');
-
- $fp = @fopen('http://www.punbb.org/latest_version', 'r');
- $latest_version = trim(@fread($fp, 16));
- @fclose($fp);
-
- if ($latest_version == '')
- message('Check for upgrade failed for unknown reasons.');
-
- $cur_version = str_replace(array('.', 'dev', 'beta', ' '), '', strtolower($pun_config['o_cur_version']));
- $cur_version = (strlen($cur_version) == 2) ? intval($cur_version) * 10 : intval($cur_version);
-
- $latest_version = str_replace('.', '', strtolower($latest_version));
- $latest_version = (strlen($latest_version) == 2) ? intval($latest_version) * 10 : intval($latest_version);
-
- if ($cur_version >= $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 <a href="http://www.punbb.org/">PunBB.org</a>.');
-}
-
-
-// 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 = '<a href="http://turck-mmcache.sourceforge.net/">Turck MMCache</a>';
-else if (isset($_PHPA))
- $php_accelerator = '<a href="http://www.php-accelerator.co.uk/">ionCube PHP Accelerator</a>';
-else
- $php_accelerator = 'N/A';
-
-
-$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin';
-require PUN_ROOT.'header.php';
-
-generate_admin_menu('index');
-
-?>
- <div class="block">
- <h2>Forum administration</h2>
- <div id="adintro" class="box">
- <div class="inbox">
- <p>
- 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<br /><br />
- - organize categories and forums.<br />
- - set forum-wide options and preferences.<br />
- - control permissions for users and guests.<br />
- - view IP statistics for users.<br />
- - ban users.<br />
- - censor words.<br />
- - set up user ranks.<br />
- - prune old posts.<br />
- - handle post reports.
- </p>
- </div>
- </div>
-
- <h2 class="block2"><span>Statistics</span></h2>
- <div id="adstats" class="box">
- <div class="inbox">
- <dl>
- <dt>PunBB version</dt>
- <dd>
- PunBB <?php echo $pun_config['o_cur_version'] ?> - <a href="admin_index.php?action=check_upgrade">Check for upgrade</a><br />
- © Copyright 2002, 2003, 2004, 2005 Rickard Andersson
- </dd>
- <dt>Server load</dt>
- <dd>
- <?php echo $server_load ?> (<?php echo $num_online ?> users online)
- </dd>
-<?php if ($pun_user['g_id'] == PUN_ADMIN): ?> <dt>Environment</dt>
- <dd>
- Operating system: <?php echo PHP_OS ?><br />
- PHP: <?php echo phpversion() ?> - <a href="admin_index.php?action=phpinfo">Show info</a><br />
- Accelerator: <?php echo $php_accelerator."\n" ?>
- </dd>
- <dt>Database</dt>
- <dd>
- <?php echo $db_version."\n" ?>
-<?php if (isset($total_records) && isset($total_size)): ?> <br />Rows: <?php echo $total_records."\n" ?>
- <br />Size: <?php echo $total_size."\n" ?>
-<?php endif; endif; ?> </dd>
- </dl>
- </div>
- </div>
- </div>
- <div class="clearer"></div>
-</div>
-<?php
-
-require PUN_ROOT.'footer.php';
--- a/punbb/admin_loader.php Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// Tell header.php to use the admin template
-define('PUN_ADMIN_CONSOLE', 1);
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-require PUN_ROOT.'include/common_admin.php';
-
-
-if ($pun_user['g_id'] < PUN_MOD)
- message($lang_common['No permission']);
-
-
-// The plugin to load should be supplied via GET
-$plugin = isset($_GET['plugin']) ? $_GET['plugin'] : '';
-if (!@preg_match('/^AM?P_(\w*?)\.php$/i', $plugin))
- message($lang_common['Bad request']);
-
-// AP_ == Admins only, AMP_ == admins and moderators
-$prefix = substr($plugin, 0, strpos($plugin, '_'));
-if ($pun_user['g_id'] == PUN_MOD && $prefix == 'AP')
- message($lang_common['No permission']);
-
-// Make sure the file actually exists
-if (!file_exists(PUN_ROOT.'plugins/'.$plugin))
- message('There is no plugin called \''.$plugin.'\' in the plugin directory.');
-
-// Construct REQUEST_URI if it isn't set
-if (!isset($_SERVER['REQUEST_URI']))
- $_SERVER['REQUEST_URI'] = (isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : '').'?'.(isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '');
-
-$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / '.$plugin;
-require PUN_ROOT.'header.php';
-
-// Attempt to load the plugin. We don't use @ here to supress error messages,
-// because if we did and a parse error occurred in the plugin, we would only
-// get the "blank page of death".
-include PUN_ROOT.'plugins/'.$plugin;
-if (!defined('PUN_PLUGIN_LOADED'))
- message('Loading of the plugin \''.$plugin.'\' failed.');
-
-// Output the clearer div
-?>
- <div class="clearer"></div>
-</div>
-<?php
-
-require PUN_ROOT.'footer.php';
--- a/punbb/admin_maintenance.php Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,189 +0,0 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// Tell header.php to use the admin template
-define('PUN_ADMIN_CONSOLE', 1);
-// Tell common.php that we don't want output buffering
-define('PUN_DISABLE_BUFFERING', 1);
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-require PUN_ROOT.'include/common_admin.php';
-
-
-if ($pun_user['g_id'] < PUN_ADMIN)
- message($lang_common['No permission']);
-
-
-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']);
-
- @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']))
- {
- // This is the only potentially "dangerous" thing we can do here, so we check the referer
- confirm_referrer('admin_maintenance.php');
-
- $truncate_sql = ($db_type != 'sqlite' && $db_type != 'pgsql') ? 'TRUNCATE TABLE ' : 'DELETE FROM ';
- $pun_db->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;
-
-?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title><?php echo pun_htmlspecialchars($pun_config['o_board_title']) ?> / Rebuilding search index …</title>
-<style type="text/css">
-body {
- font: 10px Verdana, Arial, Helvetica, sans-serif;
- color: #333333;
- background-color: #FFFFFF
-}
-</style>
-</head>
-<body>
-
-Rebuilding index … This might be a good time to put on some coffee :-)<br /><br />
-
-<?php
-
- require PUN_ROOT.'include/search_idx.php';
-
- // Fetch posts to process
- $result = $pun_db->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 <strong>'.$cur_post[1].'</strong> in topic <strong>'.$cur_post[0].'</strong><br />'."\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('<script type="text/javascript">window.location="admin_maintenance.php'.$query_str.'"</script><br />JavaScript redirect unsuccessful. Click <a href="admin_maintenance.php'.$query_str.'">here</a> 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');
-
-?>
- <div class="blockform">
- <h2><span>Forum Maintenance</span></h2>
- <div class="box">
- <form method="get" action="admin_maintenance.php">
- <div class="inform">
- <fieldset>
- <legend>Rebuild search index</legend>
- <div class="infldset">
- <p>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. <strong>Rebuilding the search index can take a long time and will increase server load during the rebuild process!</strong></p>
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">Topics per cycle</th>
- <td>
- <input type="text" name="i_per_page" size="7" maxlength="7" value="100" tabindex="1" />
- <span>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.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Starting Topic ID</th>
- <td>
- <input type="text" name="i_start_at" size="7" maxlength="7" value="<?php echo (isset($first_id)) ? $first_id : 0 ?>" tabindex="2" />
- <span>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.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Empty index</th>
- <td class="inputadmin">
- <span><input type="checkbox" name="i_empty_index" value="1" tabindex="3" checked="checked" /> Select this if you want the search index to be emptied before rebuilding (see below).</span>
- </td>
- </tr>
- </table>
- <p class="topspace">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).</p>
- <div class="fsetsubmit"><input type="submit" name="rebuild_index" value="Rebuild index" tabindex="4" /></div>
- </div>
- </fieldset>
- </div>
- </form>
- </div>
- </div>
- <div class="clearer"></div>
-</div>
-<?php
-
-require PUN_ROOT.'footer.php';
--- a/punbb/admin_options.php Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,706 +0,0 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// Tell header.php to use the admin template
-define('PUN_ADMIN_CONSOLE', 1);
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-require PUN_ROOT.'include/common_admin.php';
-
-
-if ($pun_user['g_id'] < PUN_ADMIN)
- message($lang_common['No permission']);
-
-
-if (isset($_POST['form_sent']))
-{
- // Custom referrer check (so we can output a custom error message)
- // if (!preg_match('#^'.preg_quote(str_replace('www.', '', $pun_config['o_base_url']).'/admin_options.php', '#').'#i', str_replace('www.', '', (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''))))
- // message('Bad HTTP_REFERER. If you have moved these forums from one location to another or switched domains, you need to update the Base URL manually in the database (look for o_base_url in the config table) and then clear the cache by deleting all .php files in the /cache directory.');
- confirm_referrer('admin_options.php');
-
- $form = array_map('trim', $_POST['form']);
-
- if ($form['board_title'] == '')
- message('You must enter a board title.');
-
- // Clean default_lang
- $form['default_lang'] = preg_replace('#[\.\\\/]#', '', $form['default_lang']);
-
- require PUN_ROOT.'include/email.php';
-
- $form['admin_email'] = strtolower($form['admin_email']);
- if (!is_valid_email($form['admin_email']))
- message('The admin e-mail address you entered is invalid.');
-
- $form['webmaster_email'] = strtolower($form['webmaster_email']);
- if (!is_valid_email($form['webmaster_email']))
- message('The webmaster e-mail address you entered is invalid.');
-
- if ($form['mailing_list'] != '')
- $form['mailing_list'] = strtolower(preg_replace('/[\s]/', '', $form['mailing_list']));
-
- // Make sure base_url doesn't end with a slash
- if (substr($form['base_url'], -1) == '/')
- $form['base_url'] = substr($form['base_url'], 0, -1);
-
- // 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);
-
- if ($form['additional_navlinks'] != '')
- $form['additional_navlinks'] = trim(pun_linebreaks($form['additional_navlinks']));
-
- if ($form['announcement_message'] != '')
- $form['announcement_message'] = pun_linebreaks($form['announcement_message']);
- else
- {
- $form['announcement_message'] = 'Enter your announcement here.';
-
- if ($form['announcement'] == '1')
- $form['announcement'] = '0';
- }
-
- if ($form['rules_message'] != '')
- $form['rules_message'] = pun_linebreaks($form['rules_message']);
- else
- {
- $form['rules_message'] = 'Enter your rules here.';
-
- if ($form['rules'] == '1')
- $form['rules'] = '0';
- }
-
- if ($form['maintenance_message'] != '')
- $form['maintenance_message'] = pun_linebreaks($form['maintenance_message']);
- else
- {
- $form['maintenance_message'] = 'The forums are temporarily down for maintenance. Please try again in a few minutes.\n\n/Administrator';
-
- if ($form['maintenance'] == '1')
- $form['maintenance'] = '0';
- }
-
- $form['timeout_visit'] = intval($form['timeout_visit']);
- $form['timeout_online'] = intval($form['timeout_online']);
- $form['redirect_delay'] = intval($form['redirect_delay']);
- $form['topic_review'] = intval($form['topic_review']);
- $form['disp_topics_default'] = intval($form['disp_topics_default']);
- $form['disp_posts_default'] = intval($form['disp_posts_default']);
- $form['indent_num_spaces'] = intval($form['indent_num_spaces']);
- $form['avatars_width'] = intval($form['avatars_width']);
- $form['avatars_height'] = intval($form['avatars_height']);
- $form['avatars_size'] = intval($form['avatars_size']);
-
- if ($form['timeout_online'] >= $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');
-
-?>
- <div class="blockform">
- <h2><span>Options</span></h2>
- <div class="box">
- <form method="post" action="<?php echo makeUrlNS('Special', 'Forum/Admin_Options', 'action=foo', true); ?>">
- <p class="submittop"><input type="submit" name="save" value="Save changes" /></p>
- <div class="inform">
- <input type="hidden" name="form_sent" value="1" />
- <fieldset>
- <legend>Essentials</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">Board title</th>
- <td>
- <input type="text" name="form[board_title]" size="50" maxlength="255" value="<?php echo pun_htmlspecialchars($pun_config['o_board_title']) ?>" />
- <span>The title of this bulletin board (shown at the top of every page). This field may <strong>not</strong> contain HTML.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Board description</th>
- <td>
- <input type="text" name="form[board_desc]" size="50" maxlength="255" value="<?php echo pun_htmlspecialchars($pun_config['o_board_desc']) ?>" />
- <span>A short description of this bulletin board (shown at the top of every page). This field may contain HTML.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Base URL</th>
- <td>
- <input type="text" name="form[base_url]" size="50" maxlength="100" value="<?php echo $pun_config['o_base_url'] ?>" />
- <span>The complete URL of the forum without trailing slash (i.e. http://www.mydomain.com/forums). This <strong>must</strong> be correct in order for all admin and moderator features to work. If you get "Bad referer" errors, it's probably incorrect.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Server timezone</th>
- <td>
- <select name="form[server_timezone]">
- <option value="-12"<?php if ($pun_config['o_server_timezone'] == -12 ) echo ' selected="selected"' ?>>-12</option>
- <option value="-11"<?php if ($pun_config['o_server_timezone'] == -11) echo ' selected="selected"' ?>>-11</option>
- <option value="-10"<?php if ($pun_config['o_server_timezone'] == -10) echo ' selected="selected"' ?>>-10</option>
- <option value="-9.5"<?php if ($pun_config['o_server_timezone'] == -9.5) echo ' selected="selected"' ?>>-09.5</option>
- <option value="-9"<?php if ($pun_config['o_server_timezone'] == -9 ) echo ' selected="selected"' ?>>-09</option>
- <option value="-8.5"<?php if ($pun_config['o_server_timezone'] == -8.5) echo ' selected="selected"' ?>>-08.5</option>
- <option value="-8"<?php if ($pun_config['o_server_timezone'] == -8 ) echo ' selected="selected"' ?>>-08 PST</option>
- <option value="-7"<?php if ($pun_config['o_server_timezone'] == -7 ) echo ' selected="selected"' ?>>-07 MST</option>
- <option value="-6"<?php if ($pun_config['o_server_timezone'] == -6 ) echo ' selected="selected"' ?>>-06 CST</option>
- <option value="-5"<?php if ($pun_config['o_server_timezone'] == -5 ) echo ' selected="selected"' ?>>-05 EST</option>
- <option value="-4"<?php if ($pun_config['o_server_timezone'] == -4 ) echo ' selected="selected"' ?>>-04 AST</option>
- <option value="-3.5"<?php if ($pun_config['o_server_timezone'] == -3.5) echo ' selected="selected"' ?>>-03.5</option>
- <option value="-3"<?php if ($pun_config['o_server_timezone'] == -3 ) echo ' selected="selected"' ?>>-03 ADT</option>
- <option value="-2"<?php if ($pun_config['o_server_timezone'] == -2 ) echo ' selected="selected"' ?>>-02</option>
- <option value="-1"<?php if ($pun_config['o_server_timezone'] == -1) echo ' selected="selected"' ?>>-01</option>
- <option value="0"<?php if ($pun_config['o_server_timezone'] == 0) echo ' selected="selected"' ?>>00 GMT</option>
- <option value="1"<?php if ($pun_config['o_server_timezone'] == 1) echo ' selected="selected"' ?>>+01 CET</option>
- <option value="2"<?php if ($pun_config['o_server_timezone'] == 2 ) echo ' selected="selected"' ?>>+02</option>
- <option value="3"<?php if ($pun_config['o_server_timezone'] == 3 ) echo ' selected="selected"' ?>>+03</option>
- <option value="3.5"<?php if ($pun_config['o_server_timezone'] == 3.5) echo ' selected="selected"' ?>>+03.5</option>
- <option value="4"<?php if ($pun_config['o_server_timezone'] == 4 ) echo ' selected="selected"' ?>>+04</option>
- <option value="4.5"<?php if ($pun_config['o_server_timezone'] == 4.5) echo ' selected="selected"' ?>>+04.5</option>
- <option value="5"<?php if ($pun_config['o_server_timezone'] == 5 ) echo ' selected="selected"' ?>>+05</option>
- <option value="5.5"<?php if ($pun_config['o_server_timezone'] == 5.5) echo ' selected="selected"' ?>>+05.5</option>
- <option value="6"<?php if ($pun_config['o_server_timezone'] == 6 ) echo ' selected="selected"' ?>>+06</option>
- <option value="6.5"<?php if ($pun_config['o_server_timezone'] == 6.5) echo ' selected="selected"' ?>>+06.5</option>
- <option value="7"<?php if ($pun_config['o_server_timezone'] == 7 ) echo ' selected="selected"' ?>>+07</option>
- <option value="8"<?php if ($pun_config['o_server_timezone'] == 8 ) echo ' selected="selected"' ?>>+08</option>
- <option value="9"<?php if ($pun_config['o_server_timezone'] == 9 ) echo ' selected="selected"' ?>>+09</option>
- <option value="9.5"<?php if ($pun_config['o_server_timezone'] == 9.5) echo ' selected="selected"' ?>>+09.5</option>
- <option value="10"<?php if ($pun_config['o_server_timezone'] == 10) echo ' selected="selected"' ?>>+10</option>
- <option value="10.5"<?php if ($pun_config['o_server_timezone'] == 10.5) echo ' selected="selected"' ?>>+10.5</option>
- <option value="11"<?php if ($pun_config['o_server_timezone'] == 11) echo ' selected="selected"' ?>>+11</option>
- <option value="11.5"<?php if ($pun_config['o_server_timezone'] == 11.5) echo ' selected="selected"' ?>>+11.5</option>
- <option value="12"<?php if ($pun_config['o_server_timezone'] == 12 ) echo ' selected="selected"' ?>>+12</option>
- <option value="13"<?php if ($pun_config['o_server_timezone'] == 13 ) echo ' selected="selected"' ?>>+13</option>
- </select>
- <span>The timezone of the server where PunBB is installed.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Default language</th>
- <td>
- <select name="form[default_lang]">
-<?php
-
- $languages = array();
- $d = dir(PUN_ROOT.'lang');
- while (($entry = $d->read()) !== false)
- {
- if ($entry != '.' && $entry != '..' && is_dir(PUN_ROOT.'lang/'.$entry) && file_exists(PUN_ROOT.'lang/'.$entry.'/common.php'))
- $languages[] = $entry;
- }
- $d->close();
-
- @natsort($languages);
-
- while (list(, $temp) = @each($languages))
- {
- if ($pun_config['o_default_lang'] == $temp)
- echo "\t\t\t\t\t\t\t\t\t\t\t".'<option value="'.$temp.'" selected="selected">'.$temp.'</option>'."\n";
- else
- echo "\t\t\t\t\t\t\t\t\t\t\t".'<option value="'.$temp.'">'.$temp.'</option>'."\n";
- }
-
-?>
- </select>
- <span>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.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Default style</th>
- <td>
- <select name="form[default_style]">
-<?php
-
- $styles = array();
- $d = dir(PUN_ROOT.'style');
- while (($entry = $d->read()) !== false)
- {
- if (substr($entry, strlen($entry)-4) == '.css')
- $styles[] = substr($entry, 0, strlen($entry)-4);
- }
- $d->close();
-
- @natsort($styles);
-
- while (list(, $temp) = @each($styles))
- {
- if ($pun_config['o_default_style'] == $temp)
- echo "\t\t\t\t\t\t\t\t\t".'<option value="'.$temp.'" selected="selected">'.str_replace('_', ' ', $temp).'</option>'."\n";
- else
- echo "\t\t\t\t\t\t\t\t\t".'<option value="'.$temp.'">'.str_replace('_', ' ', $temp).'</option>'."\n";
- }
-
-?>
- </select>
- <span>This is the default style used for guests and users who haven't changed from the default in their profile.</span></td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend>Time and timeouts</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">Time format</th>
- <td>
- <input type="text" name="form[time_format]" size="25" maxlength="25" value="<?php echo pun_htmlspecialchars($pun_config['o_time_format']) ?>" />
- <span>[Current format: <?php echo date($pun_config['o_time_format']) ?>] See <a href="http://www.php.net/manual/en/function.date.php">here</a> for formatting options.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Date format</th>
- <td>
- <input type="text" name="form[date_format]" size="25" maxlength="25" value="<?php echo pun_htmlspecialchars($pun_config['o_date_format']) ?>" />
- <span>[Current format: <?php echo date($pun_config['o_date_format']) ?>] See <a href="http://www.php.net/manual/en/function.date.php">here</a> for formatting options.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Visit timeout</th>
- <td>
- <input type="text" name="form[timeout_visit]" size="5" maxlength="5" value="<?php echo $pun_config['o_timeout_visit'] ?>" />
- <span>Number of seconds a user must be idle before his/hers last visit data is updated (primarily affects new message indicators).</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Online timeout</th>
- <td>
- <input type="text" name="form[timeout_online]" size="5" maxlength="5" value="<?php echo $pun_config['o_timeout_online'] ?>" />
- <span>Number of seconds a user must be idle before being removed from the online users list.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Redirect time</th>
- <td>
- <input type="text" name="form[redirect_delay]" size="3" maxlength="3" value="<?php echo $pun_config['o_redirect_delay'] ?>" />
- <span>Number of seconds to wait when redirecting. If set to 0, no redirect page will be displayed (not recommended).</span>
- </td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend>Display</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">Version number</th>
- <td>
- <input type="radio" name="form[show_version]" value="1"<?php if ($pun_config['o_show_version'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[show_version]" value="0"<?php if ($pun_config['o_show_version'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>Show version number in footer.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">User info in posts</th>
- <td>
- <input type="radio" name="form[show_user_info]" value="1"<?php if ($pun_config['o_show_user_info'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[show_user_info]" value="0"<?php if ($pun_config['o_show_user_info'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>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).</span>
- </td>
- </tr>
- <tr>
- <th scope="row">User post count</th>
- <td>
- <input type="radio" name="form[show_post_count]" value="1"<?php if ($pun_config['o_show_post_count'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[show_post_count]" value="0"<?php if ($pun_config['o_show_post_count'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>Show the number of posts a user has made (affects topic view, profile and userlist).</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Smilies</th>
- <td>
- <input type="radio" name="form[smilies]" value="1"<?php if ($pun_config['o_smilies'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[smilies]" value="0"<?php if ($pun_config['o_smilies'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>Convert smilies to small icons.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Smilies in signatures</th>
- <td>
- <input type="radio" name="form[smilies_sig]" value="1"<?php if ($pun_config['o_smilies_sig'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[smilies_sig]" value="0"<?php if ($pun_config['o_smilies_sig'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>Convert smilies to small icons in user signatures.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Make clickable links</th>
- <td>
- <input type="radio" name="form[make_links]" value="1"<?php if ($pun_config['o_make_links'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[make_links]" value="0"<?php if ($pun_config['o_make_links'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>When enabled, PunBB will automatically detect any URL's in posts and make them clickable hyperlinks.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Topic review</th>
- <td>
- <input type="text" name="form[topic_review]" size="3" maxlength="3" value="<?php echo $pun_config['o_topic_review'] ?>" />
- <span>Maximum number of posts to display when posting (newest first). 0 to disable.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Topics per page default</th>
- <td>
- <input type="text" name="form[disp_topics_default]" size="3" maxlength="3" value="<?php echo $pun_config['o_disp_topics_default'] ?>" />
- <span>The default number of topics to display per page in a forum. Users can personalize this setting.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Posts per page default</th>
- <td>
- <input type="text" name="form[disp_posts_default]" size="3" maxlength="3" value="<?php echo $pun_config['o_disp_posts_default'] ?>" />
- <span>The default number of posts to display per page in a topic. Users can personalize this setting.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Indent size</th>
- <td>
- <input type="text" name="form[indent_num_spaces]" size="3" maxlength="3" value="<?php echo $pun_config['o_indent_num_spaces'] ?>" />
- <span>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.</span>
- </td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend>Features</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">Quick post</th>
- <td>
- <input type="radio" name="form[quickpost]" value="1"<?php if ($pun_config['o_quickpost'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[quickpost]" value="0"<?php if ($pun_config['o_quickpost'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>When enabled, PunBB will add a quick post form at the bottom of topics. This way users can post directly from the topic view.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Users online</th>
- <td>
- <input type="radio" name="form[users_online]" value="1"<?php if ($pun_config['o_users_online'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[users_online]" value="0"<?php if ($pun_config['o_users_online'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>Display info on the index page about guests and registered users currently browsing the forums.</span>
- </td>
- </tr>
- <tr>
- <th scope="row"><a name="censoring">Censor words</a></th>
- <td>
- <input type="radio" name="form[censoring]" value="1"<?php if ($pun_config['o_censoring'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[censoring]" value="0"<?php if ($pun_config['o_censoring'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>Enable this to censor specific words in the forum. See <a href="admin_censoring.php">Censoring</a> for more info.</span>
- </td>
- </tr>
- <tr>
- <th scope="row"><a name="ranks">User ranks</a></th>
- <td>
- <input type="radio" name="form[ranks]" value="1"<?php if ($pun_config['o_ranks'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[ranks]" value="0"<?php if ($pun_config['o_ranks'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>Enable this to use user ranks. See <a href="admin_ranks.php">Ranks</a> for more info.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">User has posted earlier</th>
- <td>
- <input type="radio" name="form[show_dot]" value="1"<?php if ($pun_config['o_show_dot'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[show_dot]" value="0"<?php if ($pun_config['o_show_dot'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>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.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Quick jump</th>
- <td>
- <input type="radio" name="form[quickjump]" value="1"<?php if ($pun_config['o_quickjump'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[quickjump]" value="0"<?php if ($pun_config['o_quickjump'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>Enable the quick jump (jump to forum) drop list.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">GZip output</th>
- <td>
- <input type="radio" name="form[gzip]" value="1"<?php if ($pun_config['o_gzip'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[gzip]" value="0"<?php if ($pun_config['o_gzip'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>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.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Search all forums</th>
- <td>
- <input type="radio" name="form[search_all_forums]" value="1"<?php if ($pun_config['o_search_all_forums'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[search_all_forums]" value="0"<?php if ($pun_config['o_search_all_forums'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>When disabled, searches will only be allowed in one forum at a time. Disable if server load is high due to excessive searching.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Additional menu items</th>
- <td>
- <textarea name="form[additional_navlinks]" rows="3" cols="55"><?php echo pun_htmlspecialchars($pun_config['o_additional_navlinks']) ?></textarea>
- <span>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.</span>
- </td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend>Reports</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">Report method</th>
- <td>
- <input type="radio" name="form[report_method]" value="0"<?php if ($pun_config['o_report_method'] == '0') echo ' checked="checked"' ?> /> Internal <input type="radio" name="form[report_method]" value="1"<?php if ($pun_config['o_report_method'] == '1') echo ' checked="checked"' ?> /> E-mail <input type="radio" name="form[report_method]" value="2"<?php if ($pun_config['o_report_method'] == '2') echo ' checked="checked"' ?> /> Both
- <span>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.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Report new registrations</th>
- <td>
- <input type="radio" name="form[regs_report]" value="1"<?php if ($pun_config['o_regs_report'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[regs_report]" value="0"<?php if ($pun_config['o_regs_report'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>If enabled, PunBB will notify users on the mailing list (see below) when a new user registers in the forums.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Mailing list</th>
- <td>
- <textarea name="form[mailing_list]" rows="5" cols="55"><?php echo pun_htmlspecialchars($pun_config['o_mailing_list']) ?></textarea>
- <span>A comma separated list of subscribers. The people on this list are the recipients of reports.</span>
- </td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend>Avatars</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">Use avatars</th>
- <td>
- <input type="radio" name="form[avatars]" value="1"<?php if ($pun_config['o_avatars'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[avatars]" value="0"<?php if ($pun_config['o_avatars'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>When enabled, users will be able to upload an avatar which will be displayed under their title/rank.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Upload directory</th>
- <td>
- <input type="text" name="form[avatars_dir]" size="35" maxlength="50" value="<?php echo pun_htmlspecialchars($pun_config['o_avatars_dir']) ?>" />
- <span>The upload directory for avatars (relative to the PunBB root directory). PHP must have write permissions to this directory.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Max width</th>
- <td>
- <input type="text" name="form[avatars_width]" size="5" maxlength="5" value="<?php echo $pun_config['o_avatars_width'] ?>" />
- <span>The maximum allowed width of avatars in pixels (60 is recommended).</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Max height</th>
- <td>
- <input type="text" name="form[avatars_height]" size="5" maxlength="5" value="<?php echo $pun_config['o_avatars_height'] ?>" />
- <span>The maximum allowed height of avatars in pixels (60 is recommended).</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Max size</th>
- <td>
- <input type="text" name="form[avatars_size]" size="6" maxlength="6" value="<?php echo $pun_config['o_avatars_size'] ?>" />
- <span>The maximum allowed size of avatars in bytes (10240 is recommended).</span>
- </td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend>E-mail</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">Admin e-mail</th>
- <td>
- <input type="text" name="form[admin_email]" size="50" maxlength="50" value="<?php echo $pun_config['o_admin_email'] ?>" />
- <span>The e-mail address of the forum administrator.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Webmaster e-mail</th>
- <td>
- <input type="text" name="form[webmaster_email]" size="50" maxlength="50" value="<?php echo $pun_config['o_webmaster_email'] ?>" />
- <span>This is the address that all e-mails sent by the forum will be addressed from.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Subscriptions</th>
- <td>
- <input type="radio" name="form[subscriptions]" value="1"<?php if ($pun_config['o_subscriptions'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[subscriptions]" value="0"<?php if ($pun_config['o_subscriptions'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>Enable users to subscribe to topics (recieve e-mail when someone replies).</span>
- </td>
- </tr>
- <tr>
- <th scope="row">SMTP server address</th>
- <td>
- <input type="text" name="form[smtp_host]" size="30" maxlength="100" value="<?php echo pun_htmlspecialchars($pun_config['o_smtp_host']) ?>" />
- <span>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.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">SMTP username</th>
- <td>
- <input type="text" name="form[smtp_user]" size="25" maxlength="50" value="<?php echo pun_htmlspecialchars($pun_config['o_smtp_user']) ?>" />
- <span>Username for SMTP server. Only enter a username if it is required by the SMTP server (most servers <strong>do not</strong> require authentication).</span>
- </td>
- </tr>
- <tr>
- <th scope="row">SMTP password</th>
- <td>
- <input type="text" name="form[smtp_pass]" size="25" maxlength="50" value="<?php echo pun_htmlspecialchars($pun_config['o_smtp_pass']) ?>" />
- <span>Password for SMTP server. Only enter a password if it is required by the SMTP server (most servers <strong>do not</strong> require authentication).</span>
- </td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend>Registration</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">Allow new registrations</th>
- <td>
- <input type="radio" name="form[regs_allow]" value="1"<?php if ($pun_config['o_regs_allow'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[regs_allow]" value="0"<?php if ($pun_config['o_regs_allow'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>Controls whether this forum accepts new registrations. Disable only under special circumstances.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Verify registrations</th>
- <td>
- <input type="radio" name="form[regs_verify]" value="1"<?php if ($pun_config['o_regs_verify'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[regs_verify]" value="0"<?php if ($pun_config['o_regs_verify'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>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.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Use forum rules</th>
- <td>
- <input type="radio" name="form[rules]" value="1"<?php if ($pun_config['o_rules'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[rules]" value="0"<?php if ($pun_config['o_rules'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>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.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Rules</th>
- <td>
- <textarea name="form[rules_message]" rows="10" cols="55"><?php echo pun_htmlspecialchars($pun_config['o_rules_message']) ?></textarea>
- <span>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.</span>
- </td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend>Announcement</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">Display announcement</th>
- <td>
- <input type="radio" name="form[announcement]" value="1"<?php if ($pun_config['o_announcement'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[announcement]" value="0"<?php if ($pun_config['o_announcement'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>Enable this to display the below message in the forums.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Announcement message</th>
- <td>
- <textarea name="form[announcement_message]" rows="5" cols="55"><?php echo pun_htmlspecialchars($pun_config['o_announcement_message']) ?></textarea>
- <span>This text will not be parsed like regular posts and thus may contain HTML.</span>
- </td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend>Maintenance</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row"><a name="maintenance">Maintenance mode</a></th>
- <td>
- <input type="radio" name="form[maintenance]" value="1"<?php if ($pun_config['o_maintenance'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[maintenance]" value="0"<?php if ($pun_config['o_maintenance'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>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.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Maintenance message</th>
- <td>
- <textarea name="form[maintenance_message]" rows="5" cols="55"><?php echo pun_htmlspecialchars($pun_config['o_maintenance_message']) ?></textarea>
- <span>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.</span>
- </td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
- <p class="submitend"><input type="submit" name="save" value="Save changes" /></p>
- </form>
- </div>
- </div>
- <div class="clearer"></div>
-</div>
-<?php
-
-require PUN_ROOT.'footer.php';
--- a/punbb/admin_permissions.php Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,229 +0,0 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// Tell header.php to use the admin template
-define('PUN_ADMIN_CONSOLE', 1);
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-require PUN_ROOT.'include/common_admin.php';
-
-
-if ($pun_user['g_id'] < PUN_ADMIN)
- message($lang_common['No permission']);
-
-
-if (isset($_POST['form_sent']))
-{
- confirm_referrer('admin_permissions.php');
-
- $form = array_map('intval', $_POST['form']);
-
- while (list($key, $input) = @each($form))
- {
- // Only update values that have changed
- if (array_key_exists('p_'.$key, $pun_config) && $pun_config['p_'.$key] != $input)
- $pun_db->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');
-
-?>
- <div class="blockform">
- <h2><span>Permissions</span></h2>
- <div class="box">
- <form method="post" action="admin_permissions.php">
- <p class="submittop"><input type="submit" name="save" value="Save changes" /></p>
- <div class="inform">
- <input type="hidden" name="form_sent" value="1" />
- <fieldset>
- <legend>Posting</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">BBCode</th>
- <td>
- <input type="radio" name="form[message_bbcode]" value="1"<?php if ($pun_config['p_message_bbcode'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[message_bbcode]" value="0"<?php if ($pun_config['p_message_bbcode'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>Allow BBCode in posts (recommended).</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Image tag</th>
- <td>
- <input type="radio" name="form[message_img_tag]" value="1"<?php if ($pun_config['p_message_img_tag'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[message_img_tag]" value="0"<?php if ($pun_config['p_message_img_tag'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>Allow the BBCode [img][/img] tag in posts.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">All caps message</th>
- <td>
- <input type="radio" name="form[message_all_caps]" value="1"<?php if ($pun_config['p_message_all_caps'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[message_all_caps]" value="0"<?php if ($pun_config['p_message_all_caps'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>Allow a message to contain only capital letters.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">All caps subject</th>
- <td>
- <input type="radio" name="form[subject_all_caps]" value="1"<?php if ($pun_config['p_subject_all_caps'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[subject_all_caps]" value="0"<?php if ($pun_config['p_subject_all_caps'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>Allow a subject to contain only capital letters.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Require guest e-mail</th>
- <td>
- <input type="radio" name="form[force_guest_email]" value="1"<?php if ($pun_config['p_force_guest_email'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[force_guest_email]" value="0"<?php if ($pun_config['p_force_guest_email'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>Require guests to supply an e-mail address when posting.</span>
- </td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend>Signatures</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">BBCodes in signatures</th>
- <td>
- <input type="radio" name="form[sig_bbcode]" value="1"<?php if ($pun_config['p_sig_bbcode'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[sig_bbcode]" value="0"<?php if ($pun_config['p_sig_bbcode'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>Allow BBCodes in user signatures.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Image tag in signatures</th>
- <td>
- <input type="radio" name="form[sig_img_tag]" value="1"<?php if ($pun_config['p_sig_img_tag'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[sig_img_tag]" value="0"<?php if ($pun_config['p_sig_img_tag'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>Allow the BBCode [img][/img] tag in user signatures (not recommended).</span>
- </td>
- </tr>
- <tr>
- <th scope="row">All caps signature</th>
- <td>
- <input type="radio" name="form[sig_all_caps]" value="1"<?php if ($pun_config['p_sig_all_caps'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[sig_all_caps]" value="0"<?php if ($pun_config['p_sig_all_caps'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>Allow a signature to contain only capital letters.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Maximum signature length</th>
- <td>
- <input type="text" name="form[sig_length]" size="5" maxlength="5" value="<?php echo $pun_config['p_sig_length'] ?>" />
- <span>The maximum number of characters a user signature may contain.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Maximum signature lines</th>
- <td>
- <input type="text" name="form[sig_lines]" size="3" maxlength="3" value="<?php echo $pun_config['p_sig_lines'] ?>" />
- <span>The maximum number of lines a user signature may contain.</span>
- </td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend>Moderators</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">Edit user profiles</th>
- <td>
- <input type="radio" name="form[mod_edit_users]" value="1"<?php if ($pun_config['p_mod_edit_users'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[mod_edit_users]" value="0"<?php if ($pun_config['p_mod_edit_users'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>Allow moderators to edit user profiles.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Rename users</th>
- <td>
- <input type="radio" name="form[mod_rename_users]" value="1"<?php if ($pun_config['p_mod_rename_users'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[mod_rename_users]" value="0"<?php if ($pun_config['p_mod_rename_users'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>Allow moderators to rename users. Other moderators and administrators are excluded.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Change user passwords</th>
- <td>
- <input type="radio" name="form[mod_change_passwords]" value="1"<?php if ($pun_config['p_mod_change_passwords'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[mod_change_passwords]" value="0"<?php if ($pun_config['p_mod_change_passwords'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>Allow moderators to change user passwords. Other moderators and administrators are excluded.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Ban users</th>
- <td>
- <input type="radio" name="form[mod_ban_users]" value="1"<?php if ($pun_config['p_mod_ban_users'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[mod_ban_users]" value="0"<?php if ($pun_config['p_mod_ban_users'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>Allow moderators to ban users (and edit/remove current bans).</span>
- </td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend>Registration</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">Allow banned e-mail addresses</th>
- <td>
- <input type="radio" name="form[allow_banned_email]" value="1"<?php if ($pun_config['p_allow_banned_email'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[allow_banned_email]" value="0"<?php if ($pun_config['p_allow_banned_email'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>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).</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Allow duplicate e-mail addresses</th>
- <td>
- <input type="radio" name="form[allow_dupe_email]" value="1"<?php if ($pun_config['p_allow_dupe_email'] == '1') echo ' checked="checked"' ?> /> <strong>Yes</strong> <input type="radio" name="form[allow_dupe_email]" value="0"<?php if ($pun_config['p_allow_dupe_email'] == '0') echo ' checked="checked"' ?> /> <strong>No</strong>
- <span>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.</span>
- </td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
- <p class="submitend"><input type="submit" name="save" value="Save changes" /></p>
- </form>
- </div>
- </div>
- <div class="clearer"></div>
-</div>
-<?php
-
-require PUN_ROOT.'footer.php';
--- a/punbb/admin_prune.php Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,233 +0,0 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// Tell header.php to use the admin template
-define('PUN_ADMIN_CONSOLE', 1);
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-require PUN_ROOT.'include/common_admin.php';
-
-
-if ($pun_user['g_id'] < PUN_ADMIN)
- message($lang_common['No permission']);
-
-
-if (isset($_GET['action']) || isset($_POST['prune']) || isset($_POST['prune_comply']))
-{
- if (isset($_POST['prune_comply']))
- {
- confirm_referrer('admin_prune.php');
-
- $prune_from = $_POST['prune_from'];
- $prune_days = intval($_POST['prune_days']);
- $prune_date = ($prune_days) ? time() - ($prune_days*86400) : -1;
-
- @set_time_limit(0);
-
- if ($prune_from == 'all')
- {
- $result = $pun_db->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');
-
-?>
- <div class="blockform">
- <h2><span>Prune</span></h2>
- <div class="box">
- <form method="post" action="<?php echo makeUrlNS('Special', 'Forum/Admin_prune', 'action=foo', true); ?>">
- <div class="inform">
- <input type="hidden" name="prune_days" value="<?php echo $prune_days ?>" />
- <input type="hidden" name="prune_sticky" value="<?php echo $_POST['prune_sticky'] ?>" />
- <input type="hidden" name="prune_from" value="<?php echo $prune_from ?>" />
- <fieldset>
- <legend>Confirm prune posts</legend>
- <div class="infldset">
- <p>Are you sure that you want to prune all topics older than <?php echo $prune_days ?> days from <?php echo $forum ?>? (<?php echo $num_topics ?> topics)</p>
- <p>WARNING! Pruning posts deletes them permanently.</p>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="prune_comply" value="Prune" /><a href="javascript:history.go(-1)">Go back</a></p>
- </form>
- </div>
- </div>
- <div class="clearer"></div>
-</div>
-<?php
-
- require PUN_ROOT.'footer.php';
-}
-
-
-else
-{
- $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Prune';
- $required_fields = array('req_prune_days' => 'Days old');
- $focus_element = array('prune', 'req_prune_days');
- require PUN_ROOT.'header.php';
-
- generate_admin_menu('prune');
-
-?>
- <div class="blockform">
- <h2><span>Prune</span></h2>
- <div class="box">
- <form id="prune" method="post" action="<?php echo makeUrlNS('Special', 'Forum/Admin_prune', 'action=foo', true); ?>" onsubmit="return process_form(this)">
- <div class="inform">
- <input type="hidden" name="form_sent" value="1" />
- <fieldset>
- <legend>Prune old posts</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">Days old</th>
- <td>
- <input type="text" name="req_prune_days" size="3" maxlength="3" tabindex="1" />
- <span>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.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Prune sticky topics</th>
- <td>
- <input type="radio" name="prune_sticky" value="1" tabindex="2" checked="checked" /> <strong>Yes</strong> <input type="radio" name="prune_sticky" value="0" /> <strong>No</strong>
- <span>When enabled sticky topics will also be pruned.</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Prune from forum</th>
- <td>
- <select name="prune_from" tabindex="3">
- <option value="all">All forums</option>
-<?php
-
- $result = $pun_db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name 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 ($forum = $pun_db->fetch_assoc($result))
- {
- if ($forum['cid'] != $cur_category) // Are we still in the same category?
- {
- if ($cur_category)
- echo "\t\t\t\t\t\t\t\t\t\t\t".'</optgroup>'."\n";
-
- echo "\t\t\t\t\t\t\t\t\t\t\t".'<optgroup label="'.pun_htmlspecialchars($forum['cat_name']).'">'."\n";
- $cur_category = $forum['cid'];
- }
-
- echo "\t\t\t\t\t\t\t\t\t\t\t\t".'<option value="'.$forum['fid'].'">'.pun_htmlspecialchars($forum['forum_name']).'</option>'."\n";
- }
-
-?>
- </optgroup>
- </select>
- <span>The forum from which you want to prune posts.</span>
- </td>
- </tr>
- </table>
- <p class="topspace">Use this feature with caution. Pruned posts can <strong>never</strong> be recovered. For best performance you should put the forum in maintenance mode during pruning.</p>
- <div class="fsetsubmit"><input type="submit" name="prune" value="Prune" tabindex="5" /></div>
- </div>
- </fieldset>
- </div>
- </form>
- </div>
- </div>
- <div class="clearer"></div>
-</div>
-<?php
-
- require PUN_ROOT.'footer.php';
-}
--- a/punbb/admin_ranks.php Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,198 +0,0 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// Tell header.php to use the admin template
-define('PUN_ADMIN_CONSOLE', 1);
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-require PUN_ROOT.'include/common_admin.php';
-
-
-if ($pun_user['g_id'] < PUN_ADMIN)
- message($lang_common['No permission']);
-
-
-// Add a rank
-if (isset($_POST['add_rank']))
-{
- confirm_referrer('admin_ranks.php');
-
- $rank = trim($_POST['new_rank']);
- $min_posts = $_POST['new_min_posts'];
-
- 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 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');
-
-?>
- <div class="blockform">
- <h2><span>Ranks</span></h2>
- <div class="box">
- <form id="ranks" method="post" action="<?php echo makeUrlNS('Special', 'Forum/Admin_Ranks', 'action=foo', true); ?>">
- <div class="inform">
- <fieldset>
- <legend>Add rank</legend>
- <div class="infldset">
- <p>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. <strong>User ranks must be enabled in <a href="admin_options.php#ranks">Options</a> for this to have any effect.</strong></p>
- <table cellspacing="0">
- <thead>
- <tr>
- <th class="tcl" scope="col">Rank title</th>
- <th class="tc2" scope="col">Minimum posts</th>
- <th class="hidehead" scope="col">Action</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><input type="text" name="new_rank" size="24" maxlength="50" tabindex="1" /></td>
- <td><input type="text" name="new_min_posts" size="7" maxlength="7" tabindex="2" /></td>
- <td><input type="submit" name="add_rank" value=" Add " tabindex="3" /></td>
- </tr>
- </tbody>
- </table>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend>Edit/remove ranks</legend>
- <div class="infldset">
-<?php
-
-$result = $pun_db->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))
-{
-
-?>
- <table cellspacing="0">
- <thead>
- <tr>
- <th class="tcl" scope="col"><strong>Rank title</strong></th>
- <th class="tc2" scope="col"><strong>Minimum Posts</strong></th>
- <th class="hidehead" scope="col">Actions</th>
- </tr>
- </thead>
- <tbody>
-<?php
-
- while ($cur_rank = $pun_db->fetch_assoc($result))
- echo "\t\t\t\t\t\t\t\t".'<tr><td><input type="text" name="rank['.$cur_rank['id'].']" value="'.pun_htmlspecialchars($cur_rank['rank']).'" size="24" maxlength="50" /></td><td><input type="text" name="min_posts['.$cur_rank['id'].']" value="'.$cur_rank['min_posts'].'" size="7" maxlength="7" /></td><td><input type="submit" name="update['.$cur_rank['id'].']" value="Update" /> <input type="submit" name="remove['.$cur_rank['id'].']" value="Remove" /></td></tr>'."\n";
-
-?>
- </tbody>
- </table>
-<?php
-
-}
-else
- echo "\t\t\t\t\t\t\t".'<p>No ranks in list.</p>'."\n";
-
-?>
- </div>
- </fieldset>
- </div>
- </form>
- </div>
- </div>
- <div class="clearer"></div>
-</div>
-<?php
-
-require PUN_ROOT.'footer.php';
--- a/punbb/admin_reports.php Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,164 +0,0 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// Tell header.php to use the admin template
-define('PUN_ADMIN_CONSOLE', 1);
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-require PUN_ROOT.'include/common_admin.php';
-
-
-if ($pun_user['g_id'] < PUN_MOD)
- message($lang_common['No permission']);
-
-
-// Zap a report
-if (isset($_POST['zap_id']))
-{
- confirm_referrer('admin_reports.php');
-
- $zap_id = intval(key($_POST['zap_id']));
-
- $result = $pun_db->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');
-
-?>
- <div class="blockform">
- <h2><span>New reports</span></h2>
- <div class="box">
- <form method="post" action="<?php echo makeUrlNS('Special', 'Forum/Admin_reports', 'action=zap', true); ?>">
-<?php
-
-$result = $pun_db->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'] != '') ? '<a href="profile.php?id='.$cur_report['reported_by'].'">'.pun_htmlspecialchars($cur_report['reporter']).'</a>' : 'Deleted user';
- $forum = ($cur_report['forum_name'] != '') ? '<a href="viewforum.php?id='.$cur_report['forum_id'].'">'.pun_htmlspecialchars($cur_report['forum_name']).'</a>' : 'Deleted';
- $topic = ($cur_report['subject'] != '') ? '<a href="viewtopic.php?id='.$cur_report['topic_id'].'">'.pun_htmlspecialchars($cur_report['subject']).'</a>' : 'Deleted';
- $post = ($cur_report['post_id'] != '') ? str_replace("\n", '<br />', pun_htmlspecialchars($cur_report['message'])) : 'Deleted';
- $postid = ($cur_report['post_id'] != '') ? '<a href="viewtopic.php?pid='.$cur_report['post_id'].'#p'.$cur_report['post_id'].'">Post #'.$cur_report['post_id'].'</a>' : 'Deleted';
-
-?>
- <div class="inform">
- <fieldset>
- <legend>Reported <?php echo format_time($cur_report['created']) ?></legend>
- <div class="infldset">
- <table cellspacing="0">
- <tr>
- <th scope="row">Forum » Topic » Post</th>
- <td><?php echo $forum ?> » <?php echo $topic ?> » <?php echo $postid ?></td>
- </tr>
- <tr>
- <th scope="row">Report by <?php echo $reporter ?><div><input type="submit" name="zap_id[<?php echo $cur_report['id'] ?>]" value=" Zap " /></div></th>
- <td><?php echo $post ?></td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
-<?php
-
- }
-}
-else
- echo "\t\t\t\t".'<p>There are no new reports.</p>'."\n";
-
-?>
- </form>
- </div>
- </div>
-
- <div class="blockform block2">
- <h2><span>10 last zapped reports</span></h2>
- <div class="box">
- <div class="fakeform">
-<?php
-
-$result = $pun_db->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'] != '') ? '<a href="profile.php?id='.$cur_report['reported_by'].'">'.pun_htmlspecialchars($cur_report['reporter']).'</a>' : 'Deleted user';
- $forum = ($cur_report['forum_name'] != '') ? '<a href="viewforum.php?id='.$cur_report['forum_id'].'">'.pun_htmlspecialchars($cur_report['forum_name']).'</a>' : 'Deleted';
- $topic = ($cur_report['subject'] != '') ? '<a href="viewtopic.php?id='.$cur_report['topic_id'].'">'.pun_htmlspecialchars($cur_report['subject']).'</a>' : 'Deleted';
- $post = ($cur_report['post_id'] != '') ? str_replace("\n", '<br />', pun_htmlspecialchars($cur_report['message'])) : 'Post deleted';
- $post_id = ($cur_report['post_id'] != '') ? '<a href="viewtopic.php?pid='.$cur_report['post_id'].'#p'.$cur_report['post_id'].'">Post #'.$cur_report['post_id'].'</a>' : 'Deleted';
- $zapped_by = ($cur_report['zapped_by'] != '') ? '<a href="profile.php?id='.$cur_report['zapped_by_id'].'">'.pun_htmlspecialchars($cur_report['zapped_by']).'</a>' : 'N/A';
-
-?>
- <div class="inform">
- <fieldset>
- <legend>Zapped <?php echo format_time($cur_report['zapped']) ?></legend>
- <div class="infldset">
- <table cellspacing="0">
- <tr>
- <th scope="row">Forum » Topic » Post</th>
- <td><?php echo $forum ?> » <?php echo $topic ?> » <?php echo $post_id ?></td>
- </tr>
- <tr>
- <th scope="row">Reported by <?php echo $reporter ?><div class="topspace">Zapped by <?php echo $zapped_by ?></div></th>
- <td><?php echo $post ?></td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
-<?php
-
- }
-}
-else
- echo "\t\t\t\t".'<p>There are no zapped reports.</p>'."\n";
-
-?>
- </div>
- </div>
- </div>
- <div class="clearer"></div>
-</div>
-<?php
-
-require PUN_ROOT.'footer.php';
--- a/punbb/admin_users.php Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,514 +0,0 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// Tell header.php to use the admin template
-define('PUN_ADMIN_CONSOLE', 1);
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-require PUN_ROOT.'include/common_admin.php';
-
-
-if ($pun_user['g_id'] < PUN_MOD)
- message($lang_common['No permission']);
-
-
-// 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']);
-
-
- $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Users';
- require PUN_ROOT.'header.php';
-
-?>
-<div class="linkst">
- <div class="inbox">
- <div><a href="javascript:history.go(-1)">Go back</a></div>
- </div>
-</div>
-
-<div id="users1" class="blocktable">
- <h2><span>Users</span></h2>
- <div class="box">
- <div class="inbox">
- <table cellspacing="0">
- <thead>
- <tr>
- <th class="tcl" scope="col">IP address</th>
- <th class="tc2" scope="col">Last used</th>
- <th class="tc3" scope="col">Times found</th>
- <th class="tcr" scope="col">Action</th>
- </tr>
- </thead>
- <tbody>
-<?php
-
- $result = $pun_db->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))
- {
-
-?>
- <tr>
- <td class="tcl"><a href="moderate.php?get_host=<?php echo $cur_ip['poster_ip'] ?>"><?php echo $cur_ip['poster_ip'] ?></a></td>
- <td class="tc2"><?php echo format_time($cur_ip['last_used']) ?></td>
- <td class="tc3"><?php echo $cur_ip['used_times'] ?></td>
- <td class="tcr"><a href="admin_users.php?show_users=<?php echo $cur_ip['poster_ip'] ?>">Find more users for this ip</a></td>
- </tr>
-<?php
-
- }
- }
- else
- echo "\t\t\t\t".'<tr><td class="tcl" colspan="4">There are currently no posts by that user in the forum.</td></tr>'."\n";
-
-?>
- </tbody>
- </table>
- </div>
- </div>
-</div>
-
-<div class="linksb">
- <div class="inbox">
- <div><a href="javascript:history.go(-1)">Go back</a></div>
- </div>
-</div>
-<?php
-
- require PUN_ROOT.'footer.php';
-}
-
-
-if (isset($_GET['show_users']))
-{
- $ip = $_GET['show_users'];
-
- if (!@preg_match('/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/', $ip))
- message('The supplied IP address is not correctly formatted.');
-
-
- $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Users';
- require PUN_ROOT.'header.php';
-
-?>
-<div class="linkst">
- <div class="inbox">
- <div><a href="javascript:history.go(-1)">Go back</a></div>
- </div>
-</div>
-
-<div id="users2" class="blocktable">
- <h2><span>Users</span></h2>
- <div class="box">
- <div class="inbox">
- <table cellspacing="0">
- <thead>
- <tr>
- <th class="tcl" scope="col">Username</th>
- <th class="tc2" scope="col">E-mail</th>
- <th class="tc3" scope="col">Title/Status</th>
- <th class="tc4" scope="col">Posts</th>
- <th class="tc5" scope="col">Admin note</th>
- <th class="tcr" scope="col">Actions</th>
- </tr>
- </thead>
- <tbody>
-<?php
-
- $result = $pun_db->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 = '<a href="admin_users.php?ip_stats='.$user_data['id'].'">View IP stats</a> - <a href="search.php?action=show_user&user_id='.$user_data['id'].'">Show posts</a>';
-
-?>
- <tr>
- <td class="tcl"><?php echo '<a href="profile.php?id='.$user_data['id'].'">'.pun_htmlspecialchars($user_data['username']).'</a>' ?></td>
- <td class="tc2"><a href="mailto:<?php echo $user_data['email'] ?>"><?php echo $user_data['email'] ?></a></td>
- <td class="tc3"><?php echo $user_title ?></td>
- <td class="tc4"><?php echo $user_data['num_posts'] ?></td>
- <td class="tc5"><?php echo ($user_data['admin_note'] != '') ? $user_data['admin_note'] : ' ' ?></td>
- <td class="tcr"><?php echo $actions ?></td>
- </tr>
-<?php
-
- }
- else
- {
-
-?>
- <tr>
- <td class="tcl"><?php echo pun_htmlspecialchars($poster) ?></td>
- <td class="tc2"> </td>
- <td class="tc3">Guest</td>
- <td class="tc4"> </td>
- <td class="tc5"> </td>
- <td class="tcr"> </td>
- </tr>
-<?php
-
- }
- }
- }
- else
- echo "\t\t\t\t".'<tr><td class="tcl" colspan="6">The supplied IP address could not be found in the database.</td></tr>'."\n";
-
-?>
- </tbody>
- </table>
- </div>
- </div>
-</div>
-
-<div class="linksb">
- <div class="inbox">
- <div><a href="javascript:history.go(-1)">Go back</a></div>
- </div>
-</div>
-<?php
- require PUN_ROOT.'footer.php';
-}
-
-
-else if (isset($_POST['find_user']))
-{
- $form = $_POST['form'];
- $form['username'] = $_POST['username'];
-
- // trim() all elements in $form
- $form = array_map('trim', $form);
- $conditions = array();
-
- $posts_greater = trim($_POST['posts_greater']);
- $posts_less = trim($_POST['posts_less']);
- $last_post_after = trim($_POST['last_post_after']);
- $last_post_before = trim($_POST['last_post_before']);
- $registered_after = trim($_POST['registered_after']);
- $registered_before = trim($_POST['registered_before']);
- $order_by = $_POST['order_by'];
- $direction = $_POST['direction'];
- $user_group = $_POST['user_group'];
-
- if (preg_match('/[^0-9]/', $posts_greater.$posts_less))
- message('You entered a non-numeric value into a numeric only column.');
-
- // Try to convert date/time to timestamps
- if ($last_post_after != '')
- $last_post_after = strtotime($last_post_after);
- if ($last_post_before != '')
- $last_post_before = strtotime($last_post_before);
- if ($registered_after != '')
- $registered_after = strtotime($registered_after);
- if ($registered_before != '')
- $registered_before = strtotime($registered_before);
-
- if ($last_post_after == -1 || $last_post_before == -1 || $registered_after == -1 || $registered_before == -1)
- message('You entered an invalid date/time.');
-
- if ($last_post_after != '')
- $conditions[] = 'u.last_post>'.$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';
-
-?>
-<div class="linkst">
- <div class="inbox">
- <div><a href="javascript:history.go(-1)">Go back</a></div>
- </div>
-</div>
-
-<div id="users2" class="blocktable">
- <h2><span>Users</span></h2>
- <div class="box">
- <div class="inbox">
- <table cellspacing="0">
- <thead>
- <tr>
- <th class="tcl" scope="col">Username</th>
- <th class="tc2" scope="col">E-mail</th>
- <th class="tc3" scope="col">Title/Status</th>
- <th class="tc4" scope="col">Posts</th>
- <th class="tc5" scope="col">Admin note</th>
- <th class="tcr" scope="col">Actions</th>
- </tr>
- </thead>
- <tbody>
-<?php
-
- $result = $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 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 = '<span class="warntext">Not verified</span>';
-
- $actions = '<a href="admin_users.php?ip_stats='.$user_data['id'].'">View IP stats</a> - <a href="search.php?action=show_user&user_id='.$user_data['id'].'">Show posts</a>';
-
-?>
- <tr>
- <td class="tcl"><?php echo '<a href="profile.php?id='.$user_data['id'].'">'.pun_htmlspecialchars($user_data['username']).'</a>' ?></td>
- <td class="tc2"><a href="mailto:<?php echo $user_data['email'] ?>"><?php echo $user_data['email'] ?></a></td>
- <td class="tc3"><?php echo $user_title ?></td>
- <td class="tc4"><?php echo $user_data['num_posts'] ?></td>
- <td class="tc5"><?php echo ($user_data['admin_note'] != '') ? $user_data['admin_note'] : ' ' ?></td>
- <td class="tcr"><?php echo $actions ?></td>
- </tr>
-<?php
-
- }
- }
- else
- echo "\t\t\t\t".'<tr><td class="tcl" colspan="6">No match.</td></tr>'."\n";
-
-?>
- </tbody>
- </table>
- </div>
- </div>
-</div>
-
-<div class="linksb">
- <div class="inbox">
- <div><a href="javascript:history.go(-1)">Go back</a></div>
- </div>
-</div>
-<?php
-
- require PUN_ROOT.'footer.php';
-}
-
-
-else
-{
- $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Users';
- $focus_element = array('find_user', 'username');
- require PUN_ROOT.'header.php';
-
- generate_admin_menu('users');
-
-?>
- <div class="blockform">
- <h2><span>User search</span></h2>
- <div class="box">
- <form id="find_user" method="post" action="<?php echo makeUrlNS('Special', 'Forum/Admin_users', 'action=find_user', true); ?>">
- <p class="submittop"><input type="submit" name="find_user" value="Submit search" tabindex="1" /></p>
- <div class="inform">
- <fieldset>
- <legend>Enter search criteria</legend>
- <div class="infldset">
- <p>Search for users in the database. You can enter one or more terms to search for. Wildcards in the form of asterisks (*) are accepted.</p>
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">Username</th>
- <td><input type="text" name="username" size="25" maxlength="25" tabindex="2" /></td>
- </tr>
- <tr>
- <th scope="row">E-mail address</th>
- <td><input type="text" name="form[email]" size="30" maxlength="50" tabindex="3" /></td>
- </tr>
- <tr>
- <th scope="row">Title</th>
- <td><input type="text" name="form[title]" size="30" maxlength="50" tabindex="4" /></td>
- </tr>
- <tr>
- <th scope="row">Real name</th>
- <td><input type="text" name="form[realname]" size="30" maxlength="40" tabindex="5" /></td>
- </tr>
- <tr>
- <th scope="row">Website</th>
- <td><input type="text" name="form[url]" size="35" maxlength="100" tabindex="6" /></td>
- </tr>
- <tr>
- <th scope="row">ICQ</th>
- <td><input type="text" name="form[icq]" size="12" maxlength="12" tabindex="7" /></td>
- </tr>
- <tr>
- <th scope="row">MSN Messenger</th>
- <td><input type="text" name="form[msn]" size="30" maxlength="50" tabindex="8" /></td>
- </tr>
- <tr>
- <th scope="row">AOL IM</th>
- <td><input type="text" name="form[aim]" size="20" maxlength="20" tabindex="9" /></td>
- </tr>
- <tr>
- <th scope="row">Yahoo! Messenger</th>
- <td><input type="text" name="form[yahoo]" size="20" maxlength="20" tabindex="10" /></td>
- </tr>
- <tr>
- <th scope="row">Location</th>
- <td><input type="text" name="form[location]" size="30" maxlength="30" tabindex="11" /></td>
- </tr>
- <tr>
- <th scope="row">Signature</th>
- <td><input type="text" name="form[signature]" size="35" maxlength="512" tabindex="12" /></td>
- </tr>
- <tr>
- <th scope="row">Admin note</th>
- <td><input type="text" name="form[admin_note]" size="30" maxlength="30" tabindex="13" /></td>
- </tr>
- <tr>
- <th scope="row">Number of posts greater than</th>
- <td><input type="text" name="posts_greater" size="5" maxlength="8" tabindex="14" /></td>
- </tr>
- <tr>
- <th scope="row">Number of posts less than</th>
- <td><input type="text" name="posts_less" size="5" maxlength="8" tabindex="15" /></td>
- </tr>
- <tr>
- <th scope="row">Last post is after</th>
- <td><input type="text" name="last_post_after" size="24" maxlength="19" tabindex="16" />
- <span>(yyyy-mm-dd hh:mm:ss)</span></td>
- </tr>
- <tr>
- <th scope="row">Last post is before</th>
- <td><input type="text" name="last_post_before" size="24" maxlength="19" tabindex="17" />
- <span>(yyyy-mm-dd hh:mm:ss)</span></td>
- </tr>
- <tr>
- <th scope="row">Registered after</th>
- <td><input type="text" name="registered_after" size="24" maxlength="19" tabindex="18" />
- <span>(yyyy-mm-dd hh:mm:ss)</span></td>
- </tr>
- <tr>
- <th scope="row">Registered before</th>
- <td><input type="text" name="registered_before" size="24" maxlength="19" tabindex="19" />
- <span>(yyyy-mm-dd hh:mm:ss)</span></td>
- </tr>
- <tr>
- <th scope="row">Order by</th>
- <td>
- <select name="order_by" tabindex="20">
- <option value="username" selected="selected">username</option>
- <option value="email">e-mail</option>
- <option value="num_posts">posts</option>
- <option value="last_post">last post</option>
- <option value="registered">registered</option>
- </select> <select name="direction" tabindex="21">
- <option value="ASC" selected="selected">ascending</option>
- <option value="DESC">descending</option>
- </select>
- </td>
- </tr>
- <tr>
- <th scope="row">User group</th>
- <td>
- <select name="user_group" tabindex="22">
- <option value="all" selected="selected">All groups</option>
-<?php
-
- $result = $pun_db->query('SELECT g_id, g_title FROM '.$pun_db->prefix.'groups WHERE g_id!='.PUN_GUEST.' ORDER BY g_title') 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\t\t\t".'<option value="'.$cur_group['g_id'].'">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";
-
-?>
- </select>
- </td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
- <p class="submitend"><input type="submit" name="find_user" value="Submit search" tabindex="23" /></p>
- </form>
- </div>
-
- <h2 class="block2"><span>IP search</span></h2>
- <div class="box">
- <form method="get" action="admin_users.php">
- <div class="inform">
- <fieldset>
- <legend>Enter IP to search for</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">IP address<div><input type="submit" value=" Find " tabindex="25" /></div></th>
- <td><input type="text" name="show_users" size="18" maxlength="15" tabindex="24" />
- <span>The IP address to search for in the post database.</span></td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
- </form>
- </div>
- </div>
- <div class="clearer"></div>
-</div>
-<?php
-
- require PUN_ROOT.'footer.php';
-}
--- a/punbb/cache/.htaccess Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-<Limit GET POST PUT>
-Order Allow,Deny
-Deny from All
-</Limit>
\ No newline at end of file
--- /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 @@
+<?php
+
+define('PUN_BANS_LOADED', 1);
+
+$pun_bans = array (
+);
+
+?>
\ No newline at end of file
--- /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 @@
+<?php
+
+define('PUN_CONFIG_LOADED', 1);
+
+$pun_config = array (
+ 'o_cur_version' => '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' => '<p>Enter your announcement here.</p>',
+ '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.<br />\\n<br />\\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
--- /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 @@
+<?php
+
+define('PUN_HOOKS_LOADED', 1);
+
+$pun_hooks = array (
+);
+
+?>
\ No newline at end of file
--- /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 @@
+<?php
+
+if (!defined('PUN')) exit;
+define('PUN_QJ_LOADED', 1);
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/cache/cache_quickjump_2.php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,4 @@
+<?php
+
+if (!defined('PUN')) exit;
+define('PUN_QJ_LOADED', 1);
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/cache/cache_quickjump_3.php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,4 @@
+<?php
+
+if (!defined('PUN')) exit;
+define('PUN_QJ_LOADED', 1);
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/cache/cache_quickjump_4.php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,4 @@
+<?php
+
+if (!defined('PUN')) exit;
+define('PUN_QJ_LOADED', 1);
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/cache/cache_ranks.php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,20 @@
+<?php
+
+define('PUN_RANKS_LOADED', 1);
+
+$pun_ranks = array (
+ 0 =>
+ 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
--- 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 @@
-<html>
-<head>
-<title>.</title>
-</head>
-<body>
-.
-</body>
-</html>
\ No newline at end of file
--- 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 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-
-
-if ($pun_user['g_read_board'] == '0')
- message($lang_common['No view']);
-
-
-$id = isset($_GET['id']) ? intval($_GET['id']) : 0;
-if ($id < 1)
- message($lang_common['Bad request']);
-
-// Fetch some info about the post, the topic and the forum
-$result = $pun_db->query('SELECT f.id AS fid, f.forum_name, f.moderators, f.redirect_url, fp.post_replies, fp.post_topics, t.id AS tid, t.subject, t.posted, t.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']);
-
-?>
-<div class="linkst">
- <div class="inbox">
- <ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a></li><li> » <a href="viewforum.php?id=<?php echo $cur_post['fid'] ?>"><?php echo pun_htmlspecialchars($cur_post['forum_name']) ?></a></li><li> » <?php echo pun_htmlspecialchars($cur_post['subject']) ?></li></ul>
- </div>
-</div>
-
-<div class="blockform">
- <h2><span><?php echo $lang_delete['Delete post'] ?></span></h2>
- <div class="box">
- <form method="post" action="delete.php?id=<?php echo $id ?>">
- <div class="inform">
- <fieldset>
- <legend class="warntext"><?php echo $lang_delete['Warning'] ?></legend>
- <div class="infldset">
- <div class="postmsg">
- <p><?php echo $lang_common['Author'] ?>: <strong><?php echo pun_htmlspecialchars($cur_post['poster']) ?></strong></p>
- <?php echo $cur_post['message'] ?>
- </div>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="delete" value="<?php echo $lang_delete['Delete'] ?>" /><a href="javascript:history.go(-1)"><?php echo $lang_common['Go back'] ?></a></p>
- </form>
- </div>
-</div>
-<?php
-
-require PUN_ROOT.'footer.php';
--- a/punbb/edit.php Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,267 +0,0 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-
-
-if ($pun_user['g_read_board'] == '0')
- message($lang_common['No view']);
-
-
-$id = isset($_GET['id']) ? intval($_GET['id']) : 0;
-if ($id < 1)
- message($lang_common['Bad request']);
-
-// Fetch some info about the post, the topic and the forum
-$result = $pun_db->query('SELECT f.id AS fid, f.forum_name, f.moderators, f.redirect_url, fp.post_replies, fp.post_topics, t.id AS tid, t.subject, t.posted, t.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;
-
-?>
-<div class="linkst">
- <div class="inbox">
- <ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a></li><li> » <a href="viewforum.php?id=<?php echo $cur_post['fid'] ?>"><?php echo pun_htmlspecialchars($cur_post['forum_name']) ?></a></li><li> » <?php echo pun_htmlspecialchars($cur_post['subject']) ?></li></ul>
- </div>
-</div>
-
-<?php
-
-// If there are errors, we display them
-if (!empty($errors))
-{
-
-?>
-<div id="posterror" class="block">
- <h2><span><?php echo $lang_post['Post errors'] ?></span></h2>
- <div class="box">
- <div class="inbox"
- <p><?php echo $lang_post['Post errors info'] ?></p>
- <ul>
-<?php
-
- while (list(, $cur_error) = each($errors))
- echo "\t\t\t\t".'<li><strong>'.$cur_error.'</strong></li>'."\n";
-?>
- </ul>
- </div>
- </div>
-</div>
-
-<?php
-
-}
-else if (isset($_POST['preview']))
-{
- require_once PUN_ROOT.'include/parser.php';
- $preview_message = parse_message($message, $hide_smilies);
-
-?>
-<div id="postpreview" class="blockpost">
- <h2><span><?php echo $lang_post['Post preview'] ?></span></h2>
- <div class="box">
- <div class="inbox">
- <div class="postright">
- <div class="postmsg">
- <?php echo $preview_message."\n" ?>
- </div>
- </div>
- </div>
- </div>
-</div>
-
-<?php
-
-}
-
-?>
-<div class="blockform">
- <h2><?php echo $lang_post['Edit post'] ?></h2>
- <div class="box">
- <form id="edit" method="post" action="edit.php?id=<?php echo $id ?>&action=edit" onsubmit="return process_form(this)">
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_post['Edit post legend'] ?></legend>
- <input type="hidden" name="form_sent" value="1" />
- <div class="infldset txtarea">
-<?php if ($can_edit_subject): ?> <label><?php echo $lang_common['Subject'] ?><br />
- <input class="longinput" type="text" name="req_subject" size="80" maxlength="70" tabindex="<?php echo $cur_index++ ?>" value="<?php echo pun_htmlspecialchars(isset($_POST['req_subject']) ? $_POST['req_subject'] : $cur_post['subject']) ?>" /><br /></label>
-<?php endif; ?> <label><?php echo $lang_common['Message'] ?><br />
- <textarea name="req_message" rows="20" cols="95" tabindex="<?php echo $cur_index++ ?>"><?php echo pun_htmlspecialchars(isset($_POST['req_message']) ? $message : $cur_post['message']) ?></textarea><br /></label>
- <ul class="bblinks">
- <li><a href="help.php#bbcode" onclick="window.open(this.href); return false;"><?php echo $lang_common['BBCode'] ?></a>: <?php echo ($pun_config['p_message_bbcode'] == '1') ? $lang_common['on'] : $lang_common['off']; ?></li>
- <li><a href="help.php#img" onclick="window.open(this.href); return false;"><?php echo $lang_common['img tag'] ?></a>: <?php echo ($pun_config['p_message_img_tag'] == '1') ? $lang_common['on'] : $lang_common['off']; ?></li>
- <li><a href="help.php#smilies" onclick="window.open(this.href); return false;"><?php echo $lang_common['Smilies'] ?></a>: <?php echo ($pun_config['o_smilies'] == '1') ? $lang_common['on'] : $lang_common['off']; ?></li>
- </ul>
- </div>
- </fieldset>
-<?php
-
-$checkboxes = array();
-if ($pun_config['o_smilies'] == '1')
-{
- if (isset($_POST['hide_smilies']) || $cur_post['hide_smilies'] == '1')
- $checkboxes[] = '<label><input type="checkbox" name="hide_smilies" value="1" checked="checked" tabindex="'.($cur_index++).'" /> '.$lang_post['Hide smilies'];
- else
- $checkboxes[] = '<label><input type="checkbox" name="hide_smilies" value="1" tabindex="'.($cur_index++).'" /> '.$lang_post['Hide smilies'];
-}
-
-if ($is_admmod)
-{
- if ((isset($_POST['form_sent']) && isset($_POST['silent'])) || !isset($_POST['form_sent']))
- $checkboxes[] = '<label><input type="checkbox" name="silent" value="1" tabindex="'.($cur_index++).'" checked="checked" /> '.$lang_post['Silent edit'];
- else
- $checkboxes[] = '<label><input type="checkbox" name="silent" value="1" tabindex="'.($cur_index++).'" /> '.$lang_post['Silent edit'];
-}
-
-if (!empty($checkboxes))
-{
-
-?>
- </div>
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_common['Options'] ?></legend>
- <div class="infldset">
- <div class="rbox">
- <?php echo implode('</label>'."\n\t\t\t\t\t\t\t", $checkboxes).'</label>'."\n" ?>
- </div>
- </div>
- </fieldset>
-<?php
-
- }
-
-?>
- </div>
- <p><input type="submit" name="submit" value="<?php echo $lang_common['Submit'] ?>" tabindex="<?php echo $cur_index++ ?>" accesskey="s" /><input type="submit" name="preview" value="<?php echo $lang_post['Preview'] ?>" tabindex="<?php echo $cur_index++ ?>" accesskey="p" /><a href="javascript:history.go(-1)"><?php echo $lang_common['Go back'] ?></a></p>
- </form>
- </div>
-</div>
-<?php
-
-require PUN_ROOT.'footer.php';
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/extensions/index.html Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,8 @@
+<html>
+<head>
+<title>.</title>
+</head>
+<body>
+.
+</body>
+</html>
\ No newline at end of file
--- 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 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************
-
-
- INSTRUCTIONS
-
- This script is used to include information about your board from
- pages outside the forums and to syndicate news about recent
- discussions via RSS. The script can display a list of recent
- discussions (sorted by post time or last post time), a list of
- active users or a collection of general board statistics. The
- script can be called directly via an URL (for RSS), from a PHP
- include command or through the use of Server Side Includes (SSI).
-
- The scripts behaviour is controlled via variables supplied in the
- URL to the script. The different variables are: action (what to
- output), show (how many topics to display), fid (the ID or ID's of
- the forum(s) to poll for topics), nfid (the ID or ID's of forums
- that should be excluded) and type (output as HTML or RSS). The
- only mandatory variable is action. Possible/default values are:
-
- action: active (show most recently active topics) (HTML or RSS)
- new (show newest topics) (HTML or RSS)
- online (show users online) (HTML)
- online_full (as above, but includes a full list) (HTML)
- stats (show board statistics) (HTML)
-
- show: Any integer value between 1 and 50. This variables is
- ignored for RSS output. The default is 15.
-
- fid: One or more forum ID's (comma-separated). If ignored,
- topics from all guest-readable forums will be polled.
-
- nfid: One or more forum ID's (comma-separated) that are to be
- excluded. E.g. the ID of a a test forum.
-
- type: RSS. Anything else means HTML output.
-
- Here are some examples using PHP include().
-
- Show the 15 most recently active topics from all forums:
- include('http://host.com/forums/extern.php?action=active');
-
- Show the 10 newest topics from forums with ID 5, 6 and 7:
- include('http://host.com/forums/extern.php?action=new&show=10&fid=5,6,7');
-
- Show users online:
- include('http://host.com/forums/extern.php?action=online');
-
- Show users online with full listing of users:
- include('http://host.com/forums/extern.php?action=online_full');
-
- Show board statistics:
- include('http://host.com/forums/extern.php?action=stats');
-
- Here are some examples using SSI.
-
- Show the 5 newest topics from forums with ID 11 and 22:
- <!--#include virtual="forums/extern.php?action=new&show=5&fid=11,22" -->
-
- Show board statistics:
- <!--#include virtual="forums/extern.php?action=stats" -->
-
- 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 '<?xml version="1.0" encoding="'.$lang_common['lang_encoding'].'"?>'."\r\n";
- echo '<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">'."\r\n";
- echo '<rss version="0.91">'."\r\n";
- echo '<channel>'."\r\n";
- echo "\t".'<title>'.pun_htmlspecialchars($pun_config['o_board_title']).'</title>'."\r\n";
- echo "\t".'<link>'.$pun_config['o_base_url'].'/</link>'."\r\n";
- echo "\t".'<description>'.pun_htmlspecialchars($rss_description.' '.$pun_config['o_board_title']).'</description>'."\r\n";
- echo "\t".'<language>en-us</language>'."\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".'<item>'."\r\n";
- echo "\t\t".'<title>'.pun_htmlspecialchars($cur_topic['subject']).'</title>'."\r\n";
- echo "\t\t".'<link>'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].$url_action.'</link>'."\r\n";
- echo "\t\t".'<description><![CDATA['.escape_cdata($lang_common['Forum'].': <a href="'.$pun_config['o_base_url'].'/viewforum.php?id='.$cur_topic['fid'].'">'.$cur_topic['forum_name'].'</a><br />'."\r\n".$lang_common['Author'].': '.$cur_topic['poster'].'<br />'."\r\n".$lang_common['Posted'].': '.date('r', $cur_topic['posted']).'<br />'."\r\n".$lang_common['Last post'].': '.date('r', $cur_topic['last_post'])).']]></description>'."\r\n";
- echo "\t".'</item>'."\r\n";
- }
-
- echo '</channel>'."\r\n";
- echo '</rss>';
- }
-
-
- // 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 '<li><a href="'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].'&action=new" title="'.pun_htmlspecialchars($cur_topic['subject']).'">'.$subject_truncated.'</a></li>'."\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[] = '<a href="'.$pun_config['o_base_url'].'/profile.php?id='.$pun_user_online['user_id'].'">'.pun_htmlspecialchars($pun_user_online['ident']).'</a>';
- ++$num_users;
- }
- else
- ++$num_guests;
- }
-
- echo $lang_index['Guests online'].': '.$num_guests.'<br />';
-
- if ($_GET['action'] == 'online_full')
- echo $lang_index['Users online'].': '.implode(', ', $users).'<br />';
- else
- echo $lang_index['Users online'].': '.$num_users.'<br />';
-
- 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'].'<br />';
- echo $lang_index['Newest user'].': <a href="'.$pun_config['o_base_url'].'/profile.php?id='.$stats['last_user']['id'].'">'.pun_htmlspecialchars($stats['last_user']['username']).'</a><br />';
- echo $lang_index['No of topics'].': '.$stats['total_topics'].'<br />';
- echo $lang_index['No of posts'].': '.$stats['total_posts'];
-
- return;
-}
-
-
-else
- exit('Bad request');
--- 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 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// Make sure no one attempts to run this script "directly"
-if (!defined('PUN'))
- exit;
-
-$tpl_temp = trim(ob_get_contents());
-$tpl_main = str_replace('<pun_main>', $tpl_temp, $tpl_main);
-ob_end_clean();
-// END SUBST - <pun_main>
-
-
-// START SUBST - <pun_footer>
-ob_start();
-
-?>
-<div id="brdfooter" class="block">
- <h2><span><?php echo $lang_common['Board footer'] ?></span></h2>
- <div class="box">
- <div class="inbox">
-<?php
-
-// If no footer style has been specified, we use the default (only copyright/debug info)
-$footer_style = isset($footer_style) ? $footer_style : NULL;
-
-if ($footer_style == 'index' || $footer_style == 'search')
-{
- if (!$pun_user['is_guest'])
- {
- echo "\n\t\t\t".'<dl id="searchlinks" class="conl">'."\n\t\t\t\t".'<dt><strong>'.$lang_common['Search links'].'</strong></dt>'."\n\t\t\t\t".'<dd><a href="search.php?action=show_24h">'.$lang_common['Show recent posts'].'</a></dd>'."\n";
- echo "\t\t\t\t".'<dd><a href="search.php?action=show_unanswered">'.$lang_common['Show unanswered posts'].'</a></dd>'."\n";
-
- if ($pun_config['o_subscriptions'] == '1')
- echo "\t\t\t\t".'<dd><a href="search.php?action=show_subscriptions">'.$lang_common['Show subscriptions'].'</a></dd>'."\n";
-
- echo "\t\t\t\t".'<dd><a href="search.php?action=show_user&user_id='.$pun_user['id'].'">'.$lang_common['Show your posts'].'</a></dd>'."\n\t\t\t".'</dl>'."\n";
- }
- else
- {
- if ($pun_user['g_search'] == '1')
- {
- echo "\n\t\t\t".'<dl id="searchlinks" class="conl">'."\n\t\t\t\t".'<dt><strong>'.$lang_common['Search links'].'</strong></dt><dd><a href="search.php?action=show_24h">'.$lang_common['Show recent posts'].'</a></dd>'."\n";
- echo "\t\t\t\t".'<dd><a href="search.php?action=show_unanswered">'.$lang_common['Show unanswered posts'].'</a></dd>'."\n\t\t\t".'</dl>'."\n";
- }
- }
-}
-else if ($footer_style == 'viewforum' || $footer_style == 'viewtopic')
-{
- echo "\n\t\t\t".'<div class="conl">'."\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".'<p id="modcontrols"><a href="moderate.php?fid='.$forum_id.'&p='.$p.'">'.$lang_common['Moderate forum'].'</a></p>'."\n";
- else if ($footer_style == 'viewtopic' && $is_admmod)
- {
- echo "\t\t\t".'<dl id="modcontrols"><dt><strong>'.$lang_topic['Mod controls'].'</strong></dt><dd><a href="moderate.php?fid='.$forum_id.'&tid='.$id.'&p='.$p.'">'.$lang_common['Delete posts'].'</a></dd>'."\n";
- echo "\t\t\t".'<dd><a href="moderate.php?fid='.$forum_id.'&move_topics='.$id.'">'.$lang_common['Move topic'].'</a></dd>'."\n";
-
- if ($cur_topic['closed'] == '1')
- echo "\t\t\t".'<dd><a href="moderate.php?fid='.$forum_id.'&open='.$id.'">'.$lang_common['Open topic'].'</a></dd>'."\n";
- else
- echo "\t\t\t".'<dd><a href="moderate.php?fid='.$forum_id.'&close='.$id.'">'.$lang_common['Close topic'].'</a></dd>'."\n";
-
- if ($cur_topic['sticky'] == '1')
- echo "\t\t\t".'<dd><a href="moderate.php?fid='.$forum_id.'&unstick='.$id.'">'.$lang_common['Unstick topic'].'</a></dd></dl>'."\n";
- else
- echo "\t\t\t".'<dd><a href="moderate.php?fid='.$forum_id.'&stick='.$id.'">'.$lang_common['Stick topic'].'</a></dd></dl>'."\n";
- }
-
- echo "\t\t\t".'</div>'."\n";
-}
-
-?>
- <p class="conr">Powered by <a href="http://www.punbb.org/">PunBB</a><?php if ($pun_config['o_show_version'] == '1') echo ' '.$pun_config['o_cur_version']; ?><br />© Copyright 2002–2005 Rickard Andersson</p>
-<?php
-
-// Display debug info (if enabled/defined)
-if (defined('PUN_DEBUG'))
-{
- global $pun_start;
- // Calculate script generation time
- list($usec, $sec) = explode(' ', microtime());
- $time_diff = sprintf('%.3f', ((float)$usec + (float)$sec) - $pun_start);
- echo "\t\t\t".'<p class="conr">[ PunBB time: '.$time_diff.' seconds, '.$pun_db->get_num_queries().' queries executed ]</p>'."\n";
-}
-
-?>
- <div class="clearer"></div>
- </div>
- </div>
-</div>
-<?php
-
-
-// End the transaction
-$pun_db->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('<pun_footer>', $tpl_temp, $tpl_main);
-ob_end_clean();
-// END SUBST - <pun_footer>
-
-
-// Close the db connection (and free up any result data)
-$pun_db->close();
-
-// Spit out the page
-exit($tpl_main);
--- 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 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-// Import the Enano API
-global $db, $session, $paths, $template, $plugins; // Common objects
-
-// Make sure no one attempts to run this script "directly"
-if (!defined('PUN'))
- exit;
-
-$template->tpl_strings['PAGE_NAME'] = $page_title;
-$template->add_header('<pun_head>');
-
-// Special case - many Enano themes have indented paragraphs
-$template->add_header('<style type="text/css">
- div.pun p {
- margin-left: 0;
- }
- div.pun a[href ^="http://"] {
- background-image: none;
- padding-right: 0;
- }
- div.inbox li {
- list-style-type: none !important;
- }
- div.pun h2 {
- border-bottom-width: 0;
- }
- </style>');
-
-// 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 = '<div id="punwrap">
-<div id="punadmin" class="pun">
-
-<div id="brdheader" class="block">
- <div class="box">
- <div id="brdtitle" class="inbox">
- <pun_title>
- <pun_desc>
- </div>
- <pun_navlinks>
- <pun_status>
- </div>
-</div>
-
-<pun_announcement>
-
-<pun_main>
-
-<pun_footer>
-
-</div>
-</div>';
-
- $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 = '<div id="punwrap">
-<div id="pun<pun_page>" class="pun">
-
-<div id="brdheader" class="block">
- <div class="box">
- <div id="brdtitle" class="inbox">
- <pun_title>
- <pun_desc>
- </div>
- <pun_navlinks>
- <pun_status>
- </div>
-</div>
-
-<pun_announcement>
-
-<pun_main>
-
-<pun_footer>
-
-</div>
-</div>';
-
- $tpl_main = $template->getHeader() . $inner . $template->getFooter();
-
-}
-
-
-// START SUBST - <pun_include "*">
-while (preg_match('#<pun_include "([^/\\\\]*?)\.(php[45]?|inc|html?|txt)">#', $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 - <pun_include "*">
-
-// START SUBST - <pun_content_direction>
-$tpl_main = str_replace('<pun_content_direction>', $lang_common['lang_direction'], $tpl_main);
-// END SUBST - <pun_content_direction>
-
-
-// START SUBST - <pun_char_encoding>
-$tpl_main = str_replace('<pun_char_encoding>', $lang_common['lang_encoding'], $tpl_main);
-// END SUBST - <pun_char_encoding>
-
-// START SUBST - <pun_head>
-ob_start();
-
-// Is this a page that we want search index spiders to index?
-if (!defined('PUN_ALLOW_INDEX'))
- echo '<meta name="ROBOTS" content="NOINDEX, FOLLOW" />'."\n";
-
-?>
-<link rel="stylesheet" type="text/css" href="<?php echo scriptPath; ?>/punbb/style/<?php echo $pun_user['style'].'.css' ?>" />
-<?php
-
-if (defined('PUN_ADMIN_CONSOLE'))
- echo '<link rel="stylesheet" type="text/css" href="style/imports/base_admin.css" />'."\n";
-
-if (isset($required_fields))
-{
- // Output JavaScript to validate form (make sure required fields are filled out)
-
-?>
-<script type="text/javascript">
-<!--
-function process_form(the_form)
-{
- var element_names = new Object()
-<?php
-
- // Output a JavaScript array with localised field names
- while (list($elem_orig, $elem_trans) = @each($required_fields))
- echo "\t".'element_names["'.$elem_orig.'"] = "'.addslashes(str_replace(' ', ' ', $elem_trans)).'"'."\n";
-
-?>
-
- if (document.all || document.getElementById)
- {
- for (i = 0; i < the_form.length; ++i)
- {
- var elem = the_form.elements[i]
- if (elem.name && elem.name.substring(0, 4) == "req_")
- {
- if (elem.type && (elem.type=="text" || elem.type=="textarea" || elem.type=="password" || elem.type=="file") && elem.value=='')
- {
- alert("\"" + element_names[elem.name] + "\" <?php echo $lang_common['required field'] ?>")
- elem.focus()
- return false
- }
- }
- }
- }
-
- return true
-}
-// -->
-</script>
-<?php
-
-}
-
-$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : '';
-if (strpos($user_agent, 'msie') !== false && strpos($user_agent, 'windows') !== false && strpos($user_agent, 'opera') === false)
- echo '<script type="text/javascript" src="style/imports/minmax.js"></script>';
-
-$tpl_temp = trim(ob_get_contents());
-$tpl_main = str_replace('<pun_head>', $tpl_temp, $tpl_main);
-ob_end_clean();
-// END SUBST - <pun_head>
-
-
-// START SUBST - <body>
-if (isset($focus_element))
-{
- $tpl_main = str_replace('<body onload="', '<body onload="document.getElementById(\''.$focus_element[0].'\').'.$focus_element[1].'.focus();', $tpl_main);
- $tpl_main = str_replace('<body>', '<body onload="document.getElementById(\''.$focus_element[0].'\').'.$focus_element[1].'.focus()">', $tpl_main);
-}
-// END SUBST - <body>
-
-
-// START SUBST - <pun_page>
-$tpl_main = str_replace('<pun_page>', htmlspecialchars(basename($_SERVER['PHP_SELF'], '.php')), $tpl_main);
-// END SUBST - <pun_page>
-
-
-// START SUBST - <pun_title>
-$tpl_main = str_replace('<pun_title>', '<h1><span>'.pun_htmlspecialchars($pun_config['o_board_title']).'</span></h1>', $tpl_main);
-// END SUBST - <pun_title>
-
-
-// START SUBST - <pun_desc>
-$tpl_main = str_replace('<pun_desc>', '<p><span>'.$pun_config['o_board_desc'].'</span></p>', $tpl_main);
-// END SUBST - <pun_desc>
-
-
-// START SUBST - <pun_navlinks>
-$tpl_main = str_replace('<pun_navlinks>','<div id="brdmenu" class="inbox">'."\n\t\t\t". generate_navlinks()."\n\t\t".'</div>', $tpl_main);
-// END SUBST - <pun_navlinks>
-
-
-// START SUBST - <pun_status>
-if ($pun_user['is_guest'])
- $tpl_temp = '<div id="brdwelcome" class="inbox">'."\n\t\t\t".'<p>'.$lang_common['Not logged in'].'</p>'."\n\t\t".'</div>';
-else
-{
- $tpl_temp = '<div id="brdwelcome" class="inbox">'."\n\t\t\t".'<ul class="conl">'."\n\t\t\t\t".'<li>'.$lang_common['Logged in as'].' <strong>'.pun_htmlspecialchars($pun_user['username']).'</strong></li>'."\n\t\t\t\t".'<li>'.$lang_common['Last visit'].': '.format_time($pun_user['last_visit']).'</li>';
-
- 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".'<li class="reportlink"><strong><a href="admin_reports.php">There are new reports</a></strong></li>';
-
- if ($pun_config['o_maintenance'] == '1')
- $tpl_temp .= "\n\t\t\t\t".'<li class="maintenancelink"><strong><a href="admin_options.php#maintenance">Maintenance mode is enabled!</a></strong></li>';
- }
-
- if (in_array(basename($_SERVER['PHP_SELF']), array('index.php', 'search.php')))
- $tpl_temp .= "\n\t\t\t".'</ul>'."\n\t\t\t".'<ul class="conr">'."\n\t\t\t\t".'<li><a href="search.php?action=show_new">'.$lang_common['Show new posts'].'</a></li>'."\n\t\t\t\t".'<li><a href="misc.php?action=markread">'.$lang_common['Mark all as read'].'</a></li>'."\n\t\t\t".'</ul>'."\n\t\t\t".'<div class="clearer"></div>'."\n\t\t".'</div>';
- else
- $tpl_temp .= "\n\t\t\t".'</ul>'."\n\t\t\t".'<div class="clearer"></div>'."\n\t\t".'</div>';
-}
-
-$tpl_main = str_replace('<pun_status>', $tpl_temp, $tpl_main);
-// END SUBST - <pun_status>
-
-// START SUBST - <pun_announcement>
-if ($pun_config['o_announcement'] == '1')
-{
- ob_start();
-
-?>
-<div id="announce" class="block">
- <h2><span><?php echo $lang_common['Announcement'] ?></span></h2>
- <div class="box">
- <div class="inbox">
- <div><?php echo $pun_config['o_announcement_message'] ?></div>
- </div>
- </div>
-</div>
-<?php
-
- $tpl_temp = trim(ob_get_contents());
- $tpl_main = str_replace('<pun_announcement>', $tpl_temp, $tpl_main);
- ob_end_clean();
-}
-else
- $tpl_main = str_replace('<pun_announcement>', '', $tpl_main);
-// END SUBST - <pun_announcement>
-
-// START SUBST - <pun_main>
-ob_start();
-
-
-define('PUN_HEADER', 1);
--- 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 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// Tell header.php to use the help template
-define('PUN_HELP', 1);
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-
-
-if ($pun_user['g_read_board'] == '0')
- message($lang_common['No view']);
-
-
-// Load the help.php language file
-require PUN_ROOT.'lang/'.$pun_user['language'].'/help.php';
-
-
-$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_help['Help'];
-require PUN_ROOT.'header.php';
-
-?>
-<h2><?php echo $lang_common['BBCode'] ?></h2>
-<div class="box">
- <div class="inbox">
- <p><a name="bbcode"></a><?php echo $lang_help['BBCode info 1'] ?></p><br />
- <p><?php echo $lang_help['BBCode info 2'] ?></p>
- </div>
-</div>
-<h2><?php echo $lang_help['Text style'] ?></h2>
-<div class="box">
- <p><?php echo $lang_help['Text style info'] ?></p><br />
- <div style="padding-left: 4px">
- [b]<?php echo $lang_help['Bold text'] ?>[/b] <?php echo $lang_help['produces'] ?> <b><?php echo $lang_help['Bold text'] ?></b><br />
- [u]<?php echo $lang_help['Underlined text'] ?>[/u] <?php echo $lang_help['produces'] ?> <span class="bbu"><?php echo $lang_help['Underlined text'] ?></span><br />
- [i]<?php echo $lang_help['Italic text'] ?>[/i] <?php echo $lang_help['produces'] ?> <i><?php echo $lang_help['Italic text'] ?></i><br />
- [color=#FF0000]<?php echo $lang_help['Red text'] ?>[/color] <?php echo $lang_help['produces'] ?> <span style="color: #ff0000"><?php echo $lang_help['Red text'] ?></span><br />
- [color=blue]<?php echo $lang_help['Blue text'] ?>[/color] <?php echo $lang_help['produces'] ?> <span style="color: blue"><?php echo $lang_help['Blue text'] ?></span>
- </div>
-</div>
-<h2><?php echo $lang_help['Links and images'] ?></h2>
-<div class="box">
- <p><?php echo $lang_help['Links info'] ?></p><br />
- <div style="padding-left: 4px">
- [url=<?php echo $pun_config['o_base_url'].'/' ?>]<?php echo pun_htmlspecialchars($pun_config['o_board_title']) ?>[/url] <?php echo $lang_help['produces'] ?> <a href="<?php echo $pun_config['o_base_url'].'/' ?>"><?php echo pun_htmlspecialchars($pun_config['o_board_title']) ?></a><br />
- [url]<?php echo $pun_config['o_base_url'].'/' ?>[/url] <?php echo $lang_help['produces'] ?> <a href="<?php echo $pun_config['o_base_url'] ?>"><?php echo $pun_config['o_base_url'].'/' ?></a><br />
- [email]myname@mydomain.com[/email] <?php echo $lang_help['produces'] ?> <a href="mailto:myname@mydomain.com">myname@mydomain.com</a><br />
- [email=myname@mydomain.com]<?php echo $lang_help['My e-mail address'] ?>[/email] <?php echo $lang_help['produces'] ?> <a href="mailto:myname@mydomain.com"><?php echo $lang_help['My e-mail address'] ?></a><br /><br />
- </div>
- <p><a name="img"></a><?php echo $lang_help['Images info'] ?></p>
- <div>[img]http://www.punbb.org/img/small_logo.png[/img] <?php echo $lang_help['produces'] ?> <img src="http://www.punbb.org/img/small_logo.png" alt="http://www.punbb.org/img/small_logo.png" /></div>
-</div>
-<h2><?php echo $lang_help['Quotes'] ?></h2>
-<div class="box">
- <div style="padding-left: 4px">
- <?php echo $lang_help['Quotes info'] ?><br /><br />
- [quote=James]<?php echo $lang_help['Quote text'] ?>[/quote]<br /><br />
- <?php echo $lang_help['produces quote box'] ?><br /><br />
- <div class="postmsg">
- <blockquote><div class="incqbox"><h4>James <?php echo $lang_common['wrote'] ?>:</h4><p><?php echo $lang_help['Quote text'] ?></p></div></blockquote>
- </div>
- <br />
- <?php echo $lang_help['Quotes info 2'] ?><br /><br />
- [quote]<?php echo $lang_help['Quote text'] ?>[/quote]<br /><br />
- <?php echo $lang_help['produces quote box'] ?><br /><br />
- <div class="postmsg">
- <blockquote><div class="incqbox"><p><?php echo $lang_help['Quote text'] ?></p></div></blockquote>
- </div>
- </div>
-</div>
-<h2><?php echo $lang_help['Code'] ?></h2>
-<div class="box">
- <div style="padding-left: 4px">
- <?php echo $lang_help['Code info'] ?><br /><br />
- [code]<?php echo $lang_help['Code text'] ?>[/code]<br /><br />
- <?php echo $lang_help['produces code box'] ?><br /><br />
- <div class="postmsg">
- <div class="codebox"><div class="incqbox"><h4><?php echo $lang_common['Code'] ?>:</h4><div class="scrollbox" style="height: 4.5em"><pre><?php echo $lang_help['Code text'] ?></pre></div></div></div>
- </div>
- </div>
-</div>
-<h2><?php echo $lang_help['Nested tags'] ?></h2>
-<div class="box">
- <div style="padding-left: 4px">
- <?php echo $lang_help['Nested tags info'] ?><br /><br />
- [b][u]<?php echo $lang_help['Bold, underlined text'] ?>[/u][/b] <?php echo $lang_help['produces'] ?> <span class="bbu"><b><?php echo $lang_help['Bold, underlined text'] ?></b></span><br /><br />
- </div>
-</div>
-<h2><?php echo $lang_common['Smilies'] ?></h2>
-<div class="box">
- <div style="padding-left: 4px">
- <a name="smilies"></a><?php echo $lang_help['Smilies info'] ?><br /><br />
-<?php
-
-// Display the smiley set
-require PUN_ROOT.'include/parser.php';
-
-$num_smilies = count($smiley_text);
-for ($i = 0; $i < $num_smilies; ++$i)
-{
- // Is there a smiley at the current index?
- if (!isset($smiley_text[$i]))
- continue;
-
- echo "\t\t".' '.$smiley_text[$i];
-
- // Save the current text and image
- $cur_img = $smiley_img[$i];
- $cur_text = $smiley_text[$i];
-
- // Loop through the rest of the array and see if there are any duplicate images
- // (more than one text representation for one image)
- for ($next = $i + 1; $next < $num_smilies; ++$next)
- {
- // Did we find a dupe?
- if (isset($smiley_img[$next]) && $smiley_img[$i] == $smiley_img[$next])
- {
- echo ' '.$lang_common['and'].' '.$smiley_text[$next];
-
- // Remove the dupe so we won't display it twice
- unset($smiley_text[$next]);
- unset($smiley_img[$next]);
- }
- }
-
- echo ' '.$lang_help['produces'].' <img src="' . scriptPath . '/punbb/img/smilies/'.$cur_img.'" width="15" height="15" alt="'.$cur_text.'" /><br />'."\n";
-}
-
-?>
- <br />
- </div>
-</div>
-<?php
-
-require PUN_ROOT.'footer.php';
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/img/avatars/.htaccess Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,4 @@
+Deny from all
+<FilesMatch "\.(gif|jpg|png)$">
+ Allow from all
+</FilesMatch>
--- 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 @@
-<html>
-<head>
-<title>.</title>
-</head>
-<body>
-.
-</body>
-</html>
\ No newline at end of file
--- 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 @@
-<html>
-<head>
-<title>.</title>
-</head>
-<body>
-.
-</body>
-</html>
\ No newline at end of file
Binary file punbb/img/logo.png has changed
Binary file punbb/img/smilies/big_smile.png has changed
Binary file punbb/img/smilies/cool.png has changed
Binary file punbb/img/smilies/hmm.png has changed
--- 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 @@
-<html>
-<head>
-<title>.</title>
-</head>
-<body>
-.
-</body>
-</html>
\ No newline at end of file
Binary file punbb/img/smilies/lol.png has changed
Binary file punbb/img/smilies/mad.png has changed
Binary file punbb/img/smilies/neutral.png has changed
Binary file punbb/img/smilies/roll.png has changed
Binary file punbb/img/smilies/sad.png has changed
Binary file punbb/img/smilies/smile.png has changed
Binary file punbb/img/smilies/tongue.png has changed
Binary file punbb/img/smilies/wink.png has changed
Binary file punbb/img/smilies/yikes.png has changed
--- 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 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// Make sure no one attempts to run this script "directly"
-if (!defined('PUN'))
- exit;
-
-
-//
-// If we are running pre PHP 4.2.0, we add our own implementation of var_export
-//
-if (!function_exists('var_export'))
-{
- function var_export()
- {
- $args = func_get_args();
- $indent = (isset($args[2])) ? $args[2] : '';
-
- if (is_array($args[0]))
- {
- $output = 'array ('."\n";
-
- foreach ($args[0] as $k => $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, '<?php'."\n\n".'define(\'PUN_CONFIG_LOADED\', 1);'."\n\n".'$pun_config = '.var_export($output, true).';'."\n\n".'?>');
-
- 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, '<?php'."\n\n".'define(\'PUN_BANS_LOADED\', 1);'."\n\n".'$pun_bans = '.var_export($output, true).';'."\n\n".'?>');
-
- 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, '<?php'."\n\n".'define(\'PUN_RANKS_LOADED\', 1);'."\n\n".'$pun_ranks = '.var_export($output, true).';'."\n\n".'?>');
-
- 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 = '<?php'."\n\n".'if (!defined(\'PUN\')) exit;'."\n".'define(\'PUN_QJ_LOADED\', 1);'."\n\n".'?>';
- $output .= "\t\t\t\t".'<form id="qjump" method="get" action="viewforum.php">'."\n\t\t\t\t\t".'<div><label><?php echo $lang_common[\'Jump to\'] ?>'."\n\n\t\t\t\t\t".'<br /><select name="id" onchange="window.location=(\'viewforum.php?id=\'+this.options[this.selectedIndex].value)">'."\n";
-
-
- $result = $pun_db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.redirect_url FROM '.$pun_db->prefix.'categories AS c INNER JOIN '.$pun_db->prefix.'forums AS f ON c.id=f.cat_id LEFT JOIN '.$pun_db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$group_id.') WHERE fp.read_forum IS NULL OR fp.read_forum=1 ORDER BY c.disp_position, c.id, f.disp_position', true) 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)
- $output .= "\t\t\t\t\t\t".'</optgroup>'."\n";
-
- $output .= "\t\t\t\t\t\t".'<optgroup label="'.pun_htmlspecialchars($cur_forum['cat_name']).'">'."\n";
- $cur_category = $cur_forum['cid'];
- }
-
- $redirect_tag = ($cur_forum['redirect_url'] != '') ? ' >>>' : '';
- $output .= "\t\t\t\t\t\t\t".'<option value="'.$cur_forum['fid'].'"<?php echo ($forum_id == '.$cur_forum['fid'].') ? \' selected="selected"\' : \'\' ?>>'.pun_htmlspecialchars($cur_forum['forum_name']).$redirect_tag.'</option>'."\n";
- }
-
- $output .= "\t\t\t\t\t".'</optgroup>'."\n\t\t\t\t\t".'</select>'."\n\t\t\t\t\t".'<input type="submit" value="<?php echo $lang_common[\'Go\'] ?>" accesskey="g" />'."\n\t\t\t\t\t".'</label></div>'."\n\t\t\t\t".'</form>'."\n";
-
- fwrite($fh, $output);
-
- fclose($fh);
- }
-}
--- 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 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-// Enable DEBUG mode by removing // from the following line
-//define('PUN_DEBUG', 1);
-
-// This displays all executed queries in the page footer.
-// DO NOT enable this in a production environment!
-//define('PUN_SHOW_QUERIES', 1);
-
-if (!defined('PUN_ROOT'))
- exit('The constant PUN_ROOT must be defined and point to a valid PunBB installation root directory.');
-
-// Load the functions script
-require PUN_ROOT.'include/functions.php';
-
-// Load the compatibility layer between Pun's DBAL and Enano's DBAL
-require PUN_ROOT.'include/enano_dbal.php';
-
-// Reverse the effect of register_globals
-// unregister_globals(); // DISABLED for Enano
-
-// 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 <a href="install.php">install.php</a> 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();
-
--- 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 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-// Make sure no one attempts to run this script "directly"
-if (!defined('PUN'))
- exit;
-
-
-//
-// Display the admin navigation menu
-//
-function generate_admin_menu($page = '')
-{
- global $pun_config, $pun_user;
-
- $is_admin = $pun_user['g_id'] == PUN_ADMIN ? true : false;
-
-?>
-<div id="adminconsole" class="block2col">
- <div id="adminmenu" class="blockmenu">
- <h2><span><?php echo ($is_admin) ? 'Admin' : 'Moderator' ?> menu</span></h2>
- <div class="box">
- <div class="inbox">
- <ul>
- <li<?php if ($page == 'index') echo ' class="isactive"'; ?>><a href="<?php echo makeUrlNS('Special', 'Forum/Admin_Index'); ?>">Index</a></li>
-<?php if ($is_admin): ?> <li<?php if ($page == 'categories') echo ' class="isactive"'; ?>><a href="<?php echo makeUrlNS('Special', 'Forum/Admin_Categories'); ?>">Categories</a></li>
-<?php endif; ?><?php if ($is_admin): ?> <li<?php if ($page == 'forums') echo ' class="isactive"'; ?>><a href="<?php echo makeUrlNS('Special', 'Forum/Admin_Forums'); ?>">Forums</a></li>
-<?php endif; ?> <li<?php if ($page == 'users') echo ' class="isactive"'; ?>><a href="<?php echo makeUrlNS('Special', 'Forum/Admin_Users'); ?>">Users</a></li>
-<?php if ($is_admin): ?> <li<?php if ($page == 'groups') echo ' class="isactive"'; ?>><a href="<?php echo makeUrlNS('Special', 'Forum/Admin_Groups'); ?>">User groups</a></li>
-<?php endif; ?><?php if ($is_admin): ?> <li<?php if ($page == 'options') echo ' class="isactive"'; ?>><a href="<?php echo makeUrlNS('Special', 'Forum/Admin_Options'); ?>">Options</a></li>
-<?php endif; ?><?php if ($is_admin): ?> <li<?php if ($page == 'permissions') echo ' class="isactive"'; ?>><a href="<?php echo makeUrlNS('Special', 'Forum/Admin_Permissions'); ?>">Permissions</a></li>
-<?php endif; ?> <li<?php if ($page == 'censoring') echo ' class="isactive"'; ?>><a href="<?php echo makeUrlNS('Special', 'Forum/Admin_Censoring'); ?>">Censoring</a></li>
-<?php if ($is_admin): ?> <li<?php if ($page == 'ranks') echo ' class="isactive"'; ?>><a href="<?php echo makeUrlNS('Special', 'Forum/Admin_Ranks'); ?>">Ranks</a></li>
-<?php endif; ?><?php if ($is_admin || $pun_config['p_mod_ban_users'] == '1'): ?> <li<?php if ($page == 'bans') echo ' class="isactive"'; ?>><a href="<?php echo makeUrlNS('Special', 'Forum/Admin_Bans'); ?>">Bans</a></li>
-<?php endif; ?><?php if ($is_admin): ?> <li<?php if ($page == 'prune') echo ' class="isactive"'; ?>><a href="<?php echo makeUrlNS('Special', 'Forum/Admin_Prune'); ?>">Prune</a></li>
-<?php endif; ?><?php if ($is_admin): ?> <li<?php if ($page == 'maintenance') echo ' class="isactive"'; ?>><a href="<?php echo makeUrlNS('Special', 'Forum/Admin_Maintenance'); ?>">Maintenance</a></li>
-<?php endif; ?> <li<?php if ($page == 'reports') echo ' class="isactive"'; ?>><a href="<?php echo makeUrlNS('Special', 'Forum/Admin_Reports'); ?>">Reports</a></li>
- </ul>
- </div>
- </div>
-<?php
-
- // See if there are any plugins
- $plugins = array();
- $d = dir(PUN_ROOT.'plugins');
- while (($entry = $d->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))
- {
-
-?>
- <h2 class="block2"><span>Plugins</span></h2>
- <div class="box">
- <div class="inbox">
- <ul>
-<?php
-
- while (list(, $cur_plugin) = @each($plugins))
- echo "\t\t\t\t\t".'<li'.(($page == $cur_plugin[1]) ? ' class="isactive"' : '').'><a href="' . makeUrlNS('Special', 'Forum/Admin_Loader', 'plugin='.$cur_plugin[1], true) . '">'.str_replace('_', ' ', $cur_plugin[0]).'</a></li>'."\n";
-
-?>
- </ul>
- </div>
- </div>
-<?php
-
- }
-
-?>
- </div>
-
-<?php
-
-}
-
-
-//
-// Delete topics from $forum_id that are "older than" $prune_date (if $prune_sticky is 1, sticky topics will also be deleted)
-//
-function prune($forum_id, $prune_sticky, $prune_date)
-{
- global $pun_db;
-
- $extra_sql = ($prune_date != -1) ? ' AND last_post<'.$prune_date : '';
-
- if (!$prune_sticky)
- $extra_sql .= ' AND sticky=\'0\'';
-
- // Fetch topics to prune
- $result = $pun_db->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);
- }
- }
-}
--- 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 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// Make sure no one attempts to run this script "directly"
-if (!defined('PUN'))
- exit;
-
-
-//
-// Return current timestamp (with microseconds) as a float (used in dblayer)
-//
-if (defined('PUN_SHOW_QUERIES'))
-{
- function get_microtime()
- {
- list($usec, $sec) = explode(' ', microtime());
- return ((float)$usec + (float)$sec);
- }
-}
-
-
-// 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. Please check settings in config.php.', __FILE__, __LINE__);
- break;
-}
-
-
-// Create the database adapter object (and open/connect to/select db)
-$pun_db = new DBLayer($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/include/dblayer/enano_mysql.php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,295 @@
+<?php
+/***********************************************************************
+
+ Copyright (C) 2002-2008 PunBB.org
+
+ This file is part of PunBB.
+
+ PunBB 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.
+
+ PunBB 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
+
+************************************************************************/
+
+
+// Make sure we have built in support for MySQL
+if (!function_exists('mysql_connect'))
+ exit('This PHP environment doesn\'t have MySQL support built in. MySQL support is required if you want to use a MySQL database to run this forum. Consult the PHP documentation for further assistance.');
+
+
+class DBLayer
+{
+ var $prefix;
+ var $link_id;
+ var $query_result;
+
+ var $saved_queries = array();
+ var $num_queries = 0;
+
+
+ function DBLayer()
+ {
+ global $db;
+ $this->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__);
+ }
+}
--- /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 @@
+<?php
+/***********************************************************************
+
+ Copyright (C) 2002-2008 PunBB.org
+
+ This file is part of PunBB.
+
+ PunBB 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.
+
+ PunBB 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
+
+************************************************************************/
+
+
+// Make sure we have built in support for PostgreSQL
+if (!function_exists('pg_connect'))
+ exit('This PHP environment doesn\'t have PostgreSQL support built in. PostgreSQL support is required if you want to use a PostgreSQL database to run this forum. Consult the PHP documentation for further assistance.');
+
+
+class DBLayer
+{
+ var $prefix;
+ var $link_id;
+ var $query_result;
+ var $last_query_text = array();
+ var $in_transaction = 0;
+
+ var $saved_queries = array();
+ var $num_queries = 0;
+
+ var $error_no = false;
+ var $error_msg = 'Unknown';
+
+
+ function DBLayer()
+ {
+ global $db;
+ $this->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__);
+ }
+}
--- 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 @@
-<html>
-<head>
-<title>.</title>
-</head>
-<body>
-.
-</body>
-</html>
\ No newline at end of file
--- 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 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// Make sure we have built in support for MySQL
-if (!function_exists('mysql_connect'))
- exit('This PHP environment doesn\'t have MySQL support built in. MySQL support is required if you want to use a MySQL database to run this forum. Consult the PHP documentation for further assistance.');
-
-
-class DBLayer
-{
- var $prefix;
- var $link_id;
- var $query_result;
-
- var $saved_queries = array();
- var $num_queries = 0;
-
-
- function DBLayer($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect)
- {
- $this->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;
- }
-}
--- 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 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// Make sure we have built in support for MySQL
-if (!function_exists('mysqli_connect'))
- exit('This PHP environment doesn\'t have Improved MySQL (mysqli) support built in. Improved MySQL support is required if you want to use a MySQL 4.1 (or later) database to run this forum. Consult the PHP documentation for further assistance.');
-
-
-class DBLayer
-{
- var $prefix;
- var $link_id;
- var $query_result;
-
- var $saved_queries = array();
- var $num_queries = 0;
-
-
- function DBLayer($db_host, $db_username, $db_password, $db_name, $db_prefix, $foo)
- {
- $this->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;
- }
-}
--- 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 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// Make sure we have built in support for PostgreSQL
-if (!function_exists('pg_connect'))
- exit('This PHP environment doesn\'t have PostgreSQL support built in. PostgreSQL support is required if you want to use a PostgreSQL database to run this forum. Consult the PHP documentation for further assistance.');
-
-
-class DBLayer
-{
- var $prefix;
- var $link_id;
- var $query_result;
- var $last_query_text = array();
- var $in_transaction = 0;
-
- var $saved_queries = array();
- var $num_queries = 0;
-
- var $error_no = false;
- var $error_msg = 'Unknown';
-
-
- function DBLayer($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect)
- {
- $this->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;
- }
-}
--- 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 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// Make sure we have built in support for SQLite
-if (!function_exists('sqlite_open'))
- exit('This PHP environment doesn\'t have SQLite support built in. SQLite support is required if you want to use a SQLite database to run this forum. Consult the PHP documentation for further assistance.');
-
-
-class DBLayer
-{
- var $prefix;
- var $link_id;
- var $query_result;
- var $in_transaction = 0;
-
- var $saved_queries = array();
- var $num_queries = 0;
-
- var $error_no = false;
- var $error_msg = 'Unknown';
-
-
- function DBLayer($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect)
- {
- // Prepend $db_name with the path to the forum root directory
- $db_name = PUN_ROOT.$db_name;
-
- $this->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;
- }
-}
--- 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 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// Make sure no one attempts to run this script "directly"
-if (!defined('PUN'))
- exit;
-
-
-//
-// Validate an e-mail address
-//
-function is_valid_email($email)
-{
- if (strlen($email) > 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;
-}
--- 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 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Dan Fuhry (dan@enanocms.org)
-
- This file is part of the PunBB to Enano compatibility layer. No part
- of this file is included with any official PunBB distribution.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-/**
- * A compatibility layer to allow PunBB to use Enano's database abstraction layer.
- * @package Punano
- * @subpackage Database compatibility layer
- * @copyright (C) 2007 Dan Fuhry
- * @license GNU General Public License
- */
-
-class PunBB_DBAL_Enano
-{
-
- var $prefix;
- var $link_id;
- var $query_result;
-
- var $saved_queries = array();
- var $num_queries = 0;
-
-
- function PunBB_DBAL_Enano($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect)
- {
- $this->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;
- }
-
-}
-
--- /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 @@
+<?php
+/***********************************************************************
+
+ Copyright (C) 2002-2008 PunBB.org
+
+ This file is part of PunBB.
+
+ PunBB 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.
+
+ PunBB 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
+
+************************************************************************/
+
+
+// Enable DEBUG mode by removing // from the following line
+define('PUN_DEBUG', 1);
+
+// This displays all executed queries in the page footer.
+// DO NOT enable this in a production environment!
+//define('PUN_SHOW_QUERIES', 1);
+
+// Enable this if an extension is causing problems and you can't access the admin interface
+//define('PUN_DISABLE_HOOKS', 1);
+
+if (!defined('PUN_ROOT'))
+ exit('The constant PUN_ROOT must be defined and point to a valid PunBB installation root directory.');
+
+
+// Load the functions script
+require PUN_ROOT.'include/functions.php';
+
+// Reverse the effect of register_globals
+pun_unregister_globals();
+
+
+// Attempt to load the configuration file config.php
+if (file_exists(PUN_ROOT.'config.php'))
+ include PUN_ROOT.'config.php';
+
+if (!defined('PUN'))
+ error('The file \'config.php\' doesn\'t exist or is corrupt. Please run <a href="install.php">install.php</a> 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
--- 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 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-//
-// Cookie stuff!
-//
-function check_cookie(&$pun_user)
-{
- // Import Enano
- global $db, $session, $paths, $template, $plugins; // Common objects
-
- // Import PunBB
- global $pun_db, $db_type, $pun_config, $cookie_name, $cookie_seed;
-
- $now = time();
-
- if(!$session->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'].'<br /><br /><strong>'.pun_htmlspecialchars($cur_ban['message']).'</strong><br /><br />' : '<br /><br />').$lang_common['Ban message 4'].' <a href="mailto:'.$pun_config['o_admin_email'].'">'.$pun_config['o_admin_email'].'</a>.', 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'].'<br /><br /><strong>'.pun_htmlspecialchars($cur_ban['message']).'</strong><br /><br />' : '<br /><br />').$lang_common['Ban message 4'].' <a href="mailto:'.$pun_config['o_admin_email'].'">'.$pun_config['o_admin_email'].'</a>.', 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[] = '<li id="navindex"><a href="index.php">'.$lang_common['Index'].'</a>';
- $links[] = '<li id="navuserlist"><a href="userlist.php">'.$lang_common['User list'].'</a>';
-
- if ($pun_config['o_rules'] == '1')
- $links[] = '<li id="navrules"><a href="misc.php?action=rules">'.$lang_common['Rules'].'</a>';
-
- if ( !$session->user_logged_in )
- {
- if ($pun_user['g_search'] == '1')
- $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';
-
- $links[] = '<li id="navregister"><a href="register.php">'.$lang_common['Register'].'</a>';
- // $links[] = '<li id="navlogin"><a href="login.php">'.$lang_common['Login'].'</a>';
-
- $info = $lang_common['Not logged in'];
- }
- else
- {
- if ($pun_user['g_id'] < USER_LEVEL_ADMIN)
- {
- if ($pun_user['g_search'] == '1')
- $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';
-
- $links[] = '<li id="navprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
- // $links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
- }
- else
- {
- $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';
- $links[] = '<li id="navprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
- $links[] = '<li id="navadmin"><a href="admin_index.php">'.$lang_common['Admin'].'</a>';
- // $links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
- }
- }
-
- // Are there any additional navlinks we should insert into the array before imploding it?
- if ($pun_config['o_additional_navlinks'] != '')
- {
- if (preg_match_all('#([0-9]+)\s*=\s*(.*?)\n#s', $pun_config['o_additional_navlinks']."\n", $extra_links))
- {
- // Insert any additional links into the $links array (at the correct index)
- for ($i = 0; $i < count($extra_links[1]); ++$i)
- array_splice($links, $extra_links[1][$i], 0, array('<li id="navextra'.($i + 1).'">'.$extra_links[2][$i]));
- }
- }
-
- return '<ul>'."\n\t\t\t\t".implode($lang_common['Link separator'].'</li>'."\n\t\t\t\t", $links).'</li>'."\n\t\t\t".'</ul>';
-}
-
-
-//
-// Display the profile navigation menu
-//
-function generate_profile_menu($page = '')
-{
- global $lang_profile, $pun_config, $pun_user, $id, $lang_common;
-
-?>
-<div id="profile" class="block2col">
- <div class="blockmenu">
- <h2><span><?php echo $lang_profile['Profile menu'] ?></span></h2>
- <div class="box">
- <div class="inbox">
- <ul>
- <li<?php if ($page == 'essentials') echo ' class="isactive"'; ?>><a href="profile.php?section=essentials&id=<?php echo $id ?>"><?php echo $lang_profile['Section essentials'] ?></a></li>
- <li<?php if ($page == 'personal') echo ' class="isactive"'; ?>><a href="profile.php?section=personal&id=<?php echo $id ?>"><?php echo $lang_profile['Section personal'] ?></a></li>
- <li<?php if ($page == 'messaging') echo ' class="isactive"'; ?>><a href="profile.php?section=messaging&id=<?php echo $id ?>"><?php echo $lang_profile['Section messaging'] ?></a></li>
- <li<?php if ($page == 'personality') echo ' class="isactive"'; ?>><a href="profile.php?section=personality&id=<?php echo $id ?>"><?php echo $lang_profile['Section personality'] ?></a></li>
- <li<?php if ($page == 'display') echo ' class="isactive"'; ?>><a href="profile.php?section=display&id=<?php echo $id ?>"><?php echo $lang_profile['Section display'] ?></a></li>
- <li<?php if ($page == 'privacy') echo ' class="isactive"'; ?>><a href="profile.php?section=privacy&id=<?php echo $id ?>"><?php echo $lang_profile['Section privacy'] ?></a></li>
-<?php if ($pun_user['g_id'] == PUN_ADMIN || ($pun_user['g_id'] == PUN_MOD && $pun_config['p_mod_ban_users'] == '1')): ?> <li<?php if ($page == 'admin') echo ' class="isactive"'; ?>><a href="profile.php?section=admin&id=<?php echo $id ?>"><?php echo $lang_profile['Section admin'] ?></a></li>
-<?php endif; ?> </ul>
- </div>
- </div>
- </div>
-<?php
-
-}
-
-
-//
-// Update posts, topics, last_post, last_post_id and last_poster for a forum (redirect topics are not included)
-//
-function update_forum($forum_id)
-{
- global $pun_db;
-
- $result = $pun_db->query('SELECT COUNT(id), SUM(num_replies) FROM '.$pun_db->prefix.'topics WHERE moved_to IS NULL AND forum_id='.$forum_id) or error('Unable to fetch forum topic count', __FILE__, __LINE__, $pun_db->error());
- list($num_topics, $num_posts) = $pun_db->fetch_row($result);
-
- $num_posts = $num_posts + $num_topics; // $num_posts is only the sum of all replies (we have to add the topic posts)
-
- $result = $pun_db->query('SELECT last_post, last_post_id, last_poster FROM '.$pun_db->prefix.'topics WHERE forum_id='.$forum_id.' AND moved_to IS NULL ORDER BY last_post DESC LIMIT 1') or error('Unable to fetch last_post/last_post_id/last_poster', __FILE__, __LINE__, $pun_db->error());
- if ($pun_db->num_rows($result)) // There are topics in the forum
- {
- list($last_post, $last_post_id, $last_poster) = $pun_db->fetch_row($result);
-
- $pun_db->query('UPDATE '.$pun_db->prefix.'forums SET num_topics='.$num_topics.', num_posts='.$num_posts.', last_post='.$last_post.', last_post_id='.$last_post_id.', last_poster=\''.$pun_db->escape($last_poster).'\' WHERE id='.$forum_id) or error('Unable to update last_post/last_post_id/last_poster', __FILE__, __LINE__, $pun_db->error());
- }
- else // There are no topics
- $pun_db->query('UPDATE '.$pun_db->prefix.'forums SET num_topics=0, num_posts=0, last_post=NULL, last_post_id=NULL, last_poster=NULL WHERE id='.$forum_id) or error('Unable to update last_post/last_post_id/last_poster', __FILE__, __LINE__, $pun_db->error());
-}
-
-
-//
-// Delete a topic and all of it's posts
-//
-function delete_topic($topic_id)
-{
- global $pun_db;
-
- // Delete the topic and any redirect topics
- $pun_db->query('DELETE FROM '.$pun_db->prefix.'topics WHERE id='.$topic_id.' OR moved_to='.$topic_id) or error('Unable to delete topic', __FILE__, __LINE__, $pun_db->error());
-
- // Create a list of the post ID's in this topic
- $post_ids = '';
- $result = $pun_db->query('SELECT id FROM '.$pun_db->prefix.'posts WHERE topic_id='.$topic_id) or error('Unable to fetch posts', __FILE__, __LINE__, $pun_db->error());
- while ($row = $pun_db->fetch_row($result))
- $post_ids .= ($post_ids != '') ? ','.$row[0] : $row[0];
-
- // Make sure we have a list of post ID's
- if ($post_ids != '')
- {
- strip_search_index($post_ids);
-
- // Delete posts in topic
- $pun_db->query('DELETE FROM '.$pun_db->prefix.'posts WHERE topic_id='.$topic_id) or error('Unable to delete posts', __FILE__, __LINE__, $pun_db->error());
- }
-
- // Delete any subscriptions for this topic
- $pun_db->query('DELETE FROM '.$pun_db->prefix.'subscriptions WHERE topic_id='.$topic_id) or error('Unable to delete subscriptions', __FILE__, __LINE__, $pun_db->error());
-}
-
-
-//
-// Delete a single post
-//
-function delete_post($post_id, $topic_id)
-{
- global $pun_db;
-
- $result = $pun_db->query('SELECT id, poster, posted FROM '.$pun_db->prefix.'posts WHERE topic_id='.$topic_id.' ORDER BY id DESC LIMIT 2') or error('Unable to fetch post info', __FILE__, __LINE__, $pun_db->error());
- list($last_id, ,) = $pun_db->fetch_row($result);
- list($second_last_id, $second_poster, $second_posted) = $pun_db->fetch_row($result);
-
- // Delete the post
- $pun_db->query('DELETE FROM '.$pun_db->prefix.'posts WHERE id='.$post_id) or error('Unable to delete post', __FILE__, __LINE__, $pun_db->error());
-
- strip_search_index($post_id);
-
- // Count number of replies in the topic
- $result = $pun_db->query('SELECT COUNT(id) FROM '.$pun_db->prefix.'posts WHERE topic_id='.$topic_id) or error('Unable to fetch post count for topic', __FILE__, __LINE__, $pun_db->error());
- $num_replies = $pun_db->result($result, 0) - 1;
-
- // If the message we deleted is the most recent in the topic (at the end of the topic)
- if ($last_id == $post_id)
- {
- // If there is a $second_last_id there is more than 1 reply to the topic
- if (!empty($second_last_id))
- $pun_db->query('UPDATE '.$pun_db->prefix.'topics SET last_post='.$second_posted.', last_post_id='.$second_last_id.', last_poster=\''.$pun_db->escape($second_poster).'\', num_replies='.$num_replies.' WHERE id='.$topic_id) or error('Unable to update topic', __FILE__, __LINE__, $pun_db->error());
- else
- // We deleted the only reply, so now last_post/last_post_id/last_poster is posted/id/poster from the topic itself
- $pun_db->query('UPDATE '.$pun_db->prefix.'topics SET last_post=posted, last_post_id=id, last_poster=poster, num_replies='.$num_replies.' WHERE id='.$topic_id) or error('Unable to update topic', __FILE__, __LINE__, $pun_db->error());
- }
- else
- // Otherwise we just decrement the reply counter
- $pun_db->query('UPDATE '.$pun_db->prefix.'topics SET num_replies='.$num_replies.' WHERE id='.$topic_id) or error('Unable to update topic', __FILE__, __LINE__, $pun_db->error());
-}
-
-
-//
-// Replace censored words in $text
-//
-function censor_words($text)
-{
- global $pun_db;
- static $search_for, $replace_with;
-
- // If not already built in a previous call, build an array of censor words and their replacement text
- if (!isset($search_for))
- {
- $result = $pun_db->query('SELECT search_for, replace_with FROM '.$pun_db->prefix.'censoring') or error('Unable to fetch censor word list', __FILE__, __LINE__, $pun_db->error());
- $num_words = $pun_db->num_rows($result);
-
- $search_for = array();
- for ($i = 0; $i < $num_words; ++$i)
- {
- list($search_for[$i], $replace_with[$i]) = $pun_db->fetch_row($result);
- $search_for[$i] = '/\b('.str_replace('\*', '\w*?', preg_quote($search_for[$i], '/')).')\b/i';
- }
- }
-
- if (!empty($search_for))
- $text = substr(preg_replace($search_for, $replace_with, ' '.$text.' '), 1, -1);
-
- return $text;
-}
-
-
-//
-// Determines the correct title for $user
-// $user must contain the elements 'username', 'title', 'posts', 'g_id' and 'g_user_title'
-//
-function get_title($user)
-{
- global $pun_db, $pun_config, $pun_bans, $lang_common;
- static $ban_list, $pun_ranks;
-
- // If not already built in a previous call, build an array of lowercase banned usernames
- if (empty($ban_list))
- {
- $ban_list = array();
-
- foreach ($pun_bans as $cur_ban)
- $ban_list[] = strtolower($cur_ban['username']);
- }
-
- // If not already loaded in a previous call, load the cached ranks
- if ($pun_config['o_ranks'] == '1' && empty($pun_ranks))
- {
- @include PUN_ROOT.'cache/cache_ranks.php';
- if (!defined('PUN_RANKS_LOADED'))
- {
- require_once PUN_ROOT.'include/cache.php';
- generate_ranks_cache();
- require PUN_ROOT.'cache/cache_ranks.php';
- }
- }
-
- // If the user has a custom title
- if ($user['title'] != '')
- $user_title = pun_htmlspecialchars($user['title']);
- // If the user is banned
- else if (in_array(strtolower($user['username']), $ban_list))
- $user_title = $lang_common['Banned'];
- // If the user group has a default user title
- else if ($user['g_user_title'] != '')
- $user_title = pun_htmlspecialchars($user['g_user_title']);
- // If the user is a guest
- else if ($user['g_id'] == PUN_GUEST)
- $user_title = $lang_common['Guest'];
- else
- {
- // Are there any ranks?
- if ($pun_config['o_ranks'] == '1' && !empty($pun_ranks))
- {
- @reset($pun_ranks);
- while (list(, $cur_rank) = @each($pun_ranks))
- {
- if (intval($user['num_posts']) >= $cur_rank['min_posts'])
- $user_title = pun_htmlspecialchars($cur_rank['rank']);
- }
- }
-
- // If the user didn't "reach" any rank (or if ranks are disabled), we assign the default
- if (!isset($user_title))
- $user_title = $lang_common['Member'];
- }
-
- return $user_title;
-}
-
-
-//
-// Generate a string with numbered links (for multipage scripts)
-//
-function pun_paginate($num_pages, $cur_page, $link_to)
-{
- $pages = array();
- $link_to_all = false;
-
- // If $cur_page == -1, we link to all pages (used in viewforum.php)
- if ($cur_page == -1)
- {
- $cur_page = 1;
- $link_to_all = true;
- }
-
- if ($num_pages <= 1)
- $pages = array('<strong>1</strong>');
- else
- {
- if ($cur_page > 3)
- {
- $pages[] = '<a href="'.$link_to.'&p=1">1</a>';
-
- if ($cur_page != 4)
- $pages[] = '…';
- }
-
- // Don't ask me how the following works. It just does, OK? :-)
- for ($current = $cur_page - 2, $stop = $cur_page + 3; $current < $stop; ++$current)
- {
- if ($current < 1 || $current > $num_pages)
- continue;
- else if ($current != $cur_page || $link_to_all)
- $pages[] = '<a href="'.$link_to.'&p='.$current.'">'.$current.'</a>';
- else
- $pages[] = '<strong>'.$current.'</strong>';
- }
-
- if ($cur_page <= ($num_pages-3))
- {
- if ($cur_page != ($num_pages-3))
- $pages[] = '…';
-
- $pages[] = '<a href="'.$link_to.'&p='.$num_pages.'">'.$num_pages.'</a>';
- }
- }
-
- return implode(' ', $pages);
-}
-
-
-//
-// Display a message
-//
-function message($message, $no_back_link = false)
-{
- global $pun_db, $lang_common, $pun_config, $pun_start, $tpl_main;
-
- if (!defined('PUN_HEADER'))
- {
- global $pun_user;
-
- $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Info'];
- require PUN_ROOT.'header.php';
- }
-
-?>
-
-<div id="msg" class="block">
- <h2><span><?php echo $lang_common['Info'] ?></span></h2>
- <div class="box">
- <div class="inbox">
- <p><?php echo $message ?></p>
-<?php if (!$no_back_link): ?> <p><a href="javascript: history.go(-1)"><?php echo $lang_common['Go back'] ?></a></p>
-<?php endif; ?> </div>
- </div>
-</div>
-<?php
-
- require PUN_ROOT.'footer.php';
-}
-
-
-//
-// Format a time string according to $time_format and timezones
-//
-function format_time($timestamp, $date_only = false)
-{
- global $pun_config, $lang_common, $pun_user;
-
- if ($timestamp == '')
- return $lang_common['Never'];
-
- $diff = ($pun_user['timezone'] - $pun_config['o_server_timezone']) * 3600;
- $timestamp += $diff;
- $now = time();
-
- $date = date($pun_config['o_date_format'], $timestamp);
- $today = date($pun_config['o_date_format'], $now+$diff);
- $yesterday = date($pun_config['o_date_format'], $now+$diff-86400);
-
- if ($date == $today)
- $date = $lang_common['Today'];
- else if ($date == $yesterday)
- $date = $lang_common['Yesterday'];
-
- if (!$date_only)
- return $date.' '.date($pun_config['o_time_format'], $timestamp);
- else
- return $date;
-}
-
-
-//
-// If we are running pre PHP 4.3.0, we add our own implementation of file_get_contents
-//
-if (!function_exists('file_get_contents'))
-{
- function file_get_contents($filename, $use_include_path = 0)
- {
- $data = '';
-
- if ($fh = fopen($filename, 'rb', $use_include_path))
- {
- $data = fread($fh, filesize($filename));
- fclose($fh);
- }
-
- return $data;
- }
-}
-
-
-//
-// Make sure that HTTP_REFERER matches $pun_config['o_base_url']/$script
-//
-function confirm_referrer($script)
-{
- global $pun_config, $lang_common;
-
- // Not gonna worry about this for Enano, because Enano handles Pun's security
- return true;
-
- $script = preg_replace('/\.php$/i', '', $script);
-
- if ( isset($_SERVER['HTTP_REFERER']) )
- $referrer = strtolower($_SERVER['HTTP_REFERER']);
-
- $regex = '#^' . preg_quote(strtolower(str_replace('www.', '', $pun_config['o_base_url'])).'/'.$script, '#') . '#i';
- $ref_check = str_replace('www.', '', (isset($referrer) ? $referrer : ''));
-
- if ( !preg_match($regex, $ref_check) )
- message($lang_common['Bad referrer']);
-}
-
-
-//
-// Generate a random password of length $len
-//
-function random_pass($len)
-{
- $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
-
- $password = '';
- for ($i = 0; $i < $len; ++$i)
- $password .= substr($chars, (mt_rand() % strlen($chars)), 1);
-
- return $password;
-}
-
-
-//
-// Compute a hash of $str
-// Uses sha1() if available. If not, SHA1 through mhash() if available. If not, fall back on md5().
-//
-function pun_hash($str)
-{
- if (function_exists('sha1')) // Only in PHP 4.3.0+
- return sha1($str);
- else if (function_exists('mhash')) // Only if Mhash library is loaded
- return bin2hex(mhash(MHASH_SHA1, $str));
- else
- return md5($str);
-}
-
-
-//
-// Try to determine the correct remote IP-address
-//
-function get_remote_address()
-{
- return $_SERVER['REMOTE_ADDR'];
-}
-
-
-//
-// Equivalent to htmlspecialchars(), but allows &#[0-9]+ (for unicode)
-//
-function pun_htmlspecialchars($str)
-{
- $str = preg_replace('/&(?!#[0-9]+;)/s', '&', $str);
- $str = str_replace(array('<', '>', '"'), array('<', '>', '"'), $str);
-
- return $str;
-}
-
-
-//
-// Equivalent to strlen(), but counts &#[0-9]+ as one character (for unicode)
-//
-function pun_strlen($str)
-{
- return strlen(preg_replace('/&#([0-9]+);/', '!', $str));
-}
-
-
-//
-// Convert \r\n and \r to \n
-//
-function pun_linebreaks($str)
-{
- return str_replace("\r", "\n", str_replace("\r\n", "\n", $str));
-}
-
-
-//
-// A more aggressive version of trim()
-//
-function pun_trim($str)
-{
- global $lang_common;
-
- if (strpos($lang_common['lang_encoding'], '8859') !== false)
- {
- $fishy_chars = array(chr(0x81), chr(0x8D), chr(0x8F), chr(0x90), chr(0x9D), chr(0xA0));
- return trim(str_replace($fishy_chars, ' ', $str));
- }
- else
- return trim($str);
-}
-
-
-//
-// Display a message when board is in maintenance mode
-//
-function maintenance_message()
-{
- global $pun_db, $pun_config, $lang_common, $pun_user;
-
- // Deal with newlines, tabs and multiple spaces
- $pattern = array("\t", ' ', ' ');
- $replace = array(' ', ' ', ' ');
- $message = str_replace($pattern, $replace, $pun_config['o_maintenance_message']);
-
-
- // Load the maintenance template
- $tpl_maint = trim(file_get_contents(PUN_ROOT.'include/template/maintenance.tpl'));
-
-
- // START SUBST - <pun_include "*">
- while (preg_match('#<pun_include "([^/\\\\]*?)\.(php[45]?|inc|html?|txt)">#', $tpl_maint, $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 maintenance.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_maint = str_replace($cur_include[0], $tpl_temp, $tpl_maint);
- ob_end_clean();
- }
- // END SUBST - <pun_include "*">
-
-
- // START SUBST - <pun_content_direction>
- $tpl_maint = str_replace('<pun_content_direction>', $lang_common['lang_direction'], $tpl_maint);
- // END SUBST - <pun_content_direction>
-
-
- // START SUBST - <pun_char_encoding>
- $tpl_maint = str_replace('<pun_char_encoding>', $lang_common['lang_encoding'], $tpl_maint);
- // END SUBST - <pun_char_encoding>
-
-
- // START SUBST - <pun_head>
- ob_start();
-
-?>
-<title><?php echo pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Maintenance'] ?></title>
-<link rel="stylesheet" type="text/css" href="style/<?php echo $pun_user['style'].'.css' ?>" />
-<?php
-
- $tpl_temp = trim(ob_get_contents());
- $tpl_maint = str_replace('<pun_head>', $tpl_temp, $tpl_maint);
- ob_end_clean();
- // END SUBST - <pun_head>
-
-
- // START SUBST - <pun_maint_heading>
- $tpl_maint = str_replace('<pun_maint_heading>', $lang_common['Maintenance'], $tpl_maint);
- // END SUBST - <pun_maint_heading>
-
-
- // START SUBST - <pun_maint_message>
- $tpl_maint = str_replace('<pun_maint_message>', $message, $tpl_maint);
- // END SUBST - <pun_maint_message>
-
-
- // End the transaction
- $pun_db->end_transaction();
-
-
- // Close the db connection (and free up any result data)
- $pun_db->close();
-
- exit($tpl_maint);
-}
-
-
-//
-// Display $message and redirect user to $destination_url
-//
-function pun_redirect($destination_url, $message)
-{
- global $pun_db, $pun_config, $lang_common, $pun_user;
-
- if ($destination_url == '')
- $destination_url = 'index.php';
-
- if ( preg_match('/^admin_([a-z0-9_]+?)\.php$/i', $destination_url, $match) )
- {
- $module = capitalize_first_letter($match[1]);
- $destination_url = makeUrlNS('Special', 'Forum/Admin_' . $module);
- }
-
- // If the delay is 0 seconds, we might as well skip the redirect all together
- if ($pun_config['o_redirect_delay'] == '0')
- header('Location: '.str_replace('&', '&', $destination_url));
-
-
- // Load the redirect template
- $tpl_redir = trim(file_get_contents(PUN_ROOT.'include/template/redirect.tpl'));
-
-
- // START SUBST - <pun_include "*">
- while (preg_match('#<pun_include "([^/\\\\]*?)\.(php[45]?|inc|html?|txt)">#', $tpl_redir, $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 redirect.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_redir = str_replace($cur_include[0], $tpl_temp, $tpl_redir);
- ob_end_clean();
- }
- // END SUBST - <pun_include "*">
-
-
- // START SUBST - <pun_content_direction>
- $tpl_redir = str_replace('<pun_content_direction>', $lang_common['lang_direction'], $tpl_redir);
- // END SUBST - <pun_content_direction>
-
-
- // START SUBST - <pun_char_encoding>
- $tpl_redir = str_replace('<pun_char_encoding>', $lang_common['lang_encoding'], $tpl_redir);
- // END SUBST - <pun_char_encoding>
-
-
- // START SUBST - <pun_head>
- ob_start();
-
-?>
-<meta http-equiv="refresh" content="<?php echo $pun_config['o_redirect_delay'] ?>;URL=<?php echo str_replace(array('<', '>', '"'), array('<', '>', '"'), $destination_url) ?>" />
-<title><?php echo pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Redirecting'] ?></title>
-<link rel="stylesheet" type="text/css" href="<?php echo scriptPath; ?>/punbb/style/<?php echo $pun_user['style'].'.css' ?>" />
-<?php
-
- $tpl_temp = trim(ob_get_contents());
- $tpl_redir = str_replace('<pun_head>', $tpl_temp, $tpl_redir);
- ob_end_clean();
- // END SUBST - <pun_head>
-
-
- // START SUBST - <pun_redir_heading>
- $tpl_redir = str_replace('<pun_redir_heading>', $lang_common['Redirecting'], $tpl_redir);
- // END SUBST - <pun_redir_heading>
-
-
- // START SUBST - <pun_redir_text>
- $tpl_temp = $message.'<br /><br />'.'<a href="'.$destination_url.'">'.$lang_common['Click redirect'].'</a>';
- $tpl_redir = str_replace('<pun_redir_text>', $tpl_temp, $tpl_redir);
- // END SUBST - <pun_redir_text>
-
-
- // START SUBST - <pun_footer>
- ob_start();
-
- // End the transaction
- $pun_db->end_transaction();
-
- // Display executed queries (if enabled)
- if (defined('PUN_SHOW_QUERIES'))
- display_saved_queries();
-
- $tpl_temp = trim(ob_get_contents());
- $tpl_redir = str_replace('<pun_footer>', $tpl_temp, $tpl_redir);
- ob_end_clean();
- // END SUBST - <pun_footer>
-
-
- // Close the db connection (and free up any result data)
- $pun_db->close();
-
- exit($tpl_redir);
-}
-
-
-//
-// Display a simple error message
-//
-function error($message, $file, $line, $db_error = false)
-{
- global $pun_config;
-
- // Set a default title if the script failed before $pun_config could be populated
- if (empty($pun_config))
- $pun_config['o_board_title'] = 'PunBB';
-
- // Empty output buffer and stop buffering
- @ob_end_clean();
-
- // "Restart" output buffering if we are using ob_gzhandler (since the gzip header is already sent)
- if (!empty($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');
-
-?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title><?php echo pun_htmlspecialchars($pun_config['o_board_title']) ?> / Error</title>
-<style type="text/css">
-<!--
-BODY {MARGIN: 10% 20% auto 20%; font: 10px Verdana, Arial, Helvetica, sans-serif}
-#errorbox {BORDER: 1px solid #B84623}
-H2 {MARGIN: 0; COLOR: #FFFFFF; BACKGROUND-COLOR: #B84623; FONT-SIZE: 1.1em; PADDING: 5px 4px}
-#errorbox DIV {PADDING: 6px 5px; BACKGROUND-COLOR: #F1F1F1}
--->
-</style>
-</head>
-<body>
-
-<div id="errorbox">
- <h2>An error was encountered</h2>
- <div>
-<?php
-
- if (defined('PUN_DEBUG'))
- {
- echo "\t\t".'<strong>File:</strong> '.$file.'<br />'."\n\t\t".'<strong>Line:</strong> '.$line.'<br /><br />'."\n\t\t".'<strong>PunBB reported</strong>: '.$message."\n";
-
- if ($db_error)
- {
- echo "\t\t".'<br /><br /><strong>Database reported:</strong> '.pun_htmlspecialchars($db_error['error_msg']).(($db_error['error_no']) ? ' (Errno: '.$db_error['error_no'].')' : '')."\n";
-
- if ($db_error['error_sql'] != '')
- echo "\t\t".'<br /><br /><strong>Failed query:</strong> '.pun_htmlspecialchars($db_error['error_sql'])."\n";
- }
- }
- else
- echo "\t\t".'Error: <strong>'.$message.'.</strong>'."\n";
-
-?>
- </div>
-</div>
-
-</body>
-</html>
-<?php
-
- // If a database connection was established (before this error) we close it
- if ($db_error)
- $GLOBALS['db']->close();
-
- exit;
-}
-
-// DEBUG FUNCTIONS BELOW
-
-//
-// Display executed queries (if enabled)
-//
-function display_saved_queries()
-{
- global $pun_db, $lang_common;
-
- // Get the queries so that we can print them out
- $saved_queries = $pun_db->get_saved_queries();
-
-?>
-
-<div id="debug" class="blocktable">
- <h2><span><?php echo $lang_common['Debug table'] ?></span></h2>
- <div class="box">
- <div class="inbox">
- <table cellspacing="0">
- <thead>
- <tr>
- <th class="tcl" scope="col">Time (s)</th>
- <th class="tcr" scope="col">Query</th>
- </tr>
- </thead>
- <tbody>
-<?php
-
- $query_time_total = 0.0;
- while (list(, $cur_query) = @each($saved_queries))
- {
- $query_time_total += $cur_query[1];
-
-?>
- <tr>
- <td class="tcl"><?php echo ($cur_query[1] != 0) ? $cur_query[1] : ' ' ?></td>
- <td class="tcr"><?php echo pun_htmlspecialchars($cur_query[0]) ?></td>
- </tr>
-<?php
-
- }
-
-?>
- <tr>
- <td class="tcl" colspan="2">Total query time: <?php echo $query_time_total ?> s</td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
-</div>
-<?php
-
-}
-
-
-//
-// Unset any variables instantiated as a result of register_globals being enabled
-//
-function unregister_globals()
-{
- $register_globals = @ini_get('register_globals');
- if ($register_globals === "" || $register_globals === "0" || strtolower($register_globals === "off"))
- return;
-
- // Prevent script.php?GLOBALS[foo]=bar
- if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS']))
- exit('I\'ll have a steak sandwich and... a steak sandwich.');
-
- // Variables that shouldn't be unset
- $no_unset = array('GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES');
-
- // Remove elements in $GLOBALS that are present in any of the superglobals
- $input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES, isset($_SESSION) && is_array($_SESSION) ? $_SESSION : array());
- foreach ($input as $k => $v)
- {
- if (!in_array($k, $no_unset) && isset($GLOBALS[$k]))
- {
- unset($GLOBALS[$k]);
- unset($GLOBALS[$k]); // Double unset to circumvent the zend_hash_del_key_or_index hole in PHP <4.4.3 and <5.1.4
- }
- }
-}
-
-
-//
-// Dump contents of variable(s)
-//
-function dump()
-{
- echo '<pre>';
-
- $num_args = func_num_args();
-
- for ($i = 0; $i < $num_args; ++$i)
- {
- print_r(func_get_arg($i));
- echo "\n\n";
- }
-
- echo '</pre>';
- exit;
-}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/include/index.html Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,8 @@
+<html>
+<head>
+<title>.</title>
+</head>
+<body>
+.
+</body>
+</html>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/include/js/common.js Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,205 @@
+var Punbb = {
+ /* attach FN to WINDOW.ONLOAD handler */
+ addLoadEvent: function(fn)
+ {
+ var x = window.onload;
+ window.onload = (x && typeof x=='function') ? function(){x();fn()} : fn;
+ },
+ /* return TRUE if node N has class X, else FALSE */
+ hasClass: function(n, x)
+ {
+ return (new RegExp('\\b' + x + '\\b')).test(n.className)
+ },
+ /* add X class to N node, return TRUE if added, FALSE if already exists */
+ addClass: function(n, x)
+ {
+ if (Punbb.hasClass(n, x)) return false;
+ else n.className += ' ' + x;
+ return true;
+ },
+ /* remove X class from N node, return TRUE if removed, FALSE if not present */
+ removeClass: function(n, x)
+ {
+ if (!Punbb.hasClass(n, x)) return false;
+ x = new RegExp('\\s*\\b' + x + '\\b', 'g');
+ n.className = n.className.replace(x, '');
+ return true;
+ },
+ /* blink node N twice */
+ blink: function(n, i)
+ {
+ if (typeof i == 'undefined') i = 2;
+ var x = n.style.visibility;
+ if (i && x!='hidden')
+ {
+ n.style.visibility = 'hidden';
+ setTimeout(function(){n.style.visibility=x}, 200);
+ setTimeout(function(){Punbb.blink(n,i-1)}, 400);
+ }
+ },
+ /* return true if node N scrolled into view, else false (y axis only) */
+ onScreen: function(n)
+ {
+ function pageYOffset() // return number of pixels page has scrolled
+ {
+ var y = -1;
+ if (self.pageYOffset) y = self.pageYOffset; // all except IE
+ else if (document.documentElement && document.documentElement.scrollTop)
+ y = document.documentElement.scrollTop; // IE 6 Strict
+ else if (document.body) y = document.body.scrollTop; // all other IE ver
+ return y;
+ }
+ function innerHeight() // return inner height of browser window
+ {
+ var y = -1;
+ if (self.innerHeight) y = self.innerHeight; // all except IE
+ else if (document.documentElement && document.documentElement.clientHeight)
+ y = document.documentElement.clientHeight; // IE 6 Strict Mode
+ else if (document.body) y = document.body.clientHeight; // all other IE ver
+ return y;
+ }
+ function nodeYOffset(n) // return y coordinate of node N
+ {
+ var y = n.offsetTop;
+ n = n.offsetParent;
+ return n ? y += nodeYOffset(n) : y;
+ }
+ var screenTop = pageYOffset();
+ var screenBottom = screenTop + innerHeight();
+ var nodeTop = nodeYOffset(n);
+ var nodeBottom = nodeTop + n.clientHeight;
+ return nodeTop >= screenTop && nodeBottom < screenBottom;
+ },
+ /* apply FN to every ARR item, return array of results */
+ map: function(fn, arr)
+ {
+ for (var i=0,len=arr.length; i<len; i++)
+ {
+ arr[i] = fn(arr[i])
+ }
+ return arr;
+ },
+ /* return first index where FN(ARR[i]) is true or -1 if none */
+ find: function(fn, arr)
+ {
+ for (var i=0,len=arr.length; i<len; i++)
+ {
+ if (fn(arr[i])) return i;
+ }
+ return -1;
+ },
+ /* return array of elements for which FN(ARR[i]) is true */
+ arrayOfMatched: function(fn, arr)
+ {
+ matched = [];
+ for (var i=0,len=arr.length; i<len; i++)
+ {
+ if (fn(arr[i])) matched.push(arr[i])
+ }
+ return matched;
+ },
+ /* flattens multi-dimentional arrays into simple arrays */
+ flatten: function(arr)
+ {
+ flt = [];
+ for (var i=0,len=arr.length; i<len; i++)
+ {
+ if (typeof arr[i] == 'object' && arr.length) {
+ flt.concat(Punbb.flatten(arr[i]))
+ alert('length1!!'+ arr.length);
+ //x.hasChildNodes()
+ }
+ else flt.push(arr[i])
+ }
+ return flt
+ },
+ /* check FORM's required (REQ_) fields */
+ validateForm: function(form)
+ {
+ var elements = form.elements;
+ var fn = function(x) { return x.name && x.name.indexOf('req_')==0 };
+ var nodes = Punbb.arrayOfMatched(fn, elements);
+ fn = function(x) { return /^\s*$/.test(x.value) };
+ var empty = Punbb.find(fn, nodes);
+ if (empty > -1)
+ //if (Punbb.find(fn, nodes) > -1)
+ {
+ var n = document.getElementById('req-msg');
+ Punbb.removeClass(n, 'frm-warn');
+ var newlyAdded = Punbb.addClass(n, 'frm-error');
+ if (!Punbb.onScreen(n))
+ {
+ n.scrollIntoView(); // method not in W3C DOM, but fully cross-browser?
+ setTimeout(function(){Punbb.blink(n)}, 500);
+ }
+ else if (!newlyAdded) Punbb.blink(n);
+ if (Punbb.onScreen(nodes[empty])) nodes[empty].focus();
+ return false;
+ }
+ return true;
+ },
+ /* attach form validation function to submit-type inputs */
+ attachValidateForm: function()
+ {
+ var forms = document.forms;
+ for (var i=0,len=forms.length; i<len; i++)
+ {
+ var elements = forms[i].elements;
+ var fn = function(x) { return x.name && x.name.indexOf('req_')==0 };
+ if (Punbb.find(fn, elements) > -1)
+ {
+ fn = function(x) { return x.type && (x.type=='submit' && x.name!='cancel') };
+ var nodes = Punbb.arrayOfMatched(fn, elements)
+ var formRef = forms[i];
+ fn = function() { return Punbb.validateForm(formRef) };
+ //TODO: look at passing array of node refs instead of forum ref
+ //fn = function() { return Punbb.checkReq(required.slice(0)) };
+ nodes = Punbb.map(function(x){x.onclick=fn}, nodes);
+ }
+ }
+ },
+ attachWindowOpen: function()
+ {
+ if (!document.getElementsByTagName) return;
+ var nodes = document.getElementsByTagName('a');
+ for (var i=0; i<nodes.length; i++)
+ {
+ if (Punbb.hasClass(nodes[i], 'exthelp')) // || nodes[i].getAttribute('rel') == 'external')
+ nodes[i].onclick = function() { window.open(this.href); return false; };
+ }
+ },
+ autoFocus: function()
+ {
+ var nodes = document.getElementById('afocus');
+ if (!nodes || window.location.hash.replace(/#/g,'')) return;
+ nodes = nodes.all ? nodes.all : nodes.getElementsByTagName('*');
+ // TODO: make sure line above gets nodes in display-order across browsers
+ var fn = function(x) { return x.tagName.toUpperCase()=='TEXTAREA' || (x.tagName.toUpperCase()=='INPUT' && (x.type=='text') || (x.type=='password')) };
+ var n = Punbb.find(fn, nodes);
+ if (n > -1) nodes[n].focus();
+ }
+}
+Punbb.addLoadEvent(Punbb.attachValidateForm);
+Punbb.addLoadEvent(Punbb.attachWindowOpen);
+Punbb.addLoadEvent(Punbb.autoFocus);
+
+/* A handful of functions in this script have been released into the Public
+ Domain by Shawn Brown or other authors. Although I, Shawn Brown, do not
+ believe that it is legally necessary to note which parts of a Copyrighted
+ work are based on Public Domain content, a list of the Public Domain
+ code (functions and methods) contained in this file is included below:
+
+ * addLoadEvent: Released into the Public Domain by Shawn Brown and
+ based on Simon Willison's Public Domain function of the same name.
+ * hasClass, addClass & removeClass: Released into the Public Domain
+ by Shawn Brown.
+ * onScreen: Released into the Public Domain by Shawn Brown and based,
+ in-part, on Peter Paul-Koch's Public Domain node-position functions.
+ * map, find, arrayOfMatched & flatten: These basic functional methods
+ have been released into the Public Domain by Shawn Brown.
+
+ It is entirely possible that, in the future, someone may contribute code
+ that is in the Public Domain but not note it as such. This should not be
+ a problem, but one should keep in mind that the list provided here is known
+ to be complete and accurate only up until 24-JUNE-2007.
+*/
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/include/js/index.html Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,8 @@
+<html>
+<head>
+<title>.</title>
+</head>
+<body>
+.
+</body>
+</html>
\ No newline at end of file
--- a/punbb/include/parser.php Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,477 +0,0 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-// Make sure no one attempts to run this script "directly"
-if (!defined('PUN'))
- exit;
-
-
-// Here you can add additional smilies if you like (please note that you must escape singlequote and backslash)
-$smiley_text = array(':)', '=)', ':|', '=|', ':(', '=(', ':D', '=D', ':o', ':O', ';)', ':/', ':P', ':lol:', ':mad:', ':rolleyes:', ':cool:');
-$smiley_img = array('smile.png', 'smile.png', 'neutral.png', 'neutral.png', 'sad.png', 'sad.png', 'big_smile.png', 'big_smile.png', 'yikes.png', 'yikes.png', 'wink.png', 'hmm.png', 'tongue.png', 'lol.png', 'mad.png', 'roll.png', 'cool.png');
-
-// Uncomment the next row if you add smilies that contain any of the characters &"'<>
-//$smiley_text = array_map('pun_htmlspecialchars', $smiley_text);
-
-
-//
-// Make sure all BBCodes are lower case and do a little cleanup
-//
-function preparse_bbcode($text, &$errors, $is_signature = false)
-{
- // Change all simple BBCodes to lower case
- $a = array('[B]', '[I]', '[U]', '[/B]', '[/I]', '[/U]');
- $b = array('[b]', '[i]', '[u]', '[/b]', '[/i]', '[/u]');
- $text = str_replace($a, $b, $text);
-
- // Do the more complex BBCodes (also strip excessive whitespace and useless quotes)
- $a = array( '#\[url=("|\'|)(.*?)\\1\]\s*#i',
- '#\[url\]\s*#i',
- '#\s*\[/url\]#i',
- '#\[email=("|\'|)(.*?)\\1\]\s*#i',
- '#\[email\]\s*#i',
- '#\s*\[/email\]#i',
- '#\[img\]\s*(.*?)\s*\[/img\]#is',
- '#\[colou?r=("|\'|)(.*?)\\1\](.*?)\[/colou?r\]#is');
-
- $b = array( '[url=$2]',
- '[url]',
- '[/url]',
- '[email=$2]',
- '[email]',
- '[/email]',
- '[img]$1[/img]',
- '[color=$2]$3[/color]');
-
- if (!$is_signature)
- {
- // For non-signatures, we have to do the quote and code tags as well
- $a[] = '#\[quote=("|"|\'|)(.*?)\\1\]\s*#i';
- $a[] = '#\[quote\]\s*#i';
- $a[] = '#\s*\[/quote\]\s*#i';
- $a[] = '#\[code\][\r\n]*(.*?)\s*\[/code\]\s*#is';
-
- $b[] = '[quote=$1$2$1]';
- $b[] = '[quote]';
- $b[] = '[/quote]'."\n";
- $b[] = '[code]$1[/code]'."\n";
- }
-
- // Run this baby!
- $text = preg_replace($a, $b, $text);
-
- if (!$is_signature)
- {
- $overflow = check_tag_order($text, $error);
-
- if ($error)
- // A BBCode error was spotted in check_tag_order()
- $errors[] = $error;
- else if ($overflow)
- // The quote depth level was too high, so we strip out the inner most quote(s)
- $text = substr($text, 0, $overflow[0]).substr($text, $overflow[1], (strlen($text) - $overflow[0]));
- }
- else
- {
- global $lang_prof_reg;
-
- if (preg_match('#\[quote=("|"|\'|)(.*)\\1\]|\[quote\]|\[/quote\]|\[code\]|\[/code\]#i', $text))
- message($lang_prof_reg['Signature quote/code']);
- }
-
- return trim($text);
-}
-
-
-//
-// Parse text and make sure that [code] and [quote] syntax is correct
-//
-function check_tag_order($text, &$error)
-{
- global $lang_common;
-
- // The maximum allowed quote depth
- $max_depth = 3;
-
- $cur_index = 0;
- $q_depth = 0;
-
- while (true)
- {
- // Look for regular code and quote tags
- $c_start = strpos($text, '[code]');
- $c_end = strpos($text, '[/code]');
- $q_start = strpos($text, '[quote]');
- $q_end = strpos($text, '[/quote]');
-
- // Look for [quote=username] style quote tags
- if (preg_match('#\[quote=("|"|\'|)(.*)\\1\]#sU', $text, $matches))
- $q2_start = strpos($text, $matches[0]);
- else
- $q2_start = 65536;
-
- // Deal with strpos() returning false when the string is not found
- // (65536 is one byte longer than the maximum post length)
- if ($c_start === false) $c_start = 65536;
- if ($c_end === false) $c_end = 65536;
- if ($q_start === false) $q_start = 65536;
- if ($q_end === false) $q_end = 65536;
-
- // If none of the strings were found
- if (min($c_start, $c_end, $q_start, $q_end, $q2_start) == 65536)
- break;
-
- // We are interested in the first quote (regardless of the type of quote)
- $q3_start = ($q_start < $q2_start) ? $q_start : $q2_start;
-
- // We found a [quote] or a [quote=username]
- if ($q3_start < min($q_end, $c_start, $c_end))
- {
- $step = ($q_start < $q2_start) ? 7 : strlen($matches[0]);
-
- $cur_index += $q3_start + $step;
-
- // Did we reach $max_depth?
- if ($q_depth == $max_depth)
- $overflow_begin = $cur_index - $step;
-
- ++$q_depth;
- $text = substr($text, $q3_start + $step);
- }
-
- // We found a [/quote]
- else if ($q_end < min($q_start, $c_start, $c_end))
- {
- if ($q_depth == 0)
- {
- $error = $lang_common['BBCode error'].' '.$lang_common['BBCode error 1'];
- return;
- }
-
- $q_depth--;
- $cur_index += $q_end+8;
-
- // Did we reach $max_depth?
- if ($q_depth == $max_depth)
- $overflow_end = $cur_index;
-
- $text = substr($text, $q_end+8);
- }
-
- // We found a [code]
- else if ($c_start < min($c_end, $q_start, $q_end))
- {
- // Make sure there's a [/code] and that any new [code] doesn't occur before the end tag
- $tmp = strpos($text, '[/code]');
- $tmp2 = strpos(substr($text, $c_start+6), '[code]');
- if ($tmp2 !== false)
- $tmp2 += $c_start+6;
-
- if ($tmp === false || ($tmp2 !== false && $tmp2 < $tmp))
- {
- $error = $lang_common['BBCode error'].' '.$lang_common['BBCode error 2'];
- return;
- }
- else
- $text = substr($text, $tmp+7);
-
- $cur_index += $tmp+7;
- }
-
- // We found a [/code] (this shouldn't happen since we handle both start and end tag in the if clause above)
- else if ($c_end < min($c_start, $q_start, $q_end))
- {
- $error = $lang_common['BBCode error'].' '.$lang_common['BBCode error 3'];
- return;
- }
- }
-
- // If $q_depth <> 0 something is wrong with the quote syntax
- if ($q_depth)
- {
- $error = $lang_common['BBCode error'].' '.$lang_common['BBCode error 4'];
- return;
- }
- else if ($q_depth < 0)
- {
- $error = $lang_common['BBCode error'].' '.$lang_common['BBCode error 5'];
- return;
- }
-
- // If the quote depth level was higher than $max_depth we return the index for the
- // beginning and end of the part we should strip out
- if (isset($overflow_begin))
- return array($overflow_begin, $overflow_end);
- else
- return null;
-}
-
-
-//
-// Split text into chunks ($inside contains all text inside $start and $end, and $outside contains all text outside)
-//
-function split_text($text, $start, $end)
-{
- global $pun_config;
-
- $tokens = explode($start, $text);
-
- $outside[] = $tokens[0];
-
- $num_tokens = count($tokens);
- for ($i = 1; $i < $num_tokens; ++$i)
- {
- $temp = explode($end, $tokens[$i]);
- $inside[] = $temp[0];
- $outside[] = $temp[1];
- }
-
- if ($pun_config['o_indent_num_spaces'] != 8 && $start == '[code]')
- {
- $spaces = str_repeat(' ', $pun_config['o_indent_num_spaces']);
- $inside = str_replace("\t", $spaces, $inside);
- }
-
- return array($inside, $outside);
-}
-
-
-//
-// Truncate URL if longer than 55 characters (add http:// or ftp:// if missing)
-//
-function handle_url_tag($url, $link = '')
-{
- global $pun_user;
-
- $full_url = str_replace(array(' ', '\'', '`', '"'), array('%20', '', '', ''), $url);
- if (strpos($url, 'www.') === 0) // If it starts with www, we add http://
- $full_url = 'http://'.$full_url;
- else if (strpos($url, 'ftp.') === 0) // Else if it starts with ftp, we add ftp://
- $full_url = 'ftp://'.$full_url;
- else if (!preg_match('#^([a-z0-9]{3,6})://#', $url, $bah)) // Else if it doesn't start with abcdef://, we add http://
- $full_url = 'http://'.$full_url;
-
- // Ok, not very pretty :-)
- $link = ($link == '' || $link == $url) ? ((strlen($url) > 55) ? substr($url, 0 , 39).' … '.substr($url, -10) : $url) : stripslashes($link);
-
- return '<a href="'.$full_url.'">'.$link.'</a>';
-}
-
-
-//
-// Turns an URL from the [img] tag into an <img> tag or a <a href...> tag
-//
-function handle_img_tag($url, $is_signature = false)
-{
- global $lang_common, $pun_config, $pun_user;
-
- $img_tag = '<a href="'.$url.'"><'.$lang_common['Image link'].'></a>';
-
- if ($is_signature && $pun_user['show_img_sig'] != '0')
- $img_tag = '<img class="sigimage" src="'.$url.'" alt="'.htmlspecialchars($url).'" />';
- else if (!$is_signature && $pun_user['show_img'] != '0')
- $img_tag = '<img class="postimg" src="'.$url.'" alt="'.htmlspecialchars($url).'" />';
-
- return $img_tag;
-}
-
-
-//
-// Convert BBCodes to their HTML equivalent
-//
-function do_bbcode($text)
-{
- global $lang_common, $pun_user;
-
- if (strpos($text, 'quote') !== false)
- {
- $text = str_replace('[quote]', '</p><blockquote><div class="incqbox"><p>', $text);
- $text = preg_replace('#\[quote=("|"|\'|)(.*)\\1\]#seU', '"</p><blockquote><div class=\"incqbox\"><h4>".str_replace(array(\'[\', \'\\"\'), array(\'[\', \'"\'), \'$2\')." ".$lang_common[\'wrote\'].":</h4><p>"', $text);
- $text = preg_replace('#\[\/quote\]\s*#', '</p></div></blockquote><p>', $text);
- }
-
- $pattern = array('#\[b\](.*?)\[/b\]#s',
- '#\[i\](.*?)\[/i\]#s',
- '#\[u\](.*?)\[/u\]#s',
- '#\[url\]([^\[]*?)\[/url\]#e',
- '#\[url=([^\[]*?)\](.*?)\[/url\]#e',
- '#\[email\]([^\[]*?)\[/email\]#',
- '#\[email=([^\[]*?)\](.*?)\[/email\]#',
- '#\[color=([a-zA-Z]*|\#?[0-9a-fA-F]{6})](.*?)\[/color\]#s');
-
- $replace = array('<strong>$1</strong>',
- '<em>$1</em>',
- '<span class="bbu">$1</span>',
- 'handle_url_tag(\'$1\')',
- 'handle_url_tag(\'$1\', \'$2\')',
- '<a href="mailto:$1">$1</a>',
- '<a href="mailto:$1">$2</a>',
- '<span style="color: $1">$2</span>');
-
- // This thing takes a while! :)
- $text = preg_replace($pattern, $replace, $text);
-
- return $text;
-}
-
-
-//
-// Make hyperlinks clickable
-//
-function do_clickable($text)
-{
- global $pun_user;
-
- $text = ' '.$text;
-
- $text = preg_replace('#([\s\(\)])(https?|ftp|news){1}://([\w\-]+\.([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^"\s\(\)<\[]*)?)#ie', '\'$1\'.handle_url_tag(\'$2://$3\')', $text);
- $text = preg_replace('#([\s\(\)])(www|ftp)\.(([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^"\s\(\)<\[]*)?)#ie', '\'$1\'.handle_url_tag(\'$2.$3\', \'$2.$3\')', $text);
-
- return substr($text, 1);
-}
-
-
-//
-// Convert a series of smilies to images
-//
-function do_smilies($text)
-{
- global $smiley_text, $smiley_img;
-
- $text = ' '.$text.' ';
-
- $num_smilies = count($smiley_text);
- for ($i = 0; $i < $num_smilies; ++$i)
- $text = preg_replace("#(?<=.\W|\W.|^\W)".preg_quote($smiley_text[$i], '#')."(?=.\W|\W.|\W$)#m", '$1<img src="' . scriptPath . '/punbb/img/smilies/'.$smiley_img[$i].'" width="15" height="15" alt="'.substr($smiley_img[$i], 0, strrpos($smiley_img[$i], '.')).'" />$2', $text);
-
- return substr($text, 1, -1);
-}
-
-
-//
-// Parse message text
-//
-function parse_message($text, $hide_smilies)
-{
- global $pun_config, $lang_common, $pun_user;
-
- if ($pun_config['o_censoring'] == '1')
- $text = censor_words($text);
-
- // Convert applicable characters to HTML entities
- $text = pun_htmlspecialchars($text);
-
- // If the message contains a code tag we have to split it up (text within [code][/code] shouldn't be touched)
- if (strpos($text, '[code]') !== false && strpos($text, '[/code]') !== false)
- {
- list($inside, $outside) = split_text($text, '[code]', '[/code]');
- $outside = array_map('ltrim', $outside);
- $text = implode('<">', $outside);
- }
-
- if ($pun_config['o_make_links'] == '1')
- $text = do_clickable($text);
-
- if ($pun_config['o_smilies'] == '1' && $pun_user['show_smilies'] == '1' && $hide_smilies == '0')
- $text = do_smilies($text);
-
- if ($pun_config['p_message_bbcode'] == '1' && strpos($text, '[') !== false && strpos($text, ']') !== false)
- {
- $text = do_bbcode($text);
-
- if ($pun_config['p_message_img_tag'] == '1')
- {
-// $text = preg_replace('#\[img\]((ht|f)tps?://)([^\s<"]*?)\.(jpg|jpeg|png|gif)\[/img\]#e', 'handle_img_tag(\'$1$3.$4\')', $text);
- $text = preg_replace('#\[img\]((ht|f)tps?://)([^\s<"]*?)\[/img\]#e', 'handle_img_tag(\'$1$3\')', $text);
- }
- }
-
- // Deal with newlines, tabs and multiple spaces
- $pattern = array("\n", "\t", ' ', ' ');
- $replace = array('<br />', ' ', ' ', ' ');
- $text = str_replace($pattern, $replace, $text);
-
- // If we split up the message before we have to concatenate it together again (code tags)
- if (isset($inside))
- {
- $outside = explode('<">', $text);
- $text = '';
-
- $num_tokens = count($outside);
-
- for ($i = 0; $i < $num_tokens; ++$i)
- {
- $text .= $outside[$i];
- if (isset($inside[$i]))
- {
- $num_lines = ((substr_count($inside[$i], "\n")) + 3) * 1.5;
- $height_str = ($num_lines > 35) ? '35em' : $num_lines.'em';
- $text .= '</p><div class="codebox"><div class="incqbox"><h4>'.$lang_common['Code'].':</h4><div class="scrollbox" style="height: '.$height_str.'"><pre>'.$inside[$i].'</pre></div></div></div><p>';
- }
- }
- }
-
- // Add paragraph tag around post, but make sure there are no empty paragraphs
- $text = str_replace('<p></p>', '', '<p>'.$text.'</p>');
-
- return $text;
-}
-
-
-//
-// Parse signature text
-//
-function parse_signature($text)
-{
- global $pun_config, $lang_common, $pun_user;
-
- if ($pun_config['o_censoring'] == '1')
- $text = censor_words($text);
-
- $text = pun_htmlspecialchars($text);
-
- if ($pun_config['o_make_links'] == '1')
- $text = do_clickable($text);
-
- if ($pun_config['o_smilies_sig'] == '1' && $pun_user['show_smilies'] != '0')
- $text = do_smilies($text);
-
- if ($pun_config['p_sig_bbcode'] == '1' && strpos($text, '[') !== false && strpos($text, ']') !== false)
- {
- $text = do_bbcode($text);
-
- if ($pun_config['p_sig_img_tag'] == '1')
- {
-// $text = preg_replace('#\[img\]((ht|f)tps?://)([^\s<"]*?)\.(jpg|jpeg|png|gif)\[/img\]#e', 'handle_img_tag(\'$1$3.$4\', true)', $text);
- $text = preg_replace('#\[img\]((ht|f)tps?://)([^\s<"]*?)\[/img\]#e', 'handle_img_tag(\'$1$3\', true)', $text);
- }
- }
-
- // Deal with newlines, tabs and multiple spaces
- $pattern = array("\n", "\t", ' ', ' ');
- $replace = array('<br />', ' ', ' ', ' ');
- $text = str_replace($pattern, $replace, $text);
-
- return $text;
-}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/include/rewrite_rules.php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,69 @@
+<?php
+/***********************************************************************
+
+ Copyright (C) 2002-2008 PunBB.org
+
+ This file is part of PunBB.
+
+ PunBB 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.
+
+ PunBB 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
+
+************************************************************************/
+
+
+$pun_rewrite_rules = array(
+ '/^topic[\/_-]?([0-9]+).*(new|last)[\/_-]?(post)?s?(\.html?|\/)?$/i' => 'viewtopic.php?id=$1&action=$2',
+ '/^post[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'viewtopic.php?pid=$1',
+ '/^(forum|topic)[\/_-]?([0-9]+).*[\/_-]p(age)?[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'view$1.php?id=$2&p=$4',
+ '/^(f|t)(orum|opic)[\/_-]?([0-9]+)[\/_-](rss|atom)(\.html?|\/)?$/i' => 'extern.php?action=feed&$1id=$3&type=$4',
+ '/^(forum|topic)[\/_-]?([0-9]+).*(\.html?|\/)?$/i' => 'view$1.php?id=$2',
+ '/^new[\/_-]?reply[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'post.php?tid=$1',
+ '/^new[\/_-]?reply[\/_-]?([0-9]+)[\/_-]?quote[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'post.php?tid=$1&qid=$2',
+ '/^new[\/_-]?topic[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'post.php?fid=$1',
+ '/^(delete|edit)[\/_-]?([0-9]+)(\.html?|\/)?$/i' => '$1.php?id=$2',
+ '/^(login|search|register)(\.html?|\/)?$/i' => '$1.php',
+ '/^logout[\/_-]?([0-9]+)[\/_-]([a-z0-9]+)(\.html?|\/)?$/i' => 'login.php?action=out&id=$1&csrf_token=$2',
+ '/^request[\/_-]?password(\.html?|\/)?$/i' => 'login.php?action=forget',
+ '/^user[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'profile.php?id=$1',
+ '/^user[\/_-]?([0-9]+)[\/_-]?([a-z]+)(\.html?|\/)?$/i' => 'profile.php?section=$2&id=$1',
+ '/^(change|delete|upload)[\/_-]?(email|pass|avatar|user)(word)?[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'profile.php?action=$1_$2&id=$4',
+ '/^change[\/_-]?(email|pass)(word)?[\/_-]?([0-9]+)[\/_-]([a-zA-Z0-9]+)(\.html?|\/)?$/i' => 'profile.php?action=change_$1&id=$3&key=$4',
+ '/^search[\/_-]?(new|recent|unanswered|subscriptions)(\.html?|\/)?$/i' => 'search.php?action=show_$1',
+ '/^search[\/_-]?(new|recent|unanswered|subscriptions)[\/_-]p(age)?[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'search.php?action=show_$1&p=$3',
+ '/^search[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'search.php?search_id=$1',
+ '/^search[\/_-]?([0-9]+)[\/_-]?p(age)?[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'search.php?search_id=$1&p=$3',
+ '/^search[\/_-]?(posts|topics)[\/_-]?user[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'search.php?action=show_user_$1&user_id=$2',
+ '/^search[\/_-]?(posts|topics)[\/_-]?user[\/_-]?([0-9]+)[\/_-]?p(age)?[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'search.php?action=show_user_$1&user_id=$2&p=$4',
+ '/^search\/k(.*)\/([0-9-]+)\/a(.*)\/(message|subject|all)\/([0-9]+)\/(ASC|DESC)\/(posts|topics)\/?$/i' => 'search.php?action=search&keywords=$1&author=$3&forum=$2&search_in=$4&sort_by=$5&sort_dir=$6&show_as=$7',
+ '/^search\/k(.*)\/([0-9-]+)\/a(.*)\/(message|subject|all)\/([0-9]+)\/(ASC|DESC)\/(posts|topics)\/page\/([0-9]+)\/?$/i' => 'search.php?action=search&keywords=$1&author=$3&forum=$2&search_in=$4&sort_by=$5&sort_dir=$6&show_as=$7&p=$8',
+ '/^search-k(.*)-([0-9-]+)-a(.*)-(message|subject|all)-([0-9]+)-(ASC|DESC)-(posts|topics).html?$/i' => 'search.php?action=search&keywords=$1&author=$3&forum=$2&search_in=$4&sort_by=$5&sort_dir=$6&show_as=$7',
+ '/^search-k(.*)-(message|subject|all)-a(.*)-([0-9]+)-(ASC|DESC)-([0-9-]+)-(posts|topics)-p([0-9]+).html?$/i' => 'search.php?action=search&keywords=$1&author=$3&forum=$6&search_in=$2&sort_by=$4&sort_dir=$5&show_as=$7&p=$8',
+ '/^users(\.html?|\/)?$/i' => 'userlist.php',
+ '/^users\/(.*)\/([0-9-]+)\/?([a-z_]+)[\/_-]([a-zA-Z]+)[\/_-]p(age)?[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'userlist.php?username=$1&show_group=$2&sort_by=$3&sort_dir=$4&p=$6',
+ '/^(email|report|subscribe|unsubscribe)[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'misc.php?$1=$2',
+ '/^(mark|rules)[\/_-]?(read)?(\.html?|\/)?$/i' => 'misc.php?action=$1$2',
+ '/^mark[\/_-](forum)[\/_-]?([0-9]+)[\/_-](read)(\.html?|\/)?$/i' => 'misc.php?action=markforumread&fid=$2',
+ '/^help[\/_-]([a-z]+)(\.html?|\/)?$/i' => 'help.php?section=$1',
+ '/^moderate[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'moderate.php?fid=$1',
+ '/^move_topics[\/_-]?([0-9]+)[\/_-]([0-9]+)(\.html?|\/)?$/i' => 'moderate.php?fid=$1&move_topics=$2',
+ '/^(open|close|stick|unstick)[\/_-]?([0-9]+)[\/_-]([0-9]+)[\/_-]([a-z0-9]+)(\.html?|\/)?$/i' => 'moderate.php?fid=$2&$1=$3&csrf_token=$4',
+ '/^moderate[\/_-]?([0-9]+)[\/_-]?p(age)?[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'moderate.php?fid=$1&p=$3',
+ '/^moderate[\/_-]?([0-9]+)[\/_-]([0-9]+)(\.html?|\/)?$/i' => 'moderate.php?fid=$1&tid=$2',
+ '/^moderate[\/_-]?([0-9]+)[\/_-]([0-9]+)[\/_-]?p(age)?[\/_-]?([0-9]+)(\.html?|\/)?$/i' => 'moderate.php?fid=$1&tid=$2&p=$4',
+ '/^get_host[\/_-]?([0-9]+|[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})(\.html?|\/)?$/i' => 'moderate.php?get_host=$1',
+ '/^admin(\.html?|\/)?$/i' => 'admin/index.php',
+ '/^admin[\/_-]([a-z]+)(\.html?|\/)?$/i' => 'admin/$1.php',
+ '/^admin[\/_-]?(options|extensions)[\/_-]([a-z]+)(\.html?|\/)?$/i' => 'admin/$1.php?section=$2'
+);
--- a/punbb/include/search_idx.php Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,231 +0,0 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// The contents of this file are very much inspired by the file functions_search.php
-// from the phpBB Group forum software phpBB2 (http://www.phpbb.com).
-
-
-// Make sure no one attempts to run this script "directly"
-if (!defined('PUN'))
- exit;
-
-
-//
-// "Cleans up" a text string and returns an array of unique words
-// This function depends on the current locale setting
-//
-function split_words($text)
-{
- global $pun_user;
- static $noise_match, $noise_replace, $stopwords;
-
- if (empty($noise_match))
- {
- $noise_match = array('[quote', '[code', '[url', '[img', '[email', '[color', '[colour', 'quote]', 'code]', 'url]', 'img]', 'email]', 'color]', 'colour]', '^', '$', '&', '(', ')', '<', '>', '`', '\'', '"', '|', ',', '@', '_', '?', '%', '~', '+', '[', ']', '{', '}', ':', '\\', '/', '=', '#', ';', '!', '*');
- $noise_replace = array('', '', '', '', '', '', '', '', '', '', '', '', '', '', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '', '', ' ', ' ', ' ', ' ', '', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '' , ' ', ' ', ' ', ' ', ' ', ' ');
-
- $stopwords = (array)@file(PUN_ROOT.'lang/'.$pun_user['language'].'/stopwords.txt');
- $stopwords = array_map('trim', $stopwords);
- }
-
- // Clean up
- $patterns[] = '#&[\#a-z0-9]+?;#i';
- $patterns[] = '#\b[\w]+:\/\/[a-z0-9\.\-]+(\/[a-z0-9\?\.%_\-\+=&\/~]+)?#';
- $patterns[] = '#\[\/?[a-z\*=\+\-]+(\:?[0-9a-z]+)?:[a-z0-9]{10,}(\:[a-z0-9]+)?=?.*?\]#';
- $text = preg_replace($patterns, ' ', ' '.strtolower($text).' ');
-
- // Filter out junk
- $text = str_replace($noise_match, $noise_replace, $text);
-
- // Strip out extra whitespace between words
- $text = trim(preg_replace('#\s+#', ' ', $text));
-
- // Fill an array with all the words
- $words = explode(' ', $text);
-
- if (!empty($words))
- {
- while (list($i, $word) = @each($words))
- {
- $words[$i] = trim($word, '.');
- $num_chars = pun_strlen($word);
-
- if ($num_chars < 3 || $num_chars > 20 || in_array($word, $stopwords))
- unset($words[$i]);
- }
- }
-
- return array_unique($words);
-}
-
-
-//
-// Updates the search index with the contents of $post_id (and $subject)
-//
-function update_search_index($mode, $post_id, $message, $subject = null)
-{
- global $db_type, $pun_db;
-
- // Split old and new post/subject to obtain array of 'words'
- $words_message = split_words($message);
- $words_subject = ($subject) ? split_words($subject) : array();
-
- if ($mode == 'edit')
- {
- $result = $pun_db->query('SELECT w.id, w.word, m.subject_match FROM '.$pun_db->prefix.'search_words AS w INNER JOIN '.$pun_db->prefix.'search_matches AS m ON w.id=m.word_id WHERE m.post_id='.$post_id, true) or error('Unable to fetch search index words', __FILE__, __LINE__, $pun_db->error());
-
- // Declare here to stop array_keys() and array_diff() from complaining if not set
- $cur_words['post'] = array();
- $cur_words['subject'] = array();
-
- while ($row = $pun_db->fetch_row($result))
- {
- $match_in = ($row[2]) ? 'subject' : 'post';
- $cur_words[$match_in][$row[1]] = $row[0];
- }
-
- $pun_db->free_result($result);
-
- $words['add']['post'] = array_diff($words_message, array_keys($cur_words['post']));
- $words['add']['subject'] = array_diff($words_subject, array_keys($cur_words['subject']));
- $words['del']['post'] = array_diff(array_keys($cur_words['post']), $words_message);
- $words['del']['subject'] = array_diff(array_keys($cur_words['subject']), $words_subject);
- }
- else
- {
- $words['add']['post'] = $words_message;
- $words['add']['subject'] = $words_subject;
- $words['del']['post'] = array();
- $words['del']['subject'] = array();
- }
-
- unset($words_message);
- unset($words_subject);
-
- // Get unique words from the above arrays
- $unique_words = array_unique(array_merge($words['add']['post'], $words['add']['subject']));
-
- if (!empty($unique_words))
- {
- $result = $pun_db->query('SELECT id, word FROM '.$pun_db->prefix.'search_words WHERE word IN('.implode(',', preg_replace('#^(.*)$#', '\'\1\'', $unique_words)).')', true) or error('Unable to fetch search index words', __FILE__, __LINE__, $pun_db->error());
-
- $word_ids = array();
- while ($row = $pun_db->fetch_row($result))
- $word_ids[$row[1]] = $row[0];
-
- $pun_db->free_result($result);
-
- $new_words = array_diff($unique_words, array_keys($word_ids));
- unset($unique_words);
-
- if (!empty($new_words))
- {
- switch ($db_type)
- {
- case 'mysql':
- case 'mysqli':
- $pun_db->query('INSERT INTO '.$pun_db->prefix.'search_words (word) VALUES'.implode(',', preg_replace('#^(.*)$#', '(\'\1\')', $new_words))) or error('Unable to insert search index words', __FILE__, __LINE__, $pun_db->error());
- break;
-
- default:
- while (list(, $word) = @each($new_words))
- $pun_db->query('INSERT INTO '.$pun_db->prefix.'search_words (word) VALUES(\''.$word.'\')') or error('Unable to insert search index words', __FILE__, __LINE__, $pun_db->error());
- break;
- }
- }
-
- unset($new_words);
- }
-
- // Delete matches (only if editing a post)
- while (list($match_in, $wordlist) = @each($words['del']))
- {
- $subject_match = ($match_in == 'subject') ? 1 : 0;
-
- if (!empty($wordlist))
- {
- $sql = '';
- while (list(, $word) = @each($wordlist))
- $sql .= (($sql != '') ? ',' : '').$cur_words[$match_in][$word];
-
- $pun_db->query('DELETE FROM '.$pun_db->prefix.'search_matches WHERE word_id IN('.$sql.') AND post_id='.$post_id.' AND subject_match='.$subject_match) or error('Unable to delete search index word matches', __FILE__, __LINE__, $pun_db->error());
- }
- }
-
- // Add new matches
- while (list($match_in, $wordlist) = @each($words['add']))
- {
- $subject_match = ($match_in == 'subject') ? 1 : 0;
-
- if (!empty($wordlist))
- $pun_db->query('INSERT INTO '.$pun_db->prefix.'search_matches (post_id, word_id, subject_match) SELECT '.$post_id.', id, '.$subject_match.' FROM '.$pun_db->prefix.'search_words WHERE word IN('.implode(',', preg_replace('#^(.*)$#', '\'\1\'', $wordlist)).')') or error('Unable to insert search index word matches', __FILE__, __LINE__, $pun_db->error());
- }
-
- unset($words);
-}
-
-
-//
-// Strip search index of indexed words in $post_ids
-//
-function strip_search_index($post_ids)
-{
- global $db_type, $pun_db;
-
- switch ($db_type)
- {
- case 'mysql':
- case 'mysqli':
- {
- $result = $pun_db->query('SELECT word_id FROM '.$pun_db->prefix.'search_matches WHERE post_id IN('.$post_ids.') GROUP BY word_id') or error('Unable to fetch search index word match', __FILE__, __LINE__, $pun_db->error());
-
- if ($pun_db->num_rows($result))
- {
- $word_ids = '';
- while ($row = $pun_db->fetch_row($result))
- $word_ids .= ($word_ids != '') ? ','.$row[0] : $row[0];
-
- $result = $pun_db->query('SELECT word_id FROM '.$pun_db->prefix.'search_matches WHERE word_id IN('.$word_ids.') GROUP BY word_id HAVING COUNT(word_id)=1') or error('Unable to fetch search index word match', __FILE__, __LINE__, $pun_db->error());
-
- if ($pun_db->num_rows($result))
- {
- $word_ids = '';
- while ($row = $pun_db->fetch_row($result))
- $word_ids .= ($word_ids != '') ? ','.$row[0] : $row[0];
-
- $pun_db->query('DELETE FROM '.$pun_db->prefix.'search_words WHERE id IN('.$word_ids.')') or error('Unable to delete search index word', __FILE__, __LINE__, $pun_db->error());
- }
- }
-
- break;
- }
-
- default:
- $pun_db->query('DELETE FROM '.$pun_db->prefix.'search_words WHERE id IN(SELECT word_id FROM '.$pun_db->prefix.'search_matches WHERE word_id IN(SELECT word_id FROM '.$pun_db->prefix.'search_matches WHERE post_id IN('.$post_ids.') GROUP BY word_id) GROUP BY word_id HAVING COUNT(word_id)=1)') or error('Unable to delete from search index', __FILE__, __LINE__, $pun_db->error());
- break;
- }
-
- $pun_db->query('DELETE FROM '.$pun_db->prefix.'search_matches WHERE post_id IN('.$post_ids.')') or error('Unable to delete search index word match', __FILE__, __LINE__, $pun_db->error());
-}
--- a/punbb/include/template/admin.tpl Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" dir="<pun_content_direction>">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=<pun_char_encoding>" />
-<pun_head>
-</head>
-<body>
-
-<div id="punwrap">
-<div id="punadmin" class="pun">
-
-<div id="brdheader" class="block">
- <div class="box">
- <div id="brdtitle" class="inbox">
- <pun_title>
- <pun_desc>
- </div>
- <pun_navlinks>
- <pun_status>
- </div>
-</div>
-
-<pun_announcement>
-
-<pun_main>
-
-<pun_footer>
-
-</div>
-</div>
-
-</body>
-</html>
--- a/punbb/include/template/help.tpl Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" dir="<pun_content_direction>">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=<pun_char_encoding>" />
-<pun_head>
-</head>
-<body>
-
-<div id="punwrap">
-<div id="helpfile" class="pun">
-
-<pun_main>
-
-</div>
-</div>
-
-</body>
-</html>
--- a/punbb/include/template/index.html Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-<html>
-<head>
-<title>.</title>
-</head>
-<body>
-.
-</body>
-</html>
\ No newline at end of file
--- a/punbb/include/template/main.tpl Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" dir="<pun_content_direction>">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=<pun_char_encoding>" />
-<pun_head>
-</head>
-<body>
-
-<div id="punwrap">
-<div id="pun<pun_page>" class="pun">
-
-<div id="brdheader" class="block">
- <div class="box">
- <div id="brdtitle" class="inbox">
- <pun_title>
- <pun_desc>
- </div>
- <pun_navlinks>
- <pun_status>
- </div>
-</div>
-
-<pun_announcement>
-
-<pun_main>
-
-<pun_footer>
-
-</div>
-</div>
-
-</body>
-</html>
--- a/punbb/include/template/maintenance.tpl Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" dir="<pun_content_direction>">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=<pun_char_encoding>" />
-<pun_head>
-</head>
-<body>
-
-<div id="punwrap">
-<div id="punmaint" class="pun">
-
-<div class="block">
- <h2><pun_maint_heading></h2>
- <div class="box">
- <div class="inbox">
- <p><pun_maint_message></p>
- </div>
- </div>
-</div>
-
-</div>
-</div>
-
-</body>
-</html>
--- a/punbb/include/template/redirect.tpl Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" dir="<pun_content_direction>">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=<pun_char_encoding>" />
-<pun_head>
-</head>
-<body>
-
-<div id="punwrap">
-<div id="punredirect" class="pun">
-
-<div class="block">
- <h2><pun_redir_heading></h2>
- <div class="box">
- <div class="inbox">
- <p><pun_redir_text></p>
- </div>
- </div>
-</div>
-
-<pun_footer>
-
-</div>
-</div>
-
-</body>
-</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/include/url/Default.php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,118 @@
+<?php
+/***********************************************************************
+
+ Copyright (C) 2002-2008 PunBB.org
+
+ This file is part of PunBB.
+
+ PunBB 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.
+
+ PunBB 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
+
+************************************************************************/
+
+
+// Make sure no one attempts to run this script "directly"
+if (!defined('PUN'))
+ exit;
+
+// These are the regular, "non-SEF" URLs (you probably don't want to edit these)
+$pun_url = array(
+ 'change_email' => 'profile.php?action=change_email&id=$1',
+ 'change_email_key' => 'profile.php?action=change_email&id=$1&key=$2',
+ 'change_password' => 'profile.php?action=change_pass&id=$1',
+ 'change_password_key' => 'profile.php?action=change_pass&id=$1&key=$2',
+ 'delete_user' => 'profile.php?action=delete_user&id=$1',
+ 'delete' => 'delete.php?id=$1',
+ 'delete_avatar' => 'profile.php?action=delete_avatar&id=$1',
+ 'edit' => 'edit.php?id=$1',
+ 'email' => 'misc.php?email=$1',
+ 'forum' => 'viewforum.php?id=$1',
+ 'forum_rss' => 'extern.php?action=feed&fid=$1&type=rss',
+ 'forum_atom' => 'extern.php?action=feed&fid=$1&type=atom',
+ 'help' => 'help.php?section=$1',
+ 'index' => '',
+ 'login' => 'login.php',
+ 'logout' => 'login.php?action=out&id=$1&csrf_token=$2',
+ 'mark_read' => 'misc.php?action=markread',
+ 'mark_forum_read' => 'misc.php?action=markforumread&fid=$1',
+ 'new_topic' => 'post.php?fid=$1',
+ 'new_reply' => 'post.php?tid=$1',
+ 'post' => 'viewtopic.php?pid=$1#p$1',
+ 'profile_about' => 'profile.php?section=about&id=$1',
+ 'profile_identity' => 'profile.php?section=identity&id=$1',
+ 'profile_settings' => 'profile.php?section=settings&id=$1',
+ 'profile_preferences' => 'profile.php?section=preferences&id=$1',
+ 'profile_avatar' => 'profile.php?section=avatar&id=$1',
+ 'profile_signature' => 'profile.php?section=signature&id=$1',
+ 'profile_display' => 'profile.php?section=display&id=$1',
+ 'profile_privacy' => 'profile.php?section=privacy&id=$1',
+ 'profile_admin' => 'profile.php?section=admin&id=$1',
+ 'quote' => 'post.php?tid=$1&qid=$2',
+ 'register' => 'register.php',
+ 'report' => 'misc.php?report=$1',
+ 'request_password' => 'login.php?action=forget',
+ 'rules' => 'misc.php?action=rules',
+ 'search' => 'search.php',
+ 'search_resultft' => 'search.php?action=search&keywords=$1&author=$3&forum=$2&search_in=$4&sort_by=$5&sort_dir=$6&show_as=$7',
+ 'search_results' => 'search.php?search_id=$1',
+ 'search_new' => 'search.php?action=show_new',
+ 'search_24h' => 'search.php?action=show_recent',
+ 'search_unanswered' => 'search.php?action=show_unanswered',
+ 'search_subscriptions' => 'search.php?action=show_subscriptions',
+ 'search_user_posts' => 'search.php?action=show_user_posts&user_id=$1',
+ 'search_user_topics' => 'search.php?action=show_user_topics&user_id=$1',
+ 'subscribe' => 'misc.php?subscribe=$1',
+ 'topic' => 'viewtopic.php?id=$1',
+ 'topic_rss' => 'extern.php?action=feed&tid=$1&type=rss',
+ 'topic_atom' => 'extern.php?action=feed&tid=$1&type=atom',
+ 'topic_new_posts' => 'viewtopic.php?id=$1&action=new',
+ 'topic_last_post' => 'viewtopic.php?id=$1&action=last',
+ 'unsubscribe' => 'misc.php?unsubscribe=$1',
+ 'upload_avatar' => 'profile.php?action=upload_avatar&id=$1',
+ 'user' => 'profile.php?id=$1',
+ 'users' => 'userlist.php',
+ 'users_browse' => 'userlist.php?show_group=$1&sort_by=$2&sort_dir=$3&username=$4',
+ 'page' => '&p=$1',
+ 'moderate' => 'moderate.php',
+ 'moderate_forum' => 'moderate.php?fid=$1',
+ 'get_host' => 'moderate.php?get_host=$1',
+ 'move' => 'moderate.php?fid=$1&move_topics=$2',
+ 'open' => 'moderate.php?fid=$1&open=$2&csrf_token=$3',
+ 'close' => 'moderate.php?fid=$1&close=$2&csrf_token=$3',
+ 'stick' => 'moderate.php?fid=$1&stick=$2&csrf_token=$3',
+ 'unstick' => 'moderate.php?fid=$1&unstick=$2&csrf_token=$3',
+ 'delete_multiple' => 'moderate.php?fid=$1&tid=$2',
+ 'admin_index' => 'admin/index.php',
+ 'admin_bans' => 'admin/bans.php',
+ 'admin_categories' => 'admin/categories.php',
+ 'admin_censoring' => 'admin/censoring.php',
+ 'admin_extensions_manage' => 'admin/extensions.php?section=manage',
+ 'admin_extensions_install' => 'admin/extensions.php?section=install',
+ 'admin_forums' => 'admin/forums.php',
+ 'admin_groups' => 'admin/groups.php',
+ 'admin_loader' => 'admin/loader.php',
+ 'admin_reindex' => 'admin/reindex.php',
+ 'admin_options_setup' => 'admin/options.php?section=setup',
+ 'admin_options_features' => 'admin/options.php?section=features',
+ 'admin_options_content' => 'admin/options.php?section=content',
+ 'admin_options_email' => 'admin/options.php?section=email',
+ 'admin_options_registration' => 'admin/options.php?section=registration',
+ 'admin_options_communications' => 'admin/options.php?section=communications',
+ 'admin_options_maintenance' => 'admin/options.php?section=maintenance',
+ 'admin_prune' => 'admin/prune.php',
+ 'admin_ranks' => 'admin/ranks.php',
+ 'admin_reports' => 'admin/reports.php',
+ 'admin_users' => 'admin/users.php'
+);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/include/url/File_based.php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,117 @@
+<?php
+/***********************************************************************
+
+ Copyright (C) 2002-2008 PunBB.org
+
+ This file is part of PunBB.
+
+ PunBB 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.
+
+ PunBB 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
+
+************************************************************************/
+
+
+// Make sure no one attempts to run this script "directly"
+if (!defined('PUN'))
+ exit;
+
+// These are the simple file based SEF URLs
+$pun_url = array(
+ 'insertion_find' => '.html',
+ 'insertion_replace' => '-$1.html',
+ 'change_email' => 'change-email$1.html',
+ 'change_email_key' => 'change-email$1-$2.html',
+ 'change_password' => 'change-password$1.html',
+ 'change_password_key' => 'change-password$1-$2.html',
+ 'delete_user' => 'delete_user$1.html',
+ 'delete' => 'delete$1.html',
+ 'delete_avatar' => 'delete-avatar$1.html',
+ 'edit' => 'edit$1.html',
+ 'email' => 'email$1.html',
+ 'forum' => 'forum$1.html',
+ 'forum_rss' => 'forum$1-rss.html',
+ 'forum_atom' => 'forum$1-atom.html',
+ 'help' => 'help-$1.html',
+ 'index' => '',
+ 'login' => 'login.html',
+ 'logout' => 'logout$1-$2.html',
+ 'mark_read' => 'mark-read.html',
+ 'mark_forum_read' => 'mark-forum$1-read.html',
+ 'new_topic' => 'new-topic$1.html',
+ 'new_reply' => 'new-reply$1.html',
+ 'post' => 'post$1.html#p$1',
+ 'profile_about' => 'user$1-about.html',
+ 'profile_identity' => 'user$1-identity.html',
+ 'profile_settings' => 'user$1-settings.html',
+ 'profile_avatar' => 'user$1-avatar.html',
+ 'profile_signature' => 'user$1-signature.html',
+ 'profile_admin' => 'user$1-admin.html',
+ 'quote' => 'new-reply$1quote$2.html',
+ 'register' => 'register.html',
+ 'report' => 'report$1.html',
+ 'request_password' => 'request-password.html',
+ 'rules' => 'rules.html',
+ 'search' => 'search.html',
+ 'search_resultft' => 'search-k$1-$4-a$3-$5-$6-$2-$7.html',
+ 'search_results' => 'search$1.html',
+ 'search_new' => 'search-new.html',
+ 'search_24h' => 'search-recent.html',
+ 'search_unanswered' => 'search-unanswered.html',
+ 'search_subscriptions' => 'search-subscriptions.html',
+ 'search_user_posts' => 'search-posts-user$1.html',
+ 'search_user_topics' => 'search-topics-user$1.html',
+ 'subscribe' => 'subscribe$1.html',
+ 'topic' => 'topic$1.html',
+ 'topic_rss' => 'topic$1-rss.html',
+ 'topic_atom' => 'topic$1-atom.html',
+ 'topic_new_posts' => 'topic$1new-posts.html',
+ 'topic_last_post' => 'topic$1last-post.html',
+ 'unsubscribe' => 'unsubscribe$1.html',
+ 'upload_avatar' => 'upload-avatar$1.html',
+ 'user' => 'user$1.html',
+ 'users' => 'users.html',
+ 'users_browse' => 'users/$4/$1$2-$3.html',
+ 'page' => 'p$1',
+ 'moderate' => 'moderate.html',
+ 'moderate_forum' => 'moderate$1.html',
+ 'get_host' => 'get_host$1.html',
+ 'move' => 'move_topics$1-$2.html',
+ 'open' => 'open$1-$2-$3.html',
+ 'close' => 'close$1-$2-$3.html',
+ 'stick' => 'stick$1-$2-$3.html',
+ 'unstick' => 'unstick$1-$2-$3.html',
+ 'delete_multiple' => 'moderate$1-$2.html',
+ 'admin_index' => 'admin.html',
+ 'admin_bans' => 'admin-bans.html',
+ 'admin_categories' => 'admin-categories.html',
+ 'admin_censoring' => 'admin-censoring.html',
+ 'admin_extensions_manage' => 'admin-extensions-manage.html',
+ 'admin_extensions_install' => 'admin-extensions-install.html',
+ 'admin_forums' => 'admin-forums.html',
+ 'admin_groups' => 'admin-groups.html',
+ 'admin_loader' => 'admin-loader.html',
+ 'admin_reindex' => 'admin-reindex.html',
+ 'admin_options_setup' => 'admin-options-setup.html',
+ 'admin_options_features' => 'admin-options-features.html',
+ 'admin_options_content' => 'admin-options-content.html',
+ 'admin_options_email' => 'admin-options-email.html',
+ 'admin_options_registration' => 'admin-options-registration.html',
+ 'admin_options_communications' => 'admin-options-communications.html',
+ 'admin_options_maintenance' => 'admin-options-maintenance.html',
+ 'admin_prune' => 'admin-prune.html',
+ 'admin_ranks' => 'admin-ranks.html',
+ 'admin_reports' => 'admin-reports.html',
+ 'admin_users' => 'admin-users.html'
+);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/include/url/File_based_(fancy).php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,117 @@
+<?php
+/***********************************************************************
+
+ Copyright (C) 2002-2008 PunBB.org
+
+ This file is part of PunBB.
+
+ PunBB 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.
+
+ PunBB 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
+
+************************************************************************/
+
+
+// Make sure no one attempts to run this script "directly"
+if (!defined('PUN'))
+ exit;
+
+// These are the "fancy" file based SEF URLs
+$pun_url = array(
+ 'insertion_find' => '.html',
+ 'insertion_replace' => '-$1.html',
+ 'change_email' => 'change-email$1.html',
+ 'change_email_key' => 'change-email$1-$2.html',
+ 'change_password' => 'change-password$1.html',
+ 'change_password_key' => 'change-password$1-$2.html',
+ 'delete_user' => 'delete-user$1.html',
+ 'delete' => 'delete$1.html',
+ 'delete_avatar' => 'delete-avatar$1.html',
+ 'edit' => 'edit$1.html',
+ 'email' => 'email$1.html',
+ 'forum' => 'forum$1$2.html',
+ 'forum_rss' => 'forum$1-rss.html',
+ 'forum_atom' => 'forum$1-atom.html',
+ 'help' => 'help-$1.html',
+ 'index' => '',
+ 'login' => 'login.html',
+ 'logout' => 'logout$1-$2.html',
+ 'mark_read' => 'mark-read.html',
+ 'mark_forum_read' => 'mark-forum$1-read.html',
+ 'new_topic' => 'new-topic$1.html',
+ 'new_reply' => 'new-reply$1.html',
+ 'post' => 'post$1.html#p$1',
+ 'profile_about' => 'user$1-about.html',
+ 'profile_identity' => 'user$1-identity.html',
+ 'profile_settings' => 'user$1-settings.html',
+ 'profile_avatar' => 'user$1-avatar.html',
+ 'profile_signature' => 'user$1-signature.html',
+ 'profile_admin' => 'user$1-admin.html',
+ 'quote' => 'new-reply$1quote$2.html',
+ 'register' => 'register.html',
+ 'report' => 'report$1.html',
+ 'request_password' => 'request-password.html',
+ 'rules' => 'rules.html',
+ 'search' => 'search.html',
+ 'search_resultft' => 'search-k$1-$4-a$3-$5-$6-$2-$7.html',
+ 'search_results' => 'search$1.html',
+ 'search_new' => 'search-new.html',
+ 'search_24h' => 'search-recent.html',
+ 'search_unanswered' => 'search-unanswered.html',
+ 'search_subscriptions' => 'search-subscriptions.html',
+ 'search_user_posts' => 'search-posts-user$1.html',
+ 'search_user_topics' => 'search-topics-user$1.html',
+ 'subscribe' => 'subscribe$1.html',
+ 'topic' => 'topic$1$2.html',
+ 'topic_rss' => 'topic$1-rss.html',
+ 'topic_atom' => 'topic$1-atom.html',
+ 'topic_new_posts' => 'topic$1$2new-posts.html',
+ 'topic_last_post' => 'topic$1last-post.html',
+ 'unsubscribe' => 'unsubscribe$1.html',
+ 'upload_avatar' => 'upload-avatar$1.html',
+ 'user' => 'user$1.html',
+ 'users' => 'users.html',
+ 'users_browse' => 'users/$4/$1$2-$3.html',
+ 'page' => 'p$1',
+ 'moderate' => 'moderate.html',
+ 'moderate_forum' => 'moderate$1.html',
+ 'get_host' => 'get_host$1.html',
+ 'move' => 'move_topics$1-$2.html',
+ 'open' => 'open$1-$2-$3.html',
+ 'close' => 'close$1-$2-$3.html',
+ 'stick' => 'stick$1-$2-$3.html',
+ 'unstick' => 'unstick$1-$2-$3.html',
+ 'delete_multiple' => 'moderate$1-$2.html',
+ 'admin_index' => 'admin.html',
+ 'admin_bans' => 'admin-bans.html',
+ 'admin_categories' => 'admin-categories.html',
+ 'admin_censoring' => 'admin-censoring.html',
+ 'admin_extensions_manage' => 'admin-extensions-manage.html',
+ 'admin_extensions_install' => 'admin-extensions-install.html',
+ 'admin_forums' => 'admin-forums.html',
+ 'admin_groups' => 'admin-groups.html',
+ 'admin_loader' => 'admin-loader.html',
+ 'admin_reindex' => 'admin-reindex.html',
+ 'admin_options_setup' => 'admin-options-setup.html',
+ 'admin_options_features' => 'admin-options-features.html',
+ 'admin_options_content' => 'admin-options-content.html',
+ 'admin_options_email' => 'admin-options-email.html',
+ 'admin_options_registration' => 'admin-options-registration.html',
+ 'admin_options_communications' => 'admin-options-communications.html',
+ 'admin_options_maintenance' => 'admin-options-maintenance.html',
+ 'admin_prune' => 'admin-prune.html',
+ 'admin_ranks' => 'admin-ranks.html',
+ 'admin_reports' => 'admin-reports.html',
+ 'admin_users' => 'admin-users.html'
+);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/include/url/Folder_based.php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,115 @@
+<?php
+/***********************************************************************
+
+ Copyright (C) 2002-2008 PunBB.org
+
+ This file is part of PunBB.
+
+ PunBB 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.
+
+ PunBB 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
+
+************************************************************************/
+
+
+// Make sure no one attempts to run this script "directly"
+if (!defined('PUN'))
+ exit;
+
+// These are the simple folder based SEF URLs
+$pun_url = array(
+ 'change_email' => 'change/email/$1/',
+ 'change_email_key' => 'change/email/$1/$2/',
+ 'change_password' => 'change/password/$1/',
+ 'change_password_key' => 'change/password/$1/$2/',
+ 'delete' => 'delete/$1/',
+ 'delete_avatar' => 'delete/avatar/$1/',
+ 'delete_user' => 'delete/user/$1/',
+ 'edit' => 'edit/$1/',
+ 'email' => 'email/$1/',
+ 'forum' => 'forum/$1/',
+ 'forum_rss' => 'forum/$1/rss/',
+ 'forum_atom' => 'forum/$1/atom/',
+ 'help' => 'help/$1/',
+ 'index' => '',
+ 'login' => 'login/',
+ 'logout' => 'logout/$1/$2/',
+ 'mark_read' => 'mark/read/',
+ 'mark_forum_read' => 'mark/forum/$1/read/',
+ 'new_topic' => 'new/topic/$1/',
+ 'new_reply' => 'new/reply/$1/',
+ 'post' => 'post/$1/#p$1',
+ 'profile_about' => 'user/$1/about/',
+ 'profile_identity' => 'user/$1/identity/',
+ 'profile_settings' => 'user/$1/settings/',
+ 'profile_avatar' => 'user/$1/avatar/',
+ 'profile_signature' => 'user/$1/signature/',
+ 'profile_admin' => 'user/$1/admin/',
+ 'quote' => 'new/reply/$1/quote/$2/',
+ 'register' => 'register/',
+ 'report' => 'report/$1/',
+ 'request_password' => 'request/password/',
+ 'rules' => 'rules/',
+ 'search' => 'search/',
+ 'search_resultft' => 'search/k$1/$2/a$3/$4/$5/$6/$7/',
+ 'search_results' => 'search/$1/',
+ 'search_new' => 'search/new/',
+ 'search_24h' => 'search/recent/',
+ 'search_unanswered' => 'search/unanswered/',
+ 'search_subscriptions' => 'search/subscriptions/',
+ 'search_user_posts' => 'search/posts/user/$1/',
+ 'search_user_topics' => 'search/topics/user/$1/',
+ 'subscribe' => 'subscribe/$1/',
+ 'topic' => 'topic/$1/',
+ 'topic_rss' => 'topic/$1/rss/',
+ 'topic_atom' => 'topic/$1/atom/',
+ 'topic_new_posts' => 'topic/$1/new/posts/',
+ 'topic_last_post' => 'topic/$1/last/post/',
+ 'unsubscribe' => 'unsubscribe/$1/',
+ 'upload_avatar' => 'upload/avatar/$1/',
+ 'user' => 'user/$1/',
+ 'users' => 'users/',
+ 'users_browse' => 'users/$4/$1/$2/$3/',
+ 'page' => 'page/$1/',
+ 'moderate' => 'moderate/',
+ 'moderate_forum' => 'moderate/$1/',
+ 'get_host' => 'get_host/$1/',
+ 'move' => 'move_topics/$1/$2/',
+ 'open' => 'open/$1/$2/$3/',
+ 'close' => 'close/$1/$2/$3/',
+ 'stick' => 'stick/$1/$2/$3/',
+ 'unstick' => 'unstick/$1/$2/$3/',
+ 'delete_multiple' => 'moderate/$1/$2/',
+ 'admin_index' => 'admin/',
+ 'admin_bans' => 'admin/bans/',
+ 'admin_categories' => 'admin/categories/',
+ 'admin_censoring' => 'admin/censoring/',
+ 'admin_extensions_manage' => 'admin/extensions/manage/',
+ 'admin_extensions_install' => 'admin/extensions/install/',
+ 'admin_forums' => 'admin/forums/',
+ 'admin_groups' => 'admin/groups/',
+ 'admin_loader' => 'admin/loader/',
+ 'admin_reindex' => 'admin/reindex/',
+ 'admin_options_setup' => 'admin/options/setup/',
+ 'admin_options_features' => 'admin/options/features/',
+ 'admin_options_content' => 'admin/options/content/',
+ 'admin_options_email' => 'admin/options/email/',
+ 'admin_options_registration' => 'admin/options/registration/',
+ 'admin_options_communications' => 'admin/options/communications/',
+ 'admin_options_maintenance' => 'admin/options/maintenance/',
+ 'admin_prune' => 'admin/prune/',
+ 'admin_ranks' => 'admin/ranks/',
+ 'admin_reports' => 'admin/reports/',
+ 'admin_users' => 'admin/users/'
+);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/include/url/index.html Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,8 @@
+<html>
+<head>
+<title>.</title>
+</head>
+<body>
+.
+</body>
+</html>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/include/user/index.html Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,8 @@
+<html>
+<head>
+<title>.</title>
+</head>
+<body>
+.
+</body>
+</html>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/include/xml.php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,213 @@
+<?php
+/***********************************************************************
+
+ Copyright (C) 2002-2008 PunBB.org
+
+ This file is part of PunBB.
+
+ PunBB 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.
+
+ PunBB 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
+
+************************************************************************/
+
+
+// Make sure no one attempts to run this script "directly"
+if (!defined('PUN'))
+ exit;
+
+
+//
+// Parse XML data into an array
+//
+function xml_to_array($raw_xml)
+{
+ $xml_parser = xml_parser_create();
+ xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, 0);
+ xml_parser_set_option($xml_parser, XML_OPTION_SKIP_WHITE, 0);
+ xml_parse_into_struct($xml_parser, $raw_xml, $vals);
+ xml_parser_free($xml_parser);
+
+ $_tmp = '';
+ foreach ($vals as $xml_elem)
+ {
+ $x_tag = $xml_elem['tag'];
+ $x_level = $xml_elem['level'];
+ $x_type = $xml_elem['type'];
+
+ if ($x_level != 1 && $x_type == 'close')
+ {
+ if (isset($multi_key[$x_tag][$x_level]))
+ $multi_key[$x_tag][$x_level] = 1;
+ else
+ $multi_key[$x_tag][$x_level] = 0;
+ }
+
+ if ($x_level != 1 && $x_type == 'complete')
+ {
+ if ($_tmp == $x_tag)
+ $multi_key[$x_tag][$x_level] = 1;
+
+ $_tmp = $x_tag;
+ }
+ }
+
+ foreach ($vals as $xml_elem)
+ {
+ $x_tag = $xml_elem['tag'];
+ $x_level = $xml_elem['level'];
+ $x_type = $xml_elem['type'];
+
+ if ($x_type == 'open')
+ $level[$x_level] = $x_tag;
+
+ $start_level = 1;
+ $php_stmt = '$xml_array';
+ if ($x_type == 'close' && $x_level != 1)
+ $multi_key[$x_tag][$x_level]++;
+
+ while ($start_level < $x_level)
+ {
+ $php_stmt .= '[$level['.$start_level.']]';
+ if (isset($multi_key[$level[$start_level]][$start_level]) && $multi_key[$level[$start_level]][$start_level])
+ $php_stmt .= '['.($multi_key[$level[$start_level]][$start_level]-1).']';
+
+ ++$start_level;
+ }
+
+ $add = '';
+ if (isset($multi_key[$x_tag][$x_level]) && $multi_key[$x_tag][$x_level] && ($x_type == 'open' || $x_type == 'complete'))
+ {
+ if (!isset($multi_key2[$x_tag][$x_level]))
+ $multi_key2[$x_tag][$x_level] = 0;
+ else
+ $multi_key2[$x_tag][$x_level]++;
+
+ $add = '['.$multi_key2[$x_tag][$x_level].']';
+ }
+
+ if (isset($xml_elem['value']) && trim($xml_elem['value']) != '' && !array_key_exists('attributes', $xml_elem))
+ {
+ if ($x_type == 'open')
+ $php_stmt_main = $php_stmt.'[$x_type]'.$add.'[\'content\'] = $xml_elem[\'value\'];';
+ else
+ $php_stmt_main = $php_stmt.'[$x_tag]'.$add.' = $xml_elem[\'value\'];';
+
+ eval($php_stmt_main);
+ }
+
+ if (array_key_exists('attributes', $xml_elem))
+ {
+ if (isset($xml_elem['value']))
+ {
+ $php_stmt_main = $php_stmt.'[$x_tag]'.$add.'[\'content\'] = $xml_elem[\'value\'];';
+ eval($php_stmt_main);
+ }
+
+ foreach ($xml_elem['attributes'] as $key=>$value)
+ {
+ $php_stmt_att=$php_stmt.'[$x_tag]'.$add.'[\'attributes\'][$key] = $value;';
+ eval($php_stmt_att);
+ }
+ }
+ }
+
+ if (isset($xml_array))
+ {
+ // Make sure there's an array of notes (even if there is only one)
+ if (isset($xml_array['extension']['note']))
+ {
+ if (!is_array(current($xml_array['extension']['note'])))
+ $xml_array['extension']['note'] = array($xml_array['extension']['note']);
+ }
+ else
+ $xml_array['extension']['note'] = array();
+
+ // Make sure there's an array of hooks (even if there is only one)
+ if (isset($xml_array['extension']['hooks']) && isset($xml_array['extension']['hooks']['hook']))
+ {
+ if (!is_array(current($xml_array['extension']['hooks']['hook'])))
+ $xml_array['extension']['hooks']['hook'] = array($xml_array['extension']['hooks']['hook']);
+ }
+ }
+
+ return isset($xml_array) ? $xml_array : array();
+}
+
+
+//
+// Validate the syntax of an extension manifest file
+//
+function validate_manifest($xml_array, $folder_name)
+{
+ global $lang_admin, $pun_config;
+
+ $errors = array();
+
+ if (!isset($xml_array['extension']) || !is_array($xml_array['extension']))
+ $errors[] = $lang_admin['extension root error'];
+ else
+ {
+ $ext = $xml_array['extension'];
+ if (!isset($ext['attributes']['engine']))
+ $errors[] = $lang_admin['extension/engine error'];
+ else if ($ext['attributes']['engine'] != '1.0')
+ $errors[] = $lang_admin['extension/engine error2'];
+ if (!isset($ext['id']) || $ext['id'] == '')
+ $errors[] = $lang_admin['extension/id error'];
+ if ($ext['id'] != $folder_name)
+ $errors[] = $lang_admin['extension/id error2'];
+ if (!isset($ext['title']) || $ext['title'] == '')
+ $errors[] = $lang_admin['extension/title error'];
+ if (!isset($ext['version']) || $ext['version'] == '')
+ $errors[] = $lang_admin['extension/version error'];
+ if (!isset($ext['description']) || $ext['description'] == '')
+ $errors[] = $lang_admin['extension/description error'];
+ if (!isset($ext['author']) || $ext['author'] == '')
+ $errors[] = $lang_admin['extension/author error'];
+ if (!isset($ext['minversion']) || $ext['minversion'] == '')
+ $errors[] = $lang_admin['extension/minversion error'];
+ if (isset($ext['minversion']) && version_compare(clean_version($pun_config['o_cur_version']), clean_version($ext['minversion']), '<'))
+ $errors[] = sprintf($lang_admin['extension/minversion error2'], $ext['minversion']);
+ if (!isset($ext['maxtestedon']) || $ext['maxtestedon'] == '')
+ $errors[] = $lang_admin['extension/maxtestedon error'];
+ if (isset($ext['note']))
+ {
+ foreach ($ext['note'] as $note)
+ {
+ if (!isset($note['content']) || $note['content'] == '')
+ $errors[] = $lang_admin['extension/note error'];
+ if (!isset($note['attributes']['type']) || $note['attributes']['type'] == '')
+ $errors[] = $lang_admin['extension/note error2'];
+ }
+ }
+ if (isset($ext['hooks']) && is_array($ext['hooks']))
+ {
+ if (!isset($ext['hooks']['hook']) || !is_array($ext['hooks']['hook']))
+ $errors[] = $lang_admin['extension/hooks/hook error'];
+ else
+ {
+ foreach ($ext['hooks']['hook'] as $hook)
+ {
+ if (!isset($hook['content']) || $hook['content'] == '')
+ $errors[] = $lang_admin['extension/hooks/hook error'];
+ if (!isset($hook['attributes']['id']) || $hook['attributes']['id'] == '')
+ $errors[] = $lang_admin['extension/hooks/hook error2'];
+ }
+ }
+ }
+ }
+
+ return $errors;
+}
--- a/punbb/index.php Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,213 +0,0 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-if ($pun_user['g_read_board'] == '0')
- message($lang_common['No view']);
-
-// Load the index.php language file
-require PUN_ROOT.'lang/'.$pun_user['language'].'/index.php';
-
-$page_title = pun_htmlspecialchars($pun_config['o_board_title']);
-define('PUN_ALLOW_INDEX', 1);
-require PUN_ROOT.'header.php';
-
-// Print the categories and forums
-$result = $pun_db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.redirect_url, f.moderators, f.num_topics, f.num_posts, f.last_post, f.last_post_id, f.last_poster FROM '.$pun_db->prefix.'categories AS c INNER JOIN '.$pun_db->prefix.'forums AS f ON c.id=f.cat_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 ORDER BY c.disp_position, c.id, f.disp_position', true) or error('Unable to fetch category/forum list', __FILE__, __LINE__, $pun_db->error());
-
-$cur_category = 0;
-$cat_count = 0;
-while ($cur_forum = $pun_db->fetch_assoc($result))
-{
- $moderators = '';
-
- if ($cur_forum['cid'] != $cur_category) // A new category since last iteration?
- {
- if ($cur_category != 0)
- echo "\t\t\t".'</tbody>'."\n\t\t\t".'</table>'."\n\t\t".'</div>'."\n\t".'</div>'."\n".'</div>'."\n\n";
-
- ++$cat_count;
-
-?>
-<div id="idx<?php echo $cat_count ?>" class="blocktable">
- <h2><span><?php echo pun_htmlspecialchars($cur_forum['cat_name']) ?></span></h2>
- <div class="box">
- <div class="inbox">
- <table cellspacing="0">
- <thead>
- <tr>
- <th class="tcl" scope="col"><?php echo $lang_common['Forum'] ?></th>
- <th class="tc2" scope="col"><?php echo $lang_index['Topics'] ?></th>
- <th class="tc3" scope="col"><?php echo $lang_common['Posts'] ?></th>
- <th class="tcr" scope="col"><?php echo $lang_common['Last post'] ?></th>
- </tr>
- </thead>
- <tbody>
-<?php
-
- $cur_category = $cur_forum['cid'];
- }
-
- $item_status = '';
- $icon_text = $lang_common['Normal icon'];
- $icon_type = 'icon';
-
- // Are there new posts?
- if (!$pun_user['is_guest'] && $cur_forum['last_post'] > $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 = '<h3><a href="'.pun_htmlspecialchars($cur_forum['redirect_url']).'" title="'.$lang_index['Link to'].' '.pun_htmlspecialchars($cur_forum['redirect_url']).'">'.pun_htmlspecialchars($cur_forum['forum_name']).'</a></h3>';
- $num_topics = $num_posts = ' ';
- $item_status = 'iredirect';
- $icon_text = $lang_common['Redirect icon'];
- $icon_type = 'icon';
- }
- else
- {
- $forum_field = '<h3><a href="'.makeUrlNS('Special', 'Forum/ViewForum', 'id='.$cur_forum['fid'], true).'">'.pun_htmlspecialchars($cur_forum['forum_name']).'</a></h3>';
- $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 = '<a href="viewtopic.php?pid='.$cur_forum['last_post_id'].'#p'.$cur_forum['last_post_id'].'">'.format_time($cur_forum['last_post']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_forum['last_poster']).'</span>';
- 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[] = '<a href="profile.php?id='.$mod_id.'">'.pun_htmlspecialchars($mod_username).'</a>';
-
- $moderators = "\t\t\t\t\t\t\t\t".'<p><em>('.$lang_common['Moderated by'].'</em> '.implode(', ', $moderators).')</p>'."\n";
- }
-
-?>
- <tr<?php if ($item_status != '') echo ' class="'.$item_status.'"'; ?>>
- <td class="tcl">
- <div class="intd">
- <div class="<?php echo $icon_type ?>"><div class="nosize"><?php echo $icon_text ?></div></div>
- <div class="tclcon">
- <?php echo $forum_field."\n".$moderators ?>
- </div>
- </div>
- </td>
- <td class="tc2"><?php echo $num_topics ?></td>
- <td class="tc3"><?php echo $num_posts ?></td>
- <td class="tcr"><?php echo $last_post ?></td>
- </tr>
-<?php
-
-}
-
-// Did we output any categories and forums?
-if ($cur_category > 0)
- echo "\t\t\t".'</tbody>'."\n\t\t\t".'</table>'."\n\t\t".'</div>'."\n\t".'</div>'."\n".'</div>'."\n\n";
-else
- echo '<div id="idx0" class="block"><div class="box"><div class="inbox"><p>'.$lang_index['Empty board'].'</p></div></div></div>';
-
-
-// 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);
-
-?>
-<div id="brdstats" class="block">
- <h2><span><?php echo $lang_index['Board info'] ?></span></h2>
- <div class="box">
- <div class="inbox">
- <dl class="conr">
- <dt><strong><?php echo $lang_index['Board stats'] ?></strong></dt>
- <dd><?php echo $lang_index['No of users'].': <strong>'. $stats['total_users'] ?></strong></dd>
- <dd><?php echo $lang_index['No of topics'].': <strong>'.$stats['total_topics'] ?></strong></dd>
- <dd><?php echo $lang_index['No of posts'].': <strong>'.$stats['total_posts'] ?></strong></dd>
- </dl>
- <dl class="conl">
- <dt><strong><?php echo $lang_index['User info'] ?></strong></dt>
- <dd><?php echo $lang_index['Newest user'] ?>: <a href="profile.php?id=<?php echo $stats['last_user']['id'] ?>"><?php echo pun_htmlspecialchars($stats['last_user']['username']) ?></a></dd>
-<?php
-
-if ($pun_config['o_users_online'] == '1')
-{
- // Fetch users online info and generate strings for output
- $num_guests = 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[] = "\n\t\t\t\t".'<dd><a href="profile.php?id='.$pun_user_online['user_id'].'">'.pun_htmlspecialchars($pun_user_online['ident']).'</a>';
- else
- ++$num_guests;
- }
-
- $num_users = count($users);
- echo "\t\t\t\t".'<dd>'. $lang_index['Users online'].': <strong>'.$num_users.'</strong></dd>'."\n\t\t\t\t".'<dd>'.$lang_index['Guests online'].': <strong>'.$num_guests.'</strong></dd>'."\n\t\t\t".'</dl>'."\n";
-
-
- if ($num_users > 0)
- echo "\t\t\t".'<dl id="onlinelist" class= "clearb">'."\n\t\t\t\t".'<dt><strong>'.$lang_index['Online'].': </strong></dt>'."\t\t\t\t".implode(',</dd> ', $users).'</dd>'."\n\t\t\t".'</dl>'."\n";
- else
- echo "\t\t\t".'<div class="clearer"></div>'."\n";
-
-}
-else
- echo "\t\t".'</dl>'."\n\t\t\t".'<div class="clearer"></div>'."\n";
-
-
-?>
- </div>
- </div>
-</div>
-<?php
-
-$footer_style = 'index';
-require PUN_ROOT.'footer.php';
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/install-mysql.sql Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,314 @@
+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;
+
+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;
+
+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;
+
+CREATE TABLE {{TABLE_PREFIX}}config (
+ conf_name VARCHAR(255) NOT NULL DEFAULT '',
+ conf_value TEXT,
+ PRIMARY KEY (conf_name)
+ ) ENGINE = MyISAM CHARACTER SET utf8;
+
+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;
+
+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;
+
+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;
+
+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;
+
+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;
+
+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;
+
+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;
+
+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;
+
+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;
+
+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;
+
+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;
+
+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;
+
+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));
+
+INSERT INTO {{TABLE_PREFIX}}config ( conf_name, conf_value ) 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_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', '{{ENANO_ADMIN_EMAIL}}'),
+ ('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', 'Default'),
+ ('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_smtp_ssl', '0'),
+ ('o_regs_allow', '1'),
+ ('o_regs_verify', '0'),
+ ('o_announcement', '0'),
+ ('o_announcement_heading', 'Sample announcement'),
+ ('o_announcement_message', '<p>Enter your announcement here.</p>'),
+ ('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.<br />\\n<br />\\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');
--- 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 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// The PunBB version this script installs
-$punbb_version = '1.2.15';
-
-
-define('PUN_ROOT', './');
-if (file_exists(PUN_ROOT.'config.php'))
- exit('The file \'config.php\' already exists which would mean that PunBB is already installed. You should go <a href="index.php">here</a> 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.');
-
-?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>PunBB Installation</title>
-<link rel="stylesheet" type="text/css" href="style/Oxygen.css" />
-<script type="text/javascript">
-<!--
-function process_form(the_form)
-{
- var element_names = new Object()
- element_names["req_db_type"] = "Database type"
- element_names["req_db_host"] = "Database server hostname"
- element_names["req_db_name"] = "Database name"
- element_names["db_prefix"] = "Table prefix"
- element_names["req_username"] = "Administrator username"
- element_names["req_password1"] = "Administrator password 1"
- element_names["req_password2"] = "Administrator password 2"
- element_names["req_email"] = "Administrator's e-mail"
- element_names["req_base_url"] = "Base URL"
-
- if (document.all || document.getElementById)
- {
- for (i = 0; i < the_form.length; ++i)
- {
- var elem = the_form.elements[i]
- if (elem.name && elem.name.substring(0, 4) == "req_")
- {
- if (elem.type && (elem.type=="text" || elem.type=="textarea" || elem.type=="password" || elem.type=="file") && elem.value=='')
- {
- alert("\"" + element_names[elem.name] + "\" is a required field in this form.")
- elem.focus()
- return false
- }
- }
- }
- }
-
- return true
-}
-// -->
-</script>
-</head>
-<body onload="document.getElementById('install').req_db_type.focus()">
-
-<div id="puninstall" style="margin: auto 10% auto 10%">
-<div class="pun">
-
-<div class="block">
- <h2><span>PunBB Installation</span></h2>
- <div class="box">
- <div class="inbox">
- <p>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.</p>
- </div>
- </div>
-</div>
-
-<div class="blockform">
- <h2><span>Install PunBB 1.2</span></h2>
- <div class="box">
- <form id="install" method="post" action="install.php" onsubmit="this.start.disabled=true;if(process_form(this)){return true;}else{this.start.disabled=false;return false;}">
- <div><input type="hidden" name="form_sent" value="1" /></div>
- <div class="inform">
- <div class="forminfo">
- <h3>Database setup</h3>
- <p>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.</p>
- </div>
- <fieldset>
- <legend>Select your database type</legend>
- <div class="infldset">
- <p>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.</p>
-<?php if ($dual_mysql): ?> <p>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.</p>
-<?php endif; ?> <label><strong>Database type</strong>
- <br /><select name="req_db_type">
-<?php
-
- foreach ($db_extensions as $db_type)
- echo "\t\t\t\t\t\t\t".'<option value="'.$db_type[0].'">'.$db_type[1].'</option>'."\n";
-
-?>
- </select>
- <br /></label>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend>Enter your database server hostname</legend>
- <div class="infldset">
- <p>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'.</p>
- <label><strong>Database server hostname</strong><br /><input type="text" name="req_db_host" value="localhost" size="50" maxlength="100" /><br /></label>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend>Enter then name of your database</legend>
- <div class="infldset">
- <p>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.</p>
- <label for="req_db_name"><strong>Database name</strong><br /><input id="req_db_name" type="text" name="req_db_name" size="30" maxlength="50" /><br /></label>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend>Enter your database username and password</legend>
- <div class="infldset">
- <p>Enter the username and password with which you connect to the database. Ignore for SQLite.</p>
- <label class="conl">Database username<br /><input type="text" name="db_username" size="30" maxlength="50" /><br /></label>
- <label class="conl">Database password<br /><input type="text" name="db_password" size="30" maxlength="50" /><br /></label>
- <div class="clearer"></div>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend>Enter database table prefix</legend>
- <div class="infldset">
- <p>If you like you can specify a table prefix. This way you can run multiple copies of PunBB in the same database (example: foo_).</p>
- <label>Table prefix<br /><input id="db_prefix" type="text" name="db_prefix" size="20" maxlength="30" /><br /></label>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <div class="forminfo">
- <h3>Administration setup</h3>
- <p>Please enter the requested information in order to setup an administrator for your PunBB installation</p>
- </div>
- <fieldset>
- <legend>Enter Administrators username</legend>
- <div class="infldset">
- <p>The username of the forum administrator. You can later create more administrators and moderators. Usernames can be between 2 and 25 characters long.</p>
- <label><strong>Administrator username</strong><br /><input type="text" name="req_username" size="25" maxlength="25" /><br /></label>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend>Enter and confirm Administrator password</legend>
- <div class="infldset">
- <p>Passwords can be between 4 and 16 characters long. Passwords are case sensitive.</p>
- <label class="conl"><strong>Password</strong><br /><input id="req_password1" type="text" name="req_password1" size="16" maxlength="16" /><br /></label>
- <label class="conl"><strong>Confirm password</strong><br /><input type="text" name="req_password2" size="16" maxlength="16" /><br /></label>
- <div class="clearer"></div>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend>Enter Administrator's e-mail</legend>
- <div class="infldset">
- <p>The e-mail address of the forum administrator.</p>
- <label for="req_email"><strong>Administrator's e-mail</strong><br /><input id="req_email" type="text" name="req_email" size="50" maxlength="50" /><br /></label>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend>Enter the Base URL of your PunBB installation</legend>
- <div class="infldset">
- <p>The URL (without trailing slash) of your PunBB forum (example: http://forum.myhost.com or http://myhost.com/~myuser). This <strong>must</strong> 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.</p>
- <label><strong>Base URL</strong><br /><input type="text" name="req_base_url" value="http://<?php echo $_SERVER['SERVER_NAME'].str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME'])) ?>" size="60" maxlength="100" /><br /></label>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="start" value="Start install" /></p>
- </form>
- </div>
-</div>
-
-</div>
-</div>
-
-</body>
-</html>
-<?php
-
-}
-else
-{
- //
- // Strip slashes only if magic_quotes_gpc is on.
- //
- function unescape($str)
- {
- return (get_magic_quotes_gpc() == 1) ? stripslashes($str) : $str;
- }
-
-
- //
- // Compute a hash of $str.
- // Uses sha1() if available. If not, SHA1 through mhash() if available. If not, fall back on md5().
- //
- function pun_hash($str)
- {
- if (function_exists('sha1')) // Only in PHP 4.3.0+
- return sha1($str);
- else if (function_exists('mhash')) // Only if Mhash library is loaded
- return bin2hex(mhash(MHASH_SHA1, $str));
- else
- return md5($str);
- }
-
-
- //
- // A temporary replacement for the full error handler found in functions.php.
- // It's here because a function called error() must be callable in the database abstraction layer.
- //
- function error($message, $file = false, $line = false, $db_error = false)
- {
- if ($file !== false && $line !== false)
- echo '<strong style="color: A00000">An error occured on line '.$line.' in file '.$file.'.</strong><br /><br />';
- else
- echo '<strong style="color: A00000">An error occured.</strong><br /><br />';
-
- echo '<strong>PunBB reported:</strong> '.htmlspecialchars($message).'<br /><br />';
-
- if ($db_error !== false)
- echo '<strong>Database reported:</strong> '.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.<br />\\n<br />\\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 .= '<p style="font-size: 1.1em"><span style="color: #C03000"><strong>The cache directory is currently not writable!</strong></span> In order for PunBB to function properly, the directory named <em>cache</em> must be writable by PHP. Use chmod to set the appropriate directory permissions. If in doubt, chmod to 0777.</p>';
-
- // Check if default avatar directory is writable
- if (!@is_writable('./img/avatars/'))
- $alerts .= '<p style="font-size: 1.1em"><span style="color: #C03000"><strong>The avatar directory is currently not writable!</strong></span> If you want users to be able to upload their own avatar images you must see to it that the directory named <em>img/avatars</em> 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.</p>';
-
-
- /// Display config.php and give further instructions
- $config = '<?php'."\n\n".'$db_type = \''.$db_type."';\n".'$db_host = \''.$db_host."';\n".'$db_name = \''.$db_name."';\n".'$db_username = \''.$db_username."';\n".'$db_password = \''.$db_password."';\n".'$db_prefix = \''.$db_prefix."';\n".'$p_connect = false;'."\n\n".'$cookie_name = '."'punbb_cookie';\n".'$cookie_domain = '."'';\n".'$cookie_path = '."'/';\n".'$cookie_secure = 0;'."\n".'$cookie_seed = \''.substr(md5(time()), -8)."';\n\ndefine('PUN', 1);";
-
-
-?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>PunBB Installation</title>
-<link rel="stylesheet" type="text/css" href="style/Oxygen.css" />
-</head>
-<body>
-
-<div id="puninstall" style="margin: auto 10% auto 10%">
-<div class="pun">
-
-<div class="blockform">
- <h2>Final instructions</h2>
- <div class="box">
- <div class="fakeform">
- <div class="inform">
- <div class="forminfo">
- <p>To finalize the installation all you need to do is to <strong>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</strong>. 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 ).</p>
-<?php if ($alerts != ''): ?> <?php echo $alerts."\n" ?>
-<?php endif; ?> </div>
- <fieldset>
- <legend>Copy contents to config.php</legend>
- <div class="infldset">
- <textarea cols="80" rows="20"><?php echo htmlspecialchars($config) ?></textarea>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <div class="forminfo">
- <p>Once you have created config.php with the contents above, PunBB is installed!</p>
- <p><a href="index.php">Go to forum index</a></p>
- </div>
- </div>
- </div>
- </div>
-</div>
-
-</div>
-</div>
-
-</body>
-</html>
-<?php
-
-}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/lang/English/admin.php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,679 @@
+<?php
+
+// Language definitions used in all admin files
+$lang_admin = array(
+
+// Group Menu Items
+'Forum administration' => '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' => '<strong>Warning!</strong> 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' => '<strong>WARNING!</strong> 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 "<strong>Censor words</strong>" 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' => '<strong>WARNING!</strong> 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' => '<strong>IMPORTANT!</strong> 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' => '<strong>WARNING!</strong> Deleting a forum will delete all posts (if any) in that forum!',
+'Edit details head' => '<strong>%s.</strong> Edit forum details',
+'Edit permissions head' => '<strong>%s.</strong> 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' => '<strong>%s.</strong> Group and user title',
+'Group perms head' => '<strong>%s.</strong> Group permissions',
+'Group flood head' => '<strong>%s.</strong> 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 <strong>"%s"</strong>.',
+'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' => '<strong>IMPORTANT!</strong> 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' => '<strong>WARNING!</strong> 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 <strong>%s</strong> in topic <strong>%s</strong>.',
+'Javascript redirect' => 'JavaScript redirect unsuccessful.',
+'Click to continue' => 'Click here to continue',
+
+// admin_options - essentials
+'Essentials head' => 'Setup PunBB',
+'Essentials personal head' => '<strong>%s.</strong> Personalize your PunBB installation',
+'Essentials local head' => '<strong>%s.</strong> Configure PunBB for your location',
+'Essentials automatic head' => '<strong>%s.</strong> 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' => '<strong>%s.</strong> Setup URL Scheme (<abbr title ="Search Engine Friendly">SEF</abbr> URL\'s ) for your boards pages',
+'Essentials links head' => '<strong>%s.</strong> 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' => '<strong>%s.</strong> Compress output using GZip',
+'Essentials mail head' => '<strong>%s.</strong> 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' => '<strong>WARNING!</strong> 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 <a href="http://www.php.net/manual/en/ref.curl.php">cURL extension</a>, the <a href="http://www.php.net/manual/en/function.fsockopen.php">fsockopen() function</a> or be configured with <a href="http://www.php.net/manual/en/ref.filesystem.php#ini.allow-url-fopen">allow_url_fopen</a> 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' => '<strong>IMPORTANT!</strong> Putting the board into maintenance mode means it will only be available to administrators. This should be used if the board needs to taken down temporarily for maintenance.',
+'Maintenance mode warn' => '<strong>WARNING!</strong> 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.<br /><br />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' => '<strong>%s.</strong> User features and information',
+'General part head' => '<strong>%s.</strong> General features (go to %s to setup censored words list)',
+'Timeout part head' => '<strong>%s.</strong> Timeouts and redirect (set defaults for idle times and redirect delay)',
+'Report part head' => '<strong>%s.</strong> Reports of posts and topics may be sent via internal system, e-mail or both',
+'Announcement part head' => '<strong>%s.</strong> 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' => '<strong>%s.</strong> Topic and post features and information',
+'Message part head' => '<strong>%s.</strong> Topic and post content',
+'Sigs part head' => '<strong>%s.</strong> User signatures and signature content',
+'Avatars part head' => '<strong>%s.</strong> 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' => '<strong>%s.</strong> 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' => '<strong>%s.</strong> 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' => '<p>Enter your announcement here.</p>',
+'Reports part head' => '<strong>%s.</strong> 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' => '<strong>%s.</strong> 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' => '<strong>%s.</strong> 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' => '<strong>WARNING!</strong> Pruning will permanently delete <em>%s</em> topics%s.',
+'Prune topics info 2' => 'The topics being deleted do not contain posts newer than <em>%s</em> days old.',
+'Include sticky' => 'including sticky topics',
+'Days old' => 'Days old',
+'Number of topics' => 'Number of topics',
+'Prune caution' => '<strong>IMPORTANT!</strong> Use this feature with caution. Pruned posts can <em>NEVER</em> 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 "<strong>User ranks</strong>" 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 <strong>*</strong> 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' => '<strong>WARNING!</strong> 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'
+
+);
--- 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 @@
-<?php
-
-/*
-// Determine what locale to use
-switch (PHP_OS)
-{
- case 'WINNT':
- case 'WIN32':
- $locale = 'english';
- break;
-
- case 'FreeBSD':
- case 'NetBSD':
- case 'OpenBSD':
- $locale = 'en_US.US-ASCII';
- break;
-
- default:
- $locale = 'en_US';
- break;
-}
-
-// Attempt to set the locale
-setlocale(LC_CTYPE, $locale);
-*/
-
-// Language definitions for frequently used strings
-$lang_common = array(
-
-// Text orientation and encoding
-'lang_direction' => '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. <image>) 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
-
-);
--- 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 @@
-<?php
-
-// Language definitions used in delete.php
-$lang_delete = array(
-
-'Delete post' => '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 …'
-
-);
--- 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 @@
-<?php
-
-// Language definitions used in viewforum.php
-$lang_forum = array(
-
-'Post topic' => 'Post new topic',
-'Views' => 'Views',
-'Moved' => 'Moved',
-'Sticky' => 'Sticky',
-'Empty forum' => 'Forum is empty.'
-
-);
--- 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 @@
-<?php
-
-// Language definitions used in help.php
-$lang_help = array(
-
-'Help' => '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:'
-
-);
--- 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 @@
-<html>
-<head>
-<title>.</title>
-</head>
-<body>
-.
-</body>
-</html>
\ No newline at end of file
--- 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 @@
-<?php
-
-// Language definitions used in index.php
-$lang_index = array(
-
-'Topics' => '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'
-
-);
--- /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 @@
+<?php
+
+// Language definitions used in delete.php
+$lang_install = array(
+
+// Install Form
+'Install PunBB' => '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 "<em>standard</em>" and "<em>improved</em>". If you are uncertain which one to use, start by trying improved and if that fails, try standard.',
+'Database server info' => 'Enter the address of the database server (example: <em>localhost</em>, <em>db.myhost.com</em> or <em>192.168.0.15</em>). You can specify a custom port number if your database doesn\'t run on the default port (example: <em>localhost:3580</em>). For SQLite support, just enter anything or leave it at \'localhost\'.',
+'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: <em>foo_</em>).',
+'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: <em>http://forum.myhost.com</em> or <em>http://myhost.com/~myuser</em>). 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' => '<strong>The cache directory is currently not writable!</strong> In order for PunBB to function properly, the directory named <em>cache</em> must be writable by PHP. Use chmod to set the appropriate directory permissions. If in doubt, chmod to 0777.',
+'No avatar write' => '<strong>The avatar directory is currently not writable!</strong> If you want users to be able to upload their own avatar images you must see to it that the directory named <em>img/avatars</em> 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' => '<strong>File uploads appear to be disallowed on this server!</strong> 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
--- 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 @@
-<?php
-
-// Language definitions used in delete.php
-$lang_login = array(
-
-// Miscellaneous
-'Wrong user/pass' => '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'
-
-);
--- 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 <username>,
-
-You have requested to have a new e-mail address assigned to your account in the discussion forum at <base_url>. 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:
-<activation_url>
-
---
-<board_mailer>
-(Do not reply to this message)
\ No newline at end of file
--- 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 <username>,
-
-You have requested to have a new password assigned to your account in the discussion forum at <base_url>. 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: <new_password>
-
-To change your password, please visit the following page:
-<activation_url>
-
---
-<board_mailer>
-(Do not reply to this message)
\ No newline at end of file
--- 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: <mail_subject>
-
-<sender> from <board_title> has sent you a message. You can reply to <sender> by replying to this e-mail.
-
-The message reads as follows:
------------------------------------------------------------------------
-
-<mail_message>
-
------------------------------------------------------------------------
-
---
-<board_mailer>
\ No newline at end of file
--- 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 @@
-<html>
-<head>
-<title>.</title>
-</head>
-<body>
-.
-</body>
-</html>
\ No newline at end of file
--- 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: <topic_subject>
-
-<replier> has replied to the topic <topic_subject> 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 <post_url>
-
-You can unsubscribe by going to <unsubscribe_url>
-
---
-<board_mailer>
-(Do not reply to this message)
\ No newline at end of file
--- 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: <topic_subject>
-
-<replier> has replied to the topic <topic_subject> 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:
------------------------------------------------------------------------
-
-<message>
-
------------------------------------------------------------------------
-
-The post is located at <post_url>
-
-You can unsubscribe by going to <unsubscribe_url>
-
---
-<board_mailer>
-(Do not reply to this message)
\ No newline at end of file
--- 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 <board_title>!
-
-Thank you for registering in the forums at <base_url>. Your account details are:
-
-Username: <username>
-Password: <password>
-
-Login at <login_url> to activate the account.
-
---
-<board_mailer>
-(Do not reply to this message)
\ No newline at end of file
--- 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 @@
-<?php
-
-// Language definitions used in various scripts
-$lang_misc = array(
-
-'Mark read redirect' => '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.'
-
-);
--- 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 @@
-<?php
-
-// Language definitions used in post.php and edit.php
-$lang_post = array(
-
-// Post validation stuff (many are similiar to those in edit.php)
-'No subject' => '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 …'
-
-);
--- 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 @@
-<?php
-
-// Language definitions used in both profile.php and register.php
-$lang_prof_reg = array(
-
-'E-mail legend' => '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.'
-
-);
--- 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 @@
-<?php
-
-// Language definitions used in profile.php
-$lang_profile = array(
-
-// Navigation and sections
-'Profile menu' => '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 …'
-
-);
--- 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 @@
-<?php
-
-// Language definitions used in register.php
-$lang_register = array(
-
-// Miscellaneous
-'No new regs' => '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',
-
-);
--- 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 @@
-<?php
-
-// Language definitions used in search.php
-$lang_search = array(
-
-// The search form
-'User search' => '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'
-
-);
--- 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
--- 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 @@
-<?php
-
-// Language definitions used in viewtopic.php
-$lang_topic = array(
-
-'Post reply' => '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'
-
-);
--- 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 @@
-<?php
-
-// Language definitions used in userlist.php
-$lang_ul = array(
-
-'User find legend' => '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'
-
-);
--- 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 @@
-<html>
-<head>
-<title>.</title>
-</head>
-<body>
-.
-</body>
-</html>
\ No newline at end of file
--- 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 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-if (isset($_GET['action']))
- define('PUN_QUIET_VISIT', 1);
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-
-
-// Load the login.php language file
-require PUN_ROOT.'lang/'.$pun_user['language'].'/login.php';
-
-$action = isset($_GET['action']) ? $_GET['action'] : null;
-
-if (isset($_POST['form_sent']) && $action == 'in')
-{
- $form_username = trim($_POST['req_username']);
- $form_password = trim($_POST['req_password']);
-
- $username_sql = ($db_type == 'mysql' || $db_type == 'mysqli') ? 'username=\''.$pun_db->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'].' <a href="login.php?action=forget">'.$lang_login['Forgotten pass'].'</a>');
-
- // 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('<base_url>', $pun_config['o_base_url'].'/', $mail_message);
- $mail_message = str_replace('<board_mailer>', $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('<username>', $cur_hit['username'], $mail_message);
- $cur_mail_message = str_replace('<activation_url>', $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>', $new_password, $cur_mail_message);
-
- pun_mail($email, $mail_subject, $cur_mail_message);
- }
-
- message($lang_login['Forget mail'].' <a href="mailto:'.$pun_config['o_admin_email'].'">'.$pun_config['o_admin_email'].'</a>.');
- }
- 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';
-
-?>
-<div class="blockform">
- <h2><span><?php echo $lang_login['Request pass'] ?></span></h2>
- <div class="box">
- <form id="request_pass" method="post" action="login.php?action=forget_2" onsubmit="this.request_pass.disabled=true;if(process_form(this)){return true;}else{this.request_pass.disabled=false;return false;}">
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_login['Request pass legend'] ?></legend>
- <div class="infldset">
- <input type="hidden" name="form_sent" value="1" />
- <input id="req_email" type="text" name="req_email" size="50" maxlength="50" />
- <p><?php echo $lang_login['Request pass info'] ?></p>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="request_pass" value="<?php echo $lang_common['Submit'] ?>" /><a href="javascript:history.go(-1)"><?php echo $lang_common['Go back'] ?></a></p>
- </form>
- </div>
-</div>
-<?php
-
- require PUN_ROOT.'footer.php';
-}
-
-
-if (!$pun_user['is_guest'])
- header('Location: index.php');
-
-// Try to determine if the data in HTTP_REFERER is valid (if not, we redirect to index.php after login)
-$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_common['Login'];
-$required_fields = array('req_username' => $lang_common['Username'], 'req_password' => $lang_common['Password']);
-$focus_element = array('login', 'req_username');
-require PUN_ROOT.'header.php';
-
-?>
-<div class="blockform">
- <h2><span><?php echo $lang_common['Login'] ?></span></h2>
- <div class="box">
- <form id="login" method="post" action="login.php?action=in" onsubmit="return process_form(this)">
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_login['Login legend'] ?></legend>
- <div class="infldset">
- <input type="hidden" name="form_sent" value="1" />
- <input type="hidden" name="redirect_url" value="<?php echo $redirect_url ?>" />
- <label class="conl"><strong><?php echo $lang_common['Username'] ?></strong><br /><input type="text" name="req_username" size="25" maxlength="25" tabindex="1" /><br /></label>
- <label class="conl"><strong><?php echo $lang_common['Password'] ?></strong><br /><input type="password" name="req_password" size="16" maxlength="16" tabindex="2" /><br /></label>
- <p class="clearb"><?php echo $lang_login['Login info'] ?></p>
- <p><a href="register.php" tabindex="4"><?php echo $lang_login['Not registered'] ?></a>
- <a href="login.php?action=forget" tabindex="5"><?php echo $lang_login['Forgotten pass'] ?></a></p>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="login" value="<?php echo $lang_common['Login'] ?>" tabindex="3" /></p>
- </form>
- </div>
-</div>
-<?php
-
-require PUN_ROOT.'footer.php';
--- a/punbb/misc.php Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,288 +0,0 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-if (isset($_GET['action']))
- define('PUN_QUIET_VISIT', 1);
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-
-
-// Load the misc.php language file
-require PUN_ROOT.'lang/'.$pun_user['language'].'/misc.php';
-
-$action = isset($_GET['action']) ? $_GET['action'] : null;
-
-
-if ($action == 'rules')
-{
- // Load the register.php language file
- require PUN_ROOT.'lang/'.$pun_user['language'].'/register.php';
-
- $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_register['Forum rules'];
- require PUN_ROOT.'header.php';
-
-?>
-<div class="block">
- <h2><span><?php echo $lang_register['Forum rules'] ?></span></h2>
- <div class="box">
- <div class="inbox">
- <p><?php echo $pun_config['o_rules_message'] ?></p>
- </div>
- </div>
-</div>
-<?php
-
- require PUN_ROOT.'footer.php';
-}
-
-
-else if ($action == 'markread')
-{
- if ($pun_user['is_guest'])
- message($lang_common['No permission']);
-
- $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 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('<mail_subject>', $subject, $mail_subject);
- $mail_message = str_replace('<sender>', $pun_user['username'], $mail_message);
- $mail_message = str_replace('<board_title>', $pun_config['o_board_title'], $mail_message);
- $mail_message = str_replace('<mail_message>', $message, $mail_message);
- $mail_message = str_replace('<board_mailer>', $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';
-
-?>
-<div class="blockform">
- <h2><span><?php echo $lang_misc['Send e-mail to'] ?> <?php echo pun_htmlspecialchars($recipient) ?></span></h2>
- <div class="box">
- <form id="email" method="post" action="misc.php?email=<?php echo $recipient_id ?>" onsubmit="this.submit.disabled=true;if(process_form(this)){return true;}else{this.submit.disabled=false;return false;}">
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_misc['Write e-mail'] ?></legend>
- <div class="infldset txtarea">
- <input type="hidden" name="form_sent" value="1" />
- <input type="hidden" name="redirect_url" value="<?php echo $redirect_url ?>" />
- <label><strong><?php echo $lang_misc['E-mail subject'] ?></strong><br />
- <input class="longinput" type="text" name="req_subject" size="75" maxlength="70" tabindex="1" /><br /></label>
- <label><strong><?php echo $lang_misc['E-mail message'] ?></strong><br />
- <textarea name="req_message" rows="10" cols="75" tabindex="2"></textarea><br /></label>
- <p><?php echo $lang_misc['E-mail disclosure note'] ?></p>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="submit" value="<?php echo $lang_common['Submit'] ?>" tabindex="3" accesskey="s" /><a href="javascript:history.go(-1)"><?php echo $lang_common['Go back'] ?></a></p>
- </form>
- </div>
-</div>
-<?php
-
- require PUN_ROOT.'footer.php';
-}
-
-
-else if (isset($_GET['report']))
-{
- if ($pun_user['is_guest'])
- message($lang_common['No permission']);
-
- $post_id = intval($_GET['report']);
- if ($post_id < 1)
- message($lang_common['Bad request']);
-
- if (isset($_POST['form_sent']))
- {
- // Clean up reason from POST
- $reason = pun_linebreaks(pun_trim($_POST['req_reason']));
- if ($reason == '')
- message($lang_misc['No reason']);
-
- // Get the topic ID
- $result = $pun_db->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';
-
-?>
-<div class="blockform">
- <h2><span><?php echo $lang_misc['Report post'] ?></span></h2>
- <div class="box">
- <form id="report" method="post" action="misc.php?report=<?php echo $post_id ?>" onsubmit="this.submit.disabled=true;if(process_form(this)){return true;}else{this.submit.disabled=false;return false;}">
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_misc['Reason desc'] ?></legend>
- <div class="infldset txtarea">
- <input type="hidden" name="form_sent" value="1" />
- <label><strong><?php echo $lang_misc['Reason'] ?></strong><br /><textarea name="req_reason" rows="5" cols="60"></textarea><br /></label>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="submit" value="<?php echo $lang_common['Submit'] ?>" accesskey="s" /><a href="javascript:history.go(-1)"><?php echo $lang_common['Go back'] ?></a></p>
- </form>
- </div>
-</div>
-<?php
-
- require PUN_ROOT.'footer.php';
-}
-
-
-else if (isset($_GET['subscribe']))
-{
- if ($pun_user['is_guest'] || $pun_config['o_subscriptions'] != '1')
- message($lang_common['No permission']);
-
- $topic_id = intval($_GET['subscribe']);
- 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['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']);
--- 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 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-
-
-// This particular function doesn't require forum-based moderator access. It can be used
-// by all moderators and admins.
-if (isset($_GET['get_host']))
-{
- if ($pun_user['g_id'] < PUN_MOD)
- message($lang_common['No permission']);
-
- // Is get_host an IP address or a post ID?
- if (@preg_match('/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/', $_GET['get_host']))
- $ip = $_GET['get_host'];
- else
- {
- $get_host = intval($_GET['get_host']);
- if ($get_host < 1)
- message($lang_common['Bad request']);
-
- $result = $pun_db->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.'<br />The host name is: '.@gethostbyaddr($ip).'<br /><br /><a href="admin_users.php?show_users='.$ip.'">Show more users for this IP</a>');
-}
-
-
-// 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';
-
-?>
-<div class="blockform">
- <h2><span><?php echo $lang_misc['Delete posts'] ?></span></h2>
- <div class="box">
- <form method="post" action="moderate.php?fid=<?php echo $fid ?>&tid=<?php echo $tid ?>">
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_misc['Confirm delete legend'] ?></legend>
- <div class="infldset">
- <input type="hidden" name="posts" value="<?php echo implode(',', array_keys($posts)) ?>" />
- <p><?php echo $lang_misc['Delete posts comply'] ?></p>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="delete_posts_comply" value="<?php echo $lang_misc['Delete'] ?>" /><a href="javascript:history.go(-1)"><?php echo $lang_common['Go back'] ?></a></p>
- </form>
- </div>
-</div>
-<?php
-
- require PUN_ROOT.'footer.php';
- }
-
-
- // Show the delete multiple posts view
-
- // Load the viewtopic.php language file
- require PUN_ROOT.'lang/'.$pun_user['language'].'/topic.php';
-
- // Used to disable the Move and Delete buttons if there are no replies to this topic
- $button_status = ($cur_topic['num_replies'] == 0) ? ' disabled' : '';
-
-
- // 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, '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';
-
-?>
-<div class="linkst">
- <div class="inbox">
- <p class="pagelink conl"><?php echo $paging_links ?></p>
- <ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a></li><li> » <a href="viewforum.php?id=<?php echo $fid ?>"><?php echo pun_htmlspecialchars($cur_topic['forum_name']) ?></a></li><li> » <?php echo pun_htmlspecialchars($cur_topic['subject']) ?></li></ul>
- <div class="clearer"></div>
- </div>
-</div>
-
-<form method="post" action="moderate.php?fid=<?php echo $fid ?>&tid=<?php echo $tid ?>">
-<?php
-
- require PUN_ROOT.'include/parser.php';
-
- $bg_switch = true; // Used for switching background color in posts
- $post_count = 0; // Keep track of post numbers
-
- // Retrieve the posts (and their respective poster)
- $result = $pun_db->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 = '<a href="profile.php?id='.$cur_post['poster_id'].'">'.pun_htmlspecialchars($cur_post['poster']).'</a>';
-
- // 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']);
-
-?>
-
-<div class="blockpost<?php echo $vtbg ?>">
- <a name="<?php echo $cur_post['id'] ?>"></a>
- <h2><span><span class="conr">#<?php echo ($start_from + $post_count) ?> </span><a href="viewtopic.php?pid=<?php echo $cur_post['id'].'#p'.$cur_post['id'] ?>"><?php echo format_time($cur_post['posted']) ?></a></span></h2>
- <div class="box">
- <div class="inbox">
- <div class="postleft">
- <dl>
- <dt><strong><?php echo $poster ?></strong></dt>
- <dd><strong><?php echo $user_title ?></strong></dd>
- </dl>
- </div>
- <div class="postright">
- <h3 class="nosize"><?php echo $lang_common['Message'] ?></h3>
- <div class="postmsg">
- <?php echo $cur_post['message']."\n" ?>
-<?php if ($cur_post['edited'] != '') echo "\t\t\t\t\t".'<p class="postedit"><em>'.$lang_topic['Last edit'].' '.pun_htmlspecialchars($cur_post['edited_by']).' ('.format_time($cur_post['edited']).')</em></p>'."\n"; ?>
- </div>
- <?php if ($start_from + $post_count > 1) echo '<p class="multidelete"><label><strong>'.$lang_misc['Select'].'</strong> <input type="checkbox" name="posts['.$cur_post['id'].']" value="1" /></label></p>'."\n" ?>
- </div>
- <div class="clearer"></div>
- </div>
- </div>
-</div>
-
-
-
-
-<?php
-
- }
-
-?>
-<div class="postlinksb">
- <div class="inbox">
- <p class="pagelink conl"><?php echo $paging_links ?></p>
- <p class="conr"><input type="submit" name="delete_posts" value="<?php echo $lang_misc['Delete'] ?>"<?php echo $button_status ?> /></p>
- <div class="clearer"></div>
- </div>
-</div>
-</form>
-<?php
-
- require PUN_ROOT.'footer.php';
-}
-
-
-// Move one or more topics
-if (isset($_REQUEST['move_topics']) || isset($_POST['move_topics_to']))
-{
- if (isset($_POST['move_topics_to']))
- {
- confirm_referrer('moderate.php');
-
- if (@preg_match('/[^0-9,]/', $_POST['topics']))
- message($lang_common['Bad request']);
-
- $topics = explode(',', $_POST['topics']);
- $move_to_forum = isset($_POST['move_to_forum']) ? intval($_POST['move_to_forum']) : 0;
- if (empty($topics) || $move_to_forum < 1)
- message($lang_common['Bad request']);
-
- // Verify that the topic IDs are valid
- $result = $pun_db->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';
-
-?>
-<div class="blockform">
- <h2><span><?php echo ($action == 'single') ? $lang_misc['Move topic'] : $lang_misc['Move topics'] ?></span></h2>
- <div class="box">
- <form method="post" action="moderate.php?fid=<?php echo $fid ?>">
- <div class="inform">
- <input type="hidden" name="topics" value="<?php echo $topics ?>" />
- <fieldset>
- <legend><?php echo $lang_misc['Move legend'] ?></legend>
- <div class="infldset">
- <label><?php echo $lang_misc['Move to'] ?>
- <br /><select name="move_to_forum">
-<?php
-
- $result = $pun_db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name FROM '.$pun_db->prefix.'categories AS c INNER JOIN '.$pun_db->prefix.'forums AS f ON c.id=f.cat_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.redirect_url IS NULL ORDER BY c.disp_position, c.id, f.disp_position', true) 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 "\t\t\t\t\t\t\t".'</optgroup>'."\n";
-
- echo "\t\t\t\t\t\t\t".'<optgroup label="'.pun_htmlspecialchars($cur_forum['cat_name']).'">'."\n";
- $cur_category = $cur_forum['cid'];
- }
-
- if ($cur_forum['fid'] != $fid)
- echo "\t\t\t\t\t\t\t\t".'<option value="'.$cur_forum['fid'].'">'.pun_htmlspecialchars($cur_forum['forum_name']).'</option>'."\n";
- }
-
-?>
- </optgroup>
- </select>
- <br /></label>
- <div class="rbox">
- <label><input type="checkbox" name="with_redirect" value="1"<?php if ($action == 'single') echo ' checked="checked"' ?> /><?php echo $lang_misc['Leave redirect'] ?><br /></label>
- </div>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="move_topics_to" value="<?php echo $lang_misc['Move'] ?>" /><a href="javascript:history.go(-1)"><?php echo $lang_common['Go back'] ?></a></p>
- </form>
- </div>
-</div>
-<?php
-
- require PUN_ROOT.'footer.php';
-}
-
-
-// Delete one or more topics
-if (isset($_REQUEST['delete_topics']) || isset($_POST['delete_topics_comply']))
-{
- $topics = isset($_POST['topics']) ? $_POST['topics'] : array();
- if (empty($topics))
- message($lang_misc['No topics selected']);
-
- if (isset($_POST['delete_topics_comply']))
- {
- confirm_referrer('moderate.php');
-
- if (@preg_match('/[^0-9,]/', $topics))
- message($lang_common['Bad request']);
-
- require PUN_ROOT.'include/search_idx.php';
-
- // Verify that the topic IDs are valid
- $result = $pun_db->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';
-
-?>
-<div class="blockform">
- <h2><?php echo $lang_misc['Delete topics'] ?></h2>
- <div class="box">
- <form method="post" action="moderate.php?fid=<?php echo $fid ?>">
- <input type="hidden" name="topics" value="<?php echo implode(',', array_keys($topics)) ?>" />
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_misc['Confirm delete legend'] ?></legend>
- <div class="infldset">
- <p><?php echo $lang_misc['Delete topics comply'] ?></p>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="delete_topics_comply" value="<?php echo $lang_misc['Delete'] ?>" /><a href="javascript:history.go(-1)"><?php echo $lang_common['Go back'] ?></a></p>
- </form>
- </div>
-</div>
-<?php
-
- require PUN_ROOT.'footer.php';
-}
-
-
-// Open or close one or more topics
-else if (isset($_REQUEST['open']) || isset($_REQUEST['close']))
-{
- $action = (isset($_REQUEST['open'])) ? 0 : 1;
-
- // There could be an array of topic ID's in $_POST
- if (isset($_POST['open']) || isset($_POST['close']))
- {
- confirm_referrer('moderate.php');
-
- $topics = isset($_POST['topics']) ? @array_map('intval', @array_keys($_POST['topics'])) : array();
- if (empty($topics))
- message($lang_misc['No topics selected']);
-
- $pun_db->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)
-
-?>
-<div class="linkst">
- <div class="inbox">
- <p class="pagelink conl"><?php echo $paging_links ?></p>
- <ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a> </li><li>» <?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></li></ul>
- <div class="clearer"></div>
- </div>
-</div>
-
-<form method="post" action="moderate.php?fid=<?php echo $fid ?>">
-<div id="vf" class="blocktable">
- <h2><span><?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></span></h2>
- <div class="box">
- <div class="inbox">
- <table cellspacing="0">
- <thead>
- <tr>
- <th class="tcl" scope="col"><?php echo $lang_common['Topic'] ?></th>
- <th class="tc2" scope="col"><?php echo $lang_common['Replies'] ?></th>
- <th class="tc3" scope="col"><?php echo $lang_forum['Views'] ?></th>
- <th class="tcr"><?php echo $lang_common['Last post'] ?></th>
- <th class="tcmod" scope="col"><?php echo $lang_misc['Select'] ?></th>
- </tr>
- </thead>
- <tbody>
-<?php
-
-// Select topics
-$result = $pun_db->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 = '<a href="viewtopic.php?pid='.$cur_topic['last_post_id'].'#p'.$cur_topic['last_post_id'].'">'.format_time($cur_topic['last_post']).'</a> '.$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'].': <a href="viewtopic.php?id='.$cur_topic['moved_to'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
- else if ($cur_topic['closed'] == '0')
- $subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span>'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
- else
- {
- $subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
- $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 = '<strong>'.$subject.'</strong>';
- $subject_new_posts = '<span class="newtext">[ <a href="viewtopic.php?id='.$cur_topic['id'].'&action=new" title="'.$lang_common['New posts info'].'">'.$lang_common['New posts'].'</a> ]</span>';
- }
- 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 = '<span class="stickytext">'.$lang_forum['Sticky'].': </span>'.$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 : '';
- }
-
-?>
- <tr<?php if ($item_status != '') echo ' class="'.trim($item_status).'"'; ?>>
- <td class="tcl">
- <div class="<?php echo $icon_type ?>"><div class="nosize"><?php echo trim($icon_text) ?></div></div>
- <div class="tclcon">
- <?php echo $subject."\n" ?>
- </div>
- </td>
- <td class="tc2"><?php echo (!$ghost_topic) ? $cur_topic['num_replies'] : ' ' ?></td>
- <td class="tc3"><?php echo (!$ghost_topic) ? $cur_topic['num_views'] : ' ' ?></td>
- <td class="tcr"><?php echo $last_post ?></td>
- <td class="tcmod"><input type="checkbox" name="topics[<?php echo $cur_topic['id'] ?>]" value="1" /></td>
- </tr>
-<?php
-
- }
-}
-else
-{
- $button_status = ' disabled';
- echo "\t\t\t\t\t".'<tr><td class="tcl" colspan="5">'.$lang_forum['Empty forum'].'</td></tr>'."\n";
-}
-
-?>
- </tbody>
- </table>
- </div>
- </div>
-</div>
-
-<div class="linksb">
- <div class="inbox">
- <p class="pagelink conl"><?php echo $paging_links ?></p>
- <p class="conr"><input type="submit" name="move_topics" value="<?php echo $lang_misc['Move'] ?>"<?php echo $button_status ?> /> <input type="submit" name="delete_topics" value="<?php echo $lang_misc['Delete'] ?>"<?php echo $button_status ?> /> <input type="submit" name="open" value="<?php echo $lang_misc['Open'] ?>"<?php echo $button_status ?> /> <input type="submit" name="close" value="<?php echo $lang_misc['Close'] ?>"<?php echo $button_status ?> /></p>
- <div class="clearer"></div>
- </div>
-</div>
-</form>
-<?php
-
-require PUN_ROOT.'footer.php';
--- a/punbb/plugins/AMP_Example.php Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,145 +0,0 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-##
-##
-## A few notes of interest for aspiring plugin authors:
-##
-## 1. If you want to display a message via the message() function, you
-## must do so before calling generate_admin_menu($plugin).
-##
-## 2. Plugins are loaded by admin_loader.php and must not be
-## terminated (e.g. by calling exit()). After the plugin script has
-## finished, the loader script displays the footer, so don't worry
-## about that. Please note that terminating a plugin by calling
-## message() or pun_redirect() is fine though.
-##
-## 3. The action attribute of any and all <form> 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);
-
-?>
- <div class="block">
- <h2><span>Example plugin</span></h2>
- <div class="box">
- <div class="inbox">
- <p>You said "<?php echo pun_htmlspecialchars($_POST['text_to_show']) ?>". Great stuff.</p>
- <p><a href="javascript: history.go(-1)">Go back</a></p>
- </div>
- </div>
- </div>
-<?php
-
-}
-else // If not, we show the "Show text" form
-{
- // Display the admin navigation menu
- generate_admin_menu($plugin);
-
-?>
- <div id="exampleplugin" class="blockform">
- <h2><span>Example plugin</span></h2>
- <div class="box">
- <div class="inbox">
- <p>This plugin doesn't do anything useful. Hence the name "Example".</p>
- <p>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.</p>
- </div>
- </div>
-
- <h2 class="block2"><span>An example form</span></h2>
- <div class="box">
- <form id="example" method="post" action="<?php echo $_SERVER['REQUEST_URI'] ?>&foo=bar">
- <div class="inform">
- <fieldset>
- <legend>Enter a piece of text and hit "Show text"!</legend>
- <div class="infldset">
- <table class="aligntop" cellspacing="0">
- <tr>
- <th scope="row">Text to show<div><input type="submit" name="show_text" value="Show text" tabindex="2" /></div></th>
- <td>
- <input type="text" name="text_to_show" size="25" tabindex="1" />
- <span>The text you want to display.</span>
- </td>
- </tr>
- </table>
- </div>
- </fieldset>
- </div>
- </form>
- </div>
- </div>
-<?php
-
-}
-
-// Note that the script just ends here. The footer will be included by admin_loader.php.
--- a/punbb/plugins/index.html Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-<html>
-<head>
-<title>.</title>
-</head>
-<body>
-.
-</body>
-</html>
\ No newline at end of file
--- 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 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-
-
-if ($pun_user['g_read_board'] == '0')
- message($lang_common['No view']);
-
-
-$tid = isset($_GET['tid']) ? intval($_GET['tid']) : 0;
-$fid = isset($_GET['fid']) ? intval($_GET['fid']) : 0;
-if ($tid < 1 && $fid < 1 || $tid > 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('<topic_subject>', '\''.$cur_posting['subject'].'\'', $mail_subject);
- $mail_message = str_replace('<topic_subject>', '\''.$cur_posting['subject'].'\'', $mail_message);
- $mail_message = str_replace('<replier>', $username, $mail_message);
- $mail_message = str_replace('<post_url>', $pun_config['o_base_url'].'/viewtopic.php?pid='.$new_pid.'#p'.$new_pid, $mail_message);
- $mail_message = str_replace('<unsubscribe_url>', $pun_config['o_base_url'].'/misc.php?unsubscribe='.$tid, $mail_message);
- $mail_message = str_replace('<board_mailer>', $pun_config['o_board_title'].' '.$lang_common['Mailer'], $mail_message);
-
- $mail_subject_full = str_replace('<topic_subject>', '\''.$cur_posting['subject'].'\'', $mail_subject_full);
- $mail_message_full = str_replace('<topic_subject>', '\''.$cur_posting['subject'].'\'', $mail_message_full);
- $mail_message_full = str_replace('<replier>', $username, $mail_message_full);
- $mail_message_full = str_replace('<message>', $message, $mail_message_full);
- $mail_message_full = str_replace('<post_url>', $pun_config['o_base_url'].'/viewtopic.php?pid='.$new_pid.'#p'.$new_pid, $mail_message_full);
- $mail_message_full = str_replace('<unsubscribe_url>', $pun_config['o_base_url'].'/misc.php?unsubscribe='.$tid, $mail_message_full);
- $mail_message_full = str_replace('<board_mailer>', $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 = '<form id="post" method="post" action="post.php?action=post&tid='.$tid.'" onsubmit="this.submit.disabled=true;if(process_form(this)){return true;}else{this.submit.disabled=false;return false;}">';
-
- // 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 = '<a href="viewforum.php?id='.$cur_posting['id'].'">'.pun_htmlspecialchars($cur_posting['forum_name']).'</a>';
-}
-// If a forum_id was specified in the url (new topic).
-else if ($fid)
-{
- $action = $lang_post['Post new topic'];
- $form = '<form id="post" method="post" action="post.php?action=post&fid='.$fid.'" onsubmit="return process_form(this)">';
-
- $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';
-
-?>
-<div class="linkst">
- <div class="inbox">
- <ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a></li><li> » <?php echo $forum_name ?><?php if (isset($cur_posting['subject'])) echo '</li><li> » '.pun_htmlspecialchars($cur_posting['subject']) ?></li></ul>
- </div>
-</div>
-
-<?php
-
-// If there are errors, we display them
-if (!empty($errors))
-{
-
-?>
-<div id="posterror" class="block">
- <h2><span><?php echo $lang_post['Post errors'] ?></span></h2>
- <div class="box">
- <div class="inbox">
- <p><?php echo $lang_post['Post errors info'] ?></p>
- <ul>
-<?php
-
- while (list(, $cur_error) = each($errors))
- echo "\t\t\t\t".'<li><strong>'.$cur_error.'</strong></li>'."\n";
-?>
- </ul>
- </div>
- </div>
-</div>
-
-<?php
-
-}
-else if (isset($_POST['preview']))
-{
- require_once PUN_ROOT.'include/parser.php';
- $preview_message = parse_message($message, $hide_smilies);
-
-?>
-<div id="postpreview" class="blockpost">
- <h2><span><?php echo $lang_post['Post preview'] ?></span></h2>
- <div class="box">
- <div class="inbox">
- <div class="postright">
- <div class="postmsg">
- <?php echo $preview_message."\n" ?>
- </div>
- </div>
- </div>
- </div>
-</div>
-
-<?php
-
-}
-
-
-$cur_index = 1;
-
-?>
-<div class="blockform">
- <h2><span><?php echo $action ?></span></h2>
- <div class="box">
- <?php echo $form."\n" ?>
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_common['Write message legend'] ?></legend>
- <div class="infldset txtarea">
- <input type="hidden" name="form_sent" value="1" />
- <input type="hidden" name="form_user" value="<?php echo (!$pun_user['is_guest']) ? pun_htmlspecialchars($pun_user['username']) : 'Guest'; ?>" />
-<?php
-
-if ($pun_user['is_guest'])
-{
- $email_label = ($pun_config['p_force_guest_email'] == '1') ? '<strong>'.$lang_common['E-mail'].'</strong>' : $lang_common['E-mail'];
- $email_form_name = ($pun_config['p_force_guest_email'] == '1') ? 'req_email' : 'email';
-
-?> <label class="conl"><strong><?php echo $lang_post['Guest name'] ?></strong><br /><input type="text" name="req_username" value="<?php if (isset($_POST['req_username'])) echo pun_htmlspecialchars($username); ?>" size="25" maxlength="25" tabindex="<?php echo $cur_index++ ?>" /><br /></label>
- <label class="conl"><?php echo $email_label ?><br /><input type="text" name="<?php echo $email_form_name ?>" value="<?php if (isset($_POST[$email_form_name])) echo pun_htmlspecialchars($email); ?>" size="50" maxlength="50" tabindex="<?php echo $cur_index++ ?>" /><br /></label>
- <div class="clearer"></div>
-<?php
-
-}
-
-if ($fid): ?>
- <label><strong><?php echo $lang_common['Subject'] ?></strong><br /><input class="longinput" type="text" name="req_subject" value="<?php if (isset($_POST['req_subject'])) echo pun_htmlspecialchars($subject); ?>" size="80" maxlength="70" tabindex="<?php echo $cur_index++ ?>" /><br /></label>
-<?php endif; ?> <label><strong><?php echo $lang_common['Message'] ?></strong><br />
- <textarea name="req_message" rows="20" cols="95" tabindex="<?php echo $cur_index++ ?>"><?php echo isset($_POST['req_message']) ? pun_htmlspecialchars($message) : (isset($quote) ? $quote : ''); ?></textarea><br /></label>
- <ul class="bblinks">
- <li><a href="help.php#bbcode" onclick="window.open(this.href); return false;"><?php echo $lang_common['BBCode'] ?></a>: <?php echo ($pun_config['p_message_bbcode'] == '1') ? $lang_common['on'] : $lang_common['off']; ?></li>
- <li><a href="help.php#img" onclick="window.open(this.href); return false;"><?php echo $lang_common['img tag'] ?></a>: <?php echo ($pun_config['p_message_img_tag'] == '1') ? $lang_common['on'] : $lang_common['off']; ?></li>
- <li><a href="help.php#smilies" onclick="window.open(this.href); return false;"><?php echo $lang_common['Smilies'] ?></a>: <?php echo ($pun_config['o_smilies'] == '1') ? $lang_common['on'] : $lang_common['off']; ?></li>
- </ul>
- </div>
- </fieldset>
-<?php
-
-$checkboxes = array();
-if (!$pun_user['is_guest'])
-{
- if ($pun_config['o_smilies'] == '1')
- $checkboxes[] = '<label><input type="checkbox" name="hide_smilies" value="1" tabindex="'.($cur_index++).'"'.(isset($_POST['hide_smilies']) ? ' checked="checked"' : '').' />'.$lang_post['Hide smilies'];
-
- if ($pun_config['o_subscriptions'] == '1')
- $checkboxes[] = '<label><input type="checkbox" name="subscribe" value="1" tabindex="'.($cur_index++).'"'.(isset($_POST['subscribe']) ? ' checked="checked"' : '').' />'.$lang_post['Subscribe'];
-}
-else if ($pun_config['o_smilies'] == '1')
- $checkboxes[] = '<label><input type="checkbox" name="hide_smilies" value="1" tabindex="'.($cur_index++).'"'.(isset($_POST['hide_smilies']) ? ' checked="checked"' : '').' />'.$lang_post['Hide smilies'];
-
-if (!empty($checkboxes))
-{
-
-?>
- </div>
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_common['Options'] ?></legend>
- <div class="infldset">
- <div class="rbox">
- <?php echo implode('<br /></label>'."\n\t\t\t\t", $checkboxes).'<br /></label>'."\n" ?>
- </div>
- </div>
- </fieldset>
-<?php
-
-}
-
-?>
- </div>
- <p><input type="submit" name="submit" value="<?php echo $lang_common['Submit'] ?>" tabindex="<?php echo $cur_index++ ?>" accesskey="s" /><input type="submit" name="preview" value="<?php echo $lang_post['Preview'] ?>" tabindex="<?php echo $cur_index++ ?>" accesskey="p" /><a href="javascript:history.go(-1)"><?php echo $lang_common['Go back'] ?></a></p>
- </form>
- </div>
-</div>
-
-<?php
-
-// Check to see if the topic review is to be displayed.
-if ($tid && $pun_config['o_topic_review'] != '0')
-{
- require_once PUN_ROOT.'include/parser.php';
-
- $result = $pun_db->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());
-
-?>
-
-<div id="postreview" class="blockpost">
- <h2><span><?php echo $lang_post['Topic review'] ?></span></h2>
-<?php
-
- //Set background switching on
- $bg_switch = true;
- $post_count = 0;
-
- while ($cur_post = $pun_db->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']);
-
-?>
- <div class="box<?php echo $vtbg ?>">
- <div class="inbox">
- <div class="postleft">
- <dl>
- <dt><strong><?php echo pun_htmlspecialchars($cur_post['poster']) ?></strong></dt>
- <dd><?php echo format_time($cur_post['posted']) ?></dd>
- </dl>
- </div>
- <div class="postright">
- <div class="postmsg">
- <?php echo $cur_post['message'] ?>
- </div>
- </div>
- <div class="clearer"></div>
- </div>
- </div>
-<?php
-
- }
-
-?>
-</div>
-<?php
-
-}
-
-require PUN_ROOT.'footer.php';
\ No newline at end of file
--- a/punbb/profile.php Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1628 +0,0 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-$GLOBALS['id'] = 0;
-$id =& $GLOBALS['id'];
-
-$action = isset($_GET['action']) ? $_GET['action'] : null;
-$section = isset($_GET['section']) ? $_GET['section'] : null;
-$id = isset($_GET['id']) ? intval($_GET['id']) : 0;
-if ($id < 2)
- message($lang_common['Bad request']);
-
-if ($pun_user['g_read_board'] == '0' && ($action != 'change_pass' || !isset($_GET['key'])))
- message($lang_common['No view']);
-
-$GLOBALS['lang_profile'] = array();
-$lang_profile =& $GLOBALS['lang_profile'];
-
-// Load the profile.php/register.php language file
-require PUN_ROOT.'lang/'.$pun_user['language'].'/prof_reg.php';
-
-// Load the profile.php language file
-require PUN_ROOT.'lang/'.$pun_user['language'].'/profile.php';
-
-
-if ($action == 'change_pass')
-{
- // Can't do this, Enano's already got it
- message($lang_common['No permission'] . ' This is because this function is disabled in the Enano port, and Enano handles sessions and user management for PunBB.');
-
- if (isset($_GET['key']))
- {
- // If the user is already logged in we shouldn't be here :)
- if (!$pun_user['is_guest'])
- {
- header('Location: index.php');
- exit;
- }
-
- $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 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'].' <a href="mailto:'.$pun_config['o_admin_email'].'">'.$pun_config['o_admin_email'].'</a>.');
- 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';
-
-?>
-<div class="blockform">
- <h2><span><?php echo $lang_profile['Change pass'] ?></span></h2>
- <div class="box">
- <form id="change_pass" method="post" action="<?php echo makeUrlNS('Special', 'Forum/Profile', 'action=change_pass&id=' . $id . '', true); ?>" onsubmit="return process_form(this)">
- <div class="inform">
- <input type="hidden" name="form_sent" value="1" />
- <fieldset>
- <legend><?php echo $lang_profile['Change pass legend'] ?></legend>
- <div class="infldset">
-<?php if ($pun_user['g_id'] < USER_LEVEL_MOD): ?> <label><strong><?php echo $lang_profile['Old pass'] ?></strong><br />
- <input type="password" name="req_old_password" size="16" maxlength="16" /><br /></label>
-<?php endif; ?> <label class="conl"><strong><?php echo $lang_profile['New pass'] ?></strong><br />
- <input type="password" name="req_new_password1" size="16" maxlength="16" /><br /></label>
- <label class="conl"><strong><?php echo $lang_profile['Confirm new pass'] ?></strong><br />
- <input type="password" name="req_new_password2" size="16" maxlength="16" /><br /></label>
- <div class="clearb"></div>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="update" value="<?php echo $lang_common['Submit'] ?>" /><a href="javascript:history.go(-1)"><?php echo $lang_common['Go back'] ?></a></p>
- </form>
- </div>
-</div>
-<?php
-
- require PUN_ROOT.'footer.php';
-}
-
-
-else if ($action == 'change_email')
-{
- // Make sure we are allowed to change this users e-mail
- if ($pun_user['id'] != $id)
- {
- if ($pun_user['g_id'] < USER_LEVEL_MOD) // A regular user trying to change another users e-mail?
- message($lang_common['No permission']);
- else if ($pun_user['g_id'] == USER_LEVEL_MOD) // A moderator trying to change a users e-mail?
- {
- $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_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'].' <a href="mailto:'.$pun_config['o_admin_email'].'">'.$pun_config['o_admin_email'].'</a>.');
- 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('<username>', $pun_user['username'], $mail_message);
- $mail_message = str_replace('<base_url>', $pun_config['o_base_url'], $mail_message);
- $mail_message = str_replace('<activation_url>', $pun_config['o_base_url'].'/profile.php?action=change_email&id='.$id.'&key='.$new_email_key, $mail_message);
- $mail_message = str_replace('<board_mailer>', $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'].' <a href="mailto:'.$pun_config['o_admin_email'].'">'.$pun_config['o_admin_email'].'</a>.', 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';
-
-?>
-<div class="blockform">
- <h2><span><?php echo $lang_profile['Change e-mail'] ?></span></h2>
- <div class="box">
- <form id="change_email" method="post" action="<?php echo makeUrlNS('Special', 'Forum/Profile', 'action=change_email&id=' . $id . '', true); ?>" id="change_email" onsubmit="return process_form(this)">
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_profile['E-mail legend'] ?></legend>
- <div class="infldset">
- <input type="hidden" name="form_sent" value="1" />
- <label><strong><?php echo $lang_profile['New e-mail'] ?></strong><br /><input type="text" name="req_new_email" size="50" maxlength="50" /><br /></label>
- <label><strong><?php echo $lang_common['Password'] ?></strong><br /><input type="password" name="req_password" size="16" maxlength="16" /><br /></label>
- <p><?php echo $lang_profile['E-mail instructions'] ?></p>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="new_email" value="<?php echo $lang_common['Submit'] ?>" /><a href="javascript:history.go(-1)"><?php echo $lang_common['Go back'] ?></a></p>
- </form>
- </div>
-</div>
-<?php
-
- require PUN_ROOT.'footer.php';
-}
-
-
-else if ($action == 'upload_avatar' || $action == 'upload_avatar2')
-{
- if ($pun_config['o_avatars'] == '0')
- message($lang_profile['Avatars disabled']);
-
- if ($pun_user['id'] != $id && $pun_user['g_id'] < USER_LEVEL_MOD)
- message($lang_common['No permission']);
-
- if (isset($_POST['form_sent']))
- {
- if (!isset($_FILES['req_file']))
- message($lang_profile['No file']);
-
- $uploaded_file = $_FILES['req_file'];
-
- // Make sure the upload went smooth
- if (isset($uploaded_file['error']))
- {
- switch ($uploaded_file['error'])
- {
- case 1: // UPLOAD_ERR_INI_SIZE
- case 2: // UPLOAD_ERR_FORM_SIZE
- message($lang_profile['Too large ini']);
- break;
-
- case 3: // UPLOAD_ERR_PARTIAL
- message($lang_profile['Partial upload']);
- break;
-
- case 4: // UPLOAD_ERR_NO_FILE
- message($lang_profile['No file']);
- break;
-
- case 6: // UPLOAD_ERR_NO_TMP_DIR
- message($lang_profile['No tmp directory']);
- break;
-
- default:
- // No error occured, but was something actually uploaded?
- if ($uploaded_file['size'] == 0)
- message($lang_profile['No file']);
- break;
- }
- }
-
- if (is_uploaded_file($uploaded_file['tmp_name']))
- {
- $allowed_types = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/png', 'image/x-png');
- if (!in_array($uploaded_file['type'], $allowed_types))
- message($lang_profile['Bad type']);
-
- // Make sure the file isn't too big
- if ($uploaded_file['size'] > $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'].' <a href="mailto:'.$pun_config['o_admin_email'].'">'.$pun_config['o_admin_email'].'</a>.');
-
- // 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';
-
-?>
-<div class="blockform">
- <h2><span><?php echo $lang_profile['Upload avatar'] ?></span></h2>
- <div class="box">
- <form id="upload_avatar" method="post" enctype="multipart/form-data" action="<?php echo makeUrlNS('Special', 'Forum/Profile', 'action=upload_avatar2&id=' . $id . '', true); ?>" onsubmit="return process_form(this)">
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_profile['Upload avatar legend'] ?></legend>
- <div class="infldset">
- <input type="hidden" name="form_sent" value="1" />
- <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $pun_config['o_avatars_size'] ?>" />
- <label><strong><?php echo $lang_profile['File'] ?></strong><br /><input name="req_file" type="file" size="40" /><br /></label>
- <p><?php echo $lang_profile['Avatar desc'].' '.$pun_config['o_avatars_width'].' x '.$pun_config['o_avatars_height'].' '.$lang_profile['pixels'].' '.$lang_common['and'].' '.$pun_config['o_avatars_size'].' '.$lang_profile['bytes'].' ('.ceil($pun_config['o_avatars_size'] / 1024) ?> KB).</p>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="upload" value="<?php echo $lang_profile['Upload'] ?>" /><a href="javascript:history.go(-1)"><?php echo $lang_common['Go back'] ?></a></p>
- </form>
- </div>
-</div>
-<?php
-
- require PUN_ROOT.'footer.php';
-}
-
-
-else if ($action == 'delete_avatar')
-{
- if ($pun_user['id'] != $id && $pun_user['g_id'] < USER_LEVEL_MOD)
- message($lang_common['No permission']);
-
- confirm_referrer('profile.php');
-
- @unlink($pun_config['o_avatars_dir'].'/'.$id.'.jpg');
- @unlink($pun_config['o_avatars_dir'].'/'.$id.'.png');
- @unlink($pun_config['o_avatars_dir'].'/'.$id.'.gif');
-
- // Disable use_avatar
- $pun_db->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';
-
-?>
-<div class="blockform">
- <h2><span><?php echo $lang_profile['Confirm delete user'] ?></span></h2>
- <div class="box">
- <form id="confirm_del_user" method="post" action="<?php echo makeUrlNS('Special', 'Forum/Profile', 'id=' . $id . '', true); ?>">
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_profile['Confirm delete legend'] ?></legend>
- <div class="infldset">
- <p><?php echo $lang_profile['Confirmation info'].' '.pun_htmlspecialchars($username).'.' ?></p>
- <div class="rbox">
- <label><input type="checkbox" name="delete_posts" value="1" checked="checked" /><?php echo $lang_profile['Delete posts'] ?><br /></label>
- </div>
- <p class="warntext"><strong><?php echo $lang_profile['Delete warning'] ?></strong></p>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="delete_user_comply" value="<?php echo $lang_profile['Delete'] ?>" /><a href="javascript:history.go(-1)"><?php echo $lang_common['Go back'] ?></a></p>
- </form>
- </div>
-</div>
-<?php
-
- require PUN_ROOT.'footer.php';
-}
-
-
-else if (isset($_POST['form_sent']))
-{
- // Fetch the user group of the user we are editing
- $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']);
-
- $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 = '<a href="mailto:'.$user['email'].'">'.$user['email'].'</a>';
- else if ($user['email_setting'] == '1' && !$pun_user['is_guest'])
- $email_field = '<a href="misc.php?email='.$id.'">'.$lang_common['Send e-mail'].'</a>';
- 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 = '<a href="'.$user['url'].'">'.$user['url'].'</a>';
- }
- 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 = '<img src="'.$pun_config['o_avatars_dir'].'/'.$id.'.gif" '.$img_size[3].' alt="" />';
- else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$id.'.jpg'))
- $avatar_field = '<img src="'.$pun_config['o_avatars_dir'].'/'.$id.'.jpg" '.$img_size[3].' alt="" />';
- else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$id.'.png'))
- $avatar_field = '<img src="'.$pun_config['o_avatars_dir'].'/'.$id.'.png" '.$img_size[3].' alt="" />';
- 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 != '') ? ' - ' : '').'<a href="search.php?action=show_user&user_id='.$id.'">'.$lang_profile['Show posts'].'</a>';
-
- $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Profile'];
- define('PUN_ALLOW_INDEX', 1);
- require PUN_ROOT.'header.php';
-
-?>
-<div id="viewprofile" class="block">
- <h2><span><?php echo $lang_common['Profile'] ?></span></h2>
- <div class="box">
- <div class="fakeform">
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_profile['Section personal'] ?></legend>
- <div class="infldset">
- <dl>
- <dt><?php echo $lang_common['Username'] ?>: </dt>
- <dd><?php echo pun_htmlspecialchars($user['username']) ?></dd>
- <dt><?php echo $lang_common['Title'] ?>: </dt>
- <dd><?php echo ($pun_config['o_censoring'] == '1') ? censor_words($user_title_field) : $user_title_field; ?></dd>
- <dt><?php echo $lang_profile['Realname'] ?>: </dt>
- <dd><?php echo ($user['realname'] !='') ? pun_htmlspecialchars(($pun_config['o_censoring'] == '1') ? censor_words($user['realname']) : $user['realname']) : $lang_profile['Unknown']; ?></dd>
- <dt><?php echo $lang_profile['Location'] ?>: </dt>
- <dd><?php echo ($user['location'] !='') ? pun_htmlspecialchars(($pun_config['o_censoring'] == '1') ? censor_words($user['location']) : $user['location']) : $lang_profile['Unknown']; ?></dd>
- <dt><?php echo $lang_profile['Website'] ?>: </dt>
- <dd><?php echo $url ?> </dd>
- <dt><?php echo $lang_common['E-mail'] ?>: </dt>
- <dd><?php echo $email_field ?></dd>
- </dl>
- <div class="clearer"></div>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_profile['Section messaging'] ?></legend>
- <div class="infldset">
- <dl>
- <dt><?php echo $lang_profile['Jabber'] ?>: </dt>
- <dd><?php echo ($user['jabber'] !='') ? pun_htmlspecialchars($user['jabber']) : $lang_profile['Unknown']; ?></dd>
- <dt><?php echo $lang_profile['ICQ'] ?>: </dt>
- <dd><?php echo ($user['icq'] !='') ? $user['icq'] : $lang_profile['Unknown']; ?></dd>
- <dt><?php echo $lang_profile['MSN'] ?>: </dt>
- <dd><?php echo ($user['msn'] !='') ? pun_htmlspecialchars(($pun_config['o_censoring'] == '1') ? censor_words($user['msn']) : $user['msn']) : $lang_profile['Unknown']; ?></dd>
- <dt><?php echo $lang_profile['AOL IM'] ?>: </dt>
- <dd><?php echo ($user['aim'] !='') ? pun_htmlspecialchars(($pun_config['o_censoring'] == '1') ? censor_words($user['aim']) : $user['aim']) : $lang_profile['Unknown']; ?></dd>
- <dt><?php echo $lang_profile['Yahoo'] ?>: </dt>
- <dd><?php echo ($user['yahoo'] !='') ? pun_htmlspecialchars(($pun_config['o_censoring'] == '1') ? censor_words($user['yahoo']) : $user['yahoo']) : $lang_profile['Unknown']; ?></dd>
- </dl>
- <div class="clearer"></div>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_profile['Section personality'] ?></legend>
- <div class="infldset">
- <dl>
-<?php if ($pun_config['o_avatars'] == '1'): ?> <dt><?php echo $lang_profile['Avatar'] ?>: </dt>
- <dd><?php echo $avatar_field ?></dd>
-<?php endif; ?> <dt><?php echo $lang_profile['Signature'] ?>: </dt>
- <dd><div><?php echo isset($parsed_signature) ? $parsed_signature : $lang_profile['No sig']; ?></div></dd>
- </dl>
- <div class="clearer"></div>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_profile['User activity'] ?></legend>
- <div class="infldset">
- <dl>
-<?php if ($posts_field != ''): ?> <dt><?php echo $lang_common['Posts'] ?>: </dt>
- <dd><?php echo $posts_field ?></dd>
-<?php endif; ?> <dt><?php echo $lang_common['Last post'] ?>: </dt>
- <dd><?php echo $last_post ?></dd>
- <dt><?php echo $lang_common['Registered'] ?>: </dt>
- <dd><?php echo format_time($user['registered'], true) ?></dd>
- </dl>
- <div class="clearer"></div>
- </div>
- </fieldset>
- </div>
- </div>
- </div>
-</div>
-
-<?php
-
- require PUN_ROOT.'footer.php';
-}
-else
-{
- if (!$section || $section == 'essentials')
- {
- if ($pun_user['g_id'] >= 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 = '<input type="hidden" name="old_username" value="'.pun_htmlspecialchars($user['username']).'" /><label><strong>'.$lang_common['Username'].'</strong><br /><input type="text" name="req_username" value="'.pun_htmlspecialchars($user['username']).'" size="25" maxlength="25" /><br /></label>'."\n";
- else
- $username_field = '<p>'.$lang_common['Username'].': '.pun_htmlspecialchars($user['username']).'</p>'."\n";
-
- $email_field = '<label><strong>'.$lang_common['E-mail'].'</strong><br /><input type="text" name="req_email" value="'.$user['email'].'" size="40" maxlength="50" /><br /></label><p><a href="misc.php?email='.$id.'">'.$lang_common['Send e-mail'].'</a></p>'."\n";
- }
- else
- {
- $username_field = '<p>'.$lang_common['Username'].': '.pun_htmlspecialchars($user['username']).'</p>'."\n";
-
- if ($pun_config['o_regs_verify'] == '1')
- $email_field = '<p>'.$lang_common['E-mail'].': '.$user['email'].' - <a href="profile.php?action=change_email&id='.$id.'">'.$lang_profile['Change e-mail'].'</a></p>'."\n";
- else
- $email_field = '<label><strong>'.$lang_common['E-mail'].'</strong><br /><input type="text" name="req_email" value="'.$user['email'].'" size="40" maxlength="50" /><br /></label>'."\n";
- }
-
- if ($pun_user['g_id'] == USER_LEVEL_ADMIN)
- {
- $posts_field = '<label>'.$lang_common['Posts'].'<br /><input type="text" name="num_posts" value="'.$user['num_posts'].'" size="8" maxlength="8" /><br /></label><p><a href="search.php?action=show_user&user_id='.$id.'">'.$lang_profile['Show posts'].'</a></p>'."\n";
- }
- else if ($pun_config['o_show_post_count'] == '1' || $pun_user['g_id'] >= USER_LEVEL_MEMBER)
- {
- $posts_field = '<p>'.$lang_common['Posts'].': '.$user['num_posts'].' - <a href="search.php?action=show_user&user_id='.$id.'">'.$lang_profile['Show posts'].'</a></p>'."\n";
- }
- else
- {
- $posts_field = '<p><a href="search.php?action=show_user&user_id='.$id.'">'.$lang_profile['Show posts'].'</a></p>'."\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');
-
-?>
- <div class="blockform">
- <h2><span><?php echo pun_htmlspecialchars($user['username']).' - '.$lang_profile['Section essentials'] ?></span></h2>
- <div class="box">
- <form id="profile1" method="post" action="<?php echo makeUrlNS('Special', 'Forum/Profile', 'section=essentials&id=' . $id . '', true); ?>" onsubmit="return process_form(this)">
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_profile['Username and pass legend'] ?></legend>
- <div class="infldset">
- <input type="hidden" name="form_sent" value="1" />
- <?php echo $username_field ?>
-<?php /* if ($pun_user['id'] == $id || $pun_user['g_id'] == USER_LEVEL_ADMIN || ($user['g_id'] > PUN_MOD && $pun_config['p_mod_change_passwords'] == '1')): ?><p><a href="profile.php?action=change_pass&id=<?php echo $id ?>"><?php echo $lang_profile['Change pass'] ?></a></p>
-<?php endif; */?> </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_prof_reg['Localisation legend'] ?></legend>
- <div class="infldset">
- <label><?php echo $lang_prof_reg['Timezone'] ?>: <?php echo $lang_prof_reg['Timezone info'] ?>
- <br /><select name="form[timezone]">
- <option value="-12"<?php if ($user['timezone'] == -12) echo ' selected="selected"' ?>>-12</option>
- <option value="-11"<?php if ($user['timezone'] == -11) echo ' selected="selected"' ?>>-11</option>
- <option value="-10"<?php if ($user['timezone'] == -10) echo ' selected="selected"' ?>>-10</option>
- <option value="-9.5"<?php if ($user['timezone'] == -9.5) echo ' selected="selected"' ?>>-09.5</option>
- <option value="-9"<?php if ($user['timezone'] == -9) echo ' selected="selected"' ?>>-09</option>
- <option value="-8.5"<?php if ($user['timezone'] == -8.5) echo ' selected="selected"' ?>>-08.5</option>
- <option value="-8"<?php if ($user['timezone'] == -8) echo ' selected="selected"' ?>>-08 PST</option>
- <option value="-7"<?php if ($user['timezone'] == -7) echo ' selected="selected"' ?>>-07 MST</option>
- <option value="-6"<?php if ($user['timezone'] == -6) echo ' selected="selected"' ?>>-06 CST</option>
- <option value="-5"<?php if ($user['timezone'] == -5) echo ' selected="selected"' ?>>-05 EST</option>
- <option value="-4"<?php if ($user['timezone'] == -4) echo ' selected="selected"' ?>>-04 AST</option>
- <option value="-3.5"<?php if ($user['timezone'] == -3.5) echo ' selected="selected"' ?>>-03.5</option>
- <option value="-3"<?php if ($user['timezone'] == -3) echo ' selected="selected"' ?>>-03 ADT</option>
- <option value="-2"<?php if ($user['timezone'] == -2) echo ' selected="selected"' ?>>-02</option>
- <option value="-1"<?php if ($user['timezone'] == -1) echo ' selected="selected"' ?>>-01</option>
- <option value="0"<?php if ($user['timezone'] == 0) echo ' selected="selected"' ?>>00 GMT</option>
- <option value="1"<?php if ($user['timezone'] == 1) echo ' selected="selected"' ?>>+01 CET</option>
- <option value="2"<?php if ($user['timezone'] == 2) echo ' selected="selected"' ?>>+02</option>
- <option value="3"<?php if ($user['timezone'] == 3) echo ' selected="selected"' ?>>+03</option>
- <option value="3.5"<?php if ($user['timezone'] == 3.5) echo ' selected="selected"' ?>>+03.5</option>
- <option value="4"<?php if ($user['timezone'] == 4) echo ' selected="selected"' ?>>+04</option>
- <option value="4.5"<?php if ($user['timezone'] == 4.5) echo ' selected="selected"' ?>>+04.5</option>
- <option value="5"<?php if ($user['timezone'] == 5) echo ' selected="selected"' ?>>+05</option>
- <option value="5.5"<?php if ($user['timezone'] == 5.5) echo ' selected="selected"' ?>>+05.5</option>
- <option value="6"<?php if ($user['timezone'] == 6) echo ' selected="selected"' ?>>+06</option>
- <option value="6.5"<?php if ($user['timezone'] == 6.5) echo ' selected="selected"' ?>>+06.5</option>
- <option value="7"<?php if ($user['timezone'] == 7) echo ' selected="selected"' ?>>+07</option>
- <option value="8"<?php if ($user['timezone'] == 8) echo ' selected="selected"' ?>>+08</option>
- <option value="9"<?php if ($user['timezone'] == 9) echo ' selected="selected"' ?>>+09</option>
- <option value="9.5"<?php if ($user['timezone'] == 9.5) echo ' selected="selected"' ?>>+09.5</option>
- <option value="10"<?php if ($user['timezone'] == 10) echo ' selected="selected"' ?>>+10</option>
- <option value="10.5"<?php if ($user['timezone'] == 10.5) echo ' selected="selected"' ?>>+10.5</option>
- <option value="11"<?php if ($user['timezone'] == 11) echo ' selected="selected"' ?>>+11</option>
- <option value="11.5"<?php if ($user['timezone'] == 11.5) echo ' selected="selected"' ?>>+11.5</option>
- <option value="12"<?php if ($user['timezone'] == 12) echo ' selected="selected"' ?>>+12</option>
- <option value="13"<?php if ($user['timezone'] == 13) echo ' selected="selected"' ?>>+13</option>
- <option value="14"<?php if ($user['timezone'] == 14) echo ' selected="selected"' ?>>+14</option>
- </select>
- <br /></label>
-<?php
-
- $languages = array();
- $d = dir(PUN_ROOT.'lang');
- while (($entry = $d->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);
-
-?>
- <label><?php echo $lang_prof_reg['Language'] ?>: <?php echo $lang_prof_reg['Language info'] ?>
- <br /><select name="form[language]">
-<?php
-
- while (list(, $temp) = @each($languages))
- {
- if ($user['language'] == $temp)
- echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'" selected="selected">'.$temp.'</option>'."\n";
- else
- echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'">'.$temp.'</option>'."\n";
- }
-
-?>
- </select>
- <br /></label>
-<?php
-
- }
-
-?>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_profile['User activity'] ?></legend>
- <div class="infldset">
- <p><?php echo $lang_common['Registered'] ?>: <?php echo format_time($user['registered'], true); if ($pun_user['g_id'] >= USER_LEVEL_MEMBER) echo ' (<a href="moderate.php?get_host='.pun_htmlspecialchars($user['registration_ip']).'">'.pun_htmlspecialchars($user['registration_ip']).'</a>)'; ?></p>
- <p><?php echo $lang_common['Last post'] ?>: <?php echo $last_post ?></p>
- <?php echo $posts_field ?>
-<?php if ($pun_user['g_id'] >= USER_LEVEL_MEMBER): ?> <label><?php echo $lang_profile['Admin note'] ?><br />
- <input id="admin_note" type="text" name="admin_note" value="<?php echo pun_htmlspecialchars($user['admin_note']) ?>" size="30" maxlength="30" /><br /></label>
- </div>
-<?php endif; ?> </fieldset>
- </div>
- <p><input type="submit" name="update" value="<?php echo $lang_common['Submit'] ?>" /><?php echo $lang_profile['Instructions'] ?></p>
- </form>
- </div>
- </div>
-<?php
-
- }
- else if ($section == 'personal')
- {
- if ($pun_user['g_set_title'] == '1')
- $title_field = '<label>'.$lang_common['Title'].' (<em>'.$lang_profile['Leave blank'].'</em>)<br /><input type="text" name="title" value="'.pun_htmlspecialchars($user['title']).'" size="30" maxlength="50" /><br /></label>'."\n";
-
- $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Profile'];
- require PUN_ROOT.'header.php';
-
- generate_profile_menu('personal');
-
-?>
- <div class="blockform">
- <h2><span><?php echo pun_htmlspecialchars($user['username']).' - '.$lang_profile['Section personal'] ?></span></h2>
- <div class="box">
- <form id="profile2" method="post" action="<?php echo makeUrlNS('Special', 'Forum/Profile', 'section=personal&id=' . $id . '', true); ?>">
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_profile['Personal details legend'] ?></legend>
- <div class="infldset">
- <input type="hidden" name="form_sent" value="1" />
- <label><?php echo $lang_profile['Realname'] ?><br /><input type="text" name="form[realname]" value="<?php echo pun_htmlspecialchars($user['realname']) ?>" size="40" maxlength="40" /><br /></label>
-<?php if (isset($title_field)): ?> <?php echo $title_field ?>
-<?php endif; ?> <label><?php echo $lang_profile['Location'] ?><br /><input type="text" name="form[location]" value="<?php echo pun_htmlspecialchars($user['location']) ?>" size="30" maxlength="30" /><br /></label>
- <label><?php echo $lang_profile['Website'] ?><br /><input type="text" name="form[url]" value="<?php echo pun_htmlspecialchars($user['url']) ?>" size="50" maxlength="80" /><br /></label>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="update" value="<?php echo $lang_common['Submit'] ?>" /><?php echo $lang_profile['Instructions'] ?></p>
- </form>
- </div>
- </div>
-<?php
-
- }
- else if ($section == 'messaging')
- {
-
- $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Profile'];
- require PUN_ROOT.'header.php';
-
- generate_profile_menu('messaging');
-
-?>
- <div class="blockform">
- <h2><span><?php echo pun_htmlspecialchars($user['username']).' - '.$lang_profile['Section messaging'] ?></span></h2>
- <div class="box">
- <form id="profile3" method="post" action="<?php echo makeUrlNS('Special', 'Forum/Profile', 'section=messaging&id=' . $id . '', true); ?>">
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_profile['Contact details legend'] ?></legend>
- <div class="infldset">
- <input type="hidden" name="form_sent" value="1" />
- <label><?php echo $lang_profile['Jabber'] ?><br /><input id="jabber" type="text" name="form[jabber]" value="<?php echo pun_htmlspecialchars($user['jabber']) ?>" size="40" maxlength="75" /><br /></label>
- <label><?php echo $lang_profile['ICQ'] ?><br /><input id="icq" type="text" name="form[icq]" value="<?php echo $user['icq'] ?>" size="12" maxlength="12" /><br /></label>
- <label><?php echo $lang_profile['MSN'] ?><br /><input id="msn" type="text" name="form[msn]" value="<?php echo pun_htmlspecialchars($user['msn']) ?>" size="40" maxlength="50" /><br /></label>
- <label><?php echo $lang_profile['AOL IM'] ?><br /><input id="aim" type="text" name="form[aim]" value="<?php echo pun_htmlspecialchars($user['aim']) ?>" size="20" maxlength="30" /><br /></label>
- <label><?php echo $lang_profile['Yahoo'] ?><br /><input id="yahoo" type="text" name="form[yahoo]" value="<?php echo pun_htmlspecialchars($user['yahoo']) ?>" size="20" maxlength="30" /><br /></label>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="update" value="<?php echo $lang_common['Submit'] ?>" /><?php echo $lang_profile['Instructions'] ?></p>
- </form>
- </div>
- </div>
-<?php
-
- }
- else if ($section == 'personality')
- {
- $avatar_field = '<a href="profile.php?action=upload_avatar&id='.$id.'">'.$lang_profile['Change avatar'].'</a>';
- 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 = '<a href="profile.php?action=upload_avatar&id='.$id.'">'.$lang_profile['Upload avatar'].'</a>';
-
- // Display the delete avatar link?
- if ($img_size)
- $avatar_field .= ' <a href="profile.php?action=delete_avatar&id='.$id.'">'.$lang_profile['Delete avatar'].'</a>';
-
- if ($user['signature'] != '')
- $signature_preview = '<p>'.$lang_profile['Sig preview'].'</p>'."\n\t\t\t\t\t".'<div class="postsignature">'."\n\t\t\t\t\t\t".'<hr />'."\n\t\t\t\t\t\t".$parsed_signature."\n\t\t\t\t\t".'</div>'."\n";
- else
- $signature_preview = '<p>'.$lang_profile['No sig'].'</p>'."\n";
-
- $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Profile'];
- require PUN_ROOT.'header.php';
-
- generate_profile_menu('personality');
-
-
-?>
- <div class="blockform">
- <h2><span><?php echo pun_htmlspecialchars($user['username']).' - '.$lang_profile['Section personality'] ?></span></h2>
- <div class="box">
- <form id="profile4" method="post" action="<?php echo makeUrlNS('Special', 'Forum/Profile', 'section=personality&id=' . $id . '', true); ?>">
- <div><input type="hidden" name="form_sent" value="1" /></div>
-<?php if ($pun_config['o_avatars'] == '1'): ?> <div class="inform">
- <fieldset id="profileavatar">
- <legend><?php echo $lang_profile['Avatar legend'] ?></legend>
- <div class="infldset">
-<?php if (isset($avatar_format)): ?> <img src="<?php echo $pun_config['o_avatars_dir'].'/'.$id.'.'.$avatar_format ?>" <?php echo $img_size[3] ?> alt="" />
-<?php endif; ?> <p><?php echo $lang_profile['Avatar info'] ?></p>
- <div class="rbox">
- <label><input type="checkbox" name="form[use_avatar]" value="1"<?php if ($user['use_avatar'] == '1') echo ' checked="checked"' ?> /><?php echo $lang_profile['Use avatar'] ?><br /></label>
- </div>
- <p class="clearb"><?php echo $avatar_field ?></p>
- </div>
- </fieldset>
- </div>
-<?php endif; ?> <div class="inform">
- <fieldset>
- <legend><?php echo $lang_profile['Signature legend'] ?></legend>
- <div class="infldset">
- <p><?php echo $lang_profile['Signature info'] ?></p>
- <div class="txtarea">
- <label><?php echo $lang_profile['Sig max length'] ?>: <?php echo $pun_config['p_sig_length'] ?> / <?php echo $lang_profile['Sig max lines'] ?>: <?php echo $pun_config['p_sig_lines'] ?><br />
- <textarea name="signature" rows="4" cols="65"><?php echo pun_htmlspecialchars($user['signature']) ?></textarea><br /></label>
- </div>
- <ul class="bblinks">
- <li><a href="help.php#bbcode" onclick="window.open(this.href); return false;"><?php echo $lang_common['BBCode'] ?></a>: <?php echo ($pun_config['p_sig_bbcode'] == '1') ? $lang_common['on'] : $lang_common['off']; ?></li>
- <li><a href="help.php#img" onclick="window.open(this.href); return false;"><?php echo $lang_common['img tag'] ?></a>: <?php echo ($pun_config['p_sig_img_tag'] == '1') ? $lang_common['on'] : $lang_common['off']; ?></li>
- <li><a href="help.php#smilies" onclick="window.open(this.href); return false;"><?php echo $lang_common['Smilies'] ?></a>: <?php echo ($pun_config['o_smilies_sig'] == '1') ? $lang_common['on'] : $lang_common['off']; ?></li>
- </ul>
- <?php echo $signature_preview ?>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="update" value="<?php echo $lang_common['Submit'] ?>" /><?php echo $lang_profile['Instructions'] ?></p>
- </form>
- </div>
- </div>
-<?php
-
- }
- else if ($section == 'display')
- {
- $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Profile'];
- require PUN_ROOT.'header.php';
-
- generate_profile_menu('display');
-
-?>
- <div class="blockform">
- <h2><span><?php echo pun_htmlspecialchars($user['username']).' - '.$lang_profile['Section display'] ?></span></h2>
- <div class="box">
- <form id="profile5" method="post" action="<?php echo makeUrlNS('Special', 'Forum/Profile', 'section=display&id=' . $id . '', true); ?>">
- <div><input type="hidden" name="form_sent" value="1" /></div>
-<?php
-
- $styles = array();
- $d = dir(PUN_ROOT.'style');
- while (($entry = $d->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".'<div><input type="hidden" name="form[style]" value="'.$styles[0].'" /></div>'."\n";
- else if (count($styles) > 1)
- {
- natsort($styles);
-
-?>
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_profile['Style legend'] ?></legend>
- <div class="infldset">
- <label><?php echo $lang_profile['Style info'] ?><br />
-
- <select name="form[style]">
-<?php
-
- while (list(, $temp) = @each($styles))
- {
- if ($user['style'] == $temp)
- echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'" selected="selected">'.str_replace('_', ' ', $temp).'</option>'."\n";
- else
- echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'">'.str_replace('_', ' ', $temp).'</option>'."\n";
- }
-
-?>
- </select>
- <br /></label>
- </div>
- </fieldset>
- </div>
-<?php
-
- }
-
-?>
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_profile['Post display legend'] ?></legend>
- <div class="infldset">
- <p><?php echo $lang_profile['Post display info'] ?></p>
- <div class="rbox">
- <label><input type="checkbox" name="form[show_smilies]" value="1"<?php if ($user['show_smilies'] == '1') echo ' checked="checked"' ?> /><?php echo $lang_profile['Show smilies'] ?><br /></label>
- <label><input type="checkbox" name="form[show_sig]" value="1"<?php if ($user['show_sig'] == '1') echo ' checked="checked"' ?> /><?php echo $lang_profile['Show sigs'] ?><br /></label>
-<?php if ($pun_config['o_avatars'] == '1'): ?> <label><input type="checkbox" name="form[show_avatars]" value="1"<?php if ($user['show_avatars'] == '1') echo ' checked="checked"' ?> /><?php echo $lang_profile['Show avatars'] ?><br /></label>
-<?php endif; ?> <label><input type="checkbox" name="form[show_img]" value="1"<?php if ($user['show_img'] == '1') echo ' checked="checked"' ?> /><?php echo $lang_profile['Show images'] ?><br /></label>
- <label><input type="checkbox" name="form[show_img_sig]" value="1"<?php if ($user['show_img_sig'] == '1') echo ' checked="checked"' ?> /><?php echo $lang_profile['Show images sigs'] ?><br /></label>
- </div>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_profile['Pagination legend'] ?></legend>
- <div class="infldset">
- <label class="conl"><?php echo $lang_profile['Topics per page'] ?><br /><input type="text" name="form[disp_topics]" value="<?php echo $user['disp_topics'] ?>" size="6" maxlength="3" /><br /></label>
- <label class="conl"><?php echo $lang_profile['Posts per page'] ?><br /><input type="text" name="form[disp_posts]" value="<?php echo $user['disp_posts'] ?>" size="6" maxlength="3" /><br /></label>
- <p class="clearb"><?php echo $lang_profile['Paginate info'] ?> <?php echo $lang_profile['Leave blank'] ?></p>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="update" value="<?php echo $lang_common['Submit'] ?>" /> <?php echo $lang_profile['Instructions'] ?></p>
- </form>
- </div>
- </div>
-<?php
-
- }
- else if ($section == 'privacy')
- {
- $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Profile'];
- require PUN_ROOT.'header.php';
-
- generate_profile_menu('privacy');
-
-?>
- <div class="blockform">
- <h2><span><?php echo pun_htmlspecialchars($user['username']).' - '.$lang_profile['Section privacy'] ?></span></h2>
- <div class="box">
- <form id="profile6" method="post" action="<?php echo makeUrlNS('Special', 'Forum/Profile', 'section=privacy&id=' . $id . '', true); ?>">
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_prof_reg['Privacy options legend'] ?></legend>
- <div class="infldset">
- <input type="hidden" name="form_sent" value="1" />
- <p><?php echo $lang_prof_reg['E-mail setting info'] ?></p>
- <div class="rbox">
- <label><input type="radio" name="form[email_setting]" value="0"<?php if ($user['email_setting'] == '0') echo ' checked="checked"' ?> /><?php echo $lang_prof_reg['E-mail setting 1'] ?><br /></label>
- <label><input type="radio" name="form[email_setting]" value="1"<?php if ($user['email_setting'] == '1') echo ' checked="checked"' ?> /><?php echo $lang_prof_reg['E-mail setting 2'] ?><br /></label>
- <label><input type="radio" name="form[email_setting]" value="2"<?php if ($user['email_setting'] == '2') echo ' checked="checked"' ?> /><?php echo $lang_prof_reg['E-mail setting 3'] ?><br /></label>
- </div>
- <p><?php echo $lang_prof_reg['Save user/pass info'] ?></p>
- <div class="rbox">
- <label><input type="checkbox" name="form[save_pass]" value="1"<?php if ($user['save_pass'] == '1') echo ' checked="checked"' ?> /><?php echo $lang_prof_reg['Save user/pass'] ?><br /></label>
- </div>
- <p><?php echo $lang_profile['Notify full info'] ?></p>
- <div class="rbox">
- <label><input type="checkbox" name="form[notify_with_post]" value="1"<?php if ($user['notify_with_post'] == '1') echo ' checked="checked"' ?> /><?php echo $lang_profile['Notify full'] ?><br /></label>
- </div>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="update" value="<?php echo $lang_common['Submit'] ?>" /><?php echo $lang_profile['Instructions'] ?></p>
- </form>
- </div>
- </div>
-<?php
-
- }
- else if ($section == 'admin')
- {
- 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['Bad request']);
-
- $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Profile'];
- require PUN_ROOT.'header.php';
-
- generate_profile_menu('admin');
-
-?>
- <div class="blockform">
- <h2><span><?php echo pun_htmlspecialchars($user['username']).' - '.$lang_profile['Section admin'] ?></span></h2>
- <div class="box">
- <form id="profile7" method="post" action="<?php echo makeUrlNS('Special', 'Forum/Profile', 'section=admin&id=' . $id . '&action=foo', true); ?>">
- <div class="inform">
- <input type="hidden" name="form_sent" value="1" />
- <fieldset>
-<?php
-
- if ($pun_user['g_id'] == USER_LEVEL_MOD)
- {
-
-?>
- <legend><?php echo $lang_profile['Delete ban legend'] ?></legend>
- <div class="infldset">
- <p><input type="submit" name="ban" value="<?php echo $lang_profile['Ban user'] ?>" /></p>
- </div>
- </fieldset>
- </div>
-<?php
-
- }
- else
- {
- if ($pun_user['id'] != $id)
- {
-
-?>
- <legend><?php echo $lang_profile['Group membership legend'] ?></legend>
- <div class="infldset">
- <select id="group_id" name="group_id">
-<?php
-
- $result = $pun_db->query('SELECT g_id, g_title FROM '.$pun_db->prefix.'groups WHERE g_id!='.PUN_GUEST.' ORDER BY g_title') or error('Unable to fetch user group list', __FILE__, __LINE__, $pun_db->error());
-
- while ($cur_group = $pun_db->fetch_assoc($result))
- {
- if ($cur_group['g_id'] == $user['g_id'] || ($cur_group['g_id'] == $pun_config['o_default_user_group'] && $user['g_id'] == ''))
- echo "\t\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'" selected="selected">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";
- else
- echo "\t\t\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";
- }
-
-?>
- </select>
- <input type="submit" name="update_group_membership" value="<?php echo $lang_profile['Save'] ?>" />
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
-<?php
-
- }
-
-?>
- <legend><?php echo $lang_profile['Delete ban legend'] ?></legend>
- <div class="infldset">
- <input type="submit" name="delete_user" value="<?php echo $lang_profile['Delete user'] ?>" /> <input type="submit" name="ban" value="<?php echo $lang_profile['Ban user'] ?>" />
- </div>
- </fieldset>
- </div>
-<?php
-
- if ($user['g_id'] == PUN_MOD || $user['g_id'] == PUN_ADMIN)
- {
-
-?>
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_profile['Set mods legend'] ?></legend>
- <div class="infldset">
- <p><?php echo $lang_profile['Moderator in info'] ?></p>
-<?php
-
- $result = $pun_db->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".'</div>';
-
- if ($cur_category != 0)
- echo "\n\t\t\t\t\t\t\t".'</div>'."\n";
-
- echo "\t\t\t\t\t\t\t".'<div class="conl">'."\n\t\t\t\t\t\t\t\t".'<p><strong>'.$cur_forum['cat_name'].'</strong></p>'."\n\t\t\t\t\t\t\t\t".'<div class="rbox">';
- $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".'<label><input type="checkbox" name="moderator_in['.$cur_forum['fid'].']" value="1"'.((in_array($id, $moderators)) ? ' checked="checked"' : '').' />'.pun_htmlspecialchars($cur_forum['forum_name']).'<br /></label>'."\n";
- }
-
-?>
- </div>
- </div>
- <br class="clearb" /><input type="submit" name="update_forums" value="<?php echo $lang_profile['Update forums'] ?>" />
- </div>
- </fieldset>
- </div>
-<?php
-
- }
- }
-
-?>
- </form>
- </div>
- </div>
-<?php
-
- }
-
-?>
- <div class="clearer"></div>
-</div>
-<?php
-
- require PUN_ROOT.'footer.php';
-}
--- a/punbb/register.php Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,414 +0,0 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-
-
-// If we are logged in, we shouldn't be here
-if (!$pun_user['is_guest'])
-{
- header('Location: index.php');
- exit;
-}
-
-// Load the register.php language file
-require PUN_ROOT.'lang/'.$pun_user['language'].'/register.php';
-
-// Load the register.php/profile.php language file
-require PUN_ROOT.'lang/'.$pun_user['language'].'/prof_reg.php';
-
-if ($pun_config['o_regs_allow'] == '0')
- message($lang_register['No new regs']);
-
-
-// User pressed the cancel button
-if (isset($_GET['cancel']))
- pun_redirect('index.php', $lang_register['Reg cancel redirect']);
-
-
-else if ($pun_config['o_rules'] == '1' && !isset($_GET['agree']) && !isset($_POST['form_sent']))
-{
- $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_register['Register'];
- require PUN_ROOT.'header.php';
-
-?>
-<div class="blockform">
- <h2><span><?php echo $lang_register['Forum rules'] ?></span></h2>
- <div class="box">
- <form method="get" action="register.php">
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_register['Rules legend'] ?></legend>
- <div class="infldset">
- <p><?php echo $pun_config['o_rules_message'] ?></p>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="agree" value="<?php echo $lang_register['Agree'] ?>" /><input type="submit" name="cancel" value="<?php echo $lang_register['Cancel'] ?>" /></p>
- </form>
- </div>
-</div>
-<?php
-
- require PUN_ROOT.'footer.php';
-}
-
-
-else if (isset($_POST['form_sent']))
-{
- // Check that someone from this IP didn't register a user within the last hour (DoS prevention)
- $result = $pun_db->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('<board_title>', $pun_config['o_board_title'], $mail_subject);
- $mail_message = str_replace('<base_url>', $pun_config['o_base_url'].'/', $mail_message);
- $mail_message = str_replace('<username>', $username, $mail_message);
- $mail_message = str_replace('<password>', $password1, $mail_message);
- $mail_message = str_replace('<login_url>', $pun_config['o_base_url'].'/login.php', $mail_message);
- $mail_message = str_replace('<board_mailer>', $pun_config['o_board_title'].' '.$lang_common['Mailer'], $mail_message);
-
- pun_mail($email1, $mail_subject, $mail_message);
-
- message($lang_register['Reg e-mail'].' <a href="mailto:'.$pun_config['o_admin_email'].'">'.$pun_config['o_admin_email'].'</a>.', 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';
-
-?>
-<div class="blockform">
- <h2><span><?php echo $lang_register['Register'] ?></span></h2>
- <div class="box">
- <form id="register" method="post" action="register.php?action=register" onsubmit="this.register.disabled=true;if(process_form(this)){return true;}else{this.register.disabled=false;return false;}">
- <div class="inform">
- <div class="forminfo">
- <h3><?php echo $lang_common['Important information'] ?></h3>
- <p><?php echo $lang_register['Desc 1'] ?></p>
- <p><?php echo $lang_register['Desc 2'] ?></p>
- </div>
- <fieldset>
- <legend><?php echo $lang_register['Username legend'] ?></legend>
- <div class="infldset">
- <input type="hidden" name="form_sent" value="1" />
- <label><strong><?php echo $lang_common['Username'] ?></strong><br /><input type="text" name="req_username" size="25" maxlength="25" /><br /></label>
- </div>
- </fieldset>
- </div>
-<?php if ($pun_config['o_regs_verify'] == '0'): ?> <div class="inform">
- <fieldset>
- <legend><?php echo $lang_register['Pass legend 1'] ?></legend>
- <div class="infldset">
- <label class="conl"><strong><?php echo $lang_common['Password'] ?></strong><br /><input type="password" name="req_password1" size="16" maxlength="16" /><br /></label>
- <label class="conl"><strong><?php echo $lang_prof_reg['Confirm pass'] ?></strong><br /><input type="password" name="req_password2" size="16" maxlength="16" /><br /></label>
- <p class="clearb"><?php echo $lang_register['Pass info'] ?></p>
- </div>
- </fieldset>
- </div>
-<?php endif; ?> <div class="inform">
- <fieldset>
- <legend><?php echo ($pun_config['o_regs_verify'] == '1') ? $lang_prof_reg['E-mail legend 2'] : $lang_prof_reg['E-mail legend'] ?></legend>
- <div class="infldset">
-<?php if ($pun_config['o_regs_verify'] == '1'): ?> <p><?php echo $lang_register['E-mail info'] ?></p>
-<?php endif; ?> <label><strong><?php echo $lang_common['E-mail'] ?></strong><br />
- <input type="text" name="req_email1" size="50" maxlength="50" /><br /></label>
-<?php if ($pun_config['o_regs_verify'] == '1'): ?> <label><strong><?php echo $lang_register['Confirm e-mail'] ?></strong><br />
- <input type="text" name="req_email2" size="50" maxlength="50" /><br /></label>
-<?php endif; ?> </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_prof_reg['Localisation legend'] ?></legend>
- <div class="infldset">
- <label><?php echo $lang_prof_reg['Timezone'] ?>: <?php echo $lang_prof_reg['Timezone info'] ?>
- <br /><select id="time_zone" name="timezone">
- <option value="-12"<?php if ($pun_config['o_server_timezone'] == -12 ) echo ' selected="selected"' ?>>-12</option>
- <option value="-11"<?php if ($pun_config['o_server_timezone'] == -11) echo ' selected="selected"' ?>>-11</option>
- <option value="-10"<?php if ($pun_config['o_server_timezone'] == -10) echo ' selected="selected"' ?>>-10</option>
- <option value="-9.5"<?php if ($pun_config['o_server_timezone'] == -9.5) echo ' selected="selected"' ?>>-9.5</option>
- <option value="-9"<?php if ($pun_config['o_server_timezone'] == -9 ) echo ' selected="selected"' ?>>-09</option>
- <option value="-8.5"<?php if ($pun_config['o_server_timezone'] == -8.5) echo ' selected="selected"' ?>>-8.5</option>
- <option value="-8"<?php if ($pun_config['o_server_timezone'] == -8 ) echo ' selected="selected"' ?>>-08 PST</option>
- <option value="-7"<?php if ($pun_config['o_server_timezone'] == -7 ) echo ' selected="selected"' ?>>-07 MST</option>
- <option value="-6"<?php if ($pun_config['o_server_timezone'] == -6 ) echo ' selected="selected"' ?>>-06 CST</option>
- <option value="-5"<?php if ($pun_config['o_server_timezone'] == -5 ) echo ' selected="selected"' ?>>-05 EST</option>
- <option value="-4"<?php if ($pun_config['o_server_timezone'] == -4 ) echo ' selected="selected"' ?>>-04 AST</option>
- <option value="-3.5"<?php if ($pun_config['o_server_timezone'] == -3.5) echo ' selected="selected"' ?>>-3.5</option>
- <option value="-3"<?php if ($pun_config['o_server_timezone'] == -3 ) echo ' selected="selected"' ?>>-03 ADT</option>
- <option value="-2"<?php if ($pun_config['o_server_timezone'] == -2 ) echo ' selected="selected"' ?>>-02</option>
- <option value="-1"<?php if ($pun_config['o_server_timezone'] == -1) echo ' selected="selected"' ?>>-01</option>
- <option value="0"<?php if ($pun_config['o_server_timezone'] == 0) echo ' selected="selected"' ?>>00 GMT</option>
- <option value="1"<?php if ($pun_config['o_server_timezone'] == 1) echo ' selected="selected"' ?>>+01 CET</option>
- <option value="2"<?php if ($pun_config['o_server_timezone'] == 2 ) echo ' selected="selected"' ?>>+02</option>
- <option value="3"<?php if ($pun_config['o_server_timezone'] == 3 ) echo ' selected="selected"' ?>>+03</option>
- <option value="3.5"<?php if ($pun_config['o_server_timezone'] == 3.5 ) echo ' selected="selected"' ?>>+03.5</option>
- <option value="4"<?php if ($pun_config['o_server_timezone'] == 4 ) echo ' selected="selected"' ?>>+04</option>
- <option value="4.5"<?php if ($pun_config['o_server_timezone'] == 4.5 ) echo ' selected="selected"' ?>>+04.5</option>
- <option value="5"<?php if ($pun_config['o_server_timezone'] == 5 ) echo ' selected="selected"' ?>>+05</option>
- <option value="5.5"<?php if ($pun_config['o_server_timezone'] == 5.5 ) echo ' selected="selected"' ?>>+05.5</option>
- <option value="6"<?php if ($pun_config['o_server_timezone'] == 6 ) echo ' selected="selected"' ?>>+06</option>
- <option value="6.5"<?php if ($pun_config['o_server_timezone'] == 6.5 ) echo ' selected="selected"' ?>>+06.5</option>
- <option value="7"<?php if ($pun_config['o_server_timezone'] == 7 ) echo ' selected="selected"' ?>>+07</option>
- <option value="8"<?php if ($pun_config['o_server_timezone'] == 8 ) echo ' selected="selected"' ?>>+08</option>
- <option value="9"<?php if ($pun_config['o_server_timezone'] == 9 ) echo ' selected="selected"' ?>>+09</option>
- <option value="9.5"<?php if ($pun_config['o_server_timezone'] == 9.5 ) echo ' selected="selected"' ?>>+09.5</option>
- <option value="10"<?php if ($pun_config['o_server_timezone'] == 10) echo ' selected="selected"' ?>>+10</option>
- <option value="10.5"<?php if ($pun_config['o_server_timezone'] == 10.5 ) echo ' selected="selected"' ?>>+10.5</option>
- <option value="11"<?php if ($pun_config['o_server_timezone'] == 11) echo ' selected="selected"' ?>>+11</option>
- <option value="11.5"<?php if ($pun_config['o_server_timezone'] == 11.5 ) echo ' selected="selected"' ?>>+11.5</option>
- <option value="12"<?php if ($pun_config['o_server_timezone'] == 12 ) echo ' selected="selected"' ?>>+12</option>
- <option value="13"<?php if ($pun_config['o_server_timezone'] == 13 ) echo ' selected="selected"' ?>>+13</option>
- <option value="14"<?php if ($pun_config['o_server_timezone'] == 14 ) echo ' selected="selected"' ?>>+14</option>
- </select>
- <br /></label>
-<?php
-
- $languages = array();
- $d = dir(PUN_ROOT.'lang');
- while (($entry = $d->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)
- {
-
-?>
- <label><?php echo $lang_prof_reg['Language'] ?>: <?php echo $lang_prof_reg['Language info'] ?>
- <br /><select name="language">
-<?php
-
- while (list(, $temp) = @each($languages))
- {
- if ($pun_config['o_default_lang'] == $temp)
- echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'" selected="selected">'.$temp.'</option>'."\n";
- else
- echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'">'.$temp.'</option>'."\n";
- }
-
-?>
- </select>
- <br /></label>
-<?php
-
- }
-?>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_prof_reg['Privacy options legend'] ?></legend>
- <div class="infldset">
- <p><?php echo $lang_prof_reg['E-mail setting info'] ?></p>
- <div class="rbox">
- <label><input type="radio" name="email_setting" value="0" /><?php echo $lang_prof_reg['E-mail setting 1'] ?><br /></label>
- <label><input type="radio" name="email_setting" value="1" checked="checked" /><?php echo $lang_prof_reg['E-mail setting 2'] ?><br /></label>
- <label><input type="radio" name="email_setting" value="2" /><?php echo $lang_prof_reg['E-mail setting 3'] ?><br /></label>
- </div>
- <p><?php echo $lang_prof_reg['Save user/pass info'] ?></p>
- <div class="rbox">
- <label><input type="checkbox" name="save_pass" value="1" checked="checked" /><?php echo $lang_prof_reg['Save user/pass'] ?><br /></label>
- </div>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="register" value="<?php echo $lang_register['Register'] ?>" /></p>
- </form>
- </div>
-</div>
-<?php
-
-require PUN_ROOT.'footer.php';
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/punbb/rewrite.php Sat Apr 05 23:56:45 2008 -0400
@@ -0,0 +1,103 @@
+<?php
+/***********************************************************************
+
+ Copyright (C) 2002-2008 PunBB.org
+
+ This file is part of PunBB.
+
+ PunBB 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.
+
+ PunBB 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
+
+************************************************************************/
+
+
+// define('PUN_ROOT', './');
+// require PUN_ROOT.'include/essentials.php';
+
+// Bring in all the rewrite rules
+require PUN_ROOT.'include/rewrite_rules.php';
+
+// import globals (I really hope this isn't dangerous)
+foreach ( $GLOBALS as $key => $_ )
+{
+ $$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('<pre>' . htmlspecialchars(print_r($pun_rewrite_rules, true)) . '</pre>');
+
+// 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];
--- /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);
+
--- 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.<br />\\n<br />\\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);
-
--- 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 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-// The contents of this file are very much inspired by the file search.php
-// from the phpBB Group forum software phpBB2 (http://www.phpbb.com).
-
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-
-
-// Load the search.php language file
-require PUN_ROOT.'lang/'.$pun_user['language'].'/search.php';
-
-
-if ($pun_user['g_read_board'] == '0')
- message($lang_common['No view']);
-else if ($pun_user['g_search'] == '0')
- message($lang_search['No search permission']);
-
-
-// Detect two byte character sets
-$multibyte = (isset($lang_common['lang_multibyte']) && $lang_common['lang_multibyte']) ? true : false;
-
-
-// Figure out what to do :-)
-if (isset($_GET['action']) || isset($_GET['search_id']))
-{
- $action = (isset($_GET['action'])) ? $_GET['action'] : null;
- $forum = (isset($_GET['forum'])) ? intval($_GET['forum']) : -1;
- $sort_dir = (isset($_GET['sort_dir'])) ? (($_GET['sort_dir'] == 'DESC') ? 'DESC' : 'ASC') : 'DESC';
- if (isset($search_id)) unset($search_id);
-
- // If a search_id was supplied
- if (isset($_GET['search_id']))
- {
- $search_id = intval($_GET['search_id']);
- if ($search_id < 1)
- message($lang_common['Bad request']);
- }
- // If it's a regular search (keywords and/or author)
- else if ($action == 'search')
- {
- $keywords = (isset($_GET['keywords'])) ? strtolower(trim($_GET['keywords'])) : null;
- $author = (isset($_GET['author'])) ? strtolower(trim($_GET['author'])) : null;
-
- if (preg_match('#^[\*%]+$#', $keywords) || strlen(str_replace(array('*', '%'), '', $keywords)) < 3)
- $keywords = '';
-
- if (preg_match('#^[\*%]+$#', $author) || strlen(str_replace(array('*', '%'), '', $author)) < 3)
- $author = '';
-
- if (!$keywords && !$author)
- message($lang_search['No terms']);
-
- if ($author)
- $author = str_replace('*', '%', $author);
-
- $show_as = (isset($_GET['show_as'])) ? $_GET['show_as'] : 'posts';
- $sort_by = (isset($_GET['sort_by'])) ? intval($_GET['sort_by']) : null;
- $search_in = (!isset($_GET['search_in']) || $_GET['search_in'] == 'all') ? 0 : (($_GET['search_in'] == 'message') ? 1 : -1);
- }
- // If it's a user search (by id)
- else if ($action == 'show_user')
- {
- $user_id = intval($_GET['user_id']);
- if ($user_id < 2)
- message($lang_common['Bad request']);
- }
- else
- {
- if ($action != 'show_new' && $action != 'show_24h' && $action != 'show_unanswered' && $action != 'show_subscriptions')
- message($lang_common['Bad request']);
- }
-
-
- // If a valid search_id was supplied we attempt to fetch the search results from the db
- if (isset($search_id))
- {
- $ident = ($pun_user['is_guest']) ? get_remote_address() : $pun_user['username'];
-
- $result = $pun_db->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';
-
-
-?>
-<div class="linkst">
- <div class="inbox">
- <p class="pagelink"><?php echo $paging_links ?></p>
- </div>
-</div>
-
-<?php
-
- //Set background switching on for show as posts
- $bg_switch = true;
-
- if ($show_as == 'topics')
- {
-
-?>
-<div id="vf" class="blocktable">
- <h2><span><?php echo $lang_search['Search results']; ?></span></h2>
- <div class="box">
- <div class="inbox">
- <table cellspacing="0">
- <thead>
- <tr>
- <th class="tcl" scope="col"><?php echo $lang_common['Topic']; ?></th>
- <th class="tc2" scope="col"><?php echo $lang_common['Forum'] ?></th>
- <th class="tc3" scope="col"><?php echo $lang_common['Replies'] ?></th>
- <th class="tcr" scope="col"><?php echo $lang_common['Last post'] ?></th>
- </tr>
- </thead>
- <tbody>
-<?php
-
- }
-
- // Fetch the list of forums
- $result = $pun_db->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 = '<a href="viewforum.php?id='.$temp[0].'">'.pun_htmlspecialchars($temp[1]).'</a>';
- }
-
- if ($pun_config['o_censoring'] == '1')
- $search_set[$i]['subject'] = censor_words($search_set[$i]['subject']);
-
-
- if ($show_as == 'posts')
- {
- $icon = '<div class="icon"><div class="nosize">'.$lang_common['Normal icon'].'</div></div>'."\n";
- $subject = '<a href="viewtopic.php?id='.$search_set[$i]['tid'].'">'.pun_htmlspecialchars($search_set[$i]['subject']).'</a>';
-
- if (!$pun_user['is_guest'] && $search_set[$i]['last_post'] > $pun_user['last_visit'])
- $icon = '<div class="icon inew"><div class="nosize">'.$lang_common['New icon'].'</div></div>'."\n";
-
-
- if ($pun_config['o_censoring'] == '1')
- $search_set[$i]['message'] = censor_words($search_set[$i]['message']);
-
- $message = str_replace("\n", '<br />', pun_htmlspecialchars($search_set[$i]['message']));
- $pposter = pun_htmlspecialchars($search_set[$i]['pposter']);
-
- if ($search_set[$i]['poster_id'] > 1)
- $pposter = '<strong><a href="profile.php?id='.$search_set[$i]['poster_id'].'">'.$pposter.'</a></strong>';
-
- 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';
-
-
-?>
-<div class="blockpost searchposts<?php echo $vtbg ?>">
- <h2><?php echo $forum ?> » <?php echo $subject ?> » <a href="viewtopic.php?pid=<?php echo $search_set[$i]['pid'].'#p'.$search_set[$i]['pid'] ?>"><?php echo format_time($search_set[$i]['pposted']) ?></a></h2>
- <div class="box">
- <div class="inbox">
- <div class="postleft">
- <dl>
- <dt><?php echo $pposter ?></dt>
- <dd>Replies: <?php echo $search_set[$i]['num_replies'] ?></dd>
- <dd><?php echo $icon; ?></dd>
- <dd><p class="clearb"><a href="viewtopic.php?pid=<?php echo $search_set[$i]['pid'].'#p'.$search_set[$i]['pid'] ?>"><?php echo $lang_search['Go to post'] ?></a></p></dd>
- </dl>
- </div>
- <div class="postright">
- <div class="postmsg">
- <p><?php echo $message ?></p>
- </div>
- </div>
- <div class="clearer"></div>
- </div>
- </div>
-</div>
-<?php
-
- }
- else
- {
- $icon = '<div class="icon"><div class="nosize">'.$lang_common['Normal icon'].'</div></div>'."\n";
-
- $icon_text = $lang_common['Normal icon'];
- $item_status = '';
- $icon_type = 'icon';
-
-
- $subject = '<a href="viewtopic.php?id='.$search_set[$i]['tid'].'">'.pun_htmlspecialchars($search_set[$i]['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($search_set[$i]['poster']).'</span>';
-
- 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 = '<strong>'.$subject.'</strong>';
- $subject_new_posts = '<span class="newtext">[ <a href="viewtopic.php?id='.$search_set[$i]['tid'].'&action=new" title="'.$lang_common['New posts info'].'">'.$lang_common['New posts'].'</a> ]</span>';
- }
- 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 : '';
- }
-
-?>
- <tr<?php if ($item_status != '') echo ' class="'.trim($item_status).'"'; ?>>
- <td class="tcl">
- <div class="intd">
- <div class="<?php echo $icon_type ?>"><div class="nosize"><?php echo trim($icon_text) ?></div></div>
- <div class="tclcon">
- <?php echo $subject."\n" ?>
- </div>
- </div>
- </td>
- <td class="tc2"><?php echo $forum ?></td>
- <td class="tc3"><?php echo $search_set[$i]['num_replies'] ?></td>
- <td class="tcr"><?php echo '<a href="viewtopic.php?pid='.$search_set[$i]['last_post_id'].'#p'.$search_set[$i]['last_post_id'].'">'.format_time($search_set[$i]['last_post']).'</a> '.$lang_common['by'].' '.pun_htmlspecialchars($search_set[$i]['last_poster']) ?></td>
- </tr>
-<?php
-
- }
- }
-
- if ($show_as == 'topics')
- echo "\t\t\t".'</tbody>'."\n\t\t\t".'</table>'."\n\t\t".'</div>'."\n\t".'</div>'."\n".'</div>'."\n\n";
-
-?>
-<div class="<?php echo ($show_as == 'topics') ? 'linksb' : 'postlinksb'; ?>">
- <div class="inbox">
- <p class="pagelink"><?php echo $paging_links ?></p>
- </div>
-</div>
-<?php
-
- $footer_style = 'search';
- require PUN_ROOT.'footer.php';
- }
- else
- message($lang_search['No hits']);
-}
-
-
-$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_search['Search'];
-$focus_element = array('search', 'keywords');
-require PUN_ROOT.'header.php';
-
-?>
-<div id="searchform" class="blockform">
- <h2><span><?php echo $lang_search['Search'] ?></span></h2>
- <div class="box">
- <form id="search" method="get" action="search.php">
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_search['Search criteria legend'] ?></legend>
- <div class="infldset">
- <input type="hidden" name="action" value="search" />
- <label class="conl"><?php echo $lang_search['Keyword search'] ?><br /><input type="text" name="keywords" size="40" maxlength="100" /><br /></label>
- <label class="conl"><?php echo $lang_search['Author search'] ?><br /><input id="author" type="text" name="author" size="25" maxlength="25" /><br /></label>
- <p class="clearb"><?php echo $lang_search['Search info'] ?></p>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_search['Search in legend'] ?></legend>
- <div class="infldset">
- <label class="conl"><?php echo $lang_search['Forum search'] ?>
- <br /><select id="forum" name="forum">
-<?php
-
-if ($pun_config['o_search_all_forums'] == '1' || $pun_user['g_id'] >= USER_LEVEL_MEMBER)
- echo "\t\t\t\t\t\t\t".'<option value="-1">'.$lang_search['All forums'].'</option>'."\n";
-
-$result = $pun_db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.redirect_url FROM '.$pun_db->prefix.'categories AS c INNER JOIN '.$pun_db->prefix.'forums AS f ON c.id=f.cat_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.redirect_url IS NULL ORDER BY c.disp_position, c.id, f.disp_position', true) 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 "\t\t\t\t\t\t\t".'</optgroup>'."\n";
-
- echo "\t\t\t\t\t\t\t".'<optgroup label="'.pun_htmlspecialchars($cur_forum['cat_name']).'">'."\n";
- $cur_category = $cur_forum['cid'];
- }
-
- echo "\t\t\t\t\t\t\t\t".'<option value="'.$cur_forum['fid'].'">'.pun_htmlspecialchars($cur_forum['forum_name']).'</option>'."\n";
-}
-
-?>
- </optgroup>
- </select>
- <br /></label>
- <label class="conl"><?php echo $lang_search['Search in'] ?>
- <br /><select id="search_in" name="search_in">
- <option value="all"><?php echo $lang_search['Message and subject'] ?></option>
- <option value="message"><?php echo $lang_search['Message only'] ?></option>
- <option value="topic"><?php echo $lang_search['Topic only'] ?></option>
- </select>
- <br /></label>
- <p class="clearb"><?php echo $lang_search['Search in info'] ?></p>
- </div>
- </fieldset>
- </div>
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_search['Search results legend'] ?></legend>
- <div class="infldset">
- <label class="conl"><?php echo $lang_search['Sort by'] ?>
- <br /><select name="sort_by">
- <option value="0"><?php echo $lang_search['Sort by post time'] ?></option>
- <option value="1"><?php echo $lang_search['Sort by author'] ?></option>
- <option value="2"><?php echo $lang_search['Sort by subject'] ?></option>
- <option value="3"><?php echo $lang_search['Sort by forum'] ?></option>
- </select>
- <br /></label>
- <label class="conl"><?php echo $lang_search['Sort order'] ?>
- <br /><select name="sort_dir">
- <option value="DESC"><?php echo $lang_search['Descending'] ?></option>
- <option value="ASC"><?php echo $lang_search['Ascending'] ?></option>
- </select>
- <br /></label>
- <label class="conl"><?php echo $lang_search['Show as'] ?>
- <br /><select name="show_as">
- <option value="topics"><?php echo $lang_search['Show as topics'] ?></option>
- <option value="posts"><?php echo $lang_search['Show as posts'] ?></option>
- </select>
- <br /></label>
- <p class="clearb"><?php echo $lang_search['Search results info'] ?></p>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="search" value="<?php echo $lang_common['Submit'] ?>" accesskey="s" /></p>
- </form>
- </div>
-</div>
-<?php
-
-require PUN_ROOT.'footer.php';
--- a/punbb/style/Cobalt.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/Cobalt_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}
-
-
-
-
-
-
-
-
-
-
-
--- /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
--- /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
--- /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
--- 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}
-
-
-
-
-
-
-
-
-
-
-
--- /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
--- /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
--- /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
--- 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}
-
-
-
-
-
-
-
-
-
-
-
--- /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
--- /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
--- /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
--- 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}
-
-
-
-
-
-
-
-
-
-
-
--- /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
--- /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 @@
+<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $base_url.'/style/'.$pun_user['style'] ?>/Oxygen.css" />
+<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $base_url.'/style/'.$pun_user['style'] ?>/Oxygen_cs.css" />
+<!--[if lte IE 6]><link rel="stylesheet" type="text/css" href="<?php echo $base_url.'/style/'.$pun_user['style'] ?>/Oxygen_ie6.css" /><![endif]-->
+<!--[if IE 7]><link rel="stylesheet" type="text/css" href="<?php echo $base_url.'/style/'.$pun_user['style'] ?>/Oxygen_ie7.css" /><![endif]-->
--- /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
--- /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
--- /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
+ }
+
+
+
Binary file punbb/style/Oxygen/blue.png has changed
Binary file punbb/style/Oxygen/crumb.png has changed
Binary file punbb/style/Oxygen/error.png has changed
Binary file punbb/style/Oxygen/feed.png has changed
Binary file punbb/style/Oxygen/help.png has changed
Binary file punbb/style/Oxygen/helpdark.png has changed
Binary file punbb/style/Oxygen/info.png has changed
Binary file punbb/style/Oxygen/searchicon.png has changed
Binary file punbb/style/Oxygen/star.png has changed
Binary file punbb/style/Oxygen/status.png has changed
--- 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}
-
-
-
-
-
-
-
-
-
-
-
--- /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
--- /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
--- /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
--- 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}
-
-
-
-
-
-
-
-
-
-
-
--- /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
--- /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
--- /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
--- 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
--- 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
--- 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
--- 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
--- 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}
--- 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
--- 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%}
--- 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}
--- 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 @@
-<html>
-<head>
-<title>.</title>
-</head>
-<body>
-.
-</body>
-</html>
\ No newline at end of file
--- 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 <and@doxdesk.com>
-// 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.offsetWidth<optimal);
- }
- if (inrange && cs.maxWidth && cs.maxWidth!='none' && cs.maxWidth!='auto' && cs.maxWidth!='') {
- st.width= cs.maxWidth;
- inrange= (el.offsetWidth>optimal);
- }
- if (inrange) st.width= st.minmaxWidth;
- }
-}
-
-var minmax_SCANDELAY= 500;
-
-function minmax_scan() {
- var el;
- for (var i= 0; i<document.all.length; i++) {
- el= document.all[i];
- if (!el.minmax_bound) {
- el.minmax_bound= true;
- minmax_bind(el);
- }
- }
-}
-
-var minmax_scanner;
-function minmax_stop() {
- window.clearInterval(minmax_scanner);
- minmax_scan();
-}
-
-minmax_scan();
-minmax_scanner= window.setInterval(minmax_scan, minmax_SCANDELAY);
-window.attachEvent('onload', minmax_stop);
-
-@end @*/
--- a/punbb/style/index.html Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-<html>
-<head>
-<title>.</title>
-</head>
-<body>
-.
-</body>
-</html>
\ No newline at end of file
--- /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
--- 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 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-
-
-if ($pun_user['g_read_board'] == '0')
- message($lang_common['No view']);
-
-
-// Load the userlist.php language file
-require PUN_ROOT.'lang/'.$pun_user['language'].'/userlist.php';
-
-// Load the search.php language file
-require PUN_ROOT.'lang/'.$pun_user['language'].'/search.php';
-
-
-// Determine if we are allowed to view post counts
-$show_post_count = ($pun_config['o_show_post_count'] == '1' || $pun_user['g_id'] >= 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';
-
-?>
-<div class="blockform">
- <h2><span><?php echo $lang_search['User search'] ?></span></h2>
- <div class="box">
- <form id="userlist" method="get" action="userlist.php">
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_ul['User find legend'] ?></legend>
- <div class="infldset">
-<?php if ($pun_user['g_search_users'] == '1'): ?> <label class="conl"><?php echo $lang_common['Username'] ?><br /><input type="text" name="username" value="<?php echo pun_htmlspecialchars($username) ?>" size="25" maxlength="25" /><br /></label>
-<?php endif; ?> <label class="conl"><?php echo $lang_ul['User group']."\n" ?>
- <br /><select name="show_group">
- <option value="-1"<?php if ($show_group == -1) echo ' selected="selected"' ?>><?php echo $lang_ul['All users'] ?></option>
-<?php
-
-$result = $pun_db->query('SELECT g_id, g_title FROM '.$pun_db->prefix.'groups WHERE g_id!='.PUN_GUEST.' 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))
-{
- if ($cur_group['g_id'] == $show_group)
- echo "\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'" selected="selected">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";
- else
- echo "\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";
-}
-
-?>
- </select>
- <br /></label>
- <label class="conl"><?php echo $lang_search['Sort by']."\n" ?>
- <br /><select name="sort_by">
- <option value="username"<?php if ($sort_by == 'username') echo ' selected="selected"' ?>><?php echo $lang_common['Username'] ?></option>
- <option value="registered"<?php if ($sort_by == 'registered') echo ' selected="selected"' ?>><?php echo $lang_common['Registered'] ?></option>
-<?php if ($show_post_count): ?> <option value="num_posts"<?php if ($sort_by == 'num_posts') echo ' selected="selected"' ?>><?php echo $lang_ul['No of posts'] ?></option>
-<?php endif; ?> </select>
- <br /></label>
- <label class="conl"><?php echo $lang_search['Sort order']."\n" ?>
- <br /><select name="sort_dir">
- <option value="ASC"<?php if ($sort_dir == 'ASC') echo ' selected="selected"' ?>><?php echo $lang_search['Ascending'] ?></option>
- <option value="DESC"<?php if ($sort_dir == 'DESC') echo ' selected="selected"' ?>><?php echo $lang_search['Descending'] ?></option>
- </select>
- <br /></label>
- <p class="clearb"><?php echo $lang_ul['User search info'] ?></p>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="search" value="<?php echo $lang_common['Submit'] ?>" accesskey="s" /></p>
- </form>
- </div>
-</div>
-<?php
-
-
-// Create any SQL for the WHERE clause
-$where_sql = array();
-$like_command = ($db_type == 'pgsql') ? 'ILIKE' : 'LIKE';
-
-if ($pun_user['g_search_users'] == '1' && $username != '')
- $where_sql[] = 'eu.username '.$like_command.' \''.$pun_db->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));
-
-
-?>
-<div class="linkst">
- <div class="inbox">
- <p class="pagelink"><?php echo $paging_links ?></p>
- </div>
-</div>
-
-<div id="users1" class="blocktable">
- <h2><span><?php echo $lang_common['User list'] ?></span></h2>
- <div class="box">
- <div class="inbox">
- <table cellspacing="0">
- <thead>
- <tr>
- <th class="tcl" scope="col"><?php echo $lang_common['Username'] ?></th>
- <th class="tc2" scope="col"><?php echo $lang_common['Title'] ?></th>
-<?php if ($show_post_count): ?> <th class="tc3" scope="col"><?php echo $lang_common['Posts'] ?></th>
-<?php endif; ?> <th class="tcr" scope="col"><?php echo $lang_common['Registered'] ?></th>
- </tr>
- </thead>
- <tbody>
-<?php
-
-// Grab the users
-$result = $pun_db->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);
-
-?>
- <tr>
- <td class="tcl"><?php echo '<a href="profile.php?id='.$user_data['id'].'">'.pun_htmlspecialchars($user_data['username']).'</a>' ?></td>
- <td class="tc2"><?php echo $user_title_field ?></td>
-<?php if ($show_post_count): ?> <td class="tc3"><?php echo $user_data['num_posts'] ?></td>
-<?php endif; ?>
- <td class="tcr"><?php echo format_time($user_data['registered'], true) ?></td>
- </tr>
-<?php
-
- }
-}
-else
- echo "\t\t\t".'<tr>'."\n\t\t\t\t\t".'<td class="tcl" colspan="'.(($show_post_count) ? 4 : 3).'">'.$lang_search['No hits'].'</td></tr>'."\n";
-
-?>
- </tbody>
- </table>
- </div>
- </div>
-</div>
-
-<div class="linksb">
- <div class="inbox">
- <p class="pagelink"><?php echo $paging_links ?></p>
- </div>
-</div>
-<?php
-
-require PUN_ROOT.'footer.php';
--- a/punbb/viewforum.php Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,259 +0,0 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-
-
-if ($pun_user['g_read_board'] == '0')
- message($lang_common['No view']);
-
-
-$id = isset($_GET['id']) ? intval($_GET['id']) : 0;
-if ($id < 1)
- message($lang_common['Bad request']);
-
-// 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.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".'<p class="postlink conr"><a href="post.php?fid='.$id.'">'.$lang_forum['Post topic'].'</a></p>'."\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';
-
-?>
-<div class="linkst">
- <div class="inbox">
- <p class="pagelink conl"><?php echo $paging_links ?></p>
-<?php echo $post_link ?>
- <ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a> </li><li>» <?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></li></ul>
- <div class="clearer"></div>
- </div>
-</div>
-
-<div id="vf" class="blocktable">
- <h2><span><?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></span></h2>
- <div class="box">
- <div class="inbox">
- <table cellspacing="0">
- <thead>
- <tr>
- <th class="tcl" scope="col"><?php echo $lang_common['Topic'] ?></th>
- <th class="tc2" scope="col"><?php echo $lang_common['Replies'] ?></th>
- <th class="tc3" scope="col"><?php echo $lang_forum['Views'] ?></th>
- <th class="tcr" scope="col"><?php echo $lang_common['Last post'] ?></th>
- </tr>
- </thead>
- <tbody>
-<?php
-
-// Fetch list of topics to display on this page
-if ($pun_user['is_guest'] || $pun_config['o_show_dot'] == '0')
-{
- // Without "the dot"
- $sql = '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='.$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 = '<a href="'.makeUrlNS('Special', 'Forum/ViewTopic', 'pid='.$cur_topic['last_post_id'], true).'#p'.$cur_topic['last_post_id'].'">'.format_time($cur_topic['last_post']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['last_poster']).'</span>';
- 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'].': <a href="'.makeUrlNS('Special', 'Forum/ViewTopic', 'id='.$cur_topic['moved_to'], true).'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
- else if ($cur_topic['closed'] == '0')
- $subject = '<a href="'.makeUrlNS('Special', 'Forum/ViewTopic', 'id='.$cur_topic['id'], true).'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
- else
- {
- $subject = '<a href="'.makeUrlNS('Special', 'Forum/ViewTopic', 'id='.$cur_topic['id'], true).'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
- $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 = '<strong>'.$subject.'</strong>';
- $subject_new_posts = '<span class="newtext">[ <a href="viewtopic.php?id='.$cur_topic['id'].'&action=new" title="'.$lang_common['New posts info'].'">'.$lang_common['New posts'].'</a> ]</span>';
- }
- 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 = '<strong>·</strong> '.$subject;
- else
- $subject = ' '.$subject;
- }
-
- if ($cur_topic['sticky'] == '1')
- {
- $subject = '<span class="stickytext">'.$lang_forum['Sticky'].': </span>'.$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 : '';
- }
-
-?>
- <tr<?php if ($item_status != '') echo ' class="'.trim($item_status).'"'; ?>>
- <td class="tcl">
- <div class="intd">
- <div class="<?php echo $icon_type ?>"><div class="nosize"><?php echo trim($icon_text) ?></div></div>
- <div class="tclcon">
- <?php echo $subject."\n" ?>
- </div>
- </div>
- </td>
- <td class="tc2"><?php echo ($cur_topic['moved_to'] == null) ? $cur_topic['num_replies'] : ' ' ?></td>
- <td class="tc3"><?php echo ($cur_topic['moved_to'] == null) ? $cur_topic['num_views'] : ' ' ?></td>
- <td class="tcr"><?php echo $last_post ?></td>
- </tr>
-<?php
-
- }
-}
-else
-{
-
-?>
- <tr>
- <td class="tcl" colspan="4"><?php echo $lang_forum['Empty forum'] ?></td>
- </tr>
-<?php
-
-}
-
-?>
- </tbody>
- </table>
- </div>
- </div>
-</div>
-
-<div class="linksb">
- <div class="inbox">
- <p class="pagelink conl"><?php echo $paging_links ?></p>
-<?php echo $post_link ?>
- <ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a> </li><li>» <?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></li></ul>
- <div class="clearer"></div>
- </div>
-</div>
-<?php
-
-$forum_id = $id;
-$footer_style = 'viewforum';
-require PUN_ROOT.'footer.php';
-
--- a/punbb/viewtopic.php Sun Sep 02 11:00:57 2007 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,398 +0,0 @@
-<?php
-/***********************************************************************
-
- Copyright (C) 2002-2005 Rickard Andersson (rickard@punbb.org)
-
- This file is part of PunBB.
-
- PunBB 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.
-
- PunBB 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
-
-************************************************************************/
-
-
-//define('PUN_ROOT', './');
-//require PUN_ROOT.'include/common.php';
-
-global $pun_db, $pun_user, $pun_config, $lang_common;
-
-
-
-if ($pun_user['g_read_board'] == '0')
- message($lang_common['No view']);
-
-
-$action = isset($_GET['action']) ? $_GET['action'] : null;
-$id = isset($_GET['id']) ? intval($_GET['id']) : 0;
-$pid = isset($_GET['pid']) ? intval($_GET['pid']) : 0;
-if ($id < 1 && $pid < 1)
- message($lang_common['Bad request']);
-
-// Load the viewtopic.php language file
-require PUN_ROOT.'lang/'.$pun_user['language'].'/topic.php';
-
-
-// If a post ID is specified we determine topic ID and page number so we can redirect to the correct message
-if ($pid)
-{
- $result = $pun_db->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 = '<a href="post.php?tid='.$id.'">'.$lang_topic['Post reply'].'</a>';
- else
- $post_link = ' ';
-}
-else
-{
- $post_link = $lang_topic['Topic closed'];
-
- if ($is_admmod)
- $post_link .= ' / <a href="post.php?tid='.$id.'">'.$lang_topic['Post reply'].'</a>';
-}
-
-
-// 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 = '<p class="subscribelink clearb">'.$lang_topic['Is subscribed'].' - <a href="misc.php?unsubscribe='.$id.'">'.$lang_topic['Unsubscribe'].'</a></p>'."\n";
- else
- $subscraction = '<p class="subscribelink clearb"><a href="misc.php?subscribe='.$id.'">'.$lang_topic['Subscribe'].'</a></p>'."\n";
-}
-else
- $subscraction = '<div class="clearer"></div>'."\n";
-
-$page_title = pun_htmlspecialchars($pun_config['o_board_title'].' / '.$cur_topic['subject']);
-define('PUN_ALLOW_INDEX', 1);
-require PUN_ROOT.'header.php';
-
-?>
-<div class="linkst">
- <div class="inbox">
- <p class="pagelink conl"><?php echo $paging_links ?></p>
- <p class="postlink conr"><?php echo $post_link ?></p>
- <ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a></li><li> » <a href="viewforum.php?id=<?php echo $cur_topic['forum_id'] ?>"><?php echo pun_htmlspecialchars($cur_topic['forum_name']) ?></a></li><li> » <?php echo pun_htmlspecialchars($cur_topic['subject']) ?></li></ul>
- <div class="clearer"></div>
- </div>
-</div>
-
-<?php
-
-
-require PUN_ROOT.'include/parser.php';
-
-$bg_switch = true; // Used for switching background color in posts
-$post_count = 0; // Keep track of post numbers
-
-// Retrieve the posts (and their respective poster/online status)
-$result = $pun_db->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 = '<a href="profile.php?id='.$cur_post['poster_id'].'">'.pun_htmlspecialchars($cur_post['username']).'</a>';
- $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']) ? '<strong>'.$lang_topic['Online'].'</strong>' : $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 = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.gif" '.$img_size[3].' alt="" />';
- else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.jpg'))
- $user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.jpg" '.$img_size[3].' alt="" />';
- else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.png'))
- $user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.png" '.$img_size[3].' alt="" />';
- }
- 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[] = '<dd>'.$lang_topic['From'].': '.pun_htmlspecialchars($cur_post['location']);
- }
-
- $user_info[] = '<dd>'.$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[] = '<dd>'.$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[] = '<a href="mailto:'.$cur_post['email'].'">'.$lang_common['E-mail'].'</a>';
- else if ($cur_post['email_setting'] == '1' && !$pun_user['is_guest'])
- $user_contacts[] = '<a href="misc.php?email='.$cur_post['poster_id'].'">'.$lang_common['E-mail'].'</a>';
-
- if ($cur_post['url'] != '')
- $user_contacts[] = '<a href="'.pun_htmlspecialchars($cur_post['url']).'">'.$lang_topic['Website'].'</a>';
- }
-
- if ($pun_user['g_id'] >= USER_LEVEL_MEMBER)
- {
- $user_info[] = '<dd>IP: <a href="moderate.php?get_host='.$cur_post['id'].'">'.$cur_post['poster_ip'].'</a>';
-
- if ($cur_post['admin_note'] != '')
- $user_info[] = '<dd>'.$lang_topic['Note'].': <strong>'.pun_htmlspecialchars($cur_post['admin_note']).'</strong>';
- }
- }
- // 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[] = '<dd>IP: <a href="moderate.php?get_host='.$cur_post['id'].'">'.$cur_post['poster_ip'].'</a>';
-
- if ($pun_config['o_show_user_info'] == '1' && $cur_post['poster_email'] != '' && !$pun_user['is_guest'])
- $user_contacts[] = '<a href="mailto:'.$cur_post['poster_email'].'">'.$lang_common['E-mail'].'</a>';
- }
-
- // Generation post action array (quote, edit, delete etc.)
- if (!$is_admmod)
- {
- if (!$pun_user['is_guest'])
- $post_actions[] = '<li class="postreport"><a href="misc.php?report='.$cur_post['id'].'">'.$lang_topic['Report'].'</a>';
-
- 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[] = '<li class="postdelete"><a href="delete.php?id='.$cur_post['id'].'">'.$lang_topic['Delete'].'</a>';
- if ($pun_user['g_edit_posts'] == '1')
- $post_actions[] = '<li class="postedit"><a href="edit.php?id='.$cur_post['id'].'">'.$lang_topic['Edit'].'</a>';
- }
-
- if (($cur_topic['post_replies'] == '' && $pun_user['g_post_replies'] == '1') || $cur_topic['post_replies'] == '1')
- $post_actions[] = '<li class="postquote"><a href="post.php?tid='.$id.'&qid='.$cur_post['id'].'">'.$lang_topic['Quote'].'</a>';
- }
- }
- else
- $post_actions[] = '<li class="postreport"><a href="misc.php?report='.$cur_post['id'].'">'.$lang_topic['Report'].'</a>'.$lang_topic['Link separator'].'</li><li class="postdelete"><a href="delete.php?id='.$cur_post['id'].'">'.$lang_topic['Delete'].'</a>'.$lang_topic['Link separator'].'</li><li class="postedit"><a href="edit.php?id='.$cur_post['id'].'">'.$lang_topic['Edit'].'</a>'.$lang_topic['Link separator'].'</li><li class="postquote"><a href="post.php?tid='.$id.'&qid='.$cur_post['id'].'">'.$lang_topic['Quote'].'</a>';
-
-
- // 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;
- }
- }
-
-?>
-<div id="p<?php echo $cur_post['id'] ?>" class="blockpost<?php echo $vtbg ?><?php if (($post_count + $start_from) == 1) echo ' firstpost'; ?>">
- <h2><span><span class="conr">#<?php echo ($start_from + $post_count) ?> </span><a href="viewtopic.php?pid=<?php echo $cur_post['id'].'#p'.$cur_post['id'] ?>"><?php echo format_time($cur_post['posted']) ?></a></span></h2>
- <div class="box">
- <div class="inbox">
- <div class="postleft">
- <dl>
- <dt><strong><?php echo $username ?></strong></dt>
- <dd class="usertitle"><strong><?php echo $user_title ?></strong></dd>
- <dd class="postavatar"><?php echo $user_avatar ?></dd>
-<?php if (count($user_info)) echo "\t\t\t\t\t".implode('</dd>'."\n\t\t\t\t\t", $user_info).'</dd>'."\n"; ?>
-<?php if (count($user_contacts)) echo "\t\t\t\t\t".'<dd class="usercontacts">'.implode(' ', $user_contacts).'</dd>'."\n"; ?>
- </dl>
- </div>
- <div class="postright">
- <h3><?php if (($post_count + $start_from) > 1) echo ' Re: '; ?><?php echo pun_htmlspecialchars($cur_topic['subject']) ?></h3>
- <div class="postmsg">
- <?php echo $cur_post['message']."\n" ?>
-<?php if ($cur_post['edited'] != '') echo "\t\t\t\t\t".'<p class="postedit"><em>'.$lang_topic['Last edit'].' '.pun_htmlspecialchars($cur_post['edited_by']).' ('.format_time($cur_post['edited']).')</em></p>'."\n"; ?>
- </div>
-<?php if ($signature != '') echo "\t\t\t\t".'<div class="postsignature"><hr />'.$signature.'</div>'."\n"; ?>
- </div>
- <div class="clearer"></div>
- <div class="postfootleft"><?php if ($cur_post['poster_id'] > 1) echo '<p>'.$is_online.'</p>'; ?></div>
- <div class="postfootright"><?php echo (count($post_actions)) ? '<ul>'.implode($lang_topic['Link separator'].'</li>', $post_actions).'</li></ul></div>'."\n" : '<div> </div></div>'."\n" ?>
- </div>
- </div>
-</div>
-
-<?php
-
-}
-
-?>
-<div class="postlinksb">
- <div class="inbox">
- <p class="postlink conr"><?php echo $post_link ?></p>
- <p class="pagelink conl"><?php echo $paging_links ?></p>
- <ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a></li><li> » <a href="viewforum.php?id=<?php echo $cur_topic['forum_id'] ?>"><?php echo pun_htmlspecialchars($cur_topic['forum_name']) ?></a></li><li> » <?php echo pun_htmlspecialchars($cur_topic['subject']) ?></li></ul>
- <?php echo $subscraction ?>
- </div>
-</div>
-
-<?php
-
-// Display quick post if enabled
-if ($quickpost)
-{
-
-?>
-<div class="blockform">
- <h2><span><?php echo $lang_topic['Quick post'] ?></span></h2>
- <div class="box">
- <form method="post" action="post.php?tid=<?php echo $id ?>" onsubmit="this.submit.disabled=true;if(process_form(this)){return true;}else{this.submit.disabled=false;return false;}">
- <div class="inform">
- <fieldset>
- <legend><?php echo $lang_common['Write message legend'] ?></legend>
- <div class="infldset txtarea">
- <input type="hidden" name="form_sent" value="1" />
- <input type="hidden" name="form_user" value="<?php echo (!$pun_user['is_guest']) ? pun_htmlspecialchars($pun_user['username']) : 'Guest'; ?>" />
- <label><textarea name="req_message" rows="7" cols="75" tabindex="1"></textarea></label>
- <ul class="bblinks">
- <li><a href="help.php#bbcode" onclick="window.open(this.href); return false;"><?php echo $lang_common['BBCode'] ?></a>: <?php echo ($pun_config['p_message_bbcode'] == '1') ? $lang_common['on'] : $lang_common['off']; ?></li>
- <li><a href="help.php#img" onclick="window.open(this.href); return false;"><?php echo $lang_common['img tag'] ?></a>: <?php echo ($pun_config['p_message_img_tag'] == '1') ? $lang_common['on'] : $lang_common['off']; ?></li>
- <li><a href="help.php#smilies" onclick="window.open(this.href); return false;"><?php echo $lang_common['Smilies'] ?></a>: <?php echo ($pun_config['o_smilies'] == '1') ? $lang_common['on'] : $lang_common['off']; ?></li>
- </ul>
- </div>
- </fieldset>
- </div>
- <p><input type="submit" name="submit" tabindex="2" value="<?php echo $lang_common['Submit'] ?>" accesskey="s" /></p>
- </form>
- </div>
-</div>
-<?php
-
-}
-
-// Increment "num_views" for topic
-$low_prio = ($db_type == 'mysql') ? 'LOW_PRIORITY ' : '';
-$pun_db->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';