コード例 #1
0
}
/********************************************************
 * DesInscription de joueurs/equipes par eux meme
 */
if ($op == "desinscire") {
    /*** le tournois est en inscription manuel ***/
    if (modeinscription_tournois($id) == 'J' && status_tournois($id) == 'I') {
        /*** le tournois est par equipe (le manager ki desinscrit) ***/
        if (modeequipe_tournois($id) == 'E' && participe($equipe, $id)) {
            /*** verification securite ***/
            verif_manager($equipe, $s_joueur);
            $db->delete("{$dbprefix}participe");
            $db->where("tournois = {$s_tournois}");
            $db->where("equipe = {$equipe}");
            $db->exec();
        } elseif (modeequipe_tournois($id) == 'J' && participe($s_joueur, $id)) {
            $db->delete("{$dbprefix}participe");
            $db->where("tournois = {$s_tournois}");
            $db->where("equipe = {$s_joueur}");
            $db->exec();
        }
    }
    /*** redirection ***/
    js_goto("?page=inscriptions");
} elseif ($op == "admin") {
    /*** verification securite ***/
    verif_admin_tournois($s_joueur, $s_tournois, $grade['a'], $grade['b'], $grade['t']);
    /*** affichage main ***/
    echo "<p class=title>.:: " . ${'str' . $EquipesX . 'Inscrits'} . " - {$nom_tournois}::.</p>";
    echo "<table cellspacing=0 cellpadding=0 border=0>";
    $nbinscrits = nb_inscrits_tournois($s_tournois);
コード例 #2
0
    js_goto("?page=index");
}
/********************************************************
 * Affichage popup report
 */
if ($op == 'report' || $op == 'do_report') {
    $str = '';
    $erreur = 0;
    /** recup du match **/
    $match = match($id);
    if (!$match) {
        $erreur = 1;
        $str .= $strMatchInvalide;
    }
    /** recup du type de tournois **/
    $modeequipe_tournois = modeequipe_tournois($match->tournois);
    $participe = 0;
    $moi = 0;
    /*** test de la participation au match ***/
    /** le tournois est par equipe **/
    if ($modeequipe_tournois == 'E' && $s_joueur) {
        $show = "show_equipe";
        $nom_participant = "nom_equipe";
        $champX = "tag";
        $mesequipes = equipes_manager($s_joueur);
        for ($i = 0; $i < count($mesequipes); $i++) {
            if ($mesequipes[$i]['id'] == $match->equipe1) {
                $moi = 1;
                $participe = 1;
                break;
            } elseif ($mesequipes[$i]['id'] == $match->equipe2) {
コード例 #3
0
function show_match_poule($id, $op = '')
{
    global $db, $dbprefix, $s_joueur, $strVS, $strScore, $strMap;
    global $strCache, $strActif, $strEnCours, $strValidation, $strConflit, $strTermine, $grade;
    $match = match($id);
    if (!$match) {
        return;
    }
    /*** verification securite ***/
    //if($op=='admin') verif_admin_tournois($s_joueur,$match->tournois);
    if ($op == 'admin') {
        verif_admin_tournois($s_joueur, $match->tournois, $grade['a'], $grade['b'], $grade['t']);
    }
    /*** r&eacute;cup&eacute;ration des infos ***/
    $seed1 = seed($match->equipe1, $match->tournois);
    $seed2 = seed($match->equipe2, $match->tournois);
    $modeequipe_tournois = modeequipe_tournois($match->tournois);
    $modescore_tournois = modescore_tournois($match->tournois);
    if ($modeequipe_tournois == 'E') {
        $show = "show_equipe";
    } else {
        $show = "show_joueur";
    }
    if ($op != 'admin' && $match->status == 'C') {
        $match = '';
    }
    if ($op) {
        $op_str = "&op={$op}";
    } else {
        $op_str = '';
    }
    if ($match->status == "C") {
        $title = $strCache;
    }
    if ($match->status == "A") {
        $title = $strActif;
    }
    if ($match->status == "D") {
        $title = $strEnCours;
    }
    if ($match->status == "V") {
        $title = $strValidation;
    }
    if ($match->status == "F") {
        $title = $strConflit;
    }
    if ($match->status == "T") {
        $title = $strTermine;
    }
    // info du match
    echo '<table cellspacing="0" cellpadding="0" border="0"><tr><td>';
    echo '<table cellspacing="0" cellpadding="0" border="0"><tr valign=center>';
    if ($op == 'admin') {
        echo "<td class=\"info\">{$match->status}</td>";
        $hauteur = 450;
    } elseif ($op == 'report') {
        $hauteur = 400;
    } else {
        $hauteur = 350;
    }
    echo "<td class=\"info\"><input type=\"radio\" name=\"match\" value=\"{$match->id}\" onclick=\"javascript:ouvrir_fenetre('?page=matchs_gestion{$op_str}&id={$match->id}&header=win','match',{$hauteur},500)\" style=\"border: 0px;background-color:transparent;\" title=\"{$title}\">";
    if ($op == 'admin' && ($match->status == 'C' || $match->status == 'A' || $match->status == 'D' && ($modescore_tournois == 'M4' || $modescore_tournois == 'AB'))) {
        echo "<td class=\"info\"><input type=\"checkbox\" name=\"tab_matches[]\" value=\"{$match->id}\" style=\"border: 0px;background-color:transparent;\"></td>";
    }
    echo '</tr>';
    echo '</table>';
    echo '</td>';
    // ekip 1
    echo '<td class="text" align="left" width="120">';
    if ($match->statusequipe == 'F1') {
        echo $show($match->equipe1, $op, 'F', $seed1);
    } elseif ($match->statusequipe == 'D1') {
        echo $show($match->equipe1, $op, 'D', $seed1);
    } else {
        echo $show($match->equipe1, $op, '', $seed1);
    }
    echo '</td>';
    echo show_score1($match->score1, $match->score2, $match->frags1, $match->frags2, $match->type, $match->status, $match->statusequipe, $match->modematchscore);
    echo '<td class="text" align="center" width="20">' . $strVS . '</td>';
    echo show_score2($match->score1, $match->score2, $match->frags1, $match->frags2, $match->type, $match->status, $match->statusequipe, $match->modematchscore);
    // ekip 2
    echo '<td class="text" align="right" width="120">';
    if ($match->statusequipe == 'F2') {
        echo $show($match->equipe2, $op, 'F', $seed2, 'right');
    } elseif ($match->statusequipe == 'D2') {
        echo $show($match->equipe2, $op, 'D', $seed2, 'right');
    } else {
        echo $show($match->equipe2, $op, '', $seed2, 'right');
    }
    echo '</td>';
    echo '</tr>';
    /** info du match **/
    if ($op != 'report' && ($match->status != 'T' && $match->status != 'F' && $match->status != 'V' || $op == 'admin')) {
        $map = '';
        /** manche **/
        if ($match->status == 'A') {
            $manches = manches($match->id);
            for ($i = 0; $i < count($manches); $i++) {
                if ($manches[$i]->map) {
                    $map .= $manches[$i]->map . ',';
                }
            }
            $map = substr($map, 0, -1);
        } elseif ($match->status == 'D') {
            $mancheactive = manche_active($match->id);
            if ($mancheactive->map) {
                $map = $mancheactive->map;
                if (nb_manches($match->id) > 1) {
                    $map .= ': ' . $mancheactive->score1 . '/' . $mancheactive->score2;
                }
            }
        }
        if ($map) {
            $map = "- {$map}";
        }
        /** date **/
        /*$date_now = time();
        		$date=strftime(DATESTRING, $match->date);
        		if(!$match->date) $date='';
        
        		if($match->date < $date_now && ($match->status=='C' || $match->status=='A'))
        			$date='<font color="red">'.$date.'</font>';
        
        		if($match->date && ($match->status=='C' || $match->status=='A')) $date="- $date";
        		else $date='';*/
        echo '<tr height="10">';
        echo '<td></td>';
        echo '<td class="info" colspan="5" nowrap ><img src="images/next.gif" border="0" align="absmiddle" alt="next"><small>' . $match->id . ' ' . $map . '</small></td>';
        echo '</tr>';
    }
    echo '</td></tr></table>';
}