\n"; echo "\n\n\n"; echo "
\n"; echo "\n"; if ($n !=0){ echo "";} /* Calendrier individuel */ if (!isset($ligue) or $ligue ==0){ echo "\n";} else{ echo "
$titrechpts
\n"; while ($r = mysql_fetch_array($q)) { $aff ++; if ($r["ligue"] != 0){ echo "Calendrier de la Division ".htmlentities($r["ligue"])."\n"; if ($aff < $n) { echo " / ";}} } } else { echo "
Il n'y a pas encore de calendrier!
Cliquez sur le calendrier de votre choix pour voir toutes les journées
"; echo "
\n"; echo "\n";} echo "
Calendrier de la division $ligue
\n"; if ($ligue != "" && $cal != ""){ $l = "$ligue"; $club = "$cal"; if ($d !=0){ $q2 = mysql_query("SELECT * FROM lzo_calendrier$l WHERE dom LIKE '$club' ORDER BY jour ASC"); $voirmatch = "à l'extérieur / tous";} if ($e !=0){ $q2 = mysql_query("SELECT * FROM lzo_calendrier$l WHERE ext LIKE '$club' ORDER BY jour ASC"); $voirmatch = "à domicile / tous";} elseif ($d !=1 && $e != 1){ $q2 = mysql_query("SELECT * FROM lzo_calendrier$l WHERE ext LIKE '$club' OR dom LIKE '$club' ORDER BY jour ASC"); $voirmatch = "à domicile / à l'extérieur";} echo "
\n"; echo ""; echo "
Calendrier de $club / Club de division $l
Voir les matchs $voirmatch
"; echo "
\n"; while ($r2 = mysql_fetch_array($q2)) { if ($i % 2) {echo "";} else {echo "";} $i++; $ref= $r2["ref"]; $qs = mysql_query("SELECT * FROM lzo_comment WHERE ref LIKE '$ref' AND note > '0'"); $ns = mysql_num_rows($qs); $qs2 = mysql_query("SELECT * FROM lzo_comment WHERE ref LIKE '$ref'"); $ns2 = mysql_num_rows($qs2); if ($ns !=0){ while ($rs = mysql_fetch_array($qs)) { $com =$rs["ref"]; $qs2 = mysql_query("SELECT round(SUM(note)/$ns) AS moy FROM lzo_comment WHERE ref LIKE '$com' AND note > '0'"); while ($rs2 = mysql_fetch_array($qs2)) { $note ="\n";} } } else { $com= $r2["idx"].l.$l.j.$r2["jour"].m.$r2["mtch"].$r2["dom"].$r2["ext"]; $note ="\n";} echo "\n"; if ($r2["resd"] > $r2["rese"]){ $drapeaud= "\"Victoire"; $drapeaue= "\"Défaite";} elseif ($r2["resd"] < $r2["rese"]){ $drapeaud= "\"Défaite"; $drapeaue= "\"Victoire";} elseif ($r2["resd"] == $r2["rese"] && $r2["resd"] != '-'){ $drapeaud= "\"Match"; $drapeaue= $drapeaud;} else { $drapeaud= ""; $drapeaue= "";} echo "\n"; echo "\n"; echo "\n"; echo "$note";} echo "
Non noté
\"Faire\n"; echo "[$ns2]$drapeaud ".htmlentities($r2["dom"])." ".htmlentities($r2["resd"])." / ".htmlentities($r2["rese"])." ".htmlentities($r2["ext"])." $drapeaue
\n"; include ("include/bpage.php3"); exit(); } /* Formulaire des journées de championnat */ if (isset($ligue) && $ligue > 0){ $l = "$ligue"; echo "
\n"; if ($l > 0){ echo "
"; echo "\n\n
\n";} echo "
\n"; } /* Message si aucune journée selectionnée */ $j = "$jour"; if ($j == "" && $l > 0) { echo "

Choisissez la journée à afficher!

\n";} /* Affichage du calendrier selon la journée */ elseif ($j > 0 && $l > 0) { if ($j!=1){ $ponc="eme";} else { $ponc="re";} echo "

Les rencontres de la $j$ponc journée

\n"; echo "\n"; $q3 = mysql_query("SELECT * FROM lzo_calendrier$l WHERE jour LIKE $j ORDER BY dom ASC LIMIT 10"); while ($r3 = mysql_fetch_array($q3)) { if ($i % 2) {echo "";} else {echo "";} $i++; $ref= $r3["ref"]; $qs = mysql_query("SELECT * FROM lzo_comment WHERE ref LIKE '$ref' AND note > '0'"); $ns = mysql_num_rows($qs); $qs2 = mysql_query("SELECT * FROM lzo_comment WHERE ref LIKE '$ref'"); $ns2 = mysql_num_rows($qs2); if ($ns !=0){ while ($rs = mysql_fetch_array($qs)) { $com =$rs["ref"]; $qs2 = mysql_query("SELECT round(SUM(note)/$ns) AS moy FROM lzo_comment WHERE ref LIKE '$com' AND note > '0'"); while ($rs2 = mysql_fetch_array($qs2)) { $note ="\n";} } } else { $com= $r3["idx"].l.$l.j.$r3["jour"].m.$r3["mtch"].$r3["dom"].$r3["ext"]; $note ="\n";} echo "\n"; if ($r3["resd"] > $r3["rese"]){ $drapeaud= "\"Victoire"; $drapeaue= "\"Défaite";} elseif ($r3["resd"] < $r3["rese"]){ $drapeaud= "\"Défaite"; $drapeaue= "\"Victoire";} elseif ($r3["resd"] == $r3["rese"] && $r3["resd"] != '-'){ $drapeaud= "\"Match"; $drapeaue= $drapeaud;} else { $drapeaud= ""; $drapeaue= "";} echo "\n"; echo "\n"; echo "\n"; echo "$note";} echo "
\"Note
Non noté
\"Faire\n"; echo "[$ns2]$drapeaud ".htmlentities($r3["dom"])." ".htmlentities($r3["resd"])." / ".htmlentities($r3["rese"])." ".htmlentities($r3["ext"])." $drapeaue
\n"; $qs3 = mysql_query("SELECT SUM(resd) AS nbrebd, SUM(rese) AS nbrebe FROM lzo_calendrier$l WHERE jour LIKE $j"); while ($rs3 = mysql_fetch_array($qs3)) { if ($rs3["nbrebd"] >0 or $rs3["nbrebe"] >0){ echo "
\n"; echo "\n"; echo "\n"; echo "
Statistiques de la $j$ponc journée
Nbre de buts marqués à domicile: $rs3[nbrebd]
Nbre de buts marqués à l'extérieur: $rs3[nbrebe]
\n"; } else { echo " ";} } } /* SI rien selectionné */ else { if ($l == "" && $apercu == ""){ $q1 = mysql_query("SELECT ligue FROM lzo_calendrier ORDER BY ligue DESC"); while ($r1 = mysql_fetch_array($q1)) { $l=$r1["ligue"];} } else { $l=$apercu;} if ($l != ""){ echo "
\n"; echo "\n"; $qs = mysql_query("SELECT ligue FROM lzo_calendrier ORDER BY ligue ASC"); $ns = mysql_num_rows($qs); if ($ns >1){ echo "\n";} echo "
Aperçu du calendrier division $l
\n"; while ($rs = mysql_fetch_array($qs)) { $aff ++; if ($rs["ligue"] != $l && $rs["ligue"] != 0){ echo "Voir aperçu division ".htmlentities($rs["ligue"])."\n"; if ($aff < $ns) { echo " / ";} } else {echo " ";} } echo "
\n"; $q = mysql_query("SELECT * FROM lzo_calendrier$l ORDER BY jour DESC"); $tmp = "-"; while ($r = mysql_fetch_array($q)) { if ( $r["resd"] == $tmp) { $j = $r['jour'];}} if ($j != ""){ if ($j!=1){ $ponc="eme";} else { $ponc="re";} echo "
\n"; echo "\n"; $q3 = mysql_query("SELECT * FROM lzo_calendrier$l WHERE jour LIKE $j ORDER BY dom ASC LIMIT 10"); while ($r3 = mysql_fetch_array($q3)) { if ($i % 2) {echo "";} else {echo "";} $i++; $ref= $r3["ref"]; $qs = mysql_query("SELECT * FROM lzo_comment WHERE ref LIKE '$ref' AND note > '0'"); $ns = mysql_num_rows($qs); $qs2 = mysql_query("SELECT * FROM lzo_comment WHERE ref LIKE '$ref'"); $ns2 = mysql_num_rows($qs2); if ($ns !=0){ while ($rs = mysql_fetch_array($qs)) { $com =$rs["ref"]; $qs2 = mysql_query("SELECT round(SUM(note)/$ns) AS moy FROM lzo_comment WHERE ref LIKE '$com' AND note > '0'"); while ($rs2 = mysql_fetch_array($qs2)) { $note ="\n";} } } else { $com= $r3["idx"].l.$l.j.$r3["jour"].m.$r3["mtch"].$r3["dom"].$r3["ext"]; $note ="\n";} echo "\n"; if ($r3["resd"] > $r3["rese"]){ $drapeaud= "\"Victoire"; $drapeaue= "\"Défaite";} elseif ($r3["resd"] < $r3["rese"]){ $drapeaud= "\"Défaite"; $drapeaue= "\"Victoire";} elseif ($r3["resd"] == $r3["rese"] && $r3["resd"] != '-'){ $drapeaud= "\"Match"; $drapeaue= $drapeaud;} else { $drapeaud= ""; $drapeaue= "";} echo "\n"; echo "\n"; echo "\n"; echo "$note";} echo "
Journée en cours ($j$ponc journée)
\"Note
Non noté
\"Faire\n"; echo "[$ns2]$drapeaud ".htmlentities($r3["dom"])." ".htmlentities($r3["resd"])." / ".htmlentities($r3["rese"])." ".htmlentities($r3["ext"])." $drapeaue
\n"; $qs3 = mysql_query("SELECT SUM(resd) AS nbrebd, SUM(rese) AS nbrebe FROM lzo_calendrier$l WHERE jour LIKE $j"); while ($rs3 = mysql_fetch_array($qs3)) { if ($rs3["nbrebd"] >0 or $rs3["nbrebe"] >0){ echo "
\n"; echo "\n"; echo "\n"; echo "
Statistiques de la $j$ponc journée
Nbre de buts marqués à domicile: $rs3[nbrebd]
Nbre de buts marqués à l'extérieur: $rs3[nbrebe]
\n"; } else { echo " ";} } } else { $qj = mysql_query("SELECT jour FROM lzo_calendrier$l GROUP BY jour ORDER BY jour ASC"); $nj = mysql_num_rows($qj); $j=$nj+1;} if ($j !=1 && $j>1){ $j = $j-1; if ($j!=1){ $ponc="eme";} else { $ponc="re";} echo "
\n"; echo "\n"; $q4 = mysql_query("SELECT * FROM lzo_calendrier$l WHERE jour LIKE $j ORDER BY dom ASC LIMIT 10"); while ($r4 = mysql_fetch_array($q4)) { if ($i % 2) {echo "";} else {echo "";} $i++; $ref= $r4["ref"]; $qs = mysql_query("SELECT * FROM lzo_comment WHERE ref LIKE '$ref' AND note > '0'"); $ns = mysql_num_rows($qs); $qs2 = mysql_query("SELECT * FROM lzo_comment WHERE ref LIKE '$ref'"); $ns2 = mysql_num_rows($qs2); if ($ns !=0){ while ($rs = mysql_fetch_array($qs)) { $com =$rs["ref"]; $qs2 = mysql_query("SELECT round(SUM(note)/$ns) AS moy FROM lzo_comment WHERE ref LIKE '$com' AND note > '0'"); while ($rs2 = mysql_fetch_array($qs2)) { $note ="\n";} } } else { $com= $r4["idx"].l.$l.j.$r4["jour"].m.$r4["mtch"].$r4["dom"].$r4["ext"]; $note ="\n";} echo "\n"; if ($r4["resd"] > $r4["rese"]){ $drapeaud= "\"Victoire"; $drapeaue= "\"Défaite";} elseif ($r4["resd"] < $r4["rese"]){ $drapeaud= "\"Défaite"; $drapeaue= "\"Victoire";} elseif ($r4["resd"] == $r4["rese"] && $r4["resd"] != '-'){ $drapeaud= "\"Match"; $drapeaue= $drapeaud;} else { $drapeaud= ""; $drapeaue= "";} echo "\n"; echo "\n"; echo "\n"; echo "$note";} echo "
Journée précedente ($j$ponc journée)
\"Note
Non noté
\"Faire\n"; echo "[$ns2]$drapeaud ".htmlentities($r4["dom"])." ".htmlentities($r4["resd"])." / ".htmlentities($r4["rese"])." ".htmlentities($r4["ext"])." $drapeaue
\n"; $qs3 = mysql_query("SELECT SUM(resd) AS nbrebd, SUM(rese) AS nbrebe FROM lzo_calendrier$l WHERE jour LIKE $j"); while ($rs3 = mysql_fetch_array($qs3)) { if ($rs3["nbrebd"] >0 or $rs3["nbrebe"] >0){ echo "
\n"; echo "\n"; echo "\n"; echo "
Statistiques de la $j$ponc journée
Nbre de buts marqués à domicile: $rs3[nbrebd]
Nbre de buts marqués à l'extérieur: $rs3[nbrebe]
\n"; } else { echo " ";} } } } } echo "\n"; include("include/bpage.php3"); ?>