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