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