dolibarr  16.0.5
printsheet.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
4  * Copyright (C) 2006-2017 Laurent Destailleur <eldy@users.sourceforge.net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <https://www.gnu.org/licenses/>.
18  */
19 
26 if (!empty($_POST['mode']) && $_POST['mode'] === 'label') { // Page is called to build a PDF and output, we must not renew the token.
27  if (!defined('NOTOKENRENEWAL')) {
28  define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on)
29  }
30 }
31 
32 require '../main.inc.php';
33 require_once DOL_DOCUMENT_ROOT.'/core/lib/format_cards.lib.php';
34 require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
35 require_once DOL_DOCUMENT_ROOT.'/core/modules/printsheet/modules_labels.php';
36 require_once DOL_DOCUMENT_ROOT.'/core/class/genericobject.class.php';
37 
38 // Load translation files required by the page
39 $langs->loadLangs(array('admin', 'members', 'errors'));
40 
41 // Choice of print year or current year.
42 $now = dol_now();
43 $year = dol_print_date($now, '%Y');
44 $month = dol_print_date($now, '%m');
45 $day = dol_print_date($now, '%d');
46 $forbarcode = GETPOST('forbarcode', 'alphanohtml');
47 $fk_barcode_type = GETPOST('fk_barcode_type', 'int');
48 $mode = GETPOST('mode', 'aZ09');
49 $modellabel = GETPOST("modellabel", 'aZ09'); // Doc template to use
50 $numberofsticker = GETPOST('numberofsticker', 'int');
51 
52 $mesg = '';
53 
54 $action = GETPOST('action', 'aZ09');
55 
56 $producttmp = new Product($db);
57 $thirdpartytmp = new Societe($db);
58 
59 
60 /*
61  * Actions
62  */
63 
64 if (GETPOST('submitproduct') && GETPOST('submitproduct')) {
65  $action = ''; // We reset because we don't want to build doc
66  if (GETPOST('productid', 'int') > 0) {
67  $result = $producttmp->fetch(GETPOST('productid', 'int'));
68  if ($result < 0) {
69  setEventMessage($producttmp->error, 'errors');
70  }
71  $forbarcode = $producttmp->barcode;
72  $fk_barcode_type = $producttmp->barcode_type;
73 
74  if (empty($fk_barcode_type) && !empty($conf->global->PRODUIT_DEFAULT_BARCODE_TYPE)) {
75  $fk_barcode_type = $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE;
76  }
77 
78  if (empty($forbarcode) || empty($fk_barcode_type)) {
79  setEventMessages($langs->trans("DefinitionOfBarCodeForProductNotComplete", $producttmp->getNomUrl()), null, 'warnings');
80  }
81  }
82 }
83 if (GETPOST('submitthirdparty') && GETPOST('submitthirdparty')) {
84  $action = ''; // We reset because we don't want to build doc
85  if (GETPOST('socid', 'int') > 0) {
86  $thirdpartytmp->fetch(GETPOST('socid', 'int'));
87  $forbarcode = $thirdpartytmp->barcode;
88  $fk_barcode_type = $thirdpartytmp->barcode_type_code;
89 
90  if (empty($fk_barcode_type) && !empty($conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY)) {
91  $fk_barcode_type = $conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY;
92  }
93 
94  if (empty($forbarcode) || empty($fk_barcode_type)) {
95  setEventMessages($langs->trans("DefinitionOfBarCodeForThirdpartyNotComplete", $thirdpartytmp->getNomUrl()), null, 'warnings');
96  }
97  }
98 }
99 
100 if ($action == 'builddoc') {
101  $result = 0; $error = 0;
102 
103  if (empty($forbarcode)) { // barcode value
104  setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BarcodeValue")), null, 'errors');
105  $error++;
106  }
107  if (empty($fk_barcode_type)) { // barcode type = barcode encoding
108  setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BarcodeType")), null, 'errors');
109  $error++;
110  }
111 
112  if (!$error) {
113  // Get encoder (barcode_type_coder) from barcode type id (barcode_type)
114  $stdobject = new GenericObject($db);
115  $stdobject->barcode_type = $fk_barcode_type;
116  $result = $stdobject->fetch_barcode();
117  if ($result <= 0) {
118  $error++;
119  setEventMessages('Failed to get bar code type information '.$stdobject->error, $stdobject->errors, 'errors');
120  }
121  }
122 
123  if (!$error) {
124  $code = $forbarcode;
125  $generator = $stdobject->barcode_type_coder; // coder (loaded by fetch_barcode). Engine.
126  $encoding = strtoupper($stdobject->barcode_type_code); // code (loaded by fetch_barcode). Example 'ean', 'isbn', ...
127 
128  $diroutput = $conf->barcode->dir_temp;
129  dol_mkdir($diroutput);
130 
131  // Generate barcode
132  $dirbarcode = array_merge(array("/core/modules/barcode/doc/"), $conf->modules_parts['barcode']);
133 
134  foreach ($dirbarcode as $reldir) {
135  $dir = dol_buildpath($reldir, 0);
136  $newdir = dol_osencode($dir);
137 
138  // Check if directory exists (we do not use dol_is_dir to avoid loading files.lib.php)
139  if (!is_dir($newdir)) {
140  continue;
141  }
142 
143  $result = @include_once $newdir.$generator.'.modules.php';
144  if ($result) {
145  break;
146  }
147  }
148 
149  // Load barcode class for generating barcode image
150  $classname = "mod".ucfirst($generator);
151  $module = new $classname($db);
152  if ($generator != 'tcpdfbarcode') {
153  // May be phpbarcode
154  $template = 'standardlabel';
155  $is2d = false;
156  if ($module->encodingIsSupported($encoding)) {
157  $barcodeimage = $conf->barcode->dir_temp.'/barcode_'.$code.'_'.$encoding.'.png';
158  dol_delete_file($barcodeimage);
159  // File is created with full name $barcodeimage = $conf->barcode->dir_temp.'/barcode_'.$code.'_'.$encoding.'.png';
160  $result = $module->writeBarCode($code, $encoding, 'Y', 4, 1);
161  if ($result <= 0 || !dol_is_file($barcodeimage)) {
162  $error++;
163  setEventMessages('Failed to generate image file of barcode for code='.$code.' encoding='.$encoding.' file='.basename($barcodeimage), null, 'errors');
164  setEventMessages($module->error, null, 'errors');
165  }
166  } else {
167  $error++;
168  setEventMessages("Error, encoding ".$encoding." is not supported by encoder ".$generator.'. You must choose another barcode type or install a barcode generation engine that support '.$encoding, null, 'errors');
169  }
170  } else {
171  $template = 'tcpdflabel';
172  $encoding = $module->getTcpdfEncodingType($encoding); //convert to TCPDF compatible encoding types
173  $is2d = $module->is2d;
174  }
175  }
176 
177  if (!$error) {
178  // List of values to scan for a replacement
179  $substitutionarray = array(
180  '%LOGIN%' => $user->login,
181  '%COMPANY%' => $mysoc->name,
182  '%ADDRESS%' => $mysoc->address,
183  '%ZIP%' => $mysoc->zip,
184  '%TOWN%' => $mysoc->town,
185  '%COUNTRY%' => $mysoc->country,
186  '%COUNTRY_CODE%' => $mysoc->country_code,
187  '%EMAIL%' => $mysoc->email,
188  '%YEAR%' => $year,
189  '%MONTH%' => $month,
190  '%DAY%' => $day,
191  '%DOL_MAIN_URL_ROOT%' => DOL_MAIN_URL_ROOT,
192  '%SERVER%' => "http://".$_SERVER["SERVER_NAME"]."/",
193  );
194  complete_substitutions_array($substitutionarray, $langs);
195 
196  // For labels
197  if ($mode == 'label') {
198  $txtforsticker = "%PHOTO%"; // Photo will be barcode image, %BARCODE% posible when using TCPDF generator
199  $textleft = make_substitutions((empty($conf->global->BARCODE_LABEL_LEFT_TEXT) ? $txtforsticker : $conf->global->BARCODE_LABEL_LEFT_TEXT), $substitutionarray);
200  $textheader = make_substitutions((empty($conf->global->BARCODE_LABEL_HEADER_TEXT) ? '' : $conf->global->BARCODE_LABEL_HEADER_TEXT), $substitutionarray);
201  $textfooter = make_substitutions((empty($conf->global->BARCODE_LABEL_FOOTER_TEXT) ? '' : $conf->global->BARCODE_LABEL_FOOTER_TEXT), $substitutionarray);
202  $textright = make_substitutions((empty($conf->global->BARCODE_LABEL_RIGHT_TEXT) ? '' : $conf->global->BARCODE_LABEL_RIGHT_TEXT), $substitutionarray);
203  $forceimgscalewidth = (empty($conf->global->BARCODE_FORCEIMGSCALEWIDTH) ? 1 : $conf->global->BARCODE_FORCEIMGSCALEWIDTH);
204  $forceimgscaleheight = (empty($conf->global->BARCODE_FORCEIMGSCALEHEIGHT) ? 1 : $conf->global->BARCODE_FORCEIMGSCALEHEIGHT);
205 
206  $MAXSTICKERS = 1000;
207  if ($numberofsticker <= $MAXSTICKERS) {
208  for ($i = 0; $i < $numberofsticker; $i++) {
209  $arrayofrecords[] = array(
210  'textleft'=>$textleft,
211  'textheader'=>$textheader,
212  'textfooter'=>$textfooter,
213  'textright'=>$textright,
214  'code'=>$code,
215  'encoding'=>$encoding,
216  'is2d'=>$is2d,
217  'photo'=>$barcodeimage // Photo must be a file that exists with format supported by TCPDF
218  );
219  }
220  } else {
221  $mesg = $langs->trans("ErrorQuantityIsLimitedTo", $MAXSTICKERS);
222  $error++;
223  }
224  }
225 
226  $i++;
227 
228  // Build and output PDF
229  if (!$error && $mode == 'label') {
230  if (!count($arrayofrecords)) {
231  $mesg = $langs->trans("ErrorRecordNotFound");
232  }
233  if (empty($modellabel) || $modellabel == '-1') {
234  $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DescADHERENT_ETIQUETTE_TYPE"));
235  }
236 
237  $outfile = $langs->trans("BarCode").'_sheets_'.dol_print_date(dol_now(), 'dayhourlog').'.pdf';
238 
239  if (!$mesg) {
240  $outputlangs = $langs;
241 
242  // This generates and send PDF to output
243  // TODO Move
244  $result = doc_label_pdf_create($db, $arrayofrecords, $modellabel, $outputlangs, $diroutput, $template, dol_sanitizeFileName($outfile));
245  }
246  }
247 
248  if ($result <= 0 || $mesg || $error) {
249  if (empty($mesg)) {
250  $mesg = 'Error '.$result;
251  }
252 
253  setEventMessages($mesg, null, 'errors');
254  } else {
255  $db->close();
256  exit;
257  }
258  }
259 }
260 
261 
262 /*
263  * View
264  */
265 
266 if (empty($conf->barcode->enabled)) {
267  accessforbidden();
268 }
269 
270 $form = new Form($db);
271 
272 llxHeader('', $langs->trans("BarCodePrintsheet"));
273 
274 print load_fiche_titre($langs->trans("BarCodePrintsheet"), '', 'barcode');
275 print '<br>';
276 
277 print '<span class="opacitymedium">'.$langs->trans("PageToGenerateBarCodeSheets", $langs->transnoentitiesnoconv("BuildPageToPrint")).'</span><br>';
278 print '<br>';
279 
280 //print img_picto('','puce').' '.$langs->trans("PrintsheetForOneBarCode").'<br>';
281 //print '<br>';
282 
283 print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'; // The target is for brothers that open the file instead of downloading it
284 print '<input type="hidden" name="mode" value="label">';
285 print '<input type="hidden" name="action" value="builddoc">';
286 print '<input type="hidden" name="token" value="'.currentToken().'">'; // The page will not renew the token but force download of a file, so we must use here currentToken
287 
288 print '<div class="tagtable">';
289 
290 // Sheet format
291 print ' <div class="tagtr">';
292 print ' <div class="tagtd">';
293 print $langs->trans("DescADHERENT_ETIQUETTE_TYPE").' &nbsp; ';
294 print '</div><div class="tagtd maxwidthonsmartphone" style="overflow: hidden; white-space: nowrap;">';
295 // List of possible labels (defined into $_Avery_Labels variable set into core/lib/format_cards.lib.php)
296 $arrayoflabels = array();
297 foreach (array_keys($_Avery_Labels) as $codecards) {
298  $labeltoshow = $_Avery_Labels[$codecards]['name'];
299  //$labeltoshow.=' ('.$_Avery_Labels[$row['code']]['paper-size'].')';
300  $arrayoflabels[$codecards] = $labeltoshow;
301 }
302 asort($arrayoflabels);
303 print $form->selectarray('modellabel', $arrayoflabels, (GETPOST('modellabel') ?GETPOST('modellabel') : $conf->global->ADHERENT_ETIQUETTE_TYPE), 1, 0, 0, '', 0, 0, 0, '', '', 1);
304 print '</div></div>';
305 
306 // Number of stickers to print
307 print ' <div class="tagtr">';
308 print ' <div class="tagtd">';
309 print $langs->trans("NumberOfStickers").' &nbsp; ';
310 print '</div><div class="tagtd maxwidthonsmartphone" style="overflow: hidden; white-space: nowrap;">';
311 print '<input size="4" type="text" name="numberofsticker" value="'.(GETPOST('numberofsticker') ?GETPOST('numberofsticker', 'int') : 10).'">';
312 print '</div></div>';
313 
314 print '</div>';
315 
316 
317 print '<br>';
318 
319 
320 // Add javascript to make choice dynamic
321 print '<script type="text/javascript">
322 jQuery(document).ready(function() {
323  function init_selectors()
324  {
325  if (jQuery("#fillmanually:checked").val() == "fillmanually")
326  {
327  jQuery("#submitproduct").prop("disabled", true);
328  jQuery("#submitthirdparty").prop("disabled", true);
329  jQuery("#search_productid").prop("disabled", true);
330  jQuery("#socid").prop("disabled", true);
331  jQuery(".showforproductselector").hide();
332  jQuery(".showforthirdpartyselector").hide();
333  }
334  if (jQuery("#fillfromproduct:checked").val() == "fillfromproduct")
335  {
336  jQuery("#submitproduct").removeAttr("disabled");
337  jQuery("#submitthirdparty").prop("disabled", true);
338  jQuery("#search_productid").removeAttr("disabled");
339  jQuery("#socid").prop("disabled", true);
340  jQuery(".showforproductselector").show();
341  jQuery(".showforthirdpartyselector").hide();
342  }
343  if (jQuery("#fillfromthirdparty:checked").val() == "fillfromthirdparty")
344  {
345  jQuery("#submitproduct").prop("disabled", true);
346  jQuery("#submitthirdparty").removeAttr("disabled");
347  jQuery("#search_productid").prop("disabled", true);
348  jQuery("#socid").removeAttr("disabled");
349  jQuery(".showforproductselector").hide();
350  jQuery(".showforthirdpartyselector").show();
351  }
352  }
353  init_selectors();
354  jQuery(".radiobarcodeselect").click(function() {
355  init_selectors();
356  });
357 
358  function init_gendoc_button()
359  {
360  if (jQuery("#select_fk_barcode_type").val() > 0 && jQuery("#forbarcode").val())
361  {
362  jQuery("#submitformbarcodegen").removeAttr("disabled");
363  }
364  else
365  {
366  jQuery("#submitformbarcodegen").prop("disabled", true);
367  }
368  }
369  init_gendoc_button();
370  jQuery("#select_fk_barcode_type").change(function() {
371  init_gendoc_button();
372  });
373  jQuery("#forbarcode").keyup(function() {
374  init_gendoc_button()
375  });
376 });
377 </script>';
378 
379 // Checkbox to select from free text
380 print '<input id="fillmanually" type="radio" '.((!GETPOST("selectorforbarcode") || GETPOST("selectorforbarcode") == 'fillmanually') ? 'checked ' : '').'name="selectorforbarcode" value="fillmanually" class="radiobarcodeselect"><label for="fillmanually"> '.$langs->trans("FillBarCodeTypeAndValueManually").'</label>';
381 print '<br>';
382 
383 if (!empty($user->rights->produit->lire) || !empty($user->rights->service->lire)) {
384  print '<input id="fillfromproduct" type="radio" '.((GETPOST("selectorforbarcode") == 'fillfromproduct') ? 'checked ' : '').'name="selectorforbarcode" value="fillfromproduct" class="radiobarcodeselect"><label for="fillfromproduct"> '.$langs->trans("FillBarCodeTypeAndValueFromProduct").'</label>';
385  print '<br>';
386  print '<div class="showforproductselector">';
387  $form->select_produits(GETPOST('productid', 'int'), 'productid', '', '', 0, -1, 2, '', 0, array(), 0, '1', 0, 'minwidth400imp', 1);
388  print ' &nbsp; <input type="submit" class="button small" id="submitproduct" name="submitproduct" value="'.(dol_escape_htmltag($langs->trans("GetBarCode"))).'">';
389  print '</div>';
390 }
391 
392 if (!empty($user->rights->societe->lire)) {
393  print '<input id="fillfromthirdparty" type="radio" '.((GETPOST("selectorforbarcode") == 'fillfromthirdparty') ? 'checked ' : '').'name="selectorforbarcode" value="fillfromthirdparty" class="radiobarcodeselect"><label for="fillfromthirdparty"> '.$langs->trans("FillBarCodeTypeAndValueFromThirdParty").'</label>';
394  print '<br>';
395  print '<div class="showforthirdpartyselector">';
396  print $form->select_company(GETPOST('socid', 'int'), 'socid', '', 'SelectThirdParty', 0, 0, array(), 0, 'minwidth300');
397  print ' &nbsp; <input type="submit" id="submitthirdparty" name="submitthirdparty" class="button showforthirdpartyselector small" value="'.(dol_escape_htmltag($langs->trans("GetBarCode"))).'">';
398  print '</div>';
399 }
400 
401 print '<br>';
402 
403 if ($producttmp->id > 0) {
404  print $langs->trans("BarCodeDataForProduct", '').' '.$producttmp->getNomUrl(1).'<br>';
405 }
406 if ($thirdpartytmp->id > 0) {
407  print $langs->trans("BarCodeDataForThirdparty", '').' '.$thirdpartytmp->getNomUrl(1).'<br>';
408 }
409 
410 print '<div class="tagtable">';
411 
412 // Barcode type
413 print ' <div class="tagtr">';
414 print ' <div class="tagtd" style="overflow: hidden; white-space: nowrap; max-width: 300px;">';
415 print $langs->trans("BarcodeType").' &nbsp; ';
416 print '</div><div class="tagtd" style="overflow: hidden; white-space: nowrap; max-width: 300px;">';
417 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php';
418 $formbarcode = new FormBarCode($db);
419 print $formbarcode->selectBarcodeType($fk_barcode_type, 'fk_barcode_type', 1);
420 print '</div></div>';
421 
422 // Barcode value
423 print ' <div class="tagtr">';
424 print ' <div class="tagtd" style="overflow: hidden; white-space: nowrap; max-width: 300px;">';
425 print $langs->trans("BarcodeValue").' &nbsp; ';
426 print '</div><div class="tagtd" style="overflow: hidden; white-space: nowrap; max-width: 300px;">';
427 print '<input size="16" type="text" name="forbarcode" id="forbarcode" value="'.$forbarcode.'">';
428 print '</div></div>';
429 
430 /*
431 $barcodestickersmask=GETPOST('barcodestickersmask');
432 print '<br>'.$langs->trans("BarcodeStickersMask").':<br>';
433 print '<textarea cols="40" type="text" name="barcodestickersmask" value="'.GETPOST('barcodestickersmask').'">'.$barcodestickersmask.'</textarea>';
434 print '<br>';
435 */
436 
437 print '</div>';
438 
439 print '<br><input type="submit" class="button" id="submitformbarcodegen" '.((GETPOST("selectorforbarcode") && GETPOST("selectorforbarcode")) ? '' : 'disabled ').'value="'.$langs->trans("BuildPageToPrint").'">';
440 
441 print '</form>';
442 print '<br>';
443 
444 // End of page
445 llxFooter();
446 $db->close();
make_substitutions
make_substitutions($text, $substitutionarray, $outputlangs=null, $converttextinhtmlifnecessary=0)
Make substitution into a text string, replacing keys with vals from $substitutionarray (oldval=>newva...
Definition: functions.lib.php:7839
Societe
Class to manage third parties objects (customers, suppliers, prospects...)
Definition: societe.class.php:48
dol_sanitizeFileName
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
Definition: functions.lib.php:1226
llxFooter
llxFooter()
Empty footer.
Definition: wrapper.php:73
FormBarCode
Class to manage barcode HTML.
Definition: html.formbarcode.class.php:30
doc_label_pdf_create
doc_label_pdf_create($db, $arrayofrecords, $modele, $outputlangs, $outputdir='', $template='standardlabel', $filename='tmp_address_sheet.pdf')
Create a document onto disk according to template module.
Definition: modules_labels.php:80
dol_osencode
dol_osencode($str)
Return a string encoded into OS filesystem encoding.
Definition: functions.lib.php:8499
load_fiche_titre
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
Definition: functions.lib.php:5204
GETPOST
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Definition: functions.lib.php:484
dol_buildpath
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
Definition: functions.lib.php:1062
$form
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:142
dol_is_file
dol_is_file($pathoffile)
Return if path is a file.
Definition: files.lib.php:477
dol_print_date
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
Definition: functions.lib.php:2514
dol_delete_file
dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $object=null, $allowdotdot=false, $indexdatabase=1, $nolog=0)
Remove a file or several files with a mask.
Definition: files.lib.php:1231
setEventMessage
setEventMessage($mesgs, $style='mesgs')
Set event message in dol_events session object.
Definition: functions.lib.php:8108
Product
Class to manage products or services.
Definition: product.class.php:46
Form
Class to manage generation of HTML components Only common components must be here.
Definition: html.form.class.php:52
GenericObject
Class of a generic business object.
Definition: genericobject.class.php:30
dol_now
dol_now($mode='auto')
Return date for now.
Definition: functions.lib.php:2845
setEventMessages
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
Definition: functions.lib.php:8137
accessforbidden
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
Definition: security.lib.php:933
dol_mkdir
dol_mkdir($dir, $dataroot='', $newmask='')
Creation of a directory (this can create recursive subdir)
Definition: functions.lib.php:6603
llxHeader
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Definition: wrapper.php:59
complete_substitutions_array
complete_substitutions_array(&$substitutionarray, $outputlangs, $object=null, $parameters=null, $callfunc="completesubstitutionarray")
Complete the $substitutionarray with more entries coming from external module that had set the "subst...
Definition: functions.lib.php:7961