diff --git a/index.php b/index.php index 41d9e75..4ad7477 100644 --- a/index.php +++ b/index.php @@ -75,21 +75,36 @@ $temp_bans = json_decode($bans, true); /*ID PICTURE SORT ALPHA*/ /*BAN Sorter*/ -$pattern =explode( ",", $fullids); - +$pattern = explode( ",", $fullids); while ($counter2 < $counter) { $avaid = $temp_summarie["response"]["players"][$avatarid]["avatarmedium"]; $userid = $temp_summarie["response"]["players"][$avatarid]["steamid"]; +$userid_bans = $temp_bans["players"][$avatarid]["SteamId"]; + +$visi = $temp_summarie["response"]["players"][$avatarid]["communityvisibilitystate"]; $personname = $temp_summarie["response"]["players"][$avatarid]["personaname"]; -$gameban_output = $temp_bans["players"][$avatarid]["NumberOfGameBans"]; -$vacban_output = $temp_bans["players"][$avatarid]["NumberOfVACBans"]; + $sort["$userid"] = $avaid; $sort_name["$userid"] = $personname; -$sort_bans["$userid"]["gameban"] = $gameban_output; -$sort_bans["$userid"]["vacban"] = $vacban_output; + + + +if($visi > 1){ + + $gameban_output = $temp_bans["players"][$avatarid]["NumberOfGameBans"]; + $vacban_output = $temp_bans["players"][$avatarid]["NumberOfVACBans"]; +} +else{ + $gameban_output = 0; + $vacban_output = 0; +} + +$sort_bans["$userid_bans"]["gameban"] = $gameban_output; +$sort_bans["$userid_bans"]["vacban"] = $vacban_output; + $avatarid++; @@ -112,11 +127,7 @@ while($row = $result->fetch_assoc()){ $gamebancheck = $sort_bans["$ida"]["gameban"]; $vacbancheck = $sort_bans["$ida"]["vacban"]; - /*ban saver*/ - if($gamebancheck || $vacbancheck > 0){ - $row['banned'] = 1; - } $output = "