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
|
<th><a class='ath' href=ListeAgentAdmin.php?choix=Nom>Nom</a></th>
<th><a class='ath' href=ListeAgentAdmin.php?choix=Prenom>Prénom</a></th>
<th><a class='ath' href=ListeAgentAdmin.php?choix=CodeAlliance>Code Alliance</a></th>
<th><a class='ath' href=ListeAgentAdmin.php?choix=Entite>Entité</a></th>
$tri=isset($_GET["choix"])?$_GET["choix"]:"Nom";
//$tri="Nom";
if (isset($_POST["choix"]))
$tri=$_POST["choix"];
$req = "SELECT agents.IdAgent, agents.Nom, agents.Prenom, agents.CodeAlliance, entites.Entite FROM agents, entites WHERE agents.IdEntite=entites.IdEntite ";
$req .="ORDER BY '".$tri."'";
$res = mysql_query($req);
while ($ligne = mysql_fetch_array($res))
{
echo "<tr valign='top' class='TDDonnees' onmouseover=\"setPointer('over', this, '#FFFFFF', '', '', '')\" onmouseout=\"setPointer('out', this, '#f5f5f5', '', '', '')\">
<td >".$ligne['Nom']."</td>
<td >".$ligne['Prenom']."</td>
<td >".$ligne['CodeAlliance']."</td>
<td>".$ligne['Entite']."</td>
<td ><a href=\"ModifAgent.php?IdAgent=".$temp2['IdAgent']."\">[Modifier]</a></td>
<td ><a href=\"ValidSuppAgent.php?IdAgent=".$temp2['IdAgent']."\">[Supprimer]</a></td>
</tr>";
} |
Partager