<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Cache-Control: no-cache, must-revalidate'); header('Pragma: no-cache');  include("fotoweb46.php"); include("fotoweb19.php");  if (isset($_GET['filter'])) {  if ($_GET['filter']=="derniereConnexion") { if ($_GET['oldfilter']=="derniereConnexion DESC") $filter='derniereConnexion ASC'; else $filter='derniereConnexion DESC'; }  if ( $_GET['filter']=="nom") { if ($_GET['oldfilter']=="nom DESC") $filter='nom ASC'; else $filter='nom DESC'; }  if ($_GET['filter']=="nbConnexion") { if ($_GET['oldfilter']=="nbConnexion DESC") $filter='nbConnexion ASC'; else $filter='nbConnexion DESC'; } }else $filter='derniereConnexion DESC';   $querySelect = "SELECT nom,nbConnexion,derniereConnexion FROM participants ORDER BY $filter"; $resultSelect = mysql_query ($querySelect) or die ("La requête de sélection des participants a échoué"); echo "<html>"; echo "<head>"; echo "	<link rel='stylesheet' href='../ergonomie/style.css'>"; echo "	<script language='javascript' src='script/scriptadmin.js'></script>"; echo "</head>"; echo "<body>"; echo "<form id='formAdmin'>"; echo "<table width='55%' border='1' align='center' cellpadding='5'>"; echo "	<tr>"; echo "		<td width='35%' class='valeur' align='center'>"; echo "		<a href='fotoweb22.php?filter=nom&oldfilter=".$filter."' class='valeur'  target='basAdmin'>Nom</a>"; echo "		</td>"; echo "		<td width='35%' class='valeur' align='center'>"; echo "		<a href='fotoweb22.php?filter=nbConnexion&oldfilter=".$filter."' class='valeur'  target='basAdmin'>Nombre de connexions</a>"; echo "		</td>"; echo "		<td width='35%' class='valeur' align='center'>"; echo "		<a href='fotoweb22.php?filter=derniereConnexion&oldfilter=".$filter."' class='valeur'  target='basAdmin'>Dernière connexion</a>"; echo "		</td>"; echo "	</tr>"; echo "	<tr>"; $totalConnexion = 0; while ($line = mysql_fetch_row($resultSelect)) { $nom = $line[0];  if ( ($nom != getValeurIni("loginAdministrateur")) && ($nom != getValeurIni("monLogin")) ) { $nbConnexion = $line[1]; $derniereConnexion = $line[2]; $totalConnexion += $nbConnexion;  echo "<tr>"; echo 	"<td class='libelle'>".$nom."</td>"; echo 	"<td class='data' align='center'>".$nbConnexion."</td>"; echo 	"<td class='data' align='center'>".formatterDateTimeFromBase($line[2])."</td>"; echo "</tr>"; } } /* Free resultset */ mysql_free_result($resultSelect); echo "<br><br><br>"; echo "</table>"; echo "<table width='55%' border='0' align='center' cellpadding='5'>"; echo 	"<tr>"; echo 		"<td width='30%' class='libelle' align='center'>Total connexions :</td>"; echo 		"<td width='35%' class='data' align='center'>".$totalConnexion."</td>"; print			"<td width='35%'>&nbsp;</td>"; echo 	"</tr>"; echo "</table>"; ?> </body> </form> </html> 