Beispiel #1
0
$saison = new Saison($db);
if (isset($_POST['saisonForm'])) {
    $saison->saison_id = $_POST['saisonForm'];
    $saison = $saison->chargeSaison();
} else {
    // Recherche de la saison courante
    $saison = $saison->chargeSaisonCourante();
}
// Nombre de Jeu
$jeu = new Jeu($db);
$jeu->saison_id = $saison->saison_id;
$jeu->chargeNombreJeux();
$jeu_nombre = $jeu->jeu_nombre;
$jeu->chargeDernierJeu();
// Liste des opérations en caisse
$gain = new Gain($db);
$gain->saison_id = $saison->saison_id;
$gainsJson = $gain->litGainsJson();
$stmt = $gain->litGains();
$num = $stmt->rowCount();
// Liste des saisons
$stmtSaisonsGain = $saison->litSaisons();
$listeSaisonsGain = $stmtSaisonsGain->fetchAll(PDO::FETCH_ASSOC);
// Recherche la liste des joueurs
$joueurs = new Joueur($db);
$stmtJoueurs = $joueurs->litJoueurs();
// Classement
$classement = new Classement($db);
$classement->saison_id = $saison->saison_id;
$stmtClassement = $classement->litClassement();
$listeClassementGeneral = $stmtClassement->fetchAll(PDO::FETCH_ASSOC);
Beispiel #2
0
if (!isset($_SESSION['id_joueur']) || isset($_SESSION['id_joueur']) && $_SESSION['admin'] != 'O') {
    header('Location: index.php');
}
// include database and object files
include_once 'config/database.php';
include_once 'objects/saison.php';
include_once 'objects/gain.php';
include_once 'objects/joueur.php';
// instantiate database and product object
$database = new Database();
$db = $database->getConnection();
// Recherche de toute les saisons
$saison = new Saison($db);
$saison = $saison->chargeSaisonCourante();
// Nombre de Gains
$gain = new Gain($db);
$gain->saison_id = $saison->saison_id;
$stmtGains = $gain->litGainsDistincts();
$num = $stmtGains->rowCount();
// Recherche la liste des joueurs
$joueurs = new Joueur($db);
$stmtJoueurs = $joueurs->litJoueurs();
$listeJoueurs = $stmtJoueurs->fetchAll(PDO::FETCH_ASSOC);
include_once 'composants/nav.php';
?>
        <div id="page-wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">Administration des gains</h1>
                </div>
                <!-- /.col-lg-12 -->
Beispiel #3
0
$jeu->saison_id = $saison->saison_id;
$jeu->chargeNombreJeux();
$jeu_nombre = $jeu->jeu_nombre;
$jeu->chargeDernierJeu();
// Resultat
$resultat = new Resultat($db);
$resultat->jeu_id = $jeu->jeu_id;
$resultat->chargeResultat();
// Classement
$classement = new Classement($db);
$classement->saison_id = $saison->saison_id;
$stmtClassement = $classement->litTroisMeilleursClassement();
$stmtClassementGeneral = $classement->litClassement();
$listeClassementGeneral = $stmtClassementGeneral->fetchAll(PDO::FETCH_ASSOC);
// Liste des opérations en caisse
$gain = new Gain($db);
$gain->saison_id = $saison->saison_id;
$stmtGain = $gain->litGains();
// Liste des opérations en caisse
$chat = new Chat($db);
$chat->saison_id = $saison->saison_id;
$stmtChat = $chat->litChatMessages();
$chatMessages = $stmtChat->fetchAll(PDO::FETCH_ASSOC);
// Rapport
$rapport = new Rapport($db);
$rapport->jeu_id = $jeu->jeu_id;
$rapport->type = 7;
$stmtRapport7 = $rapport->litRapports();
$jeuxRapport7 = $stmtRapport7->fetchAll(PDO::FETCH_ASSOC);
$rapport->type = 15;
$stmtRapport15 = $rapport->litRapports();
Beispiel #4
0
include_once '../objects/saison.php';
include_once '../objects/gain.php';
if (isset($_SESSION['id_joueur'])) {
    $debug = false;
    if (isset($_GET['debug'])) {
        // Mode debug
        $debug = true;
    }
    // instantie la base
    $database = new Database();
    $db = $database->getConnection();
    // Saison courante
    $saison = new Saison($db);
    $saison = $saison->chargeSaisonCourante();
    // Nouvel objet
    $gain = new Gain($db);
    // Recherche (GET) -> op=R et id présent
    if (isset($_GET['op']) && $_GET['op'] == 'R' && isset($_GET['id']) && strlen($_GET['id']) > 0) {
        $gain->gain_id = $_GET['id'];
        if ($debug == true) {
            echo "Recherche d'un gain {$gain->gain_id}<br>\n";
        }
        if ($gain->chargeGain()) {
            $json["resultat"] = true;
            $json["id"] = $gain->gain_id;
            $json["jid"] = $gain->joueur_id;
            $json["somme"] = $gain->gain_somme;
        } else {
            $json["resultat"] = false;
            $json["commentaire"] = "Gain introuvable";
        }