dolibarr  16.0.5
contract.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
3  * Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
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 require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
27 require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
28 require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
29 require_once DOL_DOCUMENT_ROOT.'/core/lib/contract.lib.php';
30 
31 // Load translation files required by the page
32 $langs->loadLangs(array("admin", "errors", "contracts"));
33 
34 if (!$user->admin) {
36 }
37 
38 $action = GETPOST('action', 'aZ09');
39 $value = GETPOST('value', 'alpha');
40 $modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
41 
42 $label = GETPOST('label', 'alpha');
43 $scandir = GETPOST('scan_dir', 'alpha');
44 $type = 'contract';
45 
46 if (empty($conf->global->CONTRACT_ADDON)) {
47  $conf->global->CONTRACT_ADDON = 'mod_contract_serpis';
48 }
49 
50 
51 /*
52  * Actions
53  */
54 
55 include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
56 
57 if ($action == 'updateMask') {
58  $maskconst = GETPOST('maskconstcontract', 'alpha');
59  $maskvalue = GETPOST('maskcontract', 'alpha');
60  if ($maskconst) {
61  $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity);
62  }
63 
64  if (!($res > 0)) {
65  $error++;
66  }
67 
68  if (!$error) {
69  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
70  } else {
71  setEventMessages($langs->trans("Error"), null, 'errors');
72  }
73 } elseif ($action == 'specimen') { // For contract
74  $modele = GETPOST('module', 'alpha');
75 
76  $contract = new Contrat($db);
77  $contract->initAsSpecimen();
78 
79  // Search template files
80  $file = ''; $classname = ''; $filefound = 0;
81  $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
82  foreach ($dirmodels as $reldir) {
83  $file = dol_buildpath($reldir."core/modules/contract/doc/pdf_".$modele.".modules.php", 0);
84  if (file_exists($file)) {
85  $filefound = 1;
86  $classname = "pdf_".$modele;
87  break;
88  }
89  }
90 
91  if ($filefound) {
92  require_once $file;
93 
94  $module = new $classname($db);
95 
96  if ($module->write_file($contract, $langs) > 0) {
97  header("Location: ".DOL_URL_ROOT."/document.php?modulepart=contract&file=SPECIMEN.pdf");
98  return;
99  } else {
100  setEventMessages($obj->error, $obj->errors, 'errors');
101  dol_syslog($obj->error, LOG_ERR);
102  }
103  } else {
104  setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
105  dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
106  }
107 } elseif ($action == 'set') {
108  // Activate a model
109  $ret = addDocumentModel($value, $type, $label, $scandir);
110 } elseif ($action == 'del') {
111  $ret = delDocumentModel($value, $type);
112  if ($ret > 0) {
113  if ($conf->global->CONTRACT_ADDON_PDF == "$value") {
114  dolibarr_del_const($db, 'CONTRACT_ADDON_PDF', $conf->entity);
115  }
116  }
117 } elseif ($action == 'setdoc') {
118  // Set default model
119  if (dolibarr_set_const($db, "CONTRACT_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) {
120  // La constante qui a ete lue en avant du nouveau set
121  // on passe donc par une variable pour avoir un affichage coherent
122  $conf->global->CONTRACT_ADDON_PDF = $value;
123  }
124 
125  // On active le modele
126  $ret = delDocumentModel($value, $type);
127  if ($ret > 0) {
128  $ret = addDocumentModel($value, $type, $label, $scandir);
129  }
130 } elseif ($action == 'setmod') {
131  // TODO Verifier si module numerotation choisi peut etre active
132  // par appel methode canBeActivated
133 
134  dolibarr_set_const($db, "CONTRACT_ADDON", $value, 'chaine', 0, '', $conf->entity);
135 } elseif ($action == 'set_other') {
136  $freetext = GETPOST('CONTRACT_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string
137  $res1 = dolibarr_set_const($db, "CONTRACT_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
138 
139  $draft = GETPOST('CONTRACT_DRAFT_WATERMARK', 'alpha');
140  $res2 = dolibarr_set_const($db, "CONTRACT_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
141 
142  $value = GETPOST('activate_hideClosedServiceByDefault', 'alpha');
143  $res3 = dolibarr_set_const($db, "CONTRACT_HIDE_CLOSED_SERVICES_BY_DEFAULT", $value, 'chaine', 0, '', $conf->entity);
144 
145  if (!($res1 > 0) || !($res2 > 0) || !($res3 > 0)) {
146  $error++;
147  }
148 
149  if (!$error) {
150  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
151  } else {
152  setEventMessages($langs->trans("Error"), null, 'errors');
153  }
154 }
155 
156 
157 /*
158  * View
159  */
160 
161 $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
162 
163 llxHeader();
164 
165 $form = new Form($db);
166 
167 $linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
168 print load_fiche_titre($langs->trans("ContractsSetup"), $linkback, 'title_setup');
169 
171 
172 print dol_get_fiche_head($head, 'contract', $langs->trans("Contracts"), -1, 'contract');
173 
174 /*
175  * Contracts Numbering model
176  */
177 
178 print load_fiche_titre($langs->trans("ContractsNumberingModules"), '', '');
179 
180 print '<table class="noborder centpercent">';
181 print '<tr class="liste_titre">';
182 print '<td width="100">'.$langs->trans("Name").'</td>';
183 print '<td>'.$langs->trans("Description").'</td>';
184 print '<td>'.$langs->trans("Example").'</td>';
185 print '<td class="center" width="60">'.$langs->trans("Status").'</td>';
186 print '<td class="center" width="16">'.$langs->trans("ShortInfo").'</td>';
187 print "</tr>\n";
188 
189 clearstatcache();
190 
191 foreach ($dirmodels as $reldir) {
192  $dir = dol_buildpath($reldir."core/modules/contract/");
193 
194  if (is_dir($dir)) {
195  $handle = opendir($dir);
196  if (is_resource($handle)) {
197  while (($file = readdir($handle)) !== false) {
198  if (substr($file, 0, 13) == 'mod_contract_' && substr($file, dol_strlen($file) - 3, 3) == 'php') {
199  $file = substr($file, 0, dol_strlen($file) - 4);
200 
201  require_once $dir.$file.'.php';
202 
203  $module = new $file($db);
204 
205  // Show modules according to features level
206  if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
207  continue;
208  }
209  if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
210  continue;
211  }
212 
213  if ($module->isEnabled()) {
214  print '<tr class="oddeven"><td>'.$module->nom."</td><td>\n";
215  print $module->info();
216  print '</td>';
217 
218  // Show example of numbering model
219  print '<td class="nowrap">';
220  $tmp = $module->getExample();
221  if (preg_match('/^Error/', $tmp)) {
222  $langs->load("errors");
223  print '<div class="error">'.$langs->trans($tmp).'</div>';
224  } elseif ($tmp == 'NotConfigured') {
225  print '<span class="opacitymedium">'.$langs->trans($tmp).'</span>';
226  } else {
227  print $tmp;
228  }
229  print '</td>'."\n";
230 
231  print '<td class="center">';
232  if ($conf->global->CONTRACT_ADDON == "$file") {
233  print img_picto($langs->trans("Activated"), 'switch_on');
234  } else {
235  print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
236  print img_picto($langs->trans("Disabled"), 'switch_off');
237  print '</a>';
238  }
239  print '</td>';
240 
241  $contract = new Contrat($db);
242  $contract->initAsSpecimen();
243 
244  // Info
245  $htmltooltip = '';
246  $htmltooltip .= ''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
247  $nextval = $module->getNextValue($mysoc, $contract);
248  if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
249  $htmltooltip .= ''.$langs->trans("NextValue").': ';
250  if ($nextval) {
251  if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') {
252  $nextval = $langs->trans($nextval);
253  }
254  $htmltooltip .= $nextval.'<br>';
255  } else {
256  $htmltooltip .= $langs->trans($module->error).'<br>';
257  }
258  }
259 
260  print '<td class="center">';
261  print $form->textwithpicto('', $htmltooltip, 1, 0);
262  print '</td>';
263 
264  print '</tr>';
265  }
266  }
267  }
268  closedir($handle);
269  }
270  }
271 }
272 
273 print '</table><br>';
274 
275 /*
276  * Documents models for Contracts
277  */
278 
279 print load_fiche_titre($langs->trans("TemplatePDFContracts"), '', '');
280 
281 // Defini tableau def des modeles
282 $def = array();
283 $sql = "SELECT nom";
284 $sql .= " FROM ".MAIN_DB_PREFIX."document_model";
285 $sql .= " WHERE type = '".$db->escape($type)."'";
286 $sql .= " AND entity = ".$conf->entity;
287 $resql = $db->query($sql);
288 if ($resql) {
289  $i = 0;
290  $num_rows = $db->num_rows($resql);
291  while ($i < $num_rows) {
292  $array = $db->fetch_array($resql);
293  array_push($def, $array[0]);
294  $i++;
295  }
296 } else {
297  dol_print_error($db);
298 }
299 
300 
301 print '<table class="noborder centpercent">';
302 print '<tr class="liste_titre">';
303 print '<td>'.$langs->trans("Name").'</td>';
304 print '<td>'.$langs->trans("Description").'</td>';
305 print '<td class="center" width="60">'.$langs->trans("Status")."</td>\n";
306 print '<td class="center" width="60">'.$langs->trans("Default")."</td>\n";
307 print '<td class="center" width="80">'.$langs->trans("ShortInfo").'</td>';
308 print '<td class="center" width="80">'.$langs->trans("Preview").'</td>';
309 print "</tr>\n";
310 
311 clearstatcache();
312 
313 foreach ($dirmodels as $reldir) {
314  foreach (array('', '/doc') as $valdir) {
315  $realpath = $reldir."core/modules/contract".$valdir;
316  $dir = dol_buildpath($realpath);
317 
318  if (is_dir($dir)) {
319  $handle = opendir($dir);
320  if (is_resource($handle)) {
321  while (($file = readdir($handle)) !== false) {
322  $filelist[] = $file;
323  }
324  closedir($handle);
325  arsort($filelist);
326 
327  foreach ($filelist as $file) {
328  if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
329  if (file_exists($dir.'/'.$file)) {
330  $name = substr($file, 4, dol_strlen($file) - 16);
331  $classname = substr($file, 0, dol_strlen($file) - 12);
332 
333  require_once $dir.'/'.$file;
334  $module = new $classname($db);
335 
336  $modulequalified = 1;
337  if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
338  $modulequalified = 0;
339  }
340  if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
341  $modulequalified = 0;
342  }
343 
344  if ($modulequalified) {
345  print '<tr class="oddeven"><td width="100">';
346  print (empty($module->name) ? $name : $module->name);
347  print "</td><td>\n";
348  if (method_exists($module, 'info')) {
349  print $module->info($langs);
350  } else {
351  print $module->description;
352  }
353  print '</td>';
354 
355  // Active
356  if (in_array($name, $def)) {
357  print '<td class="center">'."\n";
358  print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
359  print img_picto($langs->trans("Enabled"), 'switch_on');
360  print '</a>';
361  print '</td>';
362  } else {
363  print '<td class="center">'."\n";
364  print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
365  print "</td>";
366  }
367 
368  // Defaut
369  print '<td class="center">';
370  if ($conf->global->CONTRACT_ADDON_PDF == $name) {
371  print img_picto($langs->trans("Default"), 'on');
372  } else {
373  print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&amp;scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
374  }
375  print '</td>';
376 
377  // Info
378  $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
379  $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
380  if ($module->type == 'pdf') {
381  $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
382  }
383  $htmltooltip .= '<br>'.$langs->trans("Path").': '.preg_replace('/^\//', '', $realpath).'/'.$file;
384 
385  $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
386  $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
387  $htmltooltip .= '<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1);
388  $htmltooltip .= '<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1);
389  $htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
390  $htmltooltip .= '<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
391 
392 
393  print '<td class="center">';
394  print $form->textwithpicto('', $htmltooltip, 1, 0);
395  print '</td>';
396 
397  // Preview
398  print '<td class="center">';
399  if ($module->type == 'pdf') {
400  print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
401  } else {
402  print img_object($langs->trans("PreviewNotAvailable"), 'generic');
403  }
404  print '</td>';
405 
406  print "</tr>\n";
407  }
408  }
409  }
410  }
411  }
412  }
413  }
414 }
415 
416 print '</table>';
417 print "<br>";
418 
419 /*
420  * Other options
421  *
422  */
423 
424 print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
425 print '<input type="hidden" name="token" value="'.newToken().'">';
426 print '<input type="hidden" name="action" value="set_other">';
427 
428 print load_fiche_titre($langs->trans("OtherOptions"), '', '');
429 print '<table class="noborder centpercent">';
430 print '<tr class="liste_titre">';
431 print '<td>'.$langs->trans("Parameter").'</td>';
432 print '<td class="center" width="60">'.$langs->trans("Value").'</td>';
433 print "</tr>\n";
434 
435 $substitutionarray = pdf_getSubstitutionArray($langs, array('objectamount'), null, 2);
436 $substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
437 $htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
438 foreach ($substitutionarray as $key => $val) {
439  $htmltext .= $key.'<br>';
440 }
441 $htmltext .= '</i>';
442 
443 print '<tr class="oddeven"><td colspan="2">';
444 print $form->textwithpicto($langs->trans("FreeLegalTextOnContracts"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'tooltiphelp');
445 print '<br>';
446 $variablename = 'CONTRACT_FREE_TEXT';
447 if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
448  print '<textarea name="'.$variablename.'" class="flat" cols="120">'.getDolGlobalString($variablename).'</textarea>';
449 } else {
450  include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
451  $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
452  print $doleditor->Create();
453 }
454 print '</td></tr>'."\n";
455 
456 //Use draft Watermark
457 
458 print '<tr class="oddeven"><td>';
459 print $form->textwithpicto($langs->trans("WatermarkOnDraftContractCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
460 print '</td><td>';
461 print '<input class="flat minwidth200" type="text" name="CONTRACT_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('CONTRACT_DRAFT_WATERMARK')).'">';
462 print '</td></tr>'."\n";
463 
464 print '<tr class="oddeven">';
465 print '<td>'.$langs->trans("HideClosedServiceByDefault").'</td>';
466 print '<td width="60" class="right">';
467 print $form->selectyesno("activate_hideClosedServiceByDefault", (!empty($conf->global->CONTRACT_HIDE_CLOSED_SERVICES_BY_DEFAULT) ? $conf->global->CONTRACT_HIDE_CLOSED_SERVICES_BY_DEFAULT : 0), 1);
468 print '</td>';
469 print '</tr>';
470 
471 print '</table>';
472 
473 print $form->buttonsSaveCancel("Save", '');
474 
475 print '</form>';
476 
477 print dol_get_fiche_end();
478 
479 // End of page
480 llxFooter();
481 $db->close();
yn
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
Definition: functions.lib.php:6491
llxFooter
llxFooter()
Empty footer.
Definition: wrapper.php:73
dolibarr_del_const
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
Definition: admin.lib.php:552
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_print_error
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
Definition: functions.lib.php:4844
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
img_picto
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
Definition: functions.lib.php:3880
contract_admin_prepare_head
contract_admin_prepare_head()
Return array head with list of tabs to view object informations.
Definition: contract.lib.php:109
delDocumentModel
delDocumentModel($name, $type)
Delete document model used by doc generator.
Definition: admin.lib.php:1894
dol_syslog
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
Definition: functions.lib.php:1603
dol_get_fiche_head
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
Definition: functions.lib.php:1822
getDolGlobalString
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
Definition: functions.lib.php:80
dol_strlen
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
Definition: functions.lib.php:3747
newToken
newToken()
Return the value of token currently saved into session with name 'newtoken'.
Definition: functions.lib.php:10878
dol_get_fiche_end
dol_get_fiche_end($notab=0)
Return tab footer of a card.
Definition: functions.lib.php:2018
Contrat
Class to manage contracts.
Definition: contrat.class.php:43
dolibarr_set_const
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
Definition: admin.lib.php:627
addDocumentModel
addDocumentModel($name, $type, $label='', $description='')
Add document model used by doc generator.
Definition: admin.lib.php:1863
Form
Class to manage generation of HTML components Only common components must be here.
Definition: html.form.class.php:52
img_object
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
Definition: functions.lib.php:4211
$resql
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire)||(isModEnabled('supplier_invoice') && $user->rights->supplier_invoice->lire)) if(isModEnabled('don') &&!empty($user->rights->don->lire)) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
Definition: index.php:742
pdf_getSubstitutionArray
pdf_getSubstitutionArray($outputlangs, $exclude=null, $object=null, $onlykey=0)
Return array of possible substitutions for PDF content (without external module substitutions).
Definition: pdf.lib.php:737
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
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
DolEditor
Class to manage a WYSIWYG editor.
Definition: doleditor.class.php:30