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