tags and the target ## URL for the redirect() function must be set to the value of ## $_SERVER['REQUEST_URI']. This URL can however be extended to ## include extra variables (like the addition of &foo=bar in ## the form of this example plugin). ## ## 4. If your plugin is for administrators only, the filename must ## have the prefix "AP_". If it is for both administrators and ## moderators, use the prefix "AMP_". This example plugin has the ## prefix "AMP_" and is therefore available for both admins and ## moderators in the navigation menu. ## ## 5. Use _ instead of spaces in the file name. ## ## 6. Since plugin scripts are included from the PunBB script ## admin_loader.php, you have access to all PunBB functions and ## global variables (e.g. $db, $pun_config, $pun_user etc). ## ## 7. Do your best to keep the look and feel of your plugins' user ## interface similar to the rest of the admin scripts. Feel free to ## borrow markup and code from the admin scripts to use in your ## plugins. If you create your own styles they need to be added to ## the "base_admin" style sheet. ## ## 8. Plugins must be released under the GNU General Public License or ## a GPL compatible license. Copy the GPL preamble at the top of ## this file into your plugin script and alter the copyright notice ## to refrect the author of the plugin (i.e. you). ## ## // Make sure no one attempts to run this script "directly" if (!defined('PUN')) exit; // Tell admin_loader.php that this is indeed a plugin and that it is loaded define('PUN_PLUGIN_LOADED', 1); // // The rest is up to you! // // If the "Show text" button was clicked generate_admin_menu($plugin); if (isset($_REQUEST['btnSubmit'])) { $userids = ""; foreach ($_REQUEST as $key => $value) { if (substr($key,0,3) == 'chk') { if (strlen($userids) == 0) $userids .= "id = "; else $userids .= " OR id = "; $userids .= substr($key,3,strlen($key)); } } $db->query("DELETE FROM " . $db->prefix . 'posts WHERE ' . str_replace("id","poster_id",$userids) .";", true) or error('Unable to delete users', __FILE__, __LINE__, $db->error()); $result = $db->query("DELETE FROM " . $db->prefix . 'users WHERE ' .$userids . ";", true) or error('Unable to delete users', __FILE__, __LINE__, $db->error()); $users_pruned = $db->affected_rows(); // Display the admin navigation menu // generate_admin_menu($plugin); ?>

Removed!


Remove Users v1.0

This plugin simply removes multiple users with posts. Useful for 'spam' cleanup.

Programmed by Praveen (ninethsense@yahoo.co.uk)

Manage

query('SELECT id, group_id, username, num_posts, email FROM '.$db->prefix.'users ORDER BY id') or error('Unable to fetch user info', __FILE__, __LINE__, $db->error()); if ($db->num_rows($result)) { $cnt = 0; while ($cur_dupe = $db->fetch_assoc($result)) { if ($cnt == 0) { $col = "#CFD7F1" ; $cnt = 1; } else { $col = "#DDE2F2"; $cnt = 0; } if ($cur_dupe['username'] == "Guest") continue; if ($cur_dupe['group_id'] == 1) $chk = ""; else $chk = ""; echo ""; } } ?>
UsernamePosts #Email
" . $cur_dupe['username'] . "" . $cur_dupe['num_posts'] . "" . $cur_dupe['email'] . "$chk