@@ -18,7 +18,7 @@ |
||
| 18 | 18 | |
| 19 | 19 | if ($result_of_query->num_rows >= 1) { |
| 20 | 20 | while ($row = mysqli_fetch_assoc($result_of_query)) { |
| 21 | - if ($row['type'] == 'life'){ |
|
| 21 | + if ($row['type'] == 'life') { |
|
| 22 | 22 | ?> |
| 23 | 23 | <li class="list-primary"> |
| 24 | 24 | <i class=" fa fa-ellipsis-v"></i> |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | $settings = require('config/settings.php'); |
| 36 | 36 | $db_connection = masterConnect(); |
| 37 | 37 | |
| 38 | - $sql = "SELECT `sql_host`,`sql_name`,`sql_pass`,`sql_user` FROM `db` WHERE `dbid` = '" . $dbid . "';"; |
|
| 38 | + $sql = "SELECT `sql_host`,`sql_name`,`sql_pass`,`sql_user` FROM `db` WHERE `dbid` = '".$dbid."';"; |
|
| 39 | 39 | $server = $db_connection->query($sql); |
| 40 | 40 | |
| 41 | 41 | if ($server->num_rows === 1) { |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | |
| 101 | 101 | function nameID($pId, $db_link) |
| 102 | 102 | { |
| 103 | - $sql = "SELECT `name` FROM `players` WHERE `playerid` LIKE '" . $pId . "' "; |
|
| 103 | + $sql = "SELECT `name` FROM `players` WHERE `playerid` LIKE '".$pId."' "; |
|
| 104 | 104 | $result_of_query = $db_link->query($sql); |
| 105 | 105 | |
| 106 | 106 | if ($result_of_query->num_rows > 0) { |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | |
| 115 | 115 | function uID($pId, $db_link) |
| 116 | 116 | { |
| 117 | - $sql = "SELECT `uid` FROM `players` WHERE `playerid` = '" . $pId . "' "; |
|
| 117 | + $sql = "SELECT `uid` FROM `players` WHERE `playerid` = '".$pId."' "; |
|
| 118 | 118 | $result_of_query = $db_link->query($sql); |
| 119 | 119 | if ($result_of_query->num_rows > 0) { |
| 120 | 120 | while ($row = mysqli_fetch_assoc($result_of_query)) { |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | |
| 128 | 128 | function uIDname($uID, $db_link) |
| 129 | 129 | { |
| 130 | - $sql = "SELECT `name` FROM `players` WHERE `uid` = '" . $uID . "' "; |
|
| 130 | + $sql = "SELECT `name` FROM `players` WHERE `uid` = '".$uID."' "; |
|
| 131 | 131 | $result_of_query = $db_link->query($sql); |
| 132 | 132 | if ($result_of_query->num_rows > 0) { |
| 133 | 133 | while ($row = mysqli_fetch_assoc($result_of_query)) { |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | |
| 141 | 141 | function IDname($name, $db_link) |
| 142 | 142 | { |
| 143 | - $sql = "SELECT `name`,`playerid` FROM `players` WHERE `name` LIKE '%" . $name . "%' "; |
|
| 143 | + $sql = "SELECT `name`,`playerid` FROM `players` WHERE `name` LIKE '%".$name."%' "; |
|
| 144 | 144 | $result_of_query = $db_link->query($sql); |
| 145 | 145 | |
| 146 | 146 | if ($result_of_query->num_rows > 0) { |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | |
| 162 | 162 | if ($settings['logging']) { |
| 163 | 163 | $db_connection = masterConnect(); |
| 164 | - $sql = "INSERT INTO `logs` (`user`, `action`, `level`) VALUES ('" . $user . "', '" . $action . "', '" . $level . "');"; |
|
| 164 | + $sql = "INSERT INTO `logs` (`user`, `action`, `level`) VALUES ('".$user."', '".$action."', '".$level."');"; |
|
| 165 | 165 | $db_connection->query($sql); |
| 166 | 166 | } |
| 167 | 167 | } |
@@ -171,12 +171,12 @@ discard block |
||
| 171 | 171 | echo "<br><div class='row'><div class='col-lg-12'>"; |
| 172 | 172 | echo "<div class='alert alert-danger alert-dismissable'>"; |
| 173 | 173 | echo "<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>"; |
| 174 | - echo "<i class='fa fa-info-circle'></i> " . $text . "</div></div></div>"; |
|
| 174 | + echo "<i class='fa fa-info-circle'></i> ".$text."</div></div></div>"; |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | function error($errno, $errstr, $errfile, $errline) |
| 178 | 178 | { |
| 179 | - echo '<h4><b>PHP ERROR ' . $errno . '</b> ' . $errstr . ' - ' . $errfile . ':' . $errline . '</h4>'; |
|
| 179 | + echo '<h4><b>PHP ERROR '.$errno.'</b> '.$errstr.' - '.$errfile.':'.$errline.'</h4>'; |
|
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | /** |
@@ -223,19 +223,19 @@ discard block |
||
| 223 | 223 | case 37: |
| 224 | 224 | return $lang['noLic']; //No License |
| 225 | 225 | case 371: |
| 226 | - return $lang['no'] . ' ' . $lang['civil'] . ' ' . $lang['licenses']; //No Civillian Licenses |
|
| 226 | + return $lang['no'].' '.$lang['civil'].' '.$lang['licenses']; //No Civillian Licenses |
|
| 227 | 227 | case 372: |
| 228 | - return $lang['no'] . ' ' . $lang['medic'] . ' ' . $lang['licenses']; //No Medic Licenses |
|
| 228 | + return $lang['no'].' '.$lang['medic'].' '.$lang['licenses']; //No Medic Licenses |
|
| 229 | 229 | case 373: |
| 230 | - return $lang['no'] . ' ' . $lang['police'] . ' ' . $lang['licenses']; //No Police Licenses |
|
| 230 | + return $lang['no'].' '.$lang['police'].' '.$lang['licenses']; //No Police Licenses |
|
| 231 | 231 | case 38: |
| 232 | - return $lang['no'] . ' ' . $lang['gear']; //No License |
|
| 232 | + return $lang['no'].' '.$lang['gear']; //No License |
|
| 233 | 233 | case 381: |
| 234 | - return $lang['no'] . ' ' . $lang['civil'] . ' ' . $lang['gear']; //No Civillian Licenses |
|
| 234 | + return $lang['no'].' '.$lang['civil'].' '.$lang['gear']; //No Civillian Licenses |
|
| 235 | 235 | case 382: |
| 236 | - return $lang['no'] . ' ' . $lang['medic'] . ' ' . $lang['gear']; //No Medic Licenses |
|
| 236 | + return $lang['no'].' '.$lang['medic'].' '.$lang['gear']; //No Medic Licenses |
|
| 237 | 237 | case 383: |
| 238 | - return $lang['no'] . ' ' . $lang['police'] . ' ' . $lang['gear']; //No Police Licenses |
|
| 238 | + return $lang['no'].' '.$lang['police'].' '.$lang['gear']; //No Police Licenses |
|
| 239 | 239 | } |
| 240 | 240 | } |
| 241 | 241 | |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | $max = ceil($length / 40); |
| 245 | 245 | $random = ''; |
| 246 | 246 | for ($i = 0; $i < $max; $i++) { |
| 247 | - $random .= sha1(microtime(true) . mt_rand(10000, 90000)); |
|
| 247 | + $random .= sha1(microtime(true).mt_rand(10000, 90000)); |
|
| 248 | 248 | } |
| 249 | 249 | return substr($random, 0, $length); |
| 250 | 250 | } |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | { |
| 254 | 254 | $settings = require('config/settings.php'); |
| 255 | 255 | if (!empty($settings['steamAPI'])) { |
| 256 | - $api = "http://api.steampowered.com/ISteamUser/GetPlayerBans/v1/?key=" . $settings['steamAPI'] . "&steamids=" . $PID; |
|
| 256 | + $api = "http://api.steampowered.com/ISteamUser/GetPlayerBans/v1/?key=".$settings['steamAPI']."&steamids=".$PID; |
|
| 257 | 257 | $bans = json_decode(file_get_contents($api), true); |
| 258 | 258 | if ($bans['players']['0']['VACBanned']) { |
| 259 | 259 | return '<h4><span class="label label-danger" style="margin-left:3px; line-height:2;">VAC BANNED</span></h4>'; |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | function communityBanned($GUID) |
| 364 | 364 | { |
| 365 | 365 | $settings = require('config/settings.php'); |
| 366 | - $data = json_decode(file_get_contents("http://bans.itsyuka.tk/api/bans/player/id/" . $GUID . "/format/json/key/" . $settings['communityBansAPI']), true); |
|
| 366 | + $data = json_decode(file_get_contents("http://bans.itsyuka.tk/api/bans/player/id/".$GUID."/format/json/key/".$settings['communityBansAPI']), true); |
|
| 367 | 367 | |
| 368 | 368 | if ($data['level'] >= 1) { |
| 369 | 369 | return true; |
@@ -384,14 +384,14 @@ discard block |
||
| 384 | 384 | * @return String containing either just a URL or a complete image tag |
| 385 | 385 | * @source http://gravatar.com/site/implement/images/php/ |
| 386 | 386 | */ |
| 387 | -function get_gravatar( $email, $s = 80, $d = 'mm', $r = 'x', $img = false, $atts = array() ) { |
|
| 387 | +function get_gravatar($email, $s = 80, $d = 'mm', $r = 'x', $img = false, $atts = array()) { |
|
| 388 | 388 | $url = 'https://www.gravatar.com/avatar/'; |
| 389 | - $url .= md5( strtolower( trim( $email ) ) ); |
|
| 389 | + $url .= md5(strtolower(trim($email))); |
|
| 390 | 390 | $url .= "?s=$s&d=$d&r=$r"; |
| 391 | - if ( $img ) { |
|
| 392 | - $url = '<img src="' . $url . '"'; |
|
| 393 | - foreach ( $atts as $key => $val ) |
|
| 394 | - $url .= ' ' . $key . '="' . $val . '"'; |
|
| 391 | + if ($img) { |
|
| 392 | + $url = '<img src="'.$url.'"'; |
|
| 393 | + foreach ($atts as $key => $val) |
|
| 394 | + $url .= ' '.$key.'="'.$val.'"'; |
|
| 395 | 395 | $url .= ' />'; |
| 396 | 396 | } |
| 397 | 397 | return $url; |
@@ -31,8 +31,8 @@ discard block |
||
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | foreach ($settings['plugins'] as &$plugin) { |
| 34 | - if (file_exists("plugins/" . $plugin . "/lang/lang.php")) { |
|
| 35 | - include("plugins/" . $plugin . "/lang/lang.php"); |
|
| 34 | + if (file_exists("plugins/".$plugin."/lang/lang.php")) { |
|
| 35 | + include("plugins/".$plugin."/lang/lang.php"); |
|
| 36 | 36 | } |
| 37 | 37 | } |
| 38 | 38 | |
@@ -75,9 +75,9 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | $key = 0; |
| 77 | 77 | foreach ($settings['plugins'] as &$plugin) { |
| 78 | - if (file_exists("plugins/" . $plugin . "/plugin.json")) { |
|
| 79 | - if (file_exists("plugins/" . $plugin . "/init.php")) { |
|
| 80 | - include("plugins/" . $plugin . "/init.php"); |
|
| 78 | + if (file_exists("plugins/".$plugin."/plugin.json")) { |
|
| 79 | + if (file_exists("plugins/".$plugin."/init.php")) { |
|
| 80 | + include("plugins/".$plugin."/init.php"); |
|
| 81 | 81 | } |
| 82 | 82 | } else { |
| 83 | 83 | if (array_count_values($settings['plugins']) <= 1) { |
@@ -106,8 +106,8 @@ discard block |
||
| 106 | 106 | $_SESSION['formtoken'][1] = time(); |
| 107 | 107 | |
| 108 | 108 | if (isset($_GET['items'])) { |
| 109 | - if (in_array($_GET['items'],$settings['item'])) { |
|
| 110 | - $sql = "UPDATE `users` SET `items` = " . $_GET['items'] . " WHERE `user_id` = '" . $_SESSION['user_id'] . "' "; |
|
| 109 | + if (in_array($_GET['items'], $settings['item'])) { |
|
| 110 | + $sql = "UPDATE `users` SET `items` = ".$_GET['items']." WHERE `user_id` = '".$_SESSION['user_id']."' "; |
|
| 111 | 111 | $db_connection->query($sql); |
| 112 | 112 | $_SESSION['items'] = intval($_GET['items']); |
| 113 | 113 | } |
@@ -157,12 +157,12 @@ discard block |
||
| 157 | 157 | if ($query) { |
| 158 | 158 | $search = $url['path'][$settings['base'] + 1]; |
| 159 | 159 | } |
| 160 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1); |
|
| 160 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1); |
|
| 161 | 161 | $page = "views/life/messages.php"; |
| 162 | 162 | } else { |
| 163 | 163 | $err = errorMessage(5, $lang); |
| 164 | 164 | $page = "views/templates/error.php"; |
| 165 | - logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'messages'", 3); |
|
| 165 | + logAction($_SESSION['user_name'], $lang['failedAccess']." 'messages'", 3); |
|
| 166 | 166 | } |
| 167 | 167 | } |
| 168 | 168 | |
@@ -171,19 +171,19 @@ discard block |
||
| 171 | 171 | if ($query) { |
| 172 | 172 | $search = $url['path'][$settings['base'] + 1]; |
| 173 | 173 | } |
| 174 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1); |
|
| 174 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1); |
|
| 175 | 175 | $page = "views/life/players.php"; |
| 176 | 176 | } else { |
| 177 | 177 | $err = errorMessage(5, $lang); |
| 178 | 178 | $page = "views/templates/error.php"; |
| 179 | - logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'players'", 3); |
|
| 179 | + logAction($_SESSION['user_name'], $lang['failedAccess']." 'players'", 3); |
|
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | } elseif ($currentPage == 'editplayer') { |
| 183 | 183 | if ($_SESSION['permissions']['edit']['player']) { |
| 184 | 184 | if ($query) { |
| 185 | 185 | $uID = $url['path'][$settings['base'] + 1]; |
| 186 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1); |
|
| 186 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1); |
|
| 187 | 187 | $page = "views/life/editPlayer.php"; |
| 188 | 188 | } else { |
| 189 | 189 | $err = errorMessage(8, $lang); |
@@ -199,19 +199,19 @@ discard block |
||
| 199 | 199 | if ($query) { |
| 200 | 200 | $search = $url['path'][$settings['base'] + 1]; |
| 201 | 201 | } |
| 202 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1); |
|
| 202 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1); |
|
| 203 | 203 | $page = "views/life/vehicles.php"; |
| 204 | 204 | } else { |
| 205 | 205 | $err = errorMessage(5, $lang); |
| 206 | 206 | $page = "views/templates/error.php"; |
| 207 | - logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'vehicles'", 3); |
|
| 207 | + logAction($_SESSION['user_name'], $lang['failedAccess']." 'vehicles'", 3); |
|
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | } elseif ($currentPage == 'editveh') { |
| 211 | 211 | if ($_SESSION['permissions']['edit']['vehicles']) { |
| 212 | 212 | if ($query) { |
| 213 | 213 | $vehID = $url['path'][$settings['base'] + 1]; |
| 214 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1); |
|
| 214 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1); |
|
| 215 | 215 | $page = "views/life/editVeh.php"; |
| 216 | 216 | } else { |
| 217 | 217 | $err = errorMessage(8, $lang); |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | } else { |
| 221 | 221 | $err = errorMessage(5, $lang); |
| 222 | 222 | $page = "views/templates/error.php"; |
| 223 | - logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'editVeh'", 3); |
|
| 223 | + logAction($_SESSION['user_name'], $lang['failedAccess']." 'editVeh'", 3); |
|
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | } elseif ($currentPage == 'medic') { |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | if ($query) { |
| 229 | 229 | $search = $url['path'][$settings['base'] + 1]; |
| 230 | 230 | } |
| 231 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1); |
|
| 231 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1); |
|
| 232 | 232 | $page = "views/life/medics.php"; |
| 233 | 233 | } |
| 234 | 234 | } elseif ($currentPage == 'admins') { |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | if ($query) { |
| 237 | 237 | $search = $url['path'][$settings['base'] + 1]; |
| 238 | 238 | } |
| 239 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1); |
|
| 239 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1); |
|
| 240 | 240 | $page = "views/life/admins.php"; |
| 241 | 241 | } |
| 242 | 242 | } elseif ($currentPage == 'police') { |
@@ -244,12 +244,12 @@ discard block |
||
| 244 | 244 | if ($query) { |
| 245 | 245 | $search = $url['path'][$settings['base'] + 1]; |
| 246 | 246 | } |
| 247 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1); |
|
| 247 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1); |
|
| 248 | 248 | $page = "views/life/police.php"; |
| 249 | 249 | } else { |
| 250 | 250 | $err = errorMessage(5, $lang); |
| 251 | 251 | $page = "views/templates/error.php"; |
| 252 | - logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'houses'", 3); |
|
| 252 | + logAction($_SESSION['user_name'], $lang['failedAccess']." 'houses'", 3); |
|
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | } elseif ($currentPage == 'houses') { |
@@ -257,19 +257,19 @@ discard block |
||
| 257 | 257 | if ($query) { |
| 258 | 258 | $search = $url['path'][$settings['base'] + 1]; |
| 259 | 259 | } |
| 260 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1); |
|
| 260 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1); |
|
| 261 | 261 | $page = "views/life/houses.php"; |
| 262 | 262 | } else { |
| 263 | 263 | $err = errorMessage(5, $lang); |
| 264 | 264 | $page = "views/templates/error.php"; |
| 265 | - logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'houses'", 3); |
|
| 265 | + logAction($_SESSION['user_name'], $lang['failedAccess']." 'houses'", 3); |
|
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | } elseif ($currentPage == 'edithouse') { |
| 269 | 269 | if ($_SESSION['permissions']['edit']['houses']) { |
| 270 | 270 | if ($query) { |
| 271 | 271 | $hID = $url['path'][$settings['base'] + 1]; |
| 272 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1); |
|
| 272 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1); |
|
| 273 | 273 | $page = "views/life/editHouse.php"; |
| 274 | 274 | } else { |
| 275 | 275 | $err = errorMessage(8, $lang); |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | } else { |
| 279 | 279 | $err = errorMessage(5, $lang); |
| 280 | 280 | $page = "views/templates/error.php"; |
| 281 | - logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'editHouse'", 3); |
|
| 281 | + logAction($_SESSION['user_name'], $lang['failedAccess']." 'editHouse'", 3); |
|
| 282 | 282 | } |
| 283 | 283 | |
| 284 | 284 | } elseif ($currentPage == 'gangs') { |
@@ -286,19 +286,19 @@ discard block |
||
| 286 | 286 | if ($query) { |
| 287 | 287 | $search = $url['path'][$settings['base'] + 1]; |
| 288 | 288 | } |
| 289 | - logAction($_SESSION['user_name'], $lang['visited'] . " 'gangs'", 1); |
|
| 289 | + logAction($_SESSION['user_name'], $lang['visited']." 'gangs'", 1); |
|
| 290 | 290 | $page = "views/life/gangs.php"; |
| 291 | 291 | } else { |
| 292 | 292 | $err = errorMessage(5, $lang); |
| 293 | 293 | $page = "views/templates/error.php"; |
| 294 | - logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'gangs'", 3); |
|
| 294 | + logAction($_SESSION['user_name'], $lang['failedAccess']." 'gangs'", 3); |
|
| 295 | 295 | } |
| 296 | 296 | |
| 297 | 297 | } elseif ($currentPage == 'editgang') { |
| 298 | 298 | if ($_SESSION['permissions']['edit']['gangs']) { |
| 299 | 299 | if ($query) { |
| 300 | 300 | $gID = $url['path'][$settings['base'] + 1]; |
| 301 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1); |
|
| 301 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1); |
|
| 302 | 302 | $page = "views/life/editGang.php"; |
| 303 | 303 | } else { |
| 304 | 304 | $err = errorMessage(8, $lang); |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | } else { |
| 308 | 308 | $err = errorMessage(5, $lang); |
| 309 | 309 | $page = "views/templates/error.php"; |
| 310 | - logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'editGang'", 3); |
|
| 310 | + logAction($_SESSION['user_name'], $lang['failedAccess']." 'editGang'", 3); |
|
| 311 | 311 | } |
| 312 | 312 | |
| 313 | 313 | } elseif ($currentPage == 'wanted') { |
@@ -315,19 +315,19 @@ discard block |
||
| 315 | 315 | if ($query) { |
| 316 | 316 | $search = $url['path'][$settings['base'] + 1]; |
| 317 | 317 | } |
| 318 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1); |
|
| 318 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1); |
|
| 319 | 319 | $page = "views/life/wanted.php"; |
| 320 | 320 | } else { |
| 321 | 321 | $err = errorMessage(5, $lang); |
| 322 | 322 | $page = "views/templates/error.php"; |
| 323 | - logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'wanted'", 3); |
|
| 323 | + logAction($_SESSION['user_name'], $lang['failedAccess']." 'wanted'", 3); |
|
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | } elseif ($currentPage == 'editwanted') { |
| 327 | 327 | if ($_SESSION['permissions']['edit']['wanted']) { |
| 328 | 328 | if ($query) { |
| 329 | 329 | $wantedID = $url['path'][$settings['base'] + 1]; |
| 330 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1); |
|
| 330 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1); |
|
| 331 | 331 | $page = "views/life/editWanted.php"; |
| 332 | 332 | } else { |
| 333 | 333 | $err = errorMessage(8, $lang); |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | } else { |
| 337 | 337 | $err = errorMessage(5, $lang); |
| 338 | 338 | $page = "views/templates/error.php"; |
| 339 | - logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'editWanted'", 3); |
|
| 339 | + logAction($_SESSION['user_name'], $lang['failedAccess']." 'editWanted'", 3); |
|
| 340 | 340 | } |
| 341 | 341 | } |
| 342 | 342 | |
@@ -348,7 +348,7 @@ discard block |
||
| 348 | 348 | } elseif ($currentPage == 'editveh') { |
| 349 | 349 | if ($query) { |
| 350 | 350 | $vehID = $url['path'][$settings['base'] + 1]; |
| 351 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1); |
|
| 351 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1); |
|
| 352 | 352 | $page = "views/steam/life/editVeh.php"; |
| 353 | 353 | } else { |
| 354 | 354 | $err = errorMessage(8, $lang); |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | } elseif ($currentPage == 'edithouse') { |
| 358 | 358 | if ($query) { |
| 359 | 359 | $hID = $url['path'][$settings['base'] + 1]; |
| 360 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 1); |
|
| 360 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 1); |
|
| 361 | 361 | $page = "views/steam/life/editHouse.php"; |
| 362 | 362 | } else { |
| 363 | 363 | $err = errorMessage(8, $lang); |
@@ -368,7 +368,7 @@ discard block |
||
| 368 | 368 | } |
| 369 | 369 | if ($currentPage == 'newdb' || $currentPage == 'newserver' || $currentPage == 'settings' || $currentPage == 'editstaff' || $currentPage == 'staff' || $currentPage == 'pluginstore' || $currentPage == 'newuser' || $currentPage == 'logs') { |
| 370 | 370 | if (isset($_POST['passTest'])) { |
| 371 | - $sql = "SELECT user_password_hash FROM users WHERE user_id = '" . $_SESSION['user_id'] . "';"; |
|
| 371 | + $sql = "SELECT user_password_hash FROM users WHERE user_id = '".$_SESSION['user_id']."';"; |
|
| 372 | 372 | $pass = $db_connection->query($sql)->fetch_object()->user_password_hash; |
| 373 | 373 | if (password_verify($_POST['passTest'], $pass)) { |
| 374 | 374 | $_SESSION['sudo'] = time(); |
@@ -381,38 +381,38 @@ discard block |
||
| 381 | 381 | } else { |
| 382 | 382 | if ($currentPage == 'newdb') { |
| 383 | 383 | if ($_SESSION['permissions']['super_admin']) { |
| 384 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 2); |
|
| 384 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 2); |
|
| 385 | 385 | $page = "views/core/newDB.php"; |
| 386 | 386 | } else { |
| 387 | 387 | $err = errorMessage(5, $lang); |
| 388 | 388 | $page = "views/templates/error.php"; |
| 389 | - logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'newDB'", 3); |
|
| 389 | + logAction($_SESSION['user_name'], $lang['failedAccess']." 'newDB'", 3); |
|
| 390 | 390 | } |
| 391 | 391 | } elseif ($currentPage == 'newserver') { |
| 392 | 392 | if ($_SESSION['permissions']['super_admin']) { |
| 393 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 2); |
|
| 393 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 2); |
|
| 394 | 394 | $page = "views/core/newServer.php"; |
| 395 | 395 | } else { |
| 396 | 396 | $err = errorMessage(5, $lang); |
| 397 | 397 | $page = "views/templates/error.php"; |
| 398 | - logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'newServer'", 3); |
|
| 398 | + logAction($_SESSION['user_name'], $lang['failedAccess']." 'newServer'", 3); |
|
| 399 | 399 | } |
| 400 | 400 | |
| 401 | 401 | } elseif ($currentPage == 'settings') { |
| 402 | 402 | if ($_SESSION['permissions']['super_admin']) { |
| 403 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 2); |
|
| 403 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 2); |
|
| 404 | 404 | $page = "views/core/settings.php"; |
| 405 | 405 | } else { |
| 406 | 406 | $err = errorMessage(5, $lang); |
| 407 | 407 | $page = "views/templates/error.php"; |
| 408 | - logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'settings'", 3); |
|
| 408 | + logAction($_SESSION['user_name'], $lang['failedAccess']." 'settings'", 3); |
|
| 409 | 409 | } |
| 410 | 410 | |
| 411 | 411 | } elseif ($currentPage == 'editstaff') { |
| 412 | 412 | if ($_SESSION['permissions']['edit']['staff']) { |
| 413 | 413 | if ($query) { |
| 414 | 414 | $uId = $url['path'][$settings['base'] + 1]; |
| 415 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 2); |
|
| 415 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 2); |
|
| 416 | 416 | $page = "views/core/editStaff.php"; |
| 417 | 417 | } else { |
| 418 | 418 | $err = errorMessage(8, $lang); |
@@ -420,38 +420,38 @@ discard block |
||
| 420 | 420 | } |
| 421 | 421 | } else { |
| 422 | 422 | $err = errorMessage(5, $lang); $page = "views/templates/error.php"; |
| 423 | - logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'editStaff'", 3); |
|
| 423 | + logAction($_SESSION['user_name'], $lang['failedAccess']." 'editStaff'", 3); |
|
| 424 | 424 | } |
| 425 | 425 | } elseif ($currentPage == 'staff') { |
| 426 | 426 | if ($_SESSION['permissions']['view']['staff']) { |
| 427 | 427 | if ($query) { |
| 428 | 428 | $search = $url['path'][$settings['base'] + 1]; |
| 429 | 429 | } |
| 430 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 2); |
|
| 430 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 2); |
|
| 431 | 431 | $page = "views/core/staff.php"; |
| 432 | 432 | } else { |
| 433 | 433 | $err = errorMessage(5, $lang); $page = "views/templates/error.php"; |
| 434 | - logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'staff'", 3); |
|
| 434 | + logAction($_SESSION['user_name'], $lang['failedAccess']." 'staff'", 3); |
|
| 435 | 435 | } |
| 436 | 436 | |
| 437 | 437 | } elseif ($currentPage == 'pluginstore') { |
| 438 | 438 | if ($_SESSION['permissions']['super_admin']) { |
| 439 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 2); |
|
| 439 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 2); |
|
| 440 | 440 | $page = "views/core/pluginstore.php"; |
| 441 | 441 | } else { |
| 442 | 442 | $err = errorMessage(5, $lang); $page = "views/templates/error.php"; |
| 443 | - logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'pluginstore'", 3); |
|
| 443 | + logAction($_SESSION['user_name'], $lang['failedAccess']." 'pluginstore'", 3); |
|
| 444 | 444 | } |
| 445 | 445 | |
| 446 | 446 | } elseif ($currentPage == 'newuser') { |
| 447 | 447 | if ($_SESSION['permissions']['edit']['staff']) { |
| 448 | 448 | require_once("classes/registration.php"); |
| 449 | 449 | $registration = new Registration(); |
| 450 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 2); |
|
| 450 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 2); |
|
| 451 | 451 | $page = "views/core/newUser.php"; |
| 452 | 452 | } else { |
| 453 | 453 | $err = errorMessage(5, $lang); $page = "views/templates/error.php"; |
| 454 | - logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'newUser'", 3); |
|
| 454 | + logAction($_SESSION['user_name'], $lang['failedAccess']." 'newUser'", 3); |
|
| 455 | 455 | } |
| 456 | 456 | |
| 457 | 457 | } elseif ($currentPage == 'logs' && $settings['logging']) { |
@@ -459,11 +459,11 @@ discard block |
||
| 459 | 459 | if ($query) { |
| 460 | 460 | $search = $url['path'][$settings['base'] + 1]; |
| 461 | 461 | } |
| 462 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 2); |
|
| 462 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 2); |
|
| 463 | 463 | $page = "views/core/logs.php"; |
| 464 | 464 | } else { |
| 465 | 465 | $err = errorMessage(5, $lang); $page = "views/templates/error.php"; |
| 466 | - logAction($_SESSION['user_name'], $lang['failedAccess'] . " 'noPerm'", 3); |
|
| 466 | + logAction($_SESSION['user_name'], $lang['failedAccess']." 'noPerm'", 3); |
|
| 467 | 467 | } |
| 468 | 468 | } |
| 469 | 469 | } |
@@ -473,7 +473,7 @@ discard block |
||
| 473 | 473 | if ($_SESSION['permissions']['view']['curplayer']) { |
| 474 | 474 | if ($query) { |
| 475 | 475 | $sid = $url['path'][$settings['base'] + 1]; |
| 476 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 2); |
|
| 476 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 2); |
|
| 477 | 477 | $page = "views/core/curPlayers.php"; |
| 478 | 478 | } else { |
| 479 | 479 | $err = errorMessage(8, $lang); |
@@ -482,21 +482,21 @@ discard block |
||
| 482 | 482 | } |
| 483 | 483 | } elseif ($currentPage == 'servers') { |
| 484 | 484 | if ($_SESSION['permissions']['super_admin']) { |
| 485 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 2); |
|
| 485 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 2); |
|
| 486 | 486 | $page = "views/core/servers.php"; |
| 487 | 487 | } |
| 488 | 488 | } elseif ($currentPage == 'editserver') { |
| 489 | 489 | if ($_SESSION['permissions']['super_admin']) { |
| 490 | 490 | if ($query) { |
| 491 | 491 | $id = $url['path'][$settings['base'] + 1]; |
| 492 | - logAction($_SESSION['user_name'], $lang['visited'] . " '" . $currentPage . "'", 2); |
|
| 492 | + logAction($_SESSION['user_name'], $lang['visited']." '".$currentPage."'", 2); |
|
| 493 | 493 | $page = "views/core/editServer.php"; |
| 494 | 494 | } else {$err = errorMessage(8, $lang); $page = "views/templates/error.php"; } |
| 495 | 495 | } else {$err = errorMessage(5, $lang); $page = "views/templates/error.php"; } |
| 496 | 496 | } |
| 497 | 497 | foreach ($settings['plugins'] as &$plugin) { |
| 498 | - if (file_exists("plugins/" . $plugin . "/pageRules.php")) { |
|
| 499 | - include("plugins/" . $plugin . "/pageRules.php"); |
|
| 498 | + if (file_exists("plugins/".$plugin."/pageRules.php")) { |
|
| 499 | + include("plugins/".$plugin."/pageRules.php"); |
|
| 500 | 500 | } |
| 501 | 501 | } |
| 502 | 502 | |
@@ -527,11 +527,11 @@ discard block |
||
| 527 | 527 | $page = 'views/core/2factor.php'; |
| 528 | 528 | } elseif ($_SESSION['2factor'] == 1 || $_SESSION['2factor'] == 3) { |
| 529 | 529 | if (isset($_POST['code'])) { |
| 530 | - $sql = "SELECT `twoFactor` FROM `users` WHERE `user_id` = '" . $_SESSION['user_id'] . "';"; |
|
| 530 | + $sql = "SELECT `twoFactor` FROM `users` WHERE `user_id` = '".$_SESSION['user_id']."';"; |
|
| 531 | 531 | $user = $db_connection->query($sql)->fetch_object(); |
| 532 | 532 | if ($gauth->verifyCode($user->twoFactor, $_POST['code'])) $_SESSION['2factor'] = 2; |
| 533 | 533 | else { |
| 534 | - $sql = "SELECT `backup` FROM `users` WHERE `user_id` = '" . $_SESSION['user_id'] . "';"; |
|
| 534 | + $sql = "SELECT `backup` FROM `users` WHERE `user_id` = '".$_SESSION['user_id']."';"; |
|
| 535 | 535 | $user = $db_connection->query($sql)->fetch_object(); |
| 536 | 536 | if ($user->backup == $_POST['code']) { |
| 537 | 537 | $_SESSION['2factor'] = 2; |
@@ -1,21 +1,21 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | $db_link = serverConnect(); |
| 3 | 3 | |
| 4 | -$max = 'LIMIT ' . ($pageNum - 1) * $_SESSION['items'] . ',' . $_SESSION['items']; |
|
| 4 | +$max = 'LIMIT '.($pageNum - 1) * $_SESSION['items'].','.$_SESSION['items']; |
|
| 5 | 5 | |
| 6 | 6 | if (isset($search)) { |
| 7 | - $sql = "SELECT `uid` FROM `players` WHERE `uid` LIKE '" . $search . "' OR `name` LIKE '%" . $search . "%' OR `playerid` LIKE '" . $search . "';"; |
|
| 7 | + $sql = "SELECT `uid` FROM `players` WHERE `uid` LIKE '".$search."' OR `name` LIKE '%".$search."%' OR `playerid` LIKE '".$search."';"; |
|
| 8 | 8 | $result_of_query = $db_link->query($sql); |
| 9 | 9 | $total_records = mysqli_num_rows($result_of_query); |
| 10 | 10 | if ($pageNum > $total_records) $pageNum = $total_records; |
| 11 | - $sql = "SELECT `playerid`,`name`,`bankacc`,`cash`,`coplevel`,`mediclevel`,`adminlevel`,`uid` FROM `players` WHERE `uid` LIKE '" . $search . "' OR `name` LIKE '%" . $search . "%' OR `playerid` LIKE '" . $search . "'" . $max . " ;"; |
|
| 12 | - logAction($_SESSION['user_name'], $lang['searched'] . ' (' . $search . ') ' . $lang['in'] . ' ' . $lang['players'], 1); |
|
| 11 | + $sql = "SELECT `playerid`,`name`,`bankacc`,`cash`,`coplevel`,`mediclevel`,`adminlevel`,`uid` FROM `players` WHERE `uid` LIKE '".$search."' OR `name` LIKE '%".$search."%' OR `playerid` LIKE '".$search."'".$max." ;"; |
|
| 12 | + logAction($_SESSION['user_name'], $lang['searched'].' ('.$search.') '.$lang['in'].' '.$lang['players'], 1); |
|
| 13 | 13 | } else { |
| 14 | 14 | $sql = "SELECT `uid` FROM `players`;"; |
| 15 | 15 | $result_of_query = $db_link->query($sql); |
| 16 | 16 | $total_records = mysqli_num_rows($result_of_query); |
| 17 | 17 | if ($pageNum > $total_records) $pageNum = $total_records; |
| 18 | - $sql = "SELECT `playerid`,`name`,`bankacc`,`cash`,`coplevel`,`mediclevel`,`adminlevel`,`uid` FROM `players` " . $max . " ;"; |
|
| 18 | + $sql = "SELECT `playerid`,`name`,`bankacc`,`cash`,`coplevel`,`mediclevel`,`adminlevel`,`uid` FROM `players` ".$max." ;"; |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | $result_of_query = $db_link->query($sql); |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | } |
| 26 | 26 | $pids = implode(',', $pids); |
| 27 | 27 | if ($settings['steamAPI'] && $_SESSION['permissions']['view']['steam'] && !$settings['performance'] && $settings['vacTest']) { |
| 28 | - $api = "http://api.steampowered.com/ISteamUser/GetPlayerBans/v1/?key=" . $settings['steamAPI'] . "&steamids=" . $pids; |
|
| 28 | + $api = "http://api.steampowered.com/ISteamUser/GetPlayerBans/v1/?key=".$settings['steamAPI']."&steamids=".$pids; |
|
| 29 | 29 | $bans = get_object_vars(json_decode(file_get_contents($api))); |
| 30 | 30 | $bans = $bans['players']; |
| 31 | 31 | $steamPlayers = count($bans); |
@@ -57,9 +57,9 @@ discard block |
||
| 57 | 57 | <th class="hidden-xs"><i class="fa fa-ambulance"></i> <?php echo $lang['medic']; ?></th> |
| 58 | 58 | <th class="hidden-xs"><i class="fa fa-cogs"></i> <?php echo $lang['admin']; ?></th> |
| 59 | 59 | <?php if ($_SESSION['permissions']['edit']['player']) { |
| 60 | - echo '<th class="hidden-xs"><i class="fa fa-pencil"></i> ' . $lang['edit'] . '</th>'; |
|
| 60 | + echo '<th class="hidden-xs"><i class="fa fa-pencil"></i> '.$lang['edit'].'</th>'; |
|
| 61 | 61 | } else { |
| 62 | - echo '<th class="hidden-xs"><i class="fa fa-eye"></i>' . $lang['view'] . '</th>'; |
|
| 62 | + echo '<th class="hidden-xs"><i class="fa fa-eye"></i>'.$lang['view'].'</th>'; |
|
| 63 | 63 | } |
| 64 | 64 | if ($_SESSION['permissions']['view']['steam'] && $steamPlayers > 0) { |
| 65 | 65 | echo '<th class="hidden-xs"><i class="fa fa-fw fa-steam"></i> Steam</th>'; |
@@ -71,30 +71,30 @@ discard block |
||
| 71 | 71 | while ($row = mysqli_fetch_assoc($result_of_query)) { |
| 72 | 72 | $playersID = $row["playerid"]; |
| 73 | 73 | echo "<tr>"; |
| 74 | - echo "<td>" . $row["name"] . "</td>"; |
|
| 75 | - echo "<td>" . $playersID . "</td>"; |
|
| 76 | - echo "<td class='hidden-xs'>" . $row["cash"] . "</td>"; |
|
| 77 | - echo "<td class='hidden-xs'>" . $row["bankacc"] . "</td>"; |
|
| 78 | - echo "<td class='hidden-xs'>" . $row["coplevel"] . "</td>"; |
|
| 79 | - echo "<td class='hidden-xs'>" . $row["mediclevel"] . "</td>"; |
|
| 80 | - echo "<td class='hidden-xs'>" . $row["adminlevel"] . "</td>"; |
|
| 74 | + echo "<td>".$row["name"]."</td>"; |
|
| 75 | + echo "<td>".$playersID."</td>"; |
|
| 76 | + echo "<td class='hidden-xs'>".$row["cash"]."</td>"; |
|
| 77 | + echo "<td class='hidden-xs'>".$row["bankacc"]."</td>"; |
|
| 78 | + echo "<td class='hidden-xs'>".$row["coplevel"]."</td>"; |
|
| 79 | + echo "<td class='hidden-xs'>".$row["mediclevel"]."</td>"; |
|
| 80 | + echo "<td class='hidden-xs'>".$row["adminlevel"]."</td>"; |
|
| 81 | 81 | if ($_SESSION['permissions']['edit']['player']) { |
| 82 | - echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editPlayer/" . $row["uid"] . "'>"; |
|
| 82 | + echo "<td><a class='btn btn-primary btn-xs' href='".$settings['url']."editPlayer/".$row["uid"]."'>"; |
|
| 83 | 83 | echo "<i class='fa fa-pencil'></i></a></td>"; |
| 84 | 84 | } else { |
| 85 | - echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editPlayer/" . $row["uid"] . "'>"; |
|
| 85 | + echo "<td><a class='btn btn-primary btn-xs' href='".$settings['url']."editPlayer/".$row["uid"]."'>"; |
|
| 86 | 86 | echo "<i class='fa fa-eye'></i></a></td>"; |
| 87 | 87 | } |
| 88 | 88 | if ($_SESSION['permissions']['view']['steam'] && $steamPlayers > 0) { |
| 89 | - echo "<td><a href='http://steamcommunity.com/profiles/" . $row["playerid"] . "' "; |
|
| 89 | + echo "<td><a href='http://steamcommunity.com/profiles/".$row["playerid"]."' "; |
|
| 90 | 90 | for ($player = 0; $player <= $steamPlayers; $player++) { |
| 91 | 91 | if ($bans[$player]->SteamId == $row['playerid']) { |
| 92 | 92 | if ($bans[$player]->VACBanned == true) { |
| 93 | - echo "<td><a href='http://steamcommunity.com/profiles/" . $row["playerid"] . "' "; |
|
| 93 | + echo "<td><a href='http://steamcommunity.com/profiles/".$row["playerid"]."' "; |
|
| 94 | 94 | echo "class='btn btn-danger btn-xs hidden-xs' target='_blank'><i class='fa fa-steam'></i></a>"; |
| 95 | 95 | |
| 96 | 96 | } else { |
| 97 | - echo "<td><a href='http://steamcommunity.com/profiles/" . $row["playerid"] . "' "; |
|
| 97 | + echo "<td><a href='http://steamcommunity.com/profiles/".$row["playerid"]."' "; |
|
| 98 | 98 | echo "class='btn btn-primary btn-xs hidden-xs' target='_blank'><i class='fa fa-steam'></i></a>"; } |
| 99 | 99 | } |
| 100 | 100 | } |
@@ -107,4 +107,4 @@ discard block |
||
| 107 | 107 | ?> |
| 108 | 108 | </div> |
| 109 | 109 | <?php |
| 110 | -} else echo '<h3>' . errorMessage(36, $lang) . '</h3>'; |
|
| 110 | +} else echo '<h3>'.errorMessage(36, $lang).'</h3>'; |
|
@@ -1,21 +1,21 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | $db_link = serverConnect(); |
| 3 | 3 | |
| 4 | -$max = 'LIMIT ' . ($pageNum - 1) * $_SESSION['items'] . ',' . $_SESSION['items']; |
|
| 4 | +$max = 'LIMIT '.($pageNum - 1) * $_SESSION['items'].','.$_SESSION['items']; |
|
| 5 | 5 | |
| 6 | 6 | if (isset($search)) { |
| 7 | - $sql = "SELECT `uid` FROM `players` WHERE `uid` LIKE '" . $search . "' OR `name` LIKE '%" . $search . "%' OR `playerid` LIKE '" . $search . "' AND `coplevel` >= '1' ORDER BY `coplevel` DESC;"; |
|
| 7 | + $sql = "SELECT `uid` FROM `players` WHERE `uid` LIKE '".$search."' OR `name` LIKE '%".$search."%' OR `playerid` LIKE '".$search."' AND `coplevel` >= '1' ORDER BY `coplevel` DESC;"; |
|
| 8 | 8 | $result_of_query = $db_link->query($sql); |
| 9 | 9 | $total_records = mysqli_num_rows($result_of_query); |
| 10 | 10 | if ($pageNum > $total_records) $pageNum = $total_records; |
| 11 | - $sql = "SELECT `name`,`coplevel`,`playerid`,`uid` FROM `players` WHERE `uid` LIKE '" . $search . "' OR `name` LIKE '%" . $search . "%' OR `playerid` LIKE '" . $search . "' AND `coplevel` >= '1' ORDER BY `coplevel` DESC " . $max . " ;"; |
|
| 12 | - logAction($_SESSION['user_name'], $lang['searched'] . ' (' . $search . ') ' . $lang['in'] . ' ' . $lang['players'], 1); |
|
| 11 | + $sql = "SELECT `name`,`coplevel`,`playerid`,`uid` FROM `players` WHERE `uid` LIKE '".$search."' OR `name` LIKE '%".$search."%' OR `playerid` LIKE '".$search."' AND `coplevel` >= '1' ORDER BY `coplevel` DESC ".$max." ;"; |
|
| 12 | + logAction($_SESSION['user_name'], $lang['searched'].' ('.$search.') '.$lang['in'].' '.$lang['players'], 1); |
|
| 13 | 13 | } else { |
| 14 | 14 | $sql = "SELECT `uid` FROM `players` WHERE `coplevel` >= '1' ORDER BY `coplevel` DESC;"; |
| 15 | 15 | $result_of_query = $db_link->query($sql); |
| 16 | 16 | $total_records = mysqli_num_rows($result_of_query); |
| 17 | 17 | if ($pageNum > $total_records) $pageNum = $total_records; |
| 18 | - $sql = "SELECT `name`,`coplevel`,`playerid`,`uid` FROM `players` WHERE `coplevel` >= '1' ORDER BY `coplevel` DESC " . $max . " ;"; |
|
| 18 | + $sql = "SELECT `name`,`coplevel`,`playerid`,`uid` FROM `players` WHERE `coplevel` >= '1' ORDER BY `coplevel` DESC ".$max." ;"; |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | $result_of_query = $db_link->query($sql); |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | } |
| 26 | 26 | $pids = implode(',', $pids); |
| 27 | 27 | if ($settings['steamAPI'] && $_SESSION['permissions']['view']['steam'] && !$settings['performance'] && $settings['vacTest']) { |
| 28 | - $api = "http://api.steampowered.com/ISteamUser/GetPlayerBans/v1/?key=" . $settings['steamAPI'] . "&steamids=" . $pids; |
|
| 28 | + $api = "http://api.steampowered.com/ISteamUser/GetPlayerBans/v1/?key=".$settings['steamAPI']."&steamids=".$pids; |
|
| 29 | 29 | $bans = get_object_vars(json_decode(file_get_contents($api))); |
| 30 | 30 | $bans = $bans['players']; |
| 31 | 31 | $steamPlayers = count($bans); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | <th><i class="fa fa-eye"></i><?php echo $lang['playerID']; ?></th> |
| 54 | 54 | <th><i class="fa fa-user"></i><?php echo $lang['rank']; ?></th> |
| 55 | 55 | <?php if ($_SESSION['permissions']['edit']['player']) { |
| 56 | - echo '<th><i class="fa fa-pencil"></i> ' . $lang['edit'] . '</th>'; |
|
| 56 | + echo '<th><i class="fa fa-pencil"></i> '.$lang['edit'].'</th>'; |
|
| 57 | 57 | } |
| 58 | 58 | ?> |
| 59 | 59 | </tr> |
@@ -63,26 +63,26 @@ discard block |
||
| 63 | 63 | while ($row = mysqli_fetch_assoc($result_of_query)) { |
| 64 | 64 | $playersID = $row["playerid"]; |
| 65 | 65 | echo "<tr>"; |
| 66 | - echo "<td>" . $row["name"] . "</td>"; |
|
| 67 | - echo "<td>" . $row["playerid"] . "</td>"; |
|
| 68 | - echo "<td class='hidden-xs'>" . $row["coplevel"] . "</td>"; |
|
| 66 | + echo "<td>".$row["name"]."</td>"; |
|
| 67 | + echo "<td>".$row["playerid"]."</td>"; |
|
| 68 | + echo "<td class='hidden-xs'>".$row["coplevel"]."</td>"; |
|
| 69 | 69 | if ($_SESSION['permissions']['edit']['player']) { |
| 70 | - echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editPlayer/" . $row["uid"] . "'>"; |
|
| 70 | + echo "<td><a class='btn btn-primary btn-xs' href='".$settings['url']."editPlayer/".$row["uid"]."'>"; |
|
| 71 | 71 | echo "<i class='fa fa-pencil'></i></a></td>"; |
| 72 | 72 | } else { |
| 73 | - echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editPlayer/" . $row["uid"] . "'>"; |
|
| 73 | + echo "<td><a class='btn btn-primary btn-xs' href='".$settings['url']."editPlayer/".$row["uid"]."'>"; |
|
| 74 | 74 | echo "<i class='fa fa-eye'></i></a></td>"; |
| 75 | 75 | } |
| 76 | 76 | if ($_SESSION['permissions']['view']['steam'] && $steamPlayers > 0) { |
| 77 | - echo "<td><a href='http://steamcommunity.com/profiles/" . $row["playerid"] . "' "; |
|
| 77 | + echo "<td><a href='http://steamcommunity.com/profiles/".$row["playerid"]."' "; |
|
| 78 | 78 | for ($player = 0; $player <= $steamPlayers; $player++) { |
| 79 | 79 | if ($bans[$player]->SteamId == $row['playerid']) { |
| 80 | 80 | if ($bans[$player]->VACBanned == true) { |
| 81 | - echo "<td><a href='http://steamcommunity.com/profiles/" . $row["playerid"] . "' "; |
|
| 81 | + echo "<td><a href='http://steamcommunity.com/profiles/".$row["playerid"]."' "; |
|
| 82 | 82 | echo "class='btn btn-danger btn-xs hidden-xs' target='_blank'><i class='fa fa-steam'></i></a>"; |
| 83 | 83 | |
| 84 | 84 | } else { |
| 85 | - echo "<td><a href='http://steamcommunity.com/profiles/" . $row["playerid"] . "' "; |
|
| 85 | + echo "<td><a href='http://steamcommunity.com/profiles/".$row["playerid"]."' "; |
|
| 86 | 86 | echo "class='btn btn-primary btn-xs hidden-xs' target='_blank'><i class='fa fa-steam'></i></a>"; } |
| 87 | 87 | } |
| 88 | 88 | } |
@@ -95,4 +95,4 @@ discard block |
||
| 95 | 95 | ?> |
| 96 | 96 | </div> |
| 97 | 97 | <?php |
| 98 | -} else echo '<h3>' . errorMessage(36, $lang) . '</h3>'; |
|
| 98 | +} else echo '<h3>'.errorMessage(36, $lang).'</h3>'; |
|
@@ -13,15 +13,15 @@ discard block |
||
| 13 | 13 | <picture>logo.paa</picture> |
| 14 | 14 | <title>CZ</title>'; |
| 15 | 15 | |
| 16 | - $sql = "SELECT `name`,`members` FROM `gangs` WHERE `id` = '" . $gID . "';"; |
|
| 16 | + $sql = "SELECT `name`,`members` FROM `gangs` WHERE `id` = '".$gID."';"; |
|
| 17 | 17 | $result = $db_link->query($sql); |
| 18 | 18 | $gang = $result->fetch_object(); |
| 19 | 19 | $members = str_replace('`]"', '', str_replace('"[`', '', $gang->members)); |
| 20 | 20 | $members = explode('`,`', $members); |
| 21 | 21 | foreach ($members as $member) { |
| 22 | 22 | $name = nameID($member, $db_link); |
| 23 | - $xml .= '<member id="' . $member . '" nick="' . $name . '"> |
|
| 24 | - <name>'.$name . '</name><email></email><icq></icq><remark></remark></member>'; |
|
| 23 | + $xml .= '<member id="'.$member.'" nick="'.$name.'"> |
|
| 24 | + <name>'.$name.'</name><email></email><icq></icq><remark></remark></member>'; |
|
| 25 | 25 | } |
| 26 | 26 | $xml .= '</squad>'; |
| 27 | 27 | var_dump($xml); |
@@ -33,13 +33,13 @@ discard block |
||
| 33 | 33 | switch ($_POST["editType"]) { |
| 34 | 34 | case "edit_members": |
| 35 | 35 | $gMem = clean($_POST["gMem"], 'string'); |
| 36 | - $sql = "UPDATE `gangs` SET `members`='" . $gMem . "' WHERE `gangs`.`id` = '" . $gID . "'"; |
|
| 36 | + $sql = "UPDATE `gangs` SET `members`='".$gMem."' WHERE `gangs`.`id` = '".$gID."'"; |
|
| 37 | 37 | $result_of_query = $db_link->query($sql); |
| 38 | 38 | message($lang['updated']); |
| 39 | 39 | break; |
| 40 | 40 | |
| 41 | 41 | case "del_gang": |
| 42 | - $sql = "DELETE FROM `gangs` WHERE `gangs`.`id` = '" . $gID . "'"; |
|
| 42 | + $sql = "DELETE FROM `gangs` WHERE `gangs`.`id` = '".$gID."'"; |
|
| 43 | 43 | $result_of_query = $db_link->query($sql); |
| 44 | 44 | message($lang['updated']); |
| 45 | 45 | break; |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | $gMM = clean($_POST["gMM"], 'int'); |
| 51 | 51 | $gbank = clean($_POST["gbank"], 'int'); |
| 52 | 52 | $gAct = clean($_POST["gAct"], 'int'); |
| 53 | - $sql = "UPDATE `gangs` SET `owner`='" . $gowner . "',`name`='" . $gname . "',`maxmembers`='" . $gMM . "',`bank`='" . $gbank . "',`active`='" . $gAct . "' WHERE `gangs`.`id` = '" . $gID . "'"; |
|
| 53 | + $sql = "UPDATE `gangs` SET `owner`='".$gowner."',`name`='".$gname."',`maxmembers`='".$gMM."',`bank`='".$gbank."',`active`='".$gAct."' WHERE `gangs`.`id` = '".$gID."'"; |
|
| 54 | 54 | $result_of_query = $db_link->query($sql); |
| 55 | 55 | message($lang['updated']); |
| 56 | 56 | break; |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | -$sql = 'SELECT * FROM `gangs` WHERE `id` ="' . $gID . '";'; |
|
| 64 | +$sql = 'SELECT * FROM `gangs` WHERE `id` ="'.$gID.'";'; |
|
| 65 | 65 | $result_of_query = $db_link->query($sql); |
| 66 | 66 | if ($result_of_query->num_rows > 0) { |
| 67 | 67 | $gang = $result_of_query->fetch_object(); |
@@ -70,22 +70,22 @@ discard block |
||
| 70 | 70 | <div class="panel panel-default"> |
| 71 | 71 | <div class="panel-heading"> |
| 72 | 72 | <h2 class="panel-title"><i |
| 73 | - class="fa fa-child fa-fw"></i><?php echo nameID($gang->owner, $db_link) . "'s " . $lang['gang']; ?> |
|
| 73 | + class="fa fa-child fa-fw"></i><?php echo nameID($gang->owner, $db_link)."'s ".$lang['gang']; ?> |
|
| 74 | 74 | </h2> |
| 75 | 75 | </div> |
| 76 | 76 | <div class="panel-body"> |
| 77 | 77 | <center><img src="<?php echo $settings['url'] ?>assets/img/uniform/U_BG_Guerilla2_3.jpg"/> |
| 78 | 78 | <?php |
| 79 | - echo "<h4>" . $lang['owner'] . ": <a href='" . $settings['url'] . "editPlayer/" . uID($gang->owner, $db_link) . "'>" . nameID($gang->owner, $db_link) . "</a></h4>"; |
|
| 80 | - echo "<h4>" . $lang['name'] . ": " . $gang->name . "</h4>"; |
|
| 79 | + echo "<h4>".$lang['owner'].": <a href='".$settings['url']."editPlayer/".uID($gang->owner, $db_link)."'>".nameID($gang->owner, $db_link)."</a></h4>"; |
|
| 80 | + echo "<h4>".$lang['name'].": ".$gang->name."</h4>"; |
|
| 81 | 81 | ?> |
| 82 | 82 | <span class="fa fa-2x fa-bank"></span> |
| 83 | - <h4> <?php echo $lang['bank'] . ": " . $gang->bank; ?> </h4> |
|
| 83 | + <h4> <?php echo $lang['bank'].": ".$gang->bank; ?> </h4> |
|
| 84 | 84 | <?php |
| 85 | 85 | if ($gang->active == 0) { |
| 86 | - echo "<h4><button type='button' class='gangActive btn btn-danger'>" . $lang["not"] . " " . $lang["active"] . "</button></h4> "; |
|
| 86 | + echo "<h4><button type='button' class='gangActive btn btn-danger'>".$lang["not"]." ".$lang["active"]."</button></h4> "; |
|
| 87 | 87 | } else { |
| 88 | - echo "<h4><button type='button' class='gangActive btn btn-success'>" . $lang["active"] . "</button></h4> "; |
|
| 88 | + echo "<h4><button type='button' class='gangActive btn btn-success'>".$lang["active"]."</button></h4> "; |
|
| 89 | 89 | } |
| 90 | 90 | if ($_SESSION['permissions']['edit']['gangs']) { |
| 91 | 91 | echo '<a data-toggle="modal" href="#edit_gang" class="btn btn-primary btn-xs" style="float: right; margin-right:3px;">'; |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | <div class="col-md-2 col-sm-2 col-md-offset-1 box0"> |
| 107 | 107 | <div class="box1"> |
| 108 | 108 | <span class="fa fa-3x fa-users"></span> |
| 109 | - <h4> <?php echo $lang['maxMembers'] . ": " . $gang->maxmembers; ?> </h4> |
|
| 109 | + <h4> <?php echo $lang['maxMembers'].": ".$gang->maxmembers; ?> </h4> |
|
| 110 | 110 | </div> |
| 111 | 111 | </div> |
| 112 | 112 | </div> |
@@ -117,12 +117,12 @@ discard block |
||
| 117 | 117 | </ul> |
| 118 | 118 | <div id="myTabContent" class="tab-content"> |
| 119 | 119 | <div class="tab-pane fade active in well" id="civ_inv"> |
| 120 | - <h4 style="centred"><?php echo $lang['gang'] . " " . $lang['members']; ?> </h4> |
|
| 120 | + <h4 style="centred"><?php echo $lang['gang']." ".$lang['members']; ?> </h4> |
|
| 121 | 121 | <?php |
| 122 | 122 | $return = stripArray($gang->members, 1); |
| 123 | 123 | |
| 124 | 124 | foreach ($return as $value) { |
| 125 | - echo "<span class='label label-success' style='margin-right:3px; line-height:2;'>" . nameID($value, $db_link) . "</span> "; |
|
| 125 | + echo "<span class='label label-success' style='margin-right:3px; line-height:2;'>".nameID($value, $db_link)."</span> "; |
|
| 126 | 126 | } |
| 127 | 127 | } |
| 128 | 128 | ?> |
@@ -143,10 +143,10 @@ discard block |
||
| 143 | 143 | <div class="modal-header"> |
| 144 | 144 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
| 145 | 145 | <h4 class="modal-title"><span |
| 146 | - class="glyphicon glyphicon-pencil"></span><?php echo " " . $lang['edit'] . " " . $lang['gang'] . " " . $lang['members']; ?> |
|
| 146 | + class="glyphicon glyphicon-pencil"></span><?php echo " ".$lang['edit']." ".$lang['gang']." ".$lang['members']; ?> |
|
| 147 | 147 | </h4> |
| 148 | 148 | </div> |
| 149 | - <form method="post" action="<?php echo $settings['url'] . 'editGang/' . $gID; ?>" role="form"> |
|
| 149 | + <form method="post" action="<?php echo $settings['url'].'editGang/'.$gID; ?>" role="form"> |
|
| 150 | 150 | <?php echo formtoken::getField() ?> |
| 151 | 151 | <div class="modal-body"> |
| 152 | 152 | <div class="form-group"> |
@@ -173,10 +173,10 @@ discard block |
||
| 173 | 173 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
| 174 | 174 | <h4 class="modal-title"> |
| 175 | 175 | <span |
| 176 | - class="glyphicon glyphicon-pencil"></span><?php echo " " . $lang['delete'] . " " . $lang['gang']; ?> |
|
| 176 | + class="glyphicon glyphicon-pencil"></span><?php echo " ".$lang['delete']." ".$lang['gang']; ?> |
|
| 177 | 177 | </h4> |
| 178 | 178 | </div> |
| 179 | - <form method="post" action="<?php echo $settings['url'] . 'editGang/' . $gID; ?>" role="form"> |
|
| 179 | + <form method="post" action="<?php echo $settings['url'].'editGang/'.$gID; ?>" role="form"> |
|
| 180 | 180 | <?php echo formtoken::getField() ?> |
| 181 | 181 | <div class="modal-body"> |
| 182 | 182 | <div class="form-group"> |
@@ -202,10 +202,10 @@ discard block |
||
| 202 | 202 | <div class="modal-header"> |
| 203 | 203 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
| 204 | 204 | <h4 class="modal-title"><span |
| 205 | - class="glyphicon glyphicon-pencil"></span><?php echo " " . $lang['edit'] . " " . $lang['gang']; ?> |
|
| 205 | + class="glyphicon glyphicon-pencil"></span><?php echo " ".$lang['edit']." ".$lang['gang']; ?> |
|
| 206 | 206 | </h4> |
| 207 | 207 | </div> |
| 208 | - <form method="post" action="<?php echo $settings['url'] . 'editGang/' . $gID; ?>" role="form"> |
|
| 208 | + <form method="post" action="<?php echo $settings['url'].'editGang/'.$gID; ?>" role="form"> |
|
| 209 | 209 | <?php echo formtoken::getField() ?> |
| 210 | 210 | <div class="modal-body"> |
| 211 | 211 | <div class="form-group"> |
@@ -215,14 +215,14 @@ discard block |
||
| 215 | 215 | <center> |
| 216 | 216 | <?php |
| 217 | 217 | echo "<center>"; |
| 218 | - echo "<h3>" . $lang['name'] . ": <input id='gname' name='gname' type='text' value='" . $gang->name . "'></td><br/>"; |
|
| 219 | - echo "<h4>" . $lang['owner'] . ": <input id='gowner' name='gowner' type='number' value='" . $gang->owner . "'></td><br/>"; |
|
| 220 | - echo "<h4>" . $lang['maxMembers'] . ": <input id='gMM' name='gMM' type='number' value='" . $gang->maxmembers . "'></td><br/>"; |
|
| 221 | - echo "<h4>" . $lang['bank'] . ": <input id='gbank' name='gbank' type='number' value='" . $gang->bank . "'></td><br/>"; |
|
| 222 | - echo "<h4>" . $lang['active'] . ": "; |
|
| 218 | + echo "<h3>".$lang['name'].": <input id='gname' name='gname' type='text' value='".$gang->name."'></td><br/>"; |
|
| 219 | + echo "<h4>".$lang['owner'].": <input id='gowner' name='gowner' type='number' value='".$gang->owner."'></td><br/>"; |
|
| 220 | + echo "<h4>".$lang['maxMembers'].": <input id='gMM' name='gMM' type='number' value='".$gang->maxmembers."'></td><br/>"; |
|
| 221 | + echo "<h4>".$lang['bank'].": <input id='gbank' name='gbank' type='number' value='".$gang->bank."'></td><br/>"; |
|
| 222 | + echo "<h4>".$lang['active'].": "; |
|
| 223 | 223 | echo "<select id='gAct' name='gAct'>"; |
| 224 | - echo '<option value="0"' . select('0', $gang->active) . '>' . $lang['no'] . '</option>'; |
|
| 225 | - echo '<option value="1"' . select('1', $gang->active) . '>' . $lang['yes'] . '</option>'; |
|
| 224 | + echo '<option value="0"'.select('0', $gang->active).'>'.$lang['no'].'</option>'; |
|
| 225 | + echo '<option value="1"'.select('1', $gang->active).'>'.$lang['yes'].'</option>'; |
|
| 226 | 226 | echo "</select>"; |
| 227 | 227 | echo "</center>"; |
| 228 | 228 | ?> |
@@ -1,21 +1,21 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | $db_link = serverConnect(); |
| 3 | 3 | |
| 4 | -$max = 'LIMIT ' . ($pageNum - 1) * $_SESSION['items'] . ',' . $_SESSION['items']; |
|
| 4 | +$max = 'LIMIT '.($pageNum - 1) * $_SESSION['items'].','.$_SESSION['items']; |
|
| 5 | 5 | |
| 6 | 6 | if (isset($search)) { |
| 7 | - $sql = "SELECT `uid` FROM `players` WHERE `uid` LIKE '" . $search . "' OR `name` LIKE '%" . $search . "%' OR `playerid` LIKE '" . $search . "' AND `adminlevel` >= '1' ORDER BY `adminlevel` DESC;"; |
|
| 7 | + $sql = "SELECT `uid` FROM `players` WHERE `uid` LIKE '".$search."' OR `name` LIKE '%".$search."%' OR `playerid` LIKE '".$search."' AND `adminlevel` >= '1' ORDER BY `adminlevel` DESC;"; |
|
| 8 | 8 | $result_of_query = $db_link->query($sql); |
| 9 | 9 | $total_records = mysqli_num_rows($result_of_query); |
| 10 | 10 | if ($pageNum > $total_records) $pageNum = $total_records; |
| 11 | - $sql = "SELECT `name`,`adminlevel`,`playerid`,`uid` FROM `players` WHERE `uid` LIKE '" . $search . "' OR `name` LIKE '%" . $search . "%' OR `playerid` LIKE '" . $search . "' AND `adminlevel` >= '1' ORDER BY `adminlevel` DESC " . $max . " ;"; |
|
| 12 | - logAction($_SESSION['user_name'], $lang['searched'] . ' (' . $search . ') ' . $lang['in'] . ' ' . $lang['players'], 1); |
|
| 11 | + $sql = "SELECT `name`,`adminlevel`,`playerid`,`uid` FROM `players` WHERE `uid` LIKE '".$search."' OR `name` LIKE '%".$search."%' OR `playerid` LIKE '".$search."' AND `adminlevel` >= '1' ORDER BY `adminlevel` DESC ".$max." ;"; |
|
| 12 | + logAction($_SESSION['user_name'], $lang['searched'].' ('.$search.') '.$lang['in'].' '.$lang['players'], 1); |
|
| 13 | 13 | } else { |
| 14 | 14 | $sql = "SELECT `uid` FROM `players` WHERE `adminlevel` >= '1' ORDER BY `adminlevel` DESC;"; |
| 15 | 15 | $result_of_query = $db_link->query($sql); |
| 16 | 16 | $total_records = mysqli_num_rows($result_of_query); |
| 17 | 17 | if ($pageNum > $total_records) $pageNum = $total_records; |
| 18 | - $sql = "SELECT `name`,`adminlevel`,`playerid`,`uid` FROM `players` WHERE `adminlevel` >= '1' ORDER BY `adminlevel` DESC " . $max . " ;"; |
|
| 18 | + $sql = "SELECT `name`,`adminlevel`,`playerid`,`uid` FROM `players` WHERE `adminlevel` >= '1' ORDER BY `adminlevel` DESC ".$max." ;"; |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | $result_of_query = $db_link->query($sql); |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | } |
| 26 | 26 | $pids = implode(',', $pids); |
| 27 | 27 | if ($settings['steamAPI'] && $_SESSION['permissions']['view']['steam'] && !$settings['performance'] && $settings['vacTest']) { |
| 28 | - $api = "http://api.steampowered.com/ISteamUser/GetPlayerBans/v1/?key=" . $settings['steamAPI'] . "&steamids=" . $pids; |
|
| 28 | + $api = "http://api.steampowered.com/ISteamUser/GetPlayerBans/v1/?key=".$settings['steamAPI']."&steamids=".$pids; |
|
| 29 | 29 | $bans = get_object_vars(json_decode(file_get_contents($api))); |
| 30 | 30 | $bans = $bans['players']; |
| 31 | 31 | $steamPlayers = count($bans); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | <th><i class="fa fa-eye"></i><?php echo $lang['playerID']; ?></th> |
| 54 | 54 | <th><i class="fa fa-user"></i><?php echo $lang['rank']; ?></th> |
| 55 | 55 | <?php if ($_SESSION['permissions']['edit']['player']) { |
| 56 | - echo '<th><i class="fa fa-pencil"></i> ' . $lang['edit'] . '</th>'; |
|
| 56 | + echo '<th><i class="fa fa-pencil"></i> '.$lang['edit'].'</th>'; |
|
| 57 | 57 | } |
| 58 | 58 | ?> |
| 59 | 59 | </tr> |
@@ -63,26 +63,26 @@ discard block |
||
| 63 | 63 | while ($row = mysqli_fetch_assoc($result_of_query)) { |
| 64 | 64 | $playersID = $row["playerid"]; |
| 65 | 65 | echo "<tr>"; |
| 66 | - echo "<td>" . $row["name"] . "</td>"; |
|
| 67 | - echo "<td>" . $row["playerid"] . "</td>"; |
|
| 68 | - echo "<td class='hidden-xs'>" . $row["adminlevel"] . "</td>"; |
|
| 66 | + echo "<td>".$row["name"]."</td>"; |
|
| 67 | + echo "<td>".$row["playerid"]."</td>"; |
|
| 68 | + echo "<td class='hidden-xs'>".$row["adminlevel"]."</td>"; |
|
| 69 | 69 | if ($_SESSION['permissions']['edit']['player']) { |
| 70 | - echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editPlayer/" . $row["uid"] . "'>"; |
|
| 70 | + echo "<td><a class='btn btn-primary btn-xs' href='".$settings['url']."editPlayer/".$row["uid"]."'>"; |
|
| 71 | 71 | echo "<i class='fa fa-pencil'></i></a></td>"; |
| 72 | 72 | } else { |
| 73 | - echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editPlayer/" . $row["uid"] . "'>"; |
|
| 73 | + echo "<td><a class='btn btn-primary btn-xs' href='".$settings['url']."editPlayer/".$row["uid"]."'>"; |
|
| 74 | 74 | echo "<i class='fa fa-eye'></i></a></td>"; |
| 75 | 75 | } |
| 76 | 76 | if ($_SESSION['permissions']['view']['steam'] && $steamPlayers > 0) { |
| 77 | - echo "<td><a href='http://steamcommunity.com/profiles/" . $row["playerid"] . "' "; |
|
| 77 | + echo "<td><a href='http://steamcommunity.com/profiles/".$row["playerid"]."' "; |
|
| 78 | 78 | for ($player = 0; $player <= $steamPlayers; $player++) { |
| 79 | 79 | if ($bans[$player]->SteamId == $row['playerid']) { |
| 80 | 80 | if ($bans[$player]->VACBanned == true) { |
| 81 | - echo "<td><a href='http://steamcommunity.com/profiles/" . $row["playerid"] . "' "; |
|
| 81 | + echo "<td><a href='http://steamcommunity.com/profiles/".$row["playerid"]."' "; |
|
| 82 | 82 | echo "class='btn btn-danger btn-xs hidden-xs' target='_blank'><i class='fa fa-steam'></i></a>"; |
| 83 | 83 | |
| 84 | 84 | } else { |
| 85 | - echo "<td><a href='http://steamcommunity.com/profiles/" . $row["playerid"] . "' "; |
|
| 85 | + echo "<td><a href='http://steamcommunity.com/profiles/".$row["playerid"]."' "; |
|
| 86 | 86 | echo "class='btn btn-primary btn-xs hidden-xs' target='_blank'><i class='fa fa-steam'></i></a>"; } |
| 87 | 87 | } |
| 88 | 88 | } |
@@ -95,4 +95,4 @@ discard block |
||
| 95 | 95 | ?> |
| 96 | 96 | </div> |
| 97 | 97 | <?php |
| 98 | -} else echo '<h3>' . errorMessage(36, $lang) . '</h3>'; |
|
| 98 | +} else echo '<h3>'.errorMessage(36, $lang).'</h3>'; |
|
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | if ($settings['url'] == "/") { |
| 32 | 32 | include("views/steam/life/nav.php"); |
| 33 | 33 | } else { |
| 34 | - include(realpath($settings['url']) . "views/steam/life/nav.php"); |
|
| 34 | + include(realpath($settings['url'])."views/steam/life/nav.php"); |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | } |
@@ -1,21 +1,21 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | $db_link = serverConnect(); |
| 3 | 3 | |
| 4 | -$max = 'LIMIT ' . ($pageNum - 1) * $_SESSION['items'] . ',' . $_SESSION['items']; |
|
| 4 | +$max = 'LIMIT '.($pageNum - 1) * $_SESSION['items'].','.$_SESSION['items']; |
|
| 5 | 5 | |
| 6 | 6 | if (isset($search)) { |
| 7 | - $sql = "SELECT `uid` FROM `players` WHERE `uid` LIKE '" . $search . "' OR `name` LIKE '%" . $search . "%' OR `playerid` LIKE '" . $search . "' AND `mediclevel` >= '1' ORDER BY `mediclevel` DESC;"; |
|
| 7 | + $sql = "SELECT `uid` FROM `players` WHERE `uid` LIKE '".$search."' OR `name` LIKE '%".$search."%' OR `playerid` LIKE '".$search."' AND `mediclevel` >= '1' ORDER BY `mediclevel` DESC;"; |
|
| 8 | 8 | $result_of_query = $db_link->query($sql); |
| 9 | 9 | $total_records = mysqli_num_rows($result_of_query); |
| 10 | 10 | if ($pageNum > $total_records) $pageNum = $total_records; |
| 11 | - $sql = "SELECT `name`,`mediclevel`,`playerid`,`uid` FROM `players` WHERE `uid` LIKE '" . $search . "' OR `name` LIKE '%" . $search . "%' OR `playerid` LIKE '" . $search . "' AND `mediclevel` >= '1' ORDER BY `mediclevel` DESC " . $max . " ;"; |
|
| 12 | - logAction($_SESSION['user_name'], $lang['searched'] . ' (' . $search . ') ' . $lang['in'] . ' ' . $lang['players'], 1); |
|
| 11 | + $sql = "SELECT `name`,`mediclevel`,`playerid`,`uid` FROM `players` WHERE `uid` LIKE '".$search."' OR `name` LIKE '%".$search."%' OR `playerid` LIKE '".$search."' AND `mediclevel` >= '1' ORDER BY `mediclevel` DESC ".$max." ;"; |
|
| 12 | + logAction($_SESSION['user_name'], $lang['searched'].' ('.$search.') '.$lang['in'].' '.$lang['players'], 1); |
|
| 13 | 13 | } else { |
| 14 | 14 | $sql = "SELECT `uid` FROM `players` WHERE `mediclevel` >= '1' ORDER BY `mediclevel` DESC;"; |
| 15 | 15 | $result_of_query = $db_link->query($sql); |
| 16 | 16 | $total_records = mysqli_num_rows($result_of_query); |
| 17 | 17 | if ($pageNum > $total_records) $pageNum = $total_records; |
| 18 | - $sql = "SELECT `name`,`mediclevel`,`playerid`,`uid` FROM `players` WHERE `mediclevel` >= '1' ORDER BY `mediclevel` DESC " . $max . " ;"; |
|
| 18 | + $sql = "SELECT `name`,`mediclevel`,`playerid`,`uid` FROM `players` WHERE `mediclevel` >= '1' ORDER BY `mediclevel` DESC ".$max." ;"; |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | $result_of_query = $db_link->query($sql); |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | } |
| 26 | 26 | $pids = implode(',', $pids); |
| 27 | 27 | if ($settings['steamAPI'] && $_SESSION['permissions']['view']['steam'] && !$settings['performance'] && $settings['vacTest']) { |
| 28 | - $api = "http://api.steampowered.com/ISteamUser/GetPlayerBans/v1/?key=" . $settings['steamAPI'] . "&steamids=" . $pids; |
|
| 28 | + $api = "http://api.steampowered.com/ISteamUser/GetPlayerBans/v1/?key=".$settings['steamAPI']."&steamids=".$pids; |
|
| 29 | 29 | $bans = get_object_vars(json_decode(file_get_contents($api))); |
| 30 | 30 | $bans = $bans['players']; |
| 31 | 31 | $steamPlayers = count($bans); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | <th><i class="fa fa-eye"></i><?php echo $lang['playerID']; ?></th> |
| 54 | 54 | <th><i class="fa fa-user"></i><?php echo $lang['rank']; ?></th> |
| 55 | 55 | <?php if ($_SESSION['permissions']['edit']['player']) { |
| 56 | - echo '<th><i class="fa fa-pencil"></i> ' . $lang['edit'] . '</th>'; |
|
| 56 | + echo '<th><i class="fa fa-pencil"></i> '.$lang['edit'].'</th>'; |
|
| 57 | 57 | } |
| 58 | 58 | ?> |
| 59 | 59 | </tr> |
@@ -63,26 +63,26 @@ discard block |
||
| 63 | 63 | while ($row = mysqli_fetch_assoc($result_of_query)) { |
| 64 | 64 | $playersID = $row["playerid"]; |
| 65 | 65 | echo "<tr>"; |
| 66 | - echo "<td>" . $row["name"] . "</td>"; |
|
| 67 | - echo "<td>" . $row["playerid"] . "</td>"; |
|
| 68 | - echo "<td class='hidden-xs'>" . $row["mediclevel"] . "</td>"; |
|
| 66 | + echo "<td>".$row["name"]."</td>"; |
|
| 67 | + echo "<td>".$row["playerid"]."</td>"; |
|
| 68 | + echo "<td class='hidden-xs'>".$row["mediclevel"]."</td>"; |
|
| 69 | 69 | if ($_SESSION['permissions']['edit']['player']) { |
| 70 | - echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editPlayer/" . $row["uid"] . "'>"; |
|
| 70 | + echo "<td><a class='btn btn-primary btn-xs' href='".$settings['url']."editPlayer/".$row["uid"]."'>"; |
|
| 71 | 71 | echo "<i class='fa fa-pencil'></i></a></td>"; |
| 72 | 72 | } else { |
| 73 | - echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editPlayer/" . $row["uid"] . "'>"; |
|
| 73 | + echo "<td><a class='btn btn-primary btn-xs' href='".$settings['url']."editPlayer/".$row["uid"]."'>"; |
|
| 74 | 74 | echo "<i class='fa fa-eye'></i></a></td>"; |
| 75 | 75 | } |
| 76 | 76 | if ($_SESSION['permissions']['view']['steam'] && $steamPlayers > 0) { |
| 77 | - echo "<td><a href='http://steamcommunity.com/profiles/" . $row["playerid"] . "' "; |
|
| 77 | + echo "<td><a href='http://steamcommunity.com/profiles/".$row["playerid"]."' "; |
|
| 78 | 78 | for ($player = 0; $player <= $steamPlayers; $player++) { |
| 79 | 79 | if ($bans[$player]->SteamId == $row['playerid']) { |
| 80 | 80 | if ($bans[$player]->VACBanned == true) { |
| 81 | - echo "<td><a href='http://steamcommunity.com/profiles/" . $row["playerid"] . "' "; |
|
| 81 | + echo "<td><a href='http://steamcommunity.com/profiles/".$row["playerid"]."' "; |
|
| 82 | 82 | echo "class='btn btn-danger btn-xs hidden-xs' target='_blank'><i class='fa fa-steam'></i></a>"; |
| 83 | 83 | |
| 84 | 84 | } else { |
| 85 | - echo "<td><a href='http://steamcommunity.com/profiles/" . $row["playerid"] . "' "; |
|
| 85 | + echo "<td><a href='http://steamcommunity.com/profiles/".$row["playerid"]."' "; |
|
| 86 | 86 | echo "class='btn btn-primary btn-xs hidden-xs' target='_blank'><i class='fa fa-steam'></i></a>"; } |
| 87 | 87 | } |
| 88 | 88 | } |
@@ -95,4 +95,4 @@ discard block |
||
| 95 | 95 | ?> |
| 96 | 96 | </div> |
| 97 | 97 | <?php |
| 98 | -} else echo '<h3>' . errorMessage(36, $lang) . '</h3>'; |
|
| 98 | +} else echo '<h3>'.errorMessage(36, $lang).'</h3>'; |
|