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