dolibarr 21.0.0-alpha
card.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
5 * Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
6 * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
7 * Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
8 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22 */
23
29// Load Dolibarr environment
30require '../../main.inc.php';
31require_once DOL_DOCUMENT_ROOT.'/core/lib/trip.lib.php';
32require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php';
33require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
34if (isModEnabled('project')) {
35 require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
36}
37
38// Load translation files required by the page
39$langs->load("trips");
40
41
42// Security check
43$id = GETPOSTINT('id');
44if ($user->socid) {
45 $socid = $user->socid;
46}
47
48// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
49$hookmanager->initHooks(array('tripsandexpensescard', 'globalcard'));
50
51$result = restrictedArea($user, 'deplacement', $id, '');
52
53$action = GETPOST('action', 'aZ09');
54$confirm = GETPOST('confirm', 'alpha');
55
56$object = new Deplacement($db);
57
58$permissionnote = $user->hasRight('deplacement', 'creer'); // Used by the include of actions_setnotes.inc.php
59
60
61/*
62 * Actions
63 */
64
65include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once
66
67if ($action == 'validate' && $user->hasRight('deplacement', 'creer')) {
68 $object->fetch($id);
69 if ($object->statut == Deplacement::STATUS_DRAFT) {
70 $result = $object->setStatut(1);
71 if ($result > 0) {
72 header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
73 exit;
74 } else {
75 setEventMessages($object->error, $object->errors, 'errors');
76 }
77 }
78} elseif ($action == 'classifyrefunded' && $user->hasRight('deplacement', 'creer')) {
79 $object->fetch($id);
81 $result = $object->setStatut(Deplacement::STATUS_REFUNDED);
82 if ($result > 0) {
83 header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
84 exit;
85 } else {
86 setEventMessages($object->error, $object->errors, 'errors');
87 }
88 }
89} elseif ($action == 'confirm_delete' && $confirm == "yes" && $user->hasRight('deplacement', 'supprimer')) {
90 $result = $object->delete($user);
91 if ($result >= 0) {
92 header("Location: index.php");
93 exit;
94 } else {
95 setEventMessages($object->error, $object->errors, 'errors');
96 }
97} elseif ($action == 'add' && $user->hasRight('deplacement', 'creer')) {
98 if (!GETPOST('cancel', 'alpha')) {
99 $error = 0;
100
101 $object->date = dol_mktime(12, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'));
102 $object->km = (float) price2num(GETPOST('km', 'alpha'), 'MU'); // Not 'int', it may be a formatted amount
103 $object->type = GETPOST('type', 'alpha');
104 $object->socid = GETPOSTINT('socid');
105 $object->fk_user = GETPOSTINT('fk_user');
106 $object->note_private = GETPOST('note_private', 'alpha');
107 $object->note_public = GETPOST('note_public', 'alpha');
109
110 if (!$object->date) {
111 setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
112 $error++;
113 }
114 if ($object->type == '-1') {
115 setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors');
116 $error++;
117 }
118 if (!($object->fk_user > 0)) {
119 setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Person")), null, 'errors');
120 $error++;
121 }
122
123 if (!$error) {
124 $id = $object->create($user);
125
126 if ($id > 0) {
127 header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
128 exit;
129 } else {
130 setEventMessages($object->error, $object->errors, 'errors');
131 $action = 'create';
132 }
133 } else {
134 $action = 'create';
135 }
136 } else {
137 header("Location: index.php");
138 exit;
139 }
140} elseif ($action == 'update' && $user->hasRight('deplacement', 'creer')) {
141 // Update record
142 if (!GETPOST('cancel', 'alpha')) {
143 $result = $object->fetch($id);
144
145 $object->date = dol_mktime(12, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'));
146 $object->km = (float) price2num(GETPOST('km', 'alpha'), 'MU'); // Not 'int', it may be a formatted amount
147 $object->type = GETPOST('type', 'alpha');
148 $object->socid = GETPOSTINT('socid');
149 $object->fk_user = GETPOSTINT('fk_user');
150 $object->note_private = GETPOST('note_private', 'alpha');
151 $object->note_public = GETPOST('note_public', 'alpha');
152
153 $result = $object->update($user);
154
155 if ($result > 0) {
156 header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
157 exit;
158 } else {
159 setEventMessages($object->error, $object->errors, 'errors');
160 }
161 } else {
162 header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
163 exit;
164 }
165} elseif ($action == 'classin' && $user->hasRight('deplacement', 'creer')) {
166 // Set into a project
167 $object->fetch($id);
168 $result = $object->setProject(GETPOSTINT('projectid'));
169 if ($result < 0) {
170 dol_print_error($db, $object->error);
171 }
172} elseif ($action == 'setdated' && $user->hasRight('deplacement', 'creer')) {
173 // Set fields
174 $dated = dol_mktime(GETPOSTINT('datedhour'), GETPOSTINT('datedmin'), GETPOSTINT('datedsec'), GETPOSTINT('datedmonth'), GETPOSTINT('datedday'), GETPOSTINT('datedyear'));
175 $object->fetch($id);
176 $result = $object->setValueFrom('dated', $dated, '', null, 'date', '', $user, 'DEPLACEMENT_MODIFY');
177 if ($result < 0) {
178 dol_print_error($db, $object->error);
179 }
180} elseif ($action == 'setkm' && $user->hasRight('deplacement', 'creer')) {
181 $object->fetch($id);
182 $result = $object->setValueFrom('km', GETPOSTINT('km'), '', null, 'text', '', $user, 'DEPLACEMENT_MODIFY');
183 if ($result < 0) {
184 dol_print_error($db, $object->error);
185 }
186}
187
188
189/*
190 * View
191 */
192
193llxHeader();
194
195$form = new Form($db);
196
197/*
198 * Action create
199*/
200if ($action == 'create') {
201 //WYSIWYG Editor
202 require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
203
204 print load_fiche_titre($langs->trans("NewTrip"));
205
206 $datec = dol_mktime(12, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'));
207
208 print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
209 print '<input type="hidden" name="token" value="'.newToken().'">';
210 print '<input type="hidden" name="action" value="add">';
211
212 print '<table class="border centpercent">';
213
214 print "<tr>";
215 print '<td class="fieldrequired">'.$langs->trans("Type").'</td><td>';
216 $form->select_type_fees(GETPOSTINT('type'), 'type', 1);
217 print '</td></tr>';
218
219 print "<tr>";
220 print '<td class="fieldrequired">'.$langs->trans("Person").'</td><td>';
221 print $form->select_dolusers(GETPOSTINT('fk_user'), 'fk_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
222 print '</td></tr>';
223
224 print "<tr>";
225 print '<td class="fieldrequired">'.$langs->trans("Date").'</td><td>';
226 print $form->selectDate($datec ? $datec : -1, '', 0, 0, 0, 'add', 1, 1);
227 print '</td></tr>';
228
229 // Km
230 print '<tr><td class="fieldrequired">'.$langs->trans("FeesKilometersOrAmout").'</td><td><input name="km" size="10" value="'.GETPOST("km").'"></td></tr>';
231
232 // Company
233 print "<tr>";
234 print '<td>'.$langs->trans("CompanyVisited").'</td><td>';
235 print $form->select_company(GETPOSTINT('socid'), 'socid', '', 1);
236 print '</td></tr>';
237
238 // Public note
239 print '<tr>';
240 print '<td class="tdtop">'.$langs->trans('NotePublic').'</td>';
241 print '<td>';
242
243 $doleditor = new DolEditor('note_public', GETPOST('note_public', 'restricthtml'), '', 200, 'dolibarr_notes', 'In', false, true, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PUBLIC') ? 0 : 1, ROWS_8, '90%');
244 print $doleditor->Create(1);
245
246 print '</td></tr>';
247
248 // Private note
249 if (empty($user->socid)) {
250 print '<tr>';
251 print '<td class="tdtop">'.$langs->trans('NotePrivate').'</td>';
252 print '<td>';
253
254 $doleditor = new DolEditor('note_private', GETPOST('note_private', 'restricthtml'), '', 200, 'dolibarr_notes', 'In', false, true, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PRIVATE') ? 0 : 1, ROWS_8, '90%');
255 print $doleditor->Create(1);
256
257 print '</td></tr>';
258 }
259
260 // Other attributes
261 $parameters = array();
262 $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
263 print $hookmanager->resPrint;
264
265 print '</table>';
266
267 print '<br><div class="center">';
268 print '<input class="button button-save" type="submit" value="'.$langs->trans("Save").'">';
269 print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
270 print '<input class="button button-cancel" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
271 print '</div>';
272
273 print '</form>';
274} elseif ($id) {
275 $result = $object->fetch($id);
276 if ($result > 0) {
277 $head = trip_prepare_head($object);
278
279 print dol_get_fiche_head($head, 'card', $langs->trans("TripCard"), 0, 'trip');
280
281 if ($action == 'edit' && $user->hasRight('deplacement', 'creer')) {
282 //WYSIWYG Editor
283 require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
284
285 $soc = new Societe($db);
286 if ($object->socid) {
287 $soc->fetch($object->socid);
288 }
289
290 print '<form name="update" action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
291 print '<input type="hidden" name="token" value="'.newToken().'">';
292 print '<input type="hidden" name="action" value="update">';
293 print '<input type="hidden" name="id" value="'.$id.'">';
294
295 print '<table class="border centpercent">';
296
297 // Ref
298 print "<tr>";
299 print '<td class="titlefield">'.$langs->trans("Ref").'</td><td>';
300 print $object->ref;
301 print '</td></tr>';
302
303 // Type
304 print "<tr>";
305 print '<td class="fieldrequired">'.$langs->trans("Type").'</td><td>';
306 $form->select_type_fees(GETPOSTINT('type') ? GETPOSTINT('type') : $object->type, 'type', 0);
307 print '</td></tr>';
308
309 // Who
310 print "<tr>";
311 print '<td class="fieldrequired">'.$langs->trans("Person").'</td><td>';
312 print $form->select_dolusers(GETPOSTINT('fk_user') ? GETPOSTINT('fk_user') : $object->fk_user, 'fk_user', 0, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
313 print '</td></tr>';
314
315 // Date
316 print '<tr><td class="fieldrequired">'.$langs->trans("Date").'</td><td>';
317 print $form->selectDate($object->date, '', 0, 0, 0, 'update', 1, 0);
318 print '</td></tr>';
319
320 // Km
321 print '<tr><td class="fieldrequired">'.$langs->trans("FeesKilometersOrAmout").'</td><td>';
322 print '<input name="km" class="flat" size="10" value="'.$object->km.'">';
323 print '</td></tr>';
324
325 // Where
326 print "<tr>";
327 print '<td>'.$langs->trans("CompanyVisited").'</td><td>';
328 print $form->select_company($soc->id, 'socid', '', 1);
329 print '</td></tr>';
330
331 // Public note
332 print '<tr><td class="tdtop">'.$langs->trans("NotePublic").'</td>';
333 print '<td>';
334
335 $doleditor = new DolEditor('note_public', $object->note_public, '', 200, 'dolibarr_notes', 'In', false, true, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PUBLIC') ? 0 : 1, ROWS_8, '90%');
336 print $doleditor->Create(1);
337
338 print "</td></tr>";
339
340 // Private note
341 if (empty($user->socid)) {
342 print '<tr><td class="tdtop">'.$langs->trans("NotePrivate").'</td>';
343 print '<td>';
344
345 $doleditor = new DolEditor('note_private', $object->note_private, '', 200, 'dolibarr_notes', 'In', false, true, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PRIVATE') ? 0 : 1, ROWS_8, '90%');
346 print $doleditor->Create(1);
347
348 print "</td></tr>";
349 }
350
351 // Other attributes
352 $parameters = array();
353 $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
354 print $hookmanager->resPrint;
355
356 print '</table>';
357
358 print '<br><div class="center">';
359 print '<input type="submit" class="button button-save" value="'.$langs->trans("Save").'">';
360 print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
361 print '<input type="submit" name="cancel" class="button button-cancel" value="'.$langs->trans("Cancel").'">';
362 print '</div>';
363
364 print '</form>';
365
366 print '</div>';
367 } else {
368 /*
369 * Confirm delete trip
370 */
371 if ($action == 'delete') {
372 print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".urlencode((string) ($id)), $langs->trans("DeleteTrip"), $langs->trans("ConfirmDeleteTrip"), "confirm_delete");
373 }
374
375 $soc = new Societe($db);
376 if ($object->socid) {
377 $soc->fetch($object->socid);
378 }
379
380 print '<table class="border centpercent">';
381
382 $linkback = '<a href="'.DOL_URL_ROOT.'/compta/deplacement/list.php'.(!empty($socid) ? '?socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
383
384 // Ref
385 print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td>';
386 print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', '');
387 print '</td></tr>';
388
389 $form->load_cache_types_fees();
390
391 // Type
392 print '<tr><td>';
393 print $form->editfieldkey("Type", 'type', $langs->trans($object->type), $object, $user->hasRight('deplacement', 'creer'), 'select:types_fees');
394 print '</td><td>';
395 print $form->editfieldval("Type", 'type', $form->cache_types_fees[$object->type], $object, $user->hasRight('deplacement', 'creer'), 'select:types_fees');
396 print '</td></tr>';
397
398 // Who
399 print '<tr><td>'.$langs->trans("Person").'</td><td>';
400 $userfee = new User($db);
401 $userfee->fetch($object->fk_user);
402 print $userfee->getNomUrl(1);
403 print '</td></tr>';
404
405 // Date
406 print '<tr><td>';
407 print $form->editfieldkey("Date", 'dated', $object->date, $object, $user->hasRight('deplacement', 'creer'), 'datepicker');
408 print '</td><td>';
409 print $form->editfieldval("Date", 'dated', $object->date, $object, $user->hasRight('deplacement', 'creer'), 'datepicker');
410 print '</td></tr>';
411
412 // Km/Price
413 print '<tr><td class="tdtop">';
414 print $form->editfieldkey("FeesKilometersOrAmout", 'km', $object->km, $object, $user->hasRight('deplacement', 'creer'), 'numeric:6');
415 print '</td><td>';
416 print $form->editfieldval("FeesKilometersOrAmout", 'km', $object->km, $object, $user->hasRight('deplacement', 'creer'), 'numeric:6');
417 print "</td></tr>";
418
419 // Where
420 print '<tr><td>'.$langs->trans("CompanyVisited").'</td>';
421 print '<td>';
422 if ($soc->id) {
423 print $soc->getNomUrl(1);
424 }
425 print '</td></tr>';
426
427 // Project
428 if (isModEnabled('project')) {
429 $langs->load('projects');
430 print '<tr>';
431 print '<td>';
432
433 print '<table class="nobordernopadding" width="100%"><tr><td>';
434 print $langs->trans('Project');
435 print '</td>';
436 if ($action != 'classify' && $user->hasRight('deplacement', 'creer')) {
437 print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=classify&token='.newToken().'&id='.$object->id.'">';
438 print img_edit($langs->trans('SetProject'), 1);
439 print '</a></td>';
440 }
441 print '</tr></table>';
442 print '</td><td colspan="3">';
443 if ($action == 'classify') {
444 $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1);
445 } else {
446 $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0);
447 }
448 print '</td>';
449 print '</tr>';
450 }
451
452 // Statut
453 print '<tr><td>'.$langs->trans("Status").'</td><td>'.$object->getLibStatut(4).'</td></tr>';
454
455 // Other attributes
456 $parameters = array('socid' => $object->id);
457 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
458
459 print "</table><br>";
460
461 // Notes
462 $blocname = 'notes';
463 $title = $langs->trans('Notes');
464 include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php';
465
466 print '</div>';
467
468 /*
469 * Action bar
470 */
471 print '<div class="tabsAction">';
472
473 if ($object->statut < Deplacement::STATUS_REFUNDED) { // if not refunded
474 if ($user->hasRight('deplacement', 'creer')) {
475 print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'&id='.$id.'">'.$langs->trans('Modify').'</a>';
476 } else {
477 print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans('Modify').'</a>';
478 }
479 }
480
481 if ($object->statut == Deplacement::STATUS_DRAFT) { // if draft
482 if ($user->hasRight('deplacement', 'creer')) {
483 print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=validate&id='.$id.'">'.$langs->trans('Validate').'</a>';
484 } else {
485 print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans('Validate').'</a>';
486 }
487 }
488
489 if ($object->statut == Deplacement::STATUS_VALIDATED) { // if validated
490 if ($user->hasRight('deplacement', 'creer')) {
491 print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=classifyrefunded&token='.newToken().'&id='.$id.'">'.$langs->trans('ClassifyRefunded').'</a>';
492 } else {
493 print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans('ClassifyRefunded').'</a>';
494 }
495 }
496
497 $permissiontodelete = $user->hasRight('deplacement', 'supprimer');
498 print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $permissiontodelete);
499
500 print '</div>';
501 }
502 } else {
503 dol_print_error($db);
504 }
505}
506
507// End of page
508llxFooter();
509$db->close();
$id
Definition account.php:39
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:58
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:70
Class to manage trips and working credit notes.
const STATUS_DRAFT
Draft status.
const STATUS_REFUNDED
Refunded status.
const STATUS_VALIDATED
Validated status.
Class to manage a WYSIWYG editor.
Class to manage generation of HTML components Only common components must be here.
Class to manage third parties objects (customers, suppliers, prospects...)
Class to manage Dolibarr users.
llxFooter()
Footer empty.
Definition document.php:107
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed information (by default a local PHP server timestamp) Rep...
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.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dolGetButtonAction($label, $text='', $actionType='default', $url='', $id='', $userRight=1, $params=array())
Function dolGetButtonAction.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
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.
img_edit($titlealt='default', $float=0, $other='')
Show logo edit/modify fiche.
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
Definition repair.php:137
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.
trip_prepare_head(Deplacement $object)
Prepare array with list of tabs.
Definition trip.lib.php:31