dolibarr  19.0.0-dev
agenda_other.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2008-2016 Laurent Destailleur <eldy@users.sourceforge.net>
3  * Copyright (C) 2011 Regis Houssin <regis.houssin@inodbox.com>
4  * Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
5  * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
6  * Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
7  * Copyright (C) 2017 Open-DSI <support@open-dsi.fr>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program. If not, see <https://www.gnu.org/licenses/>.
21  */
22 
29 // Load Dolibarr environment
30 require '../main.inc.php';
31 require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
32 require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
33 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
34 require_once DOL_DOCUMENT_ROOT.'/core/class/defaultvalues.class.php';
35 
36 if (!$user->admin) {
38 }
39 
40 // Load translation files required by the page
41 $langs->loadLangs(array('admin', 'other', 'agenda', 'users'));
42 
43 $action = GETPOST('action', 'aZ09');
44 $value = GETPOST('value', 'alpha');
45 $modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
46 
47 $param = GETPOST('param', 'alpha');
48 $cancel = GETPOST('cancel', 'alpha');
49 $scandir = GETPOST('scan_dir', 'alpha');
50 $type = 'action';
51 
52 
53 /*
54  * Actions
55  */
56 
57 $error = 0;
58 $errors = array();
59 
60 include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
61 
62 $reg = array();
63 if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) {
64  $code = $reg[1];
65  $value = (GETPOST($code, 'alpha') ? GETPOST($code, 'alpha') : 1);
66  if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0) {
67  Header("Location: ".$_SERVER["PHP_SELF"]);
68  exit;
69  } else {
70  dol_print_error($db);
71  }
72 }
73 
74 if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) {
75  $code = $reg[1];
76  if (dolibarr_del_const($db, $code, $conf->entity) > 0) {
77  Header("Location: ".$_SERVER["PHP_SELF"]);
78  exit;
79  } else {
80  dol_print_error($db);
81  }
82 }
83 if ($action == 'set') {
84  $getDefaultFilter = GETPOST('AGENDA_DEFAULT_FILTER_TYPE');
85  $defaultfilter = (is_array($getDefaultFilter)) ? implode(',', $getDefaultFilter) : $getDefaultFilter;
86  dolibarr_set_const($db, 'AGENDA_USE_EVENT_TYPE_DEFAULT', GETPOST('AGENDA_USE_EVENT_TYPE_DEFAULT'), 'chaine', 0, '', $conf->entity);
87  dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_TYPE', $defaultfilter, 'chaine', 0, '', $conf->entity);
88  dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_STATUS', GETPOST('AGENDA_DEFAULT_FILTER_STATUS'), 'chaine', 0, '', $conf->entity);
89  dolibarr_set_const($db, 'AGENDA_DEFAULT_VIEW', GETPOST('AGENDA_DEFAULT_VIEW'), 'chaine', 0, '', $conf->entity);
90 
91  $defaultValues = new DefaultValues($db);
92  $result = $defaultValues->fetchAll('', '', 0, 0, array('t.page'=>'comm/action/card.php', 't.param'=>'complete', 't.user_id'=>'0', 't.type'=>'createform', 't.entity'=>$conf->entity));
93  if (!is_array($result) && $result < 0) {
94  setEventMessages($defaultValues->error, $defaultValues->errors, 'errors');
95  } elseif (count($result) > 0) {
96  foreach ($result as $defval) {
97  $defaultValues->id = $defval->id;
98  $resultDel = $defaultValues->delete($user);
99  if ($resultDel < 0) {
100  setEventMessages($defaultValues->error, $defaultValues->errors, 'errors');
101  }
102  }
103  }
104  $defaultValues->type = 'createform';
105  $defaultValues->entity = $conf->entity;
106  $defaultValues->user_id = 0;
107  $defaultValues->page = 'comm/action/card.php';
108  $defaultValues->param = 'complete';
109  $defaultValues->value = GETPOST('AGENDA_EVENT_DEFAULT_STATUS');
110  $resultCreat = $defaultValues->create($user);
111  if ($resultCreat < 0) {
112  setEventMessages($defaultValues->error, $defaultValues->errors, 'errors');
113  } else {
114  setEventMessages($langs->trans("RecordSaved"), null, 'mesgs');
115  }
116 } elseif ($action == 'specimen') { // For orders
117  $modele = GETPOST('module', 'alpha');
118 
119  $commande = new CommandeFournisseur($db);
120  $commande->initAsSpecimen();
121  $commande->thirdparty = $specimenthirdparty;
122 
123  // Search template files
124  $file = ''; $classname = ''; $filefound = 0;
125  $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
126  foreach ($dirmodels as $reldir) {
127  $file = dol_buildpath($reldir."core/modules/action/doc/pdf_".$modele.".modules.php", 0);
128  if (file_exists($file)) {
129  $filefound = 1;
130  $classname = "pdf_".$modele;
131  break;
132  }
133  }
134 
135  if ($filefound) {
136  require_once $file;
137 
138  $module = new $classname($db, $commande);
139 
140  if ($module->write_file($commande, $langs) > 0) {
141  header("Location: ".DOL_URL_ROOT."/document.php?modulepart=action&file=SPECIMEN.pdf");
142  return;
143  } else {
144  setEventMessages($module->error, $module->errors, 'errors');
145  dol_syslog($module->error, LOG_ERR);
146  }
147  } else {
148  setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
149  dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
150  }
151 } elseif ($action == 'setmodel') {
152  // Activate a model
153  //print "sssd".$value;
154  $ret = addDocumentModel($value, $type, $label, $scandir);
155 } elseif ($action == 'del') {
156  $ret = delDocumentModel($value, $type);
157  if ($ret > 0) {
158  if ($conf->global->ACTION_EVENT_ADDON_PDF == "$value") {
159  dolibarr_del_const($db, 'ACTION_EVENT_ADDON_PDF', $conf->entity);
160  }
161  }
162 } elseif ($action == 'setdoc') {
163  // Set default model
164  if (dolibarr_set_const($db, "ACTION_EVENT_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) {
165  // La constante qui a ete lue en avant du nouveau set
166  // on passe donc par une variable pour avoir un affichage coherent
167  $conf->global->ACTION_EVENT_ADDON_PDF = $value;
168  }
169 
170  // On active le modele
171  $ret = delDocumentModel($value, $type);
172  if ($ret > 0) {
173  $ret = addDocumentModel($value, $type, $label, $scandir);
174  }
175 }
176 
177 
183 $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
184 
185 $wikihelp = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Terminplanung';
186 llxHeader('', $langs->trans("AgendaSetup"), $wikihelp);
187 
188 $linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
189 print load_fiche_titre($langs->trans("AgendaSetup"), $linkback, 'title_setup');
190 
191 
192 
193 $head = agenda_prepare_head();
194 
195 print dol_get_fiche_head($head, 'other', $langs->trans("Agenda"), -1, 'action');
196 
197 
198 /*
199  * Miscellaneous
200  */
201 
202 // Define array def of models
203 $def = array();
204 
205 $sql = "SELECT nom";
206 $sql .= " FROM ".MAIN_DB_PREFIX."document_model";
207 $sql .= " WHERE type = 'action'";
208 $sql .= " AND entity = ".$conf->entity;
209 
210 $resql = $db->query($sql);
211 if ($resql) {
212  $i = 0;
213  $num_rows = $db->num_rows($resql);
214  while ($i < $num_rows) {
215  $array = $db->fetch_array($resql);
216  array_push($def, $array[0]);
217  $i++;
218  }
219 } else {
220  dol_print_error($db);
221 }
222 
223 if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
224  print load_fiche_titre($langs->trans("AgendaModelModule"), '', '');
225 
226  print '<table class="noborder centpercent">'."\n";
227  print '<tr class="liste_titre">'."\n";
228  print '<td width="100">'.$langs->trans("Name").'</td>'."\n";
229  print '<td>'.$langs->trans("Description").'</td>'."\n";
230  print '<td class="center" width="60">'.$langs->trans("Status").'</td>'."\n";
231  print '<td class="center" width="60">'.$langs->trans("Default").'</td>'."\n";
232  print '<td class="center" width="40">'.$langs->trans("ShortInfo").'</td>';
233  print '<td class="center" width="40">'.$langs->trans("Preview").'</td>';
234  print '</tr>'."\n";
235 
236  clearstatcache();
237 
238  foreach ($dirmodels as $reldir) {
239  $dir = dol_buildpath($reldir."core/modules/action/doc");
240 
241  if (is_dir($dir)) {
242  $handle = opendir($dir);
243  if (is_resource($handle)) {
244  while (($file = readdir($handle)) !== false) {
245  if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
246  $name = substr($file, 4, dol_strlen($file) - 16);
247  $classname = substr($file, 0, dol_strlen($file) - 12);
248 
249  require_once $dir.'/'.$file;
250  $module = new $classname($db, new ActionComm($db));
251 
252  print '<tr class="oddeven">'."\n";
253  print "<td>";
254  print (empty($module->name) ? $name : $module->name);
255  print "</td>\n";
256  print "<td>\n";
257  require_once $dir.'/'.$file;
258  $module = new $classname($db, $specimenthirdparty);
259  if (method_exists($module, 'info')) {
260  print $module->info($langs);
261  } else {
262  print $module->description;
263  }
264  print "</td>\n";
265 
266  // Active
267  if (in_array($name, $def)) {
268  print '<td class="center">'."\n";
269  if ($conf->global->ACTION_EVENT_ADDON_PDF != "$name") {
270  print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=action">';
271  print img_picto($langs->trans("Enabled"), 'switch_on');
272  print '</a>';
273  } else {
274  print img_picto($langs->trans("Enabled"), 'switch_on');
275  }
276  print "</td>";
277  } else {
278  print '<td class="center">'."\n";
279  print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmodel&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=action">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
280  print "</td>";
281  }
282 
283  // Default
284  print '<td class="center">';
285  if ($conf->global->ACTION_EVENT_ADDON_PDF == "$name") {
286  print img_picto($langs->trans("Default"), 'on');
287  } else {
288  print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&amp;scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&amp;type=action"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
289  }
290  print '</td>';
291 
292  // Info
293  $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
294  $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
295  $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
296  $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
297  $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
298  print '<td class="center">';
299  print $form->textwithpicto('', $htmltooltip, 1, 0);
300  print '</td>';
301  print '<td class="center">';
302  print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&amp;module='.$name.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
303  print '</td>';
304 
305  print "</tr>\n";
306  }
307  }
308  closedir($handle);
309  }
310  }
311  }
312  print '</table><br>';
313 
314  print load_fiche_titre($langs->trans('MiscellaneousOptions'), '', '');
315 }
316 
317 
318 print '<form action="'.$_SERVER["PHP_SELF"].'" name="agenda">';
319 print '<input type="hidden" name="token" value="'.newToken().'">';
320 print '<input type="hidden" name="action" value="set">';
321 
322 print '<table class="noborder allwidth">'."\n";
323 print '<tr class="liste_titre">'."\n";
324 print '<td>'.$langs->trans("Parameters").'</td>'."\n";
325 print '<td class="center">&nbsp;</td>'."\n";
326 print '<td class="right">'.$langs->trans("Value").'</td>'."\n";
327 print '</tr>'."\n";
328 
329 // AGENDA_DEFAULT_VIEW
330 print '<tr class="oddeven">'."\n";
331 $htmltext = $langs->trans("ThisValueCanOverwrittenOnUserLevel", $langs->transnoentitiesnoconv("UserGUISetup"));
332 print '<td>'.$form->textwithpicto($langs->trans("AGENDA_DEFAULT_VIEW"), $htmltext).'</td>'."\n";
333 print '<td class="center">&nbsp;</td>'."\n";
334 print '<td class="right">'."\n";
335 $tmplist = array(''=>'&nbsp;', 'show_list'=>$langs->trans("ViewList"), 'show_month'=>$langs->trans("ViewCal"), 'show_week'=>$langs->trans("ViewWeek"), 'show_day'=>$langs->trans("ViewDay"), 'show_peruser'=>$langs->trans("ViewPerUser"));
336 print $form->selectarray('AGENDA_DEFAULT_VIEW', $tmplist, getDolGlobalString('AGENDA_DEFAULT_VIEW'));
337 print '</td></tr>'."\n";
338 
339 // Manual or automatic
340 
341 print '<tr class="oddeven">'."\n";
342 print '<td>'.$langs->trans("AGENDA_USE_EVENT_TYPE").'</td>'."\n";
343 print '<td class="center">&nbsp;</td>'."\n";
344 print '<td class="right">'."\n";
345 //print ajax_constantonoff('AGENDA_USE_EVENT_TYPE'); Do not use ajax here, we need to reload page to change other combo list
346 if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) {
347  print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_USE_EVENT_TYPE&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
348 } else {
349  print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_USE_EVENT_TYPE&token='.newToken().'">'.img_picto($langs->trans("Enabled"), 'switch_on').'</a>';
350 }
351 print '</td></tr>'."\n";
352 
353 if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) {
354  print '<!-- AGENDA_USE_EVENT_TYPE_DEFAULT -->';
355  print '<tr class="oddeven">'."\n";
356  print '<td>'.$langs->trans("AGENDA_USE_EVENT_TYPE_DEFAULT").'</td>'."\n";
357  print '<td class="center">&nbsp;</td>'."\n";
358  print '<td class="right nowrap">'."\n";
359  $formactions->select_type_actions($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT, "AGENDA_USE_EVENT_TYPE_DEFAULT", 'systemauto', 0, 1);
360  print '</td></tr>'."\n";
361 }
362 
363 // AGENDA_EVENT_DEFAULT_STATUS
364 print '<tr class="oddeven">'."\n";
365 print '<td>'.$langs->trans("AGENDA_EVENT_DEFAULT_STATUS").'</td>'."\n";
366 print '<td class="center">&nbsp;</td>'."\n";
367 print '<td class="right nowrap">'."\n";
368 $defval = 'na';
369 $defaultValues = new DefaultValues($db);
370 $result = $defaultValues->fetchAll('', '', 0, 0, array('t.page'=>'comm/action/card.php', 't.param'=>'complete', 't.user_id'=>'0', 't.type'=>'createform', 't.entity'=>$conf->entity));
371 if (!is_array($result) && $result < 0) {
372  setEventMessages($defaultValues->error, $defaultValues->errors, 'errors');
373 } elseif (count($result) > 0) {
374  $defval = reset($result)->value;
375 }
376 $formactions->form_select_status_action('agenda', $defval, 1, "AGENDA_EVENT_DEFAULT_STATUS", 0, 1, 'maxwidth200 onrightofpage');
377 print '</td></tr>'."\n";
378 
379 // AGENDA_DEFAULT_FILTER_TYPE
380 print '<tr class="oddeven">'."\n";
381 print '<td>'.$langs->trans("AGENDA_DEFAULT_FILTER_TYPE").'</td>'."\n";
382 print '<td class="center">&nbsp;</td>'."\n";
383 print '<td class="right nowrap">'."\n";
384 $multiselect = 0;
385 if (!empty($conf->global->MAIN_ENABLE_MULTISELECT_TYPE)) {
386  // We use an option here because it adds bugs when used on agenda page "peruser" and "list"
387  $multiselect = (!empty($conf->global->AGENDA_USE_EVENT_TYPE));
388 }
389 $formactions->select_type_actions($conf->global->AGENDA_DEFAULT_FILTER_TYPE, "AGENDA_DEFAULT_FILTER_TYPE", '', (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 1, $multiselect);
390 print '</td></tr>'."\n";
391 
392 // AGENDA_DEFAULT_FILTER_STATUS
393 // TODO Remove to use the default generic feature
394 print '<tr class="oddeven">'."\n";
395 print '<td>'.$langs->trans("AGENDA_DEFAULT_FILTER_STATUS").'</td>'."\n";
396 print '<td class="center">&nbsp;</td>'."\n";
397 print '<td class="right">'."\n";
398 $formactions->form_select_status_action('agenda', getDolGlobalString('AGENDA_DEFAULT_FILTER_STATUS'), 1, 'AGENDA_DEFAULT_FILTER_STATUS', 1, 2, 'minwidth100');
399 print '</td></tr>'."\n";
400 
401 print '</table>';
402 
403 print $form->buttonsSaveCancel("Save", '');
404 
405 print '</form>';
406 
407 
408 print dol_get_fiche_end();
409 
410 // End of page
411 llxFooter();
412 $db->close();
addDocumentModel($name, $type, $label='', $description='')
Add document model used by doc generator.
Definition: admin.lib.php:1918
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:638
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
Definition: admin.lib.php:562
delDocumentModel($name, $type)
Delete document model used by doc generator.
Definition: admin.lib.php:1949
agenda_prepare_head()
Prepare array with list of tabs.
Definition: agenda.lib.php:364
if(preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) if(preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) if($action=='set') elseif($action=='specimen') elseif($action=='setmodel') elseif($action=='del') elseif($action=='setdoc') $formactions
View.
if(GETPOSTISSET('MAIN_AGENDA_XCAL_EXPORTKEY')) if(GETPOSTISSET('MAIN_AGENDA_EXPORT_PAST_DELAY')) if(GETPOSTISSET('MAIN_AGENDA_EXPORT_CACHE')) if(GETPOSTISSET('AGENDA_EXPORT_FIX_TZ')) if($actionsave) if(!isset($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) $wikihelp
View.
Definition: agenda_xcal.php:90
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 agenda events (actions)
Class to manage predefined suppliers products.
Class for MyObject.
Class to manage building of HTML components.
if(isModEnabled('facture') && $user->hasRight('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') && $user->hasRight('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)) $sql
Social contributions to pay.
Definition: index.php:746
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.
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.