From befbdd228097b477fba599bb854ae167ae655196 Mon Sep 17 00:00:00 2001 From: Jordan McLean Date: Sat, 8 Jul 2017 00:33:33 +0100 Subject: [PATCH 1/2] Code Formatting --- API/api.php | 195 ++++++------- API/apiExample.php | 80 +++--- API/apiFunctions.php | 82 +++--- ArmaRConClass/rcon.php | 375 +++++++++++------------- Backend/changeLicense.php | 58 ++-- Backend/updateGangs.php | 42 +-- Backend/updateHouses.php | 46 +-- Backend/updatePlayers.php | 58 ++-- Backend/updateVehicles.php | 42 +-- addStaff.php | 133 ++++----- changePerms.php | 38 +-- create.php | 111 +++---- delete.php | 22 +- editHouses.php | 175 +++++------ editPlayer.php | 573 +++++++++++++++++++------------------ functions.php | 88 +++--- gangs.php | 246 ++++++++-------- header/header.php | 112 ++++---- help.php | 136 +++++---- home.php | 309 ++++++++++---------- houses.php | 185 ++++++------ index.php | 160 ++++++----- locked.php | 126 ++++---- login.php | 124 ++++---- logout.php | 20 +- logs.php | 291 ++++++++++--------- lvlError.php | 46 +-- notes.php | 205 ++++++------- notesView.php | 231 +++++++-------- permissions.php | 148 +++++----- players.php | 319 ++++++++++++--------- profile.php | 163 ++++++----- rCon/Kmenu.php | 147 +++++----- rCon/Kplayer.php | 231 +++++++-------- rCon/SKPlayerv1.php | 275 +++++++++--------- rCon/header/header.php | 69 ++--- rCon/player.php | 247 ++++++++-------- rCon/rcon-Skick.php | 36 +-- rCon/rcon-ban.php | 32 +-- rCon/rcon-check.php | 274 +++++++++--------- rCon/rcon-kick.php | 26 +- rCon/rcon-mess.php | 24 +- rCon/rcon-restart.php | 22 +- rCon/rcon-stop.php | 20 +- rCon/rcon-unBan.php | 28 +- rCon/unBan.php | 208 +++++++------- reimbursement.php | 207 +++++++------- settings.php | 205 ++++++------- staff.php | 239 ++++++++-------- steam.php | 132 ++++----- updateSettings.php | 298 +++++++++---------- vehicles.php | 417 ++++++++++++++------------- verifyCheck.php | 230 ++++++++------- whitelist.php | 231 +++++++-------- 54 files changed, 4334 insertions(+), 4203 deletions(-) diff --git a/API/api.php b/API/api.php index 317834c..d40a5bc 100755 --- a/API/api.php +++ b/API/api.php @@ -2,84 +2,84 @@ include '../verifyPanel.php'; if ($apiEnable == 1) { - if ($apiUser == $_GET['user'] && $apiPass == $_GET['pass']) { + if ($apiUser == $_GET[ 'user' ] && $apiPass == $_GET[ 'pass' ]) { $debug = false; if ($debug) { - $time = microtime(); - $time = explode(' ', $time); - $time = $time[1] + $time[0]; + $time = microtime (); + $time = explode (' ', $time); + $time = $time[ 1 ] + $time[ 0 ]; $start = $time; } - $request = $_GET['request']; + $request = $_GET[ 'request' ]; if ($request == 'search') { - $uid = $_GET['id']; - $len = strlen($uid); + $uid = $_GET[ 'id' ]; + $len = strlen ($uid); if ($len != 17) { $uid = ''; } } include 'apiFunctions.php'; - loginconnect(); + loginconnect (); switch ($request) { case 'all': - $allArray = allPlayerFunctions($dbconL); + $allArray = allPlayerFunctions ($dbconL); $all = []; - $all['totalMoney'] = 0; - $all['playerCount'] = 0; - while ($row = mysqli_fetch_array($allArray, MYSQLI_ASSOC)) { - if ($row['pid']) { - $i = $row['pid']; + $all[ 'totalMoney' ] = 0; + $all[ 'playerCount' ] = 0; + while ($row = mysqli_fetch_array ($allArray, MYSQLI_ASSOC)) { + if ($row[ 'pid' ]) { + $i = $row[ 'pid' ]; } else { - $i = $row['playerid']; + $i = $row[ 'playerid' ]; } - $all['totalMoney'] = $all['totalMoney'] + $row['cash'] + $row['bankacc']; - $all['player'][$i]['name'] = $row['name']; - $all['player'][$i]['pid'] = $i; - $all['player'][$i]['aliases'] = $row['aliases']; - $all['player'][$i]['cash'] = $row['cash']; - $all['player'][$i]['bank'] = $row['bankacc']; - $all['player'][$i]['coplevel'] = $row['coplevel']; - $all['player'][$i]['mediclevel'] = $row['mediclevel']; - $all['player'][$i]['donorlevel'] = $row['donorlevel']; - $all['player'][$i]['adminlevel'] = $row['adminlevel']; - $all['player'][$i]['arrested'] = $row['arrested']; - $all['player'][$i]['blacklist'] = $row['blacklist']; - ++$all['playerCount']; + $all[ 'totalMoney' ] = $all[ 'totalMoney' ] + $row[ 'cash' ] + $row[ 'bankacc' ]; + $all[ 'player' ][ $i ][ 'name' ] = $row[ 'name' ]; + $all[ 'player' ][ $i ][ 'pid' ] = $i; + $all[ 'player' ][ $i ][ 'aliases' ] = $row[ 'aliases' ]; + $all[ 'player' ][ $i ][ 'cash' ] = $row[ 'cash' ]; + $all[ 'player' ][ $i ][ 'bank' ] = $row[ 'bankacc' ]; + $all[ 'player' ][ $i ][ 'coplevel' ] = $row[ 'coplevel' ]; + $all[ 'player' ][ $i ][ 'mediclevel' ] = $row[ 'mediclevel' ]; + $all[ 'player' ][ $i ][ 'donorlevel' ] = $row[ 'donorlevel' ]; + $all[ 'player' ][ $i ][ 'adminlevel' ] = $row[ 'adminlevel' ]; + $all[ 'player' ][ $i ][ 'arrested' ] = $row[ 'arrested' ]; + $all[ 'player' ][ $i ][ 'blacklist' ] = $row[ 'blacklist' ]; + ++$all[ 'playerCount' ]; } - echo json_encode($all, JSON_PRETTY_PRINT); + echo json_encode ($all, JSON_PRETTY_PRINT); break; case 'search': - $allArray = searchPlayer($dbconL, $uid); + $allArray = searchPlayer ($dbconL, $uid); if ($allArray != 'NoID') { $all = []; - while ($row = mysqli_fetch_array($allArray, MYSQLI_ASSOC)) { - if ($row['pid']) { - $i = $row['pid']; + while ($row = mysqli_fetch_array ($allArray, MYSQLI_ASSOC)) { + if ($row[ 'pid' ]) { + $i = $row[ 'pid' ]; } else { - $i = $row['playerid']; + $i = $row[ 'playerid' ]; } - $all['player'][$i]['name'] = $row['name']; - $all['player'][$i]['pid'] = $i; - $all['player'][$i]['aliases'] = $row['aliases']; - $all['player'][$i]['cash'] = $row['cash']; - $all['player'][$i]['bank'] = $row['bankacc']; - $all['player'][$i]['coplevel'] = $row['coplevel']; - $all['player'][$i]['mediclevel'] = $row['mediclevel']; - $all['player'][$i]['donorlevel'] = $row['donorlevel']; - $all['player'][$i]['adminlevel'] = $row['adminlevel']; - $all['player'][$i]['arrested'] = $row['arrested']; - $all['player'][$i]['blacklist'] = $row['blacklist']; + $all[ 'player' ][ $i ][ 'name' ] = $row[ 'name' ]; + $all[ 'player' ][ $i ][ 'pid' ] = $i; + $all[ 'player' ][ $i ][ 'aliases' ] = $row[ 'aliases' ]; + $all[ 'player' ][ $i ][ 'cash' ] = $row[ 'cash' ]; + $all[ 'player' ][ $i ][ 'bank' ] = $row[ 'bankacc' ]; + $all[ 'player' ][ $i ][ 'coplevel' ] = $row[ 'coplevel' ]; + $all[ 'player' ][ $i ][ 'mediclevel' ] = $row[ 'mediclevel' ]; + $all[ 'player' ][ $i ][ 'donorlevel' ] = $row[ 'donorlevel' ]; + $all[ 'player' ][ $i ][ 'adminlevel' ] = $row[ 'adminlevel' ]; + $all[ 'player' ][ $i ][ 'arrested' ] = $row[ 'arrested' ]; + $all[ 'player' ][ $i ][ 'blacklist' ] = $row[ 'blacklist' ]; } - echo json_encode($all, JSON_PRETTY_PRINT); + echo json_encode ($all, JSON_PRETTY_PRINT); } else { echo 'rip'; } @@ -88,118 +88,119 @@ case 'money': $money = 0; - $sqldata = searchMoney($dbconL); + $sqldata = searchMoney ($dbconL); - while ($row = mysqli_fetch_array($sqldata, MYSQLI_ASSOC)) { - $money = $money + $row['cash'] + $row['bankacc']; + while ($row = mysqli_fetch_array ($sqldata, MYSQLI_ASSOC)) { + $money = $money + $row[ 'cash' ] + $row[ 'bankacc' ]; } echo $money; break; case 'richlist': - if (isset($_GET['limit'])) { - $limit = $_GET['limit']; + if (isset($_GET[ 'limit' ])) { + $limit = $_GET[ 'limit' ]; } else { $limit = 10; } $money = 0; - $sqldata = showRich($dbconL, $limit); + $sqldata = showRich ($dbconL, $limit); - while ($row = mysqli_fetch_array($sqldata, MYSQLI_ASSOC)) { - if ($row['pid']) { - $i = $row['pid']; + while ($row = mysqli_fetch_array ($sqldata, MYSQLI_ASSOC)) { + if ($row[ 'pid' ]) { + $i = $row[ 'pid' ]; } else { - $i = $row['playerid']; + $i = $row[ 'playerid' ]; } - $all['player'][$i]['name'] = $row['name']; - $all['player'][$i]['pid'] = $i; - $all['player'][$i]['aliases'] = $row['aliases']; - $all['player'][$i]['cash'] = $row['cash']; - $all['player'][$i]['bank'] = $row['bankacc']; + $all[ 'player' ][ $i ][ 'name' ] = $row[ 'name' ]; + $all[ 'player' ][ $i ][ 'pid' ] = $i; + $all[ 'player' ][ $i ][ 'aliases' ] = $row[ 'aliases' ]; + $all[ 'player' ][ $i ][ 'cash' ] = $row[ 'cash' ]; + $all[ 'player' ][ $i ][ 'bank' ] = $row[ 'bankacc' ]; } - echo json_encode($all, JSON_PRETTY_PRINT); + echo json_encode ($all, JSON_PRETTY_PRINT); break; case 'players': - $count = countPlayers($dbconL); + $count = countPlayers ($dbconL); echo $count; break; case 'wanted': - $sqldata = wantedList($dbconL); + $sqldata = wantedList ($dbconL); $wanted = []; - while ($row = mysqli_fetch_array($sqldata, MYSQLI_ASSOC)) { - $i = $row['wantedID']; - $wanted['wanted'][$i]['name'] = $row['wantedName']; - $wanted['wanted'][$i]['crimes'] = $row['wantedCrimes']; - $wanted['wanted'][$i]['bounty'] = $row['wantedBounty']; + while ($row = mysqli_fetch_array ($sqldata, MYSQLI_ASSOC)) { + $i = $row[ 'wantedID' ]; + $wanted[ 'wanted' ][ $i ][ 'name' ] = $row[ 'wantedName' ]; + $wanted[ 'wanted' ][ $i ][ 'crimes' ] = $row[ 'wantedCrimes' ]; + $wanted[ 'wanted' ][ $i ][ 'bounty' ] = $row[ 'wantedBounty' ]; } - echo json_encode($wanted, JSON_PRETTY_PRINT); + echo json_encode ($wanted, JSON_PRETTY_PRINT); break; case 'vehicles': - $count = countVehicles($dbconL); + $count = countVehicles ($dbconL); echo $count; break; case 'coplevel': - $copArray = searchLevel($dbconL, 'coplevel'); - $player = returnLevel($copArray, 'coplevel'); - echo json_encode($player, JSON_PRETTY_PRINT); + $copArray = searchLevel ($dbconL, 'coplevel'); + $player = returnLevel ($copArray, 'coplevel'); + echo json_encode ($player, JSON_PRETTY_PRINT); break; case 'mediclevel': - $medicArray = searchLevel($dbconL, 'mediclevel'); - $player = returnLevel($medicArray, 'mediclevel'); - echo json_encode($player, JSON_PRETTY_PRINT); + $medicArray = searchLevel ($dbconL, 'mediclevel'); + $player = returnLevel ($medicArray, 'mediclevel'); + echo json_encode ($player, JSON_PRETTY_PRINT); break; case 'donorlevel': - $donorArray = searchLevel($dbconL, 'donorlevel'); - $player = returnLevel($donorArray, 'donorlevel'); - echo json_encode($player, JSON_PRETTY_PRINT); + $donorArray = searchLevel ($dbconL, 'donorlevel'); + $player = returnLevel ($donorArray, 'donorlevel'); + echo json_encode ($player, JSON_PRETTY_PRINT); break; case 'adminlevel': - $adminArray = searchLevel($dbconL, 'adminlevel'); - $player = returnLevel($adminArray, 'adminlevel'); - echo json_encode($player, JSON_PRETTY_PRINT); + $adminArray = searchLevel ($dbconL, 'adminlevel'); + $player = returnLevel ($adminArray, 'adminlevel'); + echo json_encode ($player, JSON_PRETTY_PRINT); break; case 'gangs': - $gangArray = searchGangs($dbconL); + $gangArray = searchGangs ($dbconL); $i = 0; $gangs = []; - while ($row = mysqli_fetch_array($gangArray, MYSQLI_ASSOC)) { - $i = $row['name']; - $gangs[$i]['owner'] = $row['owner']; - $gangs[$i]['name'] = $row['name']; - $gangs[$i]['members'] = $row['members']; - $gangs[$i]['maxmembers'] = $row['maxmembers']; + while ($row = mysqli_fetch_array ($gangArray, MYSQLI_ASSOC)) { + $i = $row[ 'name' ]; + $gangs[ $i ][ 'owner' ] = $row[ 'owner' ]; + $gangs[ $i ][ 'name' ] = $row[ 'name' ]; + $gangs[ $i ][ 'members' ] = $row[ 'members' ]; + $gangs[ $i ][ 'maxmembers' ] = $row[ 'maxmembers' ]; ++$i; } - echo json_encode($gangs, JSON_PRETTY_PRINT); + echo json_encode ($gangs, JSON_PRETTY_PRINT); break; - default: echo 'rip'; + default: + echo 'rip'; } if ($debug) { echo '
'; - $time = microtime(); - $time = explode(' ', $time); - $time = $time[1] + $time[0]; + $time = microtime (); + $time = explode (' ', $time); + $time = $time[ 1 ] + $time[ 0 ]; $finish = $time; - $total_time = round(($finish - $start), 4); - echo 'Page generated in '.$total_time.' seconds.'; + $total_time = round (($finish - $start), 4); + echo 'Page generated in ' . $total_time . ' seconds.'; } } else { echo 'Invalid credentials'; diff --git a/API/apiExample.php b/API/apiExample.php index 15a7a1c..4c8ea05 100755 --- a/API/apiExample.php +++ b/API/apiExample.php @@ -1,50 +1,50 @@ - Admin Panel - - - - - - - - - -
-
-

Players

-
-
-

-
-
- -
- - -
- - - - - - - - - - - - + Admin Panel + + + + + + + + + +
+
+

Players

+
+
+

+
+
+ +
+ + +
+ + + + + + + + + + + + diff --git a/API/apiFunctions.php b/API/apiFunctions.php index fb82236..0321eaf 100755 --- a/API/apiFunctions.php +++ b/API/apiFunctions.php @@ -1,108 +1,98 @@ false, - 'timeout_seconds' => 1, - ); + public $options = array('send_heartbeat' => false, 'timeout_seconds' => 1,); /** * Server IP @@ -78,126 +75,82 @@ class ARC /** * Class constructor. * - * @param string $serverIP IP of the Arma server - * @param int $serverPort Port of the Arma server + * @param string $serverIP IP of the Arma server + * @param int $serverPort Port of the Arma server * @param string $RCONpassword RCon password required by BattlEye - * @param array $options Options array of ARC + * @param array $options Options array of ARC */ - public function __construct($serverIP, $serverPort, $RCONpassword, array $options = array()) - { + public function __construct($serverIP, $serverPort, $RCONpassword, array $options = array()) { $this->serverIP = $serverIP; $this->serverPort = $serverPort; $this->RCONpassword = $RCONpassword; - $this->options = array_merge($this->options, $options); - - $this->connect(); - } + $this->options = array_merge ($this->options, $options); - /** - * Class destructor. - */ - public function __destruct() - { - $this->disconnect(); + $this->connect (); } /** - * Sends the login data to the server in order to send commands later. + * Creates again a connection to the server, manually closing the + * connection before is not needed. You may change the server-related data by using the optional parameters. * - * @throws AuthorizationException If login fails (password wrong) + * @param string $ServerIP New server IP, if not specified here, the IP from the constructor will be used + * @param string $ServerPort New server port, if not specified here, the port from the constructor will be used + * @param string $RConPassword New RCon password, if not specified here, the RCon password from the constructor will be used + * + * @throws AuthorizationException If the password is wrong + * @throws PacketException If sending the heartbeat packet fails + * @throws SocketException If creating the socket fails */ - private function authorize() - { - if (fwrite($this->socket, $this->get_loginmessage()) === false) { - throw new PacketException('[ARC] Failed to send login!'); + public function connect($ServerIP = '', $ServerPort = 2306, $RConPassword = '') { + if (!$this->disconnected) { + $this->disconnect (); } - $result = fread($this->socket, 16); - - if (ord($result[strlen($result) - 1]) == 0) { - throw new AuthorizationException('[ARC] Login failed, wrong password!'); + if ($ServerIP != '') { + $this->serverIP = $ServerIP; + } + if ($ServerPort != 2306) { + $this->serverPort = $ServerPort; + } + if ($RConPassword != '') { + $this->RCONpassword = $RConPassword; } - } - - /** - * Generates the password's CRC32 data. - * - * @return string[] - */ - private function get_authCRC() - { - $authCRC = sprintf('%x', crc32(chr(255).chr(00).trim($this->RCONpassword))); - $authCRC = array(substr($authCRC, -2, 2), substr($authCRC, -4, 2), substr($authCRC, -6, 2), substr($authCRC, 0, 2)); - return $authCRC; - } + $this->socket = @fsockopen ('udp://' . $this->serverIP, $this->serverPort, $errno, $errstr, $this->options[ 'timeout_seconds' ]); - /** - * Generates the message's CRC32 data. - * - * @param string $command The message which will be prepared for being sent to the server - * - * @return string[] Message which can be sent to the server - */ - private function get_msgCRC($command) - { - $msgCRC = sprintf('%x', crc32(chr(255).chr(01).chr(hexdec(sprintf('%01b', 0))).$command)); - $msgCRC = array(substr($msgCRC, -2, 2), substr($msgCRC, -4, 2), substr($msgCRC, -6, 2), substr($msgCRC, 0, 2)); + stream_set_timeout ($this->socket, $this->options[ 'timeout_seconds' ]); + stream_set_blocking ($this->socket, true); - return $msgCRC; - } + if (!$this->socket) { + throw new SocketException('[ARC] Failed to create socket!'); + } - /** - * Generates the login message. - * - * @return string The message for logging in, containing the RCon password - */ - private function get_loginmessage() - { - $authCRC = $this->get_authCRC(); + $this->authorize (); - $loginmsg = 'BE'.chr(hexdec($authCRC[0])).chr(hexdec($authCRC[1])).chr(hexdec($authCRC[2])).chr(hexdec($authCRC[3])); - $loginmsg .= chr(hexdec('ff')).chr(hexdec('00')).$this->RCONpassword; + if ($this->options[ 'send_heartbeat' ]) { + $this->send_heartbeat (); + } - return $loginmsg; + $this->disconnected = false; } /** - * Sends optional a heartbeat to the server. + * Closes the socket/connection. If you want to reconnect, + * don't forget to call connect(), in order to create a new socket. * - * @throws PacketException If sending the command fails + * @see connect() */ - private function send_heartbeat() - { - $hb_msg = 'BE'.chr(hexdec('7d')).chr(hexdec('8f')).chr(hexdec('ef')).chr(hexdec('73')); - $hb_msg .= chr(hexdec('ff')).chr(hexdec('02')).chr(hexdec('00')); - - if (fwrite($this->socket, $hb_msg) === false) { - throw new PacketException('[ARC] Failed to send heartbeat packet!'); + public function disconnect() { + if ($this->disconnected) { + return; } - } - /** - * Receives the answer form the server. - * - * @return string Any answer from the server, except the log-in message - */ - private function get_answer() - { - $get = function () { - return substr(fread($this->socket, 102400), strlen($this->head)); - }; - $output = ''; + $this->send ('Exit'); - do { - $answer = $get(); - while (strpos($answer, 'RCon admin') !== false) { - $answer = $get(); - } - $output .= $answer; - } while ($answer != ''); + fclose ($this->socket); - return $output; + $this->socket = null; + $this->disconnected = true; } /** @@ -209,84 +162,95 @@ private function get_answer() * * @throws \Exception If the connection is closed */ - private function send($command) - { + private function send($command) { if ($this->disconnected) { throw new \Exception('[ARC] Failed to send command, because the connection is closed!'); } - $msgCRC = $this->get_msgCRC($command); - $head = 'BE'.chr(hexdec($msgCRC[0])).chr(hexdec($msgCRC[1])).chr(hexdec($msgCRC[2])).chr(hexdec($msgCRC[3])).chr(hexdec('ff')).chr(hexdec('01')).chr(hexdec(sprintf('%01b', 0))); - $msg = $head.$command; + $msgCRC = $this->get_msgCRC ($command); + $head = 'BE' . chr (hexdec ($msgCRC[ 0 ])) . chr (hexdec ($msgCRC[ 1 ])) . chr (hexdec ($msgCRC[ 2 ])) . chr (hexdec ($msgCRC[ 3 ])) . chr (hexdec ('ff')) . chr (hexdec ('01')) . chr (hexdec (sprintf ('%01b', 0))); + $msg = $head . $command; $this->head = $head; - return fwrite($this->socket, $msg) === false ? false : true; + return fwrite ($this->socket, $msg) === false ? false : true; } /** - * Closes the socket/connection. If you want to reconnect, - * don't forget to call connect(), in order to create a new socket. + * Generates the message's CRC32 data. * - * @see connect() + * @param string $command The message which will be prepared for being sent to the server + * + * @return string[] Message which can be sent to the server */ - public function disconnect() - { - if ($this->disconnected) { - return; - } - - $this->send('Exit'); - - fclose($this->socket); + private function get_msgCRC($command) { + $msgCRC = sprintf ('%x', crc32 (chr (255) . chr (01) . chr (hexdec (sprintf ('%01b', 0))) . $command)); + $msgCRC = array(substr ($msgCRC, -2, 2), substr ($msgCRC, -4, 2), substr ($msgCRC, -6, 2), substr ($msgCRC, 0, 2)); - $this->socket = null; - $this->disconnected = true; + return $msgCRC; } /** - * Creates again a connection to the server, manually closing the - * connection before is not needed. You may change the server-related data by using the optional parameters. - * - * @param string $ServerIP New server IP, if not specified here, the IP from the constructor will be used - * @param string $ServerPort New server port, if not specified here, the port from the constructor will be used - * @param string $RConPassword New RCon password, if not specified here, the RCon password from the constructor will be used + * Sends the login data to the server in order to send commands later. * - * @throws AuthorizationException If the password is wrong - * @throws PacketException If sending the heartbeat packet fails - * @throws SocketException If creating the socket fails + * @throws AuthorizationException If login fails (password wrong) */ - public function connect($ServerIP = '', $ServerPort = 2306, $RConPassword = '') - { - if (!$this->disconnected) { - $this->disconnect(); + private function authorize() { + if (fwrite ($this->socket, $this->get_loginmessage ()) === false) { + throw new PacketException('[ARC] Failed to send login!'); } - if ($ServerIP != '') { - $this->serverIP = $ServerIP; - } - if ($ServerPort != 2306) { - $this->serverPort = $ServerPort; - } - if ($RConPassword != '') { - $this->RCONpassword = $RConPassword; + $result = fread ($this->socket, 16); + + if (ord ($result[ strlen ($result) - 1 ]) == 0) { + throw new AuthorizationException('[ARC] Login failed, wrong password!'); } + } - $this->socket = @fsockopen('udp://'.$this->serverIP, $this->serverPort, $errno, $errstr, $this->options['timeout_seconds']); + /** + * Generates the login message. + * + * @return string The message for logging in, containing the RCon password + */ + private function get_loginmessage() { + $authCRC = $this->get_authCRC (); - stream_set_timeout($this->socket, $this->options['timeout_seconds']); - stream_set_blocking($this->socket, true); + $loginmsg = 'BE' . chr (hexdec ($authCRC[ 0 ])) . chr (hexdec ($authCRC[ 1 ])) . chr (hexdec ($authCRC[ 2 ])) . chr (hexdec ($authCRC[ 3 ])); + $loginmsg .= chr (hexdec ('ff')) . chr (hexdec ('00')) . $this->RCONpassword; - if (!$this->socket) { - throw new SocketException('[ARC] Failed to create socket!'); - } + return $loginmsg; + } - $this->authorize(); + /** + * Generates the password's CRC32 data. + * + * @return string[] + */ + private function get_authCRC() { + $authCRC = sprintf ('%x', crc32 (chr (255) . chr (00) . trim ($this->RCONpassword))); + $authCRC = array(substr ($authCRC, -2, 2), substr ($authCRC, -4, 2), substr ($authCRC, -6, 2), substr ($authCRC, 0, 2)); + + return $authCRC; + } + + /** + * Sends optional a heartbeat to the server. + * + * @throws PacketException If sending the command fails + */ + private function send_heartbeat() { + $hb_msg = 'BE' . chr (hexdec ('7d')) . chr (hexdec ('8f')) . chr (hexdec ('ef')) . chr (hexdec ('73')); + $hb_msg .= chr (hexdec ('ff')) . chr (hexdec ('02')) . chr (hexdec ('00')); - if ($this->options['send_heartbeat']) { - $this->send_heartbeat(); + if (fwrite ($this->socket, $hb_msg) === false) { + throw new PacketException('[ARC] Failed to send heartbeat packet!'); } + } - $this->disconnected = false; + /** + * Class destructor. + */ + public function __destruct() { + $this->disconnect (); } /** @@ -296,9 +260,30 @@ public function connect($ServerIP = '', $ServerPort = 2306, $RConPassword = '') * * @return string Answer from the server */ - public function command($command) - { - return $this->send($command) ? $this->get_answer() : false; + public function command($command) { + return $this->send ($command) ? $this->get_answer () : false; + } + + /** + * Receives the answer form the server. + * + * @return string Any answer from the server, except the log-in message + */ + private function get_answer() { + $get = function () { + return substr (fread ($this->socket, 102400), strlen ($this->head)); + }; + $output = ''; + + do { + $answer = $get(); + while (strpos ($answer, 'RCon admin') !== false) { + $answer = $get(); + } + $output .= $answer; + } while ($answer != ''); + + return $output; } /** @@ -308,9 +293,8 @@ public function command($command) * * @return bool Whether sending the command was successful or not */ - public function kick_player($player, $reason = 'Admin Kick') - { - return $this->send('kick '.$player.' '.$reason); + public function kick_player($player, $reason = 'Admin Kick') { + return $this->send ('kick ' . $player . ' ' . $reason); } /** @@ -320,22 +304,20 @@ public function kick_player($player, $reason = 'Admin Kick') * * @return bool Whether sending the command was successful or not */ - public function say_global($message) - { - return $this->send('Say -1 '.$message); + public function say_global($message) { + return $this->send ('Say -1 ' . $message); } /** * Sends a message to a specific player. * - * @param int $player Player who is sent the message + * @param int $player Player who is sent the message * @param string $message The message for the player * * @return bool Whether sending the command was successful or not */ - public function say_player($player, $message) - { - return $this->send('Say '.$player.$message); + public function say_player($player, $message) { + return $this->send ('Say ' . $player . $message); } /** @@ -343,9 +325,8 @@ public function say_player($player, $message) * * @return bool Whether sending the command was successful or not */ - public function load_scripts() - { - return $this->send('loadScripts'); + public function load_scripts() { + return $this->send ('loadScripts'); } /** @@ -355,9 +336,8 @@ public function load_scripts() * * @return bool Whether sending the command was successful or not */ - public function max_ping($ping) - { - return $this->send('MaxPing '.$ping); + public function max_ping($ping) { + return $this->send ('MaxPing ' . $ping); } /** @@ -367,9 +347,8 @@ public function max_ping($ping) * * @return bool Whether sending the command was successful or not */ - public function change_password($password) - { - return $this->send('RConPassword '.$password); + public function change_password($password) { + return $this->send ('RConPassword ' . $password); } /** @@ -377,9 +356,8 @@ public function change_password($password) * * @return bool Whether sending the command was successful or not */ - public function load_bans() - { - return $this->send('loadBans'); + public function load_bans() { + return $this->send ('loadBans'); } /** @@ -387,9 +365,8 @@ public function load_bans() * * @return string|false The list of all players on the server or, if sending failed, false */ - public function get_players() - { - return $this->send('players') ? $this->get_answer() : false; + public function get_players() { + return $this->send ('players') ? $this->get_answer () : false; } /** @@ -397,9 +374,8 @@ public function get_players() * * @return string|false The list of bans or, if sending failed, false */ - public function get_bans() - { - return $this->send('bans') ? $this->get_answer() : false; + public function get_bans() { + return $this->send ('bans') ? $this->get_answer () : false; } /** @@ -407,9 +383,8 @@ public function get_bans() * * @return string|false The list of missions or, if sending failed, false */ - public function get_missions() - { - return $this->send('missions') ? $this->get_answer() : false; + public function get_missions() { + return $this->send ('missions') ? $this->get_answer () : false; } /** @@ -418,13 +393,12 @@ public function get_missions() * * @param string $player Player who will be banned * @param string $reason Reason why the player is banned - * @param int $time How long the player is banned (0 = permanent) + * @param int $time How long the player is banned (0 = permanent) * * @return bool Whether sending the command was successful or not */ - public function ban_player($player, $reason = 'Banned', $time = 0) - { - return $this->send('ban '.$player.' '.$time.' '.$reason); + public function ban_player($player, $reason = 'Banned', $time = 0) { + return $this->send ('ban ' . $player . ' ' . $time . ' ' . $reason); } /** @@ -432,13 +406,12 @@ public function ban_player($player, $reason = 'Banned', $time = 0) * * @param string $player Player who will be banned * @param string $reason Reason why the player is banned - * @param int $time How long the player is banned (0 = permanent) + * @param int $time How long the player is banned (0 = permanent) * * @return bool Whether sending the command was successful or not */ - public function add_ban($player, $reason = 'Banned', $time = 0) - { - return $this->send('addBan '.$player.' '.$time.' '.$reason); + public function add_ban($player, $reason = 'Banned', $time = 0) { + return $this->send ('addBan ' . $player . ' ' . $time . ' ' . $reason); } /** @@ -448,9 +421,8 @@ public function add_ban($player, $reason = 'Banned', $time = 0) * * @return bool Whether sending the command was successful or not */ - public function remove_ban($banid) - { - return $this->send('removeBan '.$banid); + public function remove_ban($banid) { + return $this->send ('removeBan ' . $banid); } /** @@ -458,21 +430,20 @@ public function remove_ban($banid) * * @return bool Whether sending the command was successful or not */ - public function write_bans() - { - return $this->send('writeBans'); + public function write_bans() { + return $this->send ('writeBans'); } } /* * Defines some custom Exceptions */ -class PacketException extends \Exception -{ + +class PacketException extends \Exception { } -class SocketException extends \Exception -{ + +class SocketException extends \Exception { } -class AuthorizationException extends \Exception -{ + +class AuthorizationException extends \Exception { } diff --git a/Backend/changeLicense.php b/Backend/changeLicense.php index e49420f..3c5e4f8 100755 --- a/Backend/changeLicense.php +++ b/Backend/changeLicense.php @@ -1,47 +1,47 @@ fetch_object(); + $result = mysqli_query ($dbcon, $sql); + $player = $result->fetch_object (); $licences = $player->$col; - $num = strpos($licences, $change['2']) + strlen($change['2']) + 2; - - $pid = playerID($player); - - if ($licences[$num] == 0) { - $licences[$num] = 1; - $message = 'Admin '.$user.' has added license '.$id.' to '.$player->name.'('.$pid.')'; - logIt($user, $message, $dbcon); - } elseif ($licences[$num] == 1) { - $message = 'Admin '.$user.' has removed license '.$id.' from '.$player->name.'('.$pid.')'; - logIt($user, $message, $dbcon); - $licences[$num] = 0; + $num = strpos ($licences, $change[ '2' ]) + strlen ($change[ '2' ]) + 2; + + $pid = playerID ($player); + + if ($licences[ $num ] == 0) { + $licences[ $num ] = 1; + $message = 'Admin ' . $user . ' has added license ' . $id . ' to ' . $player->name . '(' . $pid . ')'; + logIt ($user, $message, $dbcon); + } elseif ($licences[ $num ] == 1) { + $message = 'Admin ' . $user . ' has removed license ' . $id . ' from ' . $player->name . '(' . $pid . ')'; + logIt ($user, $message, $dbcon); + $licences[ $num ] = 0; } - $sql = 'UPDATE `players` SET `'.$col."`='$licences' WHERE uid ='$uid'"; - $result = mysqli_query($dbcon, $sql); + $sql = 'UPDATE `players` SET `' . $col . "`='$licences' WHERE uid ='$uid'"; + $result = mysqli_query ($dbcon, $sql); } diff --git a/Backend/updateGangs.php b/Backend/updateGangs.php index f8c5be1..d054e5a 100644 --- a/Backend/updateGangs.php +++ b/Backend/updateGangs.php @@ -1,49 +1,49 @@ fetch_object(); +$result = mysqli_query ($dbcon, $sql); +$gang = $result->fetch_object (); -switch ($_POST['column']) { +switch ($_POST[ 'column' ]) { case 'maxmembers': - $maxmembers = logs($staffPerms['gangs'], $_POST['column'], $gang->pid, $user, $dbcon, $gang, $_POST['editval']); + $maxmembers = logs ($staffPerms[ 'gangs' ], $_POST[ 'column' ], $gang->pid, $user, $dbcon, $gang, $_POST[ 'editval' ]); $UpdateQ = "UPDATE gangs SET $_POST[column]='$maxmembers' WHERE id='$_POST[id]'"; - break; + break; case 'members': - $members = logs($staffPerms['gangs'], $_POST['column'], $gang->pid, $user, $dbcon, $gang, $_POST['editval']); + $members = logs ($staffPerms[ 'gangs' ], $_POST[ 'column' ], $gang->pid, $user, $dbcon, $gang, $_POST[ 'editval' ]); $UpdateQ = "UPDATE gangs SET $_POST[column]='$members' WHERE id='$_POST[id]'"; - break; + break; case 'bank': - $bank = logs($staffPerms['gangs'], $_POST['column'], $gang->pid, $user, $dbcon, $gang, $_POST['editval']); + $bank = logs ($staffPerms[ 'gangs' ], $_POST[ 'column' ], $gang->pid, $user, $dbcon, $gang, $_POST[ 'editval' ]); $UpdateQ = "UPDATE gangs SET $_POST[column]='$bank' WHERE id='$_POST[id]'"; - break; + break; case 'active': - $active = logs($staffPerms['gangs'], $_POST['column'], $gang->pid, $user, $dbcon, $gang, $_POST['editval']); + $active = logs ($staffPerms[ 'gangs' ], $_POST[ 'column' ], $gang->pid, $user, $dbcon, $gang, $_POST[ 'editval' ]); $UpdateQ = "UPDATE gangs SET $_POST[column]='$active' WHERE id='$_POST[id]'"; - break; + break; default: $message = 'ERROR'; - logIt($user, $message, $dbcon); - break; + logIt ($user, $message, $dbcon); + break; } -mysqli_query($dbcon, $UpdateQ); +mysqli_query ($dbcon, $UpdateQ); diff --git a/Backend/updateHouses.php b/Backend/updateHouses.php index 0be1350..ce0428f 100644 --- a/Backend/updateHouses.php +++ b/Backend/updateHouses.php @@ -1,54 +1,54 @@ fetch_object(); +$result = mysqli_query ($dbcon, $sql); +$houses = $result->fetch_object (); -switch ($_POST['column']) { +switch ($_POST[ 'column' ]) { case 'owned': - $owned = logs($staffPerms['housing'], $_POST['column'], $houses->pid, $user, $dbcon, $houses, $_POST['editval']); + $owned = logs ($staffPerms[ 'housing' ], $_POST[ 'column' ], $houses->pid, $user, $dbcon, $houses, $_POST[ 'editval' ]); $UpdateQ = "UPDATE houses SET $_POST[column]='$owned' WHERE id='$_POST[id]'"; - break; + break; case 'ownedCrate': - $ownedCrate = logs($staffPerms['housing'], $_POST['column'], $houses->pid, $user, $dbcon, $houses, $_POST['editval']); + $ownedCrate = logs ($staffPerms[ 'housing' ], $_POST[ 'column' ], $houses->pid, $user, $dbcon, $houses, $_POST[ 'editval' ]); $UpdateQ = "UPDATE containers SET owned='$owned' WHERE id='$_POST[id]'"; - break; + break; case 'active': - $active = logs($staffPerms['housing'], $_POST['column'], $houses->pid, $user, $dbcon, $houses, $_POST['editval']); + $active = logs ($staffPerms[ 'housing' ], $_POST[ 'column' ], $houses->pid, $user, $dbcon, $houses, $_POST[ 'editval' ]); $UpdateQ = "UPDATE containers SET $_POST[column]='$owned' WHERE id='$_POST[id]'"; - break; + break; case 'gear': - $gear = logs($staffPerms['housing'], $_POST['column'], $houses->pid, $user, $dbcon, $houses, $_POST['editval']); + $gear = logs ($staffPerms[ 'housing' ], $_POST[ 'column' ], $houses->pid, $user, $dbcon, $houses, $_POST[ 'editval' ]); $UpdateQ = "UPDATE containers SET $_POST[column]='$gear' WHERE id='$_POST[id]'"; - break; + break; case 'inventory': - $inventory = logs($staffPerms['housing'], $_POST['column'], $houses->pid, $user, $dbcon, $houses, $_POST['editval']); + $inventory = logs ($staffPerms[ 'housing' ], $_POST[ 'column' ], $houses->pid, $user, $dbcon, $houses, $_POST[ 'editval' ]); $UpdateQ = "UPDATE containers SET $_POST[column]='$inventory' WHERE id='$_POST[id]'"; - break; + break; default: $message = 'ERROR'; - logIt($user, $message, $dbcon); - break; + logIt ($user, $message, $dbcon); + break; } -mysqli_query($dbcon, $UpdateQ); +mysqli_query ($dbcon, $UpdateQ); diff --git a/Backend/updatePlayers.php b/Backend/updatePlayers.php index e4eb456..dba8b9f 100644 --- a/Backend/updatePlayers.php +++ b/Backend/updatePlayers.php @@ -1,22 +1,22 @@ fetch_object(); +$result = mysqli_query ($dbcon, $sql); +$player = $result->fetch_object (); $cash = $player->cash; $bank = $player->bankacc; @@ -32,44 +32,44 @@ } } -switch ($_POST['column']) { +switch ($_POST[ 'column' ]) { case 'cash': - $cash = logs($staffPerms['money'], 'cash', $pid, $user, $dbcon, $player, $_POST['editval']); + $cash = logs ($staffPerms[ 'money' ], 'cash', $pid, $user, $dbcon, $player, $_POST[ 'editval' ]); $UpdateQ = "UPDATE players SET $_POST[column]='$cash' WHERE uid='$_POST[uid]'"; - break; + break; case 'bankacc': - $bankacc = logs($staffPerms['money'], 'bankacc', $pid, $user, $dbcon, $player, $_POST['editval']); + $bankacc = logs ($staffPerms[ 'money' ], 'bankacc', $pid, $user, $dbcon, $player, $_POST[ 'editval' ]); $UpdateQ = "UPDATE players SET $_POST[column]='$bankacc' WHERE uid='$_POST[uid]'"; - break; + break; case 'coplevel': - $coplevel = logs($staffPerms['cop'], 'coplevel', $pid, $user, $dbcon, $player, $_POST['editval']); + $coplevel = logs ($staffPerms[ 'cop' ], 'coplevel', $pid, $user, $dbcon, $player, $_POST[ 'editval' ]); $UpdateQ = "UPDATE players SET $_POST[column]='$coplevel' WHERE uid='$_POST[uid]'"; - break; + break; case 'mediclevel': - $mediclevel = logs($staffPerms['medic'], 'mediclevel', $pid, $user, $dbcon, $player, $_POST['editval']); + $mediclevel = logs ($staffPerms[ 'medic' ], 'mediclevel', $pid, $user, $dbcon, $player, $_POST[ 'editval' ]); $UpdateQ = "UPDATE players SET $_POST[column]='$mediclevel' WHERE uid='$_POST[uid]'"; - break; + break; case 'adminlevel': - $adminlevel = logs($staffPerms['IG-Admin'], 'adminlevel', $pid, $user, $dbcon, $player, $_POST['editval']); + $adminlevel = logs ($staffPerms[ 'IG-Admin' ], 'adminlevel', $pid, $user, $dbcon, $player, $_POST[ 'editval' ]); $UpdateQ = "UPDATE players SET $_POST[column]='$adminlevel' WHERE uid='$_POST[uid]'"; - break; + break; case 'donatorlvl': - $donatorlvl = logs($staffPerms['editPlayer'], $_POST['column'], $pid, $user, $dbcon, $player, $_POST['editval']); + $donatorlvl = logs ($staffPerms[ 'editPlayer' ], $_POST[ 'column' ], $pid, $user, $dbcon, $player, $_POST[ 'editval' ]); $UpdateQ = "UPDATE players SET $_POST[column]='$donatorlvl' WHERE uid='$_POST[uid]'"; - break; + break; case 'donorlevel': - $donorlevel = logs($staffPerms['editPlayer'], $_POST['column'], $pid, $user, $dbcon, $player, $_POST['editval']); + $donorlevel = logs ($staffPerms[ 'editPlayer' ], $_POST[ 'column' ], $pid, $user, $dbcon, $player, $_POST[ 'editval' ]); $UpdateQ = "UPDATE players SET $_POST[column]='$donorlevel' WHERE uid='$_POST[uid]'"; - break; + break; case 'blacklist': - $blacklist = logs($staffPerms['editPlayer'], $_POST['column'], $pid, $user, $dbcon, $player, $_POST['editval']); + $blacklist = logs ($staffPerms[ 'editPlayer' ], $_POST[ 'column' ], $pid, $user, $dbcon, $player, $_POST[ 'editval' ]); $UpdateQ = "UPDATE players SET $_POST[column]='$blacklist' WHERE uid='$_POST[uid]'"; - break; + break; default: $message = 'ERROR'; - logIt($user, $message, $dbcon); - break; + logIt ($user, $message, $dbcon); + break; } -mysqli_query($dbcon, $UpdateQ); +mysqli_query ($dbcon, $UpdateQ); diff --git a/Backend/updateVehicles.php b/Backend/updateVehicles.php index c87ffae..04afb4c 100644 --- a/Backend/updateVehicles.php +++ b/Backend/updateVehicles.php @@ -1,49 +1,49 @@ fetch_object(); +$result = mysqli_query ($dbcon, $sql); +$vehicles = $result->fetch_object (); -switch ($_POST['column']) { +switch ($_POST[ 'column' ]) { case 'classname': - $classname = logs($staffPerms['vehicles'], $_POST['column'], $vehicles->pid, $user, $dbcon, $vehicles, $_POST['editval']); + $classname = logs ($staffPerms[ 'vehicles' ], $_POST[ 'column' ], $vehicles->pid, $user, $dbcon, $vehicles, $_POST[ 'editval' ]); $UpdateQ = "UPDATE vehicles SET $_POST[column]='$classname' WHERE id='$_POST[id]'"; - break; + break; case 'alive': - $alive = logs($staffPerms['vehicles'], $_POST['column'], $vehicles->pid, $user, $dbcon, $vehicles, $_POST['editval']); + $alive = logs ($staffPerms[ 'vehicles' ], $_POST[ 'column' ], $vehicles->pid, $user, $dbcon, $vehicles, $_POST[ 'editval' ]); $UpdateQ = "UPDATE vehicles SET $_POST[column]='$alive' WHERE id='$_POST[id]'"; - break; + break; case 'active': - $active = logs($staffPerms['vehicles'], $_POST['column'], $vehicles->pid, $user, $dbcon, $vehicles, $_POST['editval']); + $active = logs ($staffPerms[ 'vehicles' ], $_POST[ 'column' ], $vehicles->pid, $user, $dbcon, $vehicles, $_POST[ 'editval' ]); $UpdateQ = "UPDATE vehicles SET $_POST[column]='$active' WHERE id='$_POST[id]'"; - break; + break; case 'plate': - $plate = logs($staffPerms['vehicles'], $_POST['column'], $vehicles->pid, $user, $dbcon, $vehicles, $_POST['editval']); + $plate = logs ($staffPerms[ 'vehicles' ], $_POST[ 'column' ], $vehicles->pid, $user, $dbcon, $vehicles, $_POST[ 'editval' ]); $UpdateQ = "UPDATE vehicles SET $_POST[column]='$plate' WHERE id='$_POST[id]'"; - break; + break; default: $message = 'ERROR'; - logIt($user, $message, $dbcon); - break; + logIt ($user, $message, $dbcon); + break; } -mysqli_query($dbcon, $UpdateQ); +mysqli_query ($dbcon, $UpdateQ); diff --git a/addStaff.php b/addStaff.php index 17c9cd4..5329568 100755 --- a/addStaff.php +++ b/addStaff.php @@ -1,22 +1,22 @@ -
-

Staff Menu

- +
+

Staff Menu

+ -
-
+
+ - -



+ +
+


-User successfully added!
'; - } else { - echo ''; + echo ''; + } else { + echo ''; + } } -} -?> - -
- - - - - - - - - -'; - echo ''; - - echo ''; - echo ''; - -echo '
UsernamePasswordUpdate
'.""; - echo ''.""; - - echo ''."'; - - echo '
'; -?> - - -
- - - - - - - - - + ?> + +
+ + + + + + + + + + '; + echo ''; + + echo ''; + echo ''; + + echo '
UsernamePasswordUpdate
' . ""; + echo '' . ""; + + echo '' . "'; + + echo '
'; + ?> + + + + + + + + + + + + diff --git a/changePerms.php b/changePerms.php index 97456a0..6d665a8 100644 --- a/changePerms.php +++ b/changePerms.php @@ -1,40 +1,40 @@ fetch_object(); + $result = mysqli_query ($dbcon, $sql); + $user = $result->fetch_object (); $licences = $user->permissions; - $num = strpos($licences, $change['0']) + strlen($change['0']) + 2; + $num = strpos ($licences, $change[ '0' ]) + strlen ($change[ '0' ]) + 2; - if ($licences[$num] == 0) { - $licences[$num] = 1; - } elseif ($licences[$num] == 1) { - $licences[$num] = 0; + if ($licences[ $num ] == 0) { + $licences[ $num ] = 1; + } elseif ($licences[ $num ] == 1) { + $licences[ $num ] = 0; } $sql = "UPDATE `users` SET `permissions` = '$licences' WHERE ID = $staffId"; - $result = mysqli_query($dbcon, $sql); + $result = mysqli_query ($dbcon, $sql); } diff --git a/create.php b/create.php index eba49b4..35cfb48 100755 --- a/create.php +++ b/create.php @@ -1,96 +1,99 @@ -Admin Panel - Create - - - + Admin Panel - Create + + + - - + + - - - - - + + + + + - + -
-
- -
+
+ + + + diff --git a/editPlayer.php b/editPlayer.php index 21c40eb..9432d78 100644 --- a/editPlayer.php +++ b/editPlayer.php @@ -1,337 +1,342 @@ fetch_object(); +$result = mysqli_query ($dbcon, $sql); +$player = $result->fetch_object (); -$username = utf8_encode($player->name); -$pid = playerID($player); +$username = utf8_encode ($player->name); +$pid = playerID ($player); include 'header/header.php'; ?> -
-

Edit Player

- -
-
-
- -
-
- -
- > - > -
- - -
-
- - - -'; + echo '
'; + + echo "

Player Notes

"; - ?> -
- - - - - - - - - - -'; - } elseif ($row['warning'] == 3) { - echo ''; - } else { - echo ''; - } - - echo ''; - echo ''; - echo ''; - echo ''; -} -echo '
Added byNoteDate added
'.$row['staff_name'].' '.$row['note_text'].' '.$row['note_updated'].'
'; -echo '
'; -echo '
'; - -echo "
"; - - if ($player->civ_licenses !== '"[]"' && $player->civ_licenses !== '') { - $return = explode('],[', $player->civ_licenses); - - echo "
+ ?> +
+ + + + + + + + + + + '; + } elseif ($row[ 'warning' ] == 3) { + echo ''; + } else { + echo ''; + } + + echo ''; + echo ''; + echo ''; + echo ''; + } + echo '
Added byNoteDate added
' . $row[ 'staff_name' ] . ' ' . $row[ 'note_text' ] . ' ' . $row[ 'note_updated' ] . '
'; + echo '
'; + echo '
'; + + echo "
"; + + if ($player->civ_licenses !== '"[]"' && $player->civ_licenses !== '') { + $return = explode ('],[', $player->civ_licenses); + + echo "

Civ Licenses

"; - foreach ($return as $value) { - license($value, $staffPerms); - } - echo '
+ foreach ( $return as $value ) { + license ($value, $staffPerms); + } + echo '
'; - } -echo ''; + } + echo ''; -echo "
"; - if ($player->med_licenses !== '"[]"' && $player->med_licenses !== '[]') { - $return = explode('],[', $player->med_licenses); + echo "
"; + if ($player->med_licenses !== '"[]"' && $player->med_licenses !== '[]') { + $return = explode ('],[', $player->med_licenses); - echo "
+ echo "

Medic Licenses

"; - foreach ($return as $value) { - license($value, $staffPerms); - } - echo '
+ foreach ( $return as $value ) { + license ($value, $staffPerms); + } + echo '
'; - } -echo '
'; -echo "
"; - if ($player->cop_licenses !== '"[]"' && $player->cop_licenses !== '') { - $return = explode('],[', $player->cop_licenses); + } + echo '
'; + echo "
"; + if ($player->cop_licenses !== '"[]"' && $player->cop_licenses !== '') { + $return = explode ('],[', $player->cop_licenses); - echo "
+ echo "

Cop Licenses

"; - foreach ($return as $value) { - license($value, $staffPerms); - } - echo '
'; - } -echo '
'; -echo "
"; -echo '
'; - -if (isset($_POST['remove'])) { - if ($staffPerms['editPlayer'] == '1') { - $licReset = str_replace('1', '0', $player->civ_licenses); - $sql = "UPDATE `players` SET `civ_licenses`='$licReset' WHERE uid ='$uidPlayer'"; - $result = mysqli_query($dbcon, $sql); - - $message = 'Admin '.$user.' has removed all licenses from '.utf8_encode($player->name).'('.$pid.')'; - logIt($user, $message, $dbcon); - } -} -if (isset($_POST['give'])) { - $uidPlayer = $_POST['hidden']; - if ($staffPerms['editPlayer'] == '1') { - $licReset = str_replace('0', '1', $player->civ_licenses); - $sql = "UPDATE `players` SET `civ_licenses`='$licReset' WHERE uid ='$uidPlayer'"; - $result = mysqli_query($dbcon, $sql); - - $message = 'Admin '.$user.' has added all licenses to '.utf8_encode($player->name).'('.$pid.')'; - logIt($user, $message, $dbcon); - } -} -?> - - - + + +
+ + + -} - - - - - - - - - - - - + + + + diff --git a/functions.php b/functions.php index b34cb05..5e3c8a4 100644 --- a/functions.php +++ b/functions.php @@ -1,8 +1,7 @@ playerid != '' || $player->pid != '') { if ($player->playerid == '') { $pid = $player->pid; @@ -15,57 +14,53 @@ function playerID($player) } } -function remove($value) -{ - $value = replace('`', $value); - $value = replace('"[[', $value); - $value = replace(']]"', $value); +function remove($value) { + $value = replace ('`', $value); + $value = replace ('"[[', $value); + $value = replace (']]"', $value); return $value; } -function replace($string, $text) -{ - return str_replace($string, '', $text); +function replace($string, $text) { + return str_replace ($string, '', $text); } -function license($value, $staffPerms) -{ - $val = remove($value); - $newVal = explode(',', $val); - if ($newVal[1] == 1) { - $display = explode('_', $newVal[0]); - $displayN = $display['2']; - if ($staffPerms['editPlayer'] == '1') { - echo " '; +function license($value, $staffPerms) { + $val = remove ($value); + $newVal = explode (',', $val); + if ($newVal[ 1 ] == 1) { + $display = explode ('_', $newVal[ 0 ]); + $displayN = $display[ '2' ]; + if ($staffPerms[ 'editPlayer' ] == '1') { + echo " '; } else { - echo " '; + echo " '; } } else { - if ($newVal[0] != '') { - $display = explode('_', $newVal[0]); - $displayN = $display['2']; - if ($staffPerms['editPlayer'] == '1') { - echo " '; + if ($newVal[ 0 ] != '') { + $display = explode ('_', $newVal[ 0 ]); + $displayN = $display[ '2' ]; + if ($staffPerms[ 'editPlayer' ] == '1') { + echo " '; } else { - echo " '; + echo " '; } } } } -function guid($max, $pid) -{ +function guid($max, $pid) { if ($max != 2147483647) { $steamID = $pid; $temp = ''; - for ($i = 0; $i < 8; ++$i) { - $temp .= chr($steamID & 0xFF); + for ( $i = 0; $i < 8; ++$i ) { + $temp .= chr ($steamID & 0xFF); $steamID >>= 8; } - $return = md5('BE'.$temp); + $return = md5 ('BE' . $temp); return $return; } @@ -74,26 +69,24 @@ function guid($max, $pid) return $return; } -function logIt($admin, $log, $dbcon) -{ +function logIt($admin, $log, $dbcon) { $logQ = "INSERT INTO log (user,action,level) VALUES ('$admin','$log',1)"; - mysqli_query($dbcon, $logQ); + mysqli_query ($dbcon, $logQ); } -function filterTable($dbcon, $sqlget) -{ - $sqldata = mysqli_query($dbcon, $sqlget); +function filterTable($dbcon, $sqlget) { + $sqldata = mysqli_query ($dbcon, $sqlget); return $sqldata; } -function outputSelection($max, $column, $value, $uid) -{ +function outputSelection($max, $column, $value, $uid) { ++$max; echo '' ?> - $i"; } else { @@ -103,12 +96,11 @@ function outputSelection($max, $column, $value, $uid) echo ''; } -function logs($perms, $column, $pid, $user, $dbcon, $player, $val) -{ +function logs($perms, $column, $pid, $user, $dbcon, $player, $val) { if ($perms == '1') { if ($val != $player->$column) { - $message = 'Admin '.$user.' has changed '.utf8_encode($player->name).'('.$pid.')'.' '.$column.' from '.$player->$column.' to '.$val; - logIt($user, $message, $dbcon); + $message = 'Admin ' . $user . ' has changed ' . utf8_encode ($player->name) . '(' . $pid . ')' . ' ' . $column . ' from ' . $player->$column . ' to ' . $val; + logIt ($user, $message, $dbcon); $return = $val; @@ -116,8 +108,8 @@ function logs($perms, $column, $pid, $user, $dbcon, $player, $val) } } else { if ($val != $player->$column) { - $message = 'Admin '.$user.' tried to change '.utf8_encode($player->name).'('.$pid.')'.' '.$column.' from '.$player->$column.' to '.$val; - logIt($user, $message, $dbcon); + $message = 'Admin ' . $user . ' tried to change ' . utf8_encode ($player->name) . '(' . $pid . ')' . ' ' . $column . ' from ' . $player->$column . ' to ' . $val; + logIt ($user, $message, $dbcon); $return = $player->$column; diff --git a/gangs.php b/gangs.php index 5742b14..df82dc0 100755 --- a/gangs.php +++ b/gangs.php @@ -1,140 +1,152 @@ - - - - - - - - - - Admin Panel - Gangs - - - - - - - - - - - - - + + + + + + + + + + Admin Panel - Gangs + + + + + + + + + + + + + -
-

Gang Menu

- -
- -
- - - - - - - - - - - - -'; - echo ''; - echo ''; - - echo ''; -} - -echo '
OwnerNameMembersMax MembersBankActive
'.$row['owner'].' '.$row['name'].' ' ?> - ' > - '; - - echo '' ?> - - '; - - echo '' ?> - - '; - - - echo '' ?> - +
+

Gang Menu

+ +
'; - - echo '
'; -?> - - -
- - - - - - - - - - + $sqlget = 'SELECT * FROM gangs'; + $sqldata = mysqli_query ($dbcon, $sqlget) or die('Connection could not be established'); + + ?> +
+ + + + + + + + + + + + + '; + echo ''; + echo ''; + + echo ''; + } + + echo '
OwnerNameMembersMax MembersBankActive
' . $row[ 'owner' ] . ' ' . $row[ 'name' ] . ' ' ?> + '> + '; + + echo '' ?> + + '; + + echo '' ?> + + '; + + + echo '' ?> + + '; + + echo '
'; + ?> + + + + + + + + + + + + + diff --git a/header/header.php b/header/header.php index c8a6863..fd292d2 100644 --- a/header/header.php +++ b/header/header.php @@ -1,81 +1,85 @@ - - - - - - - + + + + + + + - Admin Panel - - - - - - - - - - + Admin Panel + + + + + + + + + +
-
- \ No newline at end of file diff --git a/help.php b/help.php index ac7e41a..ed3a6c4 100755 --- a/help.php +++ b/help.php @@ -1,82 +1,92 @@
-

Panel Help

- +

Panel Help

+ -
-
-

Players

-
-
-

The players tab has a filter bar, exactly the same as a search bar, this allows you to seach for a players name or UID.

-
-
+
+
+

Players

+
+
+

The players tab has a filter bar, exactly the same as a search bar, this allows you to seach for a + players name or UID.

+
+
-
-
-

Ban Menu

-
-
-

Ban menu, this allows you to ban players who are in/out of game, with a reason and a time. The time is scaled in minutes, 60 = 1 hour. Note - When a player is banned they will remain in the server so please kick them straight after!

-
-
+
+
+

Ban Menu

+
+
+

Ban menu, this allows you to ban players who are in/out of game, with a reason and a time. The time is + scaled in minutes, 60 = 1 hour. Note - When a player is banned they will remain in the server so please + kick them straight after!

+
+
-
-
-

Kick Menu

-
-
-

Kick player, this has two options, RCON kick and Server kick. Server kick comes up with every single player who is in your database and all you need to do it hit kick, obviously they have to be on the server for it to kick them.

-

RCON kick is a little more complicated however it does have the ability to give a reason for your kick. To kick someone you need the Battleye id for the player, this is found by clicking the battleye list button. This is the number you need to use to kick people from your server - Not their UID or thier GUID.

-
-
+
+
+

Kick Menu

+
+
+

Kick player, this has two options, RCON kick and Server kick. Server kick comes up with every single + player who is in your database and all you need to do it hit kick, obviously they have to be on the + server for it to kick them.

+

RCON kick is a little more complicated however it does have the ability to give a reason for your kick. + To kick someone you need the Battleye id for the player, this is found by clicking the battleye list + button. This is the number you need to use to kick people from your server - Not their UID or thier + GUID.

+
+
-
-
-

Log Menu

-
-
-

The logs tab shows you exactly which admin has done what at the exact time. Note - The timing will depend on where your database is situated!

-
-
+
+
+

Log Menu

+
+
+

The logs tab shows you exactly which admin has done what at the exact time. Note - The timing will depend + on where your database is situated!

+
+
-
-
-

Thanks!

-
-
-

The rest of the panel should hopefully be pretty self exploratory, however if you need any help then let me know! jasonhall96686@yahoo.com

-
-
+
+
+

Thanks!

+
+
+

The rest of the panel should hopefully be pretty self exploratory, however if you need any help then let + me know! jasonhall96686@yahoo.com

+
+
-
-
-
- + + + + - - - - - - - - - - + + + + + + + + + + diff --git a/home.php b/home.php index 88772d5..f510144 100755 --- a/home.php +++ b/home.php @@ -1,209 +1,216 @@ -
-

Dashboard

- - +

Dashboard

+ +
'; - echo "
"; - echo "

Players

"; - echo "

"; - echo '


There are currently '.$players.' players signed up on the server.

'; - echo '
'; - echo '
'; + echo "
"; + echo "

Players

"; + echo "

"; + echo '


There are currently ' . $players . ' players signed up on the server.

'; + echo '
'; + echo '
'; - echo '
'; + echo '
'; echo '
'; //Vehicles - echo "
"; - echo "

Vehicles

"; - echo "

"; - echo '


There are currently '.$vehicles.' vehicles.

'; - echo '
'; - echo '
'; + echo "
"; + echo "

Vehicles

"; + echo "

"; + echo '


There are currently ' . $vehicles . ' vehicles.

'; + echo '
'; + echo '
'; - echo '
'; + echo ''; echo '
'; //? -$money = '$'.number_format($money, 2); - - echo "
"; - echo "

Total Money

"; - echo "

"; - echo '


There is a total of '.$money.' on the server.

'; - echo '
'; - echo '
'; - - echo '
'; - echo ''; - echo '
'; + $money = '$' . number_format ($money, 2); + + echo "
"; + echo "

Total Money

"; + echo "

"; + echo '


There is a total of ' . $money . ' on the server.

'; + echo '
'; + echo '
'; + + echo '
'; + echo ''; + echo '
'; echo '
'; - echo "
"; - echo "

Restart Server

"; - echo "

"; - echo '
'; - echo "
"."
'; - echo '
'; - echo '
'; - echo ''; + echo "
"; + echo "

Restart Server

"; + echo "

"; + echo '
'; + echo "
" . "
'; + echo '
'; + echo '
'; + echo ''; - echo '
'; + echo '
'; echo '
'; - echo "
"; - echo "

Global Message

"; - echo "

"; - echo '
'; - echo "
"."

"; - echo "
"."
'; - echo '
'; - echo '
'; - echo ''; - - echo '
'; + echo "
"; + echo "

Global Message

"; + echo "

"; + echo '
'; + echo "
" . "

"; + echo "
" . "
'; + echo '
'; + echo '
'; + echo ''; + + echo ''; echo '
'; - echo "
"; - echo "

Stop Server

"; - echo "

"; - echo '
'; - echo "
"."
'; - echo '
'; - echo '
'; - echo ''; - - echo '
'; - echo ''; - echo '
'; - echo '
'; - echo '
'; - echo '
'; - - echo "
"; - echo "

Help

"; - echo "

For general help on the panel!

"; - echo "

"; - echo '
'; - echo "
"."
'; - echo '
'; - echo '
'; - echo ''; - - echo '
'; + echo "
"; + echo "

Stop Server

"; + echo "

"; + echo '
'; + echo "
" . "
'; + echo '
'; + echo '
'; + echo ''; + + echo '
'; + echo ''; + echo '
'; + echo '
'; + echo '
'; echo '
'; -if (isset($_POST['send'])) { - if ($staffPerms['globalMessage'] == '1') { - $send = $_POST['global']; - $_SESSION['send'] = $send; - header('Location: rCon/rcon-mess.php'); - $message = 'Admin '.$user.' has sent a global message ('.$send.')'; - logIt($user, $message, $dbcon); - } else { - header('Location: lvlError.php'); - die(); + echo "
"; + echo "

Help

"; + echo "

For general help on the panel!

"; + echo "

"; + echo '
'; + echo "
" . "
'; + echo '
'; + echo '
'; + echo ''; + + echo '
'; + echo '
'; + + if (isset($_POST[ 'send' ])) { + if ($staffPerms[ 'globalMessage' ] == '1') { + $send = $_POST[ 'global' ]; + $_SESSION[ 'send' ] = $send; + header ('Location: rCon/rcon-mess.php'); + $message = 'Admin ' . $user . ' has sent a global message (' . $send . ')'; + logIt ($user, $message, $dbcon); + } else { + header ('Location: lvlError.php'); + die(); + } } -} -if (isset($_POST['restart'])) { - if ($staffPerms['restartServer'] == '1') { - $message = 'Admin '.$user.' has restarted the server.'; - logIt($user, $message, $dbcon); - header('Location: rCon/rcon-restart.php'); - } else { - header('Location: lvlError.php'); - die(); + if (isset($_POST[ 'restart' ])) { + if ($staffPerms[ 'restartServer' ] == '1') { + $message = 'Admin ' . $user . ' has restarted the server.'; + logIt ($user, $message, $dbcon); + header ('Location: rCon/rcon-restart.php'); + } else { + header ('Location: lvlError.php'); + die(); + } + } + + if (isset($_POST[ 'stop' ])) { + if ($staffPerms[ 'stopServer' ] == '1') { + $message = 'Admin ' . $user . ' has stopped the server.'; + logIt ($user, $message, $dbcon); + header ('Location: rCon/rcon-stop.php'); + } else { + header ('Location: lvlError.php'); + die(); + } } -} -if (isset($_POST['stop'])) { - if ($staffPerms['stopServer'] == '1') { - $message = 'Admin '.$user.' has stopped the server.'; - logIt($user, $message, $dbcon); - header('Location: rCon/rcon-stop.php'); - } else { - header('Location: lvlError.php'); + if (isset($_POST[ 'help' ])) { + header ('Location: help.php'); die(); } -} + ob_end_flush (); + ?> + -if (isset($_POST['help'])) { - header('Location: help.php'); - die(); -} -ob_end_flush(); -?> - -
- - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/houses.php b/houses.php index d50eb5c..3b0d2a1 100755 --- a/houses.php +++ b/houses.php @@ -1,107 +1,110 @@
-

House Menu

- +

House Menu

+ -
- -
- - - - - - - - - - - -'; - echo ''; - echo ''; - echo ''; - - echo ''; -} - -echo '
IDOwner UIDHouse PosOwnedContainers
'.$row['id'].''.$row['pid'].' '.$row['pos'].' ' ?> - +
'; - echo '
'; - echo '
'."'; - echo "".''; - echo ''; - - echo '
'; -?> - - - - -
- - - - - - - - - - - - - - + $sqlget = 'SELECT * FROM houses'; + $sqldata = mysqli_query ($dbcon, $sqlget) or die('Connection could not be established'); + + ?> +
+ + + + + + + + + + + + '; + echo ''; + echo ''; + echo ''; + + echo ''; + } + + echo '
IDOwner UIDHouse PosOwnedContainers
' . $row[ 'id' ] . '' . $row[ 'pid' ] . ' ' . $row[ 'pos' ] . ' ' ?> + + '; + echo '
'; + echo '
' . "'; + echo "" . ''; + echo ''; + + echo '
'; + ?> + + + + + + + + + + + + + + + + + + + diff --git a/index.php b/index.php index 2911454..5cc5517 100644 --- a/index.php +++ b/index.php @@ -1,107 +1,113 @@ = 5) { - header('Location: locked.php'); +if (isset($_SESSION[ 'failedLogin' ])) { + if ($_SESSION[ 'failedLogin' ] >= 5) { + header ('Location: locked.php'); die(); } } -if (!file_exists('verifyPanel.php')) { - header('Location: create.php'); +if (!file_exists ('verifyPanel.php')) { + header ('Location: create.php'); die(); } ?> -Admin Panel - Login - - - + Admin Panel - Login + + + - - - - - - - - - - - + + + + + + + + +
- -
+ +
+
+
-
-
- + if (isset($_COOKIE[ 'fail' ]) && $_COOKIE[ 'fail' ] == '1') { + echo '
Username or password incorrect.
'; + } + ?> + +
- + - + diff --git a/locked.php b/locked.php index dfbdf60..a58d3cc 100755 --- a/locked.php +++ b/locked.php @@ -1,79 +1,89 @@ -Admin Panel - Locked - - - - + Admin Panel - Locked + + + + - - - - - - - + + + + + + + - +
- - - + + diff --git a/login.php b/login.php index 426c9f1..b95f34b 100755 --- a/login.php +++ b/login.php @@ -1,79 +1,79 @@ fetch_object(); + $user = $sqldata->fetch_object (); - $_SESSION['failedLogin'] = $user->failed; + $_SESSION[ 'failedLogin' ] = $user->failed; if ($user->failed == 5) { echo 'something went wrong'; - header('Location: locked.php'); + header ('Location: locked.php'); die(); } } $sqlget = "SELECT * FROM users WHERE username ='$username' "; - $res = mysqli_query($dbconL, $sqlget); + $res = mysqli_query ($dbconL, $sqlget); - $numrows = mysqli_num_rows($res); + $numrows = mysqli_num_rows ($res); if ($numrows != 0) { - while ($row = mysqli_fetch_assoc($res)) { - $dbusername = $row['username']; - $dbpassword = $row['password']; - - if ($row['permissions'] !== '"[]"' && $row['permissions'] !== '') { - $return = explode('],[', $row['permissions']); - - foreach ($return as $value) { - $val = remove($value); - $newVal = explode(',', $val); - if ($newVal[1] == 1) { - $perms[$newVal[0]] = 1; + while ($row = mysqli_fetch_assoc ($res)) { + $dbusername = $row[ 'username' ]; + $dbpassword = $row[ 'password' ]; + + if ($row[ 'permissions' ] !== '"[]"' && $row[ 'permissions' ] !== '') { + $return = explode ('],[', $row[ 'permissions' ]); + + foreach ( $return as $value ) { + $val = remove ($value); + $newVal = explode (',', $val); + if ($newVal[ 1 ] == 1) { + $perms[ $newVal[ 0 ] ] = 1; } else { - $perms[$newVal[0]] = 0; + $perms[ $newVal[ 0 ] ] = 0; } } } @@ -81,59 +81,59 @@ //block if ($username == $dbusername && $encPass == $dbpassword) { - if (isset($_COOKIE['conecFail'])): - setcookie('conecFail', '', time() - 7000000, '/'); + if (isset($_COOKIE[ 'conecFail' ])): + setcookie ('conecFail', '', time () - 7000000, '/'); endif; - setcookie('fail', '0'); + setcookie ('fail', '0'); - if (isset($_COOKIE['fail'])): - setcookie('fail', '', time() - 7000000, '/'); + if (isset($_COOKIE[ 'fail' ])): + setcookie ('fail', '', time () - 7000000, '/'); endif; $_SESSION = array(); - $_SESSION['logged'] = 1; - $_SESSION['user'] = $dbusername; - $_SESSION['perms'] = $perms; - $_SESSION['failedLogin'] = 0; + $_SESSION[ 'logged' ] = 1; + $_SESSION[ 'user' ] = $dbusername; + $_SESSION[ 'perms' ] = $perms; + $_SESSION[ 'failedLogin' ] = 0; $sqlget = "UPDATE access SET failed = 0 WHERE address = '$_SERVER[REMOTE_ADDR]'"; - $res = mysqli_query($dbconL, $sqlget); + $res = mysqli_query ($dbconL, $sqlget); - if ($_SESSION['failedLogin'] >= 5) { - header('Location: locked.php'); + if ($_SESSION[ 'failedLogin' ] >= 5) { + header ('Location: locked.php'); die(); } else { - header('Location: home.php'); + header ('Location: home.php'); die(); } } else { echo 'Your user/password is incorrect!'; - setcookie('fail', '1'); - $_SESSION['failedLogin'] = $_SESSION['failedLogin'] + 1; - if ($_SESSION['failedLogin'] >= 5) { - header('Location: locked.php'); + setcookie ('fail', '1'); + $_SESSION[ 'failedLogin' ] = $_SESSION[ 'failedLogin' ] + 1; + if ($_SESSION[ 'failedLogin' ] >= 5) { + header ('Location: locked.php'); die(); } else { - header('Location: index.php'); + header ('Location: index.php'); die(); } }//block } else { echo 'That user does not exist!'; - setcookie('fail', '1'); - $_SESSION['failedLogin'] = $_SESSION['failedLogin'] + 1; - if ($_SESSION['failedLogin'] >= 5) { - header('Location: locked.php'); + setcookie ('fail', '1'); + $_SESSION[ 'failedLogin' ] = $_SESSION[ 'failedLogin' ] + 1; + if ($_SESSION[ 'failedLogin' ] >= 5) { + header ('Location: locked.php'); die(); } else { - header('Location: index.php'); + header ('Location: index.php'); die(); } } } else { echo 'please enter username/password!'; - setcookie('fail', '1'); - header('Location: index.php'); + setcookie ('fail', '1'); + header ('Location: index.php'); die(); } diff --git a/logout.php b/logout.php index e6c8152..6bb6024 100755 --- a/logout.php +++ b/logout.php @@ -1,18 +1,18 @@
-

Log Menu

- +

Log Menu

+ - $amount) { - $addPage = $amount; -} - -?> -
- - - - - - - - - -'; - echo ''; - - echo ''; - echo ''; - echo ''; - - echo ''; - echo ''; -} - -echo '
Date/TimeAdmin NameAction
'.$row['date_time'].''.$row['user'].' '.$row['action'].'
'; -?> - - - -
- - - - - - - - - - - - - - +
+ + + + + + + + + + '; + echo ''; + + echo ''; + echo ''; + echo ''; + + echo ''; + echo ''; + } + + echo '
Date/TimeAdmin NameAction
' . $row[ 'date_time' ] . '' . $row[ 'user' ] . ' ' . $row[ 'action' ] . '
'; + ?> + + + + + + + + + + + + + + + + + + diff --git a/lvlError.php b/lvlError.php index 6c4a10c..2d7c246 100755 --- a/lvlError.php +++ b/lvlError.php @@ -1,34 +1,34 @@ -
-

Unauthorised

- -
- - - +
+

Unauthorised

+ +
+ + + - - - - - - - - + + + + + + + + diff --git a/notes.php b/notes.php index ca34ea9..d3c561a 100755 --- a/notes.php +++ b/notes.php @@ -1,131 +1,132 @@
-

Notes Menu

- +

Notes Menu

+ -
-
- -
-
+
+
+ +
+
-
-
+
+ + -echo ''; -?> - - - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/notesView.php b/notesView.php index 3b4f0f5..f7692da 100755 --- a/notesView.php +++ b/notesView.php @@ -1,147 +1,148 @@
-

Notes View

- +

Notes View

+ -
-
- -
-
+
+
+ +
+
-
-
+
+ + -echo ''; -?> - - - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/permissions.php b/permissions.php index e4f6cc7..85837ed 100644 --- a/permissions.php +++ b/permissions.php @@ -1,110 +1,106 @@ fetch_object(); +$result = mysqli_query ($dbcon, $sql); +$user = $result->fetch_object (); include 'header/header.php'; ?> -
-

Permission Menu

- - -
-
- -
-
-

- +

Permission Menu

+ + +
+
+ +
+
+

+ "; + echo "
"; - if ($user->permissions !== '"[]"' && $user->permissions !== '') { - $return = explode('],[', $user->permissions); + if ($user->permissions !== '"[]"' && $user->permissions !== '') { + $return = explode ('],[', $user->permissions); - echo "
+ echo "

Permissions

"; - foreach ($return as $value) { - $val = remove($value); - $newVal = explode(',', $val); - if ($newVal[1] == 1) { - echo " '; - } else { - echo " '; - } - } - - echo '
+ foreach ( $return as $value ) { + $val = remove ($value); + $newVal = explode (',', $val); + if ($newVal[ 1 ] == 1) { + echo " '; + } else { + echo " '; + } + } + + echo '
'; - } -echo '
'; -echo '
'; -?> - + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/players.php b/players.php index cac8439..7746c7b 100755 --- a/players.php +++ b/players.php @@ -1,18 +1,18 @@
-

Player Menu

- -
+

Player Menu

+ +
"; - case $staffPerms['unban'] == '1': + case $staffPerms[ 'unban' ] == '1': echo "
"; - case $staffPerms['kick'] == '1': + case $staffPerms[ 'kick' ] == '1': echo "
"; - case $staffPerms['notes'] == '1': + case $staffPerms[ 'notes' ] == '1': echo "
@@ -122,98 +122,124 @@ } ?> - -
+ -
+
-
- - - - - - - - - - - - - - - - - +
+
IDPlayer NameAliasUIDGUID
View Stats
+ + + + + + + + + + + + + + + + '; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; echo ''; - echo "'; - echo "'; + echo ''; + echo "'; + echo "'; echo ''; echo ''; } echo '
IDPlayer NameAliasUIDGUID +
+
+
+
+
+
+
+
+
+
+
+
+
+
View Stats
'.$row['uid'].''.utf8_encode($row['name']).' '.utf8_encode($alias[1]).' '.$pid.' '.$return.'' . $row[ 'uid' ] . '' . utf8_encode ($row[ 'name' ]) . ' ' . utf8_encode ($alias[ 1 ]) . ' ' . $pid . ' ' . $return . '' ?> - + '; echo '' ?> - + '; - outputSelection($maxCop, 'coplevel', $row['coplevel'], $row['uid']); - outputSelection($maxMedic, 'mediclevel', $row['mediclevel'], $row['uid']); - outputSelection($maxAdmin, 'adminlevel', $row['adminlevel'], $row['uid']); + outputSelection ($maxCop, 'coplevel', $row[ 'coplevel' ], $row[ 'uid' ]); + outputSelection ($maxMedic, 'mediclevel', $row[ 'mediclevel' ], $row[ 'uid' ]); + outputSelection ($maxAdmin, 'adminlevel', $row[ 'adminlevel' ], $row[ 'uid' ]); echo '
'; - echo '
'."".' ".' ' . "" . ' " . '
'; ?> -
+ + + + + + diff --git a/profile.php b/profile.php index a5c6e74..f11a594 100755 --- a/profile.php +++ b/profile.php @@ -1,103 +1,108 @@ -
-

Profile Menu

- +
+

Profile Menu

+ - fetch_object(); - $passR = $dbPass->password; + if ($_POST[ 'pass1' ] != '') { + $pass1 = $_POST[ 'pass1' ]; + } else { + $fail = true; + } + if ($fail === false) { + loginconnect (); - if ($passR == $curPass) { - if ($pass == $pass1) { - //same + $SelectQ = "SELECT * FROM users WHERE username = '$user'"; + $result = mysqli_query ($dbconL, $SelectQ); + $dbPass = $result->fetch_object (); + $passR = $dbPass->password; - echo ''; + if ($passR == $curPass) { + if ($pass == $pass1) { + //same - $pass = hash('sha256', $pass); + echo ''; - $UpdateQ = "UPDATE users SET password='$pass' WHERE username='$user'"; - mysqli_query($dbconL, $UpdateQ); - } else { - //not same + $pass = hash ('sha256', $pass); - echo ''; - } + $UpdateQ = "UPDATE users SET password='$pass' WHERE username='$user'"; + mysqli_query ($dbconL, $UpdateQ); } else { - echo''; + //not same + + echo ''; } } else { - echo''; + echo ''; } - }//end of update - ?> - -
-
-

User Info

-
-
-

-
-
User Pic -
- -
-

Current Password

- -

Password

- -

Repeat Password

- -
- -
-
-
-
- - - - - - + } else { + echo ''; + } + }//end of update + ?> + +
+
+

User Info

+
+
+

+
+
User Pic +
+ +
+

Current Password

+ +

Password

+ +

Repeat Password

+ +
+ +
+
+
+
+ + + + + + diff --git a/rCon/Kmenu.php b/rCon/Kmenu.php index 11f33b1..5eb34dc 100755 --- a/rCon/Kmenu.php +++ b/rCon/Kmenu.php @@ -1,17 +1,17 @@ - - - - - - - - - - Admin Panel - Kick Menu - - - - - - - - - - - - - - - + + + + + + + + + + Admin Panel - Kick Menu + + + + + + + + + + + + + + + -
-

Kick Menu

- +
+

Kick Menu

+ -
-
+
+ - -
+ +
-
-
+
+ -



+ +
+


-
+
-
-
- -
-
+
+
+ +
+
-
-
- -
-
+
+
+ +
+
+
+
-
- - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/rCon/Kplayer.php b/rCon/Kplayer.php index 0ce69bc..1fd35af 100755 --- a/rCon/Kplayer.php +++ b/rCon/Kplayer.php @@ -1,17 +1,17 @@ @@ -19,26 +19,29 @@ - - - - - - - - - - Admin Panel - Kick - - - - - - - - - - + + + + + + + + + + Admin Panel - Kick + + + + + + + + + + -
-

Kick Menu

- +
+

Kick Menu

+ -
-
+
+ - -
+ +
-
-
+
+ -



- +
+


+ This is a whitelisted staff member!
'; + $message = 'Admin ' . $user . ' tried to kick a whitelisted staff member - ' . $uid; + logIt ($user, $message, $dbcon); + } else { + $_SESSION[ 'guid' ] = $guid; + $_SESSION[ 'reason' ] = $reason; + + header ('Location: rcon-kick.php'); } - } - if ($whitelist) { - echo ''; - $message = 'Admin '.$user.' tried to kick a whitelisted staff member - '.$uid; - logIt($user, $message, $dbcon); } else { - $_SESSION['guid'] = $guid; - $_SESSION['reason'] = $reason; - - header('Location: rcon-kick.php'); + echo ''; } - } else { - echo ''; } -} -?> - -
- - - - - - - - - - -'; - echo ''; - - echo ''; - echo ''; - -echo '
Battleye IDUIDReasonUpdate
'.""; - echo ''.""; - echo ''.""; - - echo ''."'; - - echo '
'; -?> -

To use the kick feature you need to find the player ID, this is found by pressing the battleye list and typing in the [#] value. This is betwen 0-amount of players on server. So please check, this is NOT uid or GUID!

- - -
- - - - - - - - - - - - - - + ?> + +
+ + + + + + + + + + + '; + echo ''; + + echo ''; + echo ''; + + echo '
Battleye IDUIDReasonUpdate
' . ""; + echo '' . ""; + echo '' . ""; + + echo '' . "'; + + echo '
'; + ?> +

To use the kick feature you need to find the player ID, this is found by pressing the battleye list and + typing in the [#] value. This is betwen 0-amount of players on server. So please check, this is NOT uid + or GUID!

+ + + + + + + + + + + + + + + + + diff --git a/rCon/SKPlayerv1.php b/rCon/SKPlayerv1.php index 22b3ca3..ae2cf7c 100755 --- a/rCon/SKPlayerv1.php +++ b/rCon/SKPlayerv1.php @@ -1,19 +1,19 @@ @@ -21,147 +21,154 @@ - - - - - - - - - - Admin Panel - Kick - - - - - - - - - - - - - + + + + + + + + + + Admin Panel - Kick + + + + + + + + + + + + + -
-

Kick Menu

- +
+

Kick Menu

+ -
-
+
+ - -
+ +
-
-
+
+ -



- -
- - - - - - - - - - -This is a whitelisted staff member!'; - $message = 'Admin '.$user.' tried to kick a whitelisted staff member - '.$guid; - logIt($user, $message, $dbcon); - } else { - $name = $_POST['hiddenName']; - $_SESSION['SKguid'] = $guid; - - $message = 'Admin '.$user.' has kicked '.$player->name.'('.$guid.')'; - logIt($user, $message, $dbcon); - header('Location: rcon-Skick.php'); - } -} - -$sqlget = 'SELECT * FROM players'; -$sqldata = mysqli_query($dbcon, $sqlget) or die('Connection could not be established'); - -while ($row = mysqli_fetch_array($sqldata, MYSQLI_ASSOC)) { - if ($row['playerid'] != '' || $row['pid'] != '') { - if ($row['playerid'] == '') { - $pid = $row['pid']; - } else { - $pid = $row['playerid']; - } - } - - echo ''; - echo ''; - - echo "'; ?> - + + +


+ +
+
NameAliasUIDKick
".''; - echo ''.$row['name'].' - '; ?> - Toggle Aliases - - ' ?> -
- -
- -
+ + + + + + + + + + This is a whitelisted staff member!'; + $message = 'Admin ' . $user . ' tried to kick a whitelisted staff member - ' . $guid; + logIt ($user, $message, $dbcon); + } else { + $name = $_POST[ 'hiddenName' ]; + $_SESSION[ 'SKguid' ] = $guid; + + $message = 'Admin ' . $user . ' has kicked ' . $player->name . '(' . $guid . ')'; + logIt ($user, $message, $dbcon); + header ('Location: rcon-Skick.php'); + } + } + + $sqlget = 'SELECT * FROM players'; + $sqldata = mysqli_query ($dbcon, $sqlget) or die('Connection could not be established'); + + while ($row = mysqli_fetch_array ($sqldata, MYSQLI_ASSOC)) { + if ($row[ 'playerid' ] != '' || $row[ 'pid' ] != '') { + if ($row[ 'playerid' ] == '') { + $pid = $row[ 'pid' ]; + } else { + $pid = $row[ 'playerid' ]; + } + } + + echo ''; + echo ''; + + echo "'; ?> + '.$pid.' '; - echo ''; + echo ''; echo ''; -} + } -echo '
NameAliasUIDKick
" . ''; + echo '' . $row[ 'name' ] . ' + '; ?> + Toggle Aliases + + ' ?> +
+ +
+ +
'."'; - echo "".''; + echo '' . $pid . ' ' . "'; + echo "" . ''; echo '
'; -?> -


- - -
-
-
- - - - - - - - - - - - + echo ''; + ?> +


+ + + + + + + + + + + + + + + + + diff --git a/rCon/header/header.php b/rCon/header/header.php index 3f1a3f7..08ec083 100644 --- a/rCon/header/header.php +++ b/rCon/header/header.php @@ -1,40 +1,41 @@
-
- +
+ diff --git a/rCon/player.php b/rCon/player.php index 314c4e7..2ccd5df 100755 --- a/rCon/player.php +++ b/rCon/player.php @@ -1,17 +1,17 @@ @@ -19,129 +19,136 @@ - - - - - - - - - - Admin Panel - Ban - - - - - - - - - - - - - - + + + + + + + + + + Admin Panel - Ban + + + + + + + + + + + + + + -
-

Ban Menu

- +
+

Ban Menu

+ -
-
+
+ - -
+ +
-
-
+
+ -



- +
+


+ This is a whitelisted staff member!
'; - $message = 'Admin '.$user.' tried to ban a whitelisted staff member - '.$guid; - logIt($user, $message, $dbcon); - } else { - $_SESSION['guid'] = $guid; - $_SESSION['reason'] = $reason; - $_SESSION['time'] = $time; - - if ($_POST['guid'] != '') { - $message = 'Admin '.$user.' has banned '.$guid.' for '.$time.' minutes under the reason of ('.$reason.')'; - logIt($user, $message, $dbcon); - header('Location: rcon-ban.php'); + if ($whitelist) { + echo ''; + $message = 'Admin ' . $user . ' tried to ban a whitelisted staff member - ' . $guid; + logIt ($user, $message, $dbcon); + } else { + $_SESSION[ 'guid' ] = $guid; + $_SESSION[ 'reason' ] = $reason; + $_SESSION[ 'time' ] = $time; + + if ($_POST[ 'guid' ] != '') { + $message = 'Admin ' . $user . ' has banned ' . $guid . ' for ' . $time . ' minutes under the reason of (' . $reason . ')'; + logIt ($user, $message, $dbcon); + header ('Location: rcon-ban.php'); + } } } -} -?> - -
- - - - - - - - - - -'; -echo ''; - -echo ''; -echo ''; - -echo '
Battle Eye GUIDReasonTimeUpdate
'.""; -echo ''.""; -echo ''.""; - -echo ''."'; - -echo '
'; -?> -




To use the ban feature, batteye needs to use the GUID and not a player UID
NOTE: if the player is currently on the server please make sure you kick them else they will be banned however still playing until they have left!

-

0 - Perm Ban, and the time is scaled in minutes!

- - -
-
-
-
- - - - - - - - - - - + ?> + +
+ + + + + + + + + + + '; + echo ''; + + echo ''; + echo ''; + + echo '
Battle Eye GUIDReasonTimeUpdate
' . ""; + echo '' . ""; + echo '' . ""; + + echo '' . "'; + + echo '
'; + ?> +




To use the ban feature, batteye needs to use the GUID and not a player UID
NOTE: if the + player is currently on the server please make sure you kick them else they will be banned however still + playing until they have left!

+

0 - Perm Ban, and the time is scaled in minutes!

+ + + + + + + + + + + + + + + + + diff --git a/rCon/rcon-Skick.php b/rCon/rcon-Skick.php index 3e5a140..2866e1d 100755 --- a/rCon/rcon-Skick.php +++ b/rCon/rcon-Skick.php @@ -1,33 +1,33 @@




'; -$command = '#kick '.$uid; +$command = '#kick ' . $uid; echo $command; -$kick = $rcon->command($command); +$kick = $rcon->command ($command); -header('Location: ../players.php'); +header ('Location: ../players.php'); diff --git a/rCon/rcon-ban.php b/rCon/rcon-ban.php index 7f3ea0e..5e078fc 100755 --- a/rCon/rcon-ban.php +++ b/rCon/rcon-ban.php @@ -1,39 +1,39 @@ '; - $reason = $_SESSION['reason']; + $reason = $_SESSION[ 'reason' ]; echo $reason; echo '
'; - $time = $_SESSION['time']; + $time = $_SESSION[ 'time' ]; if ($time == '') { $time = 0; @@ -42,11 +42,11 @@ echo $time; echo '
'; - $intTime = (int) $time; + $intTime = (int)$time; echo $intTime; - $addBan = $rcon->add_ban($guid, $reason, $intTime); + $addBan = $rcon->add_ban ($guid, $reason, $intTime); - header('Location: player.php'); + header ('Location: player.php'); } diff --git a/rCon/rcon-check.php b/rCon/rcon-check.php index 9b59dcc..ad08706 100755 --- a/rCon/rcon-check.php +++ b/rCon/rcon-check.php @@ -1,174 +1,176 @@ get_players(); -preg_match_all("#(\d+)\s+(\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}:\d+\b)\s+(\d+)\s+([0-9a-fA-F]+)\(\w+\)\s([\S ]+)$#im", $check, $players); +$check = $rcon->get_players (); +preg_match_all ("#(\d+)\s+(\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}:\d+\b)\s+(\d+)\s+([0-9a-fA-F]+)\(\w+\)\s([\S ]+)$#im", $check, $players); -$bansRaw = $rcon->get_bans(); -preg_match_all("#(\d+)\s+([0-9a-fA-F]+)\s([perm|\d]+)\s([\S ]+)$#im", $bansRaw, $str); +$bansRaw = $rcon->get_bans (); +preg_match_all ("#(\d+)\s+([0-9a-fA-F]+)\s([perm|\d]+)\s([\S ]+)$#im", $bansRaw, $str); ?> - - - - - - - - - - Admin Panel - Battleye - - - - - - - + + + + + + + + + + Admin Panel - Battleye + + + + + + + - - -
-
- - - - - - - - - - - - + + + + + + + + + diff --git a/rCon/rcon-kick.php b/rCon/rcon-kick.php index 60426f6..2b0eb73 100755 --- a/rCon/rcon-kick.php +++ b/rCon/rcon-kick.php @@ -1,39 +1,39 @@ '; - $reason = $_SESSION['reason']; + $reason = $_SESSION[ 'reason' ]; echo $reason; echo '
'; - $addBan = $rcon->kick_player($guid, $reason); + $addBan = $rcon->kick_player ($guid, $reason); - header('Location: ../players.php'); + header ('Location: ../players.php'); } diff --git a/rCon/rcon-mess.php b/rCon/rcon-mess.php index 0cb8a7a..bdb2edd 100755 --- a/rCon/rcon-mess.php +++ b/rCon/rcon-mess.php @@ -1,29 +1,29 @@ say_global($mess); - header('Location: ../home.php'); + $mess = $rcon->say_global ($mess); + header ('Location: ../home.php'); } diff --git a/rCon/rcon-restart.php b/rCon/rcon-restart.php index 65f35e0..481a6ee 100755 --- a/rCon/rcon-restart.php +++ b/rCon/rcon-restart.php @@ -1,28 +1,28 @@ command($command); +$restart = $rcon->command ($command); -header('Location: ../home.php'); +header ('Location: ../home.php'); diff --git a/rCon/rcon-stop.php b/rCon/rcon-stop.php index 8727332..516672a 100755 --- a/rCon/rcon-stop.php +++ b/rCon/rcon-stop.php @@ -1,26 +1,26 @@ command($command); +$stop = $rcon->command ($command); -header('Location: ../home.php'); +header ('Location: ../home.php'); diff --git a/rCon/rcon-unBan.php b/rCon/rcon-unBan.php index 38c4a38..f127b5b 100755 --- a/rCon/rcon-unBan.php +++ b/rCon/rcon-unBan.php @@ -1,32 +1,32 @@ remove_ban($banid); + $delBan = $rcon->remove_ban ($banid); - header('Location: unBan.php'); + header ('Location: unBan.php'); } diff --git a/rCon/unBan.php b/rCon/unBan.php index 67188c0..38bd7e2 100755 --- a/rCon/unBan.php +++ b/rCon/unBan.php @@ -1,127 +1,133 @@ - - - - - - - - - - Admin Panel - UnBan - - - - - - - - - - - - - - + + + + + + + + + + Admin Panel - UnBan + + + + + + + + + + + + + + -
-

UnBan Menu

- +
+

UnBan Menu

+ -
-
+
+ - -
+ +
-
-
+
+ -



- -
- - - - - - - - - -'; - echo ''; - - echo ''; - echo ''; -echo '
Ban IDGUIDUpdate
'.""; - echo ''.""; - - echo ''."'; - - echo '
'; - -if (isset($_POST['update'])) { - $banid = $_POST['banid']; - $guidUBan = $_POST['guid']; - - $_SESSION['banid'] = $banid; - $_SESSION['guidUBan'] = $guidUBan; - - if ($guidUBan != '' and $banid != '') { - $message = 'Admin '.$user.' has unbanned '.$guidUBan; - logIt($user, $message, $dbcon); - header('Location: rcon-unBan.php'); - } -} -?> -




To unban a player you will need to get the ban ID from the Battleye List, and their GUID from the player menu!

- - - -
-
-
-
- - - - - - - - - - - + +
+


+ +
+ + + + + + + + + + '; + echo ''; + + echo ''; + echo ''; + echo '
Ban IDGUIDUpdate
' . ""; + echo '' . ""; + + echo '' . "'; + + echo '
'; + + if (isset($_POST[ 'update' ])) { + $banid = $_POST[ 'banid' ]; + $guidUBan = $_POST[ 'guid' ]; + + $_SESSION[ 'banid' ] = $banid; + $_SESSION[ 'guidUBan' ] = $guidUBan; + + if ($guidUBan != '' and $banid != '') { + $message = 'Admin ' . $user . ' has unbanned ' . $guidUBan; + logIt ($user, $message, $dbcon); + header ('Location: rcon-unBan.php'); + } + } + ?> +




To unban a player you will need to get the ban ID from the Battleye List, and their GUID from + the player menu!

+ + + + + + + + + + + + + + + + + + diff --git a/reimbursement.php b/reimbursement.php index 6eea1b7..476d522 100755 --- a/reimbursement.php +++ b/reimbursement.php @@ -1,21 +1,21 @@ "; - header('Location: lvlError.php'); + header ('Location: lvlError.php'); die(); } @@ -23,99 +23,98 @@ ?> - -
-

Reimbursement Logs

- - -
- - - - - - - - - - -'; - echo ''; - - echo ''; - echo ''; - -echo '
Player UIDAmount GivenComp ReasonAdd Log
'.""; - echo ''.""; - echo ''.""; - echo ''."'; - - echo '
'; - -if (isset($_POST['update'])) { - $uid = $_POST['uid']; - $amount = $_POST['amount']; - $reason = $_POST['reason']; - - $UpdateQ = "INSERT INTO reimbursement_log (playerid,comp,reason,staff_name) VALUES ('$uid','$amount','$reason','$user');"; - mysqli_query($dbcon, $UpdateQ); -} -?> - -

- - - -
- - - - - - - - - - - - - -'; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; -} - -echo '
Reimbursement IdPlayerIDAmount GivenReasonAdminTime Stamp
'.$row['reimbursement_id'].''.$row['playerid'].' '.$row['comp'].' '.$row['reason'].' '.$row['staff_name'].' '.$row['timestamp'].'
'; -?> - - -
- - - - - - - - - - - - - - +
+

Reimbursement Logs

+ + +
+ + + + + + + + + + + '; + echo ''; + + echo ''; + echo ''; + + echo '
Player UIDAmount GivenComp ReasonAdd Log
' . ""; + echo '' . ""; + echo '' . ""; + echo '' . "'; + + echo '
'; + + if (isset($_POST[ 'update' ])) { + $uid = $_POST[ 'uid' ]; + $amount = $_POST[ 'amount' ]; + $reason = $_POST[ 'reason' ]; + + $UpdateQ = "INSERT INTO reimbursement_log (playerid,comp,reason,staff_name) VALUES ('$uid','$amount','$reason','$user');"; + mysqli_query ($dbcon, $UpdateQ); + } + ?> + +

+ + + +
+ + + + + + + + + + + + + + '; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + } + + echo '
Reimbursement IdPlayerIDAmount GivenReasonAdminTime Stamp
' . $row[ 'reimbursement_id' ] . '' . $row[ 'playerid' ] . ' ' . $row[ 'comp' ] . ' ' . $row[ 'reason' ] . ' ' . $row[ 'staff_name' ] . ' ' . $row[ 'timestamp' ] . '
'; + ?> + + +
+ + + + + + + + + + + + + + diff --git a/settings.php b/settings.php index df300d6..abd0eea 100755 --- a/settings.php +++ b/settings.php @@ -1,126 +1,127 @@
-

Settings Menu

- -
-
-

Server Info

-
-
- -
-

Database Host

- - -
-

Username

- - -
-

Password

- - -
-

Database Name

- - -

RCON Host

- - -
-

RCON Pass

- - -
-

RCON Port

- - -
-

Max Cop Level

- - -
-

Max Medic Level

- - -
-

Max Admin Level

- - -
-

Max Donator Level

- - -
-

API Username

- - -
-

API Password

- - -
-

API Enabled

- - +
+

Username

+ +
+

Password

+ -
- -
+
+

Database Name

+ -
-
-RCON Host + +
+

RCON Pass

+ -?> +
+

RCON Port

+ + +
+

Max Cop Level

+ + +
+

Max Medic Level

+ + +
+

Max Admin Level

+ + +
+

Max Donator Level

+ + +
+

API Username

+ + +
+

API Password

+ + +
+

API Enabled

+ + + +
+ + + +
+ + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/staff.php b/staff.php index 0badf48..6e9dc7a 100755 --- a/staff.php +++ b/staff.php @@ -1,144 +1,145 @@ -
-

Staff Menu

- +
+

Staff Menu

+ -
-
+
+ - -
-
-
- -
-
-
- -
+ +
+
+
+ +
+
+
+ +
- - -

-
+ Staff account deleted!
'; -} + echo ''; + } -if (isset($_POST['update'])) { - if ($_POST['password'] == '') { - $UpdateQ = "UPDATE users SET username='$_POST[username]' WHERE ID='$_POST[hidden]'"; - mysqli_query($dbconL, $UpdateQ); - echo ''; - } else { - $password = $_POST['password']; - $pass = hash('sha256', $password); - $UpdateQ = "UPDATE users SET username='$_POST[username]', password='$pass' WHERE ID='$_POST[hidden]'"; - mysqli_query($dbconL, $UpdateQ); - echo ''; + if (isset($_POST[ 'update' ])) { + if ($_POST[ 'password' ] == '') { + $UpdateQ = "UPDATE users SET username='$_POST[username]' WHERE ID='$_POST[hidden]'"; + mysqli_query ($dbconL, $UpdateQ); + echo ''; + } else { + $password = $_POST[ 'password' ]; + $pass = hash ('sha256', $password); + $UpdateQ = "UPDATE users SET username='$_POST[username]', password='$pass' WHERE ID='$_POST[hidden]'"; + mysqli_query ($dbconL, $UpdateQ); + echo ''; + } } -} -?> -
- - - - - - - - - - - -'; - echo ''; - echo ''; -} + ?> +
+
UsernamePasswordDeleteUpdatePermissions
'.""; - echo ''."'; - echo ''."'; - echo "".''; - echo ''; - echo '
'; - echo '
'."'; - echo "".''; - echo ''; - echo '
+ + + + + + + + + + + '; + echo ''; + echo ''; + } -echo '
UsernamePasswordDeleteUpdatePermissions
' . ""; + echo '' . "'; + echo '' . "'; + echo "" . ''; + echo ''; + echo '
'; + echo '
' . "'; + echo "" . ''; + echo ''; + echo '
'; -?> - - -
- - - + echo ''; + ?> + + + + + + - - - - - - - - - - + + + + + + + + + + diff --git a/steam.php b/steam.php index 984f2e2..031fe5e 100644 --- a/steam.php +++ b/steam.php @@ -1,18 +1,18 @@ -
-

Steam Menu

- - +

Steam Menu

+ + -
- - - - - - - - - - - - +
+
NameAliasUIDGUIDSteam Account
+ + + + + + + + + + + '; - echo ''; - echo ''; - echo ''; - echo ''; - echo ""; - echo ''; -} + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ""; + echo ''; + } -echo '
NameAliasUIDGUIDSteam Account
'.$row['name'].''.$row['aliases'].' '.$pid.' '.$return.'Steam Accounts
' . $row[ 'name' ] . '' . $row[ 'aliases' ] . ' ' . $pid . ' ' . $return . 'Steam Accounts
'; -?> - - -
- - - + echo ''; + ?> + + + + + + - - - - - - - - - - + + + + + + + + + + diff --git a/updateSettings.php b/updateSettings.php index 008f43b..7883dc3 100755 --- a/updateSettings.php +++ b/updateSettings.php @@ -1,122 +1,122 @@ "; - fwrite($ourFileHandle, $written); - fclose($ourFileHandle); + fwrite ($ourFileHandle, $written); + fclose ($ourFileHandle); - header('Location: settings.php'); + header ('Location: settings.php'); die(); } else { echo $fail; diff --git a/vehicles.php b/vehicles.php index 1670fea..2cf7860 100755 --- a/vehicles.php +++ b/vehicles.php @@ -1,22 +1,22 @@ -
-

Vehicle Menu

-
-
- -
-
+
+ + + +
+ +
+ + + + + + + + + + + + + + + '; + echo ''; + echo ''; + echo ''; + + echo ''; + echo ''; + + echo '
IDSideClass NameUIDTypeAliveActivePlate
' . $row[ 'id' ] . '' . $row[ 'side' ] . ' ' ?> + + ' . $row[ 'pid' ] . ' ' . $row[ 'type' ] . ' ' ?> + + ' ?> + + ' ?> + + '; + } + + echo '
'; + ?> + + + + + + + + + + + + + + + + + + + + + + diff --git a/verifyCheck.php b/verifyCheck.php index 7477eb2..c37414c 100644 --- a/verifyCheck.php +++ b/verifyCheck.php @@ -1,57 +1,57 @@ "; - $dbconnect = mysqli_connect($host, $user, $pass, $name, $port) or die('Database connection failed'); + $dbconnect = mysqli_connect ($host, $user, $pass, $name, $port) or die('Database connection failed'); - $sql = array(); + $sql = array(); $sql[] = 'DROP TABLE IF EXISTS `users`;'; $sql[] = 'DROP TABLE IF EXISTS `log`;'; @@ -184,11 +184,11 @@ function Rconconnect(){ $sql[] = 'DROP TABLE IF EXISTS `access`;'; $sql[] = ' CREATE TABLE IF NOT EXISTS `log` ( - `logid` int(11) NOT NULL AUTO_INCREMENT, - `date_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `user` varchar(64) DEFAULT NULL, - `action` varchar(255) DEFAULT NULL, - `level` int(11) NOT NULL, + `logid` INT(11) NOT NULL AUTO_INCREMENT, + `date_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `user` VARCHAR(64) DEFAULT NULL, + `action` VARCHAR(255) DEFAULT NULL, + `level` INT(11) NOT NULL, PRIMARY KEY (`logid`), UNIQUE KEY `logid` (`logid`), KEY `logid_2` (`logid`) @@ -197,13 +197,12 @@ function Rconconnect(){ $sql[] = ' CREATE TABLE IF NOT EXISTS `users` ( - `ID` mediumint(9) NOT NULL AUTO_INCREMENT, - `username` varchar(60) NOT NULL, - `password` varchar(80) NOT NULL, - `permissions` text NOT NULL, + `ID` MEDIUMINT(9) NOT NULL AUTO_INCREMENT, + `username` VARCHAR(60) NOT NULL, + `password` VARCHAR(80) NOT NULL, + `permissions` TEXT NOT NULL, PRIMARY KEY (`ID`) - ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;' - ; + ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;'; $sql[] = " CREATE TABLE IF NOT EXISTS `notes` ( @@ -217,10 +216,9 @@ function Rconconnect(){ `note_updated` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`note_id`), UNIQUE INDEX `note_id` (`note_id`) - ) COLLATE='latin1_swedish_ci' ENGINE=InnoDB AUTO_INCREMENT=6;" - ; + ) COLLATE='latin1_swedish_ci' ENGINE=InnoDB AUTO_INCREMENT=6;"; - $sql[] = " + $sql[] = " CREATE TABLE IF NOT EXISTS `reimbursement_log` ( `reimbursement_id` INT(11) NOT NULL AUTO_INCREMENT, `playerid` VARCHAR(50) NOT NULL, @@ -233,10 +231,9 @@ function Rconconnect(){ ) COLLATE='latin1_swedish_ci' ENGINE=InnoDB - AUTO_INCREMENT=1;" - ; + AUTO_INCREMENT=1;"; - $sql[] = " + $sql[] = " CREATE TABLE IF NOT EXISTS `reimbursement_log` ( `reimbursement_id` INT(11) NOT NULL AUTO_INCREMENT, `playerid` VARCHAR(50) NOT NULL, @@ -249,46 +246,43 @@ function Rconconnect(){ ) COLLATE='latin1_swedish_ci' ENGINE=InnoDB - AUTO_INCREMENT=1;" - ; + AUTO_INCREMENT=1;"; $sql[] = ' CREATE TABLE IF NOT EXISTS `whitelist` ( - `id` int(0) NOT NULL AUTO_INCREMENT, - `date_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `user` varchar(64) DEFAULT NULL, - `guid` varchar(64) DEFAULT NULL, - `uid` varchar(64) DEFAULT NULL, + `id` INT(0) NOT NULL AUTO_INCREMENT, + `date_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `user` VARCHAR(64) DEFAULT NULL, + `guid` VARCHAR(64) DEFAULT NULL, + `uid` VARCHAR(64) DEFAULT NULL, PRIMARY KEY (`id`) - ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;' - ; + ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;'; $sql[] = ' CREATE TABLE `access` ( - `accessID` int(11) NOT NULL AUTO_INCREMENT, - `date_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `address` varchar(64) DEFAULT NULL, - `failed` int(11) NOT NULL, + `accessID` INT(11) NOT NULL AUTO_INCREMENT, + `date_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `address` VARCHAR(64) DEFAULT NULL, + `failed` INT(11) NOT NULL, PRIMARY KEY (`accessID`), UNIQUE KEY `accessID` (`accessID`), KEY `accessID_1` (`accessID`) - ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;' - ; + ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;'; - $sql[] = "INSERT INTO `users` (`username`, `password`, `permissions`) VALUES ('AdminPanel','60fe74406e7f353ed979f350f2fbb6a2e8690a5fa7d1b0c32983d1d8b3f95f67', '\"[[`notes`,1],[`cop`,1],[`medic`,1],[`money`,1],[`IG-Admin`,1],[`editPlayer`,1],[`housing`,1],[`gangs`,1],[`vehicles`,1],[`logs`,1],[`steamView`,1],[`ban`,1],[`kick`,1],[`unban`,1],[`globalMessage`,1],[`restartServer`,1],[`stopServer`,1],[`superUser`,1]]\"');"; + $sql[] = "INSERT INTO `users` (`username`, `password`, `permissions`) VALUES ('AdminPanel','60fe74406e7f353ed979f350f2fbb6a2e8690a5fa7d1b0c32983d1d8b3f95f67', '\"[[`notes`,1],[`cop`,1],[`medic`,1],[`money`,1],[`IG-Admin`,1],[`editPlayer`,1],[`housing`,1],[`gangs`,1],[`vehicles`,1],[`logs`,1],[`steamView`,1],[`ban`,1],[`kick`,1],[`unban`,1],[`globalMessage`,1],[`restartServer`,1],[`stopServer`,1],[`superUser`,1]]\"');"; - foreach ($sql as $x) { - mysqli_query($dbconnect, $x) or die('Error while executing SQL statement'); - } + foreach ( $sql as $x ) { + mysqli_query ($dbconnect, $x) or die('Error while executing SQL statement'); + } - $ourFileHandle = fopen($ourFileName, 'w'); - fwrite($ourFileHandle, $written); - fclose($ourFileHandle); + $ourFileHandle = fopen ($ourFileName, 'w'); + fwrite ($ourFileHandle, $written); + fclose ($ourFileHandle); - header('Location: index.php'); + header ('Location: index.php'); } else { echo 'There has been an error setting up your database, please recheck all inputs'; } } else { - header('Location: index.php'); + header ('Location: index.php'); } diff --git a/whitelist.php b/whitelist.php index e46881b..5509350 100755 --- a/whitelist.php +++ b/whitelist.php @@ -1,129 +1,130 @@ -
-

Battleye Whitelist

- - -
-
- -
-


- -
- - - - - - - - - -'; - echo ''; - echo ''; - echo ''; - -echo '
Staff UIDStaff GUIDAdd Whitelist
'.""; - echo ''.""; - echo ''."'; - - echo '
'; - -if (isset($_POST['update'])) { - $guid = $_POST['guid']; - $uid = $_POST['uid']; - - $UpdateQ = "INSERT INTO whitelist (user,uid,guid) VALUES ('$user','$uid','$guid');"; - mysqli_query($dbcon, $UpdateQ); -} - -if (isset($_POST['delete'])) { - $sql = "DELETE FROM whitelist WHERE ID='$_POST[hidden]'"; - mysqli_query($dbcon, $sql); - - echo ''; -} -?> - -

- - - -
- - - - - - - - - - - - - -'; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - - echo ''; - echo ''; -} - -echo '
Whitelist IdUIDGUIDStaff AddedTime StampDelete
'.$row['id'].''.$row['uid'].''.$row['guid'].' '.$row['user'].' '.$row['date_time'].' '."'; - echo "".''; - echo '
'; -?> - - -
- - - - - - - - - - - - - - +
+

Battleye Whitelist

+ + +
+
+ +
+
+

+ +
+ + + + + + + + + + '; + echo ''; + echo ''; + echo ''; + + echo '
Staff UIDStaff GUIDAdd Whitelist
' . ""; + echo '' . ""; + echo '' . "'; + + echo '
'; + + if (isset($_POST[ 'update' ])) { + $guid = $_POST[ 'guid' ]; + $uid = $_POST[ 'uid' ]; + + $UpdateQ = "INSERT INTO whitelist (user,uid,guid) VALUES ('$user','$uid','$guid');"; + mysqli_query ($dbcon, $UpdateQ); + } + + if (isset($_POST[ 'delete' ])) { + $sql = "DELETE FROM whitelist WHERE ID='$_POST[hidden]'"; + mysqli_query ($dbcon, $sql); + + echo ''; + } + ?> + +

+ + + +
+ + + + + + + + + + + + + + '; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + echo ''; + echo ''; + } + + echo '
Whitelist IdUIDGUIDStaff AddedTime StampDelete
' . $row[ 'id' ] . '' . $row[ 'uid' ] . '' . $row[ 'guid' ] . ' ' . $row[ 'user' ] . ' ' . $row[ 'date_time' ] . ' ' . "'; + echo "" . ''; + echo '
'; + ?> + + +
+ + + + + + + + + + + + + + From c59f6df2affa1f2656d007b990fb0619d3011ac1 Mon Sep 17 00:00:00 2001 From: Jordan McLean Date: Sat, 8 Jul 2017 00:36:48 +0100 Subject: [PATCH 2/2] Removed space between brace --- API/api.php | 114 ++++++++++++++++++------------------- API/apiFunctions.php | 12 ++-- ArmaRConClass/rcon.php | 12 ++-- Backend/changeLicense.php | 28 ++++----- Backend/updateGangs.php | 16 +++--- Backend/updateHouses.php | 18 +++--- Backend/updatePlayers.php | 24 ++++---- Backend/updateVehicles.php | 16 +++--- addStaff.php | 14 ++--- changePerms.php | 24 ++++---- delete.php | 8 +-- editHouses.php | 24 ++++---- editPlayer.php | 42 +++++++------- functions.php | 24 ++++---- gangs.php | 26 ++++----- header/header.php | 18 +++--- help.php | 4 +- home.php | 28 ++++----- houses.php | 18 +++--- index.php | 8 +-- login.php | 48 ++++++++-------- logout.php | 6 +- logs.php | 30 +++++----- lvlError.php | 4 +- notes.php | 28 ++++----- notesView.php | 50 ++++++++-------- permissions.php | 12 ++-- players.php | 90 ++++++++++++++--------------- profile.php | 18 +++--- rCon/Kmenu.php | 8 +-- rCon/Kplayer.php | 22 +++---- rCon/SKPlayerv1.php | 36 ++++++------ rCon/player.php | 26 ++++----- rCon/rcon-Skick.php | 10 ++-- rCon/rcon-ban.php | 12 ++-- rCon/rcon-check.php | 22 +++---- rCon/rcon-kick.php | 10 ++-- rCon/rcon-mess.php | 8 +-- rCon/rcon-restart.php | 6 +- rCon/rcon-stop.php | 6 +- rCon/rcon-unBan.php | 10 ++-- rCon/unBan.php | 18 +++--- reimbursement.php | 28 ++++----- settings.php | 8 +-- staff.php | 24 ++++---- steam.php | 20 +++---- updateSettings.php | 62 ++++++++++---------- vehicles.php | 64 ++++++++++----------- verifyCheck.php | 62 ++++++++++---------- whitelist.php | 28 ++++----- 50 files changed, 627 insertions(+), 627 deletions(-) diff --git a/API/api.php b/API/api.php index d40a5bc..9699156 100755 --- a/API/api.php +++ b/API/api.php @@ -2,19 +2,19 @@ include '../verifyPanel.php'; if ($apiEnable == 1) { - if ($apiUser == $_GET[ 'user' ] && $apiPass == $_GET[ 'pass' ]) { + if ($apiUser == $_GET['user'] && $apiPass == $_GET['pass']) { $debug = false; if ($debug) { $time = microtime (); $time = explode (' ', $time); - $time = $time[ 1 ] + $time[ 0 ]; + $time = $time[1] + $time[0]; $start = $time; } - $request = $_GET[ 'request' ]; + $request = $_GET['request']; if ($request == 'search') { - $uid = $_GET[ 'id' ]; + $uid = $_GET['id']; $len = strlen ($uid); if ($len != 17) { $uid = ''; @@ -29,27 +29,27 @@ $allArray = allPlayerFunctions ($dbconL); $all = []; - $all[ 'totalMoney' ] = 0; - $all[ 'playerCount' ] = 0; + $all['totalMoney'] = 0; + $all['playerCount'] = 0; while ($row = mysqli_fetch_array ($allArray, MYSQLI_ASSOC)) { - if ($row[ 'pid' ]) { - $i = $row[ 'pid' ]; + if ($row['pid']) { + $i = $row['pid']; } else { - $i = $row[ 'playerid' ]; + $i = $row['playerid']; } - $all[ 'totalMoney' ] = $all[ 'totalMoney' ] + $row[ 'cash' ] + $row[ 'bankacc' ]; - $all[ 'player' ][ $i ][ 'name' ] = $row[ 'name' ]; - $all[ 'player' ][ $i ][ 'pid' ] = $i; - $all[ 'player' ][ $i ][ 'aliases' ] = $row[ 'aliases' ]; - $all[ 'player' ][ $i ][ 'cash' ] = $row[ 'cash' ]; - $all[ 'player' ][ $i ][ 'bank' ] = $row[ 'bankacc' ]; - $all[ 'player' ][ $i ][ 'coplevel' ] = $row[ 'coplevel' ]; - $all[ 'player' ][ $i ][ 'mediclevel' ] = $row[ 'mediclevel' ]; - $all[ 'player' ][ $i ][ 'donorlevel' ] = $row[ 'donorlevel' ]; - $all[ 'player' ][ $i ][ 'adminlevel' ] = $row[ 'adminlevel' ]; - $all[ 'player' ][ $i ][ 'arrested' ] = $row[ 'arrested' ]; - $all[ 'player' ][ $i ][ 'blacklist' ] = $row[ 'blacklist' ]; - ++$all[ 'playerCount' ]; + $all['totalMoney'] = $all['totalMoney'] + $row['cash'] + $row['bankacc']; + $all['player'][$i]['name'] = $row['name']; + $all['player'][$i]['pid'] = $i; + $all['player'][$i]['aliases'] = $row['aliases']; + $all['player'][$i]['cash'] = $row['cash']; + $all['player'][$i]['bank'] = $row['bankacc']; + $all['player'][$i]['coplevel'] = $row['coplevel']; + $all['player'][$i]['mediclevel'] = $row['mediclevel']; + $all['player'][$i]['donorlevel'] = $row['donorlevel']; + $all['player'][$i]['adminlevel'] = $row['adminlevel']; + $all['player'][$i]['arrested'] = $row['arrested']; + $all['player'][$i]['blacklist'] = $row['blacklist']; + ++$all['playerCount']; } echo json_encode ($all, JSON_PRETTY_PRINT); @@ -61,22 +61,22 @@ if ($allArray != 'NoID') { $all = []; while ($row = mysqli_fetch_array ($allArray, MYSQLI_ASSOC)) { - if ($row[ 'pid' ]) { - $i = $row[ 'pid' ]; + if ($row['pid']) { + $i = $row['pid']; } else { - $i = $row[ 'playerid' ]; + $i = $row['playerid']; } - $all[ 'player' ][ $i ][ 'name' ] = $row[ 'name' ]; - $all[ 'player' ][ $i ][ 'pid' ] = $i; - $all[ 'player' ][ $i ][ 'aliases' ] = $row[ 'aliases' ]; - $all[ 'player' ][ $i ][ 'cash' ] = $row[ 'cash' ]; - $all[ 'player' ][ $i ][ 'bank' ] = $row[ 'bankacc' ]; - $all[ 'player' ][ $i ][ 'coplevel' ] = $row[ 'coplevel' ]; - $all[ 'player' ][ $i ][ 'mediclevel' ] = $row[ 'mediclevel' ]; - $all[ 'player' ][ $i ][ 'donorlevel' ] = $row[ 'donorlevel' ]; - $all[ 'player' ][ $i ][ 'adminlevel' ] = $row[ 'adminlevel' ]; - $all[ 'player' ][ $i ][ 'arrested' ] = $row[ 'arrested' ]; - $all[ 'player' ][ $i ][ 'blacklist' ] = $row[ 'blacklist' ]; + $all['player'][$i]['name'] = $row['name']; + $all['player'][$i]['pid'] = $i; + $all['player'][$i]['aliases'] = $row['aliases']; + $all['player'][$i]['cash'] = $row['cash']; + $all['player'][$i]['bank'] = $row['bankacc']; + $all['player'][$i]['coplevel'] = $row['coplevel']; + $all['player'][$i]['mediclevel'] = $row['mediclevel']; + $all['player'][$i]['donorlevel'] = $row['donorlevel']; + $all['player'][$i]['adminlevel'] = $row['adminlevel']; + $all['player'][$i]['arrested'] = $row['arrested']; + $all['player'][$i]['blacklist'] = $row['blacklist']; } echo json_encode ($all, JSON_PRETTY_PRINT); @@ -91,14 +91,14 @@ $sqldata = searchMoney ($dbconL); while ($row = mysqli_fetch_array ($sqldata, MYSQLI_ASSOC)) { - $money = $money + $row[ 'cash' ] + $row[ 'bankacc' ]; + $money = $money + $row['cash'] + $row['bankacc']; } echo $money; break; case 'richlist': - if (isset($_GET[ 'limit' ])) { - $limit = $_GET[ 'limit' ]; + if (isset($_GET['limit'])) { + $limit = $_GET['limit']; } else { $limit = 10; } @@ -106,16 +106,16 @@ $sqldata = showRich ($dbconL, $limit); while ($row = mysqli_fetch_array ($sqldata, MYSQLI_ASSOC)) { - if ($row[ 'pid' ]) { - $i = $row[ 'pid' ]; + if ($row['pid']) { + $i = $row['pid']; } else { - $i = $row[ 'playerid' ]; + $i = $row['playerid']; } - $all[ 'player' ][ $i ][ 'name' ] = $row[ 'name' ]; - $all[ 'player' ][ $i ][ 'pid' ] = $i; - $all[ 'player' ][ $i ][ 'aliases' ] = $row[ 'aliases' ]; - $all[ 'player' ][ $i ][ 'cash' ] = $row[ 'cash' ]; - $all[ 'player' ][ $i ][ 'bank' ] = $row[ 'bankacc' ]; + $all['player'][$i]['name'] = $row['name']; + $all['player'][$i]['pid'] = $i; + $all['player'][$i]['aliases'] = $row['aliases']; + $all['player'][$i]['cash'] = $row['cash']; + $all['player'][$i]['bank'] = $row['bankacc']; } echo json_encode ($all, JSON_PRETTY_PRINT); break; @@ -131,10 +131,10 @@ $sqldata = wantedList ($dbconL); $wanted = []; while ($row = mysqli_fetch_array ($sqldata, MYSQLI_ASSOC)) { - $i = $row[ 'wantedID' ]; - $wanted[ 'wanted' ][ $i ][ 'name' ] = $row[ 'wantedName' ]; - $wanted[ 'wanted' ][ $i ][ 'crimes' ] = $row[ 'wantedCrimes' ]; - $wanted[ 'wanted' ][ $i ][ 'bounty' ] = $row[ 'wantedBounty' ]; + $i = $row['wantedID']; + $wanted['wanted'][$i]['name'] = $row['wantedName']; + $wanted['wanted'][$i]['crimes'] = $row['wantedCrimes']; + $wanted['wanted'][$i]['bounty'] = $row['wantedBounty']; } echo json_encode ($wanted, JSON_PRETTY_PRINT); break; @@ -179,11 +179,11 @@ $i = 0; $gangs = []; while ($row = mysqli_fetch_array ($gangArray, MYSQLI_ASSOC)) { - $i = $row[ 'name' ]; - $gangs[ $i ][ 'owner' ] = $row[ 'owner' ]; - $gangs[ $i ][ 'name' ] = $row[ 'name' ]; - $gangs[ $i ][ 'members' ] = $row[ 'members' ]; - $gangs[ $i ][ 'maxmembers' ] = $row[ 'maxmembers' ]; + $i = $row['name']; + $gangs[$i]['owner'] = $row['owner']; + $gangs[$i]['name'] = $row['name']; + $gangs[$i]['members'] = $row['members']; + $gangs[$i]['maxmembers'] = $row['maxmembers']; ++$i; } echo json_encode ($gangs, JSON_PRETTY_PRINT); @@ -197,7 +197,7 @@ echo '
'; $time = microtime (); $time = explode (' ', $time); - $time = $time[ 1 ] + $time[ 0 ]; + $time = $time[1] + $time[0]; $finish = $time; $total_time = round (($finish - $start), 4); echo 'Page generated in ' . $total_time . ' seconds.'; diff --git a/API/apiFunctions.php b/API/apiFunctions.php index 0321eaf..77444a3 100755 --- a/API/apiFunctions.php +++ b/API/apiFunctions.php @@ -51,14 +51,14 @@ function countVehicles($dbcon) { function returnLevel($array, $search) { $player = []; while ($row = mysqli_fetch_array ($array, MYSQLI_ASSOC)) { - if ($row[ 'pid' ]) { - $i = $row[ 'pid' ]; + if ($row['pid']) { + $i = $row['pid']; } else { - $i = $row[ 'playerid' ]; + $i = $row['playerid']; } - $player[ $i ][ 'name' ] = $row[ 'name' ]; - $player[ $i ][ 'uid' ] = $i; - $player[ $i ][ 'level' ] = $row[ $search ]; + $player[$i]['name'] = $row['name']; + $player[$i]['uid'] = $i; + $player[$i]['level'] = $row[$search]; } return $player; diff --git a/ArmaRConClass/rcon.php b/ArmaRConClass/rcon.php index b6e03a9..747a221 100755 --- a/ArmaRConClass/rcon.php +++ b/ArmaRConClass/rcon.php @@ -116,9 +116,9 @@ public function connect($ServerIP = '', $ServerPort = 2306, $RConPassword = '') $this->RCONpassword = $RConPassword; } - $this->socket = @fsockopen ('udp://' . $this->serverIP, $this->serverPort, $errno, $errstr, $this->options[ 'timeout_seconds' ]); + $this->socket = @fsockopen ('udp://' . $this->serverIP, $this->serverPort, $errno, $errstr, $this->options['timeout_seconds']); - stream_set_timeout ($this->socket, $this->options[ 'timeout_seconds' ]); + stream_set_timeout ($this->socket, $this->options['timeout_seconds']); stream_set_blocking ($this->socket, true); if (!$this->socket) { @@ -127,7 +127,7 @@ public function connect($ServerIP = '', $ServerPort = 2306, $RConPassword = '') $this->authorize (); - if ($this->options[ 'send_heartbeat' ]) { + if ($this->options['send_heartbeat']) { $this->send_heartbeat (); } @@ -168,7 +168,7 @@ private function send($command) { } $msgCRC = $this->get_msgCRC ($command); - $head = 'BE' . chr (hexdec ($msgCRC[ 0 ])) . chr (hexdec ($msgCRC[ 1 ])) . chr (hexdec ($msgCRC[ 2 ])) . chr (hexdec ($msgCRC[ 3 ])) . chr (hexdec ('ff')) . chr (hexdec ('01')) . chr (hexdec (sprintf ('%01b', 0))); + $head = 'BE' . chr (hexdec ($msgCRC[0])) . chr (hexdec ($msgCRC[1])) . chr (hexdec ($msgCRC[2])) . chr (hexdec ($msgCRC[3])) . chr (hexdec ('ff')) . chr (hexdec ('01')) . chr (hexdec (sprintf ('%01b', 0))); $msg = $head . $command; $this->head = $head; @@ -201,7 +201,7 @@ private function authorize() { $result = fread ($this->socket, 16); - if (ord ($result[ strlen ($result) - 1 ]) == 0) { + if (ord ($result[strlen ($result) - 1]) == 0) { throw new AuthorizationException('[ARC] Login failed, wrong password!'); } } @@ -214,7 +214,7 @@ private function authorize() { private function get_loginmessage() { $authCRC = $this->get_authCRC (); - $loginmsg = 'BE' . chr (hexdec ($authCRC[ 0 ])) . chr (hexdec ($authCRC[ 1 ])) . chr (hexdec ($authCRC[ 2 ])) . chr (hexdec ($authCRC[ 3 ])); + $loginmsg = 'BE' . chr (hexdec ($authCRC[0])) . chr (hexdec ($authCRC[1])) . chr (hexdec ($authCRC[2])) . chr (hexdec ($authCRC[3])); $loginmsg .= chr (hexdec ('ff')) . chr (hexdec ('00')) . $this->RCONpassword; return $loginmsg; diff --git a/Backend/changeLicense.php b/Backend/changeLicense.php index 3c5e4f8..4bce732 100755 --- a/Backend/changeLicense.php +++ b/Backend/changeLicense.php @@ -3,43 +3,43 @@ session_start (); ob_start (); -$staffPerms = $_SESSION[ 'perms' ]; +$staffPerms = $_SESSION['perms']; -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: ../index.php'); die(); } -if ($staffPerms[ 'editPlayer' ] == '1') { - $adminLev = $_SESSION[ 'adminLevel' ]; - $user = $_SESSION[ 'user' ]; +if ($staffPerms['editPlayer'] == '1') { + $adminLev = $_SESSION['adminLevel']; + $user = $_SESSION['user']; include '../verifyPanel.php'; masterconnect (); - $id = $_POST[ 'id' ]; - $uid = $_POST[ 'uid' ]; + $id = $_POST['id']; + $uid = $_POST['uid']; - $change = explode ('_', $_POST[ 'id' ]); - $col = $change[ '1' ] . '_licenses'; + $change = explode ('_', $_POST['id']); + $col = $change['1'] . '_licenses'; $sql = "SELECT * FROM `players` WHERE uid = '$_POST[uid]'"; $result = mysqli_query ($dbcon, $sql); $player = $result->fetch_object (); $licences = $player->$col; - $num = strpos ($licences, $change[ '2' ]) + strlen ($change[ '2' ]) + 2; + $num = strpos ($licences, $change['2']) + strlen ($change['2']) + 2; $pid = playerID ($player); - if ($licences[ $num ] == 0) { - $licences[ $num ] = 1; + if ($licences[$num] == 0) { + $licences[$num] = 1; $message = 'Admin ' . $user . ' has added license ' . $id . ' to ' . $player->name . '(' . $pid . ')'; logIt ($user, $message, $dbcon); - } elseif ($licences[ $num ] == 1) { + } elseif ($licences[$num] == 1) { $message = 'Admin ' . $user . ' has removed license ' . $id . ' from ' . $player->name . '(' . $pid . ')'; logIt ($user, $message, $dbcon); - $licences[ $num ] = 0; + $licences[$num] = 0; } $sql = 'UPDATE `players` SET `' . $col . "`='$licences' WHERE uid ='$uid'"; diff --git a/Backend/updateGangs.php b/Backend/updateGangs.php index d054e5a..08e6185 100644 --- a/Backend/updateGangs.php +++ b/Backend/updateGangs.php @@ -3,13 +3,13 @@ session_start (); ob_start (); -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: ../index.php'); die(); } -$staffPerms = $_SESSION[ 'perms' ]; -$user = $_SESSION[ 'user' ]; +$staffPerms = $_SESSION['perms']; +$user = $_SESSION['user']; include '../verifyPanel.php'; masterconnect (); @@ -18,25 +18,25 @@ $result = mysqli_query ($dbcon, $sql); $gang = $result->fetch_object (); -switch ($_POST[ 'column' ]) { +switch ($_POST['column']) { case 'maxmembers': - $maxmembers = logs ($staffPerms[ 'gangs' ], $_POST[ 'column' ], $gang->pid, $user, $dbcon, $gang, $_POST[ 'editval' ]); + $maxmembers = logs ($staffPerms['gangs'], $_POST['column'], $gang->pid, $user, $dbcon, $gang, $_POST['editval']); $UpdateQ = "UPDATE gangs SET $_POST[column]='$maxmembers' WHERE id='$_POST[id]'"; break; case 'members': - $members = logs ($staffPerms[ 'gangs' ], $_POST[ 'column' ], $gang->pid, $user, $dbcon, $gang, $_POST[ 'editval' ]); + $members = logs ($staffPerms['gangs'], $_POST['column'], $gang->pid, $user, $dbcon, $gang, $_POST['editval']); $UpdateQ = "UPDATE gangs SET $_POST[column]='$members' WHERE id='$_POST[id]'"; break; case 'bank': - $bank = logs ($staffPerms[ 'gangs' ], $_POST[ 'column' ], $gang->pid, $user, $dbcon, $gang, $_POST[ 'editval' ]); + $bank = logs ($staffPerms['gangs'], $_POST['column'], $gang->pid, $user, $dbcon, $gang, $_POST['editval']); $UpdateQ = "UPDATE gangs SET $_POST[column]='$bank' WHERE id='$_POST[id]'"; break; case 'active': - $active = logs ($staffPerms[ 'gangs' ], $_POST[ 'column' ], $gang->pid, $user, $dbcon, $gang, $_POST[ 'editval' ]); + $active = logs ($staffPerms['gangs'], $_POST['column'], $gang->pid, $user, $dbcon, $gang, $_POST['editval']); $UpdateQ = "UPDATE gangs SET $_POST[column]='$active' WHERE id='$_POST[id]'"; break; diff --git a/Backend/updateHouses.php b/Backend/updateHouses.php index ce0428f..a1596cf 100644 --- a/Backend/updateHouses.php +++ b/Backend/updateHouses.php @@ -3,13 +3,13 @@ session_start (); ob_start (); -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: ../index.php'); die(); } -$staffPerms = $_SESSION[ 'perms' ]; -$user = $_SESSION[ 'user' ]; +$staffPerms = $_SESSION['perms']; +$user = $_SESSION['user']; include '../verifyPanel.php'; masterconnect (); @@ -18,30 +18,30 @@ $result = mysqli_query ($dbcon, $sql); $houses = $result->fetch_object (); -switch ($_POST[ 'column' ]) { +switch ($_POST['column']) { case 'owned': - $owned = logs ($staffPerms[ 'housing' ], $_POST[ 'column' ], $houses->pid, $user, $dbcon, $houses, $_POST[ 'editval' ]); + $owned = logs ($staffPerms['housing'], $_POST['column'], $houses->pid, $user, $dbcon, $houses, $_POST['editval']); $UpdateQ = "UPDATE houses SET $_POST[column]='$owned' WHERE id='$_POST[id]'"; break; case 'ownedCrate': - $ownedCrate = logs ($staffPerms[ 'housing' ], $_POST[ 'column' ], $houses->pid, $user, $dbcon, $houses, $_POST[ 'editval' ]); + $ownedCrate = logs ($staffPerms['housing'], $_POST['column'], $houses->pid, $user, $dbcon, $houses, $_POST['editval']); $UpdateQ = "UPDATE containers SET owned='$owned' WHERE id='$_POST[id]'"; break; case 'active': - $active = logs ($staffPerms[ 'housing' ], $_POST[ 'column' ], $houses->pid, $user, $dbcon, $houses, $_POST[ 'editval' ]); + $active = logs ($staffPerms['housing'], $_POST['column'], $houses->pid, $user, $dbcon, $houses, $_POST['editval']); $UpdateQ = "UPDATE containers SET $_POST[column]='$owned' WHERE id='$_POST[id]'"; break; case 'gear': - $gear = logs ($staffPerms[ 'housing' ], $_POST[ 'column' ], $houses->pid, $user, $dbcon, $houses, $_POST[ 'editval' ]); + $gear = logs ($staffPerms['housing'], $_POST['column'], $houses->pid, $user, $dbcon, $houses, $_POST['editval']); $UpdateQ = "UPDATE containers SET $_POST[column]='$gear' WHERE id='$_POST[id]'"; break; case 'inventory': - $inventory = logs ($staffPerms[ 'housing' ], $_POST[ 'column' ], $houses->pid, $user, $dbcon, $houses, $_POST[ 'editval' ]); + $inventory = logs ($staffPerms['housing'], $_POST['column'], $houses->pid, $user, $dbcon, $houses, $_POST['editval']); $UpdateQ = "UPDATE containers SET $_POST[column]='$inventory' WHERE id='$_POST[id]'"; break; diff --git a/Backend/updatePlayers.php b/Backend/updatePlayers.php index dba8b9f..fa25180 100644 --- a/Backend/updatePlayers.php +++ b/Backend/updatePlayers.php @@ -3,13 +3,13 @@ session_start (); ob_start (); -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: ../index.php'); die(); } -$staffPerms = $_SESSION[ 'perms' ]; -$user = $_SESSION[ 'user' ]; +$staffPerms = $_SESSION['perms']; +$user = $_SESSION['user']; include '../verifyPanel.php'; masterconnect (); @@ -32,37 +32,37 @@ } } -switch ($_POST[ 'column' ]) { +switch ($_POST['column']) { case 'cash': - $cash = logs ($staffPerms[ 'money' ], 'cash', $pid, $user, $dbcon, $player, $_POST[ 'editval' ]); + $cash = logs ($staffPerms['money'], 'cash', $pid, $user, $dbcon, $player, $_POST['editval']); $UpdateQ = "UPDATE players SET $_POST[column]='$cash' WHERE uid='$_POST[uid]'"; break; case 'bankacc': - $bankacc = logs ($staffPerms[ 'money' ], 'bankacc', $pid, $user, $dbcon, $player, $_POST[ 'editval' ]); + $bankacc = logs ($staffPerms['money'], 'bankacc', $pid, $user, $dbcon, $player, $_POST['editval']); $UpdateQ = "UPDATE players SET $_POST[column]='$bankacc' WHERE uid='$_POST[uid]'"; break; case 'coplevel': - $coplevel = logs ($staffPerms[ 'cop' ], 'coplevel', $pid, $user, $dbcon, $player, $_POST[ 'editval' ]); + $coplevel = logs ($staffPerms['cop'], 'coplevel', $pid, $user, $dbcon, $player, $_POST['editval']); $UpdateQ = "UPDATE players SET $_POST[column]='$coplevel' WHERE uid='$_POST[uid]'"; break; case 'mediclevel': - $mediclevel = logs ($staffPerms[ 'medic' ], 'mediclevel', $pid, $user, $dbcon, $player, $_POST[ 'editval' ]); + $mediclevel = logs ($staffPerms['medic'], 'mediclevel', $pid, $user, $dbcon, $player, $_POST['editval']); $UpdateQ = "UPDATE players SET $_POST[column]='$mediclevel' WHERE uid='$_POST[uid]'"; break; case 'adminlevel': - $adminlevel = logs ($staffPerms[ 'IG-Admin' ], 'adminlevel', $pid, $user, $dbcon, $player, $_POST[ 'editval' ]); + $adminlevel = logs ($staffPerms['IG-Admin'], 'adminlevel', $pid, $user, $dbcon, $player, $_POST['editval']); $UpdateQ = "UPDATE players SET $_POST[column]='$adminlevel' WHERE uid='$_POST[uid]'"; break; case 'donatorlvl': - $donatorlvl = logs ($staffPerms[ 'editPlayer' ], $_POST[ 'column' ], $pid, $user, $dbcon, $player, $_POST[ 'editval' ]); + $donatorlvl = logs ($staffPerms['editPlayer'], $_POST['column'], $pid, $user, $dbcon, $player, $_POST['editval']); $UpdateQ = "UPDATE players SET $_POST[column]='$donatorlvl' WHERE uid='$_POST[uid]'"; break; case 'donorlevel': - $donorlevel = logs ($staffPerms[ 'editPlayer' ], $_POST[ 'column' ], $pid, $user, $dbcon, $player, $_POST[ 'editval' ]); + $donorlevel = logs ($staffPerms['editPlayer'], $_POST['column'], $pid, $user, $dbcon, $player, $_POST['editval']); $UpdateQ = "UPDATE players SET $_POST[column]='$donorlevel' WHERE uid='$_POST[uid]'"; break; case 'blacklist': - $blacklist = logs ($staffPerms[ 'editPlayer' ], $_POST[ 'column' ], $pid, $user, $dbcon, $player, $_POST[ 'editval' ]); + $blacklist = logs ($staffPerms['editPlayer'], $_POST['column'], $pid, $user, $dbcon, $player, $_POST['editval']); $UpdateQ = "UPDATE players SET $_POST[column]='$blacklist' WHERE uid='$_POST[uid]'"; break; diff --git a/Backend/updateVehicles.php b/Backend/updateVehicles.php index 04afb4c..15a355f 100644 --- a/Backend/updateVehicles.php +++ b/Backend/updateVehicles.php @@ -3,13 +3,13 @@ session_start (); ob_start (); -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: ../index.php'); die(); } -$staffPerms = $_SESSION[ 'perms' ]; -$user = $_SESSION[ 'user' ]; +$staffPerms = $_SESSION['perms']; +$user = $_SESSION['user']; include '../verifyPanel.php'; masterconnect (); @@ -18,25 +18,25 @@ $result = mysqli_query ($dbcon, $sql); $vehicles = $result->fetch_object (); -switch ($_POST[ 'column' ]) { +switch ($_POST['column']) { case 'classname': - $classname = logs ($staffPerms[ 'vehicles' ], $_POST[ 'column' ], $vehicles->pid, $user, $dbcon, $vehicles, $_POST[ 'editval' ]); + $classname = logs ($staffPerms['vehicles'], $_POST['column'], $vehicles->pid, $user, $dbcon, $vehicles, $_POST['editval']); $UpdateQ = "UPDATE vehicles SET $_POST[column]='$classname' WHERE id='$_POST[id]'"; break; case 'alive': - $alive = logs ($staffPerms[ 'vehicles' ], $_POST[ 'column' ], $vehicles->pid, $user, $dbcon, $vehicles, $_POST[ 'editval' ]); + $alive = logs ($staffPerms['vehicles'], $_POST['column'], $vehicles->pid, $user, $dbcon, $vehicles, $_POST['editval']); $UpdateQ = "UPDATE vehicles SET $_POST[column]='$alive' WHERE id='$_POST[id]'"; break; case 'active': - $active = logs ($staffPerms[ 'vehicles' ], $_POST[ 'column' ], $vehicles->pid, $user, $dbcon, $vehicles, $_POST[ 'editval' ]); + $active = logs ($staffPerms['vehicles'], $_POST['column'], $vehicles->pid, $user, $dbcon, $vehicles, $_POST['editval']); $UpdateQ = "UPDATE vehicles SET $_POST[column]='$active' WHERE id='$_POST[id]'"; break; case 'plate': - $plate = logs ($staffPerms[ 'vehicles' ], $_POST[ 'column' ], $vehicles->pid, $user, $dbcon, $vehicles, $_POST[ 'editval' ]); + $plate = logs ($staffPerms['vehicles'], $_POST['column'], $vehicles->pid, $user, $dbcon, $vehicles, $_POST['editval']); $UpdateQ = "UPDATE vehicles SET $_POST[column]='$plate' WHERE id='$_POST[id]'"; break; diff --git a/addStaff.php b/addStaff.php index 5329568..3e1653b 100755 --- a/addStaff.php +++ b/addStaff.php @@ -2,15 +2,15 @@ session_start (); ob_start (); -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: index.php'); die(); } -$staffPerms = $_SESSION[ 'perms' ]; +$staffPerms = $_SESSION['perms']; $perms = '"[[`notes`,0],[`cop`,0],[`medic`,0],[`money`,0],[`IG-Admin`,0],[`editPlayer`,0],[`housing`,0],[`gangs`,0],[`vehicles`,0],[`logs`,0],[`steamView`,0],[`ban`,0],[`kick`,0],[`unban`,0],[`globalMessage`,0],[`restartServer`,0],[`stopServer`,0],[`superUser`,0]]"'; -if ($staffPerms[ 'superUser' ] != '1') { +if ($staffPerms['superUser'] != '1') { header ('Location: lvlError.php'); die(); } @@ -38,10 +38,10 @@


fetch_object (); $licences = $user->permissions; - $num = strpos ($licences, $change[ '0' ]) + strlen ($change[ '0' ]) + 2; + $num = strpos ($licences, $change['0']) + strlen ($change['0']) + 2; - if ($licences[ $num ] == 0) { - $licences[ $num ] = 1; - } elseif ($licences[ $num ] == 1) { - $licences[ $num ] = 0; + if ($licences[$num] == 0) { + $licences[$num] = 1; + } elseif ($licences[$num] == 1) { + $licences[$num] = 0; } $sql = "UPDATE `users` SET `permissions` = '$licences' WHERE ID = $staffId"; diff --git a/delete.php b/delete.php index 4c8e0fa..b06e347 100755 --- a/delete.php +++ b/delete.php @@ -3,15 +3,15 @@ session_start (); ob_start (); -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: index.php'); die(); } -$user = $_SESSION[ 'user' ]; -$staffPerms = $_SESSION[ 'perms' ]; +$user = $_SESSION['user']; +$staffPerms = $_SESSION['perms']; -if ($staffPerms[ 'superUser' ] != '1') { +if ($staffPerms['superUser'] != '1') { header ('Location: lvlError.php'); die(); } diff --git a/editHouses.php b/editHouses.php index b1dd7ee..e1ca65b 100644 --- a/editHouses.php +++ b/editHouses.php @@ -4,15 +4,15 @@ ob_start (); $version = ''; -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: index.php'); die(); } -$staffPerms = $_SESSION[ 'perms' ]; -$user = $_SESSION[ 'user' ]; +$staffPerms = $_SESSION['perms']; +$user = $_SESSION['user']; -$houseID = $_POST[ 'hidden' ]; +$houseID = $_POST['hidden']; include 'verifyPanel.php'; masterconnect (); @@ -44,26 +44,26 @@ echo ''; echo '' ?> '> + onBlur="dbSave(this.value, '', 'inventory', '')" + ; type=text value=''> '; echo '' ?> '> + onBlur="dbSave(this.value, '', 'gear', '')" + ; type=text value=''> '; echo '' ?> + onBlur="dbSave(this.value, '', 'active', '')" + ; type=text value=""> '; echo '' ?> + onBlur="dbSave(this.value, '', 'ownedCrate', '')" + ; type=text value=""> '; echo ''; diff --git a/editPlayer.php b/editPlayer.php index 9432d78..7ff33be 100644 --- a/editPlayer.php +++ b/editPlayer.php @@ -4,16 +4,16 @@ ob_start (); $version = ''; -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: index.php'); die(); } -$staffPerms = $_SESSION[ 'perms' ]; -$user = $_SESSION[ 'user' ]; +$staffPerms = $_SESSION['perms']; +$user = $_SESSION['user']; -$uidPlayer = $_POST[ 'hidden' ]; -$guidPlayer = $_POST[ 'guid' ]; +$uidPlayer = $_POST['hidden']; +$guidPlayer = $_POST['guid']; include 'verifyPanel.php'; masterconnect (); @@ -143,19 +143,19 @@ $search_result = mysqli_query ($dbcon, $sqlget) or die('Connection could not be established'); while ($row = mysqli_fetch_array ($search_result, MYSQLI_ASSOC)) { - if ($row[ 'donorlevel' ] != '' || $row[ 'donatorlvl' ] != '') { - if ($row[ 'donorlevel' ] == '') { - $don = $row[ 'donatorlvl' ]; + if ($row['donorlevel'] != '' || $row['donatorlvl'] != '') { + if ($row['donorlevel'] == '') { + $don = $row['donatorlvl']; $version = 'donatorlvl'; } else { - $don = $row[ 'donorlevel' ]; + $don = $row['donorlevel']; $version = 'donorlevel'; } } echo ''; - outputSelection ($maxDonator, $version, $don, $row[ 'uid' ]); - outputSelection (1, 'blacklist', $row[ 'blacklist' ], $row[ 'uid' ]); + outputSelection ($maxDonator, $version, $don, $row['uid']); + outputSelection (1, 'blacklist', $row['blacklist'], $row['uid']); echo ''; } echo ''; @@ -186,17 +186,17 @@ $search_result = mysqli_query ($dbcon, $sqlget) or die('Connection could not be established'); while ($row = mysqli_fetch_array ($search_result, MYSQLI_ASSOC)) { - if ($row[ 'warning' ] == 2) { + if ($row['warning'] == 2) { echo ''; - } elseif ($row[ 'warning' ] == 3) { + } elseif ($row['warning'] == 3) { echo ''; } else { echo ''; } - echo '' . $row[ 'staff_name' ] . ' '; - echo '' . $row[ 'note_text' ] . ' '; - echo '' . $row[ 'note_updated' ] . ' '; + echo '' . $row['staff_name'] . ' '; + echo '' . $row['note_text'] . ' '; + echo '' . $row['note_updated'] . ' '; echo ''; } echo ''; @@ -258,8 +258,8 @@ echo "
"; echo '
'; - if (isset($_POST[ 'remove' ])) { - if ($staffPerms[ 'editPlayer' ] == '1') { + if (isset($_POST['remove'])) { + if ($staffPerms['editPlayer'] == '1') { $licReset = str_replace ('1', '0', $player->civ_licenses); $sql = "UPDATE `players` SET `civ_licenses`='$licReset' WHERE uid ='$uidPlayer'"; $result = mysqli_query ($dbcon, $sql); @@ -268,9 +268,9 @@ logIt ($user, $message, $dbcon); } } - if (isset($_POST[ 'give' ])) { - $uidPlayer = $_POST[ 'hidden' ]; - if ($staffPerms[ 'editPlayer' ] == '1') { + if (isset($_POST['give'])) { + $uidPlayer = $_POST['hidden']; + if ($staffPerms['editPlayer'] == '1') { $licReset = str_replace ('0', '1', $player->civ_licenses); $sql = "UPDATE `players` SET `civ_licenses`='$licReset' WHERE uid ='$uidPlayer'"; $result = mysqli_query ($dbcon, $sql); diff --git a/functions.php b/functions.php index 5e3c8a4..319bd5d 100644 --- a/functions.php +++ b/functions.php @@ -29,22 +29,22 @@ function replace($string, $text) { function license($value, $staffPerms) { $val = remove ($value); $newVal = explode (',', $val); - if ($newVal[ 1 ] == 1) { - $display = explode ('_', $newVal[ 0 ]); - $displayN = $display[ '2' ]; - if ($staffPerms[ 'editPlayer' ] == '1') { - echo " '; + if ($newVal[1] == 1) { + $display = explode ('_', $newVal[0]); + $displayN = $display['2']; + if ($staffPerms['editPlayer'] == '1') { + echo " '; } else { - echo " '; + echo " '; } } else { - if ($newVal[ 0 ] != '') { - $display = explode ('_', $newVal[ 0 ]); - $displayN = $display[ '2' ]; - if ($staffPerms[ 'editPlayer' ] == '1') { - echo " '; + if ($newVal[0] != '') { + $display = explode ('_', $newVal[0]); + $displayN = $display['2']; + if ($staffPerms['editPlayer'] == '1') { + echo " '; } else { - echo " '; + echo " '; } } } diff --git a/gangs.php b/gangs.php index df82dc0..b42ac12 100755 --- a/gangs.php +++ b/gangs.php @@ -2,13 +2,13 @@ session_start (); ob_start (); -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: index.php'); die(); } -$user = $_SESSION[ 'user' ]; -$staffPerms = $_SESSION[ 'perms' ]; +$user = $_SESSION['user']; +$staffPerms = $_SESSION['perms']; ?> @@ -78,35 +78,35 @@ '; - echo '' . $row[ 'owner' ] . ' '; - echo '' . $row[ 'name' ] . ' '; + echo '' . $row['owner'] . ' '; + echo '' . $row['name'] . ' '; echo '' ?> '> + onBlur="dbSave(this.value, '', 'members', '')" + ; type=text value=''> '; echo '' ?> + onBlur="dbSave(this.value, '', 'maxmembers', '')" + ; type=text value=""> '; echo '' ?> + onBlur="dbSave(this.value, '', 'bank', '')" + ; type=text value=""> '; echo '' ?> + onBlur="dbSave(this.value, '', 'active', '')" + ; type=text value=""> '; diff --git a/header/header.php b/header/header.php index fd292d2..9d88e17 100644 --- a/header/header.php +++ b/header/header.php @@ -60,23 +60,23 @@
  • Dashboard
  • Players
  • Vehicles"; - case $staffPerms[ 'gangs' ] == '1': + case $staffPerms['gangs'] == '1': echo "
  • Gangs
  • "; - case $staffPerms[ 'housing' ] == '1': + case $staffPerms['housing'] == '1': echo "
  • Houses
  • "; - case $staffPerms[ 'logs' ] == '1': + case $staffPerms['logs'] == '1': echo "
  • Logs
  • "; - case $staffPerms[ 'money' ] == '1': + case $staffPerms['money'] == '1': echo "
  • Reimbursement Logs
  • "; - case $staffPerms[ 'notes' ] == '1': + case $staffPerms['notes'] == '1': echo "
  • Notes
  • "; - case $staffPerms[ 'superUser' ] == '1': + case $staffPerms['superUser'] == '1': echo "
  • Staff
  • "; - case $staffPerms[ 'steamView' ] == '1': + case $staffPerms['steamView'] == '1': echo "
  • Steam Accounts
  • "; } ?> diff --git a/help.php b/help.php index ed3a6c4..de57d99 100755 --- a/help.php +++ b/help.php @@ -2,11 +2,11 @@ session_start (); ob_start (); -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: index.php'); die(); } -$user = $_SESSION[ 'user' ]; +$user = $_SESSION['user']; include 'header/header.php'; ?> diff --git a/home.php b/home.php index f510144..c394ba4 100755 --- a/home.php +++ b/home.php @@ -3,16 +3,16 @@ session_start (); ob_start (); -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: index.php'); die(); } -$staffPerms = $_SESSION[ 'perms' ]; -$user = $_SESSION[ 'user' ]; +$staffPerms = $_SESSION['perms']; +$user = $_SESSION['user']; $conecG = 'work'; -$_SESSION[ 'conecFail' ] = $conecG; +$_SESSION['conecFail'] = $conecG; include 'verifyPanel.php'; masterconnect (); @@ -25,7 +25,7 @@ while ($row = mysqli_fetch_array ($sqldata, MYSQLI_ASSOC)) { ++$players; - $money = $money + $row[ 'cash' ] + $row[ 'bankacc' ]; + $money = $money + $row['cash'] + $row['bankacc']; } $sqlgetVeh = 'SELECT * FROM vehicles'; @@ -135,10 +135,10 @@ echo ''; echo '
    '; - if (isset($_POST[ 'send' ])) { - if ($staffPerms[ 'globalMessage' ] == '1') { - $send = $_POST[ 'global' ]; - $_SESSION[ 'send' ] = $send; + if (isset($_POST['send'])) { + if ($staffPerms['globalMessage'] == '1') { + $send = $_POST['global']; + $_SESSION['send'] = $send; header ('Location: rCon/rcon-mess.php'); $message = 'Admin ' . $user . ' has sent a global message (' . $send . ')'; logIt ($user, $message, $dbcon); @@ -148,8 +148,8 @@ } } - if (isset($_POST[ 'restart' ])) { - if ($staffPerms[ 'restartServer' ] == '1') { + if (isset($_POST['restart'])) { + if ($staffPerms['restartServer'] == '1') { $message = 'Admin ' . $user . ' has restarted the server.'; logIt ($user, $message, $dbcon); header ('Location: rCon/rcon-restart.php'); @@ -159,8 +159,8 @@ } } - if (isset($_POST[ 'stop' ])) { - if ($staffPerms[ 'stopServer' ] == '1') { + if (isset($_POST['stop'])) { + if ($staffPerms['stopServer'] == '1') { $message = 'Admin ' . $user . ' has stopped the server.'; logIt ($user, $message, $dbcon); header ('Location: rCon/rcon-stop.php'); @@ -170,7 +170,7 @@ } } - if (isset($_POST[ 'help' ])) { + if (isset($_POST['help'])) { header ('Location: help.php'); die(); } diff --git a/houses.php b/houses.php index 3b0d2a1..60d9967 100755 --- a/houses.php +++ b/houses.php @@ -2,13 +2,13 @@ session_start (); ob_start (); -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: index.php'); die(); } -$staffPerms = $_SESSION[ 'perms' ]; -$user = $_SESSION[ 'user' ]; +$staffPerms = $_SESSION['perms']; +$user = $_SESSION['user']; include 'verifyPanel.php'; masterconnect (); @@ -43,19 +43,19 @@ '; - echo '' . $row[ 'id' ] . ''; - echo '' . $row[ 'pid' ] . ' '; - echo '' . $row[ 'pos' ] . ' '; + echo '' . $row['id'] . ''; + echo '' . $row['pid'] . ' '; + echo '' . $row['pos'] . ' '; echo '' ?> + onBlur="dbSave(this.value, '', 'owned', '')" + type=text value=""> '; echo '
    '; echo '' . "'; - echo "" . ''; + echo "" . ''; echo '
    '; echo ''; diff --git a/index.php b/index.php index 5cc5517..6034946 100644 --- a/index.php +++ b/index.php @@ -1,8 +1,8 @@ = 5) { +if (isset($_SESSION['failedLogin'])) { + if ($_SESSION['failedLogin'] >= 5) { header ('Location: locked.php'); die(); } @@ -77,11 +77,11 @@ function checkTime(i) {
    Database connection failed!
    '; } - if (isset($_COOKIE[ 'fail' ]) && $_COOKIE[ 'fail' ] == '1') { + if (isset($_COOKIE['fail']) && $_COOKIE['fail'] == '1') { echo '
    Username or password incorrect.
    '; } ?> diff --git a/login.php b/login.php index b95f34b..ca8b795 100755 --- a/login.php +++ b/login.php @@ -4,7 +4,7 @@ session_start (); ob_start (); -if (isset($_SESSION[ 'logged' ])) { +if (isset($_SESSION['logged'])) { header ('Location: home.php'); die(); } @@ -20,20 +20,20 @@ } else { echo 'Database connected'; - if (isset($_COOKIE[ 'conecFail' ])): + if (isset($_COOKIE['conecFail'])): setcookie ('conecFail', '', time () - 7000000, '/'); endif; setcookie ('conecFail', '0'); } -$username = mysqli_real_escape_string ($dbconL, $_POST[ 'username' ]); -$password = mysqli_real_escape_string ($dbconL, $_POST[ 'password' ]); +$username = mysqli_real_escape_string ($dbconL, $_POST['username']); +$password = mysqli_real_escape_string ($dbconL, $_POST['password']); $encPass = hash ('sha256', $password); if ($username && $password) { - if (!isset($_SESSION[ 'failedLogin' ])) { + if (!isset($_SESSION['failedLogin'])) { $sql = "SELECT * FROM access WHERE address = '$_SERVER[REMOTE_ADDR]'"; $sqldata = mysqli_query ($dbconL, $sql) or die('Connection could not be established - LOG'); @@ -46,7 +46,7 @@ } $user = $sqldata->fetch_object (); - $_SESSION[ 'failedLogin' ] = $user->failed; + $_SESSION['failedLogin'] = $user->failed; if ($user->failed == 5) { echo 'something went wrong'; @@ -61,19 +61,19 @@ if ($numrows != 0) { while ($row = mysqli_fetch_assoc ($res)) { - $dbusername = $row[ 'username' ]; - $dbpassword = $row[ 'password' ]; + $dbusername = $row['username']; + $dbpassword = $row['password']; - if ($row[ 'permissions' ] !== '"[]"' && $row[ 'permissions' ] !== '') { - $return = explode ('],[', $row[ 'permissions' ]); + if ($row['permissions'] !== '"[]"' && $row['permissions'] !== '') { + $return = explode ('],[', $row['permissions']); foreach ( $return as $value ) { $val = remove ($value); $newVal = explode (',', $val); - if ($newVal[ 1 ] == 1) { - $perms[ $newVal[ 0 ] ] = 1; + if ($newVal[1] == 1) { + $perms[$newVal[0]] = 1; } else { - $perms[ $newVal[ 0 ] ] = 0; + $perms[$newVal[0]] = 0; } } } @@ -81,26 +81,26 @@ //block if ($username == $dbusername && $encPass == $dbpassword) { - if (isset($_COOKIE[ 'conecFail' ])): + if (isset($_COOKIE['conecFail'])): setcookie ('conecFail', '', time () - 7000000, '/'); endif; setcookie ('fail', '0'); - if (isset($_COOKIE[ 'fail' ])): + if (isset($_COOKIE['fail'])): setcookie ('fail', '', time () - 7000000, '/'); endif; $_SESSION = array(); - $_SESSION[ 'logged' ] = 1; - $_SESSION[ 'user' ] = $dbusername; - $_SESSION[ 'perms' ] = $perms; - $_SESSION[ 'failedLogin' ] = 0; + $_SESSION['logged'] = 1; + $_SESSION['user'] = $dbusername; + $_SESSION['perms'] = $perms; + $_SESSION['failedLogin'] = 0; $sqlget = "UPDATE access SET failed = 0 WHERE address = '$_SERVER[REMOTE_ADDR]'"; $res = mysqli_query ($dbconL, $sqlget); - if ($_SESSION[ 'failedLogin' ] >= 5) { + if ($_SESSION['failedLogin'] >= 5) { header ('Location: locked.php'); die(); } else { @@ -110,8 +110,8 @@ } else { echo 'Your user/password is incorrect!'; setcookie ('fail', '1'); - $_SESSION[ 'failedLogin' ] = $_SESSION[ 'failedLogin' ] + 1; - if ($_SESSION[ 'failedLogin' ] >= 5) { + $_SESSION['failedLogin'] = $_SESSION['failedLogin'] + 1; + if ($_SESSION['failedLogin'] >= 5) { header ('Location: locked.php'); die(); } else { @@ -122,8 +122,8 @@ } else { echo 'That user does not exist!'; setcookie ('fail', '1'); - $_SESSION[ 'failedLogin' ] = $_SESSION[ 'failedLogin' ] + 1; - if ($_SESSION[ 'failedLogin' ] >= 5) { + $_SESSION['failedLogin'] = $_SESSION['failedLogin'] + 1; + if ($_SESSION['failedLogin'] >= 5) { header ('Location: locked.php'); die(); } else { diff --git a/logout.php b/logout.php index 6bb6024..4a6d65b 100755 --- a/logout.php +++ b/logout.php @@ -1,17 +1,17 @@ '; echo ''; - echo '' . $row[ 'date_time' ] . ''; - echo '' . $row[ 'user' ] . ' '; - echo '' . $row[ 'action' ] . ' '; + echo '' . $row['date_time'] . ''; + echo '' . $row['user'] . ' '; + echo '' . $row['action'] . ' '; echo ''; echo ''; @@ -127,14 +127,14 @@ $b <= $amountPage; ++$b) { if ($b == $currentpage) { - ?> -
  • -
  • -
  • +
  • +
  • +
  • diff --git a/notes.php b/notes.php index d3c561a..20c2a69 100755 --- a/notes.php +++ b/notes.php @@ -2,15 +2,15 @@ session_start (); ob_start (); -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: index.php'); die(); } -$staffPerms = $_SESSION[ 'perms' ]; -$user = $_SESSION[ 'user' ]; +$staffPerms = $_SESSION['perms']; +$user = $_SESSION['user']; -if ($staffPerms[ 'notes' ] != '1') { +if ($staffPerms['notes'] != '1') { header ('Location: lvlError.php'); die(); } @@ -18,8 +18,8 @@ include 'verifyPanel.php'; masterconnect (); -if (isset($_POST[ 'search' ])) { - $valuetosearch = $_POST[ 'SearchValue' ]; +if (isset($_POST['search'])) { + $valuetosearch = $_POST['SearchValue']; $sqlget = "SELECT * FROM players WHERE CONCAT (`name`,`playerid`,`uid`, `aliases`) LIKE '%" . $valuetosearch . "%'"; $search_result = filterTable ($dbcon, $sqlget); if ($search_result == '') { @@ -81,28 +81,28 @@ while ($row = mysqli_fetch_array ($search_result, MYSQLI_ASSOC)) { echo '
    '; echo ''; - echo '' . $row[ 'uid' ] . ' '; - echo '' . $row[ 'name' ] . ' '; - echo '' . $row[ 'aliases' ] . ' '; + echo '' . $row['uid'] . ' '; + echo '' . $row['name'] . ' '; + echo '' . $row['aliases'] . ' '; echo '' . " "; echo '' . " "; echo '' . " '; - echo "" . ' '; + echo "" . ' '; echo ''; echo '
    '; } - if (isset($_POST[ 'update' ])) { + if (isset($_POST['update'])) { $sql = "SELECT * FROM `players` WHERE `uid` = $_POST[hidden]"; $result = mysqli_query ($dbcon, $sql); $player = $result->fetch_object (); $pid = playerID ($player); - if ($_POST[ 'note' ] != $player->note_text) { - $message = 'Admin ' . $user . ' has added the note (' . $_POST[ 'note' ] . ') to ' . $player->name . '(' . $pid . ')'; + if ($_POST['note'] != $player->note_text) { + $message = 'Admin ' . $user . ' has added the note (' . $_POST['note'] . ') to ' . $player->name . '(' . $pid . ')'; logIt ($user, $message, $dbcon); - $note = $_POST[ 'note' ]; + $note = $_POST['note']; $note = '"' . $note . '"'; $UpdateN = "INSERT INTO notes (uid, staff_name, name, alias, note_text, warning) VALUES ('$_POST[hidden]', '$user', '$player->name', '$player->aliases', '$note','$_POST[warn]')"; mysqli_query ($dbcon, $UpdateN); diff --git a/notesView.php b/notesView.php index f7692da..2e11071 100755 --- a/notesView.php +++ b/notesView.php @@ -2,15 +2,15 @@ session_start (); ob_start (); -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: index.php'); die(); } -$staffPerms = $_SESSION[ 'perms' ]; -$user = $_SESSION[ 'user' ]; +$staffPerms = $_SESSION['perms']; +$user = $_SESSION['user']; -if ($staffPerms[ 'notes' ] != '1') { +if ($staffPerms['notes'] != '1') { header ('Location: lvlError.php'); die(); } @@ -18,8 +18,8 @@ include 'verifyPanel.php'; masterconnect (); -if (isset($_POST[ 'search' ])) { - $valuetosearch = $_POST[ 'SearchValue' ]; +if (isset($_POST['search'])) { + $valuetosearch = $_POST['SearchValue']; $sqlget = "SELECT * FROM notes WHERE CONCAT (`name`) LIKE '%" . $valuetosearch . "%' ORDER BY note_id DESC"; $search_result = filterTable ($dbcon, $sqlget); } else { @@ -27,14 +27,14 @@ $search_result = filterTable ($dbcon, $sqlget); } -if (isset($_POST[ 'update' ])) { - $noteID = $_POST[ 'note_id' ]; - $uid = $_POST[ 'uid' ]; - $name = $_POST[ 'name' ]; - $text = $_POST[ 'note_text' ]; - $admin = $_POST[ 'admin' ]; +if (isset($_POST['update'])) { + $noteID = $_POST['note_id']; + $uid = $_POST['uid']; + $name = $_POST['name']; + $text = $_POST['note_text']; + $admin = $_POST['admin']; - if ($staffPerms[ 'superUser' ] == '1') { + if ($staffPerms['superUser'] == '1') { $sql = "DELETE FROM notes WHERE note_id='$noteID'"; mysqli_query ($dbcon, $sql); $message = 'Note (' . $text . ') placed on user (' . $name . ' ID - ' . $uid . ') by ' . $admin . ' was deleted by ' . $user; @@ -94,7 +94,7 @@ '; - switch ($row[ 'warning' ]) { + switch ($row['warning']) { default: echo ''; break; @@ -108,18 +108,18 @@ echo ''; break; } - echo '' . $row[ 'uid' ] . ' '; - echo '' . $row[ 'name' ] . ' '; - echo '' . $row[ 'alias' ] . ' '; - echo '' . $row[ 'note_text' ] . ' '; - echo '' . $row[ 'staff_name' ] . ' '; - echo '' . $row[ 'note_updated' ] . ' '; + echo '' . $row['uid'] . ' '; + echo '' . $row['name'] . ' '; + echo '' . $row['alias'] . ' '; + echo '' . $row['note_text'] . ' '; + echo '' . $row['staff_name'] . ' '; + echo '' . $row['note_updated'] . ' '; echo '' . "'; - echo "" . ''; - echo "" . ''; - echo "" . ''; - echo "" . ''; - echo "" . ''; + echo "" . ''; + echo "" . ''; + echo "" . ''; + echo "" . ''; + echo "" . ''; echo ''; echo ''; diff --git a/permissions.php b/permissions.php index 85837ed..929125d 100644 --- a/permissions.php +++ b/permissions.php @@ -4,12 +4,12 @@ ob_start (); $version = ''; -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: index.php'); die(); } -$user = $_SESSION[ 'user' ]; -$id = $_POST[ 'hiddenId' ]; +$user = $_SESSION['user']; +$id = $_POST['hiddenId']; include 'verifyPanel.php'; masterconnect (); @@ -46,10 +46,10 @@ foreach ( $return as $value ) { $val = remove ($value); $newVal = explode (',', $val); - if ($newVal[ 1 ] == 1) { - echo " '; + if ($newVal[1] == 1) { + echo " '; } else { - echo " '; + echo " '; } } diff --git a/players.php b/players.php index 7746c7b..f762027 100755 --- a/players.php +++ b/players.php @@ -1,18 +1,18 @@
    "; - case $staffPerms[ 'unban' ] == '1': + case $staffPerms['unban'] == '1': echo "
    "; - case $staffPerms[ 'kick' ] == '1': + case $staffPerms['kick'] == '1': echo "
    "; - case $staffPerms[ 'notes' ] == '1': + case $staffPerms['notes'] == '1': echo "
    @@ -180,39 +180,39 @@ '; - echo '' . $row[ 'uid' ] . ''; - echo '' . utf8_encode ($row[ 'name' ]) . ' '; - echo '' . utf8_encode ($alias[ 1 ]) . ' '; + echo '' . $row['uid'] . ''; + echo '' . utf8_encode ($row['name']) . ' '; + echo '' . utf8_encode ($alias[1]) . ' '; echo '' . $pid . ' '; echo '' . $return . ''; echo '' ?> + onBlur="dbSave(this.value, '', 'cash', '')" + ; type=text value=""> '; echo '' ?> + onBlur="dbSave(this.value, '', 'bankacc', '')" + ; type=text value=""> '; - outputSelection ($maxCop, 'coplevel', $row[ 'coplevel' ], $row[ 'uid' ]); - outputSelection ($maxMedic, 'mediclevel', $row[ 'mediclevel' ], $row[ 'uid' ]); - outputSelection ($maxAdmin, 'adminlevel', $row[ 'adminlevel' ], $row[ 'uid' ]); + outputSelection ($maxCop, 'coplevel', $row['coplevel'], $row['uid']); + outputSelection ($maxMedic, 'mediclevel', $row['mediclevel'], $row['uid']); + outputSelection ($maxAdmin, 'adminlevel', $row['adminlevel'], $row['uid']); echo ''; echo '' . "'; - echo "" . ' '; + echo "" . ' '; echo "" . ' '; echo '
    '; echo ''; @@ -257,20 +257,20 @@ $b <= $amountPage; ++$b) { if ($b >= $amount) { - ?> -
  • -
  • -
  • -
  • -
  • +
  • +
  • +
  • +
  • +
  • @@ -18,24 +18,24 @@


    name . '(' . $guid . ')'; logIt ($user, $message, $dbcon); @@ -116,11 +116,11 @@ $sqldata = mysqli_query ($dbcon, $sqlget) or die('Connection could not be established'); while ($row = mysqli_fetch_array ($sqldata, MYSQLI_ASSOC)) { - if ($row[ 'playerid' ] != '' || $row[ 'pid' ] != '') { - if ($row[ 'playerid' ] == '') { - $pid = $row[ 'pid' ]; + if ($row['playerid'] != '' || $row['pid'] != '') { + if ($row['playerid'] == '') { + $pid = $row['pid']; } else { - $pid = $row[ 'playerid' ]; + $pid = $row['playerid']; } } @@ -128,14 +128,14 @@ echo ''; echo "" . ''; - echo '' . $row[ 'name' ] . ' '; ?> + echo '' . $row['name'] . ' '; ?> - '; ?> + '; ?> Toggle Aliases - ' ?> + ' ?>
    - +
    @@ -144,7 +144,7 @@ echo '' . $pid . ' '; echo '' . "'; - echo "" . ''; + echo "" . ''; echo ''; echo ''; diff --git a/rCon/player.php b/rCon/player.php index 2ccd5df..e253910 100755 --- a/rCon/player.php +++ b/rCon/player.php @@ -2,15 +2,15 @@ session_start (); ob_start (); -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: ../index.php'); die(); } -$staffPerms = $_SESSION[ 'perms' ]; -$user = $_SESSION[ 'user' ]; +$staffPerms = $_SESSION['perms']; +$user = $_SESSION['user']; -if ($staffPerms[ 'ban' ] != '1') { +if ($staffPerms['ban'] != '1') { header ('Location: ../lvlError.php'); die(); } @@ -69,10 +69,10 @@


    '; - $reason = $_SESSION[ 'reason' ]; + $reason = $_SESSION['reason']; echo $reason; echo '
    '; - $time = $_SESSION[ 'time' ]; + $time = $_SESSION['time']; if ($time == '') { $time = 0; diff --git a/rCon/rcon-check.php b/rCon/rcon-check.php index ad08706..29683b2 100755 --- a/rCon/rcon-check.php +++ b/rCon/rcon-check.php @@ -5,11 +5,11 @@ if ($debug) { $time = microtime (); $time = explode (' ', $time); - $time = $time[ 1 ] + $time[ 0 ]; + $time = $time[1] + $time[0]; $start = $time; } -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: ../index.php'); die(); } @@ -114,9 +114,9 @@ ' . $players[ 1 ][ $i ] . ''; - echo '' . $players[ 5 ][ $i ] . ''; + foreach ( $players[1] as $match ) { + echo '' . $players[1][$i] . ''; + echo '' . $players[5][$i] . ''; ++$i; } echo ''; @@ -135,11 +135,11 @@ ' . $str[ 1 ][ $ii ] . ''; - echo '' . $str[ 2 ][ $ii ] . ''; - echo '' . $str[ 3 ][ $ii ] . ''; - echo '' . $str[ 4 ][ $ii ] . ''; + foreach ( $str[0] as $ban ) { + echo '' . $str[1][$ii] . ''; + echo '' . $str[2][$ii] . ''; + echo '' . $str[3][$ii] . ''; + echo '' . $str[4][$ii] . ''; ++$ii; } @@ -149,7 +149,7 @@ echo '
    '; $time = microtime (); $time = explode (' ', $time); - $time = $time[ 1 ] + $time[ 0 ]; + $time = $time[1] + $time[0]; $finish = $time; $total_time = round (($finish - $start), 4); echo 'Page generated in ' . $total_time . ' seconds.'; diff --git a/rCon/rcon-kick.php b/rCon/rcon-kick.php index 2b0eb73..437b2b3 100755 --- a/rCon/rcon-kick.php +++ b/rCon/rcon-kick.php @@ -3,14 +3,14 @@ session_start (); ob_start (); -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: ../index.php'); die(); } -$staffPerms = $_SESSION[ 'perms' ]; +$staffPerms = $_SESSION['perms']; -if ($staffPerms[ 'kick' ] != '1') { +if ($staffPerms['kick'] != '1') { header ('Location: ../lvlError.php'); die(); } @@ -20,7 +20,7 @@ include '../verifyPanel.php'; Rconconnect (); -$guid = $_SESSION[ 'guid' ]; +$guid = $_SESSION['guid']; if ($guid == '') { header ('Location: ../home.php'); @@ -28,7 +28,7 @@ echo $guid; echo '
    '; - $reason = $_SESSION[ 'reason' ]; + $reason = $_SESSION['reason']; echo $reason; echo '
    '; diff --git a/rCon/rcon-mess.php b/rCon/rcon-mess.php index bdb2edd..73f731c 100755 --- a/rCon/rcon-mess.php +++ b/rCon/rcon-mess.php @@ -3,13 +3,13 @@ session_start (); ob_start (); -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: ../index.php'); die(); } -$staffPerms = $_SESSION[ 'perms' ]; +$staffPerms = $_SESSION['perms']; -if ($staffPerms[ 'globalMessage' ] != '1') { +if ($staffPerms['globalMessage'] != '1') { header ('Location: ../lvlError.php'); die(); } @@ -19,7 +19,7 @@ include '../verifyPanel.php'; Rconconnect (); -$mess = $_SESSION[ 'send' ]; +$mess = $_SESSION['send']; if ($mess == '') { header ('Location: ../home.php'); diff --git a/rCon/rcon-restart.php b/rCon/rcon-restart.php index 481a6ee..e36ba9c 100755 --- a/rCon/rcon-restart.php +++ b/rCon/rcon-restart.php @@ -3,14 +3,14 @@ session_start (); ob_start (); -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: ../index.php'); die(); } -$staffPerms = $_SESSION[ 'perms' ]; +$staffPerms = $_SESSION['perms']; -if ($staffPerms[ 'restartServer' ] != '1') { +if ($staffPerms['restartServer'] != '1') { header ('Location: lvlError.php'); die(); } diff --git a/rCon/rcon-stop.php b/rCon/rcon-stop.php index 516672a..19fecd7 100755 --- a/rCon/rcon-stop.php +++ b/rCon/rcon-stop.php @@ -3,13 +3,13 @@ session_start (); ob_start (); -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: ../index.php'); die(); } -$staffPerms = $_SESSION[ 'perms' ]; +$staffPerms = $_SESSION['perms']; -if ($staffPerms[ 'stopServer' ] != '1') { +if ($staffPerms['stopServer'] != '1') { header ('Location: ../lvlError.php'); die(); } diff --git a/rCon/rcon-unBan.php b/rCon/rcon-unBan.php index f127b5b..00d7fb5 100755 --- a/rCon/rcon-unBan.php +++ b/rCon/rcon-unBan.php @@ -3,13 +3,13 @@ session_start (); ob_start (); -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: ../index.php'); die(); } -$staffPerms = $_SESSION[ 'perms' ]; +$staffPerms = $_SESSION['perms']; -if ($staffPerms[ 'unban' ] != '1') { +if ($staffPerms['unban'] != '1') { header ('Location: ../lvlError.php'); die(); } @@ -19,12 +19,12 @@ include '../verifyPanel.php'; Rconconnect (); -$banid = $_SESSION[ 'banid' ]; +$banid = $_SESSION['banid']; if ($banid == '') { header ('Location: ../home.php'); } else { - $reason = $_SESSION[ 'reason' ]; + $reason = $_SESSION['reason']; $delBan = $rcon->remove_ban ($banid); diff --git a/rCon/unBan.php b/rCon/unBan.php index 38bd7e2..8957a24 100755 --- a/rCon/unBan.php +++ b/rCon/unBan.php @@ -3,15 +3,15 @@ session_start (); ob_start (); -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: ../index.php'); die(); } -$user = $_SESSION[ 'user' ]; -$staffPerms = $_SESSION[ 'perms' ]; +$user = $_SESSION['user']; +$staffPerms = $_SESSION['perms']; -if ($staffPerms[ 'unban' ] != '1') { +if ($staffPerms['unban'] != '1') { header ('Location: ../lvlError.php'); die(); } @@ -95,12 +95,12 @@ echo ''; echo ''; - if (isset($_POST[ 'update' ])) { - $banid = $_POST[ 'banid' ]; - $guidUBan = $_POST[ 'guid' ]; + if (isset($_POST['update'])) { + $banid = $_POST['banid']; + $guidUBan = $_POST['guid']; - $_SESSION[ 'banid' ] = $banid; - $_SESSION[ 'guidUBan' ] = $guidUBan; + $_SESSION['banid'] = $banid; + $_SESSION['guidUBan'] = $guidUBan; if ($guidUBan != '' and $banid != '') { $message = 'Admin ' . $user . ' has unbanned ' . $guidUBan; diff --git a/reimbursement.php b/reimbursement.php index 476d522..065214f 100755 --- a/reimbursement.php +++ b/reimbursement.php @@ -2,18 +2,18 @@ session_start (); ob_start (); -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: index.php'); die(); } -$staffPerms = $_SESSION[ 'perms' ]; -$user = $_SESSION[ 'user' ]; +$staffPerms = $_SESSION['perms']; +$user = $_SESSION['user']; include 'verifyPanel.php'; masterconnect (); -if ($staffPerms[ 'money' ] != '1') { +if ($staffPerms['money'] != '1') { echo ""; header ('Location: lvlError.php'); die(); @@ -52,10 +52,10 @@ echo ''; - if (isset($_POST[ 'update' ])) { - $uid = $_POST[ 'uid' ]; - $amount = $_POST[ 'amount' ]; - $reason = $_POST[ 'reason' ]; + if (isset($_POST['update'])) { + $uid = $_POST['uid']; + $amount = $_POST['amount']; + $reason = $_POST['reason']; $UpdateQ = "INSERT INTO reimbursement_log (playerid,comp,reason,staff_name) VALUES ('$uid','$amount','$reason','$user');"; mysqli_query ($dbcon, $UpdateQ); @@ -88,12 +88,12 @@ '; - echo '' . $row[ 'reimbursement_id' ] . ''; - echo '' . $row[ 'playerid' ] . ' '; - echo '' . $row[ 'comp' ] . ' '; - echo '' . $row[ 'reason' ] . ' '; - echo '' . $row[ 'staff_name' ] . ' '; - echo '' . $row[ 'timestamp' ] . ' '; + echo '' . $row['reimbursement_id'] . ''; + echo '' . $row['playerid'] . ' '; + echo '' . $row['comp'] . ' '; + echo '' . $row['reason'] . ' '; + echo '' . $row['staff_name'] . ' '; + echo '' . $row['timestamp'] . ' '; echo ''; } diff --git a/settings.php b/settings.php index abd0eea..8e9f9c5 100755 --- a/settings.php +++ b/settings.php @@ -2,17 +2,17 @@ session_start (); ob_start (); -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: index.php'); die(); } -$staffPerms = $_SESSION[ 'perms' ]; -$user = $_SESSION[ 'user' ]; +$staffPerms = $_SESSION['perms']; +$user = $_SESSION['user']; include 'verifyPanel.php'; -if ($staffPerms[ 'superUser' ] != '1') { +if ($staffPerms['superUser'] != '1') { header ('Location: lvlError.php'); die(); } diff --git a/staff.php b/staff.php index 6e9dc7a..c3532f4 100755 --- a/staff.php +++ b/staff.php @@ -2,15 +2,15 @@ session_start (); ob_start (); -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: index.php'); die(); } -$staffPerms = $_SESSION[ 'perms' ]; -$user = $_SESSION[ 'user' ]; +$staffPerms = $_SESSION['perms']; +$user = $_SESSION['user']; -if ($staffPerms[ 'superUser' ] != '1') { +if ($staffPerms['superUser'] != '1') { header ('Location: lvlError.php'); die(); } @@ -61,7 +61,7 @@

    Staff account deleted!'; } - if (isset($_POST[ 'update' ])) { - if ($_POST[ 'password' ] == '') { + if (isset($_POST['update'])) { + if ($_POST['password'] == '') { $UpdateQ = "UPDATE users SET username='$_POST[username]' WHERE ID='$_POST[hidden]'"; mysqli_query ($dbconL, $UpdateQ); echo ''; } else { - $password = $_POST[ 'password' ]; + $password = $_POST['password']; $pass = hash ('sha256', $password); $UpdateQ = "UPDATE users SET username='$_POST[username]', password='$pass' WHERE ID='$_POST[hidden]'"; mysqli_query ($dbconL, $UpdateQ); @@ -109,15 +109,15 @@ while ($row = mysqli_fetch_array ($sqldata, MYSQLI_ASSOC)) { echo '
    '; echo ''; - echo '' . ""; echo '' . "'; echo '' . "'; - echo "" . ''; + echo "" . ''; echo '
    '; echo '
    '; echo '' . "'; - echo "" . ''; + echo "" . ''; echo '
    '; echo ''; } diff --git a/steam.php b/steam.php index 031fe5e..e9c5cfc 100644 --- a/steam.php +++ b/steam.php @@ -2,16 +2,16 @@ session_start (); ob_start (); -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: index.php'); die(); } -$user = $_SESSION[ 'user' ]; +$user = $_SESSION['user']; -$staffPerms = $_SESSION[ 'perms' ]; +$staffPerms = $_SESSION['perms']; -if ($staffPerms[ 'steamView' ] != '1') { +if ($staffPerms['steamView'] != '1') { header ('Location: lvlError.php'); die(); } @@ -46,19 +46,19 @@ '; - echo '' . $row[ 'name' ] . ''; - echo '' . $row[ 'aliases' ] . ' '; + echo '' . $row['name'] . ''; + echo '' . $row['aliases'] . ' '; echo '' . $pid . ' '; echo '' . $return . ''; echo "Steam Accounts"; diff --git a/updateSettings.php b/updateSettings.php index 7883dc3..479236d 100755 --- a/updateSettings.php +++ b/updateSettings.php @@ -2,58 +2,58 @@ session_start (); -$staffPerms = $_SESSION[ 'perms' ]; +$staffPerms = $_SESSION['perms']; -if ($staffPerms[ 'superUser' ] != '1') { +if ($staffPerms['superUser'] != '1') { header ('Location: lvlError.php'); die(); } $fail = false; -if ($_POST[ 'user' ] != '') { - $user = $_POST[ 'user' ]; +if ($_POST['user'] != '') { + $user = $_POST['user']; } else { echo 'error?'; $fail = true; } -if ($_POST[ 'pass' ] != '') { - $pass = $_POST[ 'pass' ]; +if ($_POST['pass'] != '') { + $pass = $_POST['pass']; } else { echo 'error?'; $fail = true; } -if ($_POST[ 'host' ] != '') { - $host = $_POST[ 'host' ]; +if ($_POST['host'] != '') { + $host = $_POST['host']; } else { echo 'error?'; $fail = true; } -if ($_POST[ 'name' ] != '') { - $name = $_POST[ 'name' ]; +if ($_POST['name'] != '') { + $name = $_POST['name']; } else { echo 'error?'; $fail = true; } -if ($_POST[ 'RHost' ] != '') { - $RHost = $_POST[ 'RHost' ]; +if ($_POST['RHost'] != '') { + $RHost = $_POST['RHost']; } else { echo 'error?'; $fail = true; } -if ($_POST[ 'RPass' ] != '') { - $RPass = $_POST[ 'RPass' ]; +if ($_POST['RPass'] != '') { + $RPass = $_POST['RPass']; } else { echo 'error?'; $fail = true; } -if ($_POST[ 'RPort' ] != '') { - $RPort = $_POST[ 'RPort' ]; +if ($_POST['RPort'] != '') { + $RPort = $_POST['RPort']; $RPort = (int)$RPort; } else { echo 'error?'; @@ -62,49 +62,49 @@ //max level checks -if ($_POST[ 'maxCop' ] != '') { - $maxCop = $_POST[ 'maxCop' ]; +if ($_POST['maxCop'] != '') { + $maxCop = $_POST['maxCop']; $maxCop = (int)$maxCop; } else { $maxCop = 7; } -if ($_POST[ 'maxMedic' ] != '') { - $maxMedic = $_POST[ 'maxMedic' ]; +if ($_POST['maxMedic'] != '') { + $maxMedic = $_POST['maxMedic']; $maxMedic = (int)$maxMedic; } else { $maxMedic = 5; } -if ($_POST[ 'maxAdmin' ] != '') { - $maxAdmin = $_POST[ 'maxAdmin' ]; +if ($_POST['maxAdmin'] != '') { + $maxAdmin = $_POST['maxAdmin']; $maxAdmin = (int)$maxAdmin; } else { $maxAdmin = 5; } -if ($_POST[ 'maxDonator' ] != '') { - $maxDonator = $_POST[ 'maxDonator' ]; +if ($_POST['maxDonator'] != '') { + $maxDonator = $_POST['maxDonator']; $maxDonator = (int)$maxDonator; } else { $maxDonator = 5; } -if ($_POST[ 'apiUser' ] != '') { - $apiUser = $_POST[ 'apiUser' ]; +if ($_POST['apiUser'] != '') { + $apiUser = $_POST['apiUser']; } else { $apiUser = 'default'; } -if ($_POST[ 'apiPass' ] != '') { - $apiPass = $_POST[ 'apiPass' ]; +if ($_POST['apiPass'] != '') { + $apiPass = $_POST['apiPass']; } else { $apiPass = 5; } -if ($_POST[ 'apiEnable' ] != '') { - if ($_POST[ 'apiEnable' ] == '1' || $_POST[ 'apiEnable' ] == '0') { - $apiEnable = $_POST[ 'apiEnable' ]; +if ($_POST['apiEnable'] != '') { + if ($_POST['apiEnable'] == '1' || $_POST['apiEnable'] == '0') { + $apiEnable = $_POST['apiEnable']; $apiEnable = (int)$apiEnable; } else { $apiEnable = 1; diff --git a/vehicles.php b/vehicles.php index 2cf7860..7e558e6 100755 --- a/vehicles.php +++ b/vehicles.php @@ -2,13 +2,13 @@ session_start (); ob_start (); -if (!isset($_SESSION[ 'logged' ])) { +if (!isset($_SESSION['logged'])) { header ('Location: index.php'); die(); } -$staffPerms = $_SESSION[ 'perms' ]; -$user = $_SESSION[ 'user' ]; +$staffPerms = $_SESSION['perms']; +$user = $_SESSION['user']; include 'verifyPanel.php'; masterconnect (); @@ -16,7 +16,7 @@ $resultQ = 'SELECT id FROM vehicles'; $result = mysqli_query ($dbcon, $resultQ) or die('Connection could not be established'); -$page1 = $_GET[ 'page' ]; +$page1 = $_GET['page']; if ($page1 == '' || $page1 == '1') { $page = 0; @@ -42,8 +42,8 @@ $addPage = $amount; } -if (isset($_POST[ 'search' ])) { - $valuetosearch = $_POST[ 'SearchValue' ]; +if (isset($_POST['search'])) { + $valuetosearch = $_POST['SearchValue']; $sqlget = "SELECT * FROM vehicles WHERE CONCAT (`pid`) LIKE '%" . $valuetosearch . "%'"; $sqldata = filterTable ($dbcon, $sqlget); } else { @@ -96,34 +96,34 @@ while ($row = mysqli_fetch_array ($sqldata, MYSQLI_ASSOC)) { //echo '
    '; echo ''; - echo '' . $row[ 'id' ] . ''; - echo '' . $row[ 'side' ] . ' '; + echo '' . $row['id'] . ''; + echo '' . $row['side'] . ' '; echo '' ?> + onBlur="dbSave(this.value, '', 'classname', '')" + ; type=text value=""> ' . $row[ 'pid' ] . ' '; - echo '' . $row[ 'type' ] . ' '; + echo '' . $row['pid'] . ' '; + echo '' . $row['type'] . ' '; echo '' ?> + onBlur="dbSave(this.value, '', 'alive', '')" + ; type=text value=""> ' ?> + onBlur="dbSave(this.value, '', 'active', '')" + ; type=text value=""> ' ?> + onBlur="dbSave(this.value, '', 'plate', '')" + ; type=text value=""> '; } @@ -171,22 +171,22 @@ $b <= $amountPage; ++$b) { if ($b >= $amount) { - ?> -
  • -
  • +
  • +
  • -
  • -
  • +
  • +
  • -
  • + } else { + ?> +
  • '; - if (isset($_POST[ 'update' ])) { - $guid = $_POST[ 'guid' ]; - $uid = $_POST[ 'uid' ]; + if (isset($_POST['update'])) { + $guid = $_POST['guid']; + $uid = $_POST['uid']; $UpdateQ = "INSERT INTO whitelist (user,uid,guid) VALUES ('$user','$uid','$guid');"; mysqli_query ($dbcon, $UpdateQ); } - if (isset($_POST[ 'delete' ])) { + if (isset($_POST['delete'])) { $sql = "DELETE FROM whitelist WHERE ID='$_POST[hidden]'"; mysqli_query ($dbcon, $sql); @@ -95,14 +95,14 @@ while ($row = mysqli_fetch_array ($search_result, MYSQLI_ASSOC)) { echo ''; echo ''; - echo '' . $row[ 'id' ] . ''; - echo '' . $row[ 'uid' ] . ''; - echo '' . $row[ 'guid' ] . ' '; - echo '' . $row[ 'user' ] . ' '; - echo '' . $row[ 'date_time' ] . ' '; + echo '' . $row['id'] . ''; + echo '' . $row['uid'] . ''; + echo '' . $row['guid'] . ' '; + echo '' . $row['user'] . ' '; + echo '' . $row['date_time'] . ' '; echo '' . "'; - echo "" . ''; + echo "" . ''; echo ''; echo '
  • '; }