-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmy_phase_pointage.php
More file actions
66 lines (59 loc) · 1.7 KB
/
Copy pathmy_phase_pointage.php
File metadata and controls
66 lines (59 loc) · 1.7 KB
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
<?php
function statut_present_absent ($statut)
{
$r = 'Erreur';
switch($statut)
{
case 'F':
$r = 'absent';
break;
case 'Q':
case 'N':
case 'A':
$r = 'présent';
break;
case 'E':
$r = 'exclu';
break;
}
return $r;
}
function ordonneListeParticipants ( $tireurs)
{
$order = array();
foreach ($tireurs as $ref=>$val)
{
$order[$ref] = $val['ACCU']['Nom'] . ' ' . $val['ACCU']['Prenom'] . ' ' . $val['ACCU']['Club'] ;
}
asort($order);
return array_keys($order);
}
function afficheListeParticipants( $xml )
{
$tireurs = suitTireurs ( $xml );
$ordre = ordonneListeParticipants ( $tireurs);
$head = "";
// $head .= ($ncol==1)?"<div class='tblhd'>\n<div></div>\n":"<div class='tblhd_multicol'>\n";
$head .= "<table id='head' class='listeTireur'>\n";
$r = "<table class='lst_nom'>";
foreach ($ordre as $ref)
{
$r .= "<tr><td class='inscription_nom'>";
$nom = $tireurs[$ref]['ACCU']['Nom'] . ' ' . $tireurs[$ref]['ACCU']['Prenom'];
$nat = $tireurs[$ref]['ACCU']['Nation'];
$ran = $tireurs[$ref]['ACCU']['Ranking'];
$clu = $tireurs[$ref]['ACCU']['Club'];
$pre = statut_present_absent ($tireurs[$ref]['ACCU']['St']);
$r .= ' '.flag_icon($nat,'small').' ';
$r .= $ran . ' ';
$r .= (strlen($nom)>30)?fractureNom($nom):$nom;
$r .= "</td>";
$r .= "<td class='inscription_status'> $pre </td>";
$r .= "<td class='inscription_rank'> $ran </td>";
$r .= "<td class='inscription_club'> $clu </td>";
$r .= "</tr>\n";
}
$r .= "/<table>";
return $r;
}
?>