dolibarr 21.0.0-beta
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 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
5 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
27// Load Dolibarr environment
28require '../main.inc.php';
29require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
30require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
31require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
32require_once DOL_DOCUMENT_ROOT.'/core/lib/contract.lib.php';
33
43// Load translation files required by the page
44$langs->loadLangs(array("admin", "errors", "contracts"));
45
46if (!$user->admin) {
48}
49
50$action = GETPOST('action', 'aZ09');
51$value = GETPOST('value', 'alpha');
52$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
53
54$label = GETPOST('label', 'alpha');
55$scandir = GETPOST('scan_dir', 'alpha');
56$type = 'contract';
57
58if (!getDolGlobalString('CONTRACT_ADDON')) {
59 $conf->global->CONTRACT_ADDON = 'mod_contract_serpis';
60}
61
62
63/*
64 * Actions
65 */
66
67include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
68
69$error = 0;
70
71if ($action == 'updateMask') {
72 $maskconst = GETPOST('maskconstcontract', 'aZ09');
73 $maskvalue = GETPOST('maskcontract', 'alpha');
74 $res = 0;
75 if ($maskconst && preg_match('/_MASK$/', $maskconst)) {
76 $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity);
77 }
78
79 if (!($res > 0)) {
80 $error++;
81 }
82
83 if (!$error) {
84 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
85 } else {
86 setEventMessages($langs->trans("Error"), null, 'errors');
87 }
88} elseif ($action == 'specimen') { // For contract
89 $modele = GETPOST('module', 'alpha');
90
91 $contract = new Contrat($db);
92 $contract->initAsSpecimen();
93
94 // Search template files
95 $file = '';
96 $classname = '';
97 $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
98 foreach ($dirmodels as $reldir) {
99 $file = dol_buildpath($reldir."core/modules/contract/doc/pdf_".$modele.".modules.php", 0);
100 if (file_exists($file)) {
101 $classname = "pdf_".$modele;
102 break;
103 }
104 }
105
106 if ($classname !== '') {
107 require_once $file;
108
109 $module = new $classname($db);
110 '@phan-var-force ModelePDFContract $module';
111
113 if ($module->write_file($contract, $langs) > 0) {
114 header("Location: ".DOL_URL_ROOT."/document.php?modulepart=contract&file=SPECIMEN.pdf");
115 return;
116 } else {
117 setEventMessages($module->error, $module->errors, 'errors');
118 dol_syslog($module->error, LOG_ERR);
119 }
120 } else {
121 setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
122 dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
123 }
124} elseif ($action == 'set') {
125 // Activate a model
126 $ret = addDocumentModel($value, $type, $label, $scandir);
127} elseif ($action == 'del') {
128 $ret = delDocumentModel($value, $type);
129 if ($ret > 0) {
130 if ($conf->global->CONTRACT_ADDON_PDF == "$value") {
131 dolibarr_del_const($db, 'CONTRACT_ADDON_PDF', $conf->entity);
132 }
133 }
134} elseif ($action == 'setdoc') {
135 // Set default model
136 if (dolibarr_set_const($db, "CONTRACT_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) {
137 // La constante qui a ete lue en avant du nouveau set
138 // on passe donc par une variable pour avoir un affichage coherent
139 $conf->global->CONTRACT_ADDON_PDF = $value;
140 }
141
142 // On active le modele
143 $ret = delDocumentModel($value, $type);
144 if ($ret > 0) {
145 $ret = addDocumentModel($value, $type, $label, $scandir);
146 }
147} elseif ($action == 'unsetdoc') {
148 dolibarr_del_const($db, "CONTRACT_ADDON_PDF", $conf->entity);
149} elseif ($action == 'setmod') {
150 // TODO Verify si the chosen numbering module can be activated by
151 // the method call canBeActivated
152
153 dolibarr_set_const($db, "CONTRACT_ADDON", $value, 'chaine', 0, '', $conf->entity);
154} elseif ($action == 'set_other') {
155 $freetext = GETPOST('CONTRACT_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string
156 $res1 = dolibarr_set_const($db, "CONTRACT_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
157
158 $draft = GETPOST('CONTRACT_DRAFT_WATERMARK', 'alpha');
159 $res2 = dolibarr_set_const($db, "CONTRACT_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
160
161 $value = GETPOST('activate_hideClosedServiceByDefault', 'alpha');
162 $res3 = dolibarr_set_const($db, "CONTRACT_HIDE_CLOSED_SERVICES_BY_DEFAULT", $value, 'chaine', 0, '', $conf->entity);
163
164 if (!($res1 > 0) || !($res2 > 0) || !($res3 > 0)) {
165 $error++;
166 }
167
168 if (!$error) {
169 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
170 } else {
171 setEventMessages($langs->trans("Error"), null, 'errors');
172 }
173} elseif ($action == "allowonlinesign") {
174 if (!dolibarr_set_const($db, "CONTRACT_ALLOW_ONLINESIGN", $value, 'int', 0, '', $conf->entity)) {
175 $error++;
176 }
177} elseif (preg_match('/set_(.*)/', $action, $reg)) {
178 $code = $reg[1];
179 $value = (GETPOST($code) ? GETPOST($code) : 1);
180
181 $res = dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity);
182 if (!($res > 0)) {
183 $error++;
184 }
185
186 if ($error) {
187 setEventMessages($langs->trans('Error'), null, 'errors');
188 } else {
189 setEventMessages($langs->trans('SetupSaved'), null, 'mesgs');
190 header("Location: " . $_SERVER["PHP_SELF"]);
191 exit();
192 }
193} elseif (preg_match('/del_(.*)/', $action, $reg)) {
194 $code = $reg[1];
195 $res = dolibarr_del_const($db, $code, $conf->entity);
196
197 if (!($res > 0)) {
198 $error++;
199 }
200
201 if ($error) {
202 setEventMessages($langs->trans('Error'), null, 'errors');
203 } else {
204 setEventMessages($langs->trans('SetupSaved'), null, 'mesgs');
205 header("Location: " . $_SERVER["PHP_SELF"]);
206 exit();
207 }
208}
209
210
211
212/*
213 * View
214 */
215
216$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
217
218llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-admin page-contract');
219
220$form = new Form($db);
221
222$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
223print load_fiche_titre($langs->trans("ContractsSetup"), $linkback, 'title_setup');
224
226
227print dol_get_fiche_head($head, 'contract', $langs->trans("Contracts"), -1, 'contract');
228
229/*
230 * Contracts Numbering model
231 */
232
233print load_fiche_titre($langs->trans("ContractsNumberingModules"), '', '');
234
235print '<div class="div-table-responsive-no-min">';
236print '<table class="noborder centpercent">';
237print '<tr class="liste_titre">';
238print '<td width="100">'.$langs->trans("Name").'</td>';
239print '<td>'.$langs->trans("Description").'</td>';
240print '<td>'.$langs->trans("Example").'</td>';
241print '<td class="center" width="60">'.$langs->trans("Status").'</td>';
242print '<td class="center" width="16">'.$langs->trans("ShortInfo").'</td>';
243print "</tr>\n";
244
245clearstatcache();
246
247foreach ($dirmodels as $reldir) {
248 $dir = dol_buildpath($reldir."core/modules/contract/");
249
250 if (is_dir($dir)) {
251 $handle = opendir($dir);
252 if (is_resource($handle)) {
253 while (($file = readdir($handle)) !== false) {
254 if (substr($file, 0, 13) == 'mod_contract_' && substr($file, dol_strlen($file) - 3, 3) == 'php') {
255 $file = substr($file, 0, dol_strlen($file) - 4);
256
257 require_once $dir.$file.'.php';
259 $module = new $file($db);
260
261 '@phan-var-force ModelNumRefContracts $module';
262
263 // Show modules according to features level
264 if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
265 continue;
266 }
267 if ($module->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1) {
268 continue;
269 }
270
271 if ($module->isEnabled()) {
272 print '<tr class="oddeven"><td>'.$module->name."</td><td>\n";
273 print $module->info($langs);
274 print '</td>';
275
276 // Show example of numbering model
277 print '<td class="nowrap">';
278 $tmp = $module->getExample();
279 if (preg_match('/^Error/', $tmp)) {
280 $langs->load("errors");
281 print '<div class="error">'.$langs->trans($tmp).'</div>';
282 } elseif ($tmp == 'NotConfigured') {
283 print '<span class="opacitymedium">'.$langs->trans($tmp).'</span>';
284 } else {
285 print $tmp;
286 }
287 print '</td>'."\n";
288
289 print '<td class="center">';
290 if ($conf->global->CONTRACT_ADDON == "$file") {
291 print img_picto($langs->trans("Activated"), 'switch_on');
292 } else {
293 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
294 print img_picto($langs->trans("Disabled"), 'switch_off');
295 print '</a>';
296 }
297 print '</td>';
298
299 $contract = new Contrat($db);
300 $contract->initAsSpecimen();
301
302 // Info
303 $htmltooltip = '';
304 $htmltooltip .= ''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
305 $nextval = $module->getNextValue($mysoc, $contract);
306 if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
307 $htmltooltip .= ''.$langs->trans("NextValue").': ';
308 if ($nextval) {
309 if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') {
310 $nextval = $langs->trans($nextval);
311 }
312 $htmltooltip .= $nextval.'<br>';
313 } else {
314 $htmltooltip .= $langs->trans($module->error).'<br>';
315 }
316 }
317
318 print '<td class="center">';
319 print $form->textwithpicto('', $htmltooltip, 1, 0);
320 print '</td>';
321
322 print '</tr>';
323 }
324 }
325 }
326 closedir($handle);
327 }
328 }
329}
330
331print '</table></div><br>';
332
333/*
334 * Documents models for Contracts
335 */
336
337print load_fiche_titre($langs->trans("TemplatePDFContracts"), '', '');
338
339// Defini tableau def des modeles
340$def = array();
341$sql = "SELECT nom";
342$sql .= " FROM ".MAIN_DB_PREFIX."document_model";
343$sql .= " WHERE type = '".$db->escape($type)."'";
344$sql .= " AND entity = ".$conf->entity;
345$resql = $db->query($sql);
346if ($resql) {
347 $i = 0;
348 $num_rows = $db->num_rows($resql);
349 while ($i < $num_rows) {
350 $array = $db->fetch_array($resql);
351 if (is_array($array)) {
352 array_push($def, $array[0]);
353 }
354 $i++;
355 }
356} else {
357 dol_print_error($db);
358}
359
360
361print '<div class="div-table-responsive-no-min">';
362print '<table class="noborder centpercent">';
363print '<tr class="liste_titre">';
364print '<td>'.$langs->trans("Name").'</td>';
365print '<td>'.$langs->trans("Description").'</td>';
366print '<td class="center" width="60">'.$langs->trans("Status")."</td>\n";
367print '<td class="center" width="60">'.$langs->trans("Default")."</td>\n";
368print '<td class="center" width="80">'.$langs->trans("ShortInfo").'</td>';
369print '<td class="center" width="80">'.$langs->trans("Preview").'</td>';
370print "</tr>\n";
371
372clearstatcache();
373
374foreach ($dirmodels as $reldir) {
375 foreach (array('', '/doc') as $valdir) {
376 $realpath = $reldir."core/modules/contract".$valdir;
377 $dir = dol_buildpath($realpath);
378
379 if (is_dir($dir)) {
380 $handle = opendir($dir);
381 if (is_resource($handle)) {
382 $filelist = array();
383 while (($file = readdir($handle)) !== false) {
384 $filelist[] = $file;
385 }
386 closedir($handle);
387 arsort($filelist);
388
389 foreach ($filelist as $file) {
390 if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
391 if (file_exists($dir.'/'.$file)) {
392 $name = substr($file, 4, dol_strlen($file) - 16);
393 $classname = substr($file, 0, dol_strlen($file) - 12);
394
395 require_once $dir.'/'.$file;
397 $module = new $classname($db);
398
399 '@phan-var-force ModelePDFContract $module';
400
401 $modulequalified = 1;
402 if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
403 $modulequalified = 0;
404 }
405 if ($module->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1) {
406 $modulequalified = 0;
407 }
408
409 if ($modulequalified) {
410 print '<tr class="oddeven"><td width="100">';
411 print(empty($module->name) ? $name : $module->name);
412 print "</td><td>\n";
413 if (method_exists($module, 'info')) {
414 print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
415 } else {
416 print $module->description;
417 }
418 print '</td>';
419
420 // Active
421 if (in_array($name, $def)) {
422 print '<td class="center">'."\n";
423 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
424 print img_picto($langs->trans("Enabled"), 'switch_on');
425 print '</a>';
426 print '</td>';
427 } else {
428 print '<td class="center">'."\n";
429 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>';
430 print "</td>";
431 }
432
433 // Default
434 print '<td class="center">';
435 if (getDolGlobalString('CONTRACT_ADDON_PDF') == $name) {
436 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>';
437 } else {
438 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>';
439 }
440 print '</td>';
441
442 // Info
443 $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
444 $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
445 if ($module->type == 'pdf') {
446 $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
447 }
448 $htmltooltip .= '<br>'.$langs->trans("Path").': '.preg_replace('/^\//', '', $realpath).'/'.$file;
449
450 $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
451 $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
452 $htmltooltip .= '<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1);
453 $htmltooltip .= '<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1);
454 $htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
455 $htmltooltip .= '<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
456
457
458 print '<td class="center">';
459 print $form->textwithpicto('', $htmltooltip, 1, 0);
460 print '</td>';
461
462 // Preview
463 print '<td class="center">';
464 if ($module->type == 'pdf') {
465 print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
466 } else {
467 print img_object($langs->trans("PreviewNotAvailable"), 'generic');
468 }
469 print '</td>';
470
471 print "</tr>\n";
472 }
473 }
474 }
475 }
476 }
477 }
478 }
479}
480
481print '</table>';
482print '</div>';
483print "<br>";
484
485/*
486 * Other options
487 *
488 */
489
490print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
491print '<input type="hidden" name="token" value="'.newToken().'">';
492print '<input type="hidden" name="action" value="set_other">';
493
494print load_fiche_titre($langs->trans("OtherOptions"), '', '');
495
496print '<div class="div-table-responsive-no-min">';
497print '<table class="noborder centpercent">';
498print '<tr class="liste_titre">';
499print '<td>'.$langs->trans("Parameter").'</td>';
500print '<td class="right">'.$langs->trans("Value").'</td>';
501print "</tr>\n";
502
503$substitutionarray = pdf_getSubstitutionArray($langs, array('objectamount'), null, 2);
504$substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
505$htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
506foreach ($substitutionarray as $key => $val) {
507 $htmltext .= $key.'<br>';
508}
509$htmltext .= '</i>';
510
511print '<tr class="oddeven"><td colspan="2">';
512print $form->textwithpicto($langs->trans("FreeLegalTextOnContracts"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'tooltiphelp');
513print '<br>';
514$variablename = 'CONTRACT_FREE_TEXT';
515if (!getDolGlobalString('PDF_ALLOW_HTML_FOR_FREE_TEXT')) {
516 print '<textarea name="'.$variablename.'" class="flat" cols="120">'.getDolGlobalString($variablename).'</textarea>';
517} else {
518 include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
519 $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
520 print $doleditor->Create();
521}
522print '</td></tr>'."\n";
523
524//Use draft Watermark
525
526print '<tr class="oddeven"><td>';
527print $form->textwithpicto($langs->trans("WatermarkOnDraftContractCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
528print '</td><td class="right">';
529print '<input class="flat minwidth200" type="text" name="CONTRACT_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('CONTRACT_DRAFT_WATERMARK')).'">';
530print '</td></tr>'."\n";
531
532print '<tr class="oddeven">';
533print '<td>'.$langs->trans("HideClosedServiceByDefault").'</td>';
534print '<td class="right">';
535print $form->selectyesno("activate_hideClosedServiceByDefault", getDolGlobalInt('CONTRACT_HIDE_CLOSED_SERVICES_BY_DEFAULT', 0), 1);
536print '</td>';
537print '</tr>';
538
539// Allow online signing
540print '<tr class="oddeven">';
541print '<td>'.$langs->trans("AllowOnlineSign").'</td>';
542print '<td class="right">';
543if ($conf->use_javascript_ajax) {
544 print ajax_constantonoff('CONTRACT_ALLOW_ONLINESIGN', array(), null, 0, 0, 0, 2, 0, 1, '', '', 'inline-block', 0, $langs->trans("WarningOnlineSignature"));
545} else {
546 if (getDolGlobalString('CONTRACT_ALLOW_ONLINESIGN')) {
547 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=allowonlinesign&token='.newToken().'&value=0">';
548 print img_picto($langs->trans("Activated"), 'switch_on');
549 print '</a>';
550 } else {
551 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=allowonlinesign&token='.newToken().'&value=1">';
552 print img_picto($langs->trans("Disabled"), 'switch_off');
553 print '</a>';
554 }
555}
556print '</td>';
557print '</tr>';
558
559// Allow external download
560print '<tr class="oddeven">';
561print '<td>'.$langs->trans("AllowExternalDownload").'</td>';
562print '<td class="right">';
563print ajax_constantonoff('CONTRACT_ALLOW_EXTERNAL_DOWNLOAD', array(), null, 0, 0, 0, 2, 0, 1);
564print '</td>';
565print '</tr>';
566print '</table>';
567print '</div>';
568
569print $form->buttonsSaveCancel("Save", '');
570
571print '</form>';
572
573print dol_get_fiche_end();
574
575// End of page
576llxFooter();
577$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($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Definition wrapper.php:71
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 information.
llxFooter()
Footer empty.
Definition document.php:107
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
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_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.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
yn($yesno, $format=1, $color=0)
Return yes or no in current language.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
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:765
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:152
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.