dolibarr  17.0.4
setup_candidatures.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)
27 if (!$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;
32 while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) {
33  $i--; $j--;
34 }
35 if (!$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 }
38 if (!$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
42 if (!$res && file_exists("../../main.inc.php")) {
43  $res = @include "../../main.inc.php";
44 }
45 if (!$res && file_exists("../../../main.inc.php")) {
46  $res = @include "../../../main.inc.php";
47 }
48 if (!$res) {
49  die("Include of main fails");
50 }
51 
52 global $langs, $user;
53 
54 // Libraries
55 require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
56 require_once DOL_DOCUMENT_ROOT.'/recruitment/lib/recruitment.lib.php';
57 require_once DOL_DOCUMENT_ROOT."/recruitment/class/recruitmentjobposition.class.php";
58 
59 // Translations
60 $langs->loadLangs(array("admin", "recruitment"));
61 
62 // Access control
63 if (!$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 = 'recruitmentcandidature';
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 
90 if ((float) DOL_VERSION >= 6) {
91  include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
92 }
93 
94 if ($action == 'updateMask') {
95  $maskconst = GETPOST('maskconstcand', 'aZ09');
96  $maskvalue = GETPOST('maskcand', 'alpha');
97 
98  if ($maskconst && preg_match('/_MASK$/', $maskconst)) {
99  $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity);
100  }
101 
102  if (!($res > 0)) {
103  $error++;
104  }
105 
106  if (!$error) {
107  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
108  } else {
109  setEventMessages($langs->trans("Error"), null, 'errors');
110  }
111 } elseif ($action == 'specimen') {
112  $modele = GETPOST('module', 'alpha');
113  $tmpobjectkey = GETPOST('object');
114 
115  $tmpobject = new $tmpobjectkey($db);
116  $tmpobject->initAsSpecimen();
117 
118  // Search template files
119  $file = ''; $classname = ''; $filefound = 0;
120  $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
121  foreach ($dirmodels as $reldir) {
122  $file = dol_buildpath($reldir."core/modules/mymodule/doc/pdf_".$modele."_".strtolower($tmpobjectkey).".modules.php", 0);
123  if (file_exists($file)) {
124  $filefound = 1;
125  $classname = "pdf_".$modele;
126  break;
127  }
128  }
129 
130  if ($filefound) {
131  require_once $file;
132 
133  $module = new $classname($db);
134 
135  if ($module->write_file($tmpobject, $langs) > 0) {
136  header("Location: ".DOL_URL_ROOT."/document.php?modulepart=".strtolower($tmpobjectkey)."&file=SPECIMEN.pdf");
137  return;
138  } else {
139  setEventMessages($module->error, null, 'errors');
140  dol_syslog($module->error, LOG_ERR);
141  }
142  } else {
143  setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
144  dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
145  }
146 } elseif ($action == 'set') {
147  // Activate a model
148  $ret = addDocumentModel($value, $type, $label, $scandir);
149 } elseif ($action == 'del') {
150  $tmpobjectkey = GETPOST('object');
151 
152  $ret = delDocumentModel($value, $type);
153  if ($ret > 0) {
154  $constforval = 'RECRUITMENT_'.strtoupper($tmpobjectkey).'_ADDON_PDF';
155  if ($conf->global->$constforval == "$value") {
156  dolibarr_del_const($db, $constforval, $conf->entity);
157  }
158  }
159 } elseif ($action == 'setmod') {
160  // TODO Check if numbering module chosen can be activated by calling method canBeActivated
161  $tmpobjectkey = GETPOST('object');
162  if (!empty($tmpobjectkey)) {
163  $constforval = 'RECRUITMENT_'.strtoupper($tmpobjectkey)."_ADDON";
164 
165  dolibarr_set_const($db, $constforval, $value, 'chaine', 0, '', $conf->entity);
166  }
167 } elseif ($action == 'setdoc') {
168  // Set default model
169  $tmpobjectkey = GETPOST('object');
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 } elseif ($action == 'unsetdoc') {
183  $tmpobjectkey = GETPOST('object');
184  if (!empty($tmpobjectkey)) {
185  $constforval = 'RECRUITMENT_'.strtoupper($tmpobjectkey).'_ADDON_PDF';
186  dolibarr_del_const($db, $constforval, $conf->entity);
187  }
188 }
189 
190 
191 
192 /*
193  * View
194  */
195 
196 $form = new Form($db);
197 
198 $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
199 
200 $page_name = "RecruitmentSetup";
201 llxHeader('', $langs->trans($page_name));
202 
203 // Subheader
204 $linkback = '<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1').'">'.$langs->trans("BackToModuleList").'</a>';
205 
206 print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup');
207 
208 // Configuration header
210 print dol_get_fiche_head($head, 'settings_candidatures', '', -1, '');
211 
212 // Setup page goes here
213 //echo '<span class="opacitymedium">'.$langs->trans("RecruitmentSetupPage").'</span><br><br>';
214 
215 
216 if ($action == 'edit') {
217  print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
218  print '<input type="hidden" name="token" value="'.newToken().'">';
219  print '<input type="hidden" name="action" value="update">';
220 
221  print '<table class="noborder centpercent">';
222  print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
223 
224  foreach ($arrayofparameters as $key => $val) {
225  print '<tr class="oddeven"><td>';
226  $tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : '');
227  print $form->textwithpicto($langs->trans($key), $tooltiphelp);
228  print '</td><td><input name="'.$key.'" class="flat '.(empty($val['css']) ? 'minwidth200' : $val['css']).'" value="'.getDolGlobalString($key).'"></td></tr>';
229  }
230  print '</table>';
231 
232  print '<br><div class="center">';
233  print '<input class="button button-save" type="submit" value="'.$langs->trans("Save").'">';
234  print '</div>';
235 
236  print '</form>';
237  print '<br>';
238 } else {
239  if (!empty($arrayofparameters)) {
240  print '<table class="noborder centpercent">';
241  print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
242 
243  foreach ($arrayofparameters as $key => $val) {
244  $setupnotempty++;
245 
246  print '<tr class="oddeven"><td>';
247  $tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : '');
248  print $form->textwithpicto($langs->trans($key), $tooltiphelp);
249  print '</td><td>'.getDolGlobalString($key).'</td></tr>';
250  }
251 
252  print '</table>';
253 
254  print '<div class="tabsAction">';
255  print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a>';
256  print '</div>';
257  }
258 }
259 
260 
261 $moduledir = 'recruitment';
262 $myTmpObjects = array();
263 $myTmpObjects['RecruitmentCandidature'] = array('includerefgeneration'=>1, 'includedocgeneration'=>0);
264 
265 
266 foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
267  if ($myTmpObjectArray['includerefgeneration']) {
268  /*
269  * Orders Numbering model
270  */
271  $setupnotempty++;
272 
273  print load_fiche_titre($langs->trans("NumberingModules", $myTmpObjectKey), '', '');
274 
275  print '<table class="noborder centpercent">';
276  print '<tr class="liste_titre">';
277  print '<td>'.$langs->trans("Name").'</td>';
278  print '<td>'.$langs->trans("Description").'</td>';
279  print '<td class="nowrap">'.$langs->trans("Example").'</td>';
280  print '<td class="center" width="60">'.$langs->trans("Status").'</td>';
281  print '<td class="center" width="16">'.$langs->trans("ShortInfo").'</td>';
282  print '</tr>'."\n";
283 
284  clearstatcache();
285 
286  foreach ($dirmodels as $reldir) {
287  $dir = dol_buildpath($reldir."core/modules/".$moduledir);
288 
289  if (is_dir($dir)) {
290  $handle = opendir($dir);
291  if (is_resource($handle)) {
292  while (($file = readdir($handle)) !== false) {
293  if (strpos($file, 'mod_'.strtolower($myTmpObjectKey).'_') === 0 && substr($file, dol_strlen($file) - 3, 3) == 'php') {
294  $file = substr($file, 0, dol_strlen($file) - 4);
295 
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';
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&amp;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  print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'&object='.$myTmpObjectKey.'">'.img_object($langs->trans("Preview"), 'generic').'</a>';
502  } else {
503  print img_object($langs->trans("PreviewNotAvailable"), 'generic');
504  }
505  print '</td>';
506 
507  print "</tr>\n";
508  }
509  }
510  }
511  }
512  }
513  }
514  }
515  }
516 
517  print '</table>';
518  }
519 }
520 
521 if (empty($setupnotempty)) {
522  print '<br>'.$langs->trans("NothingToSetup");
523 }
524 
525 // Page end
526 print dol_get_fiche_end();
527 
528 llxFooter();
529 $db->close();
addDocumentModel($name, $type, $label='', $description='')
Add document model used by doc generator.
Definition: admin.lib.php:1888
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).
Definition: admin.lib.php:632
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
Definition: admin.lib.php:556
delDocumentModel($name, $type)
Delete document model used by doc generator.
Definition: admin.lib.php:1919
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.
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("supplier_invoice", "lire"))) if(isModEnabled('don') &&!empty($user->rights->don->lire)) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->hasRight("commande", "lire") &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
Definition: index.php:745
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:143
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
if(!function_exists('dol_getprefix')) dol_include_once($relpath, $classname='')
Make an include_once using default root and alternate root if it fails.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
newToken()
Return the value of token currently saved into session with name 'newtoken'.
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.
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) 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.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.