dolibarr 20.0.0
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// Load Dolibarr environment
26require '../main.inc.php';
27include_once DOL_DOCUMENT_ROOT.'/core/modules/printing/modules_printing.php';
28
29// Load translation files required by the page
30$langs->load("printing");
31
32if (!$user->admin) {
34}
35
36
37/*
38 * Actions
39 */
40
41// None
42
43
44/*
45 * View
46 */
47
48llxHeader("", $langs->trans("Printing"));
49
50print_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');
51
52print $langs->trans("DirectPrintingJobsDesc").'<br><br>';
53
54// List Jobs from printing modules
55$object = new PrintingDriver($db);
56$result = $object->listDrivers($db, 10);
57foreach ($result as $driver) {
58 require_once DOL_DOCUMENT_ROOT.'/core/modules/printing/'.$driver.'.modules.php';
59 $classname = 'printing_'.$driver;
60 $langs->load($driver);
61 $printer = new $classname($db);
62 $keyforprinteractive = $printer->active;
63 if ($keyforprinteractive && getDolGlobalString($keyforprinteractive)) {
64 //$printer->listJobs('commande');
65 $result = $printer->listJobs();
66 print $printer->resprint;
67
68 if ($result > 0) {
69 setEventMessages($printer->error, $printer->errors, 'errors');
70 }
71 }
72}
73
74// End of page
75llxFooter();
76$db->close();
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:58
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Definition wrapper.php:55
llxFooter()
Empty footer.
Definition wrapper.php:69
Parent class of emailing target selectors modules.
print_barre_liste($title, $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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.