| 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
 
 |  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>La liste des gagnants</title>
<link rel="stylesheet" media="screen" href="asset/liste.css"/> 
<link rel="shortcut icon" type="image/x-icon" href="../locked.png" />
<script src="js/sorttable.js"></script>
</head>
<?php
$PARAM_hote='localhost'; // le chemin vers le serveur
$PARAM_nom_bd=bd; // le nom de votre base de données
$PARAM_utilisateur='root'; // nom d'utilisateur pour se connecter
$PARAM_mot_passe='';
 
$connexion = new PDO("mysql:host=$PARAM_hote;dbname=$PARAM_nom_bd", $PARAM_utilisateur, $PARAM_mot_passe); // connexion à la BDD
 
$resultats= $connexion->query("SELECT us.name, us.email, wr.amount, pr.prod_name, wr.status, wr.id, wr.uid FROM users AS us JOIN wk78y_auction_wins AS wr ON us.id = wr.uid JOIN auction_products AS pr ON wr.prod_id = pr.id");
$resultats->setFetchMode(PDO::FETCH_OBJ); // on dit qu'on veut que le résultat soit récupérable sous forme d'objet
 
	 echo "<table width='900' cellpadding='2' align= 'center' cellspacing='2' id='div_chck' class='sortable'>";
	 echo "<tr>
		<th width='400' align='center'>ID</th>	
<th width='400' align='center'>Nom</th>
			<th width='400' align='center'>Email</th>
			<th width='400' align='center'>Produit</th>
			<th width='400' align='center'>Montant</th>
			<th width='400' align='center'>StatutPaiement</th>
			<th width='400' align='center'>Date de Paiement</th>
			<th width='400' align='center'>Numero d'article</th>
			<th width='400' align='center'>Identifiant </th>
			
			<th width='400' align='center'>Modifier</th>
		</tr>";
	$count=0;	
	while( $winner = $resultats->fetch() ) // on récupère la liste des winners
	{
		$flag=$winner->status;
			if($flag=='1'){
				$winner->status='Transaction terminée';}
			else{
				$winner->status = 'En Attente';
				}
				echo "<tr>
<th width='400' align='center'>".$count."</th>
						<th width='400' align='center'>".$winner->name."</th>
						<th width='400' align='center'>".$winner->email."</th>
						<th width='400' align='center'>".$winner->prod_name."</th>
						<th width='400' align='center'>".$winner->amount."</th>
						<th width='400' align='center'>".$winner->status."</th>
						<th width='400' align='center'>null</th>
						<th width='400' align='center'>".$winner->id."</th>
						<th width='400' align='center'>".$winner->uid."</th>
						<th align='center'><input type='checkbox' name=selection[] value=$id></th>
					</tr>";
	}
	echo "</table>"; // fini ton tableau 
	echo"<td><input class='bout' align='center' type='submit' name='action' value='Editer'/></td>";
	$resultats->closeCursor(); // on ferme le curseur des résultats
 
 ?>
	<div id="pied_de_page"></div>
</body>
</html> | 
Partager