dolibarr 24.0.0-beta
setup.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
4 * Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
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// Load Dolibarr environment
27require '../../main.inc.php';
28
29// Libraries
30require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
31require_once DOL_DOCUMENT_ROOT.'/recruitment/lib/recruitment.lib.php';
32require_once DOL_DOCUMENT_ROOT."/recruitment/class/recruitmentjobposition.class.php";
33
42// Translations
43$langs->loadLangs(array("admin", "recruitment"));
44
45// Access control
46if (!$user->admin) {
48}
49
50// Parameters
51$action = GETPOST('action', 'aZ09');
52$backtopage = GETPOST('backtopage', 'alpha');
53$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
54
55$value = GETPOST('value', 'alpha');
56$label = GETPOST('label', 'alpha');
57$scandir = GETPOST('scan_dir', 'alpha');
58$type = 'recruitmentjobposition';
59
60$arrayofparameters = array(
61// 'RECRUITMENT_MYPARAM1'=>array('css'=>'minwidth200', 'enabled'=>1),
62// 'RECRUITMENT_MYPARAM2'=>array('css'=>'minwidth500', 'enabled'=>1)
63);
64
65$error = 0;
66$setupnotempty = 0;
67
68$moduledir = 'recruitment';
69$myTmpObjects = array();
70$myTmpObjects['recruitmentjobposition'] = array('label' => 'RecruitmentJobPosition', 'includerefgeneration' => 1, 'includedocgeneration' => 1, 'class' => 'RecruitmentJobPosition');
71
72$tmpobjectkey = GETPOST('object', 'aZ09');
73if ($tmpobjectkey && !array_key_exists($tmpobjectkey, $myTmpObjects)) {
74 accessforbidden('Bad value for object. Hack attempt ?');
75}
76
77
78/*
79 * Actions
80 */
81
82include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
83
84if ($action == 'updateMask') {
85 $maskconst = GETPOST('maskconstjob', 'alpha');
86 $maskvalue = GETPOST('maskjob', 'alpha');
87
88 $res = -1;
89 if ($maskconst && preg_match('/_MASK$/', $maskconst)) {
90 $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity);
91 }
92
93 if (!($res > 0)) {
94 $error++;
95 }
96
97 if (!$error) {
98 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
99 } else {
100 setEventMessages($langs->trans("Error"), null, 'errors');
101 }
102} elseif ($action == 'specimen' && $tmpobjectkey) {
103 $modele = GETPOST('module', 'alpha');
104
105 $className = $myTmpObjects[$tmpobjectkey]['class'];
106 $tmpobject = new $className($db);
107 $tmpobject->initAsSpecimen();
108
109 // Search template files
110 $file = '';
111 $classname = '';
112 $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
113 foreach ($dirmodels as $reldir) {
114 $file = dol_buildpath($reldir."core/modules/recruitment/doc/pdf_".$modele."_".strtolower($tmpobjectkey).".modules.php", 0);
115 if (file_exists($file)) {
116 $classname = "pdf_".$modele."_".strtolower($tmpobjectkey);
117 break;
118 }
119 }
120
121 if ($classname !== '') {
122 require_once $file;
123
124 $module = new $classname($db);
125
126 '@phan-var-force ModelePDFRecruitmentJobPosition $module';
127
128 if ($module->write_file($tmpobject, $langs) > 0) {
129 header("Location: ".DOL_URL_ROOT."/document.php?modulepart=recruitment-".strtolower($tmpobjectkey)."&file=SPECIMEN.pdf");
130 return;
131 } else {
132 setEventMessages($module->error, null, 'errors');
133 dol_syslog($module->error, LOG_ERR);
134 }
135 } else {
136 setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
137 dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
138 }
139} elseif ($action == 'set') {
140 // Activate a model
141 $ret = addDocumentModel($value, $type, $label, $scandir);
142} elseif ($action == 'del') {
143 $ret = delDocumentModel($value, $type);
144 if ($ret > 0) {
145 if (!empty($tmpobjectkey)) {
146 $constforval = 'RECRUITMENT_'.strtoupper($tmpobjectkey).'_ADDON_PDF';
147 if (getDolGlobalString($constforval) == "$value") {
148 dolibarr_del_const($db, $constforval, $conf->entity);
149 }
150 }
151 }
152} elseif ($action == 'setmod') {
153 // TODO Check if numbering module chosen can be activated by calling method canBeActivated
154 if (!empty($tmpobjectkey)) {
155 $constforval = 'RECRUITMENT_'.strtoupper($tmpobjectkey)."_ADDON";
156
157 dolibarr_set_const($db, $constforval, $value, 'chaine', 0, '', $conf->entity);
158 }
159} elseif ($action == 'setdoc') {
160 // Set default model
161 if (!empty($tmpobjectkey)) {
162 $constforval = 'RECRUITMENT_'.strtoupper($tmpobjectkey).'_ADDON_PDF';
163 if (dolibarr_set_const($db, $constforval, $value, 'chaine', 0, '', $conf->entity)) {
164 // The constant that was read before the new set
165 // We therefore requires a variable to have a coherent view
166 $conf->global->$constforval = $value;
167 }
168
169 // We disable/enable the document template (into llx_document_model table)
170 $ret = delDocumentModel($value, $type);
171 if ($ret > 0) {
172 $ret = addDocumentModel($value, $type, $label, $scandir);
173 }
174 }
175} elseif ($action == 'unsetdoc') {
176 if (!empty($tmpobjectkey)) {
177 $constforval = 'RECRUITMENT_'.strtoupper($tmpobjectkey).'_ADDON_PDF';
178 dolibarr_del_const($db, $constforval, $conf->entity);
179 }
180}
181
182
183
184/*
185 * View
186 */
187
188$form = new Form($db);
189
190$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
191
192$page_name = "RecruitmentSetup";
193llxHeader('', $langs->trans($page_name));
194
195// Subheader
196$linkback = '<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1').'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
197
198print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup');
199
200// Configuration header
202print dol_get_fiche_head($head, 'settings', '', -1, '');
203
204// Setup page goes here
205//echo '<span class="opacitymedium">'.$langs->trans("RecruitmentSetupPage").'</span><br><br>';
206
207
208if ($action == 'edit') {
209 print '<form method="POST" action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'">';
210 print '<input type="hidden" name="token" value="'.newToken().'">';
211 print '<input type="hidden" name="action" value="update">';
212
213 print '<table class="noborder centpercent">';
214 print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
215
216 foreach ($arrayofparameters as $key => $val) { // @phan-suppress-current-line PhanEmptyForeach
217 print '<tr class="oddeven"><td>';
218 $tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : '');
219 print $form->textwithpicto($langs->trans($key), $tooltiphelp);
220 print '</td><td><input name="'.$key.'" class="flat '.(empty($val['css']) ? 'minwidth200' : $val['css']).'" value="'.getDolGlobalString($key).'"></td></tr>';
221 }
222 print '</table>';
223
224 print '<br><div class="center">';
225 print '<input class="button button-save" type="submit" value="'.$langs->trans("Save").'">';
226 print '</div>';
227
228 print '</form>';
229 print '<br>';
230} else {
231 if (!empty($arrayofparameters)) {
232 print '<table class="noborder centpercent">';
233 print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td></td></tr>';
234
235 foreach ($arrayofparameters as $key => $val) {
236 $setupnotempty++;
237
238 print '<tr class="oddeven"><td>';
239 $tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : '');
240 print $form->textwithpicto($langs->trans($key), $tooltiphelp);
241 print '</td><td>'.getDolGlobalString($key).'</td></tr>';
242 }
243
244 print '</table>';
245
246 print '<div class="tabsAction">';
247 print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a>';
248 print '</div>';
249 }
250}
251
252
253foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
254 if ($myTmpObjectArray['includerefgeneration']) {
255 // Numbering models
256 $setupnotempty++;
257
258 print load_fiche_titre($langs->trans("NumberingModules", $myTmpObjectKey), '', '');
259
260 print '<table class="noborder centpercent">';
261 print '<tr class="liste_titre">';
262 print '<td>'.$langs->trans("Name").'</td>';
263 print '<td>'.$langs->trans("Description").'</td>';
264 print '<td class="nowrap">'.$langs->trans("Example").'</td>';
265 print '<td class="center" width="60">'.$langs->trans("Status").'</td>';
266 print '<td class="center" width="16">'.$langs->trans("ShortInfo").'</td>';
267 print '</tr>'."\n";
268
269 clearstatcache();
270
271 foreach ($dirmodels as $reldir) {
272 $dir = dol_buildpath($reldir."core/modules/".$moduledir);
273
274 if (is_dir($dir)) {
275 $handle = opendir($dir);
276 if (is_resource($handle)) {
277 while (($file = readdir($handle)) !== false) {
278 if (strpos($file, 'mod_'.strtolower($myTmpObjectKey).'_') === 0 && substr($file, dol_strlen($file) - 3, 3) == 'php') {
279 $file = substr($file, 0, dol_strlen($file) - 4);
280 print '<!-- '.$dir.'/'.$file.' -->'."\n";
281 require_once $dir.'/'.$file.'.php';
282
283 $module = new $file($db);
284 '@phan-var-force ModeleNumRefRecruitmentJobPosition $module';
285
286 // Show modules according to features level
287 if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
288 continue;
289 }
290 if ($module->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1) {
291 continue;
292 }
293
294 if ($module->isEnabled()) {
295 dol_include_once('/'.$moduledir.'/class/'.strtolower($myTmpObjectKey).'.class.php');
296
297 print '<tr class="oddeven"><td>'.$module->name."</td><td>\n";
298 print $module->info($langs);
299 print '</td>';
300
301 // Show example of numbering model
302 print '<td class="nowrap">';
303 $tmp = $module->getExample();
304 if (preg_match('/^Error/', $tmp)) {
305 $langs->load("errors");
306 print '<div class="error">'.$langs->trans($tmp).'</div>';
307 } elseif ($tmp == 'NotConfigured') {
308 print $langs->trans($tmp);
309 } else {
310 print $tmp;
311 }
312 print '</td>'."\n";
313
314 print '<td class="center">';
315 $constforvar = 'RECRUITMENT_'.strtoupper($myTmpObjectKey).'_ADDON';
316 if (getDolGlobalString($constforvar) == $file) {
317 print img_picto($langs->trans("Activated"), 'switch_on');
318 } else {
319 print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&object='.strtolower($myTmpObjectKey).'&value='.urlencode($file).'">';
320 print img_picto($langs->trans("Disabled"), 'switch_off');
321 print '</a>';
322 }
323 print '</td>';
324
325 $className = $myTmpObjectArray['class'];
326 $mytmpinstance = new $className($db);
327 $mytmpinstance->initAsSpecimen();
328
329 // Info
330 $htmltooltip = '';
331 $htmltooltip .= ''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
332
333 $nextval = $module->getNextValue($mytmpinstance);
334 if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
335 $htmltooltip .= ''.$langs->trans("NextValue").': ';
336 if ($nextval) {
337 if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') {
338 $nextval = $langs->trans($nextval);
339 }
340 $htmltooltip .= $nextval.'<br>';
341 } else {
342 $htmltooltip .= $langs->trans($module->error).'<br>';
343 }
344 }
345
346 print '<td class="center">';
347 print $form->textwithpicto('', $htmltooltip, 1, 'info');
348 print '</td>';
349
350 print "</tr>\n";
351 }
352 }
353 }
354 closedir($handle);
355 }
356 }
357 }
358 print "</table><br>\n";
359 }
360
361 if ($myTmpObjectArray['includedocgeneration']) {
362 /*
363 * Document templates generators
364 */
365 $setupnotempty++;
366 $type = strtolower($myTmpObjectKey);
367
368 print load_fiche_titre($langs->trans("DocumentModules", $myTmpObjectKey), '', '');
369
370 // Load array def with activated templates
371 $def = array();
372 $sql = "SELECT nom";
373 $sql .= " FROM ".MAIN_DB_PREFIX."document_model";
374 $sql .= " WHERE type = '".$db->escape($type)."'";
375 $sql .= " AND entity = ".$conf->entity;
376 $resql = $db->query($sql);
377 if ($resql) {
378 $i = 0;
379 $num_rows = $db->num_rows($resql);
380 while ($i < $num_rows) {
381 $array = $db->fetch_array($resql);
382 if (is_array($array)) {
383 array_push($def, $array[0]);
384 }
385 $i++;
386 }
387 } else {
389 }
390
391
392 print "<table class=\"noborder\" width=\"100%\">\n";
393 print "<tr class=\"liste_titre\">\n";
394 print '<td>'.$langs->trans("Name").'</td>';
395 print '<td>'.$langs->trans("Description").'</td>';
396 print '<td class="center" width="60">'.$langs->trans("Status")."</td>\n";
397 print '<td class="center" width="60">'.$langs->trans("Default")."</td>\n";
398 print '<td class="center" width="38">'.$langs->trans("ShortInfo").'</td>';
399 print '<td class="center" width="38">'.$langs->trans("Preview").'</td>';
400 print "</tr>\n";
401
402 clearstatcache();
403 $filelist = array();
404
405 foreach ($dirmodels as $reldir) {
406 foreach (array('', '/doc') as $valdir) {
407 $realpath = $reldir."core/modules/".$moduledir.$valdir;
408 $dir = dol_buildpath($realpath);
409
410 if (is_dir($dir)) {
411 $handle = opendir($dir);
412 if (is_resource($handle)) {
413 while (($file = readdir($handle)) !== false) {
414 $filelist[] = $file;
415 }
416 closedir($handle);
417 arsort($filelist);
418
419 foreach ($filelist as $file) {
420 if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
421 if (file_exists($dir.'/'.$file)) {
422 $name = substr($file, 4, dol_strlen($file) - 16);
423 $classname = substr($file, 0, dol_strlen($file) - 12);
424
425 require_once $dir.'/'.$file;
426 $module = new $classname($db);
427 '@phan-var-force ModelePDFRecruitmentJobPosition $module';
428
429 $modulequalified = 1;
430 if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
431 $modulequalified = 0;
432 }
433 if ($module->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1) {
434 $modulequalified = 0;
435 }
436
437 if ($modulequalified) {
438 print '<tr class="oddeven"><td width="100">';
439 print(empty($module->name) ? $name : $module->name);
440 print "</td><td>\n";
441 if (method_exists($module, 'info')) {
442 print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
443 } else {
444 print $module->description;
445 }
446 print '</td>';
447
448 // Active
449 if (in_array($name, $def)) {
450 print '<td class="center">'."\n";
451 print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
452 print img_picto($langs->trans("Enabled"), 'switch_on');
453 print '</a>';
454 print '</td>';
455 } else {
456 print '<td class="center">'."\n";
457 print '<a 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>';
458 print "</td>";
459 }
460
461 // Default
462 print '<td class="center">';
463 $constforvar = 'RECRUITMENT_'.strtoupper($myTmpObjectKey).'_ADDON_PDF';
464 if (getDolGlobalString($constforvar) == $name) {
465 //print img_picto($langs->trans("Default"), 'on');
466 // Even if choice is the default value, we allow to disable it. Replace this with previous line if you need to disable unset
467 print '<a href="'.$_SERVER["PHP_SELF"].'?action=unsetdoc&token='.newToken().'&object='.urlencode(strtolower($myTmpObjectKey)).'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type='.urlencode($type).'" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
468 } else {
469 print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&object='.urlencode(strtolower($myTmpObjectKey)).'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
470 }
471 print '</td>';
472
473 // Info
474 $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
475 $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
476 if ($module->type == 'pdf') {
477 $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
478 }
479 $htmltooltip .= '<br>'.$langs->trans("Path").': '.preg_replace('/^\//', '', $realpath).'/'.$file;
480
481 $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
482 $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
483 $htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
484
485 print '<td class="center">';
486 print $form->textwithpicto('', $htmltooltip, 1, 'info');
487 print '</td>';
488
489 // Preview
490 print '<td class="center">';
491 if ($module->type == 'pdf') {
492 $newname = preg_replace('/_'.preg_quote(strtolower($myTmpObjectKey), '/').'/', '', $name);
493 print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.urlencode($newname).'&object='.urlencode($myTmpObjectKey).'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
494 } else {
495 print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic');
496 }
497 print '</td>';
498
499 print "</tr>\n";
500 }
501 }
502 }
503 }
504 }
505 }
506 }
507 }
508
509 print '</table>';
510 }
511}
512
513if (empty($setupnotempty)) {
514 print '<br>'.$langs->trans("NothingToSetup");
515}
516
517// Page end
518print dol_get_fiche_end();
519
520llxFooter();
521$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.
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:91
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:73
Class to manage generation of HTML components Only common components must be here.
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $db
API class for accounts.
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, $allowothertags=array())
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, $morecssdiv='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $allowothertags=array())
Show a picto called object_picto (generic function)
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
if(!function_exists( 'dol_getprefix')) dol_include_once($relpath, $classname='')
Make an include_once using default root and alternate root if it fails.
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...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
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.
recruitmentAdminPrepareHead()
Prepare admin pages header.
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:133
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.