@@ -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>'; |
@@ -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"> |
@@ -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 | |
@@ -15,9 +15,9 @@ |
||
| 15 | 15 | <select style="margin-right:15px;" onchange="if (this.value) window.location.href='?items='+this.value" id='items' class="form-control" name='items'> |
| 16 | 16 | <?php |
| 17 | 17 | foreach ($settings['item'] as $item) { |
| 18 | - echo '<option value="'.$item.'"'; |
|
| 18 | + echo '<option value="' . $item . '"'; |
|
| 19 | 19 | if ($item == $_SESSION['items']) echo ' selected'; |
| 20 | - echo '>'.$item.'</option>'; |
|
| 20 | + echo '>' . $item . '</option>'; |
|
| 21 | 21 | } |
| 22 | 22 | ?> |
| 23 | 23 | </select> |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | $db_link = serverConnect(); |
| 3 | 3 | |
| 4 | 4 | if ($db_link->connect_error) { |
| 5 | - echo '<h1>'.$lang['dbError'].'</h1>'; |
|
| 5 | + echo '<h1>' . $lang['dbError'] . '</h1>'; |
|
| 6 | 6 | unset($_SESSION['server_type']); |
| 7 | 7 | unset($_SESSION['dbid']); |
| 8 | 8 | } else { |