31if ($action ==
'print_file' && $user->rights->printing->read) {
32 $langs->load(
"printing");
33 require_once DOL_DOCUMENT_ROOT.
'/core/modules/printing/modules_printing.php';
35 $list = $objectprint->listDrivers($db, 10);
36 $dirmodels = array_merge(array(
'/core/modules/printing/'), (array) $conf->modules_parts[
'printing']);
40 foreach ($list as $driver) {
41 foreach ($dirmodels as $dir) {
42 if (file_exists(
dol_buildpath($dir, 0).$driver.
'.modules.php')) {
47 require_once $classfile;
48 $classname =
'printing_'.$driver;
49 $printer =
new $classname($db);
50 $langs->load($printer::LANGFILE);
53 if (!empty($conf->global->{$printer->active})) {
57 $module =
GETPOST(
'printer',
'alpha');
61 $module =
'expedition';
66 case 'commande_fournisseur':
67 $module =
'fournisseur';
72 $ret = $printer->printFile(
GETPOST(
'file',
'alpha'), $module, $subdir);
80 setEventMessages($langs->transnoentitiesnoconv(
"FileWasSentToPrinter", basename(
GETPOST(
'file',
'alpha'))).
' '.$langs->transnoentitiesnoconv(
"ViaModule").
' '.$printer->name,
null);
88 if ($printerfound == 0) {
89 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.