*
* 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$
*
*******************************************************************************/
/* $num
* $rel
* $ve
*/
require("./pre.inc.php3");
llxHeader();
$db = new Db();
if (! $num) {
/*
*
* Vue liste
*
*
*/
print "Releves bancaires";
print '
';
print "";
print "| Date | ";
print "
\n";
$sql = "SELECT distinct(b.num_releve) as numr";
$sql .= " FROM llx_bank as b WHERE fk_account = $account ORDER BY numr DESC";
$result = $db->query($sql);
if ($result) {
$var=True;
$numrows = $db->num_rows();
$i = 0;
while ($i < $numrows) {
$objp = $db->fetch_object( $i);
$var=!$var;
print "| numr&account=$account\">$objp->numr |
\n";
$i++;
}
}
print "
";
} else {
/*
* Vue d'un releves
*
*/
if ($rel == 'prev') {
$sql = "SELECT distinct(num_releve) FROM llx_bank WHERE num_releve < $num AND fk_account = $account ORDER BY num_releve DESC";
$result = $db->query($sql);
if ($result) {
$var=True;
$numrows = $db->num_rows();
$i = 0;
if ($numrows > 0) {
$row = $db->fetch_row(0);
$num = $row[0];
}
}
} elseif ($rel == 'next') {
$sql = "SELECT distinct(num_releve) FROM llx_bank WHERE num_releve > $num AND fk_account = $account ORDER BY num_releve ASC";
$result = $db->query($sql);
if ($result) {
$var=True;
$numrows = $db->num_rows();
$i = 0;
if ($numrows > 0) {
$row = $db->fetch_row(0);
$num = $row[0];
}
}
}
print "";
print "";
print "Edit Categories";
print " Categories";
}
$db->close();
llxFooter("Dernière modification $Date$ révision $Revision$");
?>