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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
| <table width="100%">
<tr style="height: 16px" align="center">
<td bgcolor="#cccccc">
<font class="font_p" color="#5d8eb3">
<b>
#
</b>
</font>
</td>
<td bgcolor="#cccccc">
<font class="font_p" color="#5d8eb3">
<b>
image
</b>
</font>
</td>
<td bgcolor="#cccccc">
<font class="font_p" color="#5d8eb3">
<b>
nom_du_jeu
</b>
</font>
</td>
<td bgcolor="#cccccc">
<font class="font_p" color="#5d8eb3">
<b>
date_sortie
</b>
</font>
</td>
<td bgcolor="#cccccc">
<font class="font_p" color="#5d8eb3">
<b>
nbr de joueurs
</b>
</font>
</td>
<td bgcolor="#cccccc">
<font class="font_p" color="#5d8eb3">
<b>
prix
</b>
</font>
</td>
<td bgcolor="#cccccc">
<font class="font_p" color="#5d8eb3">
<b>
quant dispo
</b>
</font>
</td>
<td bgcolor="#cccccc">
<font class="font_p" color="#5d8eb3">
<b>
acheter
</b>
</font>
</td>
</tr>
<!------------------------------------------------------------------------------------------------------------------------------------>
<!-- fin de l'entete de notre tableau -->
<!------------------------------------------------------------------------------------------------------------------------------------>
<?php
//<!------------------------------------------------------------------------------------------------------------------------------------>
//<!-- on compte le nombre de lignes dans le fichier texte -->
//<!------------------------------------------------------------------------------------------------------------------------------------>
$nb_elements = count($data);
$nb_lignes= $nb_elements;
//<!------------------------------------------------------------------------------------------------------------------------------------>
//<!-- on ouvre une boucle 'for' qui tournera autant de fois qu'il y a de lignes dans le fichier texte -->
//<!------------------------------------------------------------------------------------------------------------------------------------>
for ($i = 0; $i < $nb_lignes; $i ++)
{
//<!------------------------------------------------------------------------------------------------------------------------------------>
// <!-- Définition de la position à afficher -->
//<!------------------------------------------------------------------------------------------------------------------------------------>
?>
<!------------------------------------------------------------------------------------------------------------------------------------>
<!-- on affiche les infos des jeux dans chaque ligne du tableau-->
<!------------------------------------------------------------------------------------------------------------------------------------>
<tr style="height: 16px" align="center" bgcolor="#dddddd">
<td>
<?php
echo
isset($data[$i]['id']) ?
$data[$i]['id'] : ''
;
?>
</td>
<td>
<?php
echo
isset($data[$i]['image']) ?
"<img src=\" ".$data[$i]['image']."\">" : ''
;
?>
</td>
<td>
<?php
echo
isset($data[$i]['nom_du_jeu']) ?
$data[$i]['nom_du_jeu'] : ''
;
?>
</td>
<td>
<?php
echo
isset($data[$i]['date_sortie']) ?
$data[$i]['date_sortie'] : ''
;
?>
</td>
<td>
<?php
echo
isset($data[$i]['nbr de joueurs']) ?
$data[$i]['nbr de joueurs'] : ''
;
?>
</td>
<td>
<?php
echo
isset($data[$i]['prix']) ?
$data[$i]['prix'] : ''
;
?>
</td>
<td>
<?php
echo
isset($data[$i]['quantite']) ?
$data[$i]['quantite'] : ''
;
?>
</td>
<td>
<?php
echo
"<a href='../achat/panier.php?action=ajout&l=$data[$i]['nom_du_jeu']&q=$data[$i]['quantite']&p=$data[$i]['prix']' onclick='window.open(this.href, '',
'toolbar=no, location=no, directories=no, status=yes, scrollbars=yes, resizable=yes, copyhistory=no, width=600, height=350'); return false;'>Ajouter au panier</a>"
;
?>
</td>
</tr>
<?php
}
//<!------------------------------------------------------------------------------------------------------------------------------------>
// <!-- Fin de la boucle for -->
//<!------------------------------------------------------------------------------------------------------------------------------------>
?>
</table> |
Partager