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.AdminGroupQueries.php"; require_once ROOTDIR . "/include/objects/class.PluginFlag.php"; if ($_GET['serverId'] > 0) { $serverId = $_GET['serverId']; } $serverQueries = new ServerQueries(); $adminGroupQueries = new AdminGroupQueries(); $server = $serverQueries->getServer($serverId); $groupId = $server->getGroupId(); // If we have a valid group id, get the admins of that group if ($groupId > 0) { $adminGroups = $adminGroupQueries->getAdminGroupsOfGroup($groupId, 'sourcemod'); // Admin groups } else { $adminGroups = $adminGroupQueries->getAdminGroupsOfServer($serverId, 'sourcemod'); // Admin groups } echo "\"Groups\"\n"; echo "{\n"; echo " \"Default\"\n"; echo " { \n"; echo " \"immunity\" \"1\"\n";
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.AdminGroupQueries.php"; $groupId = $_POST['groupId']; $plugin = $_POST['plugin']; $adminGroupQueries = new AdminGroupQueries(); $adminGroupQueries->addPluginToGroup($groupId, $plugin); $pluginList = $adminGroupQueries->getPluginList($groupId); // The HTML must match what is in the manageAdminGroups.php file ?> <span id="pluginTables-<?php echo $groupId; ?> "> <?php // Now create each plugin table foreach ($pluginList as $plugin) { $flags = $adminGroupQueries->getGroupPluginPowers($groupId, $plugin->getId()); ?> <table id="pluginSection-<?php echo $groupId;
function deleteGroupVerify(groupId, groupName) { if(confirm("<?php echo $LAN_MANAGEADMINGROUPS_014; ?> "+groupName+"<?php echo $LAN_MANAGEADMINGROUPS_015; ?> ")) { document.getElementById("deleteAdminGroup:"+groupId).submit(); } } </script> <?php // Only those with full privs can remove or add AdminGroup to the list if ($fullPower) { $adminGroupQueries = new AdminGroupQueries(); $error = false; // If this is set, then that means a AdminGroup is being added if (isset($_POST['submitAdd'])) { $newGroupId = $adminGroupQueries->addAdminGroup($_POST['groupName'], $_POST['description']); if ($newGroupId < 0) { $error = true; } } // If a AdminGroup is being deleted if (isset($_POST['deleteAdminGroup'])) { $adminGroupQueries->deleteAdminGroup($_POST['adminGroupId']); } if (isset($_POST['addPlugin'])) { $adminGroupQueries->addPluginToGroup($_POST['addPluginGroupId'], $_POST['plugin']); }
<?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.AdminGroupQueries.php"; $groupId = $_POST['groupId']; $plugin = $_POST['plugin']; $adminGroupQueries = new AdminGroupQueries(); $success = 0; // Must be logged in to change the status if ($fullPower) { $success = $adminGroupQueries->removePlugin($groupId, $plugin); }
$userQueries->removeAdminFromGroup($admin, $serverId, $groupId); } } } // Get list of users $unAddedUsers = $userQueries->getUnAddedServerAdmins($serverId, $groupId); // If the group id is set, that means that we want to edit the group's admin list if ($groupId > 0) { $serverAdmins = $userQueries->getGroupAdmins($groupId); } else { $serverAdmins = $userQueries->getServerAdmins($serverId); } // Get the list of servers $serverList = $serverQueries->getServers(); // Get admin groups $adminGroupQueries = new AdminGroupQueries(); $adminGroups = $adminGroupQueries->getAdminGroups(); ?> <table id="serverAdminsTable" class="bordercolor" width="100%" cellspacing="1" cellpadding="5" border="0" style="margin-top: 1px;"> <tr> <th class="colColor2" width="1%" nowrap><input type="checkbox" id="selectAll"/></th> <th class="colColor1" width="25%" nowrap>Admin</th> <th class="colColor2" width="25%" nowrap>Group</th> <th class="colColor1" width="49%" nowrap>Remove</th> </tr> <?php foreach ($serverAdmins as $serverAdmin) { ?> <tr> <td class="colColor2">
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.AdminGroupQueries.php"; $groupId = $_POST['groupId']; $adminGroupQueries = new AdminGroupQueries(); $missingPlugins = $adminGroupQueries->getUnaddedPluginList($groupId); // The HTML must match what is in the manageAdminGroups.php file ?> <select id="pluginList-<?php echo $groupId; ?> " name="plugin"><?php foreach ($missingPlugins as $missingPlugin) { echo "<option value='" . $missingPlugin->getId() . "'>" . $missingPlugin->getName() . "</option>"; } ?> </select>
<?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.AdminGroupQueries.php"; $groupId = $_POST['groupId']; $groupname = $_POST['groupname']; $adminGroupQueries = new AdminGroupQueries(); // Must be logged in to change the group name if ($fullPower) { $adminGroupQueries->updateAdminGroupName($groupId, $groupname); }
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.AdminGroupQueries.php"; $groupId = $_POST['groupId']; $flagId = $_POST['flagId']; $checked = $_POST['checked']; $adminGroupQueries = new AdminGroupQueries(); $success = 0; // Must be logged in to change the status if ($fullPower) { $success = $adminGroupQueries->updateGroupPluginFlag($groupId, $flagId, $checked); } // Flip it for the case of failure if ($checked == 0) { $checked = 1; } else { $checked = 0; } // Send back the new active state header('Content-Type: text/xml'); header("Cache-Control: no-cache, must-revalidate"); echo "<?xml version=\"1.0\" ?>";
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(); $adminGroupQueries = new AdminGroupQueries(); $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 $adminGroups = $adminGroupQueries->getAdminGroupsOfGroup($groupId, 'mani'); // Admin groups $immunityGroups = $adminGroupQueries->getAdminGroupsOfGroup($groupId, 'mani-immunity'); // Immunity Groups } else { $users = $userQueries->getServerAdmins($serverId); // Admins of a server $adminGroups = $adminGroupQueries->getAdminGroupsOfServer($serverId, 'mani'); // Admin groups
<?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.AdminGroupQueries.php"; $groupId = $_POST['groupId']; $description = $_POST['description']; $adminGroupQueries = new AdminGroupQueries(); // Must be logged in to change the group name if ($fullPower) { $adminGroupQueries->updateAdminGroupDescription($groupId, $description); }
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"; $userQueries = new UserQueries(); if ($_GET['serverId'] > 0) { $serverId = $_GET['serverId']; } $serverQueries = new ServerQueries(); $server = $serverQueries->getServer($serverId); $adminGroupQueries = new AdminGroupQueries(); $groupId = $server->getGroupId(); // If we have a valid group id, get the admins of that group if ($groupId > 0) { $users = $userQueries->getGroupAdmins($groupId); $adminGroups = $adminGroupQueries->getAdminGroupsOfGroup($groupId, 'gban'); // Admin groups } else { $users = $userQueries->getServerAdmins($serverId); $adminGroups = $adminGroupQueries->getAdminGroupsOfServer($serverId, 'gban'); // Admin groups } // If the above return no values, that means we should use the users list if (count($users) < 1) { $users = $userQueries->getUsers(); }