Ejemplo n.º 1
0
        $db->where("equipe1 != 0");
        $db->where("equipe2 = {$id}");
        $db->where("status != 'T'");
        $db->where("tournois = {$s_tournois}");
        $db->exec();
        /*** calcul du nouvel arbre ***/
        $db->select("id");
        $db->from("{$dbprefix}matchs");
        $db->where("(equipe1 = {$id} OR equipe2 = {$id})");
        $db->where("type != 'P'");
        $db->where("status = 'T'");
        $db->where("tournois = {$s_tournois}");
        $db->order_by("id");
        $res = $db->exec();
        while ($match = $db->fetch($res)) {
            calcul_finales($match->id);
        }
    }
    /*** redirection ***/
    js_goto("?page=inscriptions&op=admin");
}
/********************************************************
 * Inscription de joueurs/equipes par eux meme
 */
if ($op == "sinscire") {
    /*** le tournois est en inscription manuel ***/
    if (modeinscription_tournois($id) == 'J' && status_tournois($id) == 'I') {
        /*** si il y a assez de places ***/
        $nbinscrits = nb_inscrits_tournois($id);
        $nbplaces = nb_places_tournois($id);
        if ($nbinscrits < $nbplaces) {
Ejemplo n.º 2
0
    if ($match->report == 1 && equipe_manager($match->equipe2, $s_joueur) && $modeequipe_tournois == 'E' || $match->report == 2 && equipe_manager($match->equipe1, $s_joueur) && $modeequipe_tournois == 'E' || $match->report == 1 && $match->equipe2 == $s_joueur && $modeequipe_tournois == 'J' || $match->report == 2 && $match->equipe1 == $s_joueur && $modeequipe_tournois == 'J') {
        if ($op2 == 'valider') {
            $status = 'T';
        } elseif ($op2 == 'refuser') {
            $status = 'F';
        }
        $db->update("{$dbprefix}matchs");
        $db->set("status = '{$status}'");
        if ($status == 'T') {
            $up_d = time();
            $db->set("up='{$up_d}'");
        }
        $db->where("id={$id}");
        $db->exec();
        if ($op2 == 'valider') {
            calcul_finales($id);
        }
        /*** redirection ***/
        echo "<script>this.opener.location=this.opener.location;this.close();</script>";
    } else {
        fermer_fenetre();
    }
} else {
    /*** verification securite ***/
    if ($op == 'admin') {
        verif_admin_tournois($s_joueur, $s_tournois, $grade['a'], $grade['b'], $grade['t']);
    }
    echo "<SCRIPT>\r\n\t\tfunction oneOrNoCheckboxGroup (checkbox) {\r\n\t\t\tvar checkboxGroup = checkbox.form[checkbox.name];\r\n\t\t\tfor (var c = 0; c < checkboxGroup.length; c++)\r\n\t\t\t\tif (checkboxGroup[c] != checkbox)\r\n\t\t\t\t\tcheckboxGroup[c].checked = false;\r\n\t\t}\r\n\t</SCRIPT>";
    /*** informations sur un match ***/
    if (!empty($id)) {
        $match = match($id);