dolibarr  13.0.2
setup.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"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php";
29 // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME
30 $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1;
31 while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; }
32 if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php";
33 if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php";
34 // Try main.inc.php using relative path
35 if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php";
36 if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php";
37 if (!$res) die("Include of main fails");
38 
39 global $langs, $user;
40 
41 // Libraries
42 require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
43 require_once DOL_DOCUMENT_ROOT.'/recruitment/lib/recruitment.lib.php';
44 require_once DOL_DOCUMENT_ROOT."/recruitment/class/recruitmentjobposition.class.php";
45 
46 // Translations
47 $langs->loadLangs(array("admin", "recruitment"));
48 
49 // Access control
50 if (!$user->admin) accessforbidden();
51 
52 // Parameters
53 $action = GETPOST('action', 'aZ09');
54 $backtopage = GETPOST('backtopage', 'alpha');
55 
56 $value = GETPOST('value', 'alpha');
57 $label = GETPOST('label', 'alpha');
58 $scandir = GETPOST('scan_dir', 'alpha');
59 $type = 'recruitmentjobposition';
60 
61 $arrayofparameters = array(
62 // 'RECRUITMENT_MYPARAM1'=>array('css'=>'minwidth200', 'enabled'=>1),
63 // 'RECRUITMENT_MYPARAM2'=>array('css'=>'minwidth500', 'enabled'=>1)
64 );
65 
66 $error = 0;
67 $setupnotempty = 0;
68 
69 
70 /*
71  * Actions
72  */
73 
74 if ((float) DOL_VERSION >= 6)
75 {
76  include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
77 }
78 
79 if ($action == 'updateMask')
80 {
81  $maskconstorder = GETPOST('maskconstorder', 'alpha');
82  $maskorder = GETPOST('maskorder', 'alpha');
83 
84  if ($maskconstorder) $res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity);
85 
86  if (!($res > 0)) $error++;
87 
88  if (!$error)
89  {
90  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
91  } else {
92  setEventMessages($langs->trans("Error"), null, 'errors');
93  }
94 } elseif ($action == 'specimen')
95 {
96  $modele = GETPOST('module', 'alpha');
97  $tmpobjectkey = GETPOST('object');
98 
99  $tmpobject = new $tmpobjectkey($db);
100  $tmpobject->initAsSpecimen();
101 
102  // Search template files
103  $file = ''; $classname = ''; $filefound = 0;
104  $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
105  foreach ($dirmodels as $reldir)
106  {
107  $file = dol_buildpath($reldir."core/modules/mymodule/doc/pdf_".$modele."_".strtolower($tmpobjectkey).".modules.php", 0);
108  if (file_exists($file))
109  {
110  $filefound = 1;
111  $classname = "pdf_".$modele;
112  break;
113  }
114  }
115 
116  if ($filefound)
117  {
118  require_once $file;
119 
120  $module = new $classname($db);
121 
122  if ($module->write_file($tmpobject, $langs) > 0)
123  {
124  header("Location: ".DOL_URL_ROOT."/document.php?modulepart=".strtolower($tmpobjectkey)."&file=SPECIMEN.pdf");
125  return;
126  } else {
127  setEventMessages($module->error, null, 'errors');
128  dol_syslog($module->error, LOG_ERR);
129  }
130  } else {
131  setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
132  dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
133  }
134 }
135 
136 // Activate a model
137 elseif ($action == 'set') {
138  $ret = addDocumentModel($value, $type, $label, $scandir);
139 } elseif ($action == 'del') {
140  $ret = delDocumentModel($value, $type);
141  if ($ret > 0) {
142  $tmpobjectkey = GETPOST('object');
143  if (!empty($tmpobjectkey)) {
144  $constforval = 'RECRUITMENT_'.strtoupper($tmpobjectkey).'_ADDON_PDF';
145  if ($conf->global->$constforval == "$value") dolibarr_del_const($db, $constforval, $conf->entity);
146  }
147  }
148 }
149 
150 elseif ($action == 'setmod') {
151  // TODO Check if numbering module chosen can be activated by calling method canBeActivated
152  $tmpobjectkey = GETPOST('object');
153  if (!empty($tmpobjectkey)) {
154  $constforval = 'RECRUITMENT_'.strtoupper($tmpobjectkey)."_ADDON";
155 
156  dolibarr_set_const($db, $constforval, $value, 'chaine', 0, '', $conf->entity);
157  }
158 }
159 
160 // Set default model
161 elseif ($action == 'setdoc') {
162  $tmpobjectkey = GETPOST('object');
163  if (!empty($tmpobjectkey)) {
164  $constforval = 'RECRUITMENT_'.strtoupper($tmpobjectkey).'_ADDON_PDF';
165  if (dolibarr_set_const($db, $constforval, $value, 'chaine', 0, '', $conf->entity)) {
166  // The constant that was read before the new set
167  // We therefore requires a variable to have a coherent view
168  $conf->global->$constforval = $value;
169  }
170 
171  // We disable/enable the document template (into llx_document_model table)
172  $ret = delDocumentModel($value, $type);
173  if ($ret > 0) {
174  $ret = addDocumentModel($value, $type, $label, $scandir);
175  }
176  }
177 } elseif ($action == 'unsetdoc') {
178  $tmpobjectkey = GETPOST('object');
179  if (!empty($tmpobjectkey)) {
180  $constforval = 'RECRUITMENT_'.strtoupper($tmpobjectkey).'_ADDON_PDF';
181  dolibarr_del_const($db, $constforval, $conf->entity);
182  }
183 }
184 
185 
186 
187 /*
188  * View
189  */
190 
191 $form = new Form($db);
192 
193 $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
194 
195 $page_name = "RecruitmentSetup";
196 llxHeader('', $langs->trans($page_name));
197 
198 // Subheader
199 $linkback = '<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1').'">'.$langs->trans("BackToModuleList").'</a>';
200 
201 print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup');
202 
203 // Configuration header
205 print dol_get_fiche_head($head, 'settings', '', -1, '');
206 
207 // Setup page goes here
208 //echo '<span class="opacitymedium">'.$langs->trans("RecruitmentSetupPage").'</span><br><br>';
209 
210 
211 if ($action == 'edit')
212 {
213  print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
214  print '<input type="hidden" name="token" value="'.newToken().'">';
215  print '<input type="hidden" name="action" value="update">';
216 
217  print '<table class="noborder centpercent">';
218  print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
219 
220  foreach ($arrayofparameters as $key => $val)
221  {
222  print '<tr class="oddeven"><td>';
223  $tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : '');
224  print $form->textwithpicto($langs->trans($key), $tooltiphelp);
225  print '</td><td><input name="'.$key.'" class="flat '.(empty($val['css']) ? 'minwidth200' : $val['css']).'" value="'.$conf->global->$key.'"></td></tr>';
226  }
227  print '</table>';
228 
229  print '<br><div class="center">';
230  print '<input class="button button-save" type="submit" value="'.$langs->trans("Save").'">';
231  print '</div>';
232 
233  print '</form>';
234  print '<br>';
235 } else {
236  if (!empty($arrayofparameters))
237  {
238  print '<table class="noborder centpercent">';
239  print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
240 
241  foreach ($arrayofparameters as $key => $val)
242  {
243  $setupnotempty++;
244 
245  print '<tr class="oddeven"><td>';
246  $tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : '');
247  print $form->textwithpicto($langs->trans($key), $tooltiphelp);
248  print '</td><td>'.$conf->global->$key.'</td></tr>';
249  }
250 
251  print '</table>';
252 
253  print '<div class="tabsAction">';
254  print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>';
255  print '</div>';
256  }
257 }
258 
259 
260 $moduledir = 'recruitment';
261 $myTmpObjects = array();
262 $myTmpObjects['RecruitmentJobPosition'] = array('includerefgeneration'=>1, 'includedocgeneration'=>1);
263 
264 
265 foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
266  if ($myTmpObjectArray['includerefgeneration']) {
267  /*
268  * Orders Numbering model
269  */
270  $setupnotempty++;
271 
272  print load_fiche_titre($langs->trans("NumberingModules", $myTmpObjectKey), '', '');
273 
274  print '<table class="noborder centpercent">';
275  print '<tr class="liste_titre">';
276  print '<td>'.$langs->trans("Name").'</td>';
277  print '<td>'.$langs->trans("Description").'</td>';
278  print '<td class="nowrap">'.$langs->trans("Example").'</td>';
279  print '<td class="center" width="60">'.$langs->trans("Status").'</td>';
280  print '<td class="center" width="16">'.$langs->trans("ShortInfo").'</td>';
281  print '</tr>'."\n";
282 
283  clearstatcache();
284 
285  foreach ($dirmodels as $reldir)
286  {
287  $dir = dol_buildpath($reldir."core/modules/".$moduledir);
288 
289  if (is_dir($dir))
290  {
291  $handle = opendir($dir);
292  if (is_resource($handle))
293  {
294  while (($file = readdir($handle)) !== false)
295  {
296  if (strpos($file, 'mod_'.strtolower($myTmpObjectKey).'_') === 0 && substr($file, dol_strlen($file) - 3, 3) == 'php')
297  {
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' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
305  if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
306 
307  if ($module->isEnabled())
308  {
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') print $langs->trans($tmp);
322  else print $tmp;
323  print '</td>'."\n";
324 
325  print '<td class="center">';
326  $constforvar = 'RECRUITMENT_'.strtoupper($myTmpObjectKey).'_ADDON';
327  if ($conf->global->$constforvar == $file)
328  {
329  print img_picto($langs->trans("Activated"), 'switch_on');
330  } else {
331  print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&object='.strtolower($myTmpObjectKey).'&value='.urlencode($file).'">';
332  print img_picto($langs->trans("Disabled"), 'switch_off');
333  print '</a>';
334  }
335  print '</td>';
336 
337  $mytmpinstance = new $myTmpObjectKey($db);
338  $mytmpinstance->initAsSpecimen();
339 
340  // Info
341  $htmltooltip = '';
342  $htmltooltip .= ''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
343 
344  $nextval = $module->getNextValue($mytmpinstance);
345  if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
346  $htmltooltip .= ''.$langs->trans("NextValue").': ';
347  if ($nextval) {
348  if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured')
349  $nextval = $langs->trans($nextval);
350  $htmltooltip .= $nextval.'<br>';
351  } else {
352  $htmltooltip .= $langs->trans($module->error).'<br>';
353  }
354  }
355 
356  print '<td class="center">';
357  print $form->textwithpicto('', $htmltooltip, 1, 0);
358  print '</td>';
359 
360  print "</tr>\n";
361  }
362  }
363  }
364  closedir($handle);
365  }
366  }
367  }
368  print "</table><br>\n";
369  }
370 
371  if ($myTmpObjectArray['includedocgeneration']) {
372  /*
373  * Document templates generators
374  */
375  $setupnotempty++;
376  $type = strtolower($myTmpObjectKey);
377 
378  print load_fiche_titre($langs->trans("DocumentModules", $myTmpObjectKey), '', '');
379 
380  // Load array def with activated templates
381  $def = array();
382  $sql = "SELECT nom";
383  $sql .= " FROM ".MAIN_DB_PREFIX."document_model";
384  $sql .= " WHERE type = '".$db->escape($type)."'";
385  $sql .= " AND entity = ".$conf->entity;
386  $resql = $db->query($sql);
387  if ($resql) {
388  $i = 0;
389  $num_rows = $db->num_rows($resql);
390  while ($i < $num_rows)
391  {
392  $array = $db->fetch_array($resql);
393  array_push($def, $array[0]);
394  $i++;
395  }
396  } else {
397  dol_print_error($db);
398  }
399 
400 
401  print "<table class=\"noborder\" width=\"100%\">\n";
402  print "<tr class=\"liste_titre\">\n";
403  print '<td>'.$langs->trans("Name").'</td>';
404  print '<td>'.$langs->trans("Description").'</td>';
405  print '<td class="center" width="60">'.$langs->trans("Status")."</td>\n";
406  print '<td class="center" width="60">'.$langs->trans("Default")."</td>\n";
407  print '<td class="center" width="38">'.$langs->trans("ShortInfo").'</td>';
408  print '<td class="center" width="38">'.$langs->trans("Preview").'</td>';
409  print "</tr>\n";
410 
411  clearstatcache();
412 
413  foreach ($dirmodels as $reldir)
414  {
415  foreach (array('', '/doc') as $valdir)
416  {
417  $realpath = $reldir."core/modules/".$moduledir.$valdir;
418  $dir = dol_buildpath($realpath);
419 
420  if (is_dir($dir))
421  {
422  $handle = opendir($dir);
423  if (is_resource($handle))
424  {
425  while (($file = readdir($handle)) !== false)
426  {
427  $filelist[] = $file;
428  }
429  closedir($handle);
430  arsort($filelist);
431 
432  foreach ($filelist as $file)
433  {
434  if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file))
435  {
436  if (file_exists($dir.'/'.$file))
437  {
438  $name = substr($file, 4, dol_strlen($file) - 16);
439  $classname = substr($file, 0, dol_strlen($file) - 12);
440 
441  require_once $dir.'/'.$file;
442  $module = new $classname($db);
443 
444  $modulequalified = 1;
445  if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified = 0;
446  if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified = 0;
447 
448  if ($modulequalified)
449  {
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')) print $module->info($langs);
454  else print $module->description;
455  print '</td>';
456 
457  // Active
458  if (in_array($name, $def))
459  {
460  print '<td class="center">'."\n";
461  print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&amp;token='.newToken().'&amp;value='.$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&amp;token='.newToken().'&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;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_PDF';
474  if ($conf->global->$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&amp;token='.newToken().'&amp;object='.urlencode(strtolower($myTmpObjectKey)).'&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'&amp;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().'&amp;object='.urlencode(strtolower($myTmpObjectKey)).'&amp;value='.$name.'&amp;scan_dir='.urlencode($module->scandir).'&amp;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  {
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  {
504  print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'&object='.$myTmpObjectKey.'">'.img_object($langs->trans("Preview"), 'generic').'</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();
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.
delDocumentModel($name, $type)
Delete document model used by doc generator.
Definition: admin.lib.php:1748
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
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:575
addDocumentModel($name, $type, $label= '', $description= '')
Add document model used by doc generator.
Definition: admin.lib.php:1717
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
llxHeader()
Empty header.
Definition: wrapper.php:45
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
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.
dol_strlen($string, $stringencoding= 'UTF-8')
Make a strlen call.
dolibarr_del_const($db, $name, $entity=1)
Effacement d&#39;une constante dans la base de donnees.
Definition: admin.lib.php:499
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it&#39;s its name (generic function)
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename= '', $restricttologhandler= '', $logcontext=null)
Write log message into outputs.
if(!GETPOST('transkey', 'alphanohtml')&&!GETPOST('transphrase', 'alphanohtml')) else
View.
Definition: notice.php:44
img_object($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
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 ...
recruitmentAdminPrepareHead()
Prepare admin pages header.
print $_SERVER["PHP_SELF"]
Edit parameters.
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
Definition: index.php:89
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
Definition: index.php:1232
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
newToken()
Return the value of token currently saved into session with name &#39;newtoken&#39;.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
print $_SERVER["PHP_SELF"] n
Edit parameters.
Definition: categories.php:101
llxFooter()
Empty footer.
Definition: wrapper.php:59
if(!defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN'
Draft customers invoices.