MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GlobalBan. If not, see <http://www.gnu.org/licenses/>. */ // Start a Session session_start(); // Check if ALL cookies exist, if they do proceed to have them as "logged in" (remember me feature) // Otherwise, check the session to see if they have logged in "this" session if (isset($_COOKIE['gbu']) && isset($_COOKIE['gbp']) || isset($_SESSION['accessLevel']) && isset($_SESSION['name'])) { if (!isset($_SESSION['accessLevel']) && !isset($_SESSION['name']) && $page != "logout") { // Do a database verify before registering values require_once ROOTDIR . "/include/database/class.UserQueries.php"; require_once ROOTDIR . "/include/objects/class.User.php"; $userQuery = new UserQueries(); $user = new User(); $user = $userQuery->getUserInfo($_COOKIE['gbu']); // Place stuff into user object // Make sure we have a valid user object if (isset($user)) { // Check if md5 encrypted passwords match // If they do, auto log them in // Also make sure that the user is active if ($user->getPassword() == $_COOKIE['gbp'] && $user->getActive() == 1) { // Register Session Values $_SESSION['name'] = $_COOKIE['gbu']; // Username $_SESSION['password'] = $_COOKIE['gbp']; // md5 encrypted $_SESSION['accessLevel'] = $user->getAccessLevel();
(at your option) any later version. GlobalBan is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GlobalBan. If not, see <http://www.gnu.org/licenses/>. */ include_once ROOTDIR . "/include/objects/class.User.php"; include_once ROOTDIR . "/include/database/class.UserQueries.php"; // Must be logged in to change the status if ($fullPower) { $user = new User(); $userQueries = new UserQueries(); $user = $userQueries->getUserInfoById($_GET['id']); $user->setName(addslashes($_GET['name'])); $user->setEmail($_GET['email']); $user->setAccessLevel($_GET['accessLevel']); $user->setSteamId($_GET['steamId']); $error = ""; if (!preg_match("/^[A-Z0-9._%-]+@[A-Z0-9._%-]+\\.[A-Z]{2,6}\$/i", $user->getEmail()) && !$config->enableSmfIntegration) { // We don't care if the email is empty if ($user->getEmail() != "") { $error .= "Bad Email Address. "; } } if (!preg_match("/^STEAM_[01]:[01]:\\d{0,10}\$/", $user->getSteamId())) { $error .= "Bad Steam ID. "; }
(at your option) any later version. GlobalBan is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GlobalBan. If not, see <http://www.gnu.org/licenses/>. */ require_once ROOTDIR . "/include/database/class.ServerQueries.php"; require_once ROOTDIR . "/include/database/class.UserQueries.php"; require_once ROOTDIR . "/include/class.rcon.php"; $serverId = $_GET['serverId']; $serverQueries = new ServerQueries(); $userQueries = new UserQueries(); $server = $serverQueries->getServer($serverId); $users = $userQueries->getUsers(); // Create an rcon object to connect to a single server on each iteration $r = new rcon($server->getIp(), $server->getPort(), $server->getRcon()); $active = 0; // Make sure it connected to the server if ($r->isValid()) { $r->Auth(); // Establish the connection $active = 1; $r->sendRconCommand("es gb_refreshAdmins"); } // Send back the new active state header('Content-Type: text/xml'); header("Cache-Control: no-cache, must-revalidate");
GlobalBan is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. GlobalBan is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GlobalBan. If not, see <http://www.gnu.org/licenses/>. */ require_once ROOTDIR . "/include/database/class.UserQueries.php"; require_once ROOTDIR . "/include/database/class.ServerQueries.php"; $userQueries = new UserQueries(); $serverQueries = new ServerQueries(); ?> <script src="javascript/ajax.js" language="javascript" type="text/javascript"></script> <script src="javascript/functions.js" language="javascript" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function(){ $("#userTabs > ul").tabs(); }); function deleteVerify(id, name) { if(confirm("Do you really want to delete "+name+"?")) { document.getElementById("deleteUser"+id).submit(); } } </script>
if (isset($_POST['updateBan'])) { // We are updating ban information if ($config->enableSmfIntegration) { $username = $user_info['username']; } else { $username = $_SESSION['name']; } if (!$fullPowerLevelEditUser || $fullPower) { $ModifiedBy = $username; } if ($member) { $pending = 1; } else { $pending = 0; } $userQueries = new UserQueries(); $user = $userQueries->getUserInfo($admin_banner); // Get add date of ban $addDate = $banQueries->getBanAddDate($banId); $lengthInSec = $length->getLengthInSeconds(); $newExpireDate = $addDate + $lengthInSec; // Update ban $banQueries->updateWebBanWithLength($length->getLength(), $length->getTimeScale(), $newExpireDate, $reason, $pending, $admin_banner, $ModifiedBy, $serverId, $bannedUser, $user->getSteamId(), $banId, $comments, $bannedPost); // Email $subject = $LAN_PROCESSWEBBANUPDATE_001 . " " . $bannedUser . " " . $LAN_PROCESSWEBBANUPDATE_010 . " " . $username; $body = "<html><body><br/><h2>" . $subject . "</h2><br/><br/>"; $body .= $LAN_PROCESSWEBBANUPDATE_002 . " <b>"; if ($member) { $body .= $LAN_PROCESSWEBBANUPDATE_003; } else { if ($admin) {
if ($i < count($emails) - 1) { $emailList .= ", "; } } } // Generate the php config file // We have it aligned to the right so that extra white space does not get into the final file $configData = "<?php\r\n/**\r\n * This makes it easier to include configuration variables to other classes\r\n * by simply extending the class with the Config class. Any new variables that\r\n * get added MUST have a getter as that will be the only way to retrieve a Config\r\n * value if the config value needs to be used outside as it's own object.\r\n *\r\n * Change ALL values below to what you desire for your website. If you did not\r\n * change the gban.sql file, then the database name will be global_ban. Otherwise\r\n * all other variables, espeically those in the database block should be changed\r\n * appropriately.\r\n */\r\n\r\nclass Config {\r\n /**\r\n * Site specific settings\r\n */\r\n var \$" . "LANGUAGE = \"" . $_POST['LANGUAGE'] . "\"; // Default Language (English, Spanish, French, ...) \r\n var \$" . "bansPerPage = " . $_POST['bansPerPage'] . "; // Number of bans to display on ban list page for each page (-1 show all)\r\n var \$" . "maxPageLinks = " . $_POST['numPageLinks'] . "; // Number of links to show before and after selected page (IE: set at 2 you would see 1 2 ... 10 11 [12] 13 14 ... 23 24)\r\n var \$" . "demoRootDir = \"" . $_POST['demoDir'] . "\"; // Folder to save demos to (folder must be relative to banned dir)\r\n var \$" . "demoSizeLimit = \"" . $_POST['demoSizeLimit'] . "\"; // Demo size limit in MB\r\n var \$" . "siteName = \"" . str_replace("\$", "\\\$", $_POST['siteName']) . "\"; // The name of your website\r\n var \$" . "siteUrl = \"" . $url . "\"; // Your clan/server's home page\r\n var \$" . "siteLogo = \"" . $logo . "\"; // Found in images directory; you must save your logo to the images dir!!\r\n\r\n /**\r\n * SMF integration settings\r\n * The gban tables MUST be installed in your SMF database (\$" . "dbName = \"YOUR_SMF_DB\")\r\n * Full power admins are those with FULL ADMIN rights to the SMF boards\r\n * If you wish to use SMF integration you MUST install the zip under your Forums directory\r\n * So you will access the pages by going to Forums/banned\r\n */\r\n var \$" . "enableSmfIntegration = " . $_POST['smfIntegration'] . "; // Whether to enable SMF integartion\r\n var \$" . "smfTablePrefix = \"" . $_POST['smfTablePrefix'] . "\"; // The prefix of the SMF tables\r\n var \$" . "memberGroup = " . $_POST['smfMemberGroup'] . "; // The SMF group id that contains all your members\r\n var \$" . "adminGroup = " . $_POST['smfAdminGroup'] . "; // The SMF group id that contains all your admins\r\n var \$" . "banManagerGroup = " . $_POST['smfBanManagerGroup'] . "; // The SMF group id that contains all your ban managers\r\n var \$" . "fullPowerGroup = " . $_POST['smfFullPowerGroup'] . "; // The SMF group id that is allowed full access to the GlobalBan site and admin tools\r\n var \$" . "noPowerGroup = " . $_POST['smfNoPowerGroup'] . "; // The SMF group id that has no power unless given by an admin group\r\n\r\n /**\r\n * e107 integration settings\r\n */\r\n var \$" . "enableAutoPoste107Forum = " . $_POST['enableAutoPoste107Forum'] . "; // Whether to enable e107 integration, just generate Auto-Post in the e107 Forum with each new ban.\r\n var \$" . "e107TablePrefix = \"" . $_POST['e107TablePrefix'] . "\"; // The prefix of the e107 tables\r\n var \$" . "e107Url = \"" . $_POST['e107Url'] . "\"; // Your e107 web site Ej: \"http://www.e107.com/\"\r\n var \$" . "e107_dbName = \"" . $_POST['e107_dbName'] . "\"; // Set the e107 Database Name to access\r\n var \$" . "e107_dbUserName = \"" . $_POST['e107_dbUserName'] . "\"; // Set the Database's user name login (recommend a user with only select and insert privs)\r\n var \$" . "e107_dbPassword = \"" . $_POST['e107_dbPassword'] . "\"; // Set the Database user's password login\r\n var \$" . "e107_dbHostName = \"" . $_POST['e107_dbHostName'] . "\"; // Set the Database's host\r\n var \$" . "e107_bans_forum_category_number = \"" . $_POST['e107_bans_forum_category_number'] . "\"; // For example if your Banned forum category link is http://www.youre107.com/e107_plugins/forum/forum_viewforum.php?19 you must set it to \"19\"\r\n var \$" . "e107_GlobalBan_user = \"" . $_POST['e107_GlobalBan_user'] . "\"; // e107 user to use like post owner, format must be \"user_number_ID.user_name\", Ex: \"5.GlobalBan\"\r\n\r\n /**\r\n * Ban specific settings\r\n */\r\n var \$" . "banMessage = \"" . str_replace("\$", "\\\$", $_POST['banMessage']) . "\"; // Message to display to those banned\r\n var \$" . "daysBanPending = " . $_POST['daysBanPending'] . "; // Number of days to keep someone with a \"pending\" ban off the server (0 to let the person come back after being \"banned\"); this only affects \"members\" who do bans longer than 1 day\r\n var \$" . "allowAdminBans = " . $_POST['allowAdminBan'] . "; // Set to true to allow the banning of admins (Default off - false)\r\n var \$" . "teachAdmins = " . $_POST['teachAdmins'] . "; // Teach admins the !banmenu command\r\n var \$" . "removePendingOnUpload = " . $_POST['removePendingOnUpload'] . "; // Remove the pending status from a ban when a member uploads a demo for that ban\r\n var \$" . "adviseInGame = " . $_POST['adviseInGame'] . "; // Allows you to select which players will be advised during the game when you connect a player who was banned temporarily by a ban already expired: 1 - All (Panel), 2 - Only Admins Chat & Ex-Banned Player; 3 - Only Admins Chat; 4 - Only Ex-Banned (Panel); 5 - NoBody\r\n var \$" . "adviseInGameLenght = " . $_POST['adviseInGameLenght'] . "; // Allows you to select required Min Ban Lenght in seconds to advise.\r\n\r\n //var \$" . "numDemosToBan = -1; // The person uploading a demo needs to have X number of people banned from his demos before future uploads will auto-ban. (-1 is off)\r\n\r\n /**\r\n * Forum Settings\r\n * Very simple forum integration (Just adds a link button)\r\n */\r\n var \$" . "enableForumLink = " . $_POST['enableForumLink'] . ";\r\n var \$" . "forumURL = \"" . $_POST['forumURL'] . "\"; // Link to your forums\r\n \r\n /**\r\n * Web Settings\r\n * Very simple web integration (Just adds a link button)\r\n */\r\n var \$" . "enableWebLink = " . $_POST['enableWebLink'] . ";\r\n var \$" . "webUrl = \"" . $_POST['webUrl'] . "\"; // Link to your forums\r\n \r\n /**\r\n * HLstatsX Settings\r\n * Very simple web integration (Just adds a link button)\r\n */\r\n var \$" . "enableHLstatsLink = " . $_POST['enableHLstatsLink'] . ";\r\n var \$" . "HLstatsUrl = \"" . $_POST['HLstatsUrl'] . "\"; // Link to your forums\r\n\r\n /**\r\n * Database Block\r\n */\r\n var \$" . "dbName = \"" . $dbToUse . "\"; // Set the Database to access (where all gban tables are located, change if you place your gban tables in a different db)\r\n var \$" . "dbUserName = \"" . $_SESSION['dbuser'] . "\"; // Set the Database's user name login (recommend a user with only select, insert, update, and delete privs)\r\n var \$" . "dbPassword = \"" . str_replace("\$", "\\\$", $_SESSION['dbpass']) . "\"; // Set the Database user's password login\r\n var \$" . "dbHostName = \"" . $_SESSION['dbhost'] . "\"; // Set the Database's host\r\n var \$" . "matchHash = \"" . str_replace("\$", "\\\$", $_POST['hash']) . "\"; // This must match the has found in the ES script (prevent's people from accessing the page outside)\r\n var \$" . "createUserCode = \"" . str_replace("\$", "\\\$", $_POST['createUserCode']) . "\"; // This code must be entered for someone to create a new basic user\r\n\r\n /**\r\n * Email address of those who should get notices of when a new ban has been added\r\n * or changed.\r\n */\r\n var \$" . "sendEmails = " . $_POST['sendEmailsOnBan'] . "; // Send an email whenever a ban is added or updated (does not include imports)\r\n var \$" . "sendDemoEmails = " . $_POST['sendEmailsDemo'] . "; // Send an email whenever a new demo is added\r\n var \$" . "emailFromHeader = \"" . $_POST['senderEmail'] . "\"; // The from email address\r\n var \$" . "banManagerEmails = array(" . $emailList . "); // Who recieves emails when new bans are added\r\n\r\n function __construct() {\r\n }\r\n\r\n function Config() {\r\n }\r\n}\r\n?" . ">\r\n"; fwrite($fh, $configData); fclose($fh); // We can only save the super user if the config file exists // Add the super user if ($_POST['smfIntegration'] == "false") { include_once ROOTDIR . "/include/database/class.UserQueries.php"; // User specific queries $userQueries = new UserQueries(); if ($userQueries->addUser($_POST['username'], $_POST['password'], 1, $_POST['steamId'], $_POST['userEmail'])) { } } } } ob_start(); ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>GlobalBan Full Installation</title> <link rel="icon" href="images/favico.ico" type="image/vnd.microsoft.icon"> <link rel="stylesheet" type="text/css" href="css/banned.css" /> <script src="javascript/functions.js" language="javascript" type="text/javascript"></script>
* please when ever they want but can only modify their own bans. The Ban Manager * group consists of people that can approve a 'limited user's' ban, however * they can also enable or diable a ban completely and are able to change * ny bans at their whim. */ include_once ROOTDIR . "/include/database/class.UserQueries.php"; // Admin Variables $banManager = false; // Allowed to do everything regarding bans $admin = false; // Can only add (by-passes pending) $member = false; // Can only add pending $fullPower = false; // Allowed EVERYTHING regarding the server $userQuery = new UserQueries(); $user = new User(); $user = $userQuery->getUserInfo($user_info['username']); // Place stuff into user object // Only do this if they are active if ($user->getActive() == 1) { // Member if (in_array($config->memberGroup, $user_info['groups'])) { $member = true; } // Admin if (in_array($config->adminGroup, $user_info['groups'])) { $admin = true; } // Ban Manager if (in_array($config->banManagerGroup, $user_info['groups'])) {
the Free Software Foundation, either version 3 of the License, or (at your option) any later version. GlobalBan is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GlobalBan. If not, see <http://www.gnu.org/licenses/>. */ require_once ROOTDIR . "/include/database/class.UserQueries.php"; require_once ROOTDIR . "/include/objects/class.User.php"; $lan_file = ROOTDIR . '/languages/' . $LANGUAGE . '/lan_profile.php'; include file_exists($lan_file) ? $lan_file : ROOTDIR . "/languages/English/lan_profile.php"; $userQueries = new UserQueries(); $user = $userQueries->getUserInfo($_SESSION['name']); // Get current logged in user's info // Boolean values of whether post values are valid $valid = array("username" => true, "steamId" => true, "email" => true, "curPassword" => true, "cpassword" => true, "npassword" => true, "vpassword" => true); // ********************************************* // If the user is updating their general profile // ********************************************* if (!empty($_POST['generalProfile']) && isset($_POST['generalProfile'])) { $generalChangesMade = false; $generalErrors = false; $username = $_POST['username']; // Check if user name was changed if ($user->getName() != addslashes($username)) { // Determine if NEW username already exists if (!$userQueries->usernameExist($username) && !empty($username)) {
GlobalBan is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GlobalBan. If not, see <http://www.gnu.org/licenses/>. */ require_once ROOTDIR . "/include/database/class.UserQueries.php"; require_once ROOTDIR . "/include/database/class.ServerQueries.php"; require_once ROOTDIR . "/include/database/class.AdminGroupQueries.php"; require_once ROOTDIR . "/include/objects/class.PluginFlag.php"; if ($_GET['serverId'] > 0) { $serverId = $_GET['serverId']; } $userQueries = new UserQueries(); $serverQueries = new ServerQueries(); $server = $serverQueries->getServer($serverId); $groupId = $server->getGroupId(); // If we have a valid group id, get the admins of that group if ($groupId > 0) { $users = $userQueries->getGroupAdmins($groupId); // Admins of a server group } else { $users = $userQueries->getServerAdmins($serverId); // Admins of a server } // If the above return no values, that means we should use the users list if (count($users) < 1) { $users = $userQueries->getUsers(); }
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GlobalBan. If not, see <http://www.gnu.org/licenses/>. */ require_once ROOTDIR . "/include/database/class.UserQueries.php"; $id = $_GET['id']; $active = $_GET['active']; // Switch the current active state to the other state // off becomes on, and on becomes off if ($active == 0) { $active = 1; } else { $active = 0; } $userQueries = new UserQueries(); // Must be logged in to change the status if ($fullPower) { $userQueries->updateUserActiveStatus($active, $id); } // Send back the new active state header('Content-Type: text/xml'); header("Cache-Control: no-cache, must-revalidate"); echo "<?xml version=\"1.0\" ?>"; ?> <root> <id><?php echo $id; ?> </id> <update><?php
<?php /* This file is part of GlobalBan. Written by Stefan Jonasson <*****@*****.**> Copyright 2008 Stefan Jonasson GlobalBan is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. GlobalBan is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GlobalBan. If not, see <http://www.gnu.org/licenses/>. */ require_once ROOTDIR . "/include/database/class.UserQueries.php"; $serverId = $_POST['serverId']; $groupId = $_POST['groupId']; $adminGroupId = $_POST['adminGroupId']; $adminId = $_POST['adminId']; $userQueries = new UserQueries(); // Must be logged in to change the status if ($fullPower) { $userQueries->updateAdminGroup($serverId, $groupId, $adminGroupId, $adminId); }
GlobalBan is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. GlobalBan is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GlobalBan. If not, see <http://www.gnu.org/licenses/>. */ include_once ROOTDIR . "/include/database/class.UserQueries.php"; // User specific queries $userQueries = new UserQueries(); // Make variables empty $username = ""; $email = ""; $vemail = ""; $password = ""; $vpassword = ""; $steamId = ""; $lan_file = ROOTDIR . '/languages/' . $LANGUAGE . '/lan_newuser.php'; include file_exists($lan_file) ? $lan_file : ROOTDIR . "/languages/English/lan_newuser.php"; $nopost = true; // Flag of whether the form was submitted yet if (isset($_POST['nopost'])) { $nopost = $_POST['nopost']; } // Boolean values of whether post values are valid
// A ban manager or full power admin executed a demo delete if (!empty($_POST['process']) && $_GET['process'] == "delete") { if ($_GET['demoId'] != null || $_GET['demoId'] != "") { $demoDeleted = $demoQueries->deleteDemo(ROOTDIR . "/" . $config->demoRootDir . "/", $_GET['demoId']); } } } // Get the list of servers $serverList = $serverQueries->getServers(); // List of Reasons $banReasons = $reasonQueries->getReasonList(); // Get the total number of demos $demoCount = $demoQueries->getNumberOfDemos($searchText); // Get Demos $demoList = $demoQueries->getDemoList($startRange, $demoCount, $sortBy, $sortDirection, $searchText); $userQueries = new UserQueries(); if ($config->enableSmfIntegration) { $username = $user_info['username']; } else { $username = $_SESSION['name']; } $user = $userQueries->getUserInfo($username); ?> <script type="text/javascript"> function formVerify() { var errorFound = false; // Validate Steam ID var regex = /^STEAM_[01]:[01]:\d{0,10}$/; var steamId = document.getElementById("steamdId").value;
$banner = $_GET['b']; // Steam ID of banner $serverId = $_GET['sid']; $nameOfBanned = $_GET['name']; // Name of banned user $ipOfBanned = $_GET['ip']; // IP address of banned user // Make sure the process in ES is calling it // otherwise it is a hack attempt from the outside if ($hash == $config->matchHash) { // Make sure special chars for MySQL are escaped $nameOfBanned = addslashes($nameOfBanned); $nameOfBanned = str_ireplace(array("\"", "\r\n", "\n", "\r", ";"), "", $nameOfBanned); // Remove ; to prevent kick command inyection like name; quit or ; _restart $banQueries = new BanQueries(); $userQueries = new UserQueries(); $lengthQueries = new LengthQueries(); $user = $userQueries->getUserInfoBySteamId($banner); // i for ignore if ($timeScale == "i") { $length = $lengthQueries->getBanLength($lengthId); } else { $length = new Length(); $length->setLength($lengthId); $length->setTimeScale($timeScale); } $isUserMember = false; // If we are not allowing admin bans, then make sure the one being banned is not an admin if (!$config->allowAdminBans) { $isUserMember = $userQueries->isMember($steamId); }
require_once ROOTDIR . "/include/objects/class.Server.php"; require_once ROOTDIR . "/include/database/class.UserQueries.php"; require_once ROOTDIR . "/include/objects/class.User.php"; require_once ROOTDIR . "/include/database/class.AdminGroupQueries.php"; // Only those with full privs can access this page if ($fullPower) { $serverId = 0; $groupId = 0; if (isset($_POST['serverId'])) { $serverId = $_POST['serverId']; } if (isset($_POST['serverGroupId'])) { $groupId = $_POST['serverGroupId']; } $serverQueries = new ServerQueries(); $userQueries = new UserQueries(); $error = false; // Set the server Id to nothing so that we are only editing the group if (isset($_POST['switchGroup'])) { $serverId = -1; } // Get selected server info $server = $serverQueries->getServer($serverId); // This will set the group for the server if (isset($_POST['setGroup'])) { // Only set if a server is selected if ($serverId > 0) { $serverQueries->setServerGroup($serverId, $groupId); } } // Get the group id when we switch servers
function __construct() { parent::__construct(); }
require_once ROOTDIR . "/include/database/class.ReasonQueries.php"; require_once ROOTDIR . "/include/database/class.BanQueries.php"; include_once ROOTDIR . "/include/database/class.LengthQueries.php"; require_once ROOTDIR . "/include/database/class.UserQueries.php"; // User specific queries require_once ROOTDIR . "/include/objects/class.User.php"; // User class to store user info include_once ROOTDIR . "/include/objects/class.Length.php"; $lan_file = ROOTDIR . '/languages/' . $LANGUAGE . '/lan_updateBan.php'; include file_exists($lan_file) ? $lan_file : ROOTDIR . "/languages/English/lan_updateBan.php"; // Initialize Objects $serverQueries = new ServerQueries(); $reasonQueries = new ReasonQueries(); $banQueries = new BanQueries(); $lengthQueries = new LengthQueries(); $userQuery = new UserQueries(); $userEdit = new User(); // Ban ID $banId = $_GET['banId']; // Get the list of servers $serverList = $serverQueries->getServers(); // List of Admins $banAmins = $reasonQueries->getAdminsList(); // List of Reasons $banReasons = $reasonQueries->getReasonList(); // Banned user information $bannedUser = $banQueries->getBannedUser($banId); // List of Ban Lengths $banLengths = $lengthQueries->getLengthList(); // Ban history of the user $banHistory = $banQueries->getBanHistory($banId);