* Copyright (C) 2004 Laurent Destailleur * * 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$ * */ require("./pre.inc.php"); /* * Sécurité accés */ if (!$user->admin && $user->societe_id > 0) accessforbidden(); $year = $_GET["year"]; require("../../includes/modules/rapport/pdf_paiement.class.php"); $dir = DOL_DOCUMENT_ROOT."/document/rapport/"; if ($_POST["action"] == 'gen') { $rap = new pdf_paiement($db); $rap->write_pdf_file($dir, $_POST["remonth"], $_POST["reyear"]); $year = $_POST["reyear"]; } llxHeader(); /* * * */ print_titre("Rapport paiements (EN COURS DE DEVELOPPEMENT)"); print '
'; print ''; $cmonth = date("n", time()); $syear = date("Y", time()); $strmonth[1] = "Janvier"; $strmonth[2] = "Février"; $strmonth[3] = "Mars"; $strmonth[4] = "Avril"; $strmonth[5] = "Mai"; $strmonth[6] = "Juin"; $strmonth[7] = "Juillet"; $strmonth[8] = "Août"; $strmonth[9] = "Septembre"; $strmonth[10] = "Octobre"; $strmonth[11] = "Novembre"; $strmonth[12] = "Décembre"; print '"; print '\n"; print ''; print '
'; clearstatcache(); $handle=opendir($dir); while (($file = readdir($handle))!==false) { if (is_dir($dir.$file) && substr($file, 0, 1) <> '.') { print ''.$file.' '; } } if ($year) { $handle=opendir($dir.'/'.$year); print ''; print ''; while (($file = readdir($handle))!==false) { if (substr($file, 0, 8) == 'paiement') { $tfile = $dir . '/'.$year.'/'.$file; print ''; print ''; print ''; } } print '
RapportTailleDate de génération
'.$file.''.filesize($tfile). ' bytes'.strftime("%d %b %Y %H:%M:%S",filemtime($tfile)).'
'; } $db->close(); llxFooter("Dernière modification $Date$ révision $Revision$"); ?>