$bannedName = ""; } if (!empty($_GET['serverId'])) { $serverId = $_GET['serverId']; } else { $serverId = 0; } if (!empty($_GET['reasonId'])) { $reasonId = $_GET['reasonId']; } else { $reasonId = 0; } // Initialize Objects $serverQueries = new ServerQueries(); $reasonQueries = new ReasonQueries(); $lengthQueries = new LengthQueries(); // Get the list of servers $serverList = $serverQueries->getServers(); // List of Reasons $banReasons = $reasonQueries->getReasonList(); // List of Ban Lengths $banLengths = $lengthQueries->getLengthList(); ?> <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; if(!steamId.match(regex)) {
// 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); } $username = trim($user->getName());
<script src="javascript/functions.js" language="javascript" type="text/javascript"></script> <script type="text/javascript"> function deleteVerify(id, length, timeScale) { if(confirm("<?php echo $LAN_BANLENGHTS_001; ?> " + length + " " + timeScale + "<?php echo $LAN_BANLENGHTS_019; ?> ")) { document.getElementById("deleteLength"+id).submit(); } } </script> <?php $lengthQueries = new LengthQueries(); $error = false; // If this is set, then that means a server is being added if (isset($_POST['submitAdd'])) { $length = $_POST['length']; $timeScale = $_POST['timeScale']; $newLengthId = $lengthQueries->addLength($length, $timeScale); if ($newLengthId < 1) { $error = true; } } // If a reason is being deleted if (isset($_POST['deleteLength'])) { $lengthQueries->deleteLength($_POST['lengthId']); } // Get list of reasons