* 0 = Le nom de l'objet * 1 = L'identifiant de la Categorie * 2 = L'identifiant de l'image associée * 3 = S'il est unique ou non * 4 = Le nombre en stock * 5 = Le nom de l'organisme * 6 = La date de fin de vente * 7 = Le prix * 8 = L'identifiant du prix */ $name_object = $myProposition[0]; $id_image = $myProposition[2]; $stock = $myProposition[4]; $name_fundation = $myProposition[5]; // Cf. function credit_format de header.inc.php $credit = credit_format($myProposition[7]); $id_price = $myProposition[8]; if ($myProposition[6]) { $date_end = date('d/m/y H:i', $myProposition[6]); } else { $date_end = ''; } echo '<tr class="' . (++$j % 2 ? 'pair' : 'impair') . '"><td style="text-align: center;">'; // Affichage de l'image include 'image.inc'; echo '</td> <td>' . $name_object . '</td> <td>' . $date_end . '</td> <td>'; // Cas où le stock n'est pas annoncé if ($stock == -1) {
if ($max >= 10) { echo '<a href="depart_sherlocks.php?qte=1000"><img src="images/10Euro.png" style="border: medium none ;" /></a>'; } if ($max >= 20) { echo '<a href="depart_sherlocks.php?qte=2000"><img src="images/20Euro.png" style="border: medium none ;" /></a>'; } if ($max >= 50) { echo '<a href="depart_sherlocks.php?qte=5000"><img src="images/50Euro.png" style="border: medium none ;" /></a>'; } ?> </p> <p> <form method="GET" action="depart_sherlocks.php" style="text-align:center;"> <label>Autre montant (max <?php echo credit_format($max); ?> ) : <br /><input type="text" name="qteman" value="10"/></label> <input type="submit" value="Recharger !" /> </form></p> <?php $page->modulefooter(); ?> <?php $page->msgInfo("Le montant de chaque compte est plafonné à 100 €.<br /><br />\r\nPour le rechargement par carte bancaire, tu seras redirigé vers le site sécurisé de notre partenaire financier, la LCL."); ?> </div>
Lieu </th> <th> Prix </th> </tr> </thead> <tbody> <?php $j = '0'; foreach ($histoAchats as $histoAchat) { echo '<tr class="odd"> <td>' . date('d/m/y H:i', $histoAchat[0]) . '</td> <td>' . $histoAchat[1] . '</td> <td>' . $histoAchat[4] . '</td> <td>' . credit_format($histoAchat[6]) . '</td>'; ?> </tr> <?php } } echo '</tbody></table>'; } ?> <p style="text-align: right; text-transform: uppercase; font-weight: bold; font-size: 0.8em;"> <a href="histo_purchase.php">Voir tout l'historique de mes achats</a> </p> <h3 style="margin-bottom:5px; text-align: center;">Mes rechargements des 5 derniers jours</h3> <?php $histoRechargesCSV = $SADMIN->getHistoriqueRecharge($fiveDayBefore, $today); if ($histoRechargesCSV == 400) {
</th> <th> Montant </th> </tr> </thead> <tbody> <?php $histoPurchases = str_getcsv_buckutt($csvPurchase, ','); $j = '0'; foreach ($histoPurchases as $i => $histoPurchase) { echo '<tr class="odd"> <td>' . $histoPurchase[0] . '</td>'; // Cf. function credit_format de header.inc.php echo '<td>' . $histoPurchase[2] . '</td>'; echo '<td>' . credit_format($histoPurchase[1]) . '</td>'; ?> </tr> <?php } ?> </tbody> </table> <?php } ?> <?php $page->modulefooter(); ?> </div>
* 3 = Le nom du l'objet * 4 = Le nom de groupe * 5 = Crédit */ echo '<tr class="' . (++$j % 2 ? 'pair' : 'impair') . '"> <td>' . $price[3] . '</td> <td>' . $price[4] . '</td> <td>' . credit_format($price[5]) . '</td>'; // Formulaire d'édition d'un prix echo '<td><form style="display:inline;" method="post" action="price.php?id_fundation=' . $id_fundation . '"> <input type="hidden" name="id" value="' . $price[0] . '" /> <input type="hidden" name="object" value="' . $price[1] . '" /> <input type="hidden" name="name_object" value="' . $price[3] . '" /> <input type="hidden" name="group" value="' . $price[2] . '" /> <input type="hidden" name="name_group" value="' . $price[4] . '" /> <input type="hidden" name="credit" value="' . credit_format($price[5]) . '" /> <input class="edit" type="submit" name="edit" title="Editer" value="" /> </form></td>'; // Formulaire de suppression d'un prix echo '<td><form style="display:inline;" method="post" action="price.php?id_fundation=' . $id_fundation . '"> <input type="hidden" name="id" value="' . $price[0] . '" /> <input class="delete" type="submit" name="delete" title="Supprimer" value="" /> </form></td> </tr>'; } } else { echo "Tu n'as enregistré aucun prix."; } echo '</table>'; $page->modulefooter(); ?>
if (is_numeric($_GET['qteman'])) { $_GET['qteman'] = intval($_GET['qteman'] * 100); if ($_GET['qteman'] <= $maxcredit - $credit) { echo "<p>Actuellement, tu as un crédit de " . credit_format($credit) . " sur ton compte.</p>\r\n <p>Tu souhaites effectuer un rechargement de " . credit_format($_GET['qteman']) . ".</p>\r\n <p>Ton solde sera donc de " . credit_format($credit + $_GET['qteman']) . ".</p><p><a href='reload.php'>Retour</a></p>"; $table = str_getcsv_buckutt($SBUY->transactionEncode($_GET['qteman']), ','); echo base64_decode($table[0][1]); } else { echo "<p>Le montant demandé dépasse le maximum autorisé.</p><p><a href='reload.php'>Retour</a></p>"; } } else { echo "<p>Ecris un nombre....</p><p><a href='reload.php'>Retour</a></p>"; } } elseif (isset($_GET['qte'])) { if ($_GET['qte'] == 500 or $_GET['qte'] == 1000 or $_GET['qte'] == 2000 or $_GET['qte'] == 3000 or $_GET['qte'] == 4000 or $_GET['qte'] == 5000) { $table = str_getcsv_buckutt($SBUY->transactionEncode($_GET['qte']), ','); echo "<p>Actuellement, tu as un crédit de " . credit_format($credit) . " sur ton compte.</p>\r\n <p>Tu souhaites effectuer un rechargement de " . credit_format($_GET['qte']) . ".</p><p>\r\n Ton solde sera donc de " . credit_format($credit + $_GET['qte']) . ".</p><p><a href='reload.php'>Retour</a></p>"; echo base64_decode($table[0][1]); } else { echo "<p>Montant invalide, petit rigolo :) !</p><p><a href='reload.php'>Retour</a><p>"; } } else { echo "<p>Hum, rien à voir ici !</p><p><a href='reload.php'>Retour</a><p>"; } ?> <?php $page->modulefooter(); ?> <?php $page->msgInfo("Pour le rechargement par carte bancaire, tu seras redirigé vers le site sécurisé de notre partenaire financier, la LCL."); ?> </div>
<th>Lieu</th> <th>Organisme</th> <th>Prix</th> </tr> <?php $histoVentes = str_getcsv_buckutt($histoVentesCSV, ','); $j = '0'; foreach ($histoVentes as $i => $histoVente) { echo '<tr class="' . (++$j % 2 ? 'pair' : 'impair') . '"> <td>' . date('d/m/y H:i', $histoVente[0]) . '</td> <td>' . $histoVente[1] . '</td> <td>' . $histoVente[2] . ' ' . $histoVente[3] . '</td> <td>' . $histoVente[5] . '</td> <td>' . $histoVente[6] . '</td>'; // Cf. function credit_format de header.inc.php echo '<td>' . credit_format($histoVente[4]) . '</td>'; ?> </tr> <?php } ?> </table> <?php } ?> <div style="text-align:center;margin-top:5px;float:left;"> <form style="display:inline;" method="post" action="history.php#ventes"> <input type="hidden" name="sale" id="next" value="3" /> <input type="submit" name="next" value="< <? echo ucfirst(strftime('%b %y', $date_start['sale'])) ?>" /> </form> </div>
Lieu </th> <th> Opérateur </th> </tr> </thead> <tbody> <?php $histoRecharges = str_getcsv_buckutt($histoRechargesCSV, ','); $j = '0'; foreach ($histoRecharges as $i => $histoRecharge) { echo '<tr class="odd"> <td>' . date('d/m/y H:i', $histoRecharge[0]) . '</td>'; // Cf. function credit_format de header.inc.php echo '<td>' . credit_format($histoRecharge[5]) . '</td> <td>' . $histoRecharge[1] . '</td> <td>' . $histoRecharge[4] . '</td> <td>' . $histoRecharge[2] . ' ' . $histoRecharge[3] . '</td>'; ?> </tr> <?php } ?> </tbody> </table> <?php } ?> <?php $page->modulefooter();