This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | if ($settings['url'] == "/") { |
||
4 | require_once("config/carNames.php"); |
||
5 | require_once("config/images.php"); |
||
6 | require_once("config/license.php"); |
||
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"); |
||
11 | } |
||
12 | |||
13 | $db_link = serverConnect(); |
||
14 | |||
15 | function getPlayerSkin($input, $list) |
||
16 | { |
||
17 | if ($input !== '"[]"') { |
||
18 | $name = after('"[`', $input); |
||
19 | $name = before('`', $name); |
||
20 | |||
21 | if (in_array($name, $list)) { |
||
22 | return $name; |
||
23 | } else { |
||
24 | return "Default"; |
||
25 | } |
||
26 | } else { |
||
27 | return "Default"; |
||
28 | } |
||
29 | } |
||
30 | |||
31 | $sql = "SELECT *, $playerIdColumn as playerid FROM `players` WHERE $playerIdColumn = '" . $_SESSION['playerid'] . "'"; |
||
32 | $result = $db_link->query($sql); |
||
33 | if ($result->num_rows > 0) { |
||
34 | $player = $result->fetch_object(); |
||
35 | |||
36 | $temp = ""; |
||
37 | $pGID = $player->playerid; |
||
38 | for ($i = 0; $i < 8; $i++) { |
||
39 | $temp .= chr($pGID & 0xFF); |
||
40 | $pGID >>= 8; |
||
41 | } |
||
42 | $pGID = md5('BE' . $temp); |
||
43 | ?> |
||
44 | <div class="col-md-3" style="float:left; padding-top:20px;"> |
||
45 | <div class="panel panel-default"> |
||
46 | <div class="panel-heading"> |
||
47 | <h2 class="panel-title"><i class="fa fa-child fa-fw"></i><?php echo $player->name; ?></h2> |
||
48 | </div> |
||
49 | |||
50 | |||
51 | <div class="panel-body"> |
||
52 | <?php |
||
53 | $alias = str_replace('"[`', "", $player->aliases); |
||
54 | $alias = str_replace('`]"', "", $alias); |
||
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['playerID'] . ": " . $player->playerid . "</h4>"; |
||
59 | echo "<h4 style='word-wrap: break-word;'>" . $lang['GUID'] . ": " . $pGID . "</h4>"; |
||
60 | ?> |
||
61 | <i class="fa fa-2x fa-money"></i> |
||
62 | <h4> <?php echo $lang['cash'] . ": " . $player->cash; ?> </h4> |
||
63 | <i style="padding-left:15px;" class="fa fa-2x fa-bank"></i> |
||
64 | <h4> <?php echo $lang['bank'] . ": " . $player->bankacc; ?> </h4> |
||
65 | <?php |
||
66 | if ($player->arrested == 0) { |
||
67 | echo "<h4><button type='button' id='arrested' class='arrest btn btn-xs btn-success'>" . $lang["not"] . " " . $lang["arrested"] . "</button></h4>"; |
||
68 | } else { |
||
69 | echo "<h4><button type='button' id='arrested' class='arrest btn btn-xs btn-theme01'>" . $lang["arrested"] . "</button></h4>"; |
||
70 | } |
||
71 | |||
72 | if ($player->blacklist == 0) { |
||
73 | echo "<h4><button type='button' id='blacklist' class='arrest btn btn-xs btn-success'>" . $lang["not"] . " " . $lang["blacklisted"] . "</button></h4>"; |
||
74 | } else { |
||
75 | echo "<h4><button type='button' id='blacklist' class='arrest btn btn-xs btn-theme01'>" . $lang["blacklisted"] . "</button></h4>"; |
||
76 | } |
||
77 | |||
78 | echo "</center>"; |
||
79 | ?> |
||
80 | </div> |
||
81 | </div> |
||
82 | </div> |
||
83 | |||
84 | <!-- Right Container --> |
||
85 | |||
86 | <div class="col-md-9" style="float:right; padding-top:20px;"> |
||
87 | <div class="row mtbox"> |
||
88 | <div class="col-md-2 col-sm-2 col-md-offset-1 box0"> |
||
89 | <div class="box1"> |
||
90 | <span class="fa fa-3x fa-taxi"></span> |
||
91 | |||
92 | <h3> <?php echo $lang['police'] . ": " . $player->coplevel; ?> </h3> |
||
93 | </div> |
||
94 | </div> |
||
95 | <div class="col-md-2 col-sm-2 box0"> |
||
96 | <div class="box1"> |
||
97 | <span class="fa fa-3x fa-ambulance"></span> |
||
98 | |||
99 | <h3> <?php echo $lang['medic'] . ": " . $player->mediclevel; ?> </h3> |
||
100 | </div> |
||
101 | </div> |
||
102 | <div class="col-md-2 col-sm-2 box0"> |
||
103 | <div class="box1"> |
||
104 | <span class="fa fa-3x fa-usd"></span> |
||
105 | |||
106 | <h3> <?php echo $lang['donator'] . ": " . $player->$settings['donorFormat']; ?> </h3> |
||
107 | </div> |
||
108 | </div> |
||
109 | <div class="col-md-2 col-sm-2 box0"> |
||
110 | <div class="box1"> |
||
111 | <span class="fa fa-3x fa-group"></span> |
||
112 | |||
113 | <h3> <?php echo $lang['admin'] . ": " . $player->adminlevel; ?> </h3> |
||
114 | </div> |
||
115 | </div> |
||
116 | <?php |
||
117 | if ($player->playerid == $_SESSION['playerid']) { |
||
118 | echo '<div class="col-md-2 col-sm-2 box0">'; |
||
119 | echo '<a href="http://steamcommunity.com/profiles/' . $player->playerid . '"'; |
||
120 | echo 'target="_blank">'; |
||
121 | echo '<div class="box1">'; |
||
122 | echo '<span class="fa fa-3x fa-steam"></span>'; |
||
123 | echo '<h3>Steam</h3>'; |
||
124 | echo '</div>'; |
||
125 | echo '</div></a>'; |
||
126 | } ?> |
||
127 | </div> |
||
128 | |||
129 | <div class="panel panel-default" style="float:left; width:100%; margin:0 auto;"> |
||
130 | <ul id="myTab" class="nav nav-tabs"> |
||
131 | <li class="dropdown active"> |
||
132 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo $lang['licenses']; ?> <b class="caret"></b></a> |
||
133 | <ul class="dropdown-menu"> |
||
134 | <li><a href="#civ_lic" data-toggle="tab"><?php echo $lang['civ']; ?></a></li> |
||
135 | <li><a href="#medic_lic" data-toggle="tab"><?php echo $lang['medic']; ?></a></li> |
||
136 | <li><a href="#police_lic" data-toggle="tab"><?php echo $lang['police']; ?></a></li> |
||
137 | </ul> |
||
138 | </li> |
||
139 | <li class="dropdown"> |
||
140 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo $lang['inventory']; ?> <b class="caret"></b></a> |
||
141 | <ul class="dropdown-menu"> |
||
142 | <li><a href="#civ_inv" data-toggle="tab"><?php echo $lang['civ']; ?></a></li> |
||
143 | <li><a href="#medic_inv" data-toggle="tab"><?php echo $lang['medic']; ?></a></li> |
||
144 | <li><a href="#police_inv" data-toggle="tab"><?php echo $lang['police']; ?></a></li> |
||
145 | </ul> |
||
146 | </li> |
||
147 | <li><a href="#house" data-toggle="tab"><?php echo $lang['houses']; ?></a></li> |
||
148 | <li><a href="#veh" data-toggle="tab"><?php echo $lang['vehicles']; ?></a></li> |
||
149 | </ul> |
||
150 | <div class="panel-body"> |
||
151 | <div id="myTabContent" class="tab-content"> |
||
152 | <?php if ($player->playerid == $_SESSION['playerid']) { ?> |
||
153 | <div class="tab-pane fade in active well" id="civ_lic"> |
||
154 | <h4 style="centred"><?php echo $lang['civ'] . " " . $lang['licenses']; ?> </h4> |
||
155 | <?php |
||
156 | if ($player->civ_licenses !== '"[]"') { |
||
157 | $return = stripArray($player->civ_licenses, 0); |
||
158 | foreach ($return as $value) { |
||
159 | if (strpos($value, "1") == TRUE) { |
||
160 | $name = before(',', $value); |
||
161 | echo "<button class='license btn btn-xs btn-success' style='margin-bottom: 3px;'>" . licName($name, $license) . "</button> "; |
||
162 | } else { |
||
163 | $name = before(',', $value); |
||
164 | echo "<button class='license btn btn-xs btn-theme01' style='margin-bottom: 3px;'>" . licName($name, $license) . "</button> "; |
||
165 | } |
||
166 | } |
||
167 | } else { |
||
168 | echo $lang['no'] . " " . $lang['licenses']; |
||
169 | }?> |
||
170 | </div> |
||
171 | <div class="tab-pane well fade" id="medic_lic"> |
||
172 | <h4 style="centred"><?php echo $lang['medic'] . " " . $lang['licenses']; ?> </h4> |
||
173 | <?php |
||
174 | if ($player->med_licenses !== '"[]"') { |
||
175 | $return = stripArray($player->med_licenses, 0); |
||
176 | |||
177 | foreach ($return as $value) { |
||
178 | if (strpos($value, "1") == TRUE) { |
||
179 | $name = before(',', $value); |
||
180 | echo "<button class='license btn btn-xs btn-success' style='margin-bottom: 3px;'>" . licName($name, $license) . "</button> "; |
||
181 | } else { |
||
182 | $name = before(',', $value); |
||
183 | echo "<button class='license btn btn-xs btn-theme01' style='margin-bottom: 3px;'>" . licName($name, $license) . "</button> "; |
||
184 | } |
||
185 | } |
||
186 | } else { |
||
187 | echo $lang['no'] . " " . $lang['licenses']; |
||
188 | } ?> |
||
189 | </div> |
||
190 | <div class="tab-pane well fade" id="police_lic"> |
||
191 | <h4 style="centred"><?php echo $lang['cop'] . " " . $lang['licenses']; ?> </h4> |
||
192 | <?php |
||
193 | if ($player->cop_licenses !== '"[]"') { |
||
194 | $return = stripArray($player->cop_licenses, 0); |
||
195 | |||
196 | foreach ($return as $value) { |
||
197 | if (strpos($value, "1") == TRUE) { |
||
198 | $name = before(',', $value); |
||
199 | echo "<button class='license btn btn-xs btn-success' style='margin-bottom: 3px;'>" . licName($name, $license) . "</button> "; |
||
200 | } else { |
||
201 | $name = before(',', $value); |
||
202 | echo "<button class='license btn btn-xs btn-theme01' style='margin-bottom: 3px;'>" . licName($name, $license) . "</button> "; |
||
203 | } |
||
204 | } |
||
205 | } else { |
||
206 | echo $lang['no'] . " " . $lang['licenses']; |
||
207 | } |
||
208 | ?> |
||
209 | </div> |
||
210 | <?php } if ($player->playerid == $_SESSION['playerid']) { ?> |
||
211 | <div class="tab-pane fade well" id="civ_inv"> |
||
212 | <h4 style="centred"><?php echo $lang['civ'] . " " . $lang['gear']; ?> </h4> |
||
213 | <?php |
||
214 | echo "<textarea class='form-control' readonly rows='5' style='width: 100%' id='civ_gear' name='civ_gear'>" . $player->civ_gear . "</textarea>"; |
||
215 | echo '<br>'; |
||
216 | |||
217 | if ($_SESSION['permissions']['edit']['inventory']) { |
||
218 | echo '<a data-toggle="modal" href="#edit_civ_inv" class="btn btn-primary btn-xs" style="float: right;">'; |
||
219 | echo '<i class="fa fa-pencil"></i></a>'; |
||
220 | } ?> |
||
221 | |||
222 | <br> |
||
223 | </div> |
||
224 | <div class="tab-pane fade well" id="police_inv"> |
||
225 | <h4 style="centred"><?php echo $lang['police'] . " " . $lang['gear']; ?> </h4> |
||
226 | <?php |
||
227 | echo "<textarea class='form-control' readonly rows='5' style='width: 100%' id='civ_gear' name='cop_gear'>" . $player->cop_gear . "</textarea>"; |
||
228 | echo '<br>'; |
||
229 | if ($_SESSION['permissions']['edit']['inventory']) { |
||
230 | echo '<a data-toggle="modal" href="#edit_cop_inv" class="btn btn-primary btn-xs" style="float: right;">'; |
||
231 | echo '<i class="fa fa-pencil"></i></a>'; |
||
232 | } ?> |
||
233 | |||
234 | <br> |
||
235 | </div> |
||
236 | <div class="tab-pane fade well" id="medic_inv"> |
||
237 | <h4 style="centred"><?php echo $lang['medic'] . " " . $lang['gear']; ?> </h4> |
||
238 | <?php |
||
239 | echo "<textarea class='form-control' readonly rows='5' style='width: 100%' id='civ_gear' name='med_gear'>" . $player->med_gear . "</textarea>"; |
||
240 | echo '<br>'; |
||
241 | if ($_SESSION['permissions']['edit']['inventory']) { |
||
242 | echo '<a data-toggle="modal" href="#edit_med_inv" class="btn btn-primary btn-xs" style="float: right;">'; |
||
243 | echo '<i class="fa fa-pencil"></i></a>'; |
||
244 | } ?> |
||
245 | <br> |
||
246 | </div> |
||
247 | <?php } if ($player->playerid == $_SESSION['playerid']) { ?> |
||
248 | <div class="tab-pane fade" id="house"> |
||
249 | <div class="table-responsive"> |
||
250 | <?php |
||
251 | $sql = "SELECT `pos`,`id` FROM `houses` WHERE `pid` = '" . $player->playerid . "' ORDER BY `id` DESC LIMIT 8"; |
||
252 | $result_of_query = $db_link->query($sql); |
||
253 | if ($result_of_query->num_rows > 0) { |
||
254 | ?> |
||
255 | <table class="table table-bordered table-hover table-striped"> |
||
256 | <thead> |
||
257 | <tr> |
||
258 | <th><?php echo $lang['position']; ?></th> |
||
259 | <th><?php echo $lang['edit']; ?></th> |
||
260 | </tr> |
||
261 | </thead> |
||
262 | <tbody> |
||
263 | <?php |
||
264 | while ($row = mysqli_fetch_assoc($result_of_query)) { |
||
265 | echo "<tr>"; |
||
266 | echo "<td>" . $row["pos"] . "</td>"; |
||
267 | echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editHouse/" . $row["id"] . "'>"; |
||
268 | echo "<i class='fa fa-pencil'></i></a></td>"; |
||
269 | echo "</tr>"; |
||
270 | }; |
||
271 | ?> |
||
272 | </tbody> |
||
273 | </table> |
||
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'] ?> |
||
276 | </div> |
||
277 | </div> |
||
278 | <?php } if ($player->playerid == $_SESSION['playerid']) { ?> |
||
279 | <div class="tab-pane fade" id="veh"> |
||
280 | <div class="table-responsive"> |
||
281 | <?php |
||
282 | $sql = "SELECT `classname`,`type`,`id`,`plate` FROM `vehicles` WHERE `pid` = '" . $player->playerid . "' ORDER BY `id` DESC LIMIT 8"; |
||
283 | } |
||
284 | $result_of_query = $db_link->query($sql); |
||
285 | if ($result_of_query->num_rows > 0) { |
||
286 | $veh = $result_of_query->fetch_object(); |
||
287 | echo '<table class="table table-bordered table-hover table-striped">'; |
||
288 | echo '<thead><tr>'; |
||
289 | echo '<th>' . $lang['class'] . '</th>'; |
||
290 | echo '<th>' . $lang['type'] . '</th>'; |
||
291 | echo '<th>' . $lang['plate'] . '</th>'; |
||
292 | if ($_SESSION['permissions']['edit']['vehicles']) { |
||
293 | echo "<th>" . $lang['edit'] . "</th>"; |
||
294 | } |
||
295 | echo '</tr></thead><tbody'; |
||
296 | echo '<tr>'; |
||
297 | echo '<td>' . carName($veh->classname) . '</td>'; |
||
298 | echo '<td>' . carType($veh->type, $lang) . '</td>'; |
||
299 | echo '<td>' . $veh->plate . '</td>'; |
||
300 | |||
301 | if ($_SESSION['permissions']['edit']['vehicles']) { |
||
302 | echo "<td><a class='btn btn-primary btn-xs' href='" . $settings['url'] . "editVeh.php?ID=" . $veh->id . "'>"; |
||
303 | echo "<i class='fa fa-pencil'></i></a></td>"; |
||
304 | } |
||
305 | |||
306 | echo '</tr>'; |
||
307 | echo '</tbody></table>'; |
||
308 | echo '<a class="fa fa-caret-right fa-2x" style="float: right; padding-right:15px;" href="' . $settings['url'] . 'vehicles/' . $player->playerid . '"> More</a>'; |
||
309 | |||
310 | } else { |
||
311 | echo $lang['noVeh']; |
||
312 | } |
||
313 | ?> |
||
314 | </div> |
||
315 | </div> |
||
316 | <?php } ?> |
||
317 | </div> |
||
318 | </div> |
||
319 | </div> |
||
320 | </div> |
||
321 | |||
322 | <?php } else { |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
323 | if ($settings['url'] == "/") { |
||
324 | include("views/steam/errors/noData.php"); |
||
325 | } else { |
||
326 | include(realpath($settings['url']) . "views/steam/errors/noData.php"); |
||
327 | } |
||
328 | } ?> |