Révision 512183e9
b/TODO | ||
---|---|---|
1 |
* Gestion des forfaits |
|
2 | 1 |
* Accent dans le ZIP |
3 | 2 |
* virer de la liste DIVISION, coupe et tournoi. Faire une liste à part. |
4 | 3 |
* Fichier avec la liste des divisions et un avec la liste des coupes, tournoi. |
b/admin/admin.php | ||
---|---|---|
65 | 65 |
$ptsVis = get_magic_quotes_gpc() ? stripslashes($_POST['ptsVis']) : $_POST['ptsVis']; |
66 | 66 |
$scoreDom = get_magic_quotes_gpc() ? stripslashes($_POST['scoreDom']) : $_POST['scoreDom']; |
67 | 67 |
$scoreVis = get_magic_quotes_gpc() ? stripslashes($_POST['scoreVis']) : $_POST['scoreVis']; |
68 |
$fftDom = get_magic_quotes_gpc() ? stripslashes($_POST['fftDom']) : $_POST['fftDom']; |
|
69 |
$fftVis = get_magic_quotes_gpc() ? stripslashes($_POST['fftVis']) : $_POST['fftVis']; |
|
68 | 70 |
|
69 | 71 |
$message = ""; |
70 | 72 |
|
... | ... | |
199 | 201 |
$file = "$path/match-".$journee."-".$domicile."-".$visiteur; |
200 | 202 |
if (file_exists($file)) { |
201 | 203 |
$resu = file_get_contents($file); |
202 |
list($ptsDom, $ptsVis, $scoreDom, $scoreVis) = explode(":", $resu); |
|
204 |
list($ptsDom, $ptsVis, $scoreDom, $scoreVis, $fftDom, $fftVis) = explode(":", $resu); |
|
203 | 205 |
} |
204 | 206 |
break; |
205 | 207 |
case "validation_ajouter": |
... | ... | |
208 | 210 |
} else { |
209 | 211 |
$file = "$path/match-".$journee."-".$domicile."-".$visiteur; |
210 | 212 |
if (!file_exists($file)) { |
211 |
my_file_put_contents($file, $ptsDom.":".$ptsVis.":".$scoreDom.":".$scoreVis); |
|
213 |
my_file_put_contents($file, $ptsDom.":".$ptsVis.":".$scoreDom.":".$scoreVis.":".$fftDom.":".$fftVis); |
|
212 | 214 |
$message = "La nouvelle rencontre a été ajoutée."; |
213 | 215 |
} else { |
214 | 216 |
$message = "La rencontre existe déjà !"; |
... | ... | |
217 | 219 |
break; |
218 | 220 |
case "validation_modifier": |
219 | 221 |
$file = "$path/match-".$journee."-".$domicile."-".$visiteur; |
220 |
my_file_put_contents($file, $ptsDom.":".$ptsVis.":".$scoreDom.":".$scoreVis); |
|
222 |
my_file_put_contents($file, $ptsDom.":".$ptsVis.":".$scoreDom.":".$scoreVis.":".$fftDom.":".$fftVis); |
|
221 | 223 |
$message = "La rencontre a été mise à jour."; |
222 | 224 |
break; |
223 | 225 |
case "supprimer": |
... | ... | |
374 | 376 |
<form method="post" action="<?=$_SERVER['PHP_SELF']?>"> |
375 | 377 |
<table border="0"> |
376 | 378 |
<tr> |
377 |
<td colspan="3"> |
|
379 |
<td colspan="4"> |
|
378 | 380 |
<?php if ($rencontre == "ajouter") { ?> |
379 | 381 |
Journée<?=$_POST['typeCompetition'] != "" ? "/tour" : ""?> |
380 | 382 |
<select name="journee"> |
... | ... | |
410 | 412 |
</td> |
411 | 413 |
<td> points : <input type="text" name="ptsDom" size="3" value="<?=$ptsDom?>" /></td> |
412 | 414 |
<td> score : <input type="text" name="scoreDom" size="3" value="<?=$scoreDom?>" /></td> |
415 |
<td> |
|
416 |
<label for="fftDom">forfait :</label> |
|
417 |
<input type="checkbox" id="fftDom" name="fftDom"<?=$fftDom ? " checked" : ""?> /> |
|
418 |
</td> |
|
413 | 419 |
</tr> |
414 | 420 |
<tr> |
415 | 421 |
<td> |
... | ... | |
430 | 436 |
</td> |
431 | 437 |
<td> points : <input type="text" name="ptsVis" size="3" value="<?=$ptsVis?>" /></td> |
432 | 438 |
<td> score : <input type="text" name="scoreVis" size="3" value="<?=$scoreVis?>" /></td> |
439 |
<td> |
|
440 |
<label for="fftVis">forfait :</label> |
|
441 |
<input type="checkbox" id="fftVis" name="fftVis"<?=$fftVis ? " checked" : ""?> /> |
|
442 |
</td> |
|
433 | 443 |
</tr> |
434 | 444 |
</table> |
435 | 445 |
<?php hiddenVars() ?> |
b/index.php | ||
---|---|---|
22 | 22 |
$Vic = array(); // Nombre de victoires |
23 | 23 |
$Nul = array(); // Nombre de matchs nuls |
24 | 24 |
$Def = array(); // Nombre de défaites |
25 |
$Fft = array(); // Nombre de forfaits |
|
25 | 26 |
$Pen = array(); // Points de pénalités |
26 | 27 |
$PG = array(); // Somme des points gagnés |
27 | 28 |
$PP = array(); // Somme des points perdus |
... | ... | |
227 | 228 |
<?php } ?> |
228 | 229 |
<?php } |
229 | 230 |
if ($equipes) foreach ($equipes as $n => $e) { |
230 |
$Pts[$n] = $Joue[$n] = $Vic[$n] = $Nul[$n] = $Def[$n] = $PG[$n] = $PP[$n] = $Diff[$n] = $Rang[$n] = 0; |
|
231 |
$Pts[$n] = $Joue[$n] = $Vic[$n] = $Nul[$n] = $Def[$n] = $Fft[$n] = $PG[$n] = $PP[$n] = $Diff[$n] = $Rang[$n] = 0; |
|
231 | 232 |
} |
232 | 233 |
if ($rencontres) foreach ($rencontres as $j => $rencontre) { |
233 | 234 |
foreach ($rencontre as $r) { |
234 |
list($domicile, $visiteur, $ptsDom, $ptsVis, $scoreDom, $scoreVis) = explode(":", $r); |
|
235 |
list($domicile, $visiteur, $ptsDom, $ptsVis, $scoreDom, $scoreVis, $fftDom, $fftVis) = explode(":", $r); |
|
235 | 236 |
if ($ptsDom == "" || $ptsVis == "" || $scoreDom == "" || $scoreVis == "") continue; |
236 | 237 |
|
237 | 238 |
$Joue[$domicile]++; |
... | ... | |
243 | 244 |
$PG[$visiteur] += $ptsVis; |
244 | 245 |
$PP[$visiteur] += $ptsDom; |
245 | 246 |
|
247 |
if ($fftDom == "on") $Fft[$domicile]++; |
|
248 |
if ($fftVis == "on") $Fft[$visiteur]++; |
|
246 | 249 |
if ($scoreDom > $scoreVis) { |
247 | 250 |
$Vic[$domicile]++; |
248 |
$Def[$visiteur]++; |
|
251 |
if ($fftVis == "") $Def[$visiteur]++; |
|
249 | 252 |
} |
250 |
elseif ($ptsDom < $ptsVis) { |
|
251 |
$Def[$domicile]++; |
|
253 |
elseif ($scoreDom < $scoreVis) { |
|
254 |
if ($fftDom == "") $Def[$domicile]++; |
|
252 | 255 |
$Vic[$visiteur]++; |
253 | 256 |
} |
254 | 257 |
else { |
... | ... | |
274 | 277 |
<th class="colVic">Vic</th> |
275 | 278 |
<th class="colNul">Nul</th> |
276 | 279 |
<th class="colDef">Déf</th> |
280 |
<th class="colFft">Fft</th> |
|
277 | 281 |
<th class="colPen">Pén</th> |
278 | 282 |
<th class="colPG">PG</th> |
279 | 283 |
<th class="colPP">PP</th> |
... | ... | |
292 | 296 |
<td class="colVic"><?=($Vic[$equipe]) ? $Vic[$equipe] : "0"?></td> |
293 | 297 |
<td class="colNul"><?=($Nul[$equipe]) ? $Nul[$equipe] : "0"?></td> |
294 | 298 |
<td class="colDef"><?=($Def[$equipe]) ? $Def[$equipe] : "0"?></td> |
299 |
<td class="colFft"><?=($Fft[$equipe]) ? $Fft[$equipe] : "0"?></td> |
|
295 | 300 |
<td class="colPen"><?=($Pen[$equipe]) ? $Pen[$equipe] : "0"?></td> |
296 | 301 |
<td class="colPG"><?=($PG[$equipe]) ? $PG[$equipe] : "0"?></td> |
297 | 302 |
<td class="colPP"><?=($PP[$equipe]) ? $PP[$equipe] : "0"?></td> |
b/style/fftt.css | ||
---|---|---|
30 | 30 |
} |
31 | 31 |
|
32 | 32 |
th.smallCol, th.colClt, th.colPts, th.colJoue, |
33 |
th.colVic, th.colNul, th.colDef, th.colPen, |
|
33 |
th.colVic, th.colNul, th.colDef, th.colFft, th.colPen, |
|
34 | 34 |
th.colPG, th.colPP, th.colDiff { |
35 | 35 |
width: 30px; |
36 | 36 |
} |
Formats disponibles : Unified diff