@@ -154,6 +154,9 @@ discard block |
||
| 154 | 154 | return !!gethostbynamel($server); |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | + /** |
|
| 158 | + * @param boolean $update_claimed_id |
|
| 159 | + */ |
|
| 157 | 160 | protected function request_curl($url, $method = 'GET', $params = array(), $update_claimed_id) |
| 158 | 161 | { |
| 159 | 162 | $params = http_build_query($params, '', '&'); |
@@ -262,6 +265,9 @@ discard block |
||
| 262 | 265 | return $headers; |
| 263 | 266 | } |
| 264 | 267 | |
| 268 | + /** |
|
| 269 | + * @param boolean $update_claimed_id |
|
| 270 | + */ |
|
| 265 | 271 | protected function request_streams($url, $method = 'GET', $params = array(), $update_claimed_id) |
| 266 | 272 | { |
| 267 | 273 | if (!$this->hostExists($url)) { |
@@ -384,6 +390,11 @@ discard block |
||
| 384 | 390 | /** |
| 385 | 391 | * Helper function used to scan for <meta>/<link> tags and extract information |
| 386 | 392 | * from them |
| 393 | + * @param string $tag |
|
| 394 | + * @param string $attrName |
|
| 395 | + * @param string $attrValue |
|
| 396 | + * @param string $valueName |
|
| 397 | + * @return string |
|
| 387 | 398 | */ |
| 388 | 399 | protected function htmlTag($content, $tag, $attrName, $attrValue, $valueName) |
| 389 | 400 | { |
@@ -628,6 +639,9 @@ discard block |
||
| 628 | 639 | return $params; |
| 629 | 640 | } |
| 630 | 641 | |
| 642 | + /** |
|
| 643 | + * @param boolean $immediate |
|
| 644 | + */ |
|
| 631 | 645 | protected function authUrl_v1($immediate) |
| 632 | 646 | { |
| 633 | 647 | $returnUrl = $this->returnUrl; |
@@ -649,6 +663,9 @@ discard block |
||
| 649 | 663 | , array('query' => http_build_query($params, '', '&'))); |
| 650 | 664 | } |
| 651 | 665 | |
| 666 | + /** |
|
| 667 | + * @param boolean $immediate |
|
| 668 | + */ |
|
| 652 | 669 | protected function authUrl_v2($immediate) |
| 653 | 670 | { |
| 654 | 671 | $params = array( |
@@ -684,7 +701,6 @@ discard block |
||
| 684 | 701 | /** |
| 685 | 702 | * Returns authentication url. Usually, you want to redirect your user to it. |
| 686 | 703 | * @return String The authentication url. |
| 687 | - * @param String $select_identifier Whether to request OP to select identity for an user in OpenID 2. Does not affect OpenID 1. |
|
| 688 | 704 | * @throws ErrorException |
| 689 | 705 | */ |
| 690 | 706 | function authUrl($immediate = false) |
@@ -1,4 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | +/** |
|
| 3 | + * @param string $string |
|
| 4 | + */ |
|
| 2 | 5 | function strToHex($string) |
| 3 | 6 | { |
| 4 | 7 | $hex = ''; |
@@ -46,6 +49,9 @@ discard block |
||
| 46 | 49 | return $sign . $h; |
| 47 | 50 | } |
| 48 | 51 | |
| 52 | +/** |
|
| 53 | + * @param string $cs |
|
| 54 | + */ |
|
| 49 | 55 | function get_checksum($cs) |
| 50 | 56 | { |
| 51 | 57 | $var = computeUnsignedCRC32($cs); |
@@ -61,6 +67,9 @@ discard block |
||
| 61 | 67 | return chr($d) . chr($c) . chr($b) . chr($a); |
| 62 | 68 | } |
| 63 | 69 | |
| 70 | +/** |
|
| 71 | + * @param string $answer |
|
| 72 | + */ |
|
| 64 | 73 | function fixAnswer($answer) |
| 65 | 74 | { |
| 66 | 75 | |
@@ -3,6 +3,9 @@ |
||
| 3 | 3 | |
| 4 | 4 | class user |
| 5 | 5 | { |
| 6 | + /** |
|
| 7 | + * @param string $steamid |
|
| 8 | + */ |
|
| 6 | 9 | public function GetPlayerSummaries($steamid) |
| 7 | 10 | { |
| 8 | 11 | $settings = require('config/settings.php'); |
@@ -374,7 +374,7 @@ |
||
| 374 | 374 | * Get either a Gravatar URL or complete image tag for a specified email address. |
| 375 | 375 | * |
| 376 | 376 | * @param string $email The email address |
| 377 | - * @param string $s Size in pixels, defaults to 80px [ 1 - 2048 ] |
|
| 377 | + * @param integer $s Size in pixels, defaults to 80px [ 1 - 2048 ] |
|
| 378 | 378 | * @param string $d Default imageset to use [ 404 | mm | identicon | monsterid | wavatar ] |
| 379 | 379 | * @param string $r Maximum rating (inclusive) [ g | pg | r | x ] |
| 380 | 380 | * @param boole $img True to return a complete IMG tag False for just the URL |
@@ -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 | } |
@@ -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; |
@@ -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"> |
@@ -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 | +} |
|
@@ -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> |
@@ -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> |
@@ -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> |
@@ -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"> |