Example #1
0
 $nbinscrits = nb_inscrits_tournois($tournois->id);
 $nbplaces = nb_places_tournois($tournois->id);
 if ($tournois->modeequipe == 'E') {
     $equipeX = "{$strEquipes}";
 } elseif ($tournois->modeequipe == 'J') {
     $equipeX = "{$strJoueurs}";
 }
 echo "<td class=textliste align=center>";
 if ($nbinscrits > $nbplaces) {
     echo "<font color=red>{$nbinscrits}</font> / {$nbplaces}";
 } else {
     echo "{$nbinscrits} / {$nbplaces}";
 }
 echo " {$equipeX}</td>";
 echo "<td class=textliste align=center>";
 if ($op == 'admin' && (admin_tournois($s_joueur, $tournois->id) || $grade['a'] == 'a' || $grade['b'] == 'b')) {
     echo "<select name=status ONCHANGE=\"status_tournois(form.id.value,this.value,'{$strChangerStatusTournois}')\">";
     echo "<option value=I";
     if ($tournois->status == "I") {
         echo " SELECTED";
     }
     echo "> {$strInscriptions}";
     if ($tournois->type == 'T' || $tournois->type == 'C') {
         echo "<option value=G";
         if ($tournois->status == "G") {
             echo " SELECTED";
         }
         echo "> {$strGenerationPoules}";
         echo "<option value=P";
         if ($tournois->status == "P") {
             echo " SELECTED";
Example #2
0
                echo "<div style=\"clear: both\"><div style=\"float: left\">" . show_joueur($joueur->id, 'admin') . "</div>";
                echo "<div style=\"float: right\">&nbsp;<a href=?page=admin&op=delete&joueur={$joueur->id}&id=" . $tab_tournois[$j]->id . ">[{$strS}]</a></div>";
                echo "</div></td></tr>";
            }
            echo "<form method=post action=?page=admin>";
            echo "<tr><td class=textliste>";
            echo "<input type=hidden name=op value=add>";
            echo "<input type=hidden name=id value=" . $tab_tournois[$j]->id . ">";
            echo "<select name=joueur>";
            $db->select("pseudo,id");
            $db->from("\t{$dbprefix}joueurs");
            $db->where("etat <> 'C'");
            $db->order_by("pseudo");
            $res2 = $db->exec();
            while ($joueur = $db->fetch($res2)) {
                if (!admin_tournois($joueur->id, $tab_tournois[$j]->id)) {
                    echo "<option value={$joueur->id}>{$joueur->pseudo}";
                }
            }
            echo "</select>";
            echo "<input type=submit value={$strAjouter}>";
            echo "</td></tr>";
            echo "</form>";
            echo "</table>";
            echo "</td></tr></table>";
        }
        echo "</td>";
    }
    echo "</tr></table>";
    echo "<img src=\"images/back.gif\" border=0 align=align=absmiddle> <a href=\"?page=tournois&op=admin\" class=action>{$strRetour}</a><br>";
}
   | Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA       |
   |                                                                     |
   +---------------------------------------------------------------------+
   | Authors: Li0n  <*****@*****.**>                               |
   |          RV <*****@*****.**>                                    |
   |          Gougou                                                     |
   +---------------------------------------------------------------------+
*/
if (eregi("block_admin_tournois.php", $_SERVER['PHP_SELF'])) {
    die("You cannot open this page directly");
}
//HTML EDITED
global $config, $s_joueur, $s_theme, $s_tournois, $nom_tournois, $status_tournois, $type_tournois, $db, $dbprefix;
global $strAdmin, $strInscriptions, $strCloturerInscriptions, $strInscriptions, $strPoules, $strValiderPoules, $strMatchsPoules, $strTerminerPoules, $strTerminerTournois, $strHoraires, $strMaps, $strServeurs, $strFinales, $strValiderFinales, $strMatchsFinales, $strMatchsActifs, $strMatchsEnCours, $strAdminTournois;
global $strCloturerLesInscriptions, $strValiderLesPoules, $strTerminerLesPoules, $strValiderLesFinales, $strTerminerLeTournois, $grade;
if (($grade['a'] == 'a' || $grade['b'] == 'b' || $grade['t'] == 't' || admin_tournois($s_joueur, $s_tournois)) && $status_tournois != 'T' && $s_tournois) {
    theme_openblock("<img src=\"themes/{$s_theme}/images/icon_admintournois.gif\" align=\"absmiddle\" alt=\"admin\"> {$strAdmin}");
    echo '<a href="?page=tournois&amp;op=modify&amp;id=' . $s_tournois . '">';
    echo show_tournois($s_tournois, 1) . "</a><br />";
    echo "<ul><li class=\"lib\"><a href=\"?page=inscriptions&amp;op=admin\">{$strInscriptions}</a><br />";
    if ($status_tournois == "I") {
        echo "<br /><li class=\"lir\"><a href=\"javascript:cloturer_inscriptions('{$strCloturerLesInscriptions}')\">{$strCloturerInscriptions}</a><br />";
    } elseif ($status_tournois == "G") {
        echo "<li class=\"lib\"><a href=\"?page=poules&amp;op=admin\">{$strPoules}</a><br />";
        echo "<br /><li class=\"lir\"><a href=\"javascript:valider_poules('{$strValiderLesPoules}')\">{$strValiderPoules}</a><br />";
    } elseif ($status_tournois == "P") {
        echo "<li class=\"lib\"><a href=\"?page=matchs_poules&amp;op=admin\">{$strMatchsPoules}</a><br />";
        echo "<li class=\"lib\"><a href=\"?page=matchs_liste&amp;op=admin&amp;status=A\">{$strMatchsActifs}</a><br />";
        echo "<li class=\"lib\"><a href=\"?page=matchs_liste&amp;op=admin&amp;status=D\">{$strMatchsEnCours}</a><br />";
        if ($type_tournois == 'T') {
            echo "<br /><li class=\"lir\"><a href=\"javascript:terminer_poules('{$strTerminerLesPoules}')\">{$strTerminerPoules}</a><br />";
function verif_admin_tournois($joueur, $tournois, $a = FALSE, $b = FALSE, $c = FALSE)
{
    global $PHP_SELF;
    if (empty($joueur)) {
        js_goto($PHP_SELF);
    }
    if ($a != 'a' && $b != 'b' && $t != 't' && admin_tournois($joueur, $tournois) == 0) {
        js_goto($PHP_SELF);
    }
}