dolibarr  16.0.5
setup_candidatures.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
3  * Copyright (C) 2020 Adminson Alicealalalamdskfldmjgdfgdfhfghgfh <testldr9@dolicloud.com>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <https://www.gnu.org/licenses/>.
17  */
18 
25 // Load Dolibarr environment
26 $res = 0;
27 // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)
28 if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) {
29  $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php";
30 }
31 // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME
32 $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1;
33 while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) {
34  $i--; $j--;
35 }
36 if (!$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 }
39 if (!$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
43 if (!$res && file_exists("../../main.inc.php")) {
44  $res = @include "../../main.inc.php";
45 }
46 if (!$res && file_exists("../../../main.inc.php")) {
47  $res = @include "../../../main.inc.php";
48 }
49 if (!$res) {
50  die("Include of main fails");
51 }
52 
53 global $langs, $user;
54 
55 // Libraries
56 require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
57 require_once DOL_DOCUMENT_ROOT.'/recruitment/lib/recruitment.lib.php';
58 require_once DOL_DOCUMENT_ROOT."/recruitment/class/recruitmentjobposition.class.php";
59 
60 // Translations
61 $langs->loadLangs(array("admin", "recruitment"));
62 
63 // Access control
64 if (!$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 = 'recruitmentcandidature';
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 
91 if ((float) DOL_VERSION >= 6) {
92  include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
93 }
94 
95 if ($action == 'updateMask') {
96  $maskconstorder = GETPOST('maskconstorder', 'alpha');
97  $maskorder = GETPOST('maskorder', 'alpha');
98 
99  if ($maskconstorder) {
100  $res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity);
101  }
102 
103  if (!($res > 0)) {
104  $error++;
105  }
106 
107  if (!$error) {
108  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
109  } else {
110  setEventMessages($langs->trans("Error"), null, 'errors');
111  }
112 } elseif ($action == 'specimen') {
113  $modele = GETPOST('module', 'alpha');
114  $tmpobjectkey = GETPOST('object');
115 
116  $tmpobject = new $tmpobjectkey($db);
117  $tmpobject->initAsSpecimen();
118 
119  // Search template files
120  $file = ''; $classname = ''; $filefound = 0;
121  $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
122  foreach ($dirmodels as $reldir) {
123  $file = dol_buildpath($reldir."core/modules/mymodule/doc/pdf_".$modele."_".strtolower($tmpobjectkey).".modules.php", 0);
124  if (file_exists($file)) {
125  $filefound = 1;
126  $classname = "pdf_".$modele;
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=".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  $tmpobjectkey = GETPOST('object');
152 
153  $ret = delDocumentModel($value, $type);
154  if ($ret > 0) {
155  $constforval = 'RECRUITMENT_'.strtoupper($tmpobjectkey).'_ADDON_PDF';
156  if ($conf->global->$constforval == "$value") {
157  dolibarr_del_const($db, $constforval, $conf->entity);
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  $constforval = 'RECRUITMENT_'.strtoupper($tmpobjectkey).'_ADDON_PDF';
172  if (dolibarr_set_const($db, $constforval, $value, 'chaine', 0, '', $conf->entity)) {
173  // The constant that was read before the new set
174  // We therefore requires a variable to have a coherent view
175  $conf->global->$constforval = $value;
176  }
177 
178  // We disable/enable the document template (into llx_document_model table)
179  $ret = delDocumentModel($value, $type);
180  if ($ret > 0) {
181  $ret = addDocumentModel($value, $type, $label, $scandir);
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";
202 llxHeader('', $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 
207 print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup');
208 
209 // Configuration header
211 print dol_get_fiche_head($head, 'settings_candidatures', '', -1, '');
212 
213 // Setup page goes here
214 //echo '<span class="opacitymedium">'.$langs->trans("RecruitmentSetupPage").'</span><br><br>';
215 
216 
217 if ($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['RecruitmentCandidature'] = array('includerefgeneration'=>1, 'includedocgeneration'=>0);
265 
266 
267 foreach ($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 
297  require_once $dir.'/'.$file.'.php';
298 
299  $module = new $file($db);
300 
301  // Show modules according to features level
302  if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
303  continue;
304  }
305  if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
306  continue;
307  }
308 
309  if ($module->isEnabled()) {
310  dol_include_once('/'.$moduledir.'/class/'.strtolower($myTmpObjectKey).'.class.php');
311 
312  print '<tr class="oddeven"><td>'.$module->name."</td><td>\n";
313  print $module->info();
314  print '</td>';
315 
316  // Show example of numbering model
317  print '<td class="nowrap">';
318  $tmp = $module->getExample();
319  if (preg_match('/^Error/', $tmp)) {
320  $langs->load("errors");
321  print '<div class="error">'.$langs->trans($tmp).'</div>';
322  } elseif ($tmp == 'NotConfigured') {
323  print $langs->trans($tmp);
324  } else {
325  print $tmp;
326  }
327  print '</td>'."\n";
328 
329  print '<td class="center">';
330  $constforvar = 'RECRUITMENT_'.strtoupper($myTmpObjectKey).'_ADDON';
331  if (getDolGlobalString($constforvar) == $file) {
332  print img_picto($langs->trans("Activated"), 'switch_on');
333  } else {
334  print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&object='.strtolower($myTmpObjectKey).'&value='.urlencode($file).'">';
335  print img_picto($langs->trans("Disabled"), 'switch_off');
336  print '</a>';
337  }
338  print '</td>';
339 
340  $mytmpinstance = new $myTmpObjectKey($db);
341  $mytmpinstance->initAsSpecimen();
342 
343  // Info
344  $htmltooltip = '';
345  $htmltooltip .= ''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
346 
347  $nextval = $module->getNextValue($mytmpinstance);
348  if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
349  $htmltooltip .= ''.$langs->trans("NextValue").': ';
350  if ($nextval) {
351  if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') {
352  $nextval = $langs->trans($nextval);
353  }
354  $htmltooltip .= $nextval.'<br>';
355  } else {
356  $htmltooltip .= $langs->trans($module->error).'<br>';
357  }
358  }
359 
360  print '<td class="center">';
361  print $form->textwithpicto('', $htmltooltip, 1, 0);
362  print '</td>';
363 
364  print "</tr>\n";
365  }
366  }
367  }
368  closedir($handle);
369  }
370  }
371  }
372  print "</table><br>\n";
373  }
374 
375  if ($myTmpObjectArray['includedocgeneration']) {
376  /*
377  * Document templates generators
378  */
379  $setupnotempty++;
380  $type = strtolower($myTmpObjectKey);
381 
382  print load_fiche_titre($langs->trans("DocumentModules", $myTmpObjectKey), '', '');
383 
384  // Load array def with activated templates
385  $def = array();
386  $sql = "SELECT nom";
387  $sql .= " FROM ".MAIN_DB_PREFIX."document_model";
388  $sql .= " WHERE type = '".$db->escape($type)."'";
389  $sql .= " AND entity = ".$conf->entity;
390  $resql = $db->query($sql);
391  if ($resql) {
392  $i = 0;
393  $num_rows = $db->num_rows($resql);
394  while ($i < $num_rows) {
395  $array = $db->fetch_array($resql);
396  array_push($def, $array[0]);
397  $i++;
398  }
399  } else {
400  dol_print_error($db);
401  }
402 
403 
404  print "<table class=\"noborder\" width=\"100%\">\n";
405  print "<tr class=\"liste_titre\">\n";
406  print '<td>'.$langs->trans("Name").'</td>';
407  print '<td>'.$langs->trans("Description").'</td>';
408  print '<td class="center" width="60">'.$langs->trans("Status")."</td>\n";
409  print '<td class="center" width="60">'.$langs->trans("Default")."</td>\n";
410  print '<td class="center" width="38">'.$langs->trans("ShortInfo").'</td>';
411  print '<td class="center" width="38">'.$langs->trans("Preview").'</td>';
412  print "</tr>\n";
413 
414  clearstatcache();
415 
416  foreach ($dirmodels as $reldir) {
417  foreach (array('', '/doc') as $valdir) {
418  $realpath = $reldir."core/modules/".$moduledir.$valdir;
419  $dir = dol_buildpath($realpath);
420 
421  if (is_dir($dir)) {
422  $handle = opendir($dir);
423  if (is_resource($handle)) {
424  while (($file = readdir($handle)) !== false) {
425  $filelist[] = $file;
426  }
427  closedir($handle);
428  arsort($filelist);
429 
430  foreach ($filelist as $file) {
431  if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
432  if (file_exists($dir.'/'.$file)) {
433  $name = substr($file, 4, dol_strlen($file) - 16);
434  $classname = substr($file, 0, dol_strlen($file) - 12);
435 
436  require_once $dir.'/'.$file;
437  $module = new $classname($db);
438 
439  $modulequalified = 1;
440  if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
441  $modulequalified = 0;
442  }
443  if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
444  $modulequalified = 0;
445  }
446 
447  if ($modulequalified) {
448  print '<tr class="oddeven"><td width="100">';
449  print (empty($module->name) ? $name : $module->name);
450  print "</td><td>\n";
451  if (method_exists($module, 'info')) {
452  print $module->info($langs);
453  } else {
454  print $module->description;
455  }
456  print '</td>';
457 
458  // Active
459  if (in_array($name, $def)) {
460  print '<td class="center">'."\n";
461  print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
462  print img_picto($langs->trans("Enabled"), 'switch_on');
463  print '</a>';
464  print '</td>';
465  } else {
466  print '<td class="center">'."\n";
467  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>';
468  print "</td>";
469  }
470 
471  // Default
472  print '<td class="center">';
473  $constforvar = 'RECRUITMENT_'.strtoupper($myTmpObjectKey).'_ADDON';
474  if (getDolGlobalString($constforvar) == $name) {
475  //print img_picto($langs->trans("Default"), 'on');
476  // Even if choice is the default value, we allow to disable it. Replace this with previous line if you need to disable unset
477  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>';
478  } else {
479  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>';
480  }
481  print '</td>';
482 
483  // Info
484  $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
485  $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
486  if ($module->type == 'pdf') {
487  $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
488  }
489  $htmltooltip .= '<br>'.$langs->trans("Path").': '.preg_replace('/^\//', '', $realpath).'/'.$file;
490 
491  $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
492  $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
493  $htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
494 
495  print '<td class="center">';
496  print $form->textwithpicto('', $htmltooltip, 1, 0);
497  print '</td>';
498 
499  // Preview
500  print '<td class="center">';
501  if ($module->type == 'pdf') {
502  print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'&object='.$myTmpObjectKey.'">'.img_object($langs->trans("Preview"), 'generic').'</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 
522 if (empty($setupnotempty)) {
523  print '<br>'.$langs->trans("NothingToSetup");
524 }
525 
526 // Page end
527 print dol_get_fiche_end();
528 
529 llxFooter();
530 $db->close();
yn
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
Definition: functions.lib.php:6491
llxFooter
llxFooter()
Empty footer.
Definition: wrapper.php:73
dolibarr_del_const
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
Definition: admin.lib.php:552
recruitmentAdminPrepareHead
recruitmentAdminPrepareHead()
Prepare admin pages header.
Definition: recruitment.lib.php:29
load_fiche_titre
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
Definition: functions.lib.php:5204
GETPOST
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Definition: functions.lib.php:484
dol_print_error
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
Definition: functions.lib.php:4844
dol_include_once
if(!function_exists('dol_getprefix')) dol_include_once($relpath, $classname='')
Make an include_once using default root and alternate root if it fails.
Definition: functions.lib.php:1033
dol_buildpath
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
Definition: functions.lib.php:1062
$form
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:142
img_picto
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
Definition: functions.lib.php:3880
delDocumentModel
delDocumentModel($name, $type)
Delete document model used by doc generator.
Definition: admin.lib.php:1894
dol_syslog
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
Definition: functions.lib.php:1603
dol_get_fiche_head
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
Definition: functions.lib.php:1822
getDolGlobalString
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
Definition: functions.lib.php:80
dol_strlen
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
Definition: functions.lib.php:3747
newToken
newToken()
Return the value of token currently saved into session with name 'newtoken'.
Definition: functions.lib.php:10878
dol_get_fiche_end
dol_get_fiche_end($notab=0)
Return tab footer of a card.
Definition: functions.lib.php:2018
dolibarr_set_const
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:627
addDocumentModel
addDocumentModel($name, $type, $label='', $description='')
Add document model used by doc generator.
Definition: admin.lib.php:1863
Form
Class to manage generation of HTML components Only common components must be here.
Definition: html.form.class.php:52
img_object
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
Definition: functions.lib.php:4211
$resql
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire)||(isModEnabled('supplier_invoice') && $user->rights->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->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
Definition: index.php:742
setEventMessages
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
Definition: functions.lib.php:8137
accessforbidden
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
Definition: security.lib.php:933
llxHeader
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Definition: wrapper.php:59