32if ($action ==
'print_file' && $user->hasRight(
'printing',
'read')) {
33 $langs->load(
"printing");
34 require_once DOL_DOCUMENT_ROOT.
'/core/modules/printing/modules_printing.php';
36 $list = $objectprint->listDrivers($db, 10);
37 $dirmodels = array_merge(array(
'/core/modules/printing/'), (array) $conf->modules_parts[
'printing']);
41 foreach ($list as $driver) {
42 foreach ($dirmodels as $dir) {
43 if (file_exists(
dol_buildpath($dir, 0).$driver.
'.modules.php')) {
48 require_once $classfile;
49 $classname =
'printing_'.$driver;
50 $printer =
new $classname($db);
51 '@phan-var-force PrintingDriver $printer';
52 $langs->load(
'printing');
59 $module =
GETPOST(
'printer',
'alpha');
63 $module =
'expedition';
68 case 'commande_fournisseur':
69 $module =
'fournisseur';
74 $ret = $printer->printFile(
GETPOST(
'file',
'alpha'), $module, $subdir);
82 setEventMessages($langs->transnoentitiesnoconv(
"FileWasSentToPrinter", basename(
GETPOST(
'file',
'alpha'))).
' '.$langs->transnoentitiesnoconv(
"ViaModule").
' '.$printer->name,
null);
90 if ($printerfound == 0) {
91 setEventMessages($langs->trans(
"NoActivePrintingModuleFound", $langs->transnoentities(
"Module64000Name")),
null,
'warnings');
Parent class of emailing target selectors modules.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.