dolibarr 24.0.0-beta
index.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
3 * Copyright (C) 2013-2015 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2012-2014 Regis Houssin <regis.houssin@inodbox.com>
5 * Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
6 * Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
7 * Copyright (C) 2021-2026 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
31// Load Dolibarr environment
32require '../main.inc.php';
40require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
41require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
42require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
43require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
44require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
45require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
46require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php';
47
48if (isModEnabled('expensereport')) {
49 require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
50}
51if (isModEnabled('recruitment')) {
52 require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentcandidature.class.php';
53 require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php';
54}
55if (isModEnabled('holiday')) {
56 require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
57}
58
59
60// Load translation files required by the page
61$langs->loadLangs(array('users', 'holiday', 'trips', 'boxes'));
62
63// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
64$hookmanager->initHooks(array('hrmindex'));
65
66// Get Parameters
67$socid = GETPOSTINT("socid");
68
69// Protection if external user
70if ($user->socid > 0) {
72}
73
74if (!getDolGlobalString('MAIN_INFO_SOCIETE_NOM') || !getDolGlobalString('MAIN_INFO_SOCIETE_COUNTRY')) {
75 $setupcompanynotcomplete = 1;
76} else {
77 $setupcompanynotcomplete = 0;
78}
79
80$max = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT', 5);
81
82
83/*
84 * Actions
85 */
86
87// Update sold
88if (isModEnabled('holiday') && !empty($setupcompanynotcomplete)) {
89 $holidaystatic = new Holiday($db);
90 $result = $holidaystatic->updateBalance();
91}
92
93
94/*
95 * View
96 */
97
98$listofsearchfields = array();
99
100$childids = $user->getAllChildIds();
101$childids[] = $user->id;
102
103$title = $langs->trans('HRMArea');
104
105llxHeader('', $title, '');
106
107print load_fiche_titre($langs->trans("HRMArea"), '', 'hrm');
108
109
110if (!empty($setupcompanynotcomplete)) {
111 $langs->load("errors");
112 $warnpicto = img_warning($langs->trans("WarningMandatorySetupNotComplete"));
113 print '<br><div class="warning"><a href="'.DOL_URL_ROOT.'/admin/company.php?mainmenu=home&action=edit&token='.newToken().'">'.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").'</a></div>';
114
115 llxFooter();
116 exit;
117}
118
119
120print '<div class="fichecenter">';
121
122print '<div class="twocolumns">';
123
124print '<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
125
126
127if (getDolGlobalString('MAIN_SEARCH_FORM_ON_HOME_AREAS')) { // This is useless due to the global search combo
128 if (isModEnabled('holiday') && $user->hasRight('holiday', 'read')) {
129 $langs->load("holiday");
130 $listofsearchfields['search_holiday'] = array('text' => 'TitreRequestCP');
131 }
132 if (isModEnabled('deplacement') && $user->hasRight('deplacement', 'lire')) {
133 $langs->load("trips");
134 $listofsearchfields['search_deplacement'] = array('text' => 'ExpenseReport');
135 }
136 if (isModEnabled('expensereport') && $user->hasRight('expensereport', 'lire')) {
137 $langs->load("trips");
138 $listofsearchfields['search_expensereport'] = array('text' => 'ExpenseReport');
139 }
140 if (count($listofsearchfields)) {
141 print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
142 print '<input type="hidden" name="token" value="'.newToken().'">';
143 print '<div class="div-table-responsive-no-min">';
144 print '<table class="noborder nohover centpercent">';
145 $i = 0;
146 foreach ($listofsearchfields as $key => $value) {
147 if ($i == 0) {
148 print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
149 }
150 print '<tr>';
151 print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>';
152 if ($i == 0) {
153 print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
154 }
155 print '</tr>';
156 $i++;
157 }
158 print '</table>';
159 print '</div>';
160 print '</form>';
161 print '<br>';
162 }
163}
164
165
166if (isModEnabled('holiday')) {
167 if (!getDolGlobalString('HOLIDAY_HIDE_BALANCE')) {
168 $holidaystatic = new Holiday($db);
169 $user_id = $user->id;
170
171 print '<div class="div-table-responsive-no-min">';
172 print '<table class="noborder nohover centpercent">';
173 print '<tr class="liste_titre"><th colspan="3">'.$langs->trans("Holidays").'</th></tr>';
174 print '<tr class="oddeven nohover">';
175 print '<td>';
176
177 $out = '';
178 $nb_holiday = 0;
179 $typeleaves = $holidaystatic->getTypes(1, 1);
180 foreach ($typeleaves as $key => $val) {
181 $nb_type = $holidaystatic->getCPforUser($user->id, $val['rowid']);
182 $nb_holiday += $nb_type;
183 $out .= ' - '.($langs->trans($val['code']) != $val['code'] ? $langs->trans($val['code']) : $val['label']).': <strong>'.($nb_type ? price2num($nb_type) : 0).'</strong><br>';
184 }
185 $balancetoshow = $langs->trans('SoldeCPUser', '{s1}');
186 print '<div class="valignmiddle div-balanceofleave">'.str_replace('{s1}', img_picto('', 'holiday', 'class="paddingleft pictofixedwidth"').'<span class="balanceofleave valignmiddle'.($nb_holiday > 0 ? ' amountpaymentcomplete' : ($nb_holiday < 0 ? ' amountremaintopay' : ' amountpaymentneutral')).'">'.round($nb_holiday, 5).'</span>', $balancetoshow).'</div>';
187 print '<span class="opacitymedium">'.$out.'</span>';
188
189 print '</td>';
190 print '</tr>';
191 print '</table></div><br>';
192 } elseif (!is_numeric(getDolGlobalString('HOLIDAY_HIDE_BALANCE'))) {
193 print $langs->trans(getDolGlobalString('HOLIDAY_HIDE_BALANCE')).'<br>';
194 }
195}
196
197
198print '</div><div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
199
200
201// Latest modified leave requests
202if (isModEnabled('holiday') && $user->hasRight('holiday', 'read')) {
203 $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.photo, u.gender, u.statut as user_status,";
204 $sql .= " x.rowid, x.ref, x.fk_type, x.date_debut as date_start, x.date_fin as date_end, x.halfday, x.tms as dm, x.statut as status";
205 $sql .= " FROM ".MAIN_DB_PREFIX."holiday as x, ".MAIN_DB_PREFIX."user as u";
206 $sql .= " WHERE u.rowid = x.fk_user";
207 $sql .= " AND x.entity = ".$conf->entity;
208 if (!$user->hasRight('holiday', 'readall')) {
209 $sql .= ' AND x.fk_user IN ('.$db->sanitize(implode(',', $childids)).')';
210 }
211 //if (empty($user->rights->societe->client->voir) && !$user->socid) $sql.= " AND x.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
212 //if (!empty($socid)) $sql.= " AND x.fk_soc = ".((int) $socid);
213 $sql .= $db->order("x.tms", "DESC");
214 $sql .= $db->plimit($max, 0);
215
216 $result = $db->query($sql);
217 if ($result) {
218 $var = false;
219 $num = $db->num_rows($result);
220
221 $holidaystatic = new Holiday($db);
222 $userstatic = new User($db);
223
224 $listhalfday = array(
225 'morning' => $langs->trans("Morning"),
226 'morningshort' => $langs->trans("Morning"),
227 "afternoon" => $langs->trans("Afternoon"),
228 "afternoonshort" => $langs->trans("Afternoon")
229 );
230
231 $typeleaves = $holidaystatic->getTypes(1, -1);
232
233 $i = 0;
234
235 print '<div class="div-table-responsive-no-min">';
236 print '<table class="noborder centpercent">';
237 print '<tr class="liste_titre">';
238 print '<th colspan="3">'.$langs->trans("BoxTitleLastLeaveRequests", min($max, $num));
239 print '<a href="'.DOL_URL_ROOT.'/holiday/list.php?sortfield=cp.tms&sortorder=DESC" title="'.$langs->trans("FullList").'">';
240 print '<span class="badge marginleftonlyshort">...</span>';
241 print '</a>';
242 print '</th>';
243 print '<th></th>';
244 print '<th></th>';
245 print '<th></th>';
246 print '<th class="right">';
247 print '</th>';
248 print '</tr>';
249
250 if ($num) {
251 while ($i < $num && $i < $max) {
252 $obj = $db->fetch_object($result);
253
254 $holidaystatic->id = $obj->rowid;
255 $holidaystatic->ref = $obj->ref;
256 $holidaystatic->status = $obj->status;
257 $holidaystatic->date_debut = $db->jdate($obj->date_start);
258
259 $userstatic->id = $obj->uid;
260 $userstatic->lastname = $obj->lastname;
261 $userstatic->firstname = $obj->firstname;
262 $userstatic->login = $obj->login;
263 $userstatic->photo = $obj->photo;
264 $userstatic->email = $obj->email;
265 $userstatic->gender = $obj->gender;
266 $userstatic->status = $obj->user_status;
267
268 print '<tr class="oddeven">';
269 print '<td class="nowraponall">'.$holidaystatic->getNomUrl(1).'</td>';
270 print '<td class="tdoverflowmax100">'.$userstatic->getNomUrl(-1, 'leave').'</td>';
271
272 $leavecode = empty($typeleaves[$obj->fk_type]) ? 'Undefined' : $typeleaves[$obj->fk_type]['code'];
273 print '<td class="tdoverflowmax80" title="'.dol_escape_htmltag($langs->trans($leavecode)).'">'.dol_escape_htmltag($langs->trans($leavecode)).'</td>';
274
275 $starthalfday = ($obj->halfday == -1 || $obj->halfday == 2) ? 'afternoon' : 'morning';
276 $endhalfday = ($obj->halfday == 1 || $obj->halfday == 2) ? 'morning' : 'afternoon';
277
278 print '<td class="tdoverflowmax125 center lineheightsmall">'.dol_print_date($db->jdate($obj->date_start), 'dayreduceformat');
279 print '<br><span class="opacitymedium small" title="'.dolPrintHTML($langs->trans($listhalfday[$starthalfday])).'">';
280 $labelshort = $langs->trans($listhalfday[$starthalfday.'short']) != $listhalfday[$starthalfday.'short'] ? $langs->trans($listhalfday[$starthalfday.'short']) : $langs->trans($listhalfday[$starthalfday]);
281 print $labelshort;
282 print '</span>';
283 print '<td class="tdoverflowmax125 center lineheightsmall">'.dol_print_date($db->jdate($obj->date_end), 'dayreduceformat');
284 print '<br><span class="opacitymedium small" title="'.dolPrintHTML($langs->trans($listhalfday[$endhalfday])).'">';
285 $labelshort = $langs->trans($listhalfday[$endhalfday.'short']) != $listhalfday[$endhalfday.'short'] ? $langs->trans($listhalfday[$endhalfday.'short']) : $langs->trans($listhalfday[$starthalfday]);
286 print $labelshort;
287 print '</span>';
288 print '<td class="right" title="'.$langs->trans("DateModification").': '.dol_print_date($db->jdate($obj->dm), 'dayhourreduceformat').'">'.dol_print_date($db->jdate($obj->dm), 'dayreduceformat').'</td>';
289 print '<td class="right nowrap" width="16">'.$holidaystatic->LibStatut($obj->status, 3, $holidaystatic->date_debut).'</td>';
290 print '</tr>';
291
292 $i++;
293 }
294 } else {
295 print '<tr class="oddeven"><td colspan="7"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
296 }
297 print '</table>';
298 print '</div>';
299 print '<br>';
300 } else {
302 }
303}
304
305
306// Latest modified expense report
307if (isModEnabled('expensereport') && $user->hasRight('expensereport', 'read')) {
308 $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.statut as user_status, u.photo, u.gender,";
309 $sql .= " x.rowid, x.ref, x.date_debut as date, x.tms as dm, x.total_ht, x.total_ttc, x.fk_statut as status";
310 $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as x, ".MAIN_DB_PREFIX."user as u";
311 //if (empty($user->rights->societe->client->voir) && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc";
312 $sql .= " WHERE u.rowid = x.fk_user_author";
313 $sql .= " AND x.entity = ".$conf->entity;
314 if (!$user->hasRight('expensereport', 'readall') && !$user->hasRight('expensereport', 'lire_tous')) {
315 $sql .= ' AND x.fk_user_author IN ('.$db->sanitize(implode(',', $childids)).')';
316 }
317 //if (empty($user->rights->societe->client->voir) && !$user->socid) $sql.= " AND x.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
318 //if (!empty($socid)) $sql.= " AND x.fk_soc = ".((int) $socid);
319 $sql .= $db->order("x.tms", "DESC");
320 $sql .= $db->plimit($max, 0);
321
322 $result = $db->query($sql);
323 if ($result) {
324 $num = $db->num_rows($result);
325
326 $i = 0;
327
328 print '<div class="div-table-responsive-no-min">';
329 print '<table class="noborder centpercent">';
330 print '<tr class="liste_titre">';
331 print '<th colspan="2">'.$langs->trans("BoxTitleLastModifiedExpenses", min($max, $num));
332 print '<a href="'.DOL_URL_ROOT.'/expensereport/list.php?sortfield=d.tms&sortorder=DESC" title="'.$langs->trans("FullList").'">';
333 print '<span class="badge marginleftonlyshort">...</span>';
334 //print img_picto($langs->trans("FullList"), 'expensereport');
335 print '</a>';
336 print '</th>';
337 print '<th class="right">'.$langs->trans("AmountHT").'</th>';
338 print '<th class="right">'.$langs->trans("AmountTTC").'</th>';
339 print '<th></th>';
340 print '<th class="right">';
341 print '</th>';
342 print '</tr>';
343
344 if ($num) {
345 $expensereportstatic = new ExpenseReport($db);
346 $userstatic = new User($db);
347 while ($i < $num && $i < $max) {
348 $obj = $db->fetch_object($result);
349
350 $expensereportstatic->id = $obj->rowid;
351 $expensereportstatic->ref = $obj->ref;
352 $expensereportstatic->statut = $obj->status; // deprecated
353 $expensereportstatic->status = $obj->status;
354
355 $userstatic->id = $obj->uid;
356 $userstatic->lastname = $obj->lastname;
357 $userstatic->firstname = $obj->firstname;
358 $userstatic->email = $obj->email;
359 $userstatic->login = $obj->login;
360 $userstatic->status = $obj->user_status;
361 $userstatic->gender = $obj->gender;
362 $userstatic->photo = $obj->photo;
363
364 print '<tr class="oddeven">';
365 print '<td class="tdoverflowmax200">'.$expensereportstatic->getNomUrl(1).'</td>';
366 print '<td class="tdoverflowmax150">'.$userstatic->getNomUrl(-1).'</td>';
367 print '<td class="right amount">'.price($obj->total_ht).'</td>';
368 print '<td class="right amount">'.price($obj->total_ttc).'</td>';
369 print '<td class="right" title="'.$langs->trans("DateModification").': '.dol_print_date($db->jdate($obj->dm), 'dayhour').'">'.dol_print_date($db->jdate($obj->dm), 'dayreduceformat').'</td>';
370 print '<td class="right nowraponall" width="16">'.$expensereportstatic->LibStatut($obj->status, 3).'</td>';
371 print '</tr>';
372
373 $i++;
374 }
375 } else {
376 print '<tr class="oddeven"><td colspan="5"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
377 }
378 print '</table>';
379 print '</div>';
380 print '<br>';
381 } else {
383 }
384}
385
386
387// Last modified job position
388if (isModEnabled('recruitment') && $user->hasRight('recruitment', 'recruitmentjobposition', 'read')) {
389 $staticrecruitmentcandidature = new RecruitmentCandidature($db);
390 $staticrecruitmentjobposition = new RecruitmentJobPosition($db);
391 $sql = "SELECT rc.rowid, rc.ref, rc.email, rc.lastname, rc.firstname, rc.date_creation, rc.tms, rc.status,";
392 $sql .= " rp.rowid as jobid, rp.ref as jobref, rp.label";
393 $sql .= " FROM ".MAIN_DB_PREFIX."recruitment_recruitmentcandidature as rc";
394 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."recruitment_recruitmentjobposition as rp ON rc.fk_recruitmentjobposition = rp.rowid";
395 if (isModEnabled('societe') && !$user->hasRight('societe', 'client', 'voir') && !$socid) {
396 $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
397 }
398 $sql .= " WHERE rc.entity IN (".getEntity($staticrecruitmentcandidature->element).")";
399 if (isModEnabled('societe') && !$user->hasRight('societe', 'client', 'voir') && !$socid) {
400 $sql .= " AND rp.fk_soc = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
401 }
402 if ($socid) {
403 $sql .= " AND rp.fk_soc = $socid";
404 }
405 $sql .= $db->order("rc.tms", "DESC");
406 $sql .= $db->plimit($max, 0);
407
408 $resql = $db->query($sql);
409 if ($resql) {
410 $num = $db->num_rows($resql);
411 $i = 0;
412
413 print '<div class="div-table-responsive-no-min">';
414 print '<table class="noborder centpercent">';
415 print '<tr class="liste_titre">';
416 print '<th colspan="3">';
417 print $langs->trans("BoxTitleLatestModifiedCandidatures", min($max, $num));
418 print '<a href="'.DOL_URL_ROOT.'/recruitment/recruitmentcandidature_list.php?sortfield=t.tms&sortorder=DESC" title="'.$langs->trans("FullList").'">';
419 print '<span class="badge marginleftonlyshort">...</span>';
420 //print img_picto($langs->trans("FullList"), 'recruitmentcandidature');
421 print '</a>';
422 print '</th>';
423 print '<th></th>';
424 print '<th class="right">';
425 print '</th>';
426 print '</tr>';
427 if ($num) {
428 while ($i < $num) {
429 $objp = $db->fetch_object($resql);
430 $staticrecruitmentcandidature->id = $objp->rowid;
431 $staticrecruitmentcandidature->ref = $objp->ref;
432 $staticrecruitmentcandidature->email = $objp->email;
433 $staticrecruitmentcandidature->status = $objp->status;
434 $staticrecruitmentcandidature->date_creation = $objp->date_creation;
435 $staticrecruitmentcandidature->firstname = $objp->firstname;
436 $staticrecruitmentcandidature->lastname = $objp->lastname;
437
438 $staticrecruitmentjobposition->id = $objp->jobid;
439 $staticrecruitmentjobposition->ref = $objp->jobref;
440 $staticrecruitmentjobposition->label = $objp->label;
441
442 print '<tr class="oddeven">';
443 print '<td class="nowraponall">'.$staticrecruitmentcandidature->getNomUrl(1, '').'</td>';
444 print '<td class="tdoverflowmax150">'.$staticrecruitmentcandidature->getFullName($langs).'</td>';
445 print '<td class="nowraponall">'.$staticrecruitmentjobposition->getNomUrl(1).'</td>';
446 print '<td class="right nowrap" title="'.$langs->trans("DateModification").': '.dol_print_date($db->jdate($objp->tms), 'dayhour').'">'.dol_print_date($db->jdate($objp->tms), 'dayreduceformat').'</td>';
447 print '<td class="right nowrap" width="16">';
448 print $staticrecruitmentcandidature->getLibStatut(3);
449 print "</td>";
450 print '</tr>';
451 $i++;
452 }
453
454 $db->free($resql);
455 } else {
456 print '<tr class="oddeven"><td colspan="4"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
457 }
458 print "</table>";
459 print "</div>";
460 print "<br>";
461 } else {
463 }
464}
465
466print '</div></div></div>';
467
468// Initialize a technical object to manage hooks. Note that conf->hooks_modules contains array
469$parameters = array('user' => $user);
470$reshook = $hookmanager->executeHooks('dashboardHRM', $parameters, $object); // Note that $action and $object may have been modified by hook
471
472// End of page
473llxFooter();
474$db->close();
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 Trips and Expenses.
Class of the module paid holiday.
Class for RecruitmentCandidature.
Class for RecruitmentJobPosition.
Class to manage Dolibarr users.
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $db
API class for accounts.
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)
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.