1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
<?
//validation score joueurs
$coeff= $_POST['ptsJ']/$_POST['jouesJ'];
if ($action3 == 2 )
{
$ajout= "INSERT INTO classement_joueurs(ID, ID_joueur, ID_champ, ID_journee, ID_club, prenom, nom, pts, joues, coeff)
VALUES('',".$rowjoueur[0].",".$champ.",".$numero.",".$row[5].",".$rowjoueur[3].",".$rowjoueur[2].",".$_POST['ptsJ'].",".$_POST['jouesJ'].",".$coeff.") ";
$reqajout= mysql_query($ajout) or die ('impossible d\'éffectuer l\'insertion');
}
//affichage des matchs par equipe
echo "<br>".ADMIN_JOUEURS_1;
echo "<form method=\"POST\">";
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" valign=\"bottom\" align=\"center\" width=\"100%\"><tr><td>";
echo"<tr class=phpl4 align =\"left\"><td align=\"right\" class=phpl2>".DOMICILE."<td class=phpl2><td class=phpl2>".BUTEUR."<td class=phpl2><td class=phpl2><td class=phpl2>".BUTEUR."<td class=phpl2><td class=phpl2>".EXTERIEUR."</tr>";
//affichage equipe domicile
$query="SELECT phpl_clubs.nom, CLEXT.nom, phpl_matchs.buts_dom, phpl_matchs.buts_ext, phpl_matchs.id, phpl_clubs.id, CLEXT.id
FROM phpl_clubs, phpl_clubs as CLEXT, phpl_matchs, phpl_journees, phpl_equipes, phpl_equipes as EXT
WHERE phpl_clubs.id = phpl_equipes.id_club
AND CLEXT.id = EXT.id_club
AND phpl_equipes.id = phpl_matchs.id_equipe_dom
AND EXT.id = phpl_matchs.id_equipe_ext
AND phpl_matchs.id_journee = phpl_journees.id
AND phpl_journees.numero = '$numero'
AND phpl_journees.id_champ = '$champ'
AND CLEXT.nom!='exempte'
AND phpl_clubs.nom!= 'exempte'";
$result=mysql_query($query);
$e=0;
$nblignes = mysql_num_rows($result);
while($row = mysql_fetch_array($result))
{
if (($e%2)==0){$class="phpl3";}
else {$class="phpl4";}
echo "<tr>";
print "<td align=\"right\" class=$class><b style=\"color:grey;\">$row[0]</b><br><br>";
// echo "<input type=\"hidden\" name=\"nbdom[]\" value=\"$row[2]\">";
// echo "<input type=\"hidden\" name=\"matchs_id[]\" value=\"$row[4]\">";
// echo "<input type=\"hidden\" name=\"butd[]\" value=\"1\">";
// echo "<input type=\"hidden\" name=\"butv[]\" value=\"1\">";
// echo "<input type=\"hidden\" name=\"nbext[]\" value=\"$row[3]\">";
// $x=0;
//affichage des joueurs de l'equipe domicile
$queryJ="SELECT phpl_joueurs.id, phpl_joueurs.id_club, phpl_joueurs.nom, phpl_joueurs.prenom
FROM phpl_joueurs, phpl_clubs
WHERE phpl_joueurs.id_club=phpl_clubs.id
AND phpl_joueurs.id_club=$row[5]
ORDER BY phpl_joueurs.prenom, phpl_joueurs.nom";
$resultJ=mysql_query($queryJ);
$j=0;
while($rowjoueur = mysql_fetch_array($resultJ))
{
print $rowjoueur[3]." ".$rowjoueur[2].": ";
echo "<input type=\"text\" size=\"3\" id=\"ptsJ\" value=\"\"/>(pts) ";
echo "<input type=\"text\" size=\"3\" id=\"jouesJ\" value=\"\" />(joués)";
echo "<input type=\"hidden\" id=\"idjoueur\" value=\"$rowjoueur[0]\"/>";
echo "<input type=\"hidden\" name=\"matchs_id[]\" value=\"$row[4]\"><br>";
}
$j++;
echo"<td class=$class><td class=$class>";
$query3="SELECT phpl_joueurs.nom, phpl_joueurs.prenom, phpl_buteurs.id
FROM phpl_buteurs, phpl_joueurs
WHERE id_joueur=phpl_joueurs.id and phpl_joueurs.id_club=$row[5] and phpl_buteurs.id_match='$row[4]'";
$result3=mysql_query($query3);
if (!$result3) die (mysql_error());
while ($row3=mysql_fetch_array($result3))
{
echo "<a href=?action4=supp&page=championnat&action=buteurs&numero=$numero&champ=$champ&id_buteur_supp=$row3[2]>$row3[0] $row3[1]</a><br>";
}
echo "<td width=\"20\" align=\"center\" class=$class>";
echo " <b style=\"color:grey;\">$row[2] </b>"; //affichage score equipe domicile
echo "<td width=\"20\" align=\"center\" class=$class>";
echo "<b style=\"color:grey;\"> $row[3]</b> "; //affichage score equipe exterieur
echo "<td class=$class class=$class>";
$query3="SELECT phpl_joueurs.nom, phpl_joueurs.prenom, phpl_buteurs.id
FROM phpl_buteurs, phpl_joueurs
WHERE id_joueur=phpl_joueurs.id and phpl_joueurs.id_club=$row[6] and phpl_buteurs.id_match=$row[4]";
$result3=mysql_query($query3);
if (!$result3) die (mysql_error());
while ($row3=mysql_fetch_array($result3))
{
echo "<a href=?action4=supp&page=championnat&action=buteurs&numero=$numero&champ=$champ&id_buteur_supp=$row3[2]>$row3[0] $row3[1]</a><br>";
}
$e++;
echo "<td class=$class><td class=$class><b style=\"color:grey;\">$row[1]</b><br><br>"; //affichage equipe exterieur
//affichage des joueurs des l'equipe exterieur
$queryJ="SELECT phpl_joueurs.id, phpl_joueurs.id_club, phpl_joueurs.nom, phpl_joueurs.prenom
FROM phpl_joueurs, phpl_clubs
WHERE phpl_joueurs.id_club=phpl_clubs.id AND phpl_joueurs.id_club=$row[6] ORDER BY phpl_joueurs.prenom, phpl_joueurs.nom";
$resultJ=mysql_query($queryJ);
while ($rowJ=mysql_fetch_array($resultJ))
{
print $rowJ[3]." ".$rowJ[2].":
<input type=\"text\" size=\"3\" id=\"ptsJ\" value=\"\"/>(pts)
<input type=\"text\" size=\"3\" id=\"jouesJ\" value=\"\"/>(joués)
<input type=\"hidden\" id=\"idjoueur\" value=\"$rowJ[0]\" /><br> ";
}
}
//bas de la page
print $nb_matchs;
echo "<input type=\"hidden\" name=\"champ\" value=\"$champ\">";
echo "<input type=\"hidden\" name=\"action3\" value=\"2\">";
echo "<input type=\"hidden\" name=\"page\" value=\"championnat\">
<input type=\"hidden\" name=\"action\" value=\"buteurs\">";
//<input type=\"hidden\" name=\"champ\" value=\"$champ\">
//$query2="select phpl_matchs.id from phpl_matchs where phpl_matchs.id_journee=$numero";
//$result2=mysql_query($query2);
//$nb_matchs=nb_matchs($numero, $champ);
//$numero=$numero+1;
echo "</td></tr><tr><td colspan=\"8\"><input type=\"hidden\" name=\"numero\" value=\"$numero\">";
//echo "<input type=\"hidden\" name=\"journee_suivante\" value=1><input type=\"hidden\" name=\"nb_matchs\" value=\"$nb_matchs\">";
$button=ENVOI;
echo "<br><center><input type=\"submit\" value=$button></center>";
echo "</td></tr></table>";
echo "</form>";
?>
</td></tr></table><br><br> |
Partager