@@ -382,13 +382,13 @@ |
||
| 382 | 382 | * @return String containing either just a URL or a complete image tag |
| 383 | 383 | * @source http://gravatar.com/site/implement/images/php/ |
| 384 | 384 | */ |
| 385 | -function get_gravatar( $email, $s = 80, $d = 'mm', $r = 'x', $img = false, $atts = array() ) { |
|
| 385 | +function get_gravatar($email, $s = 80, $d = 'mm', $r = 'x', $img = false, $atts = array()) { |
|
| 386 | 386 | $url = 'https://www.gravatar.com/avatar/'; |
| 387 | - $url .= md5( strtolower( trim( $email ) ) ); |
|
| 387 | + $url .= md5(strtolower(trim($email))); |
|
| 388 | 388 | $url .= "?s=$s&d=$d&r=$r"; |
| 389 | - if ( $img ) { |
|
| 389 | + if ($img) { |
|
| 390 | 390 | $url = '<img src="' . $url . '"'; |
| 391 | - foreach ( $atts as $key => $val ) |
|
| 391 | + foreach ($atts as $key => $val) |
|
| 392 | 392 | $url .= ' ' . $key . '="' . $val . '"'; |
| 393 | 393 | $url .= ' />'; |
| 394 | 394 | } |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | |
| 27 | 27 | if ($result_of_query->num_rows >= 1) { |
| 28 | 28 | while ($row = mysqli_fetch_assoc($result_of_query)) { |
| 29 | - if ($row['type'] == 'life'){ ?> |
|
| 29 | + if ($row['type'] == 'life') { ?> |
|
| 30 | 30 | <li class="list-primary"> |
| 31 | 31 | <i class=" fa fa-ellipsis-v"></i> |
| 32 | 32 | <div class="task-title"> |
@@ -166,14 +166,14 @@ discard block |
||
| 166 | 166 | } |
| 167 | 167 | } |
| 168 | 168 | } else { |
| 169 | - echo errorMessage(37,$lang); |
|
| 169 | + echo errorMessage(37, $lang); |
|
| 170 | 170 | }?> |
| 171 | 171 | </div> |
| 172 | 172 | <div class="tab-pane well fade" id="medic_lic"> |
| 173 | 173 | <h4 style="centred"><?php echo $lang['medic'] . " " . $lang['licenses']; ?> </h4> |
| 174 | 174 | <?php |
| 175 | 175 | if ($player->med_licenses !== '"[]"') { |
| 176 | - $return = stripArray($player->med_licenses,0); |
|
| 176 | + $return = stripArray($player->med_licenses, 0); |
|
| 177 | 177 | |
| 178 | 178 | foreach ($return as $value) { |
| 179 | 179 | if (strpos($value, "1") == TRUE) { |
@@ -185,14 +185,14 @@ discard block |
||
| 185 | 185 | } |
| 186 | 186 | } |
| 187 | 187 | } else { |
| 188 | - echo errorMessage(37,$lang); |
|
| 188 | + echo errorMessage(37, $lang); |
|
| 189 | 189 | } ?> |
| 190 | 190 | </div> |
| 191 | 191 | <div class="tab-pane well fade" id="police_lic"> |
| 192 | 192 | <h4 style="centred"><?php echo $lang['cop'] . " " . $lang['licenses']; ?> </h4> |
| 193 | 193 | <?php |
| 194 | 194 | if ($player->cop_licenses !== '"[]"') { |
| 195 | - $return = stripArray($player->cop_licenses,0); |
|
| 195 | + $return = stripArray($player->cop_licenses, 0); |
|
| 196 | 196 | |
| 197 | 197 | foreach ($return as $value) { |
| 198 | 198 | if (strpos($value, "1") == TRUE) { |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | } |
| 205 | 205 | } |
| 206 | 206 | } else { |
| 207 | - echo errorMessage(37,$lang); |
|
| 207 | + echo errorMessage(37, $lang); |
|
| 208 | 208 | } |
| 209 | 209 | ?> |
| 210 | 210 | </div> |
@@ -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> |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | <div class="task-title"> |
| 30 | 30 | <span class="task-title-sp"><?php echo $row['name']; ?></span> |
| 31 | 31 | <?php |
| 32 | - if ($row['type'] == 'life'){ |
|
| 32 | + if ($row['type'] == 'life') { |
|
| 33 | 33 | echo '<span class="badge bg-theme">Life</span>'; |
| 34 | 34 | } elseif ($row['type'] == 'waste') { |
| 35 | 35 | echo '<span class="badge bg-important">Wasteland</span>'; |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | if (formtoken::validateToken($_POST)) { |
| 16 | 16 | $sql = "SELECT `user_password_hash` FROM `users` WHERE `user_id` = '" . $_SESSION['user_id'] . "';"; |
| 17 | 17 | $result = $db_connection->query($sql)->fetch_object(); |
| 18 | - if ($_POST['user_password'] == $_POST['user_password_again'] && password_verify($_POST['current_password'],$result->user_password_hash)) { |
|
| 18 | + if ($_POST['user_password'] == $_POST['user_password_again'] && password_verify($_POST['current_password'], $result->user_password_hash)) { |
|
| 19 | 19 | $sql = "UPDATE `users` SET `user_password_hash`= '" . password_hash($_POST['user_password'], PASSWORD_DEFAULT) . "' WHERE `user_id` = '" . $_SESSION['user_id'] . "';"; |
| 20 | 20 | $result_of_query = $db_connection->query($sql); |
| 21 | 21 | message($lang['passChanged']); |
@@ -43,16 +43,16 @@ discard block |
||
| 43 | 43 | if (!isset($_SESSION['profile_link'])) { |
| 44 | 44 | if (isset($_SESSION['user_email']) && $settings['gravatar']) { |
| 45 | 45 | echo '<a href="' . $settings['url'] . 'profile">'; |
| 46 | - echo '<img src="' . get_gravatar($_SESSION['user_email'],64,'retro') . '" class="img-circle" width="60" height="60"></a>'.$lang['gravatarProfile']; |
|
| 46 | + echo '<img src="' . get_gravatar($_SESSION['user_email'], 64, 'retro') . '" class="img-circle" width="60" height="60"></a>' . $lang['gravatarProfile']; |
|
| 47 | 47 | } else { |
| 48 | 48 | echo '<a href="' . $settings['url'] . 'profile">'; |
| 49 | 49 | echo '<img src="' . $settings['url'] . 'assets/img/profile/' . $_SESSION['user_profile'] . '.jpg"'; |
| 50 | - echo 'class="img-circle" width="60" height="60"></a>'.$lang['themeProfile']; |
|
| 50 | + echo 'class="img-circle" width="60" height="60"></a>' . $lang['themeProfile']; |
|
| 51 | 51 | } |
| 52 | 52 | } else { |
| 53 | 53 | echo '<a href="' . $_SESSION['profile_link'] . '" target="_blank">'; |
| 54 | 54 | echo '<img src="' . $_SESSION['user_profile'] . '"'; |
| 55 | - echo 'class="img-circle" width="64" height="64"></a>'.$lang['steamProfile']; |
|
| 55 | + echo 'class="img-circle" width="64" height="64"></a>' . $lang['steamProfile']; |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | echo '<br><form method="post" action="profile" name="profileEdit" id="profileEdit">'; |
@@ -120,11 +120,11 @@ |
||
| 120 | 120 | </div> |
| 121 | 121 | <div class="panel-body"> |
| 122 | 122 | <?php echo "<form method='post' action='" . $settings['url'] . 'editStaff/' . $uId . "' name='permsUpdate'>"; |
| 123 | - $permissions = json_decode($user->permissions,true); |
|
| 123 | + $permissions = json_decode($user->permissions, true); |
|
| 124 | 124 | ?> |
| 125 | 125 | <div class="col-md-4" style='padding-right: 0px; padding-left: 0px;'> |
| 126 | 126 | <div class="panel-heading"> |
| 127 | - <div class="pull-left"><h5><i class="fa fa-tasks"></i><?php echo ' '.$lang['admin'].' '.$lang['perms']; ?></h5></div> |
|
| 127 | + <div class="pull-left"><h5><i class="fa fa-tasks"></i><?php echo ' ' . $lang['admin'] . ' ' . $lang['perms']; ?></h5></div> |
|
| 128 | 128 | <br> |
| 129 | 129 | </div> |
| 130 | 130 | <div class="panel-body"> |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | RewriteRule . /'.$base . 'index.php [L] |
| 34 | 34 | |
| 35 | 35 | php_value file_get_contents 1'; |
| 36 | - file_put_contents('.htaccess',$hta); |
|
| 36 | + file_put_contents('.htaccess', $hta); |
|
| 37 | 37 | //if (isset($_POST['user_pid'])) $verify = str_replace(" ", "%20", 'http://cyberbyte.org.uk/hooks/cyberworks/getid.php?url=' . $settings['url'] . '&name=' . $_POST['community_name'] . '&pid=' . $_POST['user_pid']); |
| 38 | 38 | //else $verify = str_replace(" ", "%20", 'http://cyberbyte.org.uk/hooks/cyberworks/getid.php?url=' . $settings['url'] . '&name=' . $_POST['community_name']); |
| 39 | 39 | //$verify = json_decode(file_get_contents($verify)); |
@@ -113,19 +113,19 @@ discard block |
||
| 113 | 113 | $settings['communityBansTest'] = false; |
| 114 | 114 | $settings['communityBansAPI'] = ''; |
| 115 | 115 | |
| 116 | - $settings['item'] = array(5,10,15,25,50); |
|
| 116 | + $settings['item'] = array(5, 10, 15, 25, 50); |
|
| 117 | 117 | |
| 118 | - $settings['installedLanguage']=array(); |
|
| 119 | - $lang = array('English','en'); |
|
| 118 | + $settings['installedLanguage'] = array(); |
|
| 119 | + $lang = array('English', 'en'); |
|
| 120 | 120 | array_push($settings['installedLanguage'], $lang); |
| 121 | 121 | |
| 122 | 122 | $settings['names'] = array('', 'Dave', 'Sam', 'Joe', 'Kerry', 'Connie', 'Jess'); |
| 123 | - $settings['ranks'] = array('Banned','Player','Member','Moderator','Server Admin','Super Admin'); |
|
| 123 | + $settings['ranks'] = array('Banned', 'Player', 'Member', 'Moderator', 'Server Admin', 'Super Admin'); |
|
| 124 | 124 | |
| 125 | 125 | $permissions = include 'config/permissions.php'; |
| 126 | 126 | $userPerms = json_encode($permissions['5']); |
| 127 | 127 | |
| 128 | - $link = mysqli_connect($server_SQL_host,$server_SQL_user,$server_SQL_pass,$server_SQL_name); |
|
| 128 | + $link = mysqli_connect($server_SQL_host, $server_SQL_user, $server_SQL_pass, $server_SQL_name); |
|
| 129 | 129 | if (mysqli_connect_errno()) { |
| 130 | 130 | printf("Connect failed: %s\n", mysqli_connect_error()); |
| 131 | 131 | exit(); |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | <?php if (!isset($_SESSION['profile_link'])) { |
| 27 | 27 | if (isset($_SESSION['user_email']) && $settings['gravatar']) { |
| 28 | 28 | echo '<a href="' . $settings['url'] . 'profile">'; |
| 29 | - echo '<img src="' . get_gravatar($_SESSION['user_email'],64,'retro') . '" class="img-circle" width="60" height="60"></a></p>'; |
|
| 29 | + echo '<img src="' . get_gravatar($_SESSION['user_email'], 64, 'retro') . '" class="img-circle" width="60" height="60"></a></p>'; |
|
| 30 | 30 | } else { |
| 31 | 31 | echo '<a href="' . $settings['url'] . 'profile">'; |
| 32 | 32 | echo '<img src="' . $settings['url'] . 'assets/img/profile/' . $_SESSION['user_profile'] . '.jpg"'; |
@@ -52,9 +52,9 @@ discard block |
||
| 52 | 52 | </li> |
| 53 | 53 | |
| 54 | 54 | <?php |
| 55 | - if(isset($_SESSION['server_type'])) |
|
| 55 | + if (isset($_SESSION['server_type'])) |
|
| 56 | 56 | { |
| 57 | - switch($_SESSION['server_type']) |
|
| 57 | + switch ($_SESSION['server_type']) |
|
| 58 | 58 | { |
| 59 | 59 | case 'life': |
| 60 | 60 | include("views/life/nav.php"); |
@@ -62,8 +62,8 @@ discard block |
||
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | foreach ($settings['plugins'] as &$plugin) { |
| 65 | - if (file_exists("plugins/". $plugin. "/nav.php")) { |
|
| 66 | - include("plugins/". $plugin."/nav.php"); |
|
| 65 | + if (file_exists("plugins/" . $plugin . "/nav.php")) { |
|
| 66 | + include("plugins/" . $plugin . "/nav.php"); |
|
| 67 | 67 | } |
| 68 | 68 | } |
| 69 | 69 | |