dolibarr 23.0.3
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-2025 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';
33require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
34require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
35require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
36require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
37require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
38require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
39require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php';
40
41if (isModEnabled('deplacement')) {
42 require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php';
43}
44if (isModEnabled('expensereport')) {
45 require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
46}
47if (isModEnabled('recruitment')) {
48 require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentcandidature.class.php';
49 require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php';
50}
51if (isModEnabled('holiday')) {
52 require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
53}
54
55
64// Load translation files required by the page
65$langs->loadLangs(array('users', 'holiday', 'trips', 'boxes'));
66
67// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
68$hookmanager = new HookManager($db);
69
70$hookmanager->initHooks(array('hrmindex'));
71
72// Get Parameters
73$socid = GETPOSTINT("socid");
74
75// Protection if external user
76if ($user->socid > 0) {
78}
79
80if (!getDolGlobalString('MAIN_INFO_SOCIETE_NOM') || !getDolGlobalString('MAIN_INFO_SOCIETE_COUNTRY')) {
81 $setupcompanynotcomplete = 1;
82} else {
83 $setupcompanynotcomplete = 0;
84}
85
86$max = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT', 5);
87
88
89/*
90 * Actions
91 */
92
93// Update sold
94if (isModEnabled('holiday') && !empty($setupcompanynotcomplete)) {
95 $holidaystatic = new Holiday($db);
96 $result = $holidaystatic->updateBalance();
97}
98
99
100/*
101 * View
102 */
103
104$listofsearchfields = array();
105
106$childids = $user->getAllChildIds();
107$childids[] = $user->id;
108
109$title = $langs->trans('HRMArea');
110
111llxHeader('', $title, '');
112
113print load_fiche_titre($langs->trans("HRMArea"), '', 'hrm');
114
115
116if (!empty($setupcompanynotcomplete)) {
117 $langs->load("errors");
118 $warnpicto = img_warning($langs->trans("WarningMandatorySetupNotComplete"));
119 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>';
120
121 llxFooter();
122 exit;
123}
124
125
126print '<div class="fichecenter">';
127
128print '<div class="twocolumns">';
129
130print '<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
131
132
133if (getDolGlobalString('MAIN_SEARCH_FORM_ON_HOME_AREAS')) { // This is useless due to the global search combo
134 if (isModEnabled('holiday') && $user->hasRight('holiday', 'read')) {
135 $langs->load("holiday");
136 $listofsearchfields['search_holiday'] = array('text' => 'TitreRequestCP');
137 }
138 if (isModEnabled('deplacement') && $user->hasRight('deplacement', 'lire')) {
139 $langs->load("trips");
140 $listofsearchfields['search_deplacement'] = array('text' => 'ExpenseReport');
141 }
142 if (isModEnabled('expensereport') && $user->hasRight('expensereport', 'lire')) {
143 $langs->load("trips");
144 $listofsearchfields['search_expensereport'] = array('text' => 'ExpenseReport');
145 }
146 if (count($listofsearchfields)) {
147 print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
148 print '<input type="hidden" name="token" value="'.newToken().'">';
149 print '<div class="div-table-responsive-no-min">';
150 print '<table class="noborder nohover centpercent">';
151 $i = 0;
152 foreach ($listofsearchfields as $key => $value) {
153 if ($i == 0) {
154 print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
155 }
156 print '<tr>';
157 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>';
158 if ($i == 0) {
159 print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
160 }
161 print '</tr>';
162 $i++;
163 }
164 print '</table>';
165 print '</div>';
166 print '</form>';
167 print '<br>';
168 }
169}
170
171
172if (isModEnabled('holiday')) {
173 if (!getDolGlobalString('HOLIDAY_HIDE_BALANCE')) {
174 $holidaystatic = new Holiday($db);
175 $user_id = $user->id;
176
177 print '<div class="div-table-responsive-no-min">';
178 print '<table class="noborder nohover centpercent">';
179 print '<tr class="liste_titre"><th colspan="3">'.$langs->trans("Holidays").'</th></tr>';
180 print '<tr class="oddeven nohover">';
181 print '<td>';
182
183 $out = '';
184 $nb_holiday = 0;
185 $typeleaves = $holidaystatic->getTypes(1, 1);
186 foreach ($typeleaves as $key => $val) {
187 $nb_type = $holidaystatic->getCPforUser($user->id, $val['rowid']);
188 $nb_holiday += $nb_type;
189 $out .= ' - '.($langs->trans($val['code']) != $val['code'] ? $langs->trans($val['code']) : $val['label']).': <strong>'.($nb_type ? price2num($nb_type) : 0).'</strong><br>';
190 }
191 $balancetoshow = $langs->trans('SoldeCPUser', '{s1}');
192 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>';
193 print '<span class="opacitymedium">'.$out.'</span>';
194
195 print '</td>';
196 print '</tr>';
197 print '</table></div><br>';
198 } elseif (!is_numeric(getDolGlobalString('HOLIDAY_HIDE_BALANCE'))) {
199 print $langs->trans(getDolGlobalString('HOLIDAY_HIDE_BALANCE')).'<br>';
200 }
201}
202
203
204print '</div><div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
205
206
207// Latest modified leave requests
208if (isModEnabled('holiday') && $user->hasRight('holiday', 'read')) {
209 $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.photo, u.gender, u.statut as user_status,";
210 $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";
211 $sql .= " FROM ".MAIN_DB_PREFIX."holiday as x, ".MAIN_DB_PREFIX."user as u";
212 $sql .= " WHERE u.rowid = x.fk_user";
213 $sql .= " AND x.entity = ".$conf->entity;
214 if (!$user->hasRight('holiday', 'readall')) {
215 $sql .= ' AND x.fk_user IN ('.$db->sanitize(implode(',', $childids)).')';
216 }
217 //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);
218 //if (!empty($socid)) $sql.= " AND x.fk_soc = ".((int) $socid);
219 $sql .= $db->order("x.tms", "DESC");
220 $sql .= $db->plimit($max, 0);
221
222 $result = $db->query($sql);
223 if ($result) {
224 $var = false;
225 $num = $db->num_rows($result);
226
227 $holidaystatic = new Holiday($db);
228 $userstatic = new User($db);
229
230 $listhalfday = array(
231 'morning' => $langs->trans("Morning"),
232 'morningshort' => $langs->trans("Morning"),
233 "afternoon" => $langs->trans("Afternoon"),
234 "afternoonshort" => $langs->trans("Afternoon")
235 );
236
237 $typeleaves = $holidaystatic->getTypes(1, -1);
238
239 $i = 0;
240
241 print '<div class="div-table-responsive-no-min">';
242 print '<table class="noborder centpercent">';
243 print '<tr class="liste_titre">';
244 print '<th colspan="3">'.$langs->trans("BoxTitleLastLeaveRequests", min($max, $num));
245 print '<a href="'.DOL_URL_ROOT.'/holiday/list.php?sortfield=cp.tms&sortorder=DESC" title="'.$langs->trans("FullList").'">';
246 print '<span class="badge marginleftonlyshort">...</span>';
247 print '</a>';
248 print '</th>';
249 print '<th></th>';
250 print '<th></th>';
251 print '<th></th>';
252 print '<th class="right">';
253 print '</th>';
254 print '</tr>';
255
256 if ($num) {
257 while ($i < $num && $i < $max) {
258 $obj = $db->fetch_object($result);
259
260 $holidaystatic->id = $obj->rowid;
261 $holidaystatic->ref = $obj->ref;
262 $holidaystatic->status = $obj->status;
263 $holidaystatic->date_debut = $db->jdate($obj->date_start);
264
265 $userstatic->id = $obj->uid;
266 $userstatic->lastname = $obj->lastname;
267 $userstatic->firstname = $obj->firstname;
268 $userstatic->login = $obj->login;
269 $userstatic->photo = $obj->photo;
270 $userstatic->email = $obj->email;
271 $userstatic->gender = $obj->gender;
272 $userstatic->status = $obj->user_status;
273
274 print '<tr class="oddeven">';
275 print '<td class="nowraponall">'.$holidaystatic->getNomUrl(1).'</td>';
276 print '<td class="tdoverflowmax100">'.$userstatic->getNomUrl(-1, 'leave').'</td>';
277
278 $leavecode = empty($typeleaves[$obj->fk_type]) ? 'Undefined' : $typeleaves[$obj->fk_type]['code'];
279 print '<td class="tdoverflowmax80" title="'.dol_escape_htmltag($langs->trans($leavecode)).'">'.dol_escape_htmltag($langs->trans($leavecode)).'</td>';
280
281 $starthalfday = ($obj->halfday == -1 || $obj->halfday == 2) ? 'afternoon' : 'morning';
282 $endhalfday = ($obj->halfday == 1 || $obj->halfday == 2) ? 'morning' : 'afternoon';
283
284 print '<td class="tdoverflowmax125 center lineheightsmall">'.dol_print_date($db->jdate($obj->date_start), 'dayreduceformat');
285 print '<br><span class="opacitymedium small" title="'.dolPrintHTML($langs->trans($listhalfday[$starthalfday])).'">';
286 $labelshort = $langs->trans($listhalfday[$starthalfday.'short']) != $listhalfday[$starthalfday.'short'] ? $langs->trans($listhalfday[$starthalfday.'short']) : $langs->trans($listhalfday[$starthalfday]);
287 print $labelshort;
288 print '</span>';
289 print '<td class="tdoverflowmax125 center lineheightsmall">'.dol_print_date($db->jdate($obj->date_end), 'dayreduceformat');
290 print '<br><span class="opacitymedium small" title="'.dolPrintHTML($langs->trans($listhalfday[$endhalfday])).'">';
291 $labelshort = $langs->trans($listhalfday[$endhalfday.'short']) != $listhalfday[$endhalfday.'short'] ? $langs->trans($listhalfday[$endhalfday.'short']) : $langs->trans($listhalfday[$starthalfday]);
292 print $labelshort;
293 print '</span>';
294 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>';
295 print '<td class="right nowrap" width="16">'.$holidaystatic->LibStatut($obj->status, 3, $holidaystatic->date_debut).'</td>';
296 print '</tr>';
297
298 $i++;
299 }
300 } else {
301 print '<tr class="oddeven"><td colspan="7"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
302 }
303 print '</table>';
304 print '</div>';
305 print '<br>';
306 } else {
307 dol_print_error($db);
308 }
309}
310
311
312// Latest modified expense report
313if (isModEnabled('expensereport') && $user->hasRight('expensereport', 'read')) {
314 $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.statut as user_status, u.photo, u.gender,";
315 $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";
316 $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as x, ".MAIN_DB_PREFIX."user as u";
317 //if (empty($user->rights->societe->client->voir) && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc";
318 $sql .= " WHERE u.rowid = x.fk_user_author";
319 $sql .= " AND x.entity = ".$conf->entity;
320 if (!$user->hasRight('expensereport', 'readall') && !$user->hasRight('expensereport', 'lire_tous')) {
321 $sql .= ' AND x.fk_user_author IN ('.$db->sanitize(implode(',', $childids)).')';
322 }
323 //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);
324 //if (!empty($socid)) $sql.= " AND x.fk_soc = ".((int) $socid);
325 $sql .= $db->order("x.tms", "DESC");
326 $sql .= $db->plimit($max, 0);
327
328 $result = $db->query($sql);
329 if ($result) {
330 $num = $db->num_rows($result);
331
332 $i = 0;
333
334 print '<div class="div-table-responsive-no-min">';
335 print '<table class="noborder centpercent">';
336 print '<tr class="liste_titre">';
337 print '<th colspan="2">'.$langs->trans("BoxTitleLastModifiedExpenses", min($max, $num));
338 print '<a href="'.DOL_URL_ROOT.'/expensereport/list.php?sortfield=d.tms&sortorder=DESC" title="'.$langs->trans("FullList").'">';
339 print '<span class="badge marginleftonlyshort">...</span>';
340 //print img_picto($langs->trans("FullList"), 'expensereport');
341 print '</a>';
342 print '</th>';
343 print '<th class="right">'.$langs->trans("AmountHT").'</th>';
344 print '<th class="right">'.$langs->trans("AmountTTC").'</th>';
345 print '<th></th>';
346 print '<th class="right">';
347 print '</th>';
348 print '</tr>';
349
350 if ($num) {
351 $expensereportstatic = new ExpenseReport($db);
352 $userstatic = new User($db);
353 while ($i < $num && $i < $max) {
354 $obj = $db->fetch_object($result);
355
356 $expensereportstatic->id = $obj->rowid;
357 $expensereportstatic->ref = $obj->ref;
358 $expensereportstatic->statut = $obj->status; // deprecated
359 $expensereportstatic->status = $obj->status;
360
361 $userstatic->id = $obj->uid;
362 $userstatic->lastname = $obj->lastname;
363 $userstatic->firstname = $obj->firstname;
364 $userstatic->email = $obj->email;
365 $userstatic->login = $obj->login;
366 $userstatic->status = $obj->user_status;
367 $userstatic->gender = $obj->gender;
368 $userstatic->photo = $obj->photo;
369
370 print '<tr class="oddeven">';
371 print '<td class="tdoverflowmax200">'.$expensereportstatic->getNomUrl(1).'</td>';
372 print '<td class="tdoverflowmax150">'.$userstatic->getNomUrl(-1).'</td>';
373 print '<td class="right amount">'.price($obj->total_ht).'</td>';
374 print '<td class="right amount">'.price($obj->total_ttc).'</td>';
375 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>';
376 print '<td class="right nowraponall" width="16">'.$expensereportstatic->LibStatut($obj->status, 3).'</td>';
377 print '</tr>';
378
379 $i++;
380 }
381 } else {
382 print '<tr class="oddeven"><td colspan="5"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
383 }
384 print '</table>';
385 print '</div>';
386 print '<br>';
387 } else {
388 dol_print_error($db);
389 }
390}
391
392
393// Last modified job position
394if (isModEnabled('recruitment') && $user->hasRight('recruitment', 'recruitmentjobposition', 'read')) {
395 $staticrecruitmentcandidature = new RecruitmentCandidature($db);
396 $staticrecruitmentjobposition = new RecruitmentJobPosition($db);
397 $sql = "SELECT rc.rowid, rc.ref, rc.email, rc.lastname, rc.firstname, rc.date_creation, rc.tms, rc.status,";
398 $sql .= " rp.rowid as jobid, rp.ref as jobref, rp.label";
399 $sql .= " FROM ".MAIN_DB_PREFIX."recruitment_recruitmentcandidature as rc";
400 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."recruitment_recruitmentjobposition as rp ON rc.fk_recruitmentjobposition = rp.rowid";
401 if (isModEnabled('societe') && !$user->hasRight('societe', 'client', 'voir') && !$socid) {
402 $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
403 }
404 $sql .= " WHERE rc.entity IN (".getEntity($staticrecruitmentcandidature->element).")";
405 if (isModEnabled('societe') && !$user->hasRight('societe', 'client', 'voir') && !$socid) {
406 $sql .= " AND rp.fk_soc = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
407 }
408 if ($socid) {
409 $sql .= " AND rp.fk_soc = $socid";
410 }
411 $sql .= $db->order("rc.tms", "DESC");
412 $sql .= $db->plimit($max, 0);
413
414 $resql = $db->query($sql);
415 if ($resql) {
416 $num = $db->num_rows($resql);
417 $i = 0;
418
419 print '<div class="div-table-responsive-no-min">';
420 print '<table class="noborder centpercent">';
421 print '<tr class="liste_titre">';
422 print '<th colspan="3">';
423 print $langs->trans("BoxTitleLatestModifiedCandidatures", min($max, $num));
424 print '<a href="'.DOL_URL_ROOT.'/recruitment/recruitmentcandidature_list.php?sortfield=t.tms&sortorder=DESC" title="'.$langs->trans("FullList").'">';
425 print '<span class="badge marginleftonlyshort">...</span>';
426 //print img_picto($langs->trans("FullList"), 'recruitmentcandidature');
427 print '</a>';
428 print '</th>';
429 print '<th></th>';
430 print '<th class="right">';
431 print '</th>';
432 print '</tr>';
433 if ($num) {
434 while ($i < $num) {
435 $objp = $db->fetch_object($resql);
436 $staticrecruitmentcandidature->id = $objp->rowid;
437 $staticrecruitmentcandidature->ref = $objp->ref;
438 $staticrecruitmentcandidature->email = $objp->email;
439 $staticrecruitmentcandidature->status = $objp->status;
440 $staticrecruitmentcandidature->date_creation = $objp->date_creation;
441 $staticrecruitmentcandidature->firstname = $objp->firstname;
442 $staticrecruitmentcandidature->lastname = $objp->lastname;
443
444 $staticrecruitmentjobposition->id = $objp->jobid;
445 $staticrecruitmentjobposition->ref = $objp->jobref;
446 $staticrecruitmentjobposition->label = $objp->label;
447
448 print '<tr class="oddeven">';
449 print '<td class="nowraponall">'.$staticrecruitmentcandidature->getNomUrl(1, '').'</td>';
450 print '<td class="tdoverflowmax150">'.$staticrecruitmentcandidature->getFullName($langs).'</td>';
451 print '<td class="nowraponall">'.$staticrecruitmentjobposition->getNomUrl(1).'</td>';
452 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>';
453 print '<td class="right nowrap" width="16">';
454 print $staticrecruitmentcandidature->getLibStatut(3);
455 print "</td>";
456 print '</tr>';
457 $i++;
458 }
459
460 $db->free($resql);
461 } else {
462 print '<tr class="oddeven"><td colspan="4"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
463 }
464 print "</table>";
465 print "</div>";
466 print "<br>";
467 } else {
468 dol_print_error($db);
469 }
470}
471
472print '</div></div></div>';
473
474// Initialize a technical object to manage hooks. Note that conf->hooks_modules contains array
475$parameters = array('user' => $user);
476$reshook = $hookmanager->executeHooks('dashboardHRM', $parameters, $object); // Note that $action and $object may have been modified by hook
477
478// End of page
479llxFooter();
480$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 to manage hooks.
Class for RecruitmentCandidature.
Class for RecruitmentJobPosition.
Class to manage Dolibarr users.
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.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
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.