dolibarr 25.0.0-alpha
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-2026 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 = getDolUserInt('MAIN_SIZE_SHORTLIST_LIMIT', 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
93if (GETPOST('addbox')) {
94 // Add box (when submit is done from a form when ajax disabled)
95 require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php';
96 $zone = GETPOSTINT('areacode');
97 $userid = GETPOSTINT('userid');
98 $boxorder = GETPOST('boxorder', 'aZ09');
99 $boxorder .= GETPOST('boxcombo', 'aZ09');
100 $result = InfoBox::saveboxorder($db, $zone, $boxorder, $userid);
101 if ($result > 0) {
102 setEventMessages($langs->trans("BoxAdded"), null);
103 }
104}
105
106
107/*
108 * View
109 */
110
111$listofsearchfields = array();
112
113$childids = $user->getAllChildIds();
114$childids[] = $user->id;
115
116$title = $langs->trans('HRMArea');
117
118// Load $resultboxes
119$resultboxes = FormOther::getBoxesArea($user, "10");
120
121llxHeader('', $title, '');
122
123print load_fiche_titre($langs->trans("HRMArea"), $resultboxes['selectboxlist'], 'hrm');
124
125
126if (!empty($setupcompanynotcomplete)) {
127 $langs->load("errors");
128 $warnpicto = img_warning($langs->trans("WarningMandatorySetupNotComplete"));
129 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>';
130
131 llxFooter();
132 exit;
133}
134
135
136print '<div class="fichecenter">';
137
138print '<div class="twocolumns">';
139
140print '<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
141
142
143if (getDolGlobalString('MAIN_SEARCH_FORM_ON_HOME_AREAS')) { // This is useless due to the global search combo
144 if (isModEnabled('holiday') && $user->hasRight('holiday', 'read')) {
145 $langs->load("holiday");
146 $listofsearchfields['search_holiday'] = array('text' => 'TitreRequestCP');
147 }
148 if (isModEnabled('deplacement') && $user->hasRight('deplacement', 'lire')) {
149 $langs->load("trips");
150 $listofsearchfields['search_deplacement'] = array('text' => 'ExpenseReport');
151 }
152 if (isModEnabled('expensereport') && $user->hasRight('expensereport', 'lire')) {
153 $langs->load("trips");
154 $listofsearchfields['search_expensereport'] = array('text' => 'ExpenseReport');
155 }
156 if (count($listofsearchfields)) {
157 print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
158 print '<input type="hidden" name="token" value="'.newToken().'">';
159 print '<div class="div-table-responsive-no-min">';
160 print '<table class="noborder nohover centpercent">';
161 $i = 0;
162 foreach ($listofsearchfields as $key => $value) {
163 if ($i == 0) {
164 print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
165 }
166 print '<tr>';
167 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>';
168 if ($i == 0) {
169 print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
170 }
171 print '</tr>';
172 $i++;
173 }
174 print '</table>';
175 print '</div>';
176 print '</form>';
177 print '<br>';
178 }
179}
180
181
182if (isModEnabled('holiday')) {
183 if (!getDolGlobalString('HOLIDAY_HIDE_BALANCE')) {
184 $holidaystatic = new Holiday($db);
185 $user_id = $user->id;
186
187 print '<div class="div-table-responsive-no-min">';
188 print '<table class="noborder nohover centpercent">';
189 print '<tr class="liste_titre"><th colspan="3">'.$langs->trans("Holidays").'</th></tr>';
190 print '<tr class="oddeven nohover">';
191 print '<td>';
192
193 $out = '';
194 $nb_holiday = 0;
195 $typeleaves = $holidaystatic->getTypes(1, 1);
196 foreach ($typeleaves as $key => $val) {
197 $nb_type = $holidaystatic->getCPforUser($user->id, $val['rowid']);
198 $nb_holiday += $nb_type;
199 $out .= ' - '.($langs->trans($val['code']) != $val['code'] ? $langs->trans($val['code']) : $val['label']).': <strong>'.($nb_type ? price2num($nb_type) : 0).'</strong><br>';
200 }
201 $balancetoshow = $langs->trans('SoldeCPUser', '{s1}');
202 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>';
203 print '<span class="opacitymedium">'.$out.'</span>';
204
205 print '</td>';
206 print '</tr>';
207 print '</table></div><br>';
208 } elseif (!is_numeric(getDolGlobalString('HOLIDAY_HIDE_BALANCE'))) {
209 print $langs->trans(getDolGlobalString('HOLIDAY_HIDE_BALANCE')).'<br>';
210 }
211}
212
213
214print $resultboxes['boxlista'];
215
216print '</div><div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
217
218
219// Latest modified leave requests
220if (isModEnabled('holiday') && $user->hasRight('holiday', 'read')) {
221 $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.photo, u.gender, u.statut as user_status,";
222 $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";
223 $sql .= " FROM ".MAIN_DB_PREFIX."holiday as x, ".MAIN_DB_PREFIX."user as u";
224 $sql .= " WHERE u.rowid = x.fk_user";
225 $sql .= " AND x.entity = ".((int) $conf->entity);
226 if (!$user->hasRight('holiday', 'readall')) {
227 $sql .= ' AND x.fk_user IN ('.$db->sanitize(implode(',', $childids)).')';
228 }
229 //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);
230 //if (!empty($socid)) $sql.= " AND x.fk_soc = ".((int) $socid);
231 $sql .= $db->order("x.tms", "DESC");
232 $sql .= $db->plimit($max, 0);
233
234 $result = $db->query($sql);
235 if ($result) {
236 $var = false;
237 $num = $db->num_rows($result);
238
239 $holidaystatic = new Holiday($db);
240 $userstatic = new User($db);
241
242 $listhalfday = array(
243 'morning' => $langs->trans("Morning"),
244 'morningshort' => $langs->trans("Morning"),
245 "afternoon" => $langs->trans("Afternoon"),
246 "afternoonshort" => $langs->trans("Afternoon")
247 );
248
249 $typeleaves = $holidaystatic->getTypes(1, -1);
250
251 $i = 0;
252
253 print '<div class="div-table-responsive-no-min">';
254 print '<table class="noborder centpercent">';
255 print '<tr class="liste_titre">';
256 print '<th colspan="3">'.$langs->trans("BoxTitleLastLeaveRequests", min($max, $num));
257 print '<a href="'.DOL_URL_ROOT.'/holiday/list.php?sortfield=cp.tms&sortorder=DESC" title="'.$langs->trans("FullList").'">';
258 print '<span class="badge marginleftonlyshort">...</span>';
259 print '</a>';
260 print '</th>';
261 print '<th></th>';
262 print '<th></th>';
263 print '<th></th>';
264 print '<th class="right">';
265 print '</th>';
266 print '</tr>';
267
268 if ($num) {
269 while ($i < $num && $i < $max) {
270 $obj = $db->fetch_object($result);
271
272 $holidaystatic->id = $obj->rowid;
273 $holidaystatic->ref = $obj->ref;
274 $holidaystatic->status = $obj->status;
275 $holidaystatic->date_debut = $db->jdate($obj->date_start);
276
277 $userstatic->id = $obj->uid;
278 $userstatic->lastname = $obj->lastname;
279 $userstatic->firstname = $obj->firstname;
280 $userstatic->login = $obj->login;
281 $userstatic->photo = $obj->photo;
282 $userstatic->email = $obj->email;
283 $userstatic->gender = $obj->gender;
284 $userstatic->status = $obj->user_status;
285
286 print '<tr class="oddeven">';
287 print '<td class="nowraponall">'.$holidaystatic->getNomUrl(1).'</td>';
288 print '<td class="tdoverflowmax100">'.$userstatic->getNomUrl(-1, 'leave').'</td>';
289
290 $leavecode = empty($typeleaves[$obj->fk_type]) ? 'Undefined' : $typeleaves[$obj->fk_type]['code'];
291 print '<td class="tdoverflowmax80" title="'.dol_escape_htmltag($langs->trans($leavecode)).'">'.dol_escape_htmltag($langs->trans($leavecode)).'</td>';
292
293 $starthalfday = ($obj->halfday == -1 || $obj->halfday == 2) ? 'afternoon' : 'morning';
294 $endhalfday = ($obj->halfday == 1 || $obj->halfday == 2) ? 'morning' : 'afternoon';
295
296 print '<td class="tdoverflowmax125 center lineheightsmall">'.dol_print_date($db->jdate($obj->date_start), 'dayreduceformat');
297 print '<br><span class="opacitymedium small" title="'.dolPrintHTML($langs->trans($listhalfday[$starthalfday])).'">';
298 $labelshort = $langs->trans($listhalfday[$starthalfday.'short']) != $listhalfday[$starthalfday.'short'] ? $langs->trans($listhalfday[$starthalfday.'short']) : $langs->trans($listhalfday[$starthalfday]);
299 print $labelshort;
300 print '</span>';
301 print '<td class="tdoverflowmax125 center lineheightsmall">'.dol_print_date($db->jdate($obj->date_end), 'dayreduceformat');
302 print '<br><span class="opacitymedium small" title="'.dolPrintHTML($langs->trans($listhalfday[$endhalfday])).'">';
303 $labelshort = $langs->trans($listhalfday[$endhalfday.'short']) != $listhalfday[$endhalfday.'short'] ? $langs->trans($listhalfday[$endhalfday.'short']) : $langs->trans($listhalfday[$starthalfday]);
304 print $labelshort;
305 print '</span>';
306 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>';
307 print '<td class="right nowrap" width="16">'.$holidaystatic->LibStatut($obj->status, 3, $holidaystatic->date_debut).'</td>';
308 print '</tr>';
309
310 $i++;
311 }
312 } else {
313 print '<tr class="oddeven"><td colspan="7"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
314 }
315 print '</table>';
316 print '</div>';
317 print '<br>';
318 } else {
320 }
321}
322
323
324// Latest modified expense report
325if (isModEnabled('expensereport') && $user->hasRight('expensereport', 'read')) {
326 $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.statut as user_status, u.photo, u.gender,";
327 $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";
328 $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as x, ".MAIN_DB_PREFIX."user as u";
329 //if (empty($user->rights->societe->client->voir) && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc";
330 $sql .= " WHERE u.rowid = x.fk_user_author";
331 $sql .= " AND x.entity = ".((int) $conf->entity);
332 if (!$user->hasRight('expensereport', 'readall') && !$user->hasRight('expensereport', 'lire_tous')) {
333 $sql .= ' AND x.fk_user_author IN ('.$db->sanitize(implode(',', $childids)).')';
334 }
335 //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);
336 //if (!empty($socid)) $sql.= " AND x.fk_soc = ".((int) $socid);
337 $sql .= $db->order("x.tms", "DESC");
338 $sql .= $db->plimit($max, 0);
339
340 $result = $db->query($sql);
341 if ($result) {
342 $num = $db->num_rows($result);
343
344 $i = 0;
345
346 print '<div class="div-table-responsive-no-min">';
347 print '<table class="noborder centpercent">';
348 print '<tr class="liste_titre">';
349 print '<th colspan="2">'.$langs->trans("BoxTitleLastModifiedExpenses", min($max, $num));
350 print '<a href="'.DOL_URL_ROOT.'/expensereport/list.php?sortfield=d.tms&sortorder=DESC" title="'.$langs->trans("FullList").'">';
351 print '<span class="badge marginleftonlyshort">...</span>';
352 //print img_picto($langs->trans("FullList"), 'expensereport');
353 print '</a>';
354 print '</th>';
355 print '<th class="right">'.$langs->trans("AmountHT").'</th>';
356 print '<th class="right">'.$langs->trans("AmountTTC").'</th>';
357 print '<th></th>';
358 print '<th class="right">';
359 print '</th>';
360 print '</tr>';
361
362 if ($num) {
363 $expensereportstatic = new ExpenseReport($db);
364 $userstatic = new User($db);
365 while ($i < $num && $i < $max) {
366 $obj = $db->fetch_object($result);
367
368 $expensereportstatic->id = $obj->rowid;
369 $expensereportstatic->ref = $obj->ref;
370 $expensereportstatic->statut = $obj->status; // deprecated
371 $expensereportstatic->status = $obj->status;
372
373 $userstatic->id = $obj->uid;
374 $userstatic->lastname = $obj->lastname;
375 $userstatic->firstname = $obj->firstname;
376 $userstatic->email = $obj->email;
377 $userstatic->login = $obj->login;
378 $userstatic->status = $obj->user_status;
379 $userstatic->gender = $obj->gender;
380 $userstatic->photo = $obj->photo;
381
382 print '<tr class="oddeven">';
383 print '<td class="tdoverflowmax200">'.$expensereportstatic->getNomUrl(1).'</td>';
384 print '<td class="tdoverflowmax150">'.$userstatic->getNomUrl(-1).'</td>';
385 print '<td class="right amount">'.price($obj->total_ht).'</td>';
386 print '<td class="right amount">'.price($obj->total_ttc).'</td>';
387 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>';
388 print '<td class="right nowraponall" width="16">'.$expensereportstatic->LibStatut($obj->status, 3).'</td>';
389 print '</tr>';
390
391 $i++;
392 }
393 } else {
394 print '<tr class="oddeven"><td colspan="5"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
395 }
396 print '</table>';
397 print '</div>';
398 print '<br>';
399 } else {
401 }
402}
403
404
405// Last modified job position
406if (isModEnabled('recruitment') && $user->hasRight('recruitment', 'recruitmentjobposition', 'read')) {
407 $staticrecruitmentcandidature = new RecruitmentCandidature($db);
408 $staticrecruitmentjobposition = new RecruitmentJobPosition($db);
409 $sql = "SELECT rc.rowid, rc.ref, rc.email, rc.lastname, rc.firstname, rc.date_creation, rc.tms, rc.status,";
410 $sql .= " rp.rowid as jobid, rp.ref as jobref, rp.label";
411 $sql .= " FROM ".MAIN_DB_PREFIX."recruitment_recruitmentcandidature as rc";
412 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."recruitment_recruitmentjobposition as rp ON rc.fk_recruitmentjobposition = rp.rowid";
413 if (isModEnabled('societe') && !$user->hasRight('societe', 'client', 'voir') && !$socid) {
414 $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
415 }
416 $sql .= " WHERE rc.entity IN (".getEntity($staticrecruitmentcandidature->element).")";
417 if (isModEnabled('societe') && !$user->hasRight('societe', 'client', 'voir') && !$socid) {
418 $sql .= " AND rp.fk_soc = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
419 }
420 if ($socid) {
421 $sql .= " AND rp.fk_soc = ".((int) $socid);
422 }
423 $sql .= $db->order("rc.tms", "DESC");
424 $sql .= $db->plimit($max, 0);
425
426 $resql = $db->query($sql);
427 if ($resql) {
428 $num = $db->num_rows($resql);
429 $i = 0;
430
431 print '<div class="div-table-responsive-no-min">';
432 print '<table class="noborder centpercent">';
433 print '<tr class="liste_titre">';
434 print '<th colspan="3">';
435 print $langs->trans("BoxTitleLatestModifiedCandidatures", min($max, $num));
436 print '<a href="'.DOL_URL_ROOT.'/recruitment/recruitmentcandidature_list.php?sortfield=t.tms&sortorder=DESC" title="'.$langs->trans("FullList").'">';
437 print '<span class="badge marginleftonlyshort">...</span>';
438 //print img_picto($langs->trans("FullList"), 'recruitmentcandidature');
439 print '</a>';
440 print '</th>';
441 print '<th></th>';
442 print '<th class="right">';
443 print '</th>';
444 print '</tr>';
445 if ($num) {
446 while ($i < $num) {
447 $objp = $db->fetch_object($resql);
448 $staticrecruitmentcandidature->id = $objp->rowid;
449 $staticrecruitmentcandidature->ref = $objp->ref;
450 $staticrecruitmentcandidature->email = $objp->email;
451 $staticrecruitmentcandidature->status = $objp->status;
452 $staticrecruitmentcandidature->date_creation = $objp->date_creation;
453 $staticrecruitmentcandidature->firstname = $objp->firstname;
454 $staticrecruitmentcandidature->lastname = $objp->lastname;
455
456 $staticrecruitmentjobposition->id = $objp->jobid;
457 $staticrecruitmentjobposition->ref = $objp->jobref;
458 $staticrecruitmentjobposition->label = $objp->label;
459
460 print '<tr class="oddeven">';
461 print '<td class="nowraponall">'.$staticrecruitmentcandidature->getNomUrl(1, '').'</td>';
462 print '<td class="tdoverflowmax150">'.$staticrecruitmentcandidature->getFullName($langs).'</td>';
463 print '<td class="nowraponall">'.$staticrecruitmentjobposition->getNomUrl(1).'</td>';
464 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>';
465 print '<td class="right nowrap" width="16">';
466 print $staticrecruitmentcandidature->getLibStatut(3);
467 print "</td>";
468 print '</tr>';
469 $i++;
470 }
471
472 $db->free($resql);
473 } else {
474 print '<tr class="oddeven"><td colspan="4"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
475 }
476 print "</table>";
477 print "</div>";
478 print "<br>";
479 } else {
481 }
482}
483
484print $resultboxes['boxlistb'];
485
486print '</div></div></div>';
487
488// Initialize a technical object to manage hooks. Note that conf->hooks_modules contains array
489$parameters = array('user' => $user);
490$reshook = $hookmanager->executeHooks('dashboardHRM', $parameters, $object); // Note that $action and $object may have been modified by hook
491
492// End of page
493llxFooter();
494$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.
static getBoxesArea($user, $areacode)
Get array with HTML tabs with widgets/boxes of a particular area including personalized choices of us...
Class of the module paid holiday.
static saveboxorder($dbs, $zone, $boxorder, $userid=0)
Save order of boxes for area and user.
Class for RecruitmentCandidature.
Class for RecruitmentJobPosition.
Class to manage Dolibarr users.
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $db
API class for accounts.
getDolUserInt($key, $default=0, $tmpuser=null)
Return Dolibarr user constant int value.
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'.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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).
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
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)
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
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.
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...
Definition html.lib.php:172
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.