@@ -332,7 +332,9 @@ discard block |
||
| 332 | 332 | } elseif ($type == 'boolean') { |
| 333 | 333 | return ($input === 'true'); |
| 334 | 334 | } elseif ($type == 'intbool') { |
| 335 | - if ($input == 1 || $input == 0) return $input; |
|
| 335 | + if ($input == 1 || $input == 0) { |
|
| 336 | + return $input; |
|
| 337 | + } |
|
| 336 | 338 | } else { |
| 337 | 339 | return 0; |
| 338 | 340 | } |
@@ -388,8 +390,9 @@ discard block |
||
| 388 | 390 | $url .= "?s=$s&d=$d&r=$r"; |
| 389 | 391 | if ( $img ) { |
| 390 | 392 | $url = '<img src="' . $url . '"'; |
| 391 | - foreach ( $atts as $key => $val ) |
|
| 392 | - $url .= ' ' . $key . '="' . $val . '"'; |
|
| 393 | + foreach ( $atts as $key => $val ) { |
|
| 394 | + $url .= ' ' . $key . '="' . $val . '"'; |
|
| 395 | + } |
|
| 393 | 396 | $url .= ' />'; |
| 394 | 397 | } |
| 395 | 398 | return $url; |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | </div> |
| 42 | 42 | </div> |
| 43 | 43 | </li> |
| 44 | - <?php }elseif ($row['type'] == 'waste') { ?> |
|
| 44 | + <?php } elseif ($row['type'] == 'waste') { ?> |
|
| 45 | 45 | <li class="list-danger"> |
| 46 | 46 | <i class=" fa fa-ellipsis-v"></i> |
| 47 | 47 | <div class="task-title"> |
@@ -272,7 +272,8 @@ discard block |
||
| 272 | 272 | </tbody> |
| 273 | 273 | </table> |
| 274 | 274 | <?php echo '<a class="fa fa-caret-right fa-2x" style="float: right; padding-right:15px;" href="' . $settings['url'] . 'houses/' . $player->playerid . '"> More</a>'; |
| 275 | - } else echo $lang['noHouse'] ?> |
|
| 275 | + } else { |
|
| 276 | + echo $lang['noHouse'] ?> |
|
| 276 | 277 | </div> |
| 277 | 278 | </div> |
| 278 | 279 | <?php } if ($player->playerid == $_SESSION['playerid']) { ?> |
@@ -281,6 +282,7 @@ discard block |
||
| 281 | 282 | <?php |
| 282 | 283 | $sql = "SELECT `classname`,`type`,`id`,`plate` FROM `vehicles` WHERE `pid` = '" . $player->playerid . "' ORDER BY `id` DESC LIMIT 8"; |
| 283 | 284 | } |
| 285 | + } |
|
| 284 | 286 | $result_of_query = $db_link->query($sql); |
| 285 | 287 | if ($result_of_query->num_rows > 0) { |
| 286 | 288 | $veh = $result_of_query->fetch_object(); |
@@ -10,13 +10,17 @@ discard block |
||
| 10 | 10 | $sql = "SELECT `id`,`pid`,`classname`,`active`,`type`,`plate`,`alive`,`active` FROM `vehicles` INNER JOIN `players` ON vehicles.pid=players.playerid WHERE `pid` LIKE '" . $_SESSION['playerid'] . "' OR `classname` LIKE '%" . $search . "%' OR `name` LIKE '%" . $search . "%' OR `plate` LIKE '" . $search . "' OR `inventory` LIKE '%" . $search . "%';"; |
| 11 | 11 | $result_of_query = $db_link->query($sql); |
| 12 | 12 | $total_records = mysqli_num_rows($result_of_query); |
| 13 | - if ($pageNum > $total_records) $pageNum = $total_records; |
|
| 13 | + if ($pageNum > $total_records) { |
|
| 14 | + $pageNum = $total_records; |
|
| 15 | + } |
|
| 14 | 16 | $sql = "SELECT `id`,`pid`,`classname`,`active`,`type`,`plate`,`alive`,`active` FROM `vehicles` INNER JOIN `players` ON vehicles.pid=players.playerid WHERE `pid` LIKE '" . $_SESSION['playerid'] . "' OR `classname` LIKE '%" . $search . "%' OR `name` LIKE '%" . $search . "%' OR `plate` LIKE '" . $search . "' OR `inventory` LIKE '%" . $search . "%'" . $max . " ;"; |
| 15 | 17 | } else { |
| 16 | 18 | $sql = "SELECT `id` FROM `vehicles` INNER JOIN `players` ON vehicles.pid=players.playerid WHERE `pid` LIKE '" . $_SESSION['playerid'] . "';"; |
| 17 | 19 | $result_of_query = $db_link->query($sql); |
| 18 | 20 | $total_records = mysqli_num_rows($result_of_query); |
| 19 | - if ($pageNum > $total_records) $pageNum = $total_records; |
|
| 21 | + if ($pageNum > $total_records) { |
|
| 22 | + $pageNum = $total_records; |
|
| 23 | + } |
|
| 20 | 24 | $sql = "SELECT `id`,`pid`,`classname`,`active`,`type`,`plate`,`alive`,`active` FROM `vehicles` INNER JOIN `players` ON vehicles.pid=players.playerid WHERE `pid` LIKE '" . $_SESSION['playerid'] . "' " . $max . " ;"; |
| 21 | 25 | } |
| 22 | 26 | $result_of_query = $db_link->query($sql); |
@@ -74,4 +78,6 @@ discard block |
||
| 74 | 78 | </table> |
| 75 | 79 | </div> |
| 76 | 80 | <?php |
| 77 | -} else echo errorMessage(3, $lang); |
|
| 78 | 81 | \ No newline at end of file |
| 82 | +} else { |
|
| 83 | + echo errorMessage(3, $lang); |
|
| 84 | +} |
|
@@ -277,7 +277,9 @@ discard block |
||
| 277 | 277 | </tbody> |
| 278 | 278 | </table> |
| 279 | 279 | <?php echo '<a class="fa fa-caret-right fa-2x" style="float: right; padding-right:15px;" href="' . $settings['url'] . 'houses/' . $player->playerid . '"> More</a>'; |
| 280 | - } else echo errorMessage(31, $lang); |
|
| 280 | + } else { |
|
| 281 | + echo errorMessage(31, $lang); |
|
| 282 | + } |
|
| 281 | 283 | < / div > |
| 282 | 284 | < / div > |
| 283 | 285 | < ? php } ?> |
@@ -313,7 +315,9 @@ discard block |
||
| 313 | 315 | echo '</tbody></table>'; |
| 314 | 316 | echo '<a class="fa fa-caret-right fa-2x" style="float: right; padding-right:15px;" href="' . $settings['url'] . 'vehicles/' . $player->playerid . '"> More</a>'; |
| 315 | 317 | |
| 316 | - } else echo errorMessage(31, $lang); |
|
| 318 | + } else { |
|
| 319 | + echo errorMessage(31, $lang); |
|
| 320 | + } |
|
| 317 | 321 | ?> |
| 318 | 322 | </div> |
| 319 | 323 | </div> |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | </div> |
| 31 | 31 | </div> |
| 32 | 32 | </li> |
| 33 | - <?php }elseif ($row['type'] == 'waste') { ?> |
|
| 33 | + <?php } elseif ($row['type'] == 'waste') { ?> |
|
| 34 | 34 | <li class="list-danger"> |
| 35 | 35 | <i class=" fa fa-ellipsis-v"></i> |
| 36 | 36 | <div class="task-title"> |
@@ -5,7 +5,10 @@ |
||
| 5 | 5 | </h1> |
| 6 | 6 | </div> |
| 7 | 7 | </div> |
| 8 | -<?php if (isset($_SESSION['update'])) echo '<div class="alert alert-info" role="alert">' . $land['updateMessage'] . ' (' . $_SESSION['message']->version . ')</div>'; ?> |
|
| 8 | +<?php if (isset($_SESSION['update'])) { |
|
| 9 | + echo '<div class="alert alert-info" role="alert">' . $land['updateMessage'] . ' (' . $_SESSION['message']->version . ')</div>'; |
|
| 10 | +} |
|
| 11 | +?> |
|
| 9 | 12 | |
| 10 | 13 | <div class="row mt mb"> |
| 11 | 14 | <div class="col-md-12"> |
@@ -70,7 +70,9 @@ discard block |
||
| 70 | 70 | <?php |
| 71 | 71 | foreach ($settings['installedLanguage'] as $language) { |
| 72 | 72 | echo '<option value = "' . $language[1] . '" '; |
| 73 | - if ($settings['language'] == $language[1]) echo 'selected'; |
|
| 73 | + if ($settings['language'] == $language[1]) { |
|
| 74 | + echo 'selected'; |
|
| 75 | + } |
|
| 74 | 76 | echo '> ' . $language[0] . '</option>'; |
| 75 | 77 | } ?> |
| 76 | 78 | </select></div> |
@@ -196,7 +198,9 @@ discard block |
||
| 196 | 198 | <span class='input-group-btn'><button style='margin-top: 21px;' class='btn btn-default reveal' type='button'><i class='fa fa-eye-slash'></i></button></span></div> |
| 197 | 199 | |
| 198 | 200 | <?php |
| 199 | - if (!isset($pluginSettings)) echo '<h3>' . $lang['plugin'] . ' ' . $lang['settings'] . '</h3>'; |
|
| 201 | + if (!isset($pluginSettings)) { |
|
| 202 | + echo '<h3>' . $lang['plugin'] . ' ' . $lang['settings'] . '</h3>'; |
|
| 203 | + } |
|
| 200 | 204 | foreach ($settings['plugins'] as &$plugin) { |
| 201 | 205 | if (file_exists("plugins/" . $plugin . "/settings.php")) { |
| 202 | 206 | include("plugins/" . $plugin . "/settings.php"); |
@@ -32,7 +32,9 @@ discard block |
||
| 32 | 32 | setcookie('token', '', time() - 3600, '/'); |
| 33 | 33 | message($lang['2factorDeviceRevoke']); |
| 34 | 34 | } elseif (isset($_GET['revokeToken']) && $_SESSION['2factor'] == 2) { |
| 35 | - if (isset($_COOKIE['token'])) unset($_COOKIE['token']); |
|
| 35 | + if (isset($_COOKIE['token'])) { |
|
| 36 | + unset($_COOKIE['token']); |
|
| 37 | + } |
|
| 36 | 38 | $sql = "UPDATE `users` SET `token`='NULL' WHERE `user_id` = '" . $_SESSION['user_id'] . "';"; |
| 37 | 39 | $db_connection->query($sql); |
| 38 | 40 | message($lang['2factorTokenRevoke']); |
@@ -42,8 +44,10 @@ discard block |
||
| 42 | 44 | $db_connection->query($sql); |
| 43 | 45 | $_SESSION['2factor'] = 2; |
| 44 | 46 | message($lang['2factor1']); |
| 45 | - } else message($lang['2factor2']); |
|
| 46 | -} ?> |
|
| 47 | + } else { |
|
| 48 | + message($lang['2factor2']); |
|
| 49 | + } |
|
| 50 | + } ?> |
|
| 47 | 51 | <div class="row"> |
| 48 | 52 | <div class="col-lg-8"> |
| 49 | 53 | <h1 class="page-header"> |
@@ -53,7 +57,9 @@ discard block |
||
| 53 | 57 | </div> |
| 54 | 58 | <?php |
| 55 | 59 | if ($_SESSION['2factor'] == 1 || $_SESSION['2factor'] == 5 || $_SESSION['2factor'] == 3) { |
| 56 | - if ($_SESSION['2factor'] == 3) message($lang['2factorError2']); |
|
| 60 | + if ($_SESSION['2factor'] == 3) { |
|
| 61 | + message($lang['2factorError2']); |
|
| 62 | + } |
|
| 57 | 63 | echo '<form method="post" action="' . $currentPage . '" class="form-inline"> |
| 58 | 64 | <label for="code">'.$lang['2factorSetup3'] . '<div class="form-group"></label><input class="form-control" id="code" type="text" name="code"></div> |
| 59 | 65 | <button type="submit" class="btn btn-default">Verify</button></form>'; |
@@ -61,12 +67,21 @@ discard block |
||
| 61 | 67 | echo $lang['2factor1'] . '<br><br><a href="?backup" class="btn btn-default">'; |
| 62 | 68 | $sql = "SELECT `backup`,`token` FROM `users` WHERE `user_id` = '" . $_SESSION['user_id'] . "';"; |
| 63 | 69 | $twoFactor = $db_connection->query($sql)->fetch_object(); |
| 64 | - if (isset($twoFactor->backup)) echo $lang['new'] . ' ' . $lang['2factor3']; else echo $lang['2factor3']; |
|
| 70 | + if (isset($twoFactor->backup)) { |
|
| 71 | + echo $lang['new'] . ' ' . $lang['2factor3']; |
|
| 72 | + } else { |
|
| 73 | + echo $lang['2factor3']; |
|
| 74 | + } |
|
| 65 | 75 | echo '</a>'; |
| 66 | 76 | echo '<a href="?revoke" style="margin-left: 5px;" class="btn btn-danger">' . $lang['2factor4'] . '</a>'; |
| 67 | - if (isset($twoFactor->token)) echo '<a href="?revokeToken" style="margin-left: 5px;" class="btn btn-danger">' . $lang['2factorTokenRevoke'] . '</a>'; |
|
| 68 | - if (isset($_COOKIE['token'])) echo '<a href="?revokeDevice" style="margin-left: 5px;" class="btn btn-danger">' . $lang['2factorRevokeRememberDevice']; |
|
| 69 | - else echo '<a href="?remember" style="margin-left: 5px;" class="btn btn-primary">' . $lang['2factorRememberDevice']; |
|
| 77 | + if (isset($twoFactor->token)) { |
|
| 78 | + echo '<a href="?revokeToken" style="margin-left: 5px;" class="btn btn-danger">' . $lang['2factorTokenRevoke'] . '</a>'; |
|
| 79 | + } |
|
| 80 | + if (isset($_COOKIE['token'])) { |
|
| 81 | + echo '<a href="?revokeDevice" style="margin-left: 5px;" class="btn btn-danger">' . $lang['2factorRevokeRememberDevice']; |
|
| 82 | + } else { |
|
| 83 | + echo '<a href="?remember" style="margin-left: 5px;" class="btn btn-primary">' . $lang['2factorRememberDevice']; |
|
| 84 | + } |
|
| 70 | 85 | echo '</a>'; |
| 71 | 86 | |
| 72 | 87 | } elseif ($_SESSION['2factor'] == 0 || $_SESSION['2factor'] == 5) { |
@@ -76,8 +91,11 @@ discard block |
||
| 76 | 91 | echo "<i class='fa fa-info-circle'></i> " . $lang['2factorForce'] . "</div></div>"; |
| 77 | 92 | } |
| 78 | 93 | $secret = $gauth->createSecret(); |
| 79 | - if (isset($settings['communityName'])) $name = urlencode(str_replace(' ', '', $settings['communityName']) . "CyberWorks"); |
|
| 80 | - else $name = 'CyberWorks'; |
|
| 94 | + if (isset($settings['communityName'])) { |
|
| 95 | + $name = urlencode(str_replace(' ', '', $settings['communityName']) . "CyberWorks"); |
|
| 96 | + } else { |
|
| 97 | + $name = 'CyberWorks'; |
|
| 98 | + } |
|
| 81 | 99 | echo '<div class="col-md-6">' . $lang['2factorSetup1'] . '<br>' . $lang['2factorSetup2'] . ' <b>' . $secret . '</b><br><form method="post" action="2factor" class="form-inline"> |
| 82 | 100 | <label for="testCode">'.$lang['2factorSetup3'] . '<div class="form-group"></label><input style="margin-left: 5px;" class="form-control" id="testCode" type="text" name="testCode"></div> |
| 83 | 101 | <input type="hidden" id="secret" name="secret" value="'.$secret . '"><button type="submit" class="btn btn-default">Verify</button> |