You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(95) |
Apr
(270) |
May
(111) |
Jun
|
Jul
|
Aug
(64) |
Sep
(130) |
Oct
(319) |
Nov
(17) |
Dec
(191) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(53) |
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
(387) |
Jul
(102) |
Aug
(247) |
Sep
(120) |
Oct
(1) |
Nov
(8) |
Dec
(21) |
| 2007 |
Jan
(38) |
Feb
(36) |
Mar
|
Apr
(32) |
May
(135) |
Jun
(523) |
Jul
(192) |
Aug
(103) |
Sep
(533) |
Oct
(77) |
Nov
(23) |
Dec
(203) |
| 2008 |
Jan
(312) |
Feb
(1193) |
Mar
(404) |
Apr
(67) |
May
(62) |
Jun
(497) |
Jul
(297) |
Aug
(110) |
Sep
(335) |
Oct
(256) |
Nov
(50) |
Dec
(118) |
| 2009 |
Jan
(67) |
Feb
(10) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(10) |
Jul
(61) |
Aug
|
Sep
(16) |
Oct
(45) |
Nov
(12) |
Dec
(14) |
| 2010 |
Jan
(30) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
(7) |
Aug
(7) |
Sep
(5) |
Oct
(5) |
Nov
|
Dec
|
| 2011 |
Jan
(7) |
Feb
(3) |
Mar
(89) |
Apr
(11) |
May
(5) |
Jun
|
Jul
(8) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(89) |
| 2012 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(3) |
Oct
(42) |
Nov
(1) |
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(19) |
Apr
(90) |
May
(38) |
Jun
(235) |
Jul
(38) |
Aug
(10) |
Sep
|
Oct
(29) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
(52) |
Jun
|
Jul
(7) |
Aug
|
Sep
(17) |
Oct
|
Nov
|
Dec
|
|
From: Jon O. <jon...@us...> - 2006-09-12 19:29:35
|
Update of /cvsroot/mxbb/mx_import_tools In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25218/modules/mx_import_tools Added Files: db_install.php db_upgrade.php Log Message: version numbers etc --- NEW FILE: db_install.php --- <?php /** * * @package mxBB Portal Module - mx_phpbb2admin * @version $Id: db_install.php,v 1.1 2006/09/12 19:29:32 jonohlsson Exp $ * @copyright (c) 2002-2006 [menalto.gallery.com, Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ define( 'IN_PORTAL', true ); if ( !defined( 'IN_ADMIN' ) ) { $mx_root_path = './../../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include( $mx_root_path . 'common.' . $phpEx ); // Start session management $mx_user->init($user_ip, PAGE_INDEX); if ( !$userdata['session_logged_in'] ) { die( "Hacking attempt(1)" ); } if ( $userdata['user_level'] != ADMIN ) { die( "Hacking attempt(2)" ); } // End session management } $mx_module_version = '2.0.0'; $mx_module_copy = 'Original phpBB <i>Import Users</i> MOD by Graham Eames :: Adapted for mxBB by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; $message = "<b>This is a fresh install!</b><br/><br/>"; $sql = array(); $sql[] = "UPDATE " . $mx_table_prefix . "module" . " SET module_version = '" . $mx_module_version . "', module_copy = '" . $mx_module_copy . "' WHERE module_id = '" . $mx_module_id . "'"; $message .= mx_do_install_upgrade( $sql ); echo "<br /><br />"; echo "<table width=\"90%\" align=\"center\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"forumline\">"; echo "<tr><th class=\"thHead\" align=\"center\">Module Installation/Upgrading/Uninstalling Information - module specific db tables</th></tr>"; echo "<tr><td class=\"row1\" align=\"left\"><span class=\"gen\">" . $message . "</span></td></tr>"; echo "</table><br />"; ?> --- NEW FILE: db_upgrade.php --- <?php /** * * @package mxBB Portal Module - mx_phpbb2admin * @version $Id: db_upgrade.php,v 1.1 2006/09/12 19:29:32 jonohlsson Exp $ * @copyright (c) 2002-2006 [menalto.gallery.com, Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ define( 'IN_PORTAL', true ); if ( !defined( 'IN_ADMIN' ) ) { $mx_root_path = './../../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include( $mx_root_path . 'common.' . $phpEx ); // Start session management $mx_user->init($user_ip, PAGE_INDEX); if ( !$userdata['session_logged_in'] ) { die( "Hacking attempt(1)" ); } if ( $userdata['user_level'] != ADMIN ) { die( "Hacking attempt(2)" ); } // End session management } $mx_module_version = '2.0.0'; $mx_module_copy = 'Original phpBB <i>Import Users</i> MOD by Graham Eames :: Adapted for mxBB by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; $message = "<b>Upgrading!</b><br/><br/>"; $sql = array(); $sql[] = "UPDATE " . $mx_table_prefix . "module" . " SET module_version = '" . $mx_module_version . "', module_copy = '" . $mx_module_copy . "' WHERE module_id = '" . $mx_module_id . "'"; $message .= mx_do_install_upgrade( $sql ); echo "<br /><br />"; echo "<table width=\"90%\" align=\"center\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"forumline\">"; echo "<tr><th class=\"thHead\" align=\"center\">Module Installation/Upgrading/Uninstalling Information - module specific db tables</th></tr>"; echo "<tr><td class=\"row1\" align=\"left\"><span class=\"gen\">" . $message . "</span></td></tr>"; echo "</table><br />"; ?> |
|
From: Jon O. <jon...@us...> - 2006-09-12 19:29:07
|
Update of /cvsroot/mxbb/mx_gallery2 In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24784/modules/mx_gallery2 Modified Files: db_install.php db_upgrade.php Log Message: version numbers etc Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_gallery2/db_install.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** db_install.php 2 May 2006 23:27:00 -0000 1.3 --- db_install.php 12 Sep 2006 19:29:03 -0000 1.4 *************** *** 31,35 **** } ! $mx_module_version = '1.0.0'; $mx_module_copy = 'Original mxBB <a href="http://menalto.gallery.com" target="_blank"><i>Gallery 2</i></a> (embedding) module by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; --- 31,35 ---- } ! $mx_module_version = '2.0.0'; $mx_module_copy = 'Original mxBB <a href="http://menalto.gallery.com" target="_blank"><i>Gallery 2</i></a> (embedding) module by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; *************** *** 50,53 **** echo "<tr><td class=\"row1\" align=\"left\"><span class=\"gen\">" . $message . "</span></td></tr>"; echo "</table><br />"; - ?> \ No newline at end of file --- 50,52 ---- Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_gallery2/db_upgrade.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** db_upgrade.php 2 May 2006 23:27:00 -0000 1.3 --- db_upgrade.php 12 Sep 2006 19:29:03 -0000 1.4 *************** *** 31,35 **** } ! $mx_module_version = '1.0.0'; $mx_module_copy = 'Original mxBB <a href="http://menalto.gallery.com" target="_blank"><i>Gallery 2</i></a> (embedding) module by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; --- 31,35 ---- } ! $mx_module_version = '2.0.0'; $mx_module_copy = 'Original mxBB <a href="http://menalto.gallery.com" target="_blank"><i>Gallery 2</i></a> (embedding) module by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; |
|
From: Jon O. <jon...@us...> - 2006-09-12 19:28:35
|
Update of /cvsroot/mxbb/mx_errordocs In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24725/modules/mx_errordocs Modified Files: db_install.php db_upgrade.php Log Message: version numbers etc Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_errordocs/db_install.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** db_install.php 30 Aug 2006 19:18:40 -0000 1.6 --- db_install.php 12 Sep 2006 19:28:32 -0000 1.7 *************** *** 40,44 **** } ! $mx_module_version = '1.0.0'; $mx_module_copy = 'Original mxBB <i>Errordocs</i> module by <a href="http://www.phpmix.com" target="_blank">Markus</a>'; --- 40,44 ---- } ! $mx_module_version = '2.0.0'; $mx_module_copy = 'Original mxBB <i>Errordocs</i> module by <a href="http://www.phpmix.com" target="_blank">Markus</a>'; Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_errordocs/db_upgrade.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** db_upgrade.php 2 May 2006 23:26:34 -0000 1.3 --- db_upgrade.php 12 Sep 2006 19:28:32 -0000 1.4 *************** *** 31,35 **** } ! $mx_module_version = '1.0.0'; $mx_module_copy = 'Original mxBB <i>Errordocs</i> module by <a href="http://www.phpmix.com" target="_blank">Markus</a>'; --- 31,35 ---- } ! $mx_module_version = '2.0.0'; $mx_module_copy = 'Original mxBB <i>Errordocs</i> module by <a href="http://www.phpmix.com" target="_blank">Markus</a>'; |
|
From: Jon O. <jon...@us...> - 2006-09-12 19:28:03
|
Update of /cvsroot/mxbb/mx_dev_startkit In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24306/modules/mx_dev_startkit Modified Files: db_install.php db_upgrade.php Log Message: version numbers etc Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_dev_startkit/db_install.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** db_install.php 2 May 2006 23:26:16 -0000 1.4 --- db_install.php 12 Sep 2006 19:27:59 -0000 1.5 *************** *** 31,35 **** } ! $mx_module_version = '1.0.0'; $mx_module_copy = 'Original mxBB <i>Developers Startkit</i> module by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; --- 31,35 ---- } ! $mx_module_version = '2.0.0-b1'; $mx_module_copy = 'Original mxBB <i>Developers Startkit</i> module by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_dev_startkit/db_upgrade.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** db_upgrade.php 2 May 2006 23:26:16 -0000 1.4 --- db_upgrade.php 12 Sep 2006 19:27:59 -0000 1.5 *************** *** 31,35 **** } ! $mx_module_version = 'mxBB - Developers Startkit Module 1.0'; $mx_module_copy = 'How to write a mxBB module? This module demonstrates by giving examples. Author: Jon'; --- 31,35 ---- } ! $mx_module_version = '2.0.0-b1'; $mx_module_copy = 'How to write a mxBB module? This module demonstrates by giving examples. Author: Jon'; |
|
From: Jon O. <jon...@us...> - 2006-09-12 19:27:37
|
Update of /cvsroot/mxbb/mx_calsnails In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24238/modules/mx_calsnails Modified Files: db_install.php db_upgrade.php Log Message: version numbers etc Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_calsnails/db_install.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** db_install.php 29 Jun 2006 22:03:22 -0000 1.22 --- db_install.php 12 Sep 2006 19:27:25 -0000 1.23 *************** *** 30,34 **** } ! $mx_module_version = '2.8.0'; $mx_module_copy = 'Original phpBB <i>Calendar LITE</i> MOD by <a href="http://www.snailsource.com/" target="_blank">Martin</a> :: Adapted for mxBB by <a href="http://www.phpmix.com" target="_blank">Markus</a> & <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; --- 30,34 ---- } ! $mx_module_version = '2.0.0'; $mx_module_copy = 'Original phpBB <i>Calendar LITE</i> MOD by <a href="http://www.snailsource.com/" target="_blank">Martin</a> :: Adapted for mxBB by <a href="http://www.phpmix.com" target="_blank">Markus</a> & <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_calsnails/db_upgrade.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** db_upgrade.php 29 Jun 2006 22:03:22 -0000 1.15 --- db_upgrade.php 12 Sep 2006 19:27:26 -0000 1.16 *************** *** 30,34 **** } ! $mx_module_version = '2.8.0'; $mx_module_copy = 'Original phpBB <i>Calendar LITE</i> MOD by <a href="http://www.snailsource.com/" target="_blank">Martin</a> :: Adapted for mxBB by <a href="http://www.phpmix.com" target="_blank">Markus</a> & <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; --- 30,34 ---- } ! $mx_module_version = '2.0.0'; $mx_module_copy = 'Original phpBB <i>Calendar LITE</i> MOD by <a href="http://www.snailsource.com/" target="_blank">Martin</a> :: Adapted for mxBB by <a href="http://www.phpmix.com" target="_blank">Markus</a> & <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; |
|
From: Jon O. <jon...@us...> - 2006-09-12 19:27:05
|
Update of /cvsroot/mxbb/mx_act In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23827/modules/mx_act Modified Files: db_install.php db_upgrade.php Log Message: version numbers etc Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_act/db_install.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** db_install.php 2 May 2006 23:25:45 -0000 1.12 --- db_install.php 12 Sep 2006 19:26:59 -0000 1.13 *************** *** 30,34 **** } ! $mx_module_version = '1.0.0'; $mx_module_copy = 'Original phpBB <i>Activity</i> MOD by <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=203074" target="_blank">Napoleon/aUsTiN-Inc</a> :: Adapted for mxBB by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; --- 30,34 ---- } ! $mx_module_version = '2.0.0-beta'; $mx_module_copy = 'Original phpBB <i>Activity</i> MOD by <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=203074" target="_blank">Napoleon/aUsTiN-Inc</a> :: Adapted for mxBB by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_act/db_upgrade.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** db_upgrade.php 2 May 2006 23:25:45 -0000 1.12 --- db_upgrade.php 12 Sep 2006 19:26:59 -0000 1.13 *************** *** 30,34 **** } ! $mx_module_version = '1.0.0'; $mx_module_copy = 'Original phpBB <i>Activity</i> MOD by <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=203074" target="_blank">Napoleon/aUsTiN-Inc</a> :: Adapted for mxBB by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; --- 30,34 ---- } ! $mx_module_version = '2.0.0-beta'; $mx_module_copy = 'Original phpBB <i>Activity</i> MOD by <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=203074" target="_blank">Napoleon/aUsTiN-Inc</a> :: Adapted for mxBB by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; |
|
From: Jon O. <jon...@us...> - 2006-09-12 19:26:33
|
Update of /cvsroot/mxbb/core In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23784 Modified Files: .htaccess Log Message: register globals off Index: .htaccess =================================================================== RCS file: /cvsroot/mxbb/core/.htaccess,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** .htaccess 20 Aug 2006 13:01:49 -0000 1.3 --- .htaccess 12 Sep 2006 19:26:28 -0000 1.4 *************** *** 5,8 **** --- 5,11 ---- Options -Indexes + # Just in case, let's disable register globals. + php_flag "register_globals" "0" + # # Limit |
|
From: Jon O. <jon...@us...> - 2006-09-11 17:27:24
|
Update of /cvsroot/mxbb/mx_phpbb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv16376/modules/mx_phpbb Modified Files: mx_phpbb.php Log Message: Restricted View access for anonymous users Index: mx_phpbb.php =================================================================== RCS file: /cvsroot/mxbb/mx_phpbb/mx_phpbb.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** mx_phpbb.php 16 Aug 2006 14:49:30 -0000 1.9 --- mx_phpbb.php 11 Sep 2006 17:27:19 -0000 1.10 *************** *** 15,18 **** --- 15,27 ---- // + // View Permissions + // Due to BOTs and SPAM, it's preferable to hide some forum pages for anonymous users. + // + // phpBB pages to hide (uncomment to activate): + $private_phpbb_script = array('profile', 'memberlist', 'privmsg'); + // + // + + // // Restore POST vars after redirect // Will look into this later *************** *** 51,54 **** --- 60,74 ---- include_once($mx_root_path . "modules/mx_phpbb/includes/phpbb_constants.$phpEx"); + // + // Auth + // + if ( isset($private_phpbb_script) ) + { + if ( in_array($mx_forum->phpbb_script, $private_phpbb_script) && !$userdata['session_logged_in'] ) + { + mx_redirect( append_sid( $mx_root_path . "login.$phpEx?redirect=" . mx_this_url(), true ) ); + } + } + ob_start(); $mx_forum->read_file( $mx_forum->phpbb_script ); |
|
From: Jon O. <jon...@us...> - 2006-09-11 17:19:36
|
Update of /cvsroot/mxbb/core/templates/subSilver/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv12914/templates/subSilver/admin Modified Files: mx_module_admin_body.tpl Log Message: JS bug Index: mx_module_admin_body.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/admin/mx_module_admin_body.tpl,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** mx_module_admin_body.tpl 28 Jun 2006 22:51:44 -0000 1.9 --- mx_module_admin_body.tpl 11 Sep 2006 17:19:31 -0000 1.10 *************** *** 164,176 **** } ! function checkForm() { formErrors = ''; ! if (document.forms['post'].module_name.value.length < 2) { formErrors += "Fill out the module title\r\n"; } ! if (document.forms['post'].module_desc.value.length < 2) { formErrors += "Fill out the module description\r\n"; } ! if (document.forms['post'].module_path.value.length < 2) { formErrors += "Fill out the module path\r\n"; } --- 164,176 ---- } ! function checkForm(form) { formErrors = ''; ! if (form.module_name.value.length < 2) { formErrors += "Fill out the module title\r\n"; } ! if (form.module_desc.value.length < 2) { formErrors += "Fill out the module description\r\n"; } ! if (form.module_path.value.length < 2) { formErrors += "Fill out the module path\r\n"; } *************** *** 180,186 **** return false; } else { - bbstyle(-1); - //formObj.preview.disabled = true; - //formObj.submit.disabled = true; return true; } --- 180,183 ---- |
|
From: Jon O. <jon...@us...> - 2006-09-09 21:21:26
|
Update of /cvsroot/mxbb/mx_phpbb2admin/language/lang_english In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25579/language/lang_english Added Files: index.htm lang_admin.php Log Message: Introducing this module. A couple of phpBB admin Tools - pruning users/posts etc --- NEW FILE: lang_admin.php --- <?php /** * * @package mxBB Portal Module - mx_phpbb2admin * @version $Id: lang_admin.php,v 1.1 2006/09/09 21:21:21 jonohlsson Exp $ * @copyright (c) 2002-2006 [Adam Alkins (http://www.rasadam.com), Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ $lang['Prune_user_posts'] = 'Prune User Posts'; $lang['Prune_explain'] = 'Welcome to the prune user posts Admin module addon for phpBB. This script allows you to prune posts based on a wide range of criteria.'; $lang['Forums_to_prune'] = 'Forums to Prune'; $lang['Forums_to_prune_explain'] = 'Check the box to prune posts in that forum. You can check multiple forums. (Note for large forums: You should only do a couple of forums at a time if you\'re pruning many posts)'; $lang['Users_to_prune'] = 'Users to Prune'; $lang['Username_explain'] = 'Prune posts made by this specific user'; $lang['All_users_explain'] = 'Prune posts by all users'; $lang['Banned_users'] = 'Banned users'; $lang['Banned_users_explain'] = 'Prune posts made by all users that have been banned (as per the banlist)'; $lang['Group'] = 'Group'; $lang['Group_explain'] = 'Prune posts made by users in this specific group'; $lang['IP_explain'] = 'Prune posts made by a specific ip address (xxx.xxx.xxx.xxx), wildcard (xxx.xxx.xxx.*) or range (xxx.xxx.xxx.xxx-yyy.yyy.yyy.yyy). Note: the last quad .255 is considered the range of all the IPs in that quad. If you enter 10.0.0.255, it is just like entering 10.0.0.* (No IP is assigned .255 for that matter, it is reserved). Where you may encounter this is in ranges, 10.0.0.5-10.0.0.255 is the same as "10.0.0.*" . You should really enter 10.0.0.5-10.0.0.254 .'; $lang['Banned_IPs'] = 'Banned IP Addresses'; $lang['Banned_IPs_explain'] = 'Prune posts made by all IPs in the banned list.'; $lang['Guest_posters'] = 'Guest Posters'; $lang['Guest_posters_explain'] = 'Prune posts made by guest posters only (Users not logged in).'; $lang['Date_criteria'] = 'Date Criteria'; $lang['Before'] = 'Before'; $lang['On'] = 'On'; $lang['After'] = 'After'; $lang['the_last'] = 'the last'; $lang['Seconds'] = 'Seconds'; $lang['Minutes'] = 'Minutes'; $lang['By_time_explain'] = 'Prune posts based on the above time. Please note only whole numbers are accepted, there is no reason to use decimals. (If you need .5 days, input 12 and select hours).'; $lang['ddmmyyyy'] = '(dd/mm/yyyy)'; $lang['Date_explain'] = 'Prune posts on above date criteria. Note dates are limited to roughly 1970 - 2038 (4 Bit unix timestamp limit)'; $lang['to'] = 'to'; $lang['Range_explain'] = 'Prune posts between both dates. Dates are subject to above limits.'; $lang['All_posts_explain'] = 'Prune all posts regardless of time.'; $lang['Pruning_options'] = 'Pruning Options'; $lang['Prune_remove_topics'] = 'Remove Topics by User(s)?'; $lang['Prune_remove_topics_explain'] = 'If the user(s) you selected started the topic and others have replied to the topic, would you like the entire topic removed?'; $lang['Exempt_stickies'] = 'Exempt Stickies?'; $lang['Exempt_stickies_explain'] = 'Do not prune posts in stickied topics.'; $lang['Exempt_announcements'] = 'Exempt Announcements?'; $lang['Exempt_announcements_explain'] = 'Do not prune posts in Announcements.'; $lang['Exempt_open'] = 'Exempt Open Topics?'; $lang['Exempt_open_explain'] = 'Do not prune posts in topics that are still open. (e.g. Select this as yes to prune locked topics only)'; $lang['Exempt_polls'] = 'Exempt Polls?'; $lang['Exempt_polls_explain'] = 'Do not prune posts in topics with Polls.'; $lang['Adjust_post_counts'] = 'Adjust Post Counts?'; $lang['Adjust_post_counts_explain'] = 'Update user\'s post counts to reflect posts that were deleted.'; $lang['Update_search'] = 'Update Search Tables?'; $lang['Update_search_explain'] = 'Whether posts should be removed from the search tables. If you select No, you will need to manually rebuild the search tables. You should only select No if you have a very large board on a very slow server pruning many posts.'; $lang['Prune_invalid_mode'] = 'Unable to Prune - Invalid mode'; $lang['Prune_invalid_IP'] = 'Invalid IP Address entered'; $lang['Prune_invalid_date'] = 'Invalid date entered.'; $lang['Prune_invalid_range'] = 'Invalid IP Range entered'; $lang['No_banned_IPs'] = 'There are no banned IP Addresses'; $lang['No_forums_selected'] = 'Unable to start pruning - No forums were selected'; $lang['Prune_no_posts'] = 'Unable to start pruning - No posts were found to prune'; $lang['Prune_finished'] = 'Pruning successfully completed.<br /><br />Return to the <a href="%s">Prune User Posts</a> page.<br /><br />Return to the <a href="%s">Admin Index</a>.'; // // Admin Userlist Start // $lang['Userlist'] = 'User list'; $lang['Userlist_description'] = 'View a complete list of your users and perform various actions on them'; $lang['Add_group'] = 'Add to a Group'; $lang['Add_group_explain'] = 'Select which group to add the selected users to'; $lang['Open_close'] = 'Open/Close'; $lang['Active'] = 'Active'; $lang['Group'] = 'Group(s)'; $lang['Rank'] = 'Rank'; $lang['Last_activity'] = 'Last Activity'; $lang['Never'] = 'Never'; $lang['User_manage'] = 'Manage'; $lang['Find_all_posts'] = 'Find All Posts'; $lang['Select_one'] = 'Select One'; $lang['Ban'] = 'Ban'; $lang['Activate_deactivate'] = 'Activate/De-activate'; $lang['User_id'] = 'User id'; $lang['User_level'] = 'User Level'; $lang['Ascending'] = 'Ascending'; $lang['Descending'] = 'Descending'; $lang['Show'] = 'Show'; $lang['All'] = 'All'; $lang['Member'] = 'Member'; $lang['Pending'] = 'Pending'; $lang['Confirm_user_ban'] = 'Are you sure you want to ban the selected user(s)?'; $lang['Confirm_user_deleted'] = 'Are you sure you want to detele the selected user(s)?'; $lang['User_status_updated'] = 'User(s) status updated successfully!'; $lang['User_banned_successfully'] = 'User(s) banned successfully!'; $lang['User_deleted_successfully'] = 'User(s) deleted successfully!'; $lang['User_add_group_successfully'] = 'User(s) added to group successfully!'; $lang['Click_return_userlist'] = 'Click %shere%s to return to the User List'; // // Admin Userlist End // // // Prune Inactive Users by kkroo < pri...@ho... > (Omar Ramadan) http://phpbb-login.sourceforge.net // $lang['Click_return_userprune'] = 'Click %sHere%s to return to Prune Inactive Users'; $lang['Prune_users_page_title'] = 'Prune Inactive Users'; $lang['Prune_users_page_explain'] = 'This is a list of users fetched by the query you created. Select the users that you want to prune below and hit submit. If you would would like to notify the user that his account is inactive, click email on the user\'s row.'; $lang['Prune_users_Confirm_message'] = 'Are you sure you want to delete these users?'; $lang['Prune_users_Confirm_last_visit'] = 'Last Visit'; $lang['Prune_users_Confirm_select_all_none'] = 'Select All/None'; $lang['Prune_users_selected'] = 'Selected'; $lang['Never'] = 'Never'; $lang['All_Time'] = 'All Time'; $lang['Seven_days'] = 'Seven days ago'; $lang['Ten_days'] = 'Ten days ago'; $lang['Two_weeks'] = 'Two weeks ago'; $lang['One_month'] = 'One month ago'; $lang['Two_months'] = 'Two months ago'; $lang['Three_months'] = 'Three months ago'; $lang['Notify_user'] = 'Notify'; $lang['user_regdate'] = 'Registered'; $lang['user_active'] = 'Activated'; $lang['user_posts'] = 'Posts'; $lang['Prune_users_sql_explain'] = 'Build your search criteria using the form below.'; $lang['Build_Query'] = 'Build Query'; $lang['Build_Your_Query'] = 'Build your query'; $lang['last_visit_explain'] = 'Scan for users that have not logged in since the selected number of days ago. Use "Never" to find users that have never logged in.'; $lang['user_regdate_explain'] = 'Set a limit for the user registration dates. For example, if you use the "Active" check below, you might want to give users a few days to click their activation email first. The default limit is 7 days, meaning that users are given a 7 day window to complete thier registration before they are removed.'; $lang['user_active_explain'] = 'Use this option to mark users that have not activated their accounts, or that have become inactive for some other reason.'; $lang['user_posts_explain'] = 'Set a criteria for marking users based on post count. The most common setting is for "zero post" users.'; $lang['Your_account_is_inactive'] = 'Your account is inactive.'; ?> --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> |
|
From: Jon O. <jon...@us...> - 2006-09-09 21:21:25
|
Update of /cvsroot/mxbb/mx_phpbb2admin/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25579/admin Added Files: admin_prune_user_posts.php admin_prune_users.php admin_userlist.php index.htm Log Message: Introducing this module. A couple of phpBB admin Tools - pruning users/posts etc --- NEW FILE: admin_prune_users.php --- <?php /** * * @package mxBB Portal Module - mx_phpbb2admin * @version $Id: admin_prune_users.php,v 1.1 2006/09/09 21:21:20 jonohlsson Exp $ * @copyright (c) 2002-2006 [Omar Ramadan, Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ define( 'IN_PORTAL', true ); if ( !empty( $setmodules ) ) { $filename = basename( __FILE__ ); $module['phpbb2admin']['Prune_Inactive_Users'] = 'modules/mx_phpbb2admin/admin/' . $filename; return; } $mx_root_path = './../../../'; $module_root_path = "./../"; $phpEx = substr(strrchr(__FILE__, '.'), 1); require( $mx_root_path . '/admin/pagestart.' . $phpEx ); include_once( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); // ********************************************************************** // Read language definition // ********************************************************************** if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); } else { include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); } if ( $_POST['submit'] ) { foreach ( $_POST['inactive_users'] as $user_id ) { $user_id = str_replace("\'", "''", $user_id ); $sql = "SELECT g.group_id FROM " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g WHERE ug.user_id = $user_id AND g.group_id = ug.group_id AND g.group_single_user = 1"; if( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain group information for this user', '', __LINE__, __FILE__, $sql); } $row = $db->sql_fetchrow($result); $sql = "UPDATE " . POSTS_TABLE . " SET poster_id = " . DELETED . ", post_username = '" . str_replace("\\'", "''", str_replace("\'", "''", $this_userdata['username'])) . "' WHERE poster_id = $user_id"; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not update posts for this user', '', __LINE__, __FILE__, $sql); } $sql = "UPDATE " . TOPICS_TABLE . " SET topic_poster = " . DELETED . " WHERE topic_poster = $user_id"; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not update topics for this user', '', __LINE__, __FILE__, $sql); } $sql = "UPDATE " . VOTE_USERS_TABLE . " SET vote_user_id = " . DELETED . " WHERE vote_user_id = $user_id"; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not update votes for this user', '', __LINE__, __FILE__, $sql); } $sql = "SELECT group_id FROM " . GROUPS_TABLE . " WHERE group_moderator = $user_id"; if( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not select groups where user was moderator', '', __LINE__, __FILE__, $sql); } while ( $row_group = $db->sql_fetchrow($result) ) { $group_moderator[] = $row_group['group_id']; } if ( count($group_moderator) ) { $update_moderator_id = implode(', ', $group_moderator); $sql = "UPDATE " . GROUPS_TABLE . " SET group_moderator = " . $userdata['user_id'] . " WHERE group_moderator IN ($update_moderator_id)"; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not update group moderators', '', __LINE__, __FILE__, $sql); } } $sql = "DELETE FROM " . USERS_TABLE . " WHERE user_id = $user_id"; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not delete user', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . USER_GROUP_TABLE . " WHERE user_id = $user_id"; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not delete user from user_group table', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . GROUPS_TABLE . " WHERE group_id = " . $row['group_id']; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not delete group for this user', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . AUTH_ACCESS_TABLE . " WHERE group_id = " . $row['group_id']; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not delete group for this user', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " WHERE user_id = $user_id"; if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not delete user from topic watch table', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . BANLIST_TABLE . " WHERE ban_userid = $user_id"; if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not delete user from banlist table', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . SESSIONS_TABLE . " WHERE session_user_id = $user_id"; if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not delete sessions for this user', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . SESSIONS_KEYS_TABLE . " WHERE user_id = $user_id"; if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not delete auto-login keys for this user', '', __LINE__, __FILE__, $sql); } $sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . " WHERE privmsgs_from_userid = $user_id OR privmsgs_to_userid = $user_id"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not select all users private messages', '', __LINE__, __FILE__, $sql); } // This little bit of code directly from the private messaging section. while ( $row_privmsgs = $db->sql_fetchrow($result) ) { $mark_list[] = $row_privmsgs['privmsgs_id']; } if ( count($mark_list) ) { $delete_sql_id = implode(', ', $mark_list); $delete_text_sql = "DELETE FROM " . PRIVMSGS_TEXT_TABLE . " WHERE privmsgs_text_id IN ($delete_sql_id)"; $delete_sql = "DELETE FROM " . PRIVMSGS_TABLE . " WHERE privmsgs_id IN ($delete_sql_id)"; if ( !$db->sql_query($delete_sql) ) { message_die(GENERAL_ERROR, 'Could not delete private message info', '', __LINE__, __FILE__, $delete_sql); } if ( !$db->sql_query($delete_text_sql) ) { message_die(GENERAL_ERROR, 'Could not delete private message text', '', __LINE__, __FILE__, $delete_text_sql); } } } $message = $lang['User_deleted'] . '<br /><br />' . sprintf($lang['Click_return_userprune'], '<a href="' . append_sid("admin_prune_users.$phpEx") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>'); message_die(GENERAL_MESSAGE, $message); } elseif ( isset ( $_POST['fetch'] ) ) { // fetch inactive users list $inactive_users = mx_users_inactive(); // set up template $template->set_filenames(array( 'body' => 'admin/prune_users.tpl') ); for($i = 0; $i < count ( $inactive_users ); $i++) { $user_id = $inactive_users[$i]['user_id']; $username = $inactive_users[$i]['username']; $user_lastvisit = ( !$inactive_users[$i]['user_lastvisit'] ) ? $lang['Never'] : create_date($board_config['default_dateformat'], $inactive_users[$i]['user_lastvisit'], $board_config['board_timezone']); $user_regdate = ( !$inactive_users[$i]['user_regdate'] ) ? $lang['Never'] : create_date($board_config['default_dateformat'], $inactive_users[$i]['user_regdate'], $board_config['board_timezone']); $user_active = ( !$inactive_users[$i]['user_active'] ) ? $lang['No'] : $lang['Yes']; $user_posts = $inactive_users[$i]['user_posts']; $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2']; $template->assign_block_vars("inactive_users", array( "ROW_COLOR" => "#" . $row_color, "ROW_CLASS" => $row_class, "USER_ID" => $user_id, "USERNAME" => $username, "USER_LAST_VISIT" => $user_lastvisit, "USER_REGDATE" => $user_regdate, "USER_ACTIVE" => $user_active, "USER_POSTS" => $user_posts, "U_USER_PROFILE" => append_sid($phpbb_root_path . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id"), "U_NOTIFY_USER" => append_sid("admin_prune_users.$phpEx?mode=notify&" . POST_USERS_URL . "=$user_id") ) ); // build template switches if ( isset( $_POST['login_check'] ) ) { $template->assign_block_vars("inactive_users.user_lastvisit", array() ); } if ( isset( $_POST['registered_check'] ) ) { $template->assign_block_vars("inactive_users.user_regdate", array() ); } if ( isset( $_POST['active_check'] ) ) { $template->assign_block_vars("inactive_users.user_active", array() ); } if ( isset( $_POST['posts_check'] ) ) { $template->assign_block_vars("inactive_users.user_posts", array() ); } } $number_of_columns = 3; // build template switches if ( isset( $_POST['login_check'] ) ) { $template->assign_block_vars("user_lastvisit", array() ); $number_of_columns++; } if ( isset( $_POST['registered_check'] ) ) { $template->assign_block_vars("user_regdate", array() ); $number_of_columns++; } if ( isset( $_POST['active_check'] ) ) { $template->assign_block_vars("user_active", array() ); $number_of_columns++; } if ( isset( $_POST['posts_check'] ) ) { $template->assign_block_vars("user_posts", array() ); $number_of_columns++; } if ( ! count ( $inactive_users ) ) { $template->assign_block_vars("no_inactive_users", array("L_NONE" => $lang['Acc_None'] ) ); } $template->assign_vars(array( 'L_PAGE_TITLE' => $lang['Prune_users_page_title'], 'L_PAGE_EXPLAIN' => $lang['Prune_users_page_explain'], 'L_CONFIRM_MESSAGE' => $lang['Prune_users_Confirm_message'], 'L_USERNAME' => $lang['Username'], 'L_SELECT_ALL_NONE' => $lang['Prune_users_Confirm_select_all_none'], 'L_SELECTED' => $lang['Prune_users_selected'], 'L_SUBMIT' => $lang['Submit'], 'L_EMAIL' => $lang['Email'], 'L_NOTIFY_USER' => $lang['Notify_user'], 'L_USER_LAST_VISIT' => $lang['Prune_users_Confirm_last_visit'], 'L_USER_REGDATE' => $lang['user_regdate'], 'L_USER_ACTIVE' => $lang['user_active'], 'L_USER_POSTS' => $lang['user_posts'], 'NUMBER_OF_COLUMNS' => $number_of_columns, 'S_FORM_ACTION' => append_sid("admin_prune_users.$phpEx")) ); include_once( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $template->pparse('body'); include_once( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); } elseif ( $_GET['mode'] == 'notify' && !empty($_GET[POST_USERS_URL] ) ) { $sql = "SELECT user_id, username, user_email, user_active, user_lang FROM " . USERS_TABLE . " WHERE user_id = '" . str_replace("\'", "''", $_GET[POST_USERS_URL] ) . "'"; if ( $result = $db->sql_query($sql) ) { if ( $row = $db->sql_fetchrow($result) ) { include($phpbb_root_path . 'includes/emailer.'.$phpEx); $emailer = new emailer($board_config['smtp_delivery']); $emailer->from($board_config['board_email']); $emailer->replyto($board_config['board_email']); $emailer->use_template('user_inactive_notify', $row['user_lang']); $emailer->email_address($row['user_email']); $emailer->set_subject($lang['Your_account_is_inactive']); $emailer->assign_vars(array( 'SITENAME' => $board_config['sitename'], 'USERNAME' => $username, 'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '' )); if ( $emailer->send() ) { message_die(GENERAL_MESSAGE, 'Notification email sent <br> <a href="javascript:history.back();">Back</a>'); } else { message_die(GENERAL_MESSAGE, 'Notification email failed to send'); } $emailer->reset(); } else { message_die(GENERAL_MESSAGE, 'This user does not exist'); } } else { message_die(GENERAL_ERROR, 'Could not obtain user information to notify the user', '', __LINE__, __FILE__, $sql); } } else { // set up template $template->set_filenames(array( 'body' => 'admin/prune_users_sql.tpl') ); $template->assign_vars(array( 'L_PAGE_TITLE' => $lang['Prune_users_page_title'], 'L_PAGE_EXPLAIN' => $lang['Prune_users_sql_explain'], 'L_BUILD_QUERY' => $lang['Build_Query'], 'L_BUILD_YOUR_QUERY' => $lang['Build_Your_Query'], 'L_USER_LAST_VISIT' => $lang['Prune_users_Confirm_last_visit'], 'L_USER_REGDATE' => $lang['user_regdate'], 'L_USER_ACTIVE' => $lang['user_active'], 'L_USER_POSTS' => $lang['user_posts'], 'L_YES' => $lang['Yes'], 'L_NO' => $lang['No'], 'L_USER_LAST_VISIT_EXPLAIN' => $lang['last_visit_explain'], 'L_USER_REGDATE_EXPLAIN' => $lang['user_regdate_explain'], 'L_USER_ACTIVE_EXPLAIN' => $lang['user_active_explain'], 'L_USER_POSTS_EXPLAIN' => $lang['user_posts_explain'], 'SEVEN_DAYS' => time() - ( 60 * 60 * 24 * 7 ), 'TEN_DAYS' => time() - ( 60 * 60 * 24 * 10 ), 'TWO_WEEKS' => time() - ( 60 * 60 * 24 * 14 ), 'ONE_MONTH' => time() - ( 60 * 60 * 24 * 30 ), 'TWO_MONTHS' => time() - ( 60 * 60 * 24 * 60 ), 'THREE_MONTHS' => time() - ( 60 * 60 * 24 * 90 ), 'L_NEVER' => $lang['Never'], 'L_ALL_TIME' => $lang['All_Time'], 'L_SEVEN_DAYS' => $lang['Seven_days'], 'L_TEN_DAYS' => $lang['Ten_days'], 'L_TWO_WEEKS' => $lang['Two_weeks'], 'L_ONE_MONTH' => $lang['One_month'], 'L_TWO_MONTHS' => $lang['Two_months'], 'L_THREE_MONTHS' => $lang['Three_months'], 'S_FORM_ACTION' => append_sid("admin_prune_users.$phpEx")) ); include_once( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $template->pparse('body'); include_once( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); } // // Function // // Fetch data for inactive users function mx_users_inactive() { global $db, $lang, $board_config, $_POST; $inactive_users = array(); if ( $_POST['registered_check'] ) { $sql_registered = " " . str_replace("\'", "''", $_POST['user_registered_condition']) . " `user_regdate` >= '" . ( int ) str_replace("\'", "''", $_POST['user_registered']) . "'"; } if ( $_POST['login_check'] ) { $sql_login = " " . str_replace("\'", "''", $_POST['user_lastvisit_condition']) . " `user_lastvisit` <= '" . ( int ) str_replace("\'", "''", $_POST['user_lastvisit']) . "'"; } if ( $_POST['active_check'] ) { $sql_active = " " . str_replace("\'", "''", $_POST['user_active_condition']) . " `user_active` = '" . ( int ) str_replace("\'", "''", $_POST['user_active']) . "'"; } if ( $_POST['posts_check'] ) { $sql_posts = " " . str_replace("\'", "''", $_POST['user_posts_condition']) . " `user_posts` " . str_replace("\'", "''", $_POST['user_posts_sign']) . " '" . ( int ) str_replace("\'", "''", $_POST['user_posts']) . "'"; } // User is not Guest $sql_non_anonymous = " AND user_id <> " . ANONYMOUS; // Build conditions array $conditions = array( 'user_regdate' => array( 'check' => 'registered_check', 'variable' => 'sql_registered', 'condition' => str_replace("\'", "''", $_POST['user_registered_condition'] ) ), 'user_lastvisit' => array( 'check' => 'login_check', 'variable' => 'sql_login', 'condition' => str_replace("\'", "''", $_POST['user_lastvisit_condition']) ), 'user_active' => array( 'check' => 'active_check', 'variable' => 'sql_active', 'condition' => str_replace("\'", "''", $_POST['user_active_condition']) ), 'user_posts' => array( 'check' => 'posts_check', 'variable' => 'sql_posts', 'condition' => str_replace("\'", "''", $_POST['user_posts_condition']) ), 'non_anonymous' => array( 'variable' => 'sql_non_anonymous', 'condition' => 'AND' ) ); $sql_or = ''; $sql_and = ''; $sql_selects = 'user_id, username,'; // Sort query while ( list ( $key, $array ) = @each ( $conditions ) ) { if ( !empty($array['condition']) && $array['condition'] == 'OR' ) { $sql_or .= $$array['variable']; } elseif ( !empty($array['condition']) && $array['condition'] == 'AND' ) { $sql_and .= $$array['variable'] ; } // Build sql selects if ( $key !== 'non_anonymous' && !empty($array['check']) ) { $sql_selects .= " " . $key . ","; } } // touch up query parts if ( !empty( $sql_or ) ) { $sql_or = '(' . $sql_or; $sql_or .= ' )'; } else { $sql_and = substr( $sql_and, 4, strlen($sql_and) ); } $sql_or = str_replace( '( OR', '( ', $sql_or ); $sql_selects = substr( $sql_selects, 0, ( strlen($sql_selects) - 1 ) ); // put query together $sql = "SELECT " . $sql_selects . " \n FROM " . USERS_TABLE . " \n WHERE " . $sql_or . " \n " . $sql_and . " \n ORDER BY user_id;"; if (! $result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, $lang['sql_error'], "", __LINE__, __FILE__, $sql); } while ( $row = $db->sql_fetchrow($result) ) { $inactive_users[] = $row; } $db->sql_freeresult($result); return $inactive_users; } ?> --- NEW FILE: admin_userlist.php --- <?php /** * * @package mxBB Portal Module - mx_phpbb2admin * @version $Id: admin_userlist.php,v 1.1 2006/09/09 21:21:20 jonohlsson Exp $ * @copyright (c) 2002-2006 [wGEric, Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ define( 'IN_PORTAL', true ); if ( !empty( $setmodules ) ) { $filename = basename( __FILE__ ); $module['phpbb2admin']['Userlist'] = 'modules/mx_phpbb2admin/admin/' . $filename; return; } $mx_root_path = './../../../'; $module_root_path = "./../"; $phpEx = substr(strrchr(__FILE__, '.'), 1); require( $mx_root_path . '/admin/pagestart.' . $phpEx ); include_once( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); // ********************************************************************** // Read language definition // ********************************************************************** if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); } else { include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); } // // Set mode // if( isset( $HTTP_POST_VARS['mode'] ) || isset( $HTTP_GET_VARS['mode'] ) ) { $mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode']; } else { $mode = ''; } // // confirm // if( isset( $HTTP_POST_VARS['confirm'] ) || isset( $HTTP_GET_VARS['confirm'] ) ) { $confirm = true; } else { $confirm = false; } // // cancel // if( isset( $HTTP_POST_VARS['cancel'] ) || isset( $HTTP_GET_VARS['cancel'] ) ) { $cancel = true; $mode = ''; } else { $cancel = false; } // // get starting position // $start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0; // // get show amount // if ( isset($HTTP_GET_VARS['show']) || isset($HTTP_POST_VARS['show']) ) { $show = ( isset($HTTP_POST_VARS['show']) ) ? intval($HTTP_POST_VARS['show']) : intval($HTTP_GET_VARS['show']); } else { $show = $board_config['posts_per_page']; } // // sort method // if ( isset($HTTP_GET_VARS['sort']) || isset($HTTP_POST_VARS['sort']) ) { $sort = ( isset($HTTP_POST_VARS['sort']) ) ? htmlspecialchars($HTTP_POST_VARS['sort']) : htmlspecialchars($HTTP_GET_VARS['sort']); $sort = str_replace("\'", "''", $sort); } else { $sort = 'user_regdate'; } // // sort order // if( isset($HTTP_POST_VARS['order']) ) { $sort_order = ( $HTTP_POST_VARS['order'] == 'ASC' ) ? 'ASC' : 'DESC'; } else if( isset($HTTP_GET_VARS['order']) ) { $sort_order = ( $HTTP_GET_VARS['order'] == 'ASC' ) ? 'ASC' : 'DESC'; } else { $sort_order = 'ASC'; } // // alphanumeric stuff // if ( isset($HTTP_GET_VARS['alphanum']) || isset($HTTP_POST_VARS['alphanum']) ) { $alphanum = ( isset($HTTP_POST_VARS['alphanum']) ) ? htmlspecialchars($HTTP_POST_VARS['alphanum']) : htmlspecialchars($HTTP_GET_VARS['alphanum']); $alphanum = str_replace("\'", "''", $alphanum); switch( $dbms ) { case 'postgres': $alpha_where = ( $alphanum == 'num' ) ? "AND username !~ '^[A-Z]+'" : "AND username ILIKE '$alphanum%'"; break; default: $alpha_where = ( $alphanum == 'num' ) ? "AND username NOT RLIKE '^[A-Z]'" : "AND username LIKE '$alphanum%'"; break; } } else { $alpahnum = ''; $alpha_where = ''; } $user_ids = array(); // // users id // because it is an array we will intval() it when we use it // if ( isset($HTTP_POST_VARS[POST_USERS_URL]) || isset($HTTP_GET_VARS[POST_USERS_URL]) ) { $user_ids = ( isset($HTTP_POST_VARS[POST_USERS_URL]) ) ? $HTTP_POST_VARS[POST_USERS_URL] : $HTTP_GET_VARS[POST_USERS_URL]; } else { unset($user_ids); } switch( $mode ) { case 'delete': // // see if cancel has been hit and redirect if it has // shouldn't get to this point if it has been hit but // do this just in case // if ( $cancel ) { redirect($module_root_path . 'admin/admin_userlist.'.$phpEx); } // // check confirm and either delete or show confirm message // if ( !$confirm ) { // show message $i = 0; $hidden_fields = ''; while( $i < count($user_ids) ) { $user_id = intval($user_ids[$i]); $hidden_fields .= '<input type="hidden" name="' . POST_USERS_URL . '[]" value="' . $user_id . '">'; unset($user_id); $i++; } $template->set_filenames(array( 'body' => 'confirm_body.tpl') ); $template->assign_vars(array( 'MESSAGE_TITLE' => $lang['Delete'], 'MESSAGE_TEXT' => $lang['Confirm_user_deleted'], 'U_INDEX' => '', 'L_INDEX' => '', 'L_YES' => $lang['Yes'], 'L_NO' => $lang['No'], 'S_CONFIRM_ACTION' => append_sid('admin_userlist.'.$phpEx.'?mode=delete'), 'S_HIDDEN_FIELDS' => $hidden_fields) ); } else { // delete users $i = 0; while( $i < count($user_ids) ) { $user_id = intval($user_ids[$i]); $sql = "SELECT u.username, g.group_id FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g WHERE ug.user_id = $user_id AND g.group_id = ug.group_id AND g.group_single_user = 1"; if( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain group information for this user', '', __LINE__, __FILE__, $sql); } $row = $db->sql_fetchrow($result); $sql = "UPDATE " . POSTS_TABLE . " SET poster_id = " . DELETED . ", post_username = '" . $row['username'] . "' WHERE poster_id = $user_id"; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not update posts for this user', '', __LINE__, __FILE__, $sql); } $sql = "UPDATE " . TOPICS_TABLE . " SET topic_poster = " . DELETED . " WHERE topic_poster = $user_id"; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not update topics for this user', '', __LINE__, __FILE__, $sql); } $sql = "UPDATE " . VOTE_USERS_TABLE . " SET vote_user_id = " . DELETED . " WHERE vote_user_id = $user_id"; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not update votes for this user', '', __LINE__, __FILE__, $sql); } $sql = "SELECT group_id FROM " . GROUPS_TABLE . " WHERE group_moderator = $user_id"; if( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not select groups where user was moderator', '', __LINE__, __FILE__, $sql); } while ( $row_group = $db->sql_fetchrow($result) ) { $group_moderator[] = $row_group['group_id']; } if ( count($group_moderator) ) { $update_moderator_id = implode(', ', $group_moderator); $sql = "UPDATE " . GROUPS_TABLE . " SET group_moderator = " . $userdata['user_id'] . " WHERE group_moderator IN ($update_moderator_id)"; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not update group moderators', '', __LINE__, __FILE__, $sql); } } $sql = "DELETE FROM " . USERS_TABLE . " WHERE user_id = $user_id"; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not delete user', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . USER_GROUP_TABLE . " WHERE user_id = $user_id"; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not delete user from user_group table', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . GROUPS_TABLE . " WHERE group_id = " . $row['group_id']; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not delete group for this user', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . AUTH_ACCESS_TABLE . " WHERE group_id = " . $row['group_id']; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not delete group for this user', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " WHERE user_id = $user_id"; if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not delete user from topic watch table', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . BANLIST_TABLE . " WHERE ban_userid = $user_id"; if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not delete user from banlist table', '', __LINE__, __FILE__, $sql); } $sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . " WHERE privmsgs_from_userid = $user_id OR privmsgs_to_userid = $user_id"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not select all users private messages', '', __LINE__, __FILE__, $sql); } // This little bit of code directly from the private messaging section. while ( $row_privmsgs = $db->sql_fetchrow($result) ) { $mark_list[] = $row_privmsgs['privmsgs_id']; } if ( count($mark_list) ) { $delete_sql_id = implode(', ', $mark_list); $delete_text_sql = "DELETE FROM " . PRIVMSGS_TEXT_TABLE . " WHERE privmsgs_text_id IN ($delete_sql_id)"; $delete_sql = "DELETE FROM " . PRIVMSGS_TABLE . " WHERE privmsgs_id IN ($delete_sql_id)"; if ( !$db->sql_query($delete_sql) ) { message_die(GENERAL_ERROR, 'Could not delete private message info', '', __LINE__, __FILE__, $delete_sql); } if ( !$db->sql_query($delete_text_sql) ) { message_die(GENERAL_ERROR, 'Could not delete private message text', '', __LINE__, __FILE__, $delete_text_sql); } } unset($user_id); $i++; } $message = $lang['User_deleted_successfully'] . "<br /><br />" . sprintf($lang['Click_return_userlist'], "<a href=\"" . append_sid("admin_userlist.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); } break; case 'ban': // // see if cancel has been hit and redirect if it has // shouldn't get to this point if it has been hit but // do this just in case // if ( $cancel ) { redirect($module_root_path . 'admin/admin_userlist.'.$phpEx); } // // check confirm and either ban or show confirm message // if ( !$confirm ) { $i = 0; $hidden_fields = ''; while( $i < count($user_ids) ) { $user_id = intval($user_ids[$i]); $hidden_fields .= '<input type="hidden" name="' . POST_USERS_URL . '[]" value="' . $user_id . '">'; unset($user_id); $i++; } $template->set_filenames(array( 'body' => 'confirm_body.tpl') ); $template->assign_vars(array( 'MESSAGE_TITLE' => $lang['Ban'], 'MESSAGE_TEXT' => $lang['Confirm_user_ban'], 'U_INDEX' => '', 'L_INDEX' => '', 'L_YES' => $lang['Yes'], 'L_NO' => $lang['No'], 'S_CONFIRM_ACTION' => append_sid('admin_userlist.'.$phpEx.'?mode=ban'), 'S_HIDDEN_FIELDS' => $hidden_fields) ); } else { // ban users $i = 0; while( $i < count($user_ids) ) { $user_id = intval($user_ids[$i]); $sql = "INSERT INTO " . BANLIST_TABLE . " ( ban_userid ) VALUES ( '$user_id' )"; if( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain ban user', '', __LINE__, __FILE__, $sql); } unset($user_id); $i++; } $message = $lang['User_banned_successfully'] . "<br /><br />" . sprintf($lang['Click_return_userlist'], "<a href=\"" . append_sid("admin_userlist.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); } break; case 'activate': // // activate or deactive the seleted users // $i = 0; while( $i < count($user_ids) ) { $user_id = intval($user_ids[$i]); $sql = "SELECT user_active FROM " . USERS_TABLE . " WHERE user_id = $user_id"; if( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain user information', '', __LINE__, __FILE__, $sql); } $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); $new_status = ( $row['user_active'] ) ? 0 : 1; $sql = "UPDATE " . USERS_TABLE . " SET user_active = '$new_status' WHERE user_id = $user_id"; if( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not update user status', '', __LINE__, __FILE__, $sql); } unset($user_id); $i++; } $message = $lang['User_status_updated'] . "<br /><br />" . sprintf($lang['Click_return_userlist'], "<a href=\"" . append_sid("admin_userlist.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); break; case 'group': // // add users to a group // if ( !$confirm ) { // show form to select which group to add users to $i = 0; $hidden_fields = ''; while( $i < count($user_ids) ) { $user_id = intval($user_ids[$i]); $hidden_fields .= '<input type="hidden" name="' . POST_USERS_URL . '[]" value="' . $user_id . '">'; unset($user_id); $i++; } $template->set_filenames(array( 'body' => 'admin/userlist_group.tpl') ); $template->assign_vars(array( 'MESSAGE_TITLE' => $lang['Add_group'], 'MESSAGE_TEXT' => $lang['Add_group_explain'], 'L_GROUP' => $lang['Group'], 'S_GROUP_VARIABLE' => POST_GROUPS_URL, 'S_ACTION' => append_sid($module_root_path . 'admin/admin_userlist.'.$phpEx.'?mode=group'), 'L_GO' => $lang['Go'], 'L_CANCEL' => $lang['Cancel'], 'L_SELECT' => $lang['Select_one'], 'S_HIDDEN_FIELDS' => $hidden_fields) ); $sql = "SELECT group_id, group_name FROM " . GROUPS_TABLE . " WHERE group_single_user <> " . TRUE . " ORDER BY group_name"; if( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not query groups', '', __LINE__, __FILE__, $sql); } // loop through groups while ( $row = $db->sql_fetchrow($result) ) { $template->assign_block_vars('grouprow',array( 'GROUP_NAME' => $row['group_name'], 'GROUP_ID' => $row['group_id']) ); } } else { // add the users to the selected group $group_id = intval($HTTP_POST_VARS[POST_GROUPS_URL]); include($phpbb_root_path . 'includes/emailer.'.$phpEx); $emailer = new emailer($board_config['smtp_delivery']); $i = 0; while( $i < count($user_ids) ) { $user_id = intval($user_ids[$i]); // // For security, get the ID of the group moderator. // switch(SQL_LAYER) { /*case 'postgresql': $sql = "SELECT g.group_moderator, g.group_type, aa.auth_mod FROM " . GROUPS_TABLE . " g, " . AUTH_ACCESS_TABLE . " aa WHERE g.group_id = $group_id AND aa.group_id = g.group_id UNION ( SELECT g.group_moderator, g.group_type, NULL FROM " . GROUPS_TABLE . " g WHERE g.group_id = $group_id AND NOT EXISTS ( SELECT aa.group_id FROM " . AUTH_ACCESS_TABLE . " aa WHERE aa.group_id = g.group_id ) )"; break;*/ case 'oracle': $sql = "SELECT g.group_moderator, g.group_type, aa.auth_mod FROM " . GROUPS_TABLE . " g, " . AUTH_ACCESS_TABLE . " aa WHERE g.group_id = $group_id AND aa.group_id = g.group_id(+)"; break; default: $sql = "SELECT g.group_moderator, g.group_type, aa.auth_mod FROM ( " . GROUPS_TABLE . " g LEFT JOIN " . AUTH_ACCESS_TABLE . " aa ON aa.group_id = g.group_id ) WHERE g.group_id = $group_id"; break; } if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not get moderator information', '', __LINE__, __FILE__, $sql); } $group_info = $db->sql_fetchrow($result); $sql = "SELECT user_id, user_email, user_lang, user_level FROM " . USERS_TABLE . " WHERE user_id = $user_id"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, "Could not get user information", $lang['Error'], __LINE__, __FILE__, $sql); } $row = $db->sql_fetchrow($result); $sql = "SELECT ug.user_id, u.user_level FROM " . USER_GROUP_TABLE . " ug, " . USERS_TABLE . " u WHERE u.user_id = " . $row['user_id'] . " AND ug.user_id = u.user_id AND ug.group_id = $group_id"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not get user information', '', __LINE__, __FILE__, $sql); } if ( !($db->sql_fetchrow($result)) ) { $sql = "INSERT INTO " . USER_GROUP_TABLE . " (user_id, group_id, user_pending) VALUES (" . $row['user_id'] . ", $group_id, 0)"; if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not add user to group', '', __LINE__, __FILE__, $sql); } if ( $row['user_level'] != ADMIN && $row['user_level'] != MOD && $group_info['auth_mod'] ) { $sql = "UPDATE " . USERS_TABLE . " SET user_level = " . MOD . " WHERE user_id = " . $row['user_id']; if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not update user level', '', __LINE__, __FILE__, $sql); } } // // Get the group name // Email the user and tell them they're in the group // $group_sql = "SELECT group_name FROM " . GROUPS_TABLE . " WHERE group_id = $group_id"; if ( !($result = $db->sql_query($group_sql)) ) { message_die(GENERAL_ERROR, 'Could not get group information', '', __LINE__, __FILE__, $group_sql); } $group_name_row = $db->sql_fetchrow($result); $group_name = $group_name_row['group_name']; $script_name = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($board_config['script_path'])); $script_name = ( $script_name != '' ) ? $script_name . '/groupcp.'.$phpEx : 'groupcp.'.$phpEx; $server_name = trim($board_config['server_name']); $server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://'; $server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/'; $server_url = $server_protocol . $server_name . $server_port . $script_name; $emailer->from($board_config['board_email']); $emailer->replyto($board_config['board_email']); $emailer->use_template('group_added', $row['user_lang']); $emailer->email_address($row['user_email']); $emailer->set_subject($lang['Group_added']); $emailer->assign_vars(array( 'SITENAME' => $board_config['sitename'], 'GROUP_NAME' => $group_name, 'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '', 'U_GROUPCP' => $server_url . '?' . POST_GROUPS_URL . "=$group_id") ); $emailer->send(); $emailer->reset(); } unset($user_id); $i++; } $message = $lang['User_add_group_successfully'] . "<br /><br />" . sprintf($lang['Click_return_userlist'], "<a href=\"" . append_sid("admin_userlist.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); } break; default: // // get and display all of the users // $template->set_filenames(array( 'body' => 'admin/userlist_body.tpl') ); // // gets for alphanum // $alpha_range = array(); $alpha_letters = array(); $alpha_letters = range('A','Z'); $alpha_start = array($lang['All'], '#'); $alpha_range = array_merge($alpha_start, $alpha_letters); $i = 0; while( $i < count($alpha_range) ) { if ( $alpha_range[$i] != $lang['All'] ) { if ( $alpha_range[$i] != '#' ) { $temp = strtolower($alpha_range[$i]); } else { $temp = 'num'; } $alphanum_search_url = append_sid($module_root_path . "admin/admin_userlist.$phpEx?sort=$sort&order=$sort_order&show=$show&alphanum=$temp"); } else { $alphanum_search_url = append_sid($module_root_path . "admin/admin_userlist.$phpEx?sort=$sort&order=$sort_order&show=$show"); } if ( ( $alphanum == $temp ) || ( $alpha_range[$i] == $lang['All'] && empty($alphanum) ) ) { $alpha_range[$i] = '<b>' . $alpha_range[$i] . '</b>'; } $template->assign_block_vars('alphanumsearch', array( 'SEARCH_SIZE' => floor(100/count($alpha_range)) . '%', 'SEARCH_TERM' => $alpha_range[$i], 'SEARCH_LINK' => $alphanum_search_url) ); $i++; } $hidden_fields = '<input type="hidden" name="start" value="' . $start . '">'; $hidden_fields .= '<input type="hidden" name="alphanum" value="' . $alphanum . '">'; // // set up template varibles // $template->assign_vars(array( 'L_TITLE' => $lang['Userlist'], 'L_DESCRIPTION' => $lang['Userlist_description'], 'L_OPEN_CLOSE' => $lang['Open_close'], 'L_ACTIVE' => $lang['Active'], 'L_USERNAME' => $lang['Username'], 'L_GROUP' => $lang['Group'], 'L_RANK' => $lang['Rank'], 'L_POSTS' => $lang['Posts'], 'L_FIND_ALL_POSTS' => $lang['Find_all_posts'], 'L_JOINED' => $lang['Joined'], 'L_ACTIVTY' => $lang['Last_activity'], 'L_MANAGE' => $lang['User_manage'], 'L_PERMISSIONS' => $lang['Permissions'], 'L_EMAIL' => $lang['Email'], 'L_PM' => $lang['Private_Message'], 'L_WEBSITE' => $lang['Website'], 'S_USER_VARIABLE' => POST_USERS_URL, 'S_ACTION' => append_sid($module_root_path . 'admin/admin_userlist.'.$phpEx), 'L_GO' => $lang['Go'], 'L_SELECT' => $lang['Select_one'], 'L_DELETE' => $lang['Delete'], 'L_BAN' => $lang['Ban'], 'L_ACTIVATE_DEACTIVATE' => $lang['Activate_deactivate'], 'L_ADD_GROUP' => $lang['Add_group'], 'S_SHOW' => $show, 'L_SORT_BY' => $lang['Sort_by'], 'L_USER_ID' => $lang['User_id'], 'L_USER_LEVEL' => $lang['User_level'], 'L_ASCENDING' => $lang['Ascending'], 'L_DESCENDING' => $lang['Descending'], 'L_SHOW' => $lang['Show'], 'S_SORT' => $lang['Sort'], 'S_HIDDEN_FIELDS' => $hidden_fields, 'SORT_USER_ID' => ( $sort == 'user_id' ) ? 'selected="selected"' : '', 'SORT_ACTIVE' => ( $sort == 'user_active' ) ? 'selected="selected"' : '', 'SORT_USERNAME' => ( $sort == 'username' ) ? 'selected="selected"' : '', 'SORT_JOINED' => ( $sort == 'user_regdate' ) ? 'selected="selected"' : '', 'SORT_ACTIVTY' => ( $sort == 'user_session_time' ) ? 'selected="selected"' : '', 'SORT_USER_LEVEL' => ( $sort == 'user_level' ) ? 'selected="selected"' : '', 'SORT_POSTS' => ( $sort == 'user_posts' ) ? 'selected="selected"' : '', 'SORT_RANK' => ( $sort == 'user_rank' ) ? 'selected="selected"' : '', 'SORT_EMAIL' => ( $sort == 'user_email' ) ? 'selected="selected"' : '', 'ORDER_ASC' => ( $sort_order == 'ASC' ) ? 'selected="selected"' : '', 'ORDER_DESC' => ( $sort_order == 'DESC' ) ? 'selected="selected"' : '', )); $order_by = "ORDER BY $sort $sort_order "; $sql = "SELECT * FROM " . USERS_TABLE . " WHERE user_id <> " . ANONYMOUS . " $alpha_where $order_by LIMIT $start, $show"; if( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not query users', '', __LINE__, __FILE__, $sql); } // loop through users $i = 1; while ( $row = $db->sql_fetchrow($result) ) { // // users avatar // $avatar_img = ''; if ( $row['user_avatar_type'] && $row['user_allowavatar'] ) { switch( $row['user_avatar_type'] ) { case USER_AVATAR_UPLOAD: $avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $phpbb_root_path . $board_config['avatar_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : ''; break; case USER_AVATAR_REMOTE: $avatar_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $row['user_avatar'] . '" alt="" border="0" />' : ''; break; case USER_AVATAR_GALLERY: $avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $phpbb_root_path . $board_config['avatar_gallery_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : ''; break; } } // // users rank // $rank_sql = "SELECT * FROM " . RANKS_TABLE . " ORDER BY rank_special, rank_min"; if ( !($rank_result = $db->sql_query($rank_sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain ranks information', '', __LINE__, __FILE__, $sql); } while ( $rank_row = $db->sql_fetchrow($rank_result) ) { $ranksrow[] = $rank_row; } $db->sql_freeresult($rank_result); $poster_rank = ''; $rank_image = ''; if ( $row['user_rank'] ) { for($ji = 0; $ji < count($ranksrow); $ji++) { if ( $row['user_rank'] == $ranksrow[$ji]['rank_id'] && $ranksrow[$ji]['rank_special'] ) { $poster_rank = $ranksrow[$ji]['rank_title']; $rank_image = ( $ranksrow[$ji]['rank_image'] ) ? '<img src="' . $phpbb_root_path . $ranksrow[$ji]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : ''; } } } else { for($ji = 0; $ji < count($ranksrow); $ji++) { if ( $row['user_posts'] >= $ranksrow[$ji]['rank_min'] && !$ranksrow[$ji]['rank_special'] ) { $poster_rank = $ranksrow[$ji]['rank_title']; $rank_image = ( $ranksrow[$ji]['rank_image'] ) ? '<img src="' . $phpbb_root_path . $ranksrow[$ji]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : ''; } } } // // user's color depending on their level // $style_color = ''; if ( $row['user_level'] == ADMIN ) { $row['username'] = '<b>' . $row['username'] . '</b>'; $style_color = 'style="color:#' . $theme['fontcolor3'] . '"'; } else if ( $row['user_level'] == MOD ) { $row['username'] = '<b>' . $row['username'] . '</b>'; $style_color = 'style="color:#' . $theme['fontcolor2'] . '"'; } // // setup user row template varibles // $template->assign_block_vars('user_row', array( 'ROW_NUMBER' => $i + ( $HTTP_GET_VARS['start'] + 1 ), 'ROW_CLASS' => ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'], 'USER_ID' => $row['user_id'], 'ACTIVE' => ( $row['user_active'] == TRUE ) ? $lang['Yes'] : $lang['No'], 'STYLE_COLOR' => $style_color, 'USERNAME' => $row['username'], 'U_PROFILE' => append_sid($phpbb_root_path . 'profile.'.$phpEx.'?mode=viewprofile&' . POST_USERS_URL . '=' . $row['user_id']), 'RANK' => $poster_rank, 'I_RANK' => $rank_image, 'I_AVATAR' => $avatar_img, 'JOINED' => create_date('d M Y', $row['user_regdate'], $board_config['board_timezone']), 'LAST_ACTIVITY' => ( !empty($row['user_session_time']) ) ? create_date('d M Y', $row['user_session_time'], $board_config['board_timezone']) : $lang['Never'], 'POSTS' => ( $row['user_posts'] ) ? $row['user_posts'] : 0, 'U_SEARCH' => append_sid($phpbb_root_path . 'search.'.$phpEx.'?search_author=' . urlencode(strip_tags($row['username'])) . '&showresults=posts'), 'U_WEBSITE' => ( $row['user_website'] ) ? $row['user_website'] : '', 'EMAIL' => $row['user_email'], 'U_PM' => append_sid($phpbb_root_path . 'privmsg.' . $phpEx . '?mode=post&' . POST_USERS_URL . '='. $row['user_id']), 'U_MANAGE' => append_sid($phpbb_root_path . 'admin/admin_users.'.$phpEx.'?mode=edit&' . POST_USERS_URL . '=' . $row['user_id']), 'U_PERMISSIONS' => append_sid($phpbb_root_path . 'admin/admin_ug_auth.'.$phpEx.'?mode=user&' . POST_USERS_URL . '=' . $row['user_id'])) ); // // get the users group information // $group_sql = "SELECT * FROM " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g WHERE ug.user_id = " . $row['user_id'] . " AND g.group_single_user <> 1 AND g.group_id = ug.group_id"; if( !($group_result = $db->sql_query($group_sql)) ) { message_die(GENERAL_ERROR, 'Could not query groups', '', __LINE__, __FILE__, $group_sql); } $g = 0; while ( $group_row = $db->sql_fetchrow($group_result) ) { // // assign the group varibles // if ( $group_row['group_moderator'] == $row['user_id'] ) { $group_status = $lang['Moderator']; } else if ( $group_row['user_pending'] == true ) { $group_status = $lang['Pending']; } else { $group_status = $lang['Member']; } $template->assign_block_vars('user_row.group_row', array( 'GROUP_NAME' => $group_row['group_name'], 'GROUP_STATUS' => $group_status, 'U_GROUP' => $phpbb_root_path . 'groupcp.'.$phpEx.'?'.POST_GROUPS_URL.'='.$group_row['group_id']) ); $g++; } if ( $g == 0 ) { $template->assign_block_vars('user_row.no_group_row', array( 'L_NONE' => $lang['None']) ); } $i++; } $db->sql_freeresult($result); $count_sql = "SELECT count(user_id) AS total FROM " . USERS_TABLE . " WHERE user_id <> " . ANONYMOUS . " $alpha_where"; if ( !($count_result = $db->sql_query($count_sql)) ) { message_die(GENERAL_ERROR, 'Error getting total users', '', __LINE__, __FILE__, $sql); } if ( $total = $db->sql_fetchrow($count_result) ) { $total_members = $total['total']; $pagination = generate_pagination($module_root_path . "admin/admin_userlist.$phpEx?sort=$sort&order=$sort_order&show=$show" . ( ( isset($alphanum) ) ? "&alphanum=$alphanum" : '' ), $total_members, $show, $start); } $template->assign_vars(array( 'PAGINATION' => $pagination, 'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $show ) + 1 ), ceil( $total_members / $show ))) ); break; } // switch() $template->pparse('body'); include_once( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); ?> --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> --- NEW FILE: admin_prune_user_posts.php --- <?php /** * * @package mxBB Portal Module - mx_phpbb2admin * @version $Id: admin_prune_user_posts.php,v 1.1 2006/09/09 21:21:20 jonohlsson Exp $ * @copyright (c) 2002-2006 [Adam Alkins (http://www.rasadam.com), Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ define( 'IN_PORTAL', true ); if ( !empty( $setmodules ) ) { $filename = basename( __FILE__ ); $module['phpbb2admin']['Prune_user_posts'] = 'modules/mx_phpbb2admin/admin/' . $filename; return; } [...1194 lines suppressed...] if ( !$db->sql_query($sql) ) { message_die(CRITICAL_ERROR, 'Could not update user post count', '', __LINE__, __FILE__, $sql); } } } $bye_message = sprintf($lang['Prune_finished'],append_sid("admin_prune_user_posts.".$phpEx), append_sid("index.".$phpEx."?pane=right")); // Say bye bye message_die(GENERAL_MESSAGE, $bye_message); } // Spit out the page. $template->pparse("body"); include_once( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); ?> |
Update of /cvsroot/mxbb/mx_phpbb2admin/templates/subSilver/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25579/templates/subSilver/admin Added Files: admin_prune_user_posts.tpl prune_users.tpl prune_users_sql.tpl userlist_body.tpl userlist_group.tpl Log Message: Introducing this module. A couple of phpBB admin Tools - pruning users/posts etc --- NEW FILE: prune_users.tpl --- <h1>{L_PAGE_TITLE}</h1> <p>{L_PAGE_EXPLAIN}</p> <script type="text/javascript"> function checkAll(theForm, cName, allNo_stat) { var n=theForm.elements.length; for (var i=0;i<n;i++){ if (theForm.elements[i].className.indexOf(cName) !=-1){ if (allNo_stat.checked) { theForm.elements[i].checked = true; } else { theForm.elements[i].checked = false; } } } } function confirmSubmit() { var prune=confirm("{L_CONFIRM_MESSAGE}"); if (prune) return true ; else return false ; } </script> <form id="prune_users" method="post" action="{S_FORM_ACTION}"><table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline" width="80%"> <tr> <th class="thCornerL">{L_USERNAME}</th> <!-- BEGIN user_lastvisit --><th class="thTop">{L_USER_LAST_VISIT}</th><!-- END user_lastvisit --> <!-- BEGIN user_regdate --><th class="thTop">{L_USER_REGDATE}</th><!-- END user_regdate --> <!-- BEGIN user_active --><th class="thTop">{L_USER_ACTIVE}</th><!-- END user_active --> <!-- BEGIN user_posts --><th class="thTop">{L_USER_POSTS}</th><!-- END user_posts --> <th class="thTop">{L_NOTIFY_USER}</th> <th class="thCornerR">{L_SELECTED}</th> </tr> <!-- BEGIN inactive_users --> <tr> <td class="{inactive_users.ROW_CLASS}" align="center"><a href="{inactive_users.U_USER_PROFILE}">{inactive_users.USERNAME}</a></td> <!-- BEGIN user_lastvisit --><td class="{inactive_users.ROW_CLASS}" align="center">{inactive_users.USER_LAST_VISIT}</td><!-- END user_lastvisit --> <!-- BEGIN user_regdate --><td class="{inactive_users.ROW_CLASS}" align="center">{inactive_users.USER_REGDATE}</td> <!-- END user_regdate --> <!-- BEGIN user_active --><td class="{inactive_users.ROW_CLASS}" align="center">{inactive_users.USER_ACTIVE}</td><!-- END user_active --> <!-- BEGIN user_posts --><td class="{inactive_users.ROW_CLASS}" align="center">{inactive_users.USER_POSTS}</td><!-- END user_posts --> <td class="{inactive_users.ROW_CLASS}" align="center"><a href="{inactive_users.U_NOTIFY_USER}">{L_EMAIL}</a></td> <td class="{inactive_users.ROW_CLASS}" align="center"><input type="checkbox" name="inactive_users[]" value="{inactive_users.USER_ID}" class="user_selected" checked="checked"></td> </tr> <!-- END inactive_users --> <!-- BEGIN no_inactive_users --> <tr> <td class="row1" align="center" colspan="{NUMBER_OF_COLUMNS}">{L_NONE}</td> </tr> <!-- END no_inactive_users --> <tr> <td class="catBottom" align="right" colspan="{NUMBER_OF_COLUMNS}">{L_SELECT_ALL_NONE} <input type="checkbox" onclick="checkAll(document.getElementById('prune_users'), 'user_selected',this);" checked="checked"/></td> </tr> </table> <br><div align="center"><input type="submit" class="mainoption" name="submit" value="{L_SUBMIT}" onClick="return confirmSubmit()" /> </div><br> </form> --- NEW FILE: userlist_group.tpl --- <table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0"> <tr> <th class="thHead" height="25" valign="middle"><span class="tableTitle">{MESSAGE_TITLE}</span></th> </tr> <tr> <td class="row1" align="center"><form action="{S_ACTION}" method="post"><span class="gen"><br />{MESSAGE_TEXT}<br /><br />{S_HIDDEN_FIELDS} <select name="{S_GROUP_VARIABLE}" class="post"> <option value="">{L_SELECT}</option> <!-- BEGIN grouprow --> <option value="{grouprow.GROUP_ID}">{grouprow.GROUP_NAME}</option> <!-- END grouprow --> </select> <input type="submit" name="confirm" value="{L_GO}" class="mainoption" /><input type="submit" name="cancel" value="{L_CANCEL}" class="liteoption" /></span></form></td> </tr> </table> <br clear="all" /> --- NEW FILE: admin_prune_user_posts.tpl --- <script language="Javascript" type="text/javascript"> // Did I mention I hated javascript? // Modified from privmsgs mark all/unmark all function select_switch(status) { var re; // regex to match only the forums checkboxes re = /^prune_forumid_[0-9]+$/; for (i = 0; i < document.post.length; i++) { if( re.test(document.post.elements[i].name) == true ) { document.post.elements[i].checked = status; } } } </script> <h1>{L_PRUNE_USER_POSTS}</h1> <p>{L_PRUNE_EXPLAIN}</p> <form method="post" name="post" action="{S_PRUNE_ACTION}"> <table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline"> <tr> <th class="thHead" colspan="2" height="25" valign="middle">{L_PRUNE_FORUMS}</th> </tr> <tr> <td class="row2" colspan="2"><span class="gensmall">{L_PRUNE_FORUMS_EXPLAIN}</span></td> </tr> <!-- BEGIN catrow --> <tr> <td class="row2" colspan="2"><span class="gen"><strong>Category: {catrow.CATEGORY_NAME}</span></td> </tr> <!-- BEGIN forumrow --> <tr> <td class="row{catrow.forumrow.ROW_CLASS}" width="100%"><span class="gen">{catrow.forumrow.FORUM_NAME}</span></td> <td class="row{catrow.forumrow.ROW_CLASS}"><input type="checkbox" name="prune_forumid_{catrow.forumrow.FORUM_ID}" value="true" /></td> </tr> <!-- END forumrow --> <!-- END catrow --> <tr> <td class="row3" colspan="2" align="right"><strong><span class="gensmall"><a href="javascript:select_switch(true);" class="gensmall">{L_MARK_ALL}</a> :: <a href="javascript:select_switch(false);" class="gensmall">{L_UNMARK_ALL}</a></span></strong></td> </tr> <tr> <td class="catSides" colspan="2" height="28"> </td> </tr> <tr> <th class="thHead" colspan="2" height="25" valign="middle">{L_PRUNE_USERS}</th> </tr> <tr> <td class="row1"><span class="gen">{L_USERNAME}: <input type="text" class="post" name="username" maxlength="50" size="20" /> <input type="submit" name="usersubmit" value="{L_FIND_A_USERNAME}" class="liteoption" onClick="window.open('{S_SEARCH_ACTION}', '_phpbbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /></span></td> <td class="row1"><input type="radio" name="prune_type" value="user" checked="checked" /></td> </tr> <tr> <td class="row2" colspan="2"><span class="gensmall">{L_USERNAME_EXPLAIN}</span></td> </tr> <tr> <td class="row1"><span class="gen">{L_ALL_USERS}</span></td> <td class="row1"><input type="radio" name="prune_type" value="all_users" /></td> </tr> <tr> <td class="row2" colspan="2"><span class="gensmall">{L_ALL_USERS_EXPLAIN}</span></td> </tr> <!-- BEGIN switch_banned_users --> <tr> <td class="row1"><span class="gen">{L_BANNED_USERS}</span></td> <td class="row1"><input type="radio" name="prune_type" value="banned_users" /></td> </tr> <tr> <td class="row2" colspan="2"><span class="gensmall">{L_BANNED_USERS_EXPLAIN}</span></td> </tr> <!-- END switch_banned_users --> <!-- BEGIN switch_groups --> <tr> <td class="row1"><span class="gen">{L_GROUP}: {GROUP_LIST}</span></td> <td class="row1"><input type="radio" name="prune_type" value="group" /></td> </tr> <tr> <td class="row2" colspan="2"><span class="gensmall">{L_GROUP_EXPLAIN}</span></td> </tr> <!-- END switch_groups --> <tr> <td class="row1"><span class="gen">{L_IP_ADDRESS}: <input type="text" class="post" name="prune_ip" maxlength="50" size="20" /></span></td> <td class="row1"><input type="radio" name="prune_type" value="ip" /></td> </tr> <tr> <td class="row2" colspan="2"><span class="gensmall">{L_IP_EXPLAIN}</span></td> </tr> <!-- BEGIN switch_banned_ips --> <tr> <td class="row1"><span class="gen">{L_BANNED_IPS}</span></td> <td class="row1"><input type="radio" name="prune_type" value="banned_ips" /></td> </tr> <tr> <td class="row2" colspan="2"><span class="gensmall">{L_BANNED_IPS_EXPLAIN}</span></td> </tr> <!-- END switch_banned_ips --> <tr> <td class="row1"><span class="gen">{L_GUESTS}</span></td> <td class="row1"><input type="radio" name="prune_type" value="guest_users" /></td> </tr> <tr> <td class="row2" colspan="2"><span class="gensmall">{L_GUESTS_EXPLAIN}</span></td> </tr> <tr> <td class="catSides" colspan="2" height="28"> </td> </tr> <tr> <th class="thHead" colspan="2" height="25" valign="middle">{L_DATE_CRITERIA}</th> </tr> <tr> <td class="row1"><span class="gen"><select name="prune_time_order"><option value="before" selected="selected">{L_BEFORE}</option><option value="after">{L_AFTER}</option></select> {L_THE_LAST} <input type="text" class="post" name="prune_time_value" maxlength="50" size="5" /> <select name="prune_time_type"><option value="seconds" selected="selected">{L_SECONDS}</option><option value="minutes">{L_MINUTES}</option><option value="hours">{L_HOURS}</option><option value="days">{L_DAYS}</option></select></span></td> <td class="row1"><input type="radio" name="prune_date_type" value="time" /></td> </tr> <tr> <td class="row2" colspan="2"><span class="gensmall">{L_BY_TIME_EXPLAIN}</span></td> </tr> <tr> <td class="row1"><span class="gen"><select name="prune_dateby_type"><option value="before" selected="selected">{L_BEFORE}</option><option value="on" selected="selected">{L_ON}</option><option value="after">{L_AFTER}</option></select> {L_DATE}: <input type="text" class="post" name="prune_dateby_value" maxlength="50" size="15" /> {L_DDMMYYYY}</span></td> <td class="row1"><input type="radio" name="prune_date_type" value="by_date" /></td> </tr> <tr> <td class="row2" colspan="2"><span class="gensmall">{L_DATE_EXPLAIN}</span></td> </tr> <tr> <td class="row1"><span class="gen">{L_FROM} <input type="text" class="post" name="prune_daterange_start" maxlength="50" size="15" /> {L_TO} <input type="text" class="post" name="prune_daterange_stop" maxlength="50" size="15" /> {L_DDMMYYYY}</span></td> <td class="row1"><input type="radio" name="prune_date_type" value="range" /></td> </tr> <tr> <td class="row2" colspan="2"><span class="gensmall">{L_RANGE_EXPLAIN}</span></td> </tr> <tr> <td class="row1"><span class="gen">{L_ALL_POSTS}</span></td> <td class="row1"><input type="radio" name="prune_date_type" value="all" checked="checked" /></td> </tr> <tr> <td class="row2" colspan="2"><span class="gensmall">{L_ALL_POSTS_EXPLAIN}</span></td> </tr> <tr> <td class="catSides" colspan="2" height="28"> </td> </tr> <tr> <th class="thHead" colspan="2" height="25" valign="middle">{L_PRUNING_OPTIONS}</th> </tr> <tr> <td class="row1"><span class="gen">{L_REMOVE_TOPICS}</span> <select name="prune_topic_started"><option value="true" selected="selected">{L_YES}</option><option value="false">{L_NO}</option></td><td class="row1"></td> </tr> <tr> <td class="row2" colspan="2"><span class="gensmall">{L_REMOVE_TOPICS_EXPLAIN}</span></td> </tr> <tr> <td class="row1"><span class="gen">{L_EXEMPT_STICKIES}</span> <select name="prune_stickies"><option value="true">{L_YES}</option><option value="false" selected="selected">{L_NO}</option></td><td class="row1"></td> </tr> <tr> <td class="row2" colspan="2"><span class="gensmall">{L_EXEMPT_STICKIES_EXPLAIN}</span></td> </tr> <tr> <td class="row1"><span class="gen">{L_EXEMPT_ANNOUNCEMENTS}</span> <select name="prune_announcements"><option value="true">{L_YES}</option><option value="false" selected="selected">{L_NO}</option></td><td class="row1"></td> </tr> <tr> <td class="row2" colspan="2"><span class="gensmall">{L_EXEMPT_ANNOUNCEMENTS_EXPLAIN}</span></td> </tr> <tr> <td class="row1"><span class="gen">{L_EXEMPT_OPEN}</span> <select name="prune_open"><option value="true">{L_YES}</option><option value="false" selected="selected">{L_NO}</option></td><td class="row1"></td> </tr> <tr> <td class="row2" colspan="2"><span class="gensmall">{L_EXEMPT_OPEN_EXPLAIN}</span></td> </tr> <tr> <td class="row1"><span class="gen">{L_EXEMPT_POLLS}</span> <select name="prune_polls"><option value="true">{L_YES}</option><option value="false" selected="selected">{L_NO}</option></td><td class="row1"></td> </tr> <tr> <td class="row2" colspan="2"><span class="gensmall">{L_EXEMPT_POLLS_EXPLAIN}</span></td> </tr> <tr> <td class="row1"><span class="gen">{L_ADJUST_COUNTS}</span> <select name="prune_update_post_counts"><option value="true" selected="selected">{L_YES}</option><option value="false">{L_NO}</option></td><td class="row1"></td> </tr> <tr> <td class="row2" colspan="2"><span class="gensmall">{L_ADJUST_COUNTS_EXPLAIN}</span></td> </tr> <tr> <td class="row1"><span class="gen">{L_UPDATE_SEARCH}</span> <select name="prune_update_search"><option value="true" selected="selected">{L_YES}</option><option value="false">{L_NO}</option></td><td class="row1"></td> </tr> <tr> <td class="row2" colspan="2"><span class="gensmall">{L_UPDATE_SEARCH_EXPLAIN}</span></td> </tr> <tr> <td class="catBottom" colspan="2" align="center" height="28"><input type="submit" name="submit" value="{L_SUBMIT}" class="mainoption" /> <input type="reset" value="{L_RESET}" name="reset" class="liteoption" /></td> </tr> </table> </form> --- NEW FILE: userlist_body.tpl --- <script language="javascript" type="text/javascript"> <!-- function handleClick(id) { var obj = ""; // Check browser compatibility if(document.getElementById) obj = document.getElementById(id); else if(document.all) obj = document.all[id]; else if(document.layers) obj = document.layers[id]; else return 1; if (!obj) { return 1; } else if (obj.style) { obj.style.display = ( obj.style.display != "none" ) ? "none" : ""; } else { obj.visibility = "show"; } } //--> </script> <h1>{L_TITLE}</h1> <p>{L_DESCRIPTION}</p> <form action="{S_ACTION}" method="post"> <table width="100%" cellpadding="3" cellspacing="1" border="0"> <tr> <td width="100%"> </td> <td align="right" nowrap="nowrap"><span class="gen">{L_SORT_BY}</td> <td nowrap="nowrap"><select name="sort" class="post"> <option {SORT_USER_ID} value="user_id">{L_USER_ID}</option> <option {SORT_ACTIVE} value="user_active">{L_ACTIVE}</option> <option {SORT_USERNAME} value="username">{L_USERNAME}</option> <option {SORT_JOINED} value="user_regdate">{L_JOINED}</option> <option {SORT_ACTIVTY} value="user_session_time">{L_ACTIVTY}</option> <option {SORT_USER_LEVEL} value="user_level">{L_USER_LEVEL}</option> <option {SORT_POSTS} value="user_posts">{L_POSTS}</option> <option {SORT_RANK} value="user_rank">{L_RANK}</option> <option {SORT_EMAIL} value="user_email">{L_EMAIL}</option> </select></td> <td nowrap="nowrap"><select name="order" class="post"> <option {ORDER_ASC} value="ASC">{L_ASCENDING}</option> <option {ORDER_DESC} value="DESC">{L_DESCENDING}</option> </select></td> <td nowrap="nowrap"><span class="gen">{L_SHOW}</span></td> <td nowrap="nowrap"><input type="text" size="5" value="{S_SHOW}" name="show"></td> <td nowrap="nowrap">{S_HIDDEN_FIELDS}<input type="submit" value="{S_SORT}" name="change_sort" class="liteoption"></td> </tr> </table> </form> <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> <tr> <!-- BEGIN alphanumsearch --> <td align="left" width="{alphanumsearch.SEARCH_SIZE}"><span class="genmed"> <a href="{alphanumsearch.SEARCH_LINK}" class="genmed">{alphanumsearch.SEARCH_TERM}</a> </span></td> <!-- END alphanumsearch --> </tr> </table> <form action="{S_ACTION}" method="post"> <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline"> <tr> <th width="13%"> </th> <th width="22%">{L_USERNAME}</th> <th width="22%">{L_ACTIVE}</th> <th width="22%">{L_JOINED}</th> <th width="22%">{L_ACTIVTY}</th> </tr> <!-- BEGIN user_row --> <tr> <td class="{user_row.ROW_CLASS}" nowrap="nowrap"><input type="checkbox" name="{S_USER_VARIABLE}[]" value="{user_row.USER_ID}"> <a href="javascript:handleClick('user{user_row.USER_ID}');">{L_OPEN_CLOSE}</a></td> <td class="{user_row.ROW_CLASS}"><span class="gen" {user_row.STYLE_COLOR}><b><a href="{user_row.U_PROFILE}" class="gen" target="_blank" {user_row.STYLE_COLOR}>{user_row.USERNAME}</a></b></span></td> <td class="{user_row.ROW_CLASS}"><span class="gen">{user_row.ACTIVE}</span></td> <td class="{user_row.ROW_CLASS}"><span class="gen">{user_row.JOINED}</span></td> <td class="{user_row.ROW_CLASS}"><span class="gen">{user_row.LAST_ACTIVITY}</span></td> </tr> <tr id="user{user_row.USER_ID}" style="display: none"> <td class="{user_row.ROW_CLASS}" width="13%"> </td> <td class="{user_row.ROW_CLASS}" colspan="4" width="100%"> <table width="100%" cellpadding="3" cellspacing="1" border="0"> <tr> <td class="{user_row.ROW_CLASS}" width="33%"><span class="gen"><b>{L_RANK}:</b> {user_row.RANK} {user_row.I_RANK}</td> <td class="{user_row.ROW_CLASS}" width="34%"><span class="gen"><b>{L_GROUP}:</b> <!-- BEGIN group_row --> <a href="{user_row.group_row.U_GROUP}" class="gen" target="_blank">{user_row.group_row.GROUP_NAME}</a> ({user_row.group_row.GROUP_STATUS})<br /> <!-- END group_row --> <!-- BEGIN no_group_row --> {user_row.no_group_row.L_NONE}<br /> <!-- END no_group_row --> </span></td> <td class="{user_row.ROW_CLASS}" width="33%"><span class="gen"><b>{L_POSTS}:</b> {user_row.POSTS} <a href="{user_row.U_SEARCH}" class="gen" target="_blank">{L_FIND_ALL_POSTS}</a></span></td> </tr> <tr> <td class="{user_row.ROW_CLASS}" colspan="3"><span class="gen"><b>{L_WEBSITE}:</b> <a href="{user_row.U_WEBSITE}" class="gen" target="_blank">{user_row.U_WEBSITE}</a></span></td> </tr> <tr> <td class="{user_row.ROW_CLASS}"><span class="gen"> <a href="{user_row.U_MANAGE}" class="gen">{L_MANAGE}</a><br /> <a href="{user_row.U_PERMISSIONS}" class="gen">{L_PERMISSIONS}</a><br /> <a href="mailto:{user_row.EMAIL}" class="gen">{L_EMAIL} [ {user_row.EMAIL} ]</a><br /> <a href="{user_row.U_PM}" class="gen">{L_PM}</a> </span></td> <td colspan="2" class="{user_row.ROW_CLASS}">{user_row.I_AVATAR}</td> </tr> </table> </td> </tr> <!-- END user_row --> <tr> <td class="catbottom" colspan="8"> <select name="mode" class="post"> <option value="">{L_SELECT}</option> <option value="delete">{L_DELETE}</option> <option value="ban">{L_BAN}</option> <option value="activate">{L_ACTIVATE_DEACTIVATE}</option> <option value="group">{L_ADD_GROUP}</option> </select> <input type="submit" name="go" value="{L_GO}" class="mainoption"> </td> </tr> </table> <table width="100%" cellpadding="3" cellspacing="1" border="0"> <tr> <td align="left" width="50%"><span class="gen">{PAGE_NUMBER}</span></td> <td align="right" width="50%"><span class="gen">{PAGINATION}</span></td> </tr> </table> </form> <br clear="all" /> --- NEW FILE: prune_users_sql.tpl --- <h1>{L_PAGE_TITLE}</h1> <p>{L_PAGE_EXPLAIN}</p> <form id="prune_users" method="post" action="{S_FORM_ACTION}"><table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline" width="85%"> <tr> <th class="thTop" align="center" colspan="5">{L_BUILD_YOUR_QUERY}</td> </tr> <tr> <td class="row1" align="left">{L_USER_REGDATE}</td> <td class="row1" align="center"><input type="checkbox" name="registered_check" value="1" checked="checked" ></td> <td class="row2" align="center"><select name="user_registered_condition"><option value="AND" selected="selected">AND</option><option value="OR">OR</option></select></td> <td class="row2" align="left"> <select name="user_registered"> <option value="{SEVEN_DAYS}" selected="selected">{L_SEVEN_DAYS}</option> <option value="{TEN_DAYS}">{L_TEN_DAYS}</option> <option value="{TWO_WEEKS}">{L_TWO_WEEKS}</option> <option value="{ONE_MONTH}">{L_ONE_MONTH}</option> <option value="{TWO_MONTHS}">{L_TWO_MONTHS}</option> <option value="{THREE_MONTHS}">{L_THREE_MONTHS}</option> <option value="-1">{L_ALL_TIME}</option> </select> </td> <td class="row2" align="left" >{L_USER_REGDATE_EXPLAIN}</td> </tr> <tr> <td class="row1" align="left">{L_USER_LAST_VISIT}</td> <td class="row1" align="center"><input type="checkbox" name="login_check" value="1" checked="checked" ></td> <td class="row2" align="center"><select name="user_lastvisit_condition"><option value="AND" selected="selected">AND</option><option value="OR">OR</option></select></td> <td class="row2" align="left"> <select name="user_lastvisit"> <option value="0" selected="selected">{L_NEVER}</option> <option value="{SEVEN_DAYS}">{L_SEVEN_DAYS}</option> <option value="{TEN_DAYS}">{L_TEN_DAYS}</option> <option value="{TWO_WEEKS}">{L_TWO_WEEKS}</option> <option value="{ONE_MONTH}">{L_ONE_MONTH}</option> <option value="{TWO_MONTHS}">{L_TWO_MONTHS}</option> <option value="{THREE_MONTHS}">{L_THREE_MONTHS}</option> </select> </td> <td class="row2" align="left">{L_USER_LAST_VISIT_EXPLAIN}</td> </tr> <tr> <td class="row1" align="left">{L_USER_ACTIVE}</td> <td class="row1" align="center"><input type="checkbox" name="active_check" value="1" checked="checked" ></td> <td class="row2" align="center"><select name="user_active_condition"><option value="AND" selected="selected">AND</option><option value="OR">OR</option></select></td> <td class="row2" align="left"><input name="user_active" value="1" type="radio"> {L_YES} <input name="user_active" value="0" checked="checked" type="radio"> {L_NO}</td> <td class="row2" align="left">{L_USER_ACTIVE_EXPLAIN}</td> </tr> <tr> <td class="row1" align="left">{L_USER_POSTS}</td> <td class="row1" align="center"><input type="checkbox" name="posts_check" value="1" checked="checked" ></td> <td class="row2" align="center"><select name="user_posts_condition"><option value="AND" selected="selected">AND</option><option value="OR">OR</option></select></td> <td class="row2" align="left"> <select name="user_posts_sign"> <option value="=" selected="selected">=</option> <option value=">">></option> <option value="<"><</option> <option value=">=">>=</option> <option value="<="><=</option> </select> <input class="post" name="user_posts" size="3" maxlength="4" type="text" value="0" > </td> <td class="row2" align="left">{L_USER_POSTS_EXPLAIN}</td> </tr> <tr> <td class="catBottom" align="center" colspan="5"> <input type="submit" class="mainoption" name="fetch" value="{L_BUILD_QUERY}" /> </td> </tr> </table> </form> |
|
From: Jon O. <jon...@us...> - 2006-09-09 21:21:24
|
Update of /cvsroot/mxbb/mx_phpbb2admin/language In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25579/language Added Files: index.htm Log Message: Introducing this module. A couple of phpBB admin Tools - pruning users/posts etc --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> |
|
From: Jon O. <jon...@us...> - 2006-09-09 21:21:24
|
Update of /cvsroot/mxbb/mx_phpbb2admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25579 Added Files: index.htm phpBB2admin.pak Log Message: Introducing this module. A couple of phpBB admin Tools - pruning users/posts etc --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> --- NEW FILE: phpBB2admin.pak --- module=+:62=+:phpBB2admin=+:modules/mx_phpBB2admin/=+:A couple of phpBB admin tools (MODs)=+:1 function=+:0=+:0=+:0=+:endoflist=+:0=+:0 |
|
From: Jon O. <jon...@us...> - 2006-09-09 21:21:24
|
Update of /cvsroot/mxbb/mx_phpbb2admin/language/lang_english/email In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25579/language/lang_english/email Added Files: index.htm user_inactive_notify.tpl Log Message: Introducing this module. A couple of phpBB admin Tools - pruning users/posts etc --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> --- NEW FILE: user_inactive_notify.tpl --- Subject: Your account is inactive. Charset: iso-8859-1 Hello {USERNAME} You are receiving this email because your account on {SITENAME} is considered inactive. If you wish to keep your account, please visit the forum and login on a regular basis. Otherwise please contact the board administrator to have your account terminated. If you do not visit the forum on a regular basis, your account will be deleted. Thank you for your cooperation. {EMAIL_SIG} |
|
From: Jon O. <jon...@us...> - 2006-09-09 21:20:16
|
Update of /cvsroot/mxbb/mx_phpbb2admin/templates/subSilver/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25157/admin Log Message: Directory /cvsroot/mxbb/mx_phpbb2admin/templates/subSilver/admin added to the repository |
|
From: Jon O. <jon...@us...> - 2006-09-09 21:20:08
|
Update of /cvsroot/mxbb/mx_phpbb2admin/templates/subSilver In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24827/subSilver Log Message: Directory /cvsroot/mxbb/mx_phpbb2admin/templates/subSilver added to the repository |
|
From: Jon O. <jon...@us...> - 2006-09-09 21:19:52
|
Update of /cvsroot/mxbb/mx_phpbb2admin/language/lang_english/email In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24750/email Log Message: Directory /cvsroot/mxbb/mx_phpbb2admin/language/lang_english/email added to the repository |
|
From: Jon O. <jon...@us...> - 2006-09-09 21:19:45
|
Update of /cvsroot/mxbb/mx_phpbb2admin/language/lang_english In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24740/lang_english Log Message: Directory /cvsroot/mxbb/mx_phpbb2admin/language/lang_english added to the repository |
|
From: Jon O. <jon...@us...> - 2006-09-09 21:19:34
|
Update of /cvsroot/mxbb/mx_phpbb2admin/language In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24705/language Log Message: Directory /cvsroot/mxbb/mx_phpbb2admin/language added to the repository |
|
From: Jon O. <jon...@us...> - 2006-09-09 21:19:34
|
Update of /cvsroot/mxbb/mx_phpbb2admin/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24705/admin Log Message: Directory /cvsroot/mxbb/mx_phpbb2admin/admin added to the repository |
|
From: Jon O. <jon...@us...> - 2006-09-09 21:19:34
|
Update of /cvsroot/mxbb/mx_phpbb2admin/templates In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24705/templates Log Message: Directory /cvsroot/mxbb/mx_phpbb2admin/templates added to the repository |
|
From: Jon O. <jon...@us...> - 2006-09-06 19:59:06
|
Update of /cvsroot/mxbb/core In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv18967 Modified Files: common.php Log Message: fix for blockCP for register global on Index: common.php =================================================================== RCS file: /cvsroot/mxbb/core/common.php,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** common.php 4 Sep 2006 16:48:43 -0000 1.58 --- common.php 6 Sep 2006 19:59:00 -0000 1.59 *************** *** 83,87 **** // Merge all into one extremely huge array; unset // this later ! $input = array_merge($HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_SERVER_VARS, $HTTP_SESSION_VARS, $HTTP_ENV_VARS, $HTTP_POST_FILES); unset($input['input']); --- 83,91 ---- // Merge all into one extremely huge array; unset // this later ! // ! // Note! Since array_merge() destroys numerical keys - if the array is numerically indexed, the keys get reindexed in a continuous way - we use the + operator instead ! // ! //$input = array_merge($HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_SERVER_VARS, $HTTP_SESSION_VARS, $HTTP_ENV_VARS, $HTTP_POST_FILES); ! $input = $HTTP_GET_VARS + $HTTP_POST_VARS + $HTTP_COOKIE_VARS + $HTTP_SERVER_VARS + $HTTP_SESSION_VARS + $HTTP_ENV_VARS + $HTTP_POST_FILES; unset($input['input']); *************** *** 96,100 **** unset($$var); } - unset($input); } --- 100,103 ---- |
|
From: Jon O. <jon...@us...> - 2006-09-05 19:22:08
|
Update of /cvsroot/mxbb/core/templates/subSilver/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv20813/templates/subSilver/admin Modified Files: mx_blockcp_admin_body.tpl Log Message: JS bugs... Index: mx_blockcp_admin_body.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/admin/mx_blockcp_admin_body.tpl,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** mx_blockcp_admin_body.tpl 5 Sep 2006 17:57:58 -0000 1.8 --- mx_blockcp_admin_body.tpl 5 Sep 2006 19:22:04 -0000 1.9 *************** *** 178,181 **** --- 178,207 ---- } + function checkForm(form) + { + var formErrors = ''; + + if (form.block_title.value.length < 2) + { + formErrors += "Fill out the block title\r\n"; + } + + if (formErrors && do_check) + { + do_check = false + alert(formErrors); + return false; + } + else + { + return true; + } + } + + function preFormCheck() + { + do_check = true; + } + </script> <!-- dynamic_select --> *************** *** 327,331 **** <tr> ! <td class="row1" height="25" align="center" colspan="2">{blockcp_general_adds.S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{blockcp_general_adds.S_SUBMIT}" class="mainoption" />{CANCEL}</td> </tr> </table> --- 353,357 ---- <tr> ! <td class="row1" height="25" align="center" colspan="2">{blockcp_general_adds.S_HIDDEN_FIELDS}<input onClick="preFormCheck()" type="submit" name="submit" value="{blockcp_general_adds.S_SUBMIT}" class="mainoption" />{CANCEL}</td> </tr> </table> *************** *** 407,411 **** <tr> ! <td class="row1" height="25" align="center" colspan="2">{blockcp_general.S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{blockcp_general.S_SUBMIT}" class="mainoption" />{CANCEL}</td> </tr> </table> --- 433,437 ---- <tr> ! <td class="row1" height="25" align="center" colspan="2">{blockcp_general.S_HIDDEN_FIELDS}<input type="submit" onClick="preFormCheck()" name="submit" value="{blockcp_general.S_SUBMIT}" class="mainoption" />{CANCEL}</td> </tr> </table> *************** *** 432,436 **** <tr> <td class="row1" colspan="2"> ! <form action="{S_ACTION}" method="post" name="post" onsubmit="return checkForm(this)"> <table width="100%" cellpadding="2" cellspacing="0" border="0" align="center"> <tr> --- 458,462 ---- <tr> <td class="row1" colspan="2"> ! <form action="{S_ACTION}" method="post" name="post"> <table width="100%" cellpadding="2" cellspacing="0" border="0" align="center"> <tr> *************** *** 468,472 **** <tr> <td class="row1" colspan="2" width="100%"> ! <form action="{S_ACTION}" method="post" onsubmit="return checkForm(this)"> <table width="100%" cellpadding="0" cellspacing="0" border="0" align="center"> <tr> --- 494,498 ---- <tr> <td class="row1" colspan="2" width="100%"> ! <form action="{S_ACTION}" method="post"> <table width="100%" cellpadding="0" cellspacing="0" border="0" align="center"> <tr> |
|
From: Jon O. <jon...@us...> - 2006-09-05 19:22:07
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv20813/modules/mx_coreblocks Modified Files: mx_blockcp.php Log Message: JS bugs... Index: mx_blockcp.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_blockcp.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** mx_blockcp.php 24 Aug 2006 21:19:59 -0000 1.15 --- mx_blockcp.php 5 Sep 2006 19:22:04 -0000 1.16 *************** *** 25,32 **** --- 25,34 ---- // + // // ********************************************************************** // Read language definition // ********************************************************************** // phpBB + // if( file_exists($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx) ) { |