dolibarr 22.0.5
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 * Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
9 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 3 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see <https://www.gnu.org/licenses/>.
23 */
24
31// Load Dolibarr environment
32require '../main.inc.php';
33require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
34require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
35require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
36require_once DOL_DOCUMENT_ROOT.'/core/class/defaultvalues.class.php';
37require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
38
47if (!$user->admin) {
49}
50
51// Load translation files required by the page
52$langs->loadLangs(array('admin', 'other', 'agenda', 'users'));
53
54$action = GETPOST('action', 'aZ09');
55$value = GETPOST('value', 'alpha');
56$label = GETPOST('label', 'alpha');
57$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
58
59$param = GETPOST('param', 'alpha');
60$cancel = GETPOST('cancel', 'alpha');
61$scandir = GETPOST('scan_dir', 'alpha');
62$type = 'action';
63
64
65/*
66 * Actions
67 */
68
69$error = 0;
70$errors = array();
71
72include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
73
74$reg = array();
75if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) {
76 $code = $reg[1];
77 $value = (GETPOST($code, 'alpha') ? GETPOST($code, 'alpha') : 1);
78 if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0) {
79 header("Location: ".$_SERVER["PHP_SELF"]);
80 exit;
81 } else {
82 dol_print_error($db);
83 }
84}
85
86if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) {
87 $code = $reg[1];
88 if (dolibarr_del_const($db, $code, $conf->entity) > 0) {
89 header("Location: ".$_SERVER["PHP_SELF"]);
90 exit;
91 } else {
92 dol_print_error($db);
93 }
94}
95if ($action == 'set') {
96 $getDefaultFilter = GETPOST('AGENDA_DEFAULT_FILTER_TYPE');
97 $defaultfilter = (is_array($getDefaultFilter)) ? implode(',', $getDefaultFilter) : $getDefaultFilter;
98 dolibarr_set_const($db, 'AGENDA_USE_EVENT_TYPE_DEFAULT', GETPOST('AGENDA_USE_EVENT_TYPE_DEFAULT'), 'chaine', 0, '', $conf->entity);
99 dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_TYPE', $defaultfilter, 'chaine', 0, '', $conf->entity);
100 dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_STATUS', GETPOST('AGENDA_DEFAULT_FILTER_STATUS'), 'chaine', 0, '', $conf->entity);
101 dolibarr_set_const($db, 'AGENDA_DEFAULT_VIEW', GETPOST('AGENDA_DEFAULT_VIEW'), 'chaine', 0, '', $conf->entity);
102
103 $defaultValues = new DefaultValues($db);
104 $result = $defaultValues->fetchAll('', '', 0, 0, "(t.page:=:'comm/action/card.php') AND (t.param:=:'complete') AND (t.user_id:=:0) AND (t.type:=:'createform') AND (t.entity:=:".((int) $conf->entity).")");
105 if (!is_array($result) && $result < 0) {
106 setEventMessages($defaultValues->error, $defaultValues->errors, 'errors');
107 } elseif (count($result) > 0) {
108 foreach ($result as $defval) {
109 $defaultValues->id = $defval->id;
110 $resultDel = $defaultValues->delete($user);
111 if ($resultDel < 0) {
112 setEventMessages($defaultValues->error, $defaultValues->errors, 'errors');
113 }
114 }
115 }
116 $defaultValues->type = 'createform';
117 $defaultValues->entity = $conf->entity;
118 $defaultValues->user_id = 0;
119 $defaultValues->page = 'comm/action/card.php';
120 $defaultValues->param = 'complete';
121 $defaultValues->value = GETPOST('AGENDA_EVENT_DEFAULT_STATUS');
122 $resultCreat = $defaultValues->create($user);
123 if ($resultCreat < 0) {
124 setEventMessages($defaultValues->error, $defaultValues->errors, 'errors');
125 } else {
126 setEventMessages($langs->trans("RecordSaved"), null, 'mesgs');
127 }
128} elseif ($action == 'specimen') { // For actioncomm
129 $modele = GETPOST('module', 'alpha');
130
131 $action = new ActionComm($db);
132 $action->initAsSpecimen();
133 $specimenthirdparty = new Societe($db);
134 $specimenthirdparty->initAsSpecimen();
135 $action->thirdparty = $specimenthirdparty;
136
137 // Search template files
138 $file = '';
139 $classname = '';
140 $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
141 foreach ($dirmodels as $reldir) {
142 $file = dol_buildpath($reldir."core/modules/action/doc/pdf_".$modele.".modules.php", 0);
143 if (file_exists($file)) {
144 $classname = "pdf_".$modele;
145 break;
146 }
147 }
148
149 if ($classname !== '') {
150 require_once $file;
151
152 $module = new $classname($db, $action);
153 '@phan-var-force pdf_standard_actions $module';
154
155 if ($module->write_file($action, $langs) > 0) {
156 header("Location: ".DOL_URL_ROOT."/document.php?modulepart=action&file=SPECIMEN.pdf");
157 return;
158 } else {
159 setEventMessages($module->error, $module->errors, 'errors');
160 dol_syslog($module->error, LOG_ERR);
161 }
162 } else {
163 setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
164 dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
165 }
166} elseif ($action == 'setmodel') {
167 // Activate a model
168 //print "sssd".$value;
169 $ret = addDocumentModel($value, $type, $label, $scandir);
170} elseif ($action == 'del') {
171 $ret = delDocumentModel($value, $type);
172 if ($ret > 0) {
173 if ($conf->global->ACTION_EVENT_ADDON_PDF == "$value") {
174 dolibarr_del_const($db, 'ACTION_EVENT_ADDON_PDF', $conf->entity);
175 }
176 }
177} elseif ($action == 'setdoc') {
178 // Set default model
179 if (dolibarr_set_const($db, "ACTION_EVENT_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) {
180 // La constante qui a ete lue en avant du nouveau set
181 // on passe donc par une variable pour avoir un affichage coherent
182 $conf->global->ACTION_EVENT_ADDON_PDF = $value;
183 }
184
185 // On active le modele
186 $ret = delDocumentModel($value, $type);
187 if ($ret > 0) {
188 $ret = addDocumentModel($value, $type, $label, $scandir);
189 }
190}
191
192
197$form = new Form($db);
198$formactions = new FormActions($db);
199
200$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
201
202$wikihelp = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda|DE:Modul_Terminplanung';
203llxHeader('', $langs->trans("AgendaSetup"), $wikihelp, '', 0, 0, '', '', '', 'mod-admin page-agenda_other');
204
205$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
206print load_fiche_titre($langs->trans("AgendaSetup"), $linkback, 'title_setup');
207
208
209
210$head = agenda_prepare_head();
211
212print dol_get_fiche_head($head, 'other', $langs->trans("Agenda"), -1, 'action');
213
214
215/*
216 * Miscellaneous
217 */
218
219// Define an array def of models
220$def = array();
221
222$sql = "SELECT nom";
223$sql .= " FROM ".MAIN_DB_PREFIX."document_model";
224$sql .= " WHERE type = 'action'";
225$sql .= " AND entity = ".((int) $conf->entity);
226
227$resql = $db->query($sql);
228if ($resql) {
229 $i = 0;
230 $num_rows = $db->num_rows($resql);
231 while ($i < $num_rows) {
232 $array = $db->fetch_array($resql);
233 if (is_array($array)) {
234 array_push($def, $array[0]);
235 }
236 $i++;
237 }
238} else {
239 dol_print_error($db);
240}
241
242if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
243 print load_fiche_titre($langs->trans("AgendaModelModule"), '', '');
244
245 print '<div class="div-table-responsive-no-min">';
246 print '<table class="noborder centpercent">'."\n";
247 print '<tr class="liste_titre">'."\n";
248 print '<td width="100">'.$langs->trans("Name").'</td>'."\n";
249 print '<td>'.$langs->trans("Description").'</td>'."\n";
250 print '<td class="center" width="60">'.$langs->trans("Status").'</td>'."\n";
251 print '<td class="center" width="60">'.$langs->trans("Default").'</td>'."\n";
252 print '<td class="center" width="40">'.$langs->trans("ShortInfo").'</td>';
253 print '<td class="center" width="40">'.$langs->trans("Preview").'</td>';
254 print '</tr>'."\n";
255
256 clearstatcache();
257
258 $specimenthirdparty = new Societe($db);
259 $specimenthirdparty->initAsSpecimen();
260
261 foreach ($dirmodels as $reldir) {
262 $dir = dol_buildpath($reldir."core/modules/action/doc");
263
264 if (is_dir($dir)) {
265 $handle = opendir($dir);
266 if (is_resource($handle)) {
267 while (($file = readdir($handle)) !== false) {
268 if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
269 $name = substr($file, 4, dol_strlen($file) - 16);
270 $classname = substr($file, 0, dol_strlen($file) - 12);
271 require_once $dir.'/'.$file;
272 $module = new $classname($db, new ActionComm($db));
273
274 '@phan-var-force ModeleAction $module';
275
276 print '<tr class="oddeven">'."\n";
277 print "<td>";
278 print(empty($module->name) ? $name : $module->name);
279 print "</td>\n";
280 print "<td>\n";
281 require_once $dir.'/'.$file;
282 $module = new $classname($db, $specimenthirdparty);
283 '@phan-var-force ModeleAction $module';
284 if (method_exists($module, 'info')) {
285 print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
286 } else {
287 print $module->description;
288 }
289 print "</td>\n";
290
291 // Active
292 if (in_array($name, $def)) {
293 print '<td class="center">'."\n";
294 if ($conf->global->ACTION_EVENT_ADDON_PDF != "$name") {
295 print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=action">';
296 print img_picto($langs->trans("Enabled"), 'switch_on');
297 print '</a>';
298 } else {
299 print img_picto($langs->trans("Enabled"), 'switch_on');
300 }
301 print "</td>";
302 } else {
303 print '<td class="center">'."\n";
304 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>';
305 print "</td>";
306 }
307
308 // Default
309 print '<td class="center">';
310 if ($conf->global->ACTION_EVENT_ADDON_PDF == "$name") {
311 print img_picto($langs->trans("Default"), 'on');
312 } else {
313 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>';
314 }
315 print '</td>';
316
317 // Info
318 $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
319 $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
320 $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
321 $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
322 $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
323 print '<td class="center">';
324 print $form->textwithpicto('', $htmltooltip, 1, 'info');
325 print '</td>';
326 print '<td class="center">';
327 print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&amp;module='.$name.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
328 print '</td>';
329
330 print "</tr>\n";
331 }
332 }
333 closedir($handle);
334 }
335 }
336 }
337 print '</table>';
338 print '</div>';
339 print '<br>';
340
341 print load_fiche_titre($langs->trans('MiscellaneousOptions'), '', '');
342}
343
344
345print '<form action="'.$_SERVER["PHP_SELF"].'" name="agenda">';
346print '<input type="hidden" name="token" value="'.newToken().'">';
347print '<input type="hidden" name="action" value="set">';
348
349print '<div class="div-table-responsive-no-min">';
350print '<table class="noborder allwidth">'."\n";
351print '<tr class="liste_titre">'."\n";
352print '<td>'.$langs->trans("Parameters").'</td>'."\n";
353print '<td class="center">&nbsp;</td>'."\n";
354print '<td class="right"></td>'."\n";
355print '</tr>'."\n";
356
357// AGENDA_DEFAULT_VIEW
358print '<tr class="oddeven">'."\n";
359$htmltext = $langs->trans("ThisValueCanOverwrittenOnUserLevel", $langs->transnoentitiesnoconv("UserGUISetup"));
360print '<td class="minwidth200onall">'.$form->textwithpicto($langs->trans("AGENDA_DEFAULT_VIEW"), $htmltext).'</td>'."\n";
361print '<td class="center">&nbsp;</td>'."\n";
362print '<td class="right parentonrightofpage">'."\n";
363$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"));
364print $form->selectarray('AGENDA_DEFAULT_VIEW', $tmplist, getDolGlobalString('AGENDA_DEFAULT_VIEW', 'show_month'), 0, 0, 0, '', 0, 0, 0, '', 'right onrightofpage width150');
365print '</td></tr>'."\n";
366
367// Manual or automatic
368
369print '<tr class="oddeven">'."\n";
370print '<td>'.$langs->trans("AGENDA_USE_EVENT_TYPE").'</td>'."\n";
371print '<td class="center">&nbsp;</td>'."\n";
372print '<td class="right">'."\n";
373//print ajax_constantonoff('AGENDA_USE_EVENT_TYPE'); Do not use ajax here, we need to reload page to change other combo list
374if (!getDolGlobalString('AGENDA_USE_EVENT_TYPE')) {
375 print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_USE_EVENT_TYPE&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
376} else {
377 print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_USE_EVENT_TYPE&token='.newToken().'">'.img_picto($langs->trans("Enabled"), 'switch_on').'</a>';
378}
379print '</td></tr>'."\n";
380
381if (getDolGlobalString('AGENDA_USE_EVENT_TYPE')) {
382 print '<!-- AGENDA_USE_EVENT_TYPE_DEFAULT -->';
383 print '<tr class="oddeven">'."\n";
384 print '<td>'.$langs->trans("AGENDA_USE_EVENT_TYPE_DEFAULT").'</td>'."\n";
385 print '<td class="center">&nbsp;</td>'."\n";
386 print '<td class="right parentonrightofpage">'."\n";
387 print $formactions->select_type_actions(getDolGlobalString('AGENDA_USE_EVENT_TYPE_DEFAULT'), "AGENDA_USE_EVENT_TYPE_DEFAULT", 'systemauto', 0, 1, 0, 1, 'minwidth300 right onrightofpage', 1);
388 print '</td></tr>'."\n";
389}
390
391// AGENDA_EVENT_DEFAULT_STATUS
392print '<tr class="oddeven">'."\n";
393print '<td>'.$langs->trans("AGENDA_EVENT_DEFAULT_STATUS").'</td>'."\n";
394print '<td class="center">&nbsp;</td>'."\n";
395print '<td class="right parentonrightofpage">'."\n";
396$defval = 'na';
397$defaultValues = new DefaultValues($db);
398$result = $defaultValues->fetchAll('', '', 0, 0, "(t.page:=:'comm/action/card.php') AND (t.param:=:'complete') AND (t.user_id:=:0) AND (t.type:=:'createform') AND (t.entity:=:".((int) $conf->entity).")");
399if (!is_array($result) && $result < 0) {
400 setEventMessages($defaultValues->error, $defaultValues->errors, 'errors');
401} elseif (count($result) > 0) {
402 $defval = reset($result)->value;
403}
404$formactions->form_select_status_action('agenda', $defval, 1, "AGENDA_EVENT_DEFAULT_STATUS", 0, 1, 'right width200 onrightofpage');
405print '</td></tr>'."\n";
406
407// AGENDA_DEFAULT_FILTER_TYPE
408print '<tr class="oddeven">'."\n";
409print '<td>'.$langs->trans("AGENDA_DEFAULT_FILTER_TYPE").'</td>'."\n";
410print '<td class="center">&nbsp;</td>'."\n";
411print '<td class="right nowrap">'."\n";
412$multiselect = 0;
413if (getDolGlobalString('MAIN_ENABLE_MULTISELECT_TYPE')) {
414 // We use an option here because it adds bugs when used on agenda page "peruser" and "list"
415 $multiselect = (getDolGlobalString('AGENDA_USE_EVENT_TYPE'));
416}
417print $formactions->select_type_actions(getDolGlobalString('AGENDA_DEFAULT_FILTER_TYPE'), "AGENDA_DEFAULT_FILTER_TYPE", '', (getDolGlobalString('AGENDA_USE_EVENT_TYPE') ? -1 : 1), 1, $multiselect, 1, 'minwidth300', 1);
418print '</td></tr>'."\n";
419
420// AGENDA_DEFAULT_FILTER_STATUS
421// TODO Remove to use the default generic feature
422print '<tr class="oddeven">'."\n";
423print '<td>'.$langs->trans("AGENDA_DEFAULT_FILTER_STATUS").'</td>'."\n";
424print '<td class="center">&nbsp;</td>'."\n";
425print '<td class="right">'."\n";
426$formactions->form_select_status_action('agenda', getDolGlobalString('AGENDA_DEFAULT_FILTER_STATUS'), 1, 'AGENDA_DEFAULT_FILTER_STATUS', 1, 2, 'minwidth100');
427print '</td></tr>'."\n";
428
429print '</table>';
430print '</div>';
431
432print $form->buttonsSaveCancel("Save", '');
433
434print '</form>';
435
436
437print dol_get_fiche_end();
438
439// End of page
440llxFooter();
441$db->close();
addDocumentModel($name, $type, $label='', $description='')
Add document model used by doc generator.
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).
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
delDocumentModel($name, $type)
Delete document model used by doc generator.
agenda_prepare_head()
Prepare array with list of tabs.
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') $form
View.
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:91
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Definition wrapper.php:73
Class to manage agenda events (actions)
Class for MyObject.
Class to manage building of HTML components.
Class to manage generation of HTML components Only common components must be here.
Class to manage third parties objects (customers, suppliers, prospects...)
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $allowothertags=array())
Show a picto called object_picto (generic function)
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
yn($yesno, $format=1, $color=0)
Return yes or no in current language.
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.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:161
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.