dolibarr/htdocs/compta/bank/bplc.php

103 lines
2.8 KiB
PHP
Raw Normal View History

<?php
2002-12-23 17:15:48 +01:00
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
2002-12-23 17:15:48 +01:00
*
* 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.
*
* $Id$
* $Source$
*/
2003-09-11 22:18:51 +02:00
require("./pre.inc.php");
require("./bank.lib.php");
2002-12-23 17:15:48 +01:00
$user->getrights('compta');
if (!$user->admin && !$user->rights->compta->bank)
accessforbidden();
2002-12-23 17:15:48 +01:00
llxHeader();
if ($page == -1) { $page = 0 ; }
$offset = $conf->liste_limit * $page ;
$pageprev = $page - 1;
$pagenext = $page + 1;
2004-07-30 15:13:05 +02:00
print_barre_liste("Transactions BPLC", $page, "bplc.php");
2002-12-23 17:15:48 +01:00
print "<table class=\"noborder\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">";
print "<tr class=\"liste_titre\">";
2002-12-28 15:57:29 +01:00
print "<td>R<>f. commande</td>";
print "<td>ip client</td><td>Num. transaction</td><td>Date</td><td>Heure</td>";
2002-12-23 17:15:48 +01:00
print "<td>Num autorisation</td>";
print "<td>cl<63> acceptation</td>";
print "<td>code retour</td>";
print "</tr>\n";
2002-12-23 17:15:48 +01:00
$sql = "SELECT ipclient,
num_transaction,
date_transaction,
heure_transaction,
num_autorisation,
cle_acceptation,
code_retour,
ref_commande";
$sql .= " FROM ".MAIN_DB_PREFIX."transaction_bplc";
2002-12-23 17:15:48 +01:00
$result = $db->query($sql);
if ($result) {
$var=True;
$num = $db->num_rows();
$i = 0; $total = 0;
$sep = 0;
while ($i < $num) {
$objp = $db->fetch_object($result);
2002-12-23 17:15:48 +01:00
2003-09-13 15:39:12 +02:00
print "<tr $bc[1]>";
2002-12-28 15:57:29 +01:00
$type = substr($objp->ref_commande, strlen($objp->ref_commande) - 2 );
$id = substr($objp->ref_commande, 0 , strlen($objp->ref_commande) - 2 );
if ($type == 10)
{
print '<td><a href="../dons/fiche.php?rowid='.$id.'&action=edit">'.$objp->ref_commande.'</a></td>';
}
2002-12-23 17:15:48 +01:00
print "<td>$objp->ipclient</td>";
print "<td>$objp->num_transaction</td>";
print "<td>$objp->date_transaction</td>";
print "<td>$objp->heure_transaction</td>";
print "<td>$objp->num_autorisation</td>";
print "<td>$objp->cle_acceptation</td>";
print "<td>$objp->code_retour</td>";
2002-12-28 15:57:29 +01:00
2002-12-23 17:15:48 +01:00
$i++;
}
$db->free();
}
print "</table>";
$db->close();
llxFooter(strftime("%H:%M",time()). " - <em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>");
?>