Пример #1
0
 if (sizeof($listeGains) > 0) {
     echo "<table class='jeu'>";
     $sommetotale = 0;
     for ($i = 0; $i < sizeof($listeGains); $i++) {
         $gain = $listeGains[$i];
         // Lecture des propriétés du joueur
         $joueur_id = stripslashes($gain["joueur_id"]);
         $somme = stripslashes($gain["total"]);
         if ($i % 2 == 1) {
             echo "<tr class='enreg impaire'>";
         } else {
             echo "<tr class='enreg'>";
         }
         $j = $i + 1;
         echo "<td width=\"150\"><b>" . getPosition($i) . "</b></td>\n";
         echo "<td width=\"150\">" . getNomJoueurTab($listeJoueurs, $joueur_id) . "</td>\n";
         echo "<td width=\"200\">" . round($somme, 1) . " Euros</td>\n";
         $sommetotale += $somme;
         echo "</tr>\n";
     }
     echo "</table>";
     echo "<h4>Soit un total de " . $sommetotale . " Euros</h4>";
 } else {
     echo "<h4>Pas le moindre Gain !</h4>";
 }
 // Tableau pour le graphique
 $G_ListeJeux = array();
 $G_ListeJoueurs = array();
 $G_ListeResultats = array();
 $TotalMoyenneGenerale = array();
 $TotalMatchJoue = array();
Пример #2
0
header('Content-Type: text/javascript; charset: UTF-8');
include "inclusions.php";
$db_link = ouvre_base();
if ($db_link) {
    $saison_id = getIDSaisonCourante();
    // On recherche tous les jeux de la saison demandée et la liste des joueurs
    $listeJoueurs = getListeJoueurs();
    $listeGains = getListeMeilleursGains($saison_id);
    echo "[";
    if (sizeof($listeGains) > 0) {
        for ($i = 0; $i < sizeof($listeGains); $i++) {
            $gain = $listeGains[$i];
            // Lecture des propriétés du joueur
            $joueur_id = stripslashes($gain["joueur_id"]);
            $somme = stripslashes($gain["total"]);
            $nom = getNomJoueurTab($listeJoueurs, $joueur_id);
            $tmp = $i + 1;
            if ($i < 9) {
                $tmp = "0" . ($i + 1);
            }
            $tempJSON = "{\"pos\":\"" . $tmp . "\",\"mon\":\"" . round($somme, 1) . "\",\"jou\":\"" . $nom . "\"}";
            if ($i < sizeof($listeGains) - 1) {
                $tempJSON = $tempJSON . ",";
            }
            echo $tempJSON;
        }
    } else {
        echo "{\"err\":\"Pas de gain\"}";
    }
    echo "]\n";
    ferme_base($db_link);