| 12
 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
 
 | <fieldset>
					<legend>Mise à jour d'un match</legend>
				<table>
<?php
    $req = $bdd->prepare('
	SELECT match.id AS `match_id`, journee, DATE_FORMAT(date, \'%d/%m/%Y\') AS date, dom.nom AS `dom_nom`, ext.nom AS `ext_nom`,  buts_dom, buts_ext, statut.statut AS `statut_nom`
	FROM `match`, `equipe` AS dom, `equipe` AS ext, `match_statut` AS statut
	WHERE id_equipe_dom=dom.id 
	AND id_equipe_ext=ext.id 
	AND match.id=\'' . $_GET['match_id'] . '\'
	GROUP BY match.id
	');
    $req->execute(array($_GET['match_id']));
	while ($donnees = $req->fetch())
	{
?>
				<form action="update_match.php" method="post">
				<tr>
					<td>
						<label for="match_id">ID du match</label> : 
					</td>
					<td>
						<?php echo ''.$donnees["match_id"].' ';?>
					</td>
				</tr>
				<tr>
					<td>
						<label for="journee">Journée</label> : 
					</td>
					<td>
						<?php echo ''.$donnees["journee"].' ';?>
					</td>
				</tr>
				<tr>
					<td>
						<label for="date">Date</label> : 
					</td>
					<td>
						<input type="text" name="date" id="date" size="10" value="<?php echo ''.$donnees["date"].' ';?>"/>  (exemple 31/07/2011)
					</td>
				</tr>
				<tr>
					<td>
						<label for="dom_nom">Match</label> : 
					</td>
					<td>
						<?php echo ''.$donnees["dom_nom"].' ';?> - <?php echo ''.$donnees["ext_nom"].' ';?>
					</td>
				</tr>
				<tr>
					<td>
						<label for="buts_dom">Score</label> : 
					</td>
					<td>
						<input type="text" name="buts_dom" id="buts_dom" size="3" value="<?php echo ''.$donnees["buts_dom"].' ';?>"/> - <input type="text" name="buts_ext" id="buts_ext" size="3" value="<?php echo ''.$donnees["buts_ext"].' ';?>"/>
					</td>
				</tr>
				<tr>
					<td>
						<label for="statut_nom">Statut</label> : 
					</td>
					<td>
						<select name="statut_nom" id="id_match_statut" value="<?php echo ''.$donnees["statut_nom"].' ';?>"/>
					<option value="1" <?php if ($donnees["statut_nom"] == "1") {echo("selected");}?> >Match à jouer</option>
					<option value="2" <?php if ($donnees["statut_nom"] == "2") {echo("selected");}?> >Match joué</option>
					<option value="3" <?php if ($donnees["statut_nom"] == "3") {echo("selected");}?> >Forfait domicile</option>
					<option value="4" <?php if ($donnees["statut_nom"] == "4") {echo("selected");}?> >Forfait exterieur</option></select>
					</td>
				</tr>
				<tr>
				<td>
                	<a href="admin_match.php"><img src="../images/retour.png" alt="Retour" title="Retour" /></a>
				</td>
				<td>
					<input type="submit" value="Mettre à jour"/>
				</td>
<?php
//On ferme la boucle while
 }
?>
				</table>
			</fieldset> | 
Partager