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