From e99b392130566fd08465e276806d53d78d38c17b Mon Sep 17 00:00:00 2001 From: "Pierre Habouzit (MadCoder" Date: Thu, 21 Apr 2005 16:15:43 +0000 Subject: [PATCH] telepaiement.php git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-584 --- htdocs.net/groupe/telepaiement.php | 31 +++++++++++++++++++++ templates/xnet/groupe/telepaiement.tpl | 51 ++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 htdocs.net/groupe/telepaiement.php create mode 100644 templates/xnet/groupe/telepaiement.tpl diff --git a/htdocs.net/groupe/telepaiement.php b/htdocs.net/groupe/telepaiement.php new file mode 100644 index 0000000..9410b73 --- /dev/null +++ b/htdocs.net/groupe/telepaiement.php @@ -0,0 +1,31 @@ +setType($globals->asso('cat')); +$page->useMenu(); +$page->assign('asso', $globals->asso()); + +$res = $globals->xdb->query("SELECT id, text FROM {$globals->money->mpay_tprefix}paiements WHERE asso_id = {?}", $globals->asso('id')); +$tit = $res->fetchAllAssoc(); +$page->assign('titres', $tit); + +if (may_update()) { + $trans = array(); + foreach($tit as $foo) { + $pid = $foo['id']; + $res = $globals->xdb->query( + "SELECT u.nom, u.prenom, u.promo, a.alias, timestamp, montant + FROM {$globals->money->mpay_tprefix}transactions AS t + INNER JOIN auth_user_md5 AS u ON ( t.uid = u.user_id ) + INNER JOIN aliases AS a ON ( t.uid = a.id AND a.type='a_vie' ) + WHERE ref = {?} + ORDER BY timestamp DESC", $id); + $trans[$pid] = $res->fetchAllAssoc(); + } + $page->assign('trans', $trans); +} + +$page->run(); +?> diff --git a/templates/xnet/groupe/telepaiement.tpl b/templates/xnet/groupe/telepaiement.tpl new file mode 100644 index 0000000..702420f --- /dev/null +++ b/templates/xnet/groupe/telepaiement.tpl @@ -0,0 +1,51 @@ +{*************************************************************************** + * Copyright (C) 2003-2004 Polytechnique.org * + * http://opensource.polytechnique.org/ * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * + ***************************************************************************} + +

{$asso.nom} : Gestion des télépaiements

+ +

+Voici la liste des paiements en ligne possible pour le groupe {$asso.nom} +

+ +{foreach from=$pitres item=t} +{$p.text} +{if $trans[$p.id]} + + + + + + {foreach from=$trans[$p.id] item=p} + + + + {/foreach} + +{/if} +{foreachelse} +

+Pas de micropaiement en cours ... +

+{/foreach} + +{* vim:set et sw=2 sts=2 sws=2: *} -- 2.1.4
{$p.text} : détails pour les administrateur
{$p.date|date_format} + {$p.nom} {$p.prenom} (X{$promo}) + (mail) + {$p.montant}