From: Pascal Corpet Date: Fri, 10 Jun 2005 13:44:41 +0000 (+0000) Subject: affichage de l'historique de ses propres paiements pour chaque transaction X-Git-Tag: xorg/old~70 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=ad604259fcb48b9c38f511c9164a1ba27582a329;p=platal.git affichage de l'historique de ses propres paiements pour chaque transaction git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-694 --- diff --git a/htdocs/paiement/index.php b/htdocs/paiement/index.php index 7186aec..0d1c1cb 100644 --- a/htdocs/paiement/index.php +++ b/htdocs/paiement/index.php @@ -42,6 +42,10 @@ if (($e = $pay->check($val)) !== true) { if ($op=='submit') { $pay->init($val, $meth); $pay->prepareform($pay); +} else { + $res = $globals->xdb->iterator("SELECT timestamp, montant FROM paiement.transactions WHERE uid = {?} AND ref = {?} ORDER BY timestamp DESC", Session::getInt('uid', -1), Env::getInt('ref', -1)); + + if ($res->total()) $page->assign('transactions', $res); } $page->assign('montant',$val); diff --git a/templates/paiement/index.tpl b/templates/paiement/index.tpl index ece1d40..42e1a82 100644 --- a/templates/paiement/index.tpl +++ b/templates/paiement/index.tpl @@ -124,6 +124,19 @@ recevras une confirmation par email. +{if $transactions} +

Tu as déjà effecuté des paiements pour cette transaction :

+ + +{iterate from=$transactions item=t} + + + + +{/iterate} +
DateMontant
{$t.timestamp|date_format}{$t.montant}
+{/if} + {/if}