@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | |
| 157 | 157 | <div class="panel-body"> |
| 158 | 158 | <?php |
| 159 | - $alias = str_replace('"[`', '', $player->aliases); |
|
| 159 | + $alias = str_replace('"[`', '', $player->aliases); |
|
| 160 | 160 | $alias = str_replace('`]"', '', $alias); |
| 161 | 161 | |
| 162 | 162 | echo '<center><img alt="'.$alias.'" src="'.$settings['url'].skinImage($player->civ_gear).'">'; |
@@ -173,11 +173,11 @@ discard block |
||
| 173 | 173 | <i class="fa fa-2x fa-bank"></i> |
| 174 | 174 | <h4> <?php echo $lang['bank'].': '.$player->bankacc; ?> </h4> |
| 175 | 175 | <?php |
| 176 | - if ($player->arrested == 0) { |
|
| 177 | - echo "<h4><button type='button' id='arrested' class='arrest btn btn-xs btn-success'>".$lang['not'].' '.$lang['arrested'].'</button></h4>'; |
|
| 178 | - } else { |
|
| 179 | - echo "<h4><button type='button' id='arrested' class='arrest btn btn-xs btn-theme01'>".$lang['arrested'].'</button></h4>'; |
|
| 180 | - } |
|
| 176 | + if ($player->arrested == 0) { |
|
| 177 | + echo "<h4><button type='button' id='arrested' class='arrest btn btn-xs btn-success'>".$lang['not'].' '.$lang['arrested'].'</button></h4>'; |
|
| 178 | + } else { |
|
| 179 | + echo "<h4><button type='button' id='arrested' class='arrest btn btn-xs btn-theme01'>".$lang['arrested'].'</button></h4>'; |
|
| 180 | + } |
|
| 181 | 181 | |
| 182 | 182 | if ($player->blacklist == 0) { |
| 183 | 183 | echo "<h4><button type='button' id='blacklist' class='arrest btn btn-xs btn-success'>".$lang['not'].' '.$lang['blacklisted'].'</button></h4>'; |
@@ -272,9 +272,9 @@ discard block |
||
| 272 | 272 | </ul> |
| 273 | 273 | </li> |
| 274 | 274 | <?php |
| 275 | - if ($_SESSION['permissions']['edit']['houses']) { |
|
| 276 | - echo '<li><a href="#house" data-toggle="tab">'.$lang['houses'].'</a></li>'; |
|
| 277 | - } |
|
| 275 | + if ($_SESSION['permissions']['edit']['houses']) { |
|
| 276 | + echo '<li><a href="#house" data-toggle="tab">'.$lang['houses'].'</a></li>'; |
|
| 277 | + } |
|
| 278 | 278 | if ($_SESSION['permissions']['edit']['vehicles']) { |
| 279 | 279 | echo '<li><a href="#veh" data-toggle="tab">'.$lang['vehicles'].'</a></li>'; |
| 280 | 280 | } |
@@ -291,57 +291,57 @@ discard block |
||
| 291 | 291 | ?> |
| 292 | 292 | <div class="tab-pane fade in active well" id="civ_lic"> |
| 293 | 293 | <?php |
| 294 | - if ($player->civ_licenses !== '"[]"' && $player->civ_licenses !== '') { |
|
| 295 | - echo '<h4 style="centred">'.$lang['civil'].' '.$lang['licenses'].'</h4>'; |
|
| 296 | - $return = stripArray($player->civ_licenses, 0); |
|
| 297 | - foreach ($return as $value) { |
|
| 298 | - if (strpos($value, '1') == true) { |
|
| 299 | - $name = before(',', $value); |
|
| 300 | - echo "<button type='button' id=".$name." class='license btn btn-xs btn-success' style='margin-bottom: 3px;'>".licName($name, $license).'</button> '; |
|
| 301 | - } else { |
|
| 302 | - $name = before(',', $value); |
|
| 303 | - echo "<button type='button' id=".$name." class='license btn btn-xs btn-theme01' style='margin-bottom: 3px;'>".licName($name, $license).'</button> '; |
|
| 304 | - } |
|
| 305 | - } |
|
| 306 | - } else { |
|
| 307 | - echo '<h4>'.errorMessage(371, $lang).'</h4>'; |
|
| 308 | - } ?> |
|
| 294 | + if ($player->civ_licenses !== '"[]"' && $player->civ_licenses !== '') { |
|
| 295 | + echo '<h4 style="centred">'.$lang['civil'].' '.$lang['licenses'].'</h4>'; |
|
| 296 | + $return = stripArray($player->civ_licenses, 0); |
|
| 297 | + foreach ($return as $value) { |
|
| 298 | + if (strpos($value, '1') == true) { |
|
| 299 | + $name = before(',', $value); |
|
| 300 | + echo "<button type='button' id=".$name." class='license btn btn-xs btn-success' style='margin-bottom: 3px;'>".licName($name, $license).'</button> '; |
|
| 301 | + } else { |
|
| 302 | + $name = before(',', $value); |
|
| 303 | + echo "<button type='button' id=".$name." class='license btn btn-xs btn-theme01' style='margin-bottom: 3px;'>".licName($name, $license).'</button> '; |
|
| 304 | + } |
|
| 305 | + } |
|
| 306 | + } else { |
|
| 307 | + echo '<h4>'.errorMessage(371, $lang).'</h4>'; |
|
| 308 | + } ?> |
|
| 309 | 309 | </div> |
| 310 | 310 | <div class="tab-pane well fade" id="medic_lic"> |
| 311 | 311 | <?php |
| 312 | - if ($player->med_licenses !== '"[]"' && $player->med_licenses !== '') { |
|
| 313 | - echo '<h4 style="centred">'.$lang['medic'].' '.$lang['licenses'].'</h4>'; |
|
| 314 | - $return = stripArray($player->med_licenses, 0); |
|
| 315 | - foreach ($return as $value) { |
|
| 316 | - if (strpos($value, '1') == true) { |
|
| 317 | - $name = before(',', $value); |
|
| 318 | - echo "<button type='button' id=".$name." class='license btn btn-xs btn-success' style='margin-bottom: 3px;'>".licName($name, $license).'</button> '; |
|
| 319 | - } else { |
|
| 320 | - $name = before(',', $value); |
|
| 321 | - echo "<button type='button' id=".$name." class='license btn btn-xs btn-theme01' style='margin-bottom: 3px;'>".licName($name, $license).'</button> '; |
|
| 322 | - } |
|
| 323 | - } |
|
| 324 | - } else { |
|
| 325 | - echo '<h4>'.errorMessage(372, $lang).'</h4>'; |
|
| 326 | - } ?> |
|
| 312 | + if ($player->med_licenses !== '"[]"' && $player->med_licenses !== '') { |
|
| 313 | + echo '<h4 style="centred">'.$lang['medic'].' '.$lang['licenses'].'</h4>'; |
|
| 314 | + $return = stripArray($player->med_licenses, 0); |
|
| 315 | + foreach ($return as $value) { |
|
| 316 | + if (strpos($value, '1') == true) { |
|
| 317 | + $name = before(',', $value); |
|
| 318 | + echo "<button type='button' id=".$name." class='license btn btn-xs btn-success' style='margin-bottom: 3px;'>".licName($name, $license).'</button> '; |
|
| 319 | + } else { |
|
| 320 | + $name = before(',', $value); |
|
| 321 | + echo "<button type='button' id=".$name." class='license btn btn-xs btn-theme01' style='margin-bottom: 3px;'>".licName($name, $license).'</button> '; |
|
| 322 | + } |
|
| 323 | + } |
|
| 324 | + } else { |
|
| 325 | + echo '<h4>'.errorMessage(372, $lang).'</h4>'; |
|
| 326 | + } ?> |
|
| 327 | 327 | </div> |
| 328 | 328 | <div class="tab-pane well fade" id="police_lic"> |
| 329 | 329 | <?php |
| 330 | - if ($player->cop_licenses !== '"[]"' && $player->cop_licenses !== '') { |
|
| 331 | - $return = stripArray($player->cop_licenses, 0); |
|
| 332 | - echo '<h4 style="centred">'.$lang['cop'].' '.$lang['licenses'].'</h4>'; |
|
| 333 | - foreach ($return as $value) { |
|
| 334 | - if (strpos($value, '1') == true) { |
|
| 335 | - $name = before(',', $value); |
|
| 336 | - echo "<button type='button' id=".$name." class='license btn btn-xs btn-success' style='margin-bottom: 3px;'>".licName($name, $license).'</button> '; |
|
| 337 | - } else { |
|
| 338 | - $name = before(',', $value); |
|
| 339 | - echo "<button type='button' id=".$name." class='license btn btn-xs btn-theme01' style='margin-bottom: 3px;'>".licName($name, $license).'</button> '; |
|
| 340 | - } |
|
| 341 | - } |
|
| 342 | - } else { |
|
| 343 | - echo '<h4>'.errorMessage(373, $lang).'</h4>'; |
|
| 344 | - } ?> |
|
| 330 | + if ($player->cop_licenses !== '"[]"' && $player->cop_licenses !== '') { |
|
| 331 | + $return = stripArray($player->cop_licenses, 0); |
|
| 332 | + echo '<h4 style="centred">'.$lang['cop'].' '.$lang['licenses'].'</h4>'; |
|
| 333 | + foreach ($return as $value) { |
|
| 334 | + if (strpos($value, '1') == true) { |
|
| 335 | + $name = before(',', $value); |
|
| 336 | + echo "<button type='button' id=".$name." class='license btn btn-xs btn-success' style='margin-bottom: 3px;'>".licName($name, $license).'</button> '; |
|
| 337 | + } else { |
|
| 338 | + $name = before(',', $value); |
|
| 339 | + echo "<button type='button' id=".$name." class='license btn btn-xs btn-theme01' style='margin-bottom: 3px;'>".licName($name, $license).'</button> '; |
|
| 340 | + } |
|
| 341 | + } |
|
| 342 | + } else { |
|
| 343 | + echo '<h4>'.errorMessage(373, $lang).'</h4>'; |
|
| 344 | + } ?> |
|
| 345 | 345 | </div> |
| 346 | 346 | <?php |
| 347 | 347 | } |
@@ -349,43 +349,43 @@ discard block |
||
| 349 | 349 | ?> |
| 350 | 350 | <div class="tab-pane fade well" id="civ_inv"> |
| 351 | 351 | <?php |
| 352 | - if ($player->civ_gear !== '"[]"' && $player->civ_gear !== '') { |
|
| 353 | - echo '<h4 style="centred">'.$lang['civil'].' '.$lang['gear'].'</h4>'; |
|
| 354 | - echo "<textarea class='form-control' readonly rows='5' style='width: 100%' id='civ_gear' name='civ_gear'>".$player->civ_gear.'</textarea><br>'; |
|
| 355 | - |
|
| 356 | - if ($_SESSION['permissions']['edit']['inventory']) { |
|
| 357 | - echo '<a data-toggle="modal" href="#edit_civ_inv" class="btn btn-primary btn-xs" style="float: right;">'; |
|
| 358 | - echo '<i class="fa fa-pencil"></i></a>'; |
|
| 359 | - } |
|
| 360 | - } else { |
|
| 361 | - echo '<h4>'.errorMessage(381, $lang).'</h4>'; |
|
| 362 | - } ?> |
|
| 352 | + if ($player->civ_gear !== '"[]"' && $player->civ_gear !== '') { |
|
| 353 | + echo '<h4 style="centred">'.$lang['civil'].' '.$lang['gear'].'</h4>'; |
|
| 354 | + echo "<textarea class='form-control' readonly rows='5' style='width: 100%' id='civ_gear' name='civ_gear'>".$player->civ_gear.'</textarea><br>'; |
|
| 355 | + |
|
| 356 | + if ($_SESSION['permissions']['edit']['inventory']) { |
|
| 357 | + echo '<a data-toggle="modal" href="#edit_civ_inv" class="btn btn-primary btn-xs" style="float: right;">'; |
|
| 358 | + echo '<i class="fa fa-pencil"></i></a>'; |
|
| 359 | + } |
|
| 360 | + } else { |
|
| 361 | + echo '<h4>'.errorMessage(381, $lang).'</h4>'; |
|
| 362 | + } ?> |
|
| 363 | 363 | </div> |
| 364 | 364 | <div class="tab-pane fade well" id="police_inv"> |
| 365 | 365 | <?php |
| 366 | - if ($player->cop_gear !== '"[]"' && $player->cop_gear !== '') { |
|
| 367 | - echo '<h4 style="centred">'.$lang['cop'].' '.$lang['gear'].'</h4>'; |
|
| 368 | - echo "<textarea class='form-control' readonly rows='5' style='width: 100%' id='cop_gear' name='cop_gear'>".$player->cop_gear.'</textarea><br>'; |
|
| 369 | - if ($_SESSION['permissions']['edit']['inventory']) { |
|
| 370 | - echo '<a data-toggle="modal" href="#edit_cop_inv" class="btn btn-primary btn-xs" style="float: right;">'; |
|
| 371 | - echo '<i class="fa fa-pencil"></i></a>'; |
|
| 372 | - } |
|
| 373 | - } else { |
|
| 374 | - echo '<h4>'.errorMessage(383, $lang).'</h4>'; |
|
| 375 | - } ?> |
|
| 366 | + if ($player->cop_gear !== '"[]"' && $player->cop_gear !== '') { |
|
| 367 | + echo '<h4 style="centred">'.$lang['cop'].' '.$lang['gear'].'</h4>'; |
|
| 368 | + echo "<textarea class='form-control' readonly rows='5' style='width: 100%' id='cop_gear' name='cop_gear'>".$player->cop_gear.'</textarea><br>'; |
|
| 369 | + if ($_SESSION['permissions']['edit']['inventory']) { |
|
| 370 | + echo '<a data-toggle="modal" href="#edit_cop_inv" class="btn btn-primary btn-xs" style="float: right;">'; |
|
| 371 | + echo '<i class="fa fa-pencil"></i></a>'; |
|
| 372 | + } |
|
| 373 | + } else { |
|
| 374 | + echo '<h4>'.errorMessage(383, $lang).'</h4>'; |
|
| 375 | + } ?> |
|
| 376 | 376 | </div> |
| 377 | 377 | <div class="tab-pane fade well" id="medic_inv"> |
| 378 | 378 | <?php |
| 379 | - if ($player->med_gear !== '"[]"' && $player->med_gear !== '') { |
|
| 380 | - echo '<h4 style="centred">'.$lang['medic'].' '.$lang['gear'].'</h4>'; |
|
| 381 | - echo "<textarea class='form-control' readonly rows='5' style='width: 100%' id='med_gear' name='med_gear'>".$player->med_gear.'</textarea><br>'; |
|
| 382 | - if ($_SESSION['permissions']['edit']['inventory']) { |
|
| 383 | - echo '<a data-toggle="modal" href="#edit_med_inv" class="btn btn-primary btn-xs" style="float: right;">'; |
|
| 384 | - echo '<i class="fa fa-pencil"></i></a>'; |
|
| 385 | - } |
|
| 386 | - } else { |
|
| 387 | - echo '<h4>'.errorMessage(382, $lang).'</h4>'; |
|
| 388 | - } ?> |
|
| 379 | + if ($player->med_gear !== '"[]"' && $player->med_gear !== '') { |
|
| 380 | + echo '<h4 style="centred">'.$lang['medic'].' '.$lang['gear'].'</h4>'; |
|
| 381 | + echo "<textarea class='form-control' readonly rows='5' style='width: 100%' id='med_gear' name='med_gear'>".$player->med_gear.'</textarea><br>'; |
|
| 382 | + if ($_SESSION['permissions']['edit']['inventory']) { |
|
| 383 | + echo '<a data-toggle="modal" href="#edit_med_inv" class="btn btn-primary btn-xs" style="float: right;">'; |
|
| 384 | + echo '<i class="fa fa-pencil"></i></a>'; |
|
| 385 | + } |
|
| 386 | + } else { |
|
| 387 | + echo '<h4>'.errorMessage(382, $lang).'</h4>'; |
|
| 388 | + } ?> |
|
| 389 | 389 | </div> |
| 390 | 390 | <?php |
| 391 | 391 | } |
@@ -727,16 +727,16 @@ discard block |
||
| 727 | 727 | echo '<h4>'.$lang['cop'].': '; |
| 728 | 728 | echo "<select id='player_coplvl' name='player_coplvl'>"; |
| 729 | 729 | for ($lvl = 0; |
| 730 | - $lvl <= $settings['maxLevels']['cop']; |
|
| 731 | - ++$lvl) { |
|
| 730 | + $lvl <= $settings['maxLevels']['cop']; |
|
| 731 | + ++$lvl) { |
|
| 732 | 732 | echo '<option value="'.$lvl.'"'.select($lvl, $player->coplevel).'>'.$lvl.'</option>'; |
| 733 | 733 | } |
| 734 | 734 | echo '</select>'; |
| 735 | 735 | echo '<h4>'.$lang['medic'].': '; |
| 736 | 736 | echo "<select id='player_medlvl' name='player_medlvl'>"; |
| 737 | 737 | for ($lvl = 0; |
| 738 | - $lvl <= $settings['maxLevels']['medic']; |
|
| 739 | - ++$lvl) { |
|
| 738 | + $lvl <= $settings['maxLevels']['medic']; |
|
| 739 | + ++$lvl) { |
|
| 740 | 740 | echo '<option value="'.$lvl.'"'.select($lvl, $player->mediclevel).'>'.$lvl.'</option>'; |
| 741 | 741 | } |
| 742 | 742 | echo '</select>'; |
@@ -745,16 +745,16 @@ discard block |
||
| 745 | 745 | echo '<h4>'.$lang['admin'].': '; |
| 746 | 746 | echo "<select id='player_adminlvl' name='player_adminlvl'>"; |
| 747 | 747 | for ($lvl = 0; |
| 748 | - $lvl <= $settings['maxLevels']['admin']; |
|
| 749 | - ++$lvl) { |
|
| 748 | + $lvl <= $settings['maxLevels']['admin']; |
|
| 749 | + ++$lvl) { |
|
| 750 | 750 | echo '<option value="'.$lvl.'"'.select($lvl, $player->adminlevel).'>'.$lvl.'</option>'; |
| 751 | 751 | } |
| 752 | 752 | echo '</select>'; |
| 753 | 753 | echo '<h4>'.$lang['donator'].': '; |
| 754 | 754 | echo "<select id='player_donlvl' name='player_donlvl'>"; |
| 755 | 755 | for ($lvl = 0; |
| 756 | - $lvl <= $settings['maxLevels']['donator']; |
|
| 757 | - ++$lvl) { |
|
| 756 | + $lvl <= $settings['maxLevels']['donator']; |
|
| 757 | + ++$lvl) { |
|
| 758 | 758 | echo '<option value="'.$lvl.'"'.select($lvl, $player->$settings['donorFormat']).'>'.$lvl.'</option>'; |
| 759 | 759 | } |
| 760 | 760 | echo '</select>'; |
@@ -229,7 +229,7 @@ |
||
| 229 | 229 | <div class="col-md-2 col-sm-2 box0"> |
| 230 | 230 | <div class="box1"> |
| 231 | 231 | <span class="fa fa-3x fa-usd"></span> |
| 232 | - <h3> <?php $playerDonorLevel = $settings['donorFormat'];echo $lang['donator'].': '.$player->$playerDonorLevel; ?> </h3> |
|
| 232 | + <h3> <?php $playerDonorLevel = $settings['donorFormat']; echo $lang['donator'].': '.$player->$playerDonorLevel; ?> </h3> |
|
| 233 | 233 | </div> |
| 234 | 234 | </div> |
| 235 | 235 | <div class="col-md-2 col-sm-2 box0"> |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | * @throws \Exception if the connection is closed |
| 198 | 198 | * @throws \Exception if sending the command failed |
| 199 | 199 | * |
| 200 | - * @return bool Whether sending the command was successful or not |
|
| 200 | + * @return boolean|null Whether sending the command was successful or not |
|
| 201 | 201 | */ |
| 202 | 202 | protected function send($command) |
| 203 | 203 | { |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | /** |
| 227 | 227 | * Generates the password's CRC32 data |
| 228 | 228 | * |
| 229 | - * @return string |
|
| 229 | + * @return string[] |
|
| 230 | 230 | */ |
| 231 | 231 | private function getAuthCRC() |
| 232 | 232 | { |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | * |
| 240 | 240 | * @param string $command The message which will be prepared for being sent to the server |
| 241 | 241 | * |
| 242 | - * @return string Message which can be sent to the server |
|
| 242 | + * @return string[] Message which can be sent to the server |
|
| 243 | 243 | */ |
| 244 | 244 | private function getMsgCRC($command) |
| 245 | 245 | { |
@@ -613,7 +613,7 @@ discard block |
||
| 613 | 613 | * @author nerdalertdk (https://github.com/nerdalertdk) |
| 614 | 614 | * @link https://github.com/Nizarii/arma-rcon-class-php/issues/4 The related GitHub issue |
| 615 | 615 | * |
| 616 | - * @param $str string |
|
| 616 | + * @param string $str string |
|
| 617 | 617 | * |
| 618 | 618 | * @return string |
| 619 | 619 | */ |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | throw new \Exception('Failed to send login!'); |
| 165 | 165 | } |
| 166 | 166 | $result = fread($this->socket, 16); |
| 167 | - if (@ord($result[strlen($result)-1]) == 0) { |
|
| 167 | + if (@ord($result[strlen($result) - 1]) == 0) { |
|
| 168 | 168 | throw new \Exception('Login failed, wrong password or wrong port!'); |
| 169 | 169 | } |
| 170 | 170 | } |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | private function getAuthCRC() |
| 232 | 232 | { |
| 233 | 233 | $authCRC = sprintf('%x', crc32(chr(255).chr(00).trim($this->rconPassword))); |
| 234 | - $authCRC = array(substr($authCRC,-2,2), substr($authCRC,-4,2), substr($authCRC,-6,2), substr($authCRC,0,2)); |
|
| 234 | + $authCRC = array(substr($authCRC, -2, 2), substr($authCRC, -4, 2), substr($authCRC, -6, 2), substr($authCRC, 0, 2)); |
|
| 235 | 235 | return $authCRC; |
| 236 | 236 | } |
| 237 | 237 | /** |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | private function getMsgCRC($command) |
| 245 | 245 | { |
| 246 | 246 | $msgCRC = sprintf('%x', crc32(chr(255).chr(01).chr(hexdec(sprintf('%01b', 0))).$command)); |
| 247 | - $msgCRC = array(substr($msgCRC,-2,2),substr($msgCRC,-4,2),substr($msgCRC,-6,2),substr($msgCRC,0,2)); |
|
| 247 | + $msgCRC = array(substr($msgCRC, -2, 2), substr($msgCRC, -4, 2), substr($msgCRC, -6, 2), substr($msgCRC, 0, 2)); |
|
| 248 | 248 | return $msgCRC; |
| 249 | 249 | } |
| 250 | 250 | /** |
@@ -599,9 +599,9 @@ discard block |
||
| 599 | 599 | // Create return array |
| 600 | 600 | $result = array(); |
| 601 | 601 | // Loop true the main arrays, each holding a value |
| 602 | - foreach($str as $key => $value) { |
|
| 602 | + foreach ($str as $key => $value) { |
|
| 603 | 603 | // Combines each main value into new array |
| 604 | - foreach($value as $keyLine => $line) { |
|
| 604 | + foreach ($value as $keyLine => $line) { |
|
| 605 | 605 | $result[$keyLine][$key] = trim($line); |
| 606 | 606 | } |
| 607 | 607 | } |
@@ -11,13 +11,13 @@ |
||
| 11 | 11 | $reason = clean((isset($_POST['REASON'])) ? $_POST['REASON'] : 0, "int"); |
| 12 | 12 | |
| 13 | 13 | |
| 14 | - $sql = "SELECT * FROM `servers` WHERE `use_sq` = 1 AND `sid` = " . $sid . ";"; |
|
| 14 | + $sql = "SELECT * FROM `servers` WHERE `use_sq` = 1 AND `sid` = ".$sid.";"; |
|
| 15 | 15 | $result_of_query = $db_connection->query($sql); |
| 16 | 16 | if ($result_of_query->num_rows == 1) { |
| 17 | 17 | $server = $result_of_query->fetch_object(); |
| 18 | 18 | try |
| 19 | 19 | { |
| 20 | - $rcon = new \Nizarii\ARC(decrypt($server->sq_ip), decrypt($server->rcon_pass), (int)decrypt($server->sq_port)); |
|
| 20 | + $rcon = new \Nizarii\ARC(decrypt($server->sq_ip), decrypt($server->rcon_pass), (int) decrypt($server->sq_port)); |
|
| 21 | 21 | $answer = $rcon->banPlayer($rid, $reason, $time); |
| 22 | 22 | } |
| 23 | 23 | catch (Exception $e) |
@@ -19,8 +19,7 @@ |
||
| 19 | 19 | { |
| 20 | 20 | $rcon = new \Nizarii\ARC(decrypt($server->sq_ip), decrypt($server->rcon_pass), (int)decrypt($server->sq_port)); |
| 21 | 21 | $answer = $rcon->banPlayer($rid, $reason, $time); |
| 22 | - } |
|
| 23 | - catch (Exception $e) |
|
| 22 | + } catch (Exception $e) |
|
| 24 | 23 | { |
| 25 | 24 | echo $e->getMessage( ); |
| 26 | 25 | } |
@@ -20,8 +20,7 @@ |
||
| 20 | 20 | { |
| 21 | 21 | $rcon = new \Nizarii\ARC(decrypt($server->sq_ip), decrypt($server->rcon_pass), (int)decrypt($server->sq_port)); |
| 22 | 22 | $answer = $rcon->command($cmd); |
| 23 | - } |
|
| 24 | - catch (Exception $e) |
|
| 23 | + } catch (Exception $e) |
|
| 25 | 24 | { |
| 26 | 25 | echo $e->getMessage( ); |
| 27 | 26 | } |
@@ -11,13 +11,13 @@ |
||
| 11 | 11 | $sid = clean($_POST['sid'], "int"); |
| 12 | 12 | $cmd = clean($_POST['command'], "string"); |
| 13 | 13 | |
| 14 | - $sql = "SELECT * FROM `servers` WHERE `use_sq` = 1 AND `sid` = " . $sid . ";"; |
|
| 14 | + $sql = "SELECT * FROM `servers` WHERE `use_sq` = 1 AND `sid` = ".$sid.";"; |
|
| 15 | 15 | $result_of_query = $db_connection->query($sql); |
| 16 | 16 | if ($result_of_query->num_rows == 1) { |
| 17 | 17 | $server = $result_of_query->fetch_object(); |
| 18 | 18 | try |
| 19 | 19 | { |
| 20 | - $rcon = new \Nizarii\ARC(decrypt($server->sq_ip), decrypt($server->rcon_pass), (int)decrypt($server->sq_port)); |
|
| 20 | + $rcon = new \Nizarii\ARC(decrypt($server->sq_ip), decrypt($server->rcon_pass), (int) decrypt($server->sq_port)); |
|
| 21 | 21 | $answer = $rcon->command($cmd); |
| 22 | 22 | } |
| 23 | 23 | catch (Exception $e) |
@@ -16,8 +16,7 @@ |
||
| 16 | 16 | |
| 17 | 17 | echo json_encode($answer); |
| 18 | 18 | |
| 19 | - } |
|
| 20 | - catch (Exception $e) |
|
| 19 | + } catch (Exception $e) |
|
| 21 | 20 | { |
| 22 | 21 | echo $e->getMessage( ); |
| 23 | 22 | var_dump($e); |
@@ -5,13 +5,13 @@ |
||
| 5 | 5 | if (isset($_GET['sid'])) { |
| 6 | 6 | $sid = clean($_GET['sid'], "int"); |
| 7 | 7 | $db_connection = masterConnect(); |
| 8 | - $sql = "SELECT `sq_ip`,`sq_port`,`rcon_pass` FROM `servers` WHERE `use_sq` = 1 AND `sid` = " . $sid . ";"; |
|
| 8 | + $sql = "SELECT `sq_ip`,`sq_port`,`rcon_pass` FROM `servers` WHERE `use_sq` = 1 AND `sid` = ".$sid.";"; |
|
| 9 | 9 | $result_of_query = $db_connection->query($sql); |
| 10 | 10 | if ($result_of_query->num_rows == 1) { |
| 11 | 11 | $server = $result_of_query->fetch_object(); |
| 12 | 12 | try |
| 13 | 13 | { |
| 14 | - $rcon = new \Nizarii\ARC(decrypt($server->sq_ip), decrypt($server->rcon_pass), (int)decrypt($server->sq_port)); |
|
| 14 | + $rcon = new \Nizarii\ARC(decrypt($server->sq_ip), decrypt($server->rcon_pass), (int) decrypt($server->sq_port)); |
|
| 15 | 15 | $answer = $rcon->getPlayersArray(); |
| 16 | 16 | |
| 17 | 17 | echo json_encode($answer); |
@@ -1,12 +1,12 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -$sql = "SELECT `sid` FROM `servers` WHERE `use_sq` = 1 AND `sid` = " . $sid . ";"; |
|
| 2 | +$sql = "SELECT `sid` FROM `servers` WHERE `use_sq` = 1 AND `sid` = ".$sid.";"; |
|
| 3 | 3 | $result_of_query = $db_connection->query($sql); |
| 4 | 4 | if ($result_of_query->num_rows == 1) { ?> |
| 5 | 5 | <div class="row"> |
| 6 | 6 | <div class="col-lg-12"> |
| 7 | 7 | <h1 class="page-header"> |
| 8 | 8 | <?php echo $lang['players']; ?> |
| 9 | - <small><?php echo " " . $lang['overview']; ?></small> |
|
| 9 | + <small><?php echo " ".$lang['overview']; ?></small> |
|
| 10 | 10 | </h1> |
| 11 | 11 | </div> |
| 12 | 12 | </div> |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | } |
| 29 | 29 | function getPlayers() { |
| 30 | 30 | $.ajax({ |
| 31 | - url: "<?php echo $settings['url'] . 'hooks/rcon_players.php?sid=' . $sid ?>", |
|
| 31 | + url: "<?php echo $settings['url'].'hooks/rcon_players.php?sid='.$sid ?>", |
|
| 32 | 32 | dataType: 'json', |
| 33 | 33 | complete: function(data) { |
| 34 | 34 | var txt = ''; |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | <div class="content-panel"> |
| 54 | 54 | <table class="table table-striped table-advance table-hover"> |
| 55 | 55 | <h4> |
| 56 | - <i class="fa fa-child fa-fw"></i><?php echo " " . $lang['players']; ?> |
|
| 56 | + <i class="fa fa-child fa-fw"></i><?php echo " ".$lang['players']; ?> |
|
| 57 | 57 | <div style="float:right; padding-right: 20px;" id="count"></div> |
| 58 | 58 | </h4> |
| 59 | 59 | <hr> |