dolibarr 25.0.0-alpha
index.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
5 * Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
6 * Copyright (C) 2015 Marcos García <marcosgdf@gmail.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 * Copyright (C) 2024-2025 Alexandre Spangaro <alexandre@inovea-conseil.com>
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
31define('CSRFCHECK_WITH_TOKEN', 1); // We force need to use a token to login when making a POST
32
33require 'main.inc.php';
44require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
45
46// If not defined, we select menu "home"
47$_GET['mainmenu'] = GETPOST('mainmenu', 'aZ09') ? GETPOST('mainmenu', 'aZ09') : 'home'; // Keep this ?
48$action = GETPOST('action', 'aZ09');
49
50$hookmanager->initHooks(array('index'));
51
52require_once DOL_DOCUMENT_ROOT.'/core/redirect_if_setup_not_complete.inc.php';
53
54
55/*
56 * Actions
57 */
58
59// Add box (when submit is done from a form when ajax disabled)
60include DOL_DOCUMENT_ROOT.'/core/actions_addbox.inc.php';
61
62
63/*
64 * View
65 */
66
67if (!isset($form) || !is_object($form)) {
68 $form = new Form($db);
69}
70
71$appli = constant('DOL_APPLICATION_TITLE');
72$applicustom = getDolGlobalString('MAIN_APPLICATION_TITLE');
73if ($applicustom) {
74 $appli = (preg_match('/^\+/', $applicustom) ? $appli : '').$applicustom;
75} else {
76 $appli .= " ".DOL_VERSION;
77}
78
79// Title
80$title = $langs->trans("HomeArea").' - '.$appli;
81
82llxHeader('', $title);
83
84$boxwork = ''; // Ensure this is initialised
85
86$resultboxes = FormOther::getBoxesArea($user, "0"); // Load $resultboxes (selectboxlist + boxactivated + boxlista + boxlistb)
87
88
89// Show the user message of the day (MOTD)
90if (getDolGlobalString('MAIN_MOTD')) {
91 $motd = preg_replace('/<br(\s[\sa-zA-Z_="]*)?\/?>/i', '<br>', getDolGlobalString('MAIN_MOTD'));
92
93 $substitutionarray = getCommonSubstitutionArray($langs);
94 complete_substitutions_array($substitutionarray, $langs);
95 $texttoshow = make_substitutions($motd, $substitutionarray, $langs);
96
97 print "\n<!-- Start of welcome text -->\n";
98 print '<table class="centpercent notopnoleftnoright"><tr><td>';
99 print dol_htmlentitiesbr($texttoshow);
100 print '</td></tr></table><br>';
101 print "\n<!-- End of welcome text -->\n";
102}
103
104/*
105 * Show specific warnings
106 */
107
108// Specific warning for legal announcement
109if (getDolGlobalString('MAIN_FORCE_SYSTEM_MESSAGE')) {
110 $langs->loadLangs(array("other"));
111 $messagetoshow = $langs->trans(getDolGlobalString('MAIN_FORCE_SYSTEM_MESSAGE'));
112 $messagetoshow = info_admin($messagetoshow, 0, 0, 'warning', 'clearboth');
113
114 $tmpobject = new stdClass();
115 $parameters = array('type' => 'MAIN_FORCE_SYSTEM_MESSAGE');
116 $reshook = $hookmanager->executeHooks('messageOfTheDay', $parameters, $tmpobject, $action); // Note that $action and $object may have been modified by some hooks
117 if ($reshook == 0) {
118 $messagetoshow .= $hookmanager->resPrint;
119 }
120 if ($messagetoshow) { // $message is an HTML string.
121 print '<!-- show system message -->';
122 print dol_string_onlythesehtmltags($messagetoshow, 1, 0, 0, 0, array('a', 'div', 'span', 'b'));
123 }
124}
125
126// Specific warning to recommend upgrade
127if (getDolGlobalString('MAIN_FORCE_UPGRADE_MESSAGE') || getDolGlobalString('MAIN_FORCE_UPGRADE_URL')) {
128 $langs->loadLangs(array("other"));
129 if (is_numeric(getDolGlobalString('MAIN_FORCE_UPGRADE_MESSAGE'))) {
130 $messagetoshow = $langs->trans("YourInstallIsOldThanksToUpgrade");
131 } else {
132 $messagetoshow = $langs->trans(getDolGlobalString('MAIN_FORCE_UPGRADE_MESSAGE', "YourInstallIsOldThanksToUpgrade"));
133 }
134 if (getDolGlobalString('MAIN_FORCE_UPGRADE_URL')) {
135 $messagetoshow .= '<br><a href="'.getDolGlobalString('MAIN_FORCE_UPGRADE_URL').'" target="_blank">'.getDolGlobalString('MAIN_FORCE_UPGRADE_URL').'</a>';
136 }
137 $messagetoshow = info_admin($messagetoshow, 0, 0, 'warning', 'clearboth');
138 print dol_string_onlythesehtmltags($messagetoshow, 1, 0, 0, 0, array('div', 'span', 'b'));
139}
140
141// Specific warning to propose to upgrade invoice situation to progressive mode
142/*
143if (getDolGlobalInt('INVOICE_USE_SITUATION') == 1) {
144 $langs->loadLangs(array("admin"));
145 print info_admin($langs->trans("WarningExperimentalFeatureInvoiceSituationNeedToUpgradeToProgressiveMode", 'https://partners.dolibarr.org'));
146 //print "<br>";
147}
148*/
149
150
151/*
152 * Show security warnings
153 */
154
155// Security warning if install.lock file is missing or if conf file is writable
156if (!getDolGlobalString('MAIN_REMOVE_INSTALL_WARNING')) {
157 $messagetoshow = '';
158
159 // Check if install lock file is present
160 $lockfile = DOL_DATA_ROOT.'/install.lock';
161 if (!empty($lockfile) && !file_exists($lockfile) && is_dir(DOL_DOCUMENT_ROOT."/install")) {
162 $langs->load("errors");
163 //if (!empty($message)) $message.='<br>';
164 $messagetoshow .= info_admin($langs->transnoentities("WarningLockFileDoesNotExists", DOL_DATA_ROOT).' '.$langs->transnoentities("WarningUntilDirRemoved", DOL_DOCUMENT_ROOT."/install"), 0, 0, 'warning', 'clearboth');
165 }
166
167 // Conf files must be in read only mode
168 if (is_writable($conffile)) {
169 // Try to remove automatically write permission
170 $currentPerm = fileperms($conffile);
171 $newPerm = $currentPerm & ~0222;
172 //print $conffile.' '.decoct($currentPerm).' '.(string) decoct($newPerm).' '.substr(decoct($newPerm), -4);
173 dolChmod($conffile, decoct($newPerm));
174
175 // @phpstan-ignore-next-line
176 if (is_writable($conffile)) {
177 $langs->load("errors");
178 $messagetoshow .= info_admin($langs->transnoentities("WarningConfFileMustBeReadOnly").' '.$langs->transnoentities("WarningUntilDirRemoved", DOL_DOCUMENT_ROOT."/install"), 0, 0, 'warning', 'clearboth');
179 }
180 }
181
182 $tmpobject = new stdClass();
183 $parameters = array('type' => 'MAIN_REMOVE_INSTALL_WARNING');
184 $reshook = $hookmanager->executeHooks('messageOfTheDay', $parameters, $tmpobject, $action); // Note that $action and $object may have been modified by some hooks
185 if ($reshook == 0) {
186 $messagetoshow .= $hookmanager->resPrint;
187 }
188 if ($messagetoshow) { // $message is an HTML string.
189 print '<!-- show security warning -->';
190 print dol_string_onlythesehtmltags($messagetoshow, 1, 0, 0, 0, array('div', 'span', 'b'));
191 }
192}
193
194/*
195 * Dashboard Dolibarr statistics
196 * Hidden for external users
197 */
198
199print load_fiche_titre('&nbsp;', $resultboxes['selectboxlist'], '', 0, '', 'titleforhome');
200
201// Load translation files required by page
202$langs->loadLangs(array('commercial', 'bills', 'orders', 'contracts'));
203
204// Dolibarr Working Board with weather
205if (!getDolGlobalString('MAIN_DISABLE_GLOBAL_WORKBOARD') && getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER') < 2) {
206 $showweather = (!getDolGlobalString('MAIN_DISABLE_METEO') || getDolGlobalInt('MAIN_DISABLE_METEO') == 2) ? 1 : 0;
207
208 // Array that contains all WorkboardResponse classes to process them
209 $dashboardlines = array();
210
211 // Do not include sections without management permission
212 require_once DOL_DOCUMENT_ROOT.'/core/class/workboardresponse.class.php';
213
214 // Number of actions to do (late)
215 if (isModEnabled('agenda') && !getDolGlobalString('MAIN_DISABLE_BLOCK_AGENDA') && $user->hasRight('agenda', 'myactions', 'read')) {
216 include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
217 $board = new ActionComm($db);
218 $dashboardlines[$board->element] = $board->load_board($user);
219 }
220
221 // Number of project opened
222 if (isModEnabled('project') && !getDolGlobalString('MAIN_DISABLE_BLOCK_PROJECT') && $user->hasRight('projet', 'lire')) {
223 include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
224 $board = new Project($db);
225 $dashboardlines[$board->element] = $board->load_board($user);
226 }
227
228 // Number of tasks to do (late)
229 if (isModEnabled('project') && !getDolGlobalString('MAIN_DISABLE_BLOCK_PROJECT') && !getDolGlobalString('PROJECT_HIDE_TASKS') && $user->hasRight('projet', 'lire')) {
230 include_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
231 $board = new Task($db);
232 $dashboardlines[$board->element] = $board->load_board($user);
233 }
234
235 // Number of commercial customer proposals open (expired)
236 if (isModEnabled('propal') && !getDolGlobalString('MAIN_DISABLE_BLOCK_CUSTOMER') && $user->hasRight('propal', 'read')) {
237 include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
238 $board = new Propal($db);
239 $dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
240 // Number of commercial proposals CLOSED signed (billed)
241 $dashboardlines[$board->element.'_signed'] = $board->load_board($user, "signed");
242 }
243
244 // Number of supplier proposals open (expired)
245 if (isModEnabled('supplier_proposal') && !getDolGlobalString('MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight('supplier_proposal', 'lire')) {
246 $langs->load("supplier_proposal");
247 include_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
248 $board = new SupplierProposal($db);
249 $dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
250 // Number of commercial proposals CLOSED signed (billed)
251 $dashboardlines[$board->element.'_signed'] = $board->load_board($user, "signed");
252 }
253
254 // Number of sales orders
255 if (isModEnabled('order') && !getDolGlobalString('MAIN_DISABLE_BLOCK_CUSTOMER') && $user->hasRight('commande', 'lire')) {
256 include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
257 $board = new Commande($db);
258 // Number of customer orders to be shipped (validated and in progress)
259 $dashboardlines[$board->element.'_toship'] = $board->load_board($user, 'toship');
260 // Number of customer orders to be billed (not visible by default, does not match a lot of organization).
261 if (getDolGlobalInt('ORDER_BILL_AFTER_VALIDATION')) {
262 $dashboardlines[$board->element.'_tobill'] = $board->load_board($user, 'tobill');
263 }
264 // Number of customer orders to be billed (delivered but not billed)
265 $dashboardlines[$board->element.'_shippedtobill'] = $board->load_board($user, 'shippedtobill');
266 }
267
268 // Number of suppliers orders
269 if (isModEnabled('supplier_order') && !getDolGlobalString('MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight('fournisseur', 'commande', 'lire')) {
270 include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
271 $board = new CommandeFournisseur($db);
272 $dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
273 $dashboardlines[$board->element.'_awaiting'] = $board->load_board($user, 'awaiting');
274 }
275
276 // Number of contract / services enabled (delayed)
277 if (isModEnabled('contract') && !getDolGlobalString('MAIN_DISABLE_BLOCK_CONTRACT') && $user->hasRight('contrat', 'lire')) {
278 include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
279 $board = new Contrat($db);
280 $dashboardlines[$board->element.'_inactive'] = $board->load_board($user, "inactive");
281 // Number of active services (expired)
282 $dashboardlines[$board->element.'_active'] = $board->load_board($user, "active");
283 }
284
285 // Number of tickets open
286 if (isModEnabled('ticket') && !getDolGlobalString('MAIN_DISABLE_BLOCK_TICKET') && $user->hasRight('ticket', 'read')) {
287 include_once DOL_DOCUMENT_ROOT.'/ticket/class/ticket.class.php';
288 $board = new Ticket($db);
289 $dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
290 // Number of active services (expired)
291 //$dashboardlines[$board->element.'_active'] = $board->load_board($user, "active");
292 }
293
294 // Number of invoices customers (paid)
295 if (isModEnabled('invoice') && !getDolGlobalString('MAIN_DISABLE_BLOCK_CUSTOMER') && $user->hasRight('facture', 'lire')) {
296 include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
297 $board = new Facture($db);
298 $dashboardlines[$board->element] = $board->load_board($user);
299 }
300
301 // Number of supplier invoices (paid)
302 if (isModEnabled('supplier_invoice') && !getDolGlobalString('MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight('fournisseur', 'facture', 'lire')) {
303 include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
304 $board = new FactureFournisseur($db);
305 $dashboardlines[$board->element] = $board->load_board($user);
306 }
307
308 // Number of transactions to conciliate
309 if (isModEnabled('bank') && !getDolGlobalString('MAIN_DISABLE_BLOCK_BANK') && $user->hasRight('banque', 'lire') && !$user->socid) {
310 include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
311 $board = new Account($db);
312 $nb = $board->countAccountToReconcile(); // Get nb of account to reconciliate
313 if ($nb > 0) {
314 $dashboardlines[$board->element] = $board->load_board($user);
315 }
316 }
317
318 // Number of cheque to send
319 if (isModEnabled('bank') && !getDolGlobalString('MAIN_DISABLE_BLOCK_BANK') && $user->hasRight('banque', 'lire') && !$user->socid) {
320 if (!getDolGlobalString('BANK_DISABLE_CHECK_DEPOSIT')) {
321 include_once DOL_DOCUMENT_ROOT . '/compta/paiement/cheque/class/remisecheque.class.php';
322 $board = new RemiseCheque($db);
323 $dashboardlines[$board->element] = $board->load_board($user); // board->element is 'withdraw'
324 }
325 if (isModEnabled('prelevement')) {
326 include_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
327 $board = new BonPrelevement($db);
328 $dashboardlines[$board->element . '_direct_debit'] = $board->load_board($user, 'direct-debit');
329 }
330 if (isModEnabled('paymentbybanktransfer')) {
331 include_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
332 $board = new BonPrelevement($db);
333 $dashboardlines[$board->element . '_credit_transfer'] = $board->load_board($user, 'credit-transfer');
334 }
335 }
336
337 // Number of foundation members
338 if (isModEnabled('member') && !getDolGlobalString('MAIN_DISABLE_BLOCK_ADHERENT') && $user->hasRight('adherent', 'lire') && !$user->socid) {
339 include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
340 $board = new Adherent($db);
341 $dashboardlines[$board->element.'_shift'] = $board->load_board($user, 'shift');
342 $dashboardlines[$board->element.'_expired'] = $board->load_board($user, 'expired');
343 }
344
345 // Number of expense reports to approve
346 if (isModEnabled('expensereport') && !getDolGlobalString('MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight('expensereport', 'approve')) {
347 include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
348 $board = new ExpenseReport($db);
349 $dashboardlines[$board->element.'_toapprove'] = $board->load_board($user, 'toapprove');
350 }
351
352 // Number of expense reports to pay
353 if (isModEnabled('expensereport') && !getDolGlobalString('MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight('expensereport', 'to_paid')) {
354 include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
355 $board = new ExpenseReport($db);
356 $dashboardlines[$board->element.'_topay'] = $board->load_board($user, 'topay');
357 }
358
359 // Number of holidays to approve
360 if (isModEnabled('holiday') && !getDolGlobalString('MAIN_DISABLE_BLOCK_HOLIDAY') && $user->hasRight('holiday', 'approve')) {
361 include_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
362 $board = new Holiday($db);
363 $dashboardlines[$board->element] = $board->load_board($user);
364 }
365
366 if (isModEnabled('mrp') && !getDolGlobalString('MAIN_DISABLE_BLOCK_MRP')) {
367 include_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php';
368 $board = new Mo($db);
369 $dashboardlines[$board->element] = $board->load_board($user);
370 }
371
372 $object = new stdClass();
373 $parameters = array();
374 $action = '';
375 $reshook = $hookmanager->executeHooks(
376 'addOpenElementsDashboardLine',
377 $parameters,
378 $object,
379 $action
380 ); // Note that $action and $object may have been modified by some hooks
381 if ($reshook == 0) {
382 $dashboardlines = array_merge($dashboardlines, $hookmanager->resArray);
383 }
384 /* Open object dashboard */
385 $dashboardgroup = array(
386 'action' =>
387 array(
388 'groupName' => 'Agenda',
389 'stats' => array('action'),
390 ),
391 'project' =>
392 array(
393 'groupName' => 'Projects',
394 'globalStatsKey' => 'projects',
395 'stats' => array('project', 'project_task'),
396 ),
397 'propal' =>
398 array(
399 'groupName' => 'Proposals',
400 'globalStatsKey' => 'proposals',
401 'stats' =>
402 array('propal_opened', 'propal_signed'),
403 ),
404 'commande' =>
405 array(
406 'groupName' => 'Orders',
407 'globalStatsKey' => 'orders',
408 'stats' =>
409 array('commande_toship', 'commande_tobill', 'commande_shippedtobill'),
410 ),
411 'facture' =>
412 array(
413 'groupName' => 'Invoices',
414 'globalStatsKey' => 'invoices',
415 'stats' =>
416 array('facture'),
417 ),
418 'supplier_proposal' =>
419 array(
420 'lang' => 'supplier_proposal',
421 'groupName' => 'SupplierProposals',
422 'globalStatsKey' => 'askprice',
423 'stats' =>
424 array('supplier_proposal_opened', 'supplier_proposal_signed'),
425 ),
426 'order_supplier' =>
427 array(
428 'groupName' => 'SuppliersOrders',
429 'globalStatsKey' => 'supplier_orders',
430 'stats' =>
431 array('order_supplier_opened', 'order_supplier_awaiting'),
432 ),
433 'invoice_supplier' =>
434 array(
435 'groupName' => 'BillsSuppliers',
436 'globalStatsKey' => 'supplier_invoices',
437 'stats' =>
438 array('invoice_supplier'),
439 ),
440 'contrat' =>
441 array(
442 'groupName' => 'Contracts',
443 'globalStatsKey' => 'Contracts',
444 'stats' =>
445 array('contrat_inactive', 'contrat_active'),
446 ),
447 'ticket' =>
448 array(
449 'groupName' => 'Tickets',
450 'globalStatsKey' => 'ticket',
451 'stats' =>
452 array('ticket_opened'),
453 ),
454 'bank_account' =>
455 array(
456 'groupName' => 'BankAccount',
457 'stats' =>
458 array('bank_account', 'chequereceipt', 'widthdraw_direct_debit', 'widthdraw_credit_transfer'),
459 ),
460 'member' =>
461 array(
462 'groupName' => 'Members',
463 'globalStatsKey' => 'members',
464 'stats' =>
465 array('member_shift', 'member_expired'),
466 ),
467 'expensereport' =>
468 array(
469 'groupName' => 'ExpenseReport',
470 'globalStatsKey' => 'expensereports',
471 'stats' =>
472 array('expensereport_toapprove', 'expensereport_topay'),
473 ),
474 'holiday' =>
475 array(
476 'groupName' => 'Holidays',
477 'globalStatsKey' => 'holidays',
478 'stats' =>
479 array('holiday'),
480 ),
481 'cubes' =>
482 array(
483 'groupName' => 'Mo',
484 'globalStatsKey' => 'mrp',
485 'stats' =>
486 array('mo'),
487 ),
488 );
489 $object = new stdClass();
490 $parameters = array(
491 'dashboardgroup' => $dashboardgroup
492 );
493 $reshook = $hookmanager->executeHooks('addOpenElementsDashboardGroup', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
494 if ($reshook == 0) {
495 $dashboardgroup = array_merge($dashboardgroup, $hookmanager->resArray);
496 }
497
498
499 // Calculate total nb of late
500 $totallate = $totaltodo = 0;
501
502 //Remove any invalid response
503 //load_board can return an integer if failed, or WorkboardResponse if OK
504 $valid_dashboardlines = array();
505 foreach ($dashboardlines as $workboardid => $tmp) {
506 if ($tmp instanceof WorkboardResponse) {
507 $tmp->id = (string) $workboardid; // Complete the object to add its id into its name
508 $valid_dashboardlines[$workboardid] = $tmp;
509 }
510 }
511 // We calculate $totallate. Must be defined before start of next loop because it is show in first fetch on next loop
512 foreach ($valid_dashboardlines as $board) {
513 if (is_numeric($board->nbtodo) && is_numeric($board->nbtodolate) && $board->nbtodolate > 0) {
514 $totaltodo += $board->nbtodo;
515 $totallate += $board->nbtodolate;
516 }
517 }
518
519 $openedDashBoardSize = 'info-box-sm'; // use sm by default
520 foreach ($dashboardgroup as $dashbordelement) {
521 if (is_array($dashbordelement['stats']) && count($dashbordelement['stats']) > 2) {
522 $openedDashBoardSize = ''; // use default info box size : big
523 break;
524 }
525 }
526
527 $totalLateNumber = $totallate;
528 $totallatePercentage = ((!empty($totaltodo)) ? round($totallate / $totaltodo * 100, 2) : 0);
529 if (getDolGlobalString('MAIN_USE_METEO_WITH_PERCENTAGE')) {
530 $totallate = $totallatePercentage;
531 }
532
533 // Fill the content to show the tasks to do as a widget box (old version). Now this is no more used. Tasks to do ar in dedicated thumbs.
534 $boxwork = '';
535 $boxwork .= '<div class="box">';
536 $boxwork .= '<table summary="'.dol_escape_htmltag($langs->trans("WorkingBoard")).'" class="noborder boxtable boxtablenobottom boxworkingboard centpercent">'."\n";
537 $boxwork .= '<tr class="liste_titre">';
538 $boxwork .= '<th class="liste_titre"><div class="inline-block valignmiddle">'.$langs->trans("DolibarrWorkBoard").'</div>';
539 if ($showweather) {
540 if ($totallate > 0) {
541 $text = $langs->transnoentitiesnoconv("WarningYouHaveAtLeastOneTaskLate").' ('.$langs->transnoentitiesnoconv(
542 "NActionsLate",
543 $totallate.(getDolGlobalString('MAIN_USE_METEO_WITH_PERCENTAGE') ? '%' : '')
544 ).')';
545 } else {
546 $text = $langs->transnoentitiesnoconv("NoItemLate");
547 }
548 $text .= '. '.$langs->transnoentitiesnoconv("LateDesc");
549 //$text.=$form->textwithpicto('',$langs->trans("LateDesc"));
550 $options = 'height="24px" style="float: right"';
551 $boxwork .= showWeather($totallate, $text, $options, 'inline-block valignmiddle');
552 }
553 $boxwork .= '</th>';
554 $boxwork .= '</tr>'."\n";
555
556 // Show dashboard
557 $nbworkboardempty = 0;
558 $isIntopOpenedDashBoard = array();
559 $openedDashBoard = '';
560 if (!empty($valid_dashboardlines)) {
561 $boxwork .= '<tr class="nobottom nohover"><td class="tdboxstats nohover flexcontainer centpercent"><div style="display: flex: flex-wrap: wrap">';
562 foreach ($dashboardgroup as $groupKey => $groupElement) {
563 $boards = array();
564
565 // Scan $groupElement and save the one with 'stats' that must be used for the open objects dashboard
566 if (!getDolGlobalString('MAIN_DISABLE_NEW_OPENED_DASH_BOARD')) {
567 foreach ($groupElement['stats'] as $infoKey) {
568 if (!empty($valid_dashboardlines[$infoKey])) {
569 $boards[] = $valid_dashboardlines[$infoKey];
570 $isIntopOpenedDashBoard[] = $infoKey;
571 }
572 }
573 }
574
575
576 if (!empty($boards)) {
577 if (!empty($groupElement['lang'])) {
578 $langs->load($groupElement['lang']);
579 }
580 // @phan-suppress-next-line PhanTypePossiblyInvalidDimOffset
581 $groupName = $langs->trans($groupElement['groupName']);
582 $groupKeyLowerCase = strtolower($groupKey);
583
584 // global stats
585 $globalStatsKey = false;
586 if (!empty($groupElement['globalStatsKey']) && empty($groupElement['globalStats'])) { // can be filled by hook
587 $globalStatsKey = $groupElement['globalStatsKey'];
588 $groupElement['globalStats'] = array();
589 }
590
591 // Links
592 $arrayLinks = array(
593 'action' => dol_buildpath('/comm/action/card.php?action=create', 1),
594 'project' => dol_buildpath('/projet/card.php?action=create', 1),
595 'propal' => dol_buildpath('/comm/propal/card.php?action=create', 1),
596 'commande' => dol_buildpath('/commande/card.php?action=create', 1),
597 'facture' => dol_buildpath('/compta/facture/card.php?action=create', 1),
598 'supplier_proposal' => dol_buildpath('/supplier_proposal/card.php?action=create', 1),
599 'order_supplier' => dol_buildpath('/fourn/commande/card.php?action=create', 1),
600 'invoice_supplier' => dol_buildpath('/fourn/facture/card.php?action=create', 1),
601 'contrat' => dol_buildpath('/contrat/card.php?action=create', 1),
602 'ticket' => dol_buildpath('/ticket/card.php?action=create', 1),
603 'bank_account' => dol_buildpath('/compta/bank/card.php?action=create', 1),
604 'member' => dol_buildpath('/adherents/card.php?action=create', 1),
605 'expensereport' => dol_buildpath('/expensereport/card.php?action=create', 1),
606 'holiday' => dol_buildpath('/holiday/card.php?action=create', 1),
607 'cubes' => dol_buildpath('/mrp/mo_card.php?action=create', 1),
608
609 );
610 $infoboxMoreCss = '';
611 if (array_key_exists($groupKey, $arrayLinks)) {
612 $infoboxMoreCss = 'infobox-haslink';
613 }
614
615 $openedDashBoard .= '<div class="box-flex-item"><div class="box-flex-item-with-margin">'."\n";
616 $openedDashBoard .= ' <div class="info-box '.$openedDashBoardSize.' '.$infoboxMoreCss.'">'."\n";
617 $openedDashBoard .= ' <span class="info-box-icon bg-infobox-'.$groupKeyLowerCase.'">'."\n";
618 $openedDashBoard .= ' <i class="fa fa-dol-'.$groupKeyLowerCase.'"></i>'."\n";
619
620 // Show the span for the total of record. TODO This seems not used.
621 if (!empty($groupElement['globalStats'])) {
622 $openedDashBoard .= '<span class="info-box-icon-text" title="'.$groupElement['globalStats']['text'].'">'.$groupElement['globalStats']['nbTotal'].'</span>';
623 }
624
625 if (array_key_exists($groupKey, $arrayLinks)) {
626 $openedDashBoard .= ' <a href="'.$arrayLinks[$groupKey].'" class="info-box-createlink"><span class="fas fa-plus-circle"></span></a>'."\n";
627 }
628
629 $openedDashBoard .= '</span>'."\n";
630 $openedDashBoard .= '<div class="info-box-content">'."\n";
631
632 $openedDashBoard .= '<div class="info-box-title" title="'.dolPrintHTMLForAttribute($groupName).'">'.$groupName.'</div>'."\n";
633 $openedDashBoard .= '<div class="info-box-lines">'."\n";
634
635 foreach ($boards as $board) {
636 $openedDashBoard .= '<div class="info-box-line spanoverflow nowrap">';
637
638 if (!empty($board->labelShort)) {
639 $infoName = '<div class="marginrightonly inline-block valignmiddle info-box-line-text" title="'.$board->label.'">'.$board->labelShort.'</div>';
640 } else {
641 $infoName = '<div class="marginrightonly inline-block valignmiddle info-box-line-text">'.$board->label.'</div>';
642 }
643
644 $textLateTitle = $langs->trans("NActionsLate", $board->nbtodolate);
645
646 $dateOrder = '';
647 if ($board->id == 'mo') {
648 $dateOrder = $langs->trans("DateToday") . " > " . $langs->trans("DateReference");
649 } else {
650 $dateOrder = $langs->trans("DateReference") . " > " . $langs->trans("DateToday");
651 }
652 $warningDelay = ceil(empty($board->warning_delay) ? 0 : $board->warning_delay);
653 $sign = '';
654 if ($warningDelay >= 0) {
655 $sign = '+';
656 }
657
658 $textLateTitle .= " (" . $langs->trans("Late") . " = $dateOrder $sign$warningDelay " . $langs->trans("days") . ")";
659
660 if ($board->id == 'bank_account') {
661 $textLateTitle .= '<br><span class="opacitymedium">'.$langs->trans("IfYouDontReconcileDisableProperty", $langs->transnoentitiesnoconv("Conciliable")).'</span>';
662 }
663
664 $textLate = '';
665 if ($board->nbtodolate > 0) {
666 $textLate .= '<span title="'.dol_escape_htmltag($textLateTitle).'" class="classfortooltip badge badge-warning">';
667 $textLate .= '<i class="fa fa-exclamation-triangle hideonsmartphone"></i> '.$board->nbtodolate;
668 $textLate .= '</span>';
669 }
670
671 $nbtodClass = '';
672 if ($board->nbtodo > 0) {
673 $nbtodClass = 'badge badge-info';
674 } else {
675 $nbtodClass = 'opacitymedium';
676 }
677
678 // Forge the line to show into the open object box
679 $labeltoshow = $board->label.' ('.$board->nbtodo.')';
680 if ($board->total > 0) {
681 $labeltoshow .= ' - '.price($board->total, 0, $langs, 1, -1, -1, getDolCurrency());
682 }
683 $openedDashBoard .= '<a href="'.$board->url.'" class="info-box-text info-box-text-a">';
684 $openedDashBoard .= $infoName;
685 $openedDashBoard .= '</a>';
686 $openedDashBoard .= '<div class="inline-block nowraponall">';
687 $openedDashBoard .= '<a href="'.$board->url.'" class="info-box-text info-box-text-a">';
688 $openedDashBoard .= '<span class="classfortooltip'.($nbtodClass ? ' '.$nbtodClass : '').'" title="'.$labeltoshow.'">';
689 $openedDashBoard .= $board->nbtodo;
690 if ($board->total > 0 && getDolGlobalString('MAIN_WORKBOARD_SHOW_TOTAL_WO_TAX')) {
691 $openedDashBoard .= ' : '.price($board->total, 0, $langs, 1, -1, -1, getDolCurrency());
692 }
693 $openedDashBoard .= '</span>';
694 $openedDashBoard .= '</a>';
695
696 if ($textLate) {
697 if ($board->url_late) {
698 $openedDashBoard .= '</div>';
699 $openedDashBoard .= ' <div class="inline-block"><a href="'.$board->url_late.'" class="info-box-text info-box-text-a paddingleft">';
700 } else {
701 $openedDashBoard .= ' <span class="info-box-text info-box-text-a displaycontents">';
702 }
703 $openedDashBoard .= $textLate;
704 if ($board->url_late) {
705 $openedDashBoard .= '</a>';
706 } else {
707 $openedDashBoard .= '</span>';
708 }
709 }
710 $openedDashBoard .= '</div>'."\n";
711 //$openedDashBoard .= '</div>';
712 $openedDashBoard .= '</div>'."\n"; // info-box-line
713 }
714
715 // TODO Add hook here to add more "info-box-line"
716
717 $openedDashBoard .= ' </div><!-- /.info-box-lines --></div><!-- /.info-box-content -->'."\n";
718 $openedDashBoard .= ' </div><!-- /.info-box -->'."\n";
719 $openedDashBoard .= '</div><!-- /.box-flex-item-with-margin -->'."\n";
720 $openedDashBoard .= '</div><!-- /.box-flex-item -->'."\n";
721 $openedDashBoard .= "\n";
722 }
723 }
724
725 if ($showweather && !empty($isIntopOpenedDashBoard)) {
726 $appendClass = (getDolGlobalInt('MAIN_DISABLE_METEO') == 2 ? ' hideonsmartphone' : '');
727 $weather = getWeatherStatus($totallate);
728
729 $text = '';
730 if ($totallate > 0) {
731 $text = $langs->transnoentitiesnoconv("WarningYouHaveAtLeastOneTaskLate").' ('.$langs->transnoentitiesnoconv(
732 "NActionsLate",
733 $totallate.(getDolGlobalString('MAIN_USE_METEO_WITH_PERCENTAGE') ? '%' : '')
734 ).')';
735 } else {
736 $text = $langs->transnoentitiesnoconv("NoItemLate");
737 }
738 $text .= '. '.$langs->transnoentitiesnoconv("LateDesc");
739
740 $weatherDashBoard = '<div class="box-flex-item '.$appendClass.'"><div class="box-flex-item-with-margin">'."\n";
741 $weatherDashBoard .= ' <div class="info-box '.$openedDashBoardSize.' info-box-weather info-box-weather-level'.$weather->level.'">'."\n";
742 $weatherDashBoard .= ' <span class="info-box-icon">';
743 $weatherDashBoard .= img_weather('', $weather->level, '', 0, 'valignmiddle width50');
744 $weatherDashBoard .= ' </span>'."\n";
745 $weatherDashBoard .= ' <div class="info-box-content">'."\n";
746 $weatherDashBoard .= ' <div class="info-box-title">'.$langs->trans('GlobalOpenedElemView').'</div>'."\n";
747
748 if ($totallatePercentage > 0 && getDolGlobalString('MAIN_USE_METEO_WITH_PERCENTAGE')) {
749 $weatherDashBoard .= ' <span class="info-box-number">'.$langs->transnoentitiesnoconv(
750 "NActionsLate",
751 price($totallatePercentage).'%'
752 ).'</span>'."\n";
753 $weatherDashBoard .= ' <span class="progress-description">'.$langs->trans(
754 'NActionsLate',
755 $totalLateNumber
756 ).'</span>'."\n";
757 } else {
758 $weatherDashBoard .= ' <span class="info-box-number">'.$langs->transnoentitiesnoconv(
759 "NActionsLate",
760 (string) $totalLateNumber
761 ).'</span>'."\n";
762 if ($totallatePercentage > 0) {
763 $weatherDashBoard .= ' <span class="progress-description">'.$langs->trans(
764 'NActionsLate',
765 price($totallatePercentage).'%'
766 ).'</span>'."\n";
767 }
768 }
769
770 $weatherDashBoard .= ' </div><!-- /.info-box-content -->'."\n";
771 $weatherDashBoard .= ' </div><!-- /.info-box -->'."\n";
772 $weatherDashBoard .= '</div><!-- /.box-flex-item-with-margin -->'."\n";
773 $weatherDashBoard .= '</div><!-- /.box-flex-item -->'."\n";
774 $weatherDashBoard .= "\n";
775
776 $openedDashBoard = $weatherDashBoard.$openedDashBoard;
777 }
778
779 if (!empty($isIntopOpenedDashBoard)) {
780 for ($i = 1; $i <= 10; $i++) {
781 $openedDashBoard .= '<div class="box-flex-item filler"></div>';
782 }
783 }
784
785 $nbworkboardcount = 0;
786 foreach ($valid_dashboardlines as $infoKey => $board) {
787 if (in_array($infoKey, $isIntopOpenedDashBoard)) {
788 // skip if info is present on top
789 continue;
790 }
791
792 if (empty($board->nbtodo)) {
793 $nbworkboardempty++;
794 }
795 $nbworkboardcount++;
796
797
798 $textlate = $langs->trans("NActionsLate", $board->nbtodolate);
799 $textlate .= ' ('.$langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($board->warning_delay) >= 0 ? '+' : '').ceil($board->warning_delay).' '.$langs->trans("days").')';
800
801
802 $boxwork .= '<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats130 boxstatsborder">';
803 $boxwork .= '<div class="boxstatscontent">';
804 $boxwork .= '<span class="boxstatstext" title="'.dol_escape_htmltag($board->label).'">'.$board->img.' <span>'.$board->label.'</span></span><br>';
805 $boxwork .= '<a class="valignmiddle dashboardlineindicator" href="'.$board->url.'"><span class="dashboardlineindicator'.(($board->nbtodo == 0) ? ' dashboardlineok' : '').'">'.$board->nbtodo.'</span></a>';
806 if ($board->total > 0 && getDolGlobalString('MAIN_WORKBOARD_SHOW_TOTAL_WO_TAX')) {
807 $boxwork .= '&nbsp;/&nbsp;<a class="valignmiddle dashboardlineindicator" href="'.$board->url.'"><span class="dashboardlineindicator'.(($board->nbtodo == 0) ? ' dashboardlineok' : '').'">'.price($board->total).'</span></a>';
808 }
809 $boxwork .= '</div>';
810 if ($board->nbtodolate > 0) {
811 $boxwork .= '<div class="dashboardlinelatecoin nowrap">';
812 $boxwork .= '<a title="'.dol_escape_htmltag($textlate).'" class="valignmiddle dashboardlineindicatorlate'.($board->nbtodolate > 0 ? ' dashboardlineko' : ' dashboardlineok').'" href="'.((!$board->url_late) ? $board->url : $board->url_late).'">';
813 //$boxwork .= img_picto($textlate, "warning_white", 'class="valigntextbottom"');
814 $boxwork .= img_picto(
815 $textlate,
816 "warning_white",
817 'class="inline-block hideonsmartphone valigntextbottom"'
818 );
819 $boxwork .= '<span class="dashboardlineindicatorlate'.($board->nbtodolate > 0 ? ' dashboardlineko' : ' dashboardlineok').'">';
820 $boxwork .= $board->nbtodolate;
821 $boxwork .= '</span>';
822 $boxwork .= '</a>';
823 $boxwork .= '</div>';
824 }
825 $boxwork .= '</div></div>';
826 $boxwork .= "\n";
827 }
828
829 $boxwork .= '<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
830 $boxwork .= '<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
831 $boxwork .= '<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
832 $boxwork .= '<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
833
834 $boxwork .= '</div>';
835 $boxwork .= '</td></tr>';
836 } else {
837 $boxwork .= '<tr class="nohover">';
838 $boxwork .= '<td class="nohover valignmiddle opacitymedium">';
839 $boxwork .= $langs->trans("NoOpenedElementToProcess");
840 $boxwork .= '</td>';
841 $boxwork .= '</tr>';
842 }
843
844 $boxwork .= '</td></tr>';
845
846 $boxwork .= '</table>'; // End table array of working board
847 $boxwork .= '</div>';
848
849 if (!empty($isIntopOpenedDashBoard)) {
850 print '<div class="fichecenter">';
851 print '<div class="opened-dash-board-wrap"><div class="box-flex-container">'.$openedDashBoard.'</div></div>';
852 print '</div>';
853 }
854}
855
856
857print '<div class="clearboth"></div>';
858
859print '<div class="fichecenter fichecenterbis">';
860
861
862/*
863 * Show widgets (boxes)
864 */
865
866$boxlist = '<div class="twocolumns">';
867
868$boxlist .= '<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
869if (!empty($nbworkboardcount)) {
870 $boxlist .= $boxwork;
871}
872
873$boxlist .= $resultboxes['boxlista'];
874
875$boxlist .= '</div>';
876
877$boxlist .= '<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
878
879$boxlist .= $resultboxes['boxlistb'];
880
881$boxlist .= '</div>';
882$boxlist .= "\n";
883
884$boxlist .= '</div>';
885
886
887print $boxlist;
888
889print '</div>';
890
891//print 'mem='.memory_get_usage().' - '.memory_get_peak_usage();
892
893
894// End of page
895llxFooter();
896$db->close();
897
898
909function showWeather($totallate, $text, $options, $morecss = '')
910{
911 global $conf;
912
913 $weather = getWeatherStatus($totallate);
914 return img_weather($text, $weather->picto, $options, 0, $morecss);
915}
916
917
924function getWeatherStatus($totallate)
925{
926 $weather = new stdClass();
927 $weather->picto = '';
928
929 $offset = 0;
930 $factor = 10; // By default
931
932 $used_conf = (getDolGlobalString('MAIN_USE_METEO_WITH_PERCENTAGE') ? 'MAIN_METEO_PERCENTAGE_LEVEL' : 'MAIN_METEO_LEVEL');
933
934 $weather->level = 0;
935 $level0 = $offset;
936 $level0 = getDolGlobalString($used_conf.'0', $level0);
937 $level1 = $offset + $factor;
938 $level1 = getDolGlobalString($used_conf.'1', $level1);
939 $level2 = $offset + 2 * $factor;
940 $level2 = getDolGlobalString($used_conf.'2', $level2);
941 $level3 = $offset + 3 * $factor;
942 $level3 = getDolGlobalString($used_conf.'3', $level3);
943
944 if ($totallate <= $level0) {
945 $weather->picto = 'weather-clear.png';
946 $weather->level = 0;
947 } elseif ($totallate <= $level1) {
948 $weather->picto = 'weather-few-clouds.png';
949 $weather->level = 1;
950 } elseif ($totallate <= $level2) {
951 $weather->picto = 'weather-clouds.png';
952 $weather->level = 2;
953 } elseif ($totallate <= $level3) {
954 $weather->picto = 'weather-many-clouds.png';
955 $weather->level = 3;
956 } else {
957 $weather->picto = 'weather-storm.png';
958 $weather->level = 4;
959 }
960
961 return $weather;
962}
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
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 bank accounts.
Class to manage agenda events (actions)
Class to manage members of a foundation.
Class to manage withdrawal receipts.
Class to manage predefined suppliers products.
Class to manage customers orders.
Class to manage Trips and Expenses.
Class to manage suppliers invoices.
Class to manage invoices.
Class to manage generation of HTML components Only common components must be here.
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.
Class for Mo.
Definition mo.class.php:35
Class to manage projects.
Class to manage proposals.
Class to manage cheque delivery receipts.
Class to manage price ask supplier.
Class to manage tasks.
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
$conffile
price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
Function to format a value into an amount for visual output Function used into PDF and HTML pages.
dolChmod($filepath, $newmask='')
Change mod of a file.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
getDolCurrency()
Return the main currency ('EUR', 'USD', ...)
complete_substitutions_array(&$substitutionarray, $outputlangs, $object=null, $parameters=null, $callfunc="completesubstitutionarray")
Complete the $substitutionarray with more entries coming from external module that had set the "subst...
make_substitutions($text, $substitutionarray, $outputlangs=null, $converttextinhtmlifnecessary=0)
Make substitution into a text string, replacing keys with vals from $substitutionarray (oldval=>newva...
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_htmlentitiesbr($stringtoencode, $nl2brmode=0, $pagecodefrom='UTF-8', $removelasteolbr=1)
This function is called to encode a string into a HTML string but differs from htmlentities because a...
dol_string_onlythesehtmltags($stringtoclean, $cleanalsosomestyles=1, $removeclassattribute=1, $cleanalsojavascript=0, $allowiframe=0, $allowed_tags=array(), $allowlink=0, $allowscript=0, $allowstyle=0, $allowphp=0)
Clean a string to keep only desirable HTML tags.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
img_weather($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $morecss='')
Show weather picto.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='', $textonpictotooltip='', $cssfordropdown='info_admin')
Show information in HTML for admin users or standard users.
showWeather($totallate, $text, $options, $morecss='')
Show weather logo.
Definition index.php:909
getWeatherStatus($totallate)
get weather status for conf 'MAIN_METEO_LEVELx'
Definition index.php:924
Class to generate the form for creating a new ticket.