1<?php 2/* Copyright (C) 2014-2018 Frederic France <frederic.france@netlogic.fr> 3 * Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 3 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program. If not, see <https://www.gnu.org/licenses/>. 17 */ 18 19/** 20 * \file htdocs/printing/index.php 21 * \ingroup printing 22 * \brief Printing 23 */ 24 25require '../main.inc.php'; 26include_once DOL_DOCUMENT_ROOT.'/core/modules/printing/modules_printing.php'; 27 28// Load translation files required by the page 29$langs->load("printing"); 30 31 32/* 33 * Actions 34 */ 35 36// None 37 38 39/* 40 * View 41 */ 42 43llxHeader("", $langs->trans("Printing")); 44 45print_barre_liste($langs->trans("Printing"), 0, $_SERVER["PHP_SELF"], '', '', '', '<a class="button" href="'.$_SERVER["PHP_SELF"].'">'.$langs->trans("Refresh").'</a>', 0, 0, 'title_setup.png'); 46 47print $langs->trans("DirectPrintingJobsDesc").'<br><br>'; 48 49// List Jobs from printing modules 50$object = new PrintingDriver($db); 51$result = $object->listDrivers($db, 10); 52foreach ($result as $driver) { 53 require_once DOL_DOCUMENT_ROOT.'/core/modules/printing/'.$driver.'.modules.php'; 54 $classname = 'printing_'.$driver; 55 $langs->load($driver); 56 $printer = new $classname($db); 57 if ($conf->global->{$printer->active}) { 58 //$printer->listJobs('commande'); 59 $result = $printer->listJobs(); 60 print $printer->resprint; 61 62 if ($result > 0) { 63 setEventMessages($printer->error, $printer->errors, 'errors'); 64 } 65 } 66} 67 68// End of page 69llxFooter(); 70$db->close(); 71