";
while($donnee2 = $req2->fetch())
{
$soloRating = $donnee2['rating'];
$soloMatches = $donnee2['matches'];
$rank = $donnee2['rank'];
$req3 = $bdd->query("SELECT url FROM rl_img WHERE name = '$rank';");
$donnee3 = $req3->fetch();
$url = $donnee3['url'];
$division = $donnee2['division'];
$affichRanks .= "
Solo
$division
$soloRating rating
$soloMatches matches
";
}
$req2 = $bdd->query("SELECT rank, division, rating, matches FROM rl_doubles WHERE pseudo = '$pseudo';");
while($donnee2 = $req2->fetch())
{
$doubleRating = $donnee2['rating'];
$doubleMatches = $donnee2['matches'];
$rank = $donnee2['rank'];
$req3 = $bdd->query("SELECT url FROM rl_img WHERE name = '$rank';");
$donnee3 = $req3->fetch();
$url = $donnee3['url'];
$division = $donnee2['division'];
$affichRanks .= "
Doubles
$division
$doubleRating rating
$doubleMatches matches
";
}
$req2 = $bdd->query("SELECT rank, division, rating, matches FROM rl_solo_standard WHERE pseudo = '$pseudo';");
while($donnee2 = $req2->fetch())
{
$soloStandardRating = $donnee2['rating'];
$soloStandardMatches = $donnee2['matches'];
$rank = $donnee2['rank'];
$req3 = $bdd->query("SELECT url FROM rl_img WHERE name = '$rank';");
$donnee3 = $req3->fetch();
$url = $donnee3['url'];
$division = $donnee2['division'];
$affichRanks .= "
Solo Standard
$division
$soloStandardRating rating
$soloStandardMatches matches
";
}
$req2 = $bdd->query("SELECT rank, division, rating, matches FROM rl_standard WHERE pseudo = '$pseudo';");
while($donnee2 = $req2->fetch())
{
$standardRating = $donnee2['rating'];
$standardMatches = $donnee2['matches'];
$rank = $donnee2['rank'];
$req3 = $bdd->query("SELECT url FROM rl_img WHERE name = '$rank';");
$donnee3 = $req3->fetch();
$url = $donnee3['url'];
$division = $donnee2['division'];
$affichRanks .= "
Standard
$division
$standardRating rating
$standardMatches matches
";
}
$moyenne = ($soloRating + $doubleRating + $soloStandardRating + $standardRating) / 4;
$matches = $soloMatches + $doubleMatches + $soloStandardMatches + $standardMatches;
$pseudo = strtoupper($pseudo);
$key = "F1E51986EA8980C6145EA5DED117917A";
$imgfile = file_get_contents('http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=' . $key . '&steamids=' . $steamid . '&format=json');
$reponse = json_decode($imgfile, true);
$imgurl = $reponse['response']['players'][0]['avatar'];
$affichHeader = "";
$affichTotal = "
" . $affichHeader . $affichRanks . "";
$affichageDonnees .= $affichTotal;
}
$affichageDonnees .= "";
echo $affichageDonnees;
?>