dolibarr  13.0.2
index.php
Go to the documentation of this file.
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 
25 require '../main.inc.php';
26 include_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 
43 llxHeader("", $langs->trans("Printing"));
44 
45 print_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 
47 print $langs->trans("DirectPrintingJobsDesc").'<br><br>';
48 
49 // List Jobs from printing modules
50 $object = new PrintingDriver($db);
51 $result = $object->listDrivers($db, 10);
52 foreach ($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
69 llxFooter();
70 $db->close();
Parent class of emailing target selectors modules.
llxHeader()
Empty header.
Definition: wrapper.php:45
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
print_barre_liste($titre, $page, $file, $options= '', $sortfield= '', $sortorder= '', $morehtmlcenter= '', $num=-1, $totalnboflines= '', $picto= 'generic', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limit=-1, $hideselectlimit=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow= '')
Print a title with navigation controls for pagination.
print $_SERVER["PHP_SELF"]
Edit parameters.
print
Draft customers invoices.
Definition: index.php:89
llxFooter()
Empty footer.
Definition: wrapper.php:59