Completed
Pull Request — master (#49)
by
unknown
03:06
created
views/steam/life/player.php 1 patch
Spacing   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@  discard block
 block discarded – undo
5 5
     require_once("config/images.php");
6 6
     require_once("config/license.php");
7 7
 } else {
8
-    require_once(realpath($settings['url']) . "config/carNames.php");
9
-    require_once(realpath($settings['url']) . "config/images.php");
10
-    require_once(realpath($settings['url']) . "config/license.php");
8
+    require_once(realpath($settings['url'])."config/carNames.php");
9
+    require_once(realpath($settings['url'])."config/images.php");
10
+    require_once(realpath($settings['url'])."config/license.php");
11 11
 }
12 12
 
13 13
 $db_link = serverConnect();
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     }
29 29
 }
30 30
 
31
-$sql = "SELECT * FROM `players` WHERE `playerid` = '" . $_SESSION['playerid'] . "'";
31
+$sql = "SELECT * FROM `players` WHERE `playerid` = '".$_SESSION['playerid']."'";
32 32
 $result = $db_link->query($sql);
33 33
 if ($result->num_rows > 0) {
34 34
     $player = $result->fetch_object();
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         $temp .= chr($pGID & 0xFF);
40 40
         $pGID >>= 8;
41 41
     }
42
-    $pGID = md5('BE' . $temp);
42
+    $pGID = md5('BE'.$temp);
43 43
 ?>
44 44
 <div class="col-md-3" style="float:left;  padding-top:20px;">
45 45
     <div class="panel panel-default">
@@ -53,27 +53,27 @@  discard block
 block discarded – undo
53 53
                 $alias = str_replace('"[`', "", $player->aliases);
54 54
                 $alias = str_replace('`]"', "", $alias);
55 55
 
56
-                echo '<center><img alt="' . $alias . '" src="' . $settings['url'] . 'assets/img/uniform/' . getPlayerSkin($player->civ_gear, $playerSkins) . '.jpg">';
57
-                echo "<h4>" . $lang['aliases'] . ": " . $alias . "</h4>";
58
-                echo "<h4>" . $lang['uid'] . ": " . $player->uid . "</h4>";
59
-                echo "<h4>" . $lang['playerID'] . ": " . $player->playerid . "</h4>";
60
-                echo "<h4 style='word-wrap: break-word;'>" . $lang['GUID'] . ": " . $pGID . "</h4>";
56
+                echo '<center><img alt="'.$alias.'" src="'.$settings['url'].'assets/img/uniform/'.getPlayerSkin($player->civ_gear, $playerSkins).'.jpg">';
57
+                echo "<h4>".$lang['aliases'].": ".$alias."</h4>";
58
+                echo "<h4>".$lang['uid'].": ".$player->uid."</h4>";
59
+                echo "<h4>".$lang['playerID'].": ".$player->playerid."</h4>";
60
+                echo "<h4 style='word-wrap: break-word;'>".$lang['GUID'].": ".$pGID."</h4>";
61 61
             ?>
62 62
             <i class="fa fa-2x fa-money"></i>
63
-            <h4> <?php echo $lang['cash'] . ": " . $player->cash; ?> </h4>
63
+            <h4> <?php echo $lang['cash'].": ".$player->cash; ?> </h4>
64 64
             <i style="padding-left:15px;" class="fa fa-2x fa-bank"></i>
65
-            <h4> <?php echo $lang['bank'] . ": " . $player->bankacc; ?> </h4>
65
+            <h4> <?php echo $lang['bank'].": ".$player->bankacc; ?> </h4>
66 66
             <?php
67 67
                 if ($player->arrested == 0) {
68
-                    echo "<h4><button type='button' id='arrested' class='arrest btn btn-xs btn-success'>" . $lang["not"] . " " . $lang["arrested"] . "</button></h4>";
68
+                    echo "<h4><button type='button' id='arrested' class='arrest btn btn-xs btn-success'>".$lang["not"]." ".$lang["arrested"]."</button></h4>";
69 69
                 } else {
70
-                    echo "<h4><button type='button' id='arrested' class='arrest btn btn-xs btn-theme01'>" . $lang["arrested"] . "</button></h4>";
70
+                    echo "<h4><button type='button' id='arrested' class='arrest btn btn-xs btn-theme01'>".$lang["arrested"]."</button></h4>";
71 71
                 }
72 72
 
73 73
                 if ($player->blacklist == 0) {
74
-                    echo "<h4><button type='button' id='blacklist' class='arrest btn btn-xs btn-success'>" . $lang["not"] . " " . $lang["blacklisted"] . "</button></h4>";
74
+                    echo "<h4><button type='button' id='blacklist' class='arrest btn btn-xs btn-success'>".$lang["not"]." ".$lang["blacklisted"]."</button></h4>";
75 75
                 } else {
76
-                    echo "<h4><button type='button' id='blacklist' class='arrest btn btn-xs btn-theme01'>" . $lang["blacklisted"] . "</button></h4>";
76
+                    echo "<h4><button type='button' id='blacklist' class='arrest btn btn-xs btn-theme01'>".$lang["blacklisted"]."</button></h4>";
77 77
                 }
78 78
 
79 79
                 echo "</center>";
@@ -90,34 +90,34 @@  discard block
 block discarded – undo
90 90
             <div class="box1">
91 91
                 <span class="fa fa-3x fa-taxi"></span>
92 92
 
93
-                <h3> <?php echo $lang['police'] . ": " . $player->coplevel; ?> </h3>
93
+                <h3> <?php echo $lang['police'].": ".$player->coplevel; ?> </h3>
94 94
             </div>
95 95
         </div>
96 96
         <div class="col-md-2 col-sm-2 box0">
97 97
             <div class="box1">
98 98
                 <span class="fa fa-3x fa-ambulance"></span>
99 99
 
100
-                <h3> <?php echo $lang['medic'] . ": " . $player->mediclevel; ?> </h3>
100
+                <h3> <?php echo $lang['medic'].": ".$player->mediclevel; ?> </h3>
101 101
             </div>
102 102
         </div>
103 103
         <div class="col-md-2 col-sm-2 box0">
104 104
             <div class="box1">
105 105
                 <span class="fa fa-3x fa-usd"></span>
106 106
 
107
-                <h3> <?php echo $lang['donator'] . ": " . $player->donatorlvl; ?> </h3>
107
+                <h3> <?php echo $lang['donator'].": ".$player->donatorlvl; ?> </h3>
108 108
             </div>
109 109
         </div>
110 110
         <div class="col-md-2 col-sm-2 box0">
111 111
             <div class="box1">
112 112
                 <span class="fa fa-3x fa-group"></span>
113 113
 
114
-                <h3> <?php echo $lang['admin'] . ": " . $player->adminlevel; ?> </h3>
114
+                <h3> <?php echo $lang['admin'].": ".$player->adminlevel; ?> </h3>
115 115
             </div>
116 116
         </div>
117 117
         <?php
118 118
         if ($_SESSION['permissions']['view']['steam'] || $uID == $_SESSION['playerid']) {
119 119
             echo '<div class="col-md-2 col-sm-2 box0">';
120
-            echo '<a href="http://steamcommunity.com/profiles/' . $row["playerid"] . '"';
120
+            echo '<a href="http://steamcommunity.com/profiles/'.$row["playerid"].'"';
121 121
             echo 'target="_blank">';
122 122
             echo '<div class="box1">';
123 123
             echo '<span class="fa fa-3x fa-steam"></span>';
@@ -152,59 +152,59 @@  discard block
 block discarded – undo
152 152
             <div id="myTabContent" class="tab-content">
153 153
                 <?php if ($player->playerid == $_SESSION['playerid']) { ?>
154 154
                     <div class="tab-pane fade in active well" id="civ_lic">
155
-                        <h4 style="centred"><?php echo $lang['civ'] . " " . $lang['licenses']; ?> </h4>
155
+                        <h4 style="centred"><?php echo $lang['civ']." ".$lang['licenses']; ?> </h4>
156 156
                         <?php
157 157
                             if ($player->civ_licenses !== '"[]"') {
158 158
                                 $return = stripArray($player->civ_licenses, 0);
159 159
                                 foreach ($return as $value) {
160 160
                                     if (strpos($value, "1") == TRUE) {
161 161
                                         $name = before(',', $value);
162
-                                        echo "<button class='license btn btn-xs btn-success' style='margin-bottom: 3px;'>" . licName($name, $license) . "</button> ";
162
+                                        echo "<button class='license btn btn-xs btn-success' style='margin-bottom: 3px;'>".licName($name, $license)."</button> ";
163 163
                                     } else {
164 164
                                         $name = before(',', $value);
165
-                                        echo "<button class='license btn btn-xs btn-theme01' style='margin-bottom: 3px;'>" . licName($name, $license) . "</button> ";
165
+                                        echo "<button class='license btn btn-xs btn-theme01' style='margin-bottom: 3px;'>".licName($name, $license)."</button> ";
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
-                        <h4 style="centred"><?php echo $lang['medic'] . " " . $lang['licenses']; ?> </h4>
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) {
180 180
                                         $name = before(',', $value);
181
-                                        echo "<button class='license btn btn-xs btn-success' style='margin-bottom: 3px;'>" . licName($name, $license) . "</button> ";
181
+                                        echo "<button class='license btn btn-xs btn-success' style='margin-bottom: 3px;'>".licName($name, $license)."</button> ";
182 182
                                     } else {
183 183
                                         $name = before(',', $value);
184
-                                        echo "<button class='license btn btn-xs btn-theme01' style='margin-bottom: 3px;'>" . licName($name, $license) . "</button> ";
184
+                                        echo "<button class='license btn btn-xs btn-theme01' style='margin-bottom: 3px;'>".licName($name, $license)."</button> ";
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
-                        <h4 style="centred"><?php echo $lang['cop'] . " " . $lang['licenses']; ?> </h4>
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) {
199 199
                                         $name = before(',', $value);
200
-                                        echo "<button class='license btn btn-xs btn-success' style='margin-bottom: 3px;'>" . licName($name, $license) . "</button> ";
200
+                                        echo "<button class='license btn btn-xs btn-success' style='margin-bottom: 3px;'>".licName($name, $license)."</button> ";
201 201
                                     } else {
202 202
                                         $name = before(',', $value);
203
-                                        echo "<button class='license btn btn-xs btn-theme01' style='margin-bottom: 3px;'>" . licName($name, $license) . "</button> ";
203
+                                        echo "<button class='license btn btn-xs btn-theme01' style='margin-bottom: 3px;'>".licName($name, $license)."</button> ";
204 204
                                     }
205 205
                                 }
206 206
                             } else {
207
-                                    echo errorMessage(37,$lang);
207
+                                    echo errorMessage(37, $lang);
208 208
                             }
209 209
                         ?>
210 210
                     </div>
@@ -212,9 +212,9 @@  discard block
 block discarded – undo
212 212
 
213 213
                 <?php if ($player->playerid == $_SESSION['playerid']) { ?>
214 214
                     <div class="tab-pane fade well" id="civ_inv">
215
-                        <h4 style="centred"><?php echo $lang['civ'] . " " . $lang['gear']; ?> </h4>
215
+                        <h4 style="centred"><?php echo $lang['civ']." ".$lang['gear']; ?> </h4>
216 216
                         <?php
217
-                        echo "<textarea class='form-control' readonly rows='5' style='width: 100%' id='civ_gear' name='civ_gear'>" . $player->civ_gear . "</textarea>";
217
+                        echo "<textarea class='form-control' readonly rows='5' style='width: 100%' id='civ_gear' name='civ_gear'>".$player->civ_gear."</textarea>";
218 218
                         echo '<br>';
219 219
 
220 220
                         if ($_SESSION['permissions']['edit']['inventory']) {
@@ -225,9 +225,9 @@  discard block
 block discarded – undo
225 225
                         <br>
226 226
                     </div>
227 227
                     <div class="tab-pane fade well" id="police_inv">
228
-                        <h4 style="centred"><?php echo $lang['police'] . " " . $lang['gear']; ?> </h4>
228
+                        <h4 style="centred"><?php echo $lang['police']." ".$lang['gear']; ?> </h4>
229 229
                         <?php
230
-                        echo "<textarea class='form-control' readonly rows='5' style='width: 100%' id='civ_gear' name='cop_gear'>" . $player->cop_gear . "</textarea>";
230
+                        echo "<textarea class='form-control' readonly rows='5' style='width: 100%' id='civ_gear' name='cop_gear'>".$player->cop_gear."</textarea>";
231 231
                         echo '<br>';
232 232
                         if ($_SESSION['permissions']['edit']['inventory']) {
233 233
                             echo '<a data-toggle="modal" href="#edit_cop_inv" class="btn btn-primary btn-xs" style="float: right;">';
@@ -237,9 +237,9 @@  discard block
 block discarded – undo
237 237
                         <br>
238 238
                     </div>
239 239
                     <div class="tab-pane fade well" id="medic_inv">
240
-                        <h4 style="centred"><?php echo $lang['medic'] . " " . $lang['gear']; ?> </h4>
240
+                        <h4 style="centred"><?php echo $lang['medic']." ".$lang['gear']; ?> </h4>
241 241
                         <?php
242
-                        echo "<textarea class='form-control' readonly rows='5' style='width: 100%' id='civ_gear' name='med_gear'>" . $player->med_gear . "</textarea>";
242
+                        echo "<textarea class='form-control' readonly rows='5' style='width: 100%' id='civ_gear' name='med_gear'>".$player->med_gear."</textarea>";
243 243
                         echo '<br>';
244 244
                         if ($_SESSION['permissions']['edit']['inventory']) {
245 245
                             echo '<a data-toggle="modal" href="#edit_med_inv" class="btn btn-primary btn-xs" style="float: right;">';
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
                     <div class="tab-pane fade" id="house">
254 254
                         <div class="table-responsive">
255 255
                             <?php
256
-                            $sql = "SELECT `pos`,`id` FROM `houses` WHERE `pid` = '" . $player->playerid . "' ORDER BY `id` DESC LIMIT 8";
256
+                            $sql = "SELECT `pos`,`id` FROM `houses` WHERE `pid` = '".$player->playerid."' ORDER BY `id` DESC LIMIT 8";
257 257
                             $result_of_query = $db_link->query($sql);
258 258
                             if ($result_of_query->num_rows > 0) {
259 259
                                 ?>
@@ -268,15 +268,15 @@  discard block
 block discarded – undo
268 268
                                     <?php
269 269
                                     while ($row = mysqli_fetch_assoc($result_of_query)) {
270 270
                                         echo "<tr>";
271
-                                        echo "<td>" . $row["pos"] . "</td>";
272
-                                        echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editHouse/" . $row["id"] . "'>";
271
+                                        echo "<td>".$row["pos"]."</td>";
272
+                                        echo "<td><a class='btn btn-primary btn-xs' href='".$settings['url']."editHouse/".$row["id"]."'>";
273 273
                                         echo "<i class='fa fa-pencil'></i></a></td>";
274 274
                                         echo "</tr>";
275 275
                                     };
276 276
                                     ?>
277 277
                                     </tbody>
278 278
                                 </table>
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>';
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 280
                             } else  echo errorMessage(31, $lang);
281 281
                         < / div >
282 282
                     < / div >
@@ -286,32 +286,32 @@  discard block
 block discarded – undo
286 286
                     <div class="tab-pane fade" id="veh">
287 287
                         <div class="table-responsive">
288 288
                         <?php
289
-                            $sql = "SELECT `classname`,`type`,`id`,`plate` FROM `vehicles` WHERE `pid` = '" . $player->playerid . "' ORDER BY `id` DESC LIMIT 8";
289
+                            $sql = "SELECT `classname`,`type`,`id`,`plate` FROM `vehicles` WHERE `pid` = '".$player->playerid."' ORDER BY `id` DESC LIMIT 8";
290 290
                             $result_of_query = $db_link->query($sql);
291 291
                             if ($result_of_query->num_rows > 0) {
292 292
                                 $veh = $result_of_query->fetch_object();
293 293
                                 echo '<table class="table table-bordered table-hover table-striped">';
294 294
                                 echo '<thead><tr>';
295
-                                echo '<th>' . $lang['class'] . '</th>';
296
-                                echo '<th>' . $lang['type'] . '</th>';
297
-                                echo '<th>' . $lang['plate'] . '</th>';
295
+                                echo '<th>'.$lang['class'].'</th>';
296
+                                echo '<th>'.$lang['type'].'</th>';
297
+                                echo '<th>'.$lang['plate'].'</th>';
298 298
                                 if ($_SESSION['permissions']['edit']['vehicles']) {
299
-                                    echo "<th>" . $lang['edit'] . "</th>";
299
+                                    echo "<th>".$lang['edit']."</th>";
300 300
                                 }
301 301
                                 echo '</tr></thead><tbody';
302 302
                                 echo '<tr>';
303
-                                echo '<td>' . carName($veh->classname) . '</td>';
304
-                                echo '<td>' . carType($veh->type, $lang) . '</td>';
305
-                                echo '<td>' . $veh->plate . '</td>';
303
+                                echo '<td>'.carName($veh->classname).'</td>';
304
+                                echo '<td>'.carType($veh->type, $lang).'</td>';
305
+                                echo '<td>'.$veh->plate.'</td>';
306 306
 
307 307
                                 if ($_SESSION['permissions']['edit']['vehicles']) {
308
-                                    echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editVeh.php?ID=" . $veh->id . "'>";
308
+                                    echo "<td><a class='btn btn-primary btn-xs' href='".$settings['url']."editVeh.php?ID=".$veh->id."'>";
309 309
                                     echo "<i class='fa fa-pencil'></i></a></td>";
310 310
                                 }
311 311
 
312 312
                                 echo '</tr>';
313 313
                                 echo '</tbody></table>';
314
-                                echo '<a class="fa fa-caret-right fa-2x" style="float: right; padding-right:15px;" href="' . $settings['url'] . 'vehicles/' . $player->playerid . '"> More</a>';
314
+                                echo '<a class="fa fa-caret-right fa-2x" style="float: right; padding-right:15px;" href="'.$settings['url'].'vehicles/'.$player->playerid.'"> More</a>';
315 315
 
316 316
                             } else  echo errorMessage(31, $lang);
317 317
                         ?>
Please login to merge, or discard this patch.