Example #1
0
    $s_lang = $config['default_lang'];
}
/*** chargement du theme menu ***/
if (isset($s_theme)) {
    $s_theme = $Sess->theme;
}
/*** chargement du theme ***/
if (isset($s_theme) && $s_theme != NULL && $s_theme != '') {
    include "themes/{$s_theme}/theme.php";
} else {
    include 'themes/' . $config['default_theme'] . '/theme.php';
    //SessionSetVar('s_theme',$config['default_theme']);
    $s_theme = $config['default_theme'];
}
if (isset($s_tournois) && !empty($s_tournois)) {
    $tournoi = tournois($s_tournois);
    $nom_tournois = $tournoi->nom;
    $status_tournois = $tournoi->status;
    $type_tournois = $tournoi->type;
    $modeelimination_tournois = $tournoi->elimination;
    $modescore_tournois = $tournoi->modescore;
    $modematchscore_tournois = $tournoi->modematchscore;
    $modeinscription_tournois = $tournoi->modeinscription;
    $modefichier_tournois = $tournoi->modefichier;
    $modeequipe_tournois = $tournoi->modeequipe;
    $nb_finales_winner_tournois = $tournoi->winner;
    $nb_finales_looser_tournois = $tournoi->looser;
    $nb_poules_tournois = $tournoi->poules;
    $nb_manches_max_tournois = $tournoi->manchesmax;
    if ($modeequipe_tournois == 'E') {
        $champX = "tag";
function show_match_lastresult($id, $op = '', $class)
{
    global $db, $dbprefix, $s_joueur, $strVS, $strScore, $strMap;
    global $strCache, $strActif, $strEnCours, $strValidation, $strConflit, $strTermine;
    $match = match($id);
    if (!$match) {
        return;
    }
    /*** récupé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 == "T") {
        $title = $strTermine;
    }
    // info du match
    $hauteur = 350;
    echo '<table cellspacing="0" cellpadding="0" border="0" width="100%"><tr>';
    $echo_value = '';
    // ekip 1
    echo '<td class="' . $class . '" align="left" width="40%" height="20">';
    $tournois = tournois($match->tournois);
    echo '<a href="?page=tournois&op=select&id=' . $tournois->id . '"><img src="images/jeux/' . $tournois->icone . '" border=0 alt="' . $tournois->nom . '" /></a>&nbsp;&nbsp;';
    //echo tournois_lastresult($match->tournois).'&nbsp;';
    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 '<td align="center" valign="center" height="20">';
    echo show_score1($match->score1, $match->score2, $match->frags1, $match->frags2, $match->type, $match->status, $match->statusequipe, $match->modematchscore);
    echo '</td><td height="20" class="text" align="center" valign="center" >' . $strVS . '</td><td height="20" align="center" valign="center">';
    echo show_score2($match->score1, $match->score2, $match->frags1, $match->frags2, $match->type, $match->status, $match->statusequipe, $match->modematchscore);
    echo '</td>';
    // ekip 2
    echo '<td height="20" class="' . $class . '" align="right" width="40%">';
    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 "<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}\">";
    echo '</td>';
    echo '</tr>';
    echo '</td></tr></table>';
}