From e99b599c6715deeabed228bea97540f183fde010 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 1 Aug 2005 08:48:59 +0000 Subject: [PATCH] =?UTF-8?q?Visualisation=20du=20graph=20du=20mois=20pr=E9c?= =?UTF-8?q?=E9dent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/bank/graph.php | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index ca16e33a21c..4635b1318f7 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -1,8 +1,5 @@ - * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2004 Laurent Destailleur - * Copytight (C) 2004 Christophe Combelles +/* Copyright (C) 2005 Rodolphe Quiedeville * * 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 @@ -41,7 +38,10 @@ $account = $_GET["id"]; if ($account > 0) { - + $datetime = time(); + $month = strftime("%m", $datetime); + $year = strftime("%Y", $datetime); + $acct = new Account($db); $acct->fetch($account); @@ -51,7 +51,25 @@ if ($account > 0) print ''; - $file = "solde.$account.png"; + $file = "solde.$account.$year.$month.png"; + + print ''; + + print ''; + + if ($month == 1) + { + $monthprev = "12"; + $yearprev = $year - 1; + } + else + { + $monthprev = substr("00".($month - 1), -2) ; + $yearprev = $year ; + } + + + $file = "solde.$account.$yearprev.$monthprev.png"; print '';