29define(
'CSRFCHECK_WITH_TOKEN', 1);
31require
'main.inc.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
35$_GET[
'mainmenu'] =
GETPOST(
'mainmenu',
'aZ09') ?
GETPOST(
'mainmenu',
'aZ09') :
'home';
36$action =
GETPOST(
'action',
'aZ09');
38$hookmanager->initHooks(array(
'index'));
45$nbmodulesnotautoenabled = count($conf->modules);
46if (in_array(
'fckeditor', $conf->modules)) $nbmodulesnotautoenabled--;
47if (in_array(
'export', $conf->modules)) $nbmodulesnotautoenabled--;
48if (in_array(
'import', $conf->modules)) $nbmodulesnotautoenabled--;
51if (!isset($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_NOM)) {
52 header(
"Location: ".DOL_URL_ROOT.
"/admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete");
55if ($nbmodulesnotautoenabled <=
getDolGlobalString(
'MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING', 1)) {
56 header(
"Location: ".DOL_URL_ROOT.
"/admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete");
60 require_once DOL_DOCUMENT_ROOT.
'/core/class/infobox.class.php';
61 $zone =
GETPOST(
'areacode',
'int');
62 $userid =
GETPOST(
'userid',
'int');
63 $boxorder =
GETPOST(
'boxorder',
'aZ09');
64 $boxorder .=
GETPOST(
'boxcombo',
'aZ09');
77if (!isset($form) || !is_object($form)) {
78 $form =
new Form($db);
82$title = $langs->trans(
"HomeArea").
' - Dolibarr '.DOL_VERSION;
83if (!empty($conf->global->MAIN_APPLICATION_TITLE)) {
84 $title = $langs->trans(
"HomeArea").
' - '.$conf->global->MAIN_APPLICATION_TITLE;
93print
load_fiche_titre(
' ', $resultboxes[
'selectboxlist'],
'', 0,
'',
'titleforhome');
95if (!empty($conf->global->MAIN_MOTD)) {
96 $conf->global->MAIN_MOTD = preg_replace(
'/<br(\s[\sa-zA-Z_="]*)?\/?>/i',
'<br>', $conf->global->MAIN_MOTD);
97 if (!empty($conf->global->MAIN_MOTD)) {
100 $texttoshow =
make_substitutions($conf->global->MAIN_MOTD, $substitutionarray, $langs);
102 print
"\n<!-- Start of welcome text -->\n";
103 print
'<table width="100%" class="notopnoleftnoright"><tr><td>';
105 print
'</td></tr></table><br>';
106 print
"\n<!-- End of welcome text -->\n";
115if (empty($conf->global->MAIN_REMOVE_INSTALL_WARNING)) {
119 $lockfile = DOL_DATA_ROOT.
'/install.lock';
120 if (!empty($lockfile) && !file_exists($lockfile) && is_dir(DOL_DOCUMENT_ROOT.
"/install")) {
121 $langs->load(
"errors");
123 $message .=
info_admin($langs->trans(
"WarningLockFileDoesNotExists", DOL_DATA_ROOT).
' '.$langs->trans(
"WarningUntilDirRemoved", DOL_DOCUMENT_ROOT.
"/install"), 0, 0,
'1',
'clearboth');
127 if (is_writable($conffile)) {
128 $langs->load(
"errors");
131 $message .=
info_admin($langs->transnoentities(
"WarningConfFileMustBeReadOnly").
' '.$langs->trans(
"WarningUntilDirRemoved", DOL_DOCUMENT_ROOT.
"/install"), 0, 0,
'1',
'clearboth');
134 $object =
new stdClass();
135 $parameters = array();
136 $reshook = $hookmanager->executeHooks(
'infoadmin', $parameters, $object, $action);
138 $message .= $hookmanager->resPrint;
141 print $message.
'<br>';
152$boxstatItems = array();
153$boxstatFromHook =
'';
156$langs->loadLangs(array(
'commercial',
'bills',
'orders',
'contracts'));
159if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
160 $showweather = (empty($conf->global->MAIN_DISABLE_METEO) || $conf->global->MAIN_DISABLE_METEO == 2) ? 1 : 0;
163 $dashboardlines = array();
166 require_once DOL_DOCUMENT_ROOT.
'/core/class/workboardresponse.class.php';
169 if (isModEnabled(
'agenda') && empty($conf->global->MAIN_DISABLE_BLOCK_AGENDA) && $user->hasRight(
'agenda',
'myactions',
'read')) {
170 include_once DOL_DOCUMENT_ROOT.
'/comm/action/class/actioncomm.class.php';
172 $dashboardlines[$board->element] = $board->load_board($user);
176 if (isModEnabled(
'project') && empty($conf->global->MAIN_DISABLE_BLOCK_PROJECT) && $user->hasRight(
'projet',
'lire')) {
177 include_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
179 $dashboardlines[$board->element] = $board->load_board($user);
183 if (isModEnabled(
'project') && empty($conf->global->MAIN_DISABLE_BLOCK_PROJECT) && empty($conf->global->PROJECT_HIDE_TASKS) && $user->hasRight(
'projet',
'lire')) {
184 include_once DOL_DOCUMENT_ROOT.
'/projet/class/task.class.php';
185 $board =
new Task($db);
186 $dashboardlines[$board->element] = $board->load_board($user);
190 if (isModEnabled(
'propal') && empty($conf->global->MAIN_DISABLE_BLOCK_CUSTOMER) && $user->hasRight(
'propal',
'read')) {
191 include_once DOL_DOCUMENT_ROOT.
'/comm/propal/class/propal.class.php';
193 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
195 $dashboardlines[$board->element.
'_signed'] = $board->load_board($user,
"signed");
199 if (isModEnabled(
'supplier_proposal') && empty($conf->global->MAIN_DISABLE_BLOCK_SUPPLIER) && $user->hasRight(
'supplier_proposal',
'lire')) {
200 $langs->load(
"supplier_proposal");
201 include_once DOL_DOCUMENT_ROOT.
'/supplier_proposal/class/supplier_proposal.class.php';
203 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
205 $dashboardlines[$board->element.
'_signed'] = $board->load_board($user,
"signed");
209 if (isModEnabled(
'commande') && empty($conf->global->MAIN_DISABLE_BLOCK_CUSTOMER) && $user->hasRight(
'commande',
'lire')) {
210 include_once DOL_DOCUMENT_ROOT.
'/commande/class/commande.class.php';
212 $dashboardlines[$board->element] = $board->load_board($user);
216 if (isModEnabled(
'supplier_order') && empty($conf->global->MAIN_DISABLE_BLOCK_SUPPLIER) && $user->hasRight(
'fournisseur',
'commande',
'lire')) {
217 include_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.commande.class.php';
219 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
220 $dashboardlines[$board->element.
'_awaiting'] = $board->load_board($user,
'awaiting');
224 if (isModEnabled(
'contrat') && empty($conf->global->MAIN_DISABLE_BLOCK_CONTRACT) && $user->hasRight(
'contrat',
'lire')) {
225 include_once DOL_DOCUMENT_ROOT.
'/contrat/class/contrat.class.php';
227 $dashboardlines[$board->element.
'_inactive'] = $board->load_board($user,
"inactive");
229 $dashboardlines[$board->element.
'_active'] = $board->load_board($user,
"active");
233 if (isModEnabled(
'ticket') && empty($conf->global->MAIN_DISABLE_BLOCK_TICKET) && $user->hasRight(
'ticket',
'read')) {
234 include_once DOL_DOCUMENT_ROOT.
'/ticket/class/ticket.class.php';
236 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
242 if (isModEnabled(
'facture') && empty($conf->global->MAIN_DISABLE_BLOCK_CUSTOMER) && $user->hasRight(
'facture',
'lire')) {
243 include_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
245 $dashboardlines[$board->element] = $board->load_board($user);
249 if (isModEnabled(
'supplier_invoice') && empty($conf->global->MAIN_DISABLE_BLOCK_SUPPLIER) && $user->hasRight(
'fournisseur',
'facture',
'lire')) {
250 include_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.facture.class.php';
252 $dashboardlines[$board->element] = $board->load_board($user);
256 if (isModEnabled(
'banque') && empty($conf->global->MAIN_DISABLE_BLOCK_BANK) && $user->hasRight(
'banque',
'lire') && !$user->socid) {
257 include_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
259 $nb = $board->countAccountToReconcile();
261 $dashboardlines[$board->element] = $board->load_board($user);
267 if (isModEnabled(
'banque') && empty($conf->global->MAIN_DISABLE_BLOCK_BANK) && $user->hasRight(
'banque',
'lire') && !$user->socid) {
268 if (empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT)) {
269 include_once DOL_DOCUMENT_ROOT .
'/compta/paiement/cheque/class/remisecheque.class.php';
271 $dashboardlines[$board->element] = $board->load_board($user);
273 if (isModEnabled(
'prelevement')) {
274 include_once DOL_DOCUMENT_ROOT.
'/compta/prelevement/class/bonprelevement.class.php';
276 $dashboardlines[$board->element .
'_direct_debit'] = $board->load_board($user,
'direct_debit');
278 if (isModEnabled(
'paymentbybanktransfer')) {
279 include_once DOL_DOCUMENT_ROOT.
'/compta/prelevement/class/bonprelevement.class.php';
281 $dashboardlines[$board->element .
'_credit_transfer'] = $board->load_board($user,
'credit_transfer');
286 if (isModEnabled(
'adherent') && empty($conf->global->MAIN_DISABLE_BLOCK_ADHERENT) && $user->hasRight(
'adherent',
'lire') && !$user->socid) {
287 include_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
289 $dashboardlines[$board->element.
'_shift'] = $board->load_board($user,
'shift');
290 $dashboardlines[$board->element.
'_expired'] = $board->load_board($user,
'expired');
294 if (isModEnabled(
'expensereport') && empty($conf->global->MAIN_DISABLE_BLOCK_EXPENSEREPORT) && $user->hasRight(
'expensereport',
'approve')) {
295 include_once DOL_DOCUMENT_ROOT.
'/expensereport/class/expensereport.class.php';
297 $dashboardlines[$board->element.
'_toapprove'] = $board->load_board($user,
'toapprove');
301 if (isModEnabled(
'expensereport') && empty($conf->global->MAIN_DISABLE_BLOCK_EXPENSEREPORT) && $user->hasRight(
'expensereport',
'to_paid')) {
302 include_once DOL_DOCUMENT_ROOT.
'/expensereport/class/expensereport.class.php';
304 $dashboardlines[$board->element.
'_topay'] = $board->load_board($user,
'topay');
308 if (isModEnabled(
'holiday') && empty($conf->global->MAIN_DISABLE_BLOCK_HOLIDAY) && $user->hasRight(
'holiday',
'approve')) {
309 include_once DOL_DOCUMENT_ROOT.
'/holiday/class/holiday.class.php';
311 $dashboardlines[$board->element] = $board->load_board($user);
314 $object =
new stdClass();
315 $parameters = array();
317 $reshook = $hookmanager->executeHooks(
318 'addOpenElementsDashboardLine',
324 $dashboardlines = array_merge($dashboardlines, $hookmanager->resArray);
328 $dashboardgroup = array(
331 'groupName' =>
'Agenda',
332 'stats' => array(
'action'),
336 'groupName' =>
'Projects',
337 'globalStatsKey' =>
'projects',
338 'stats' => array(
'project',
'project_task'),
342 'groupName' =>
'Proposals',
343 'globalStatsKey' =>
'proposals',
345 array(
'propal_opened',
'propal_signed'),
349 'groupName' =>
'Orders',
350 'globalStatsKey' =>
'orders',
356 'groupName' =>
'Invoices',
357 'globalStatsKey' =>
'invoices',
361 'supplier_proposal' =>
363 'lang' =>
'supplier_proposal',
364 'groupName' =>
'SupplierProposals',
365 'globalStatsKey' =>
'askprice',
367 array(
'supplier_proposal_opened',
'supplier_proposal_signed'),
371 'groupName' =>
'SuppliersOrders',
372 'globalStatsKey' =>
'supplier_orders',
374 array(
'order_supplier_opened',
'order_supplier_awaiting'),
376 'invoice_supplier' =>
378 'groupName' =>
'BillsSuppliers',
379 'globalStatsKey' =>
'supplier_invoices',
381 array(
'invoice_supplier'),
385 'groupName' =>
'Contracts',
386 'globalStatsKey' =>
'Contracts',
388 array(
'contrat_inactive',
'contrat_active'),
392 'groupName' =>
'Tickets',
393 'globalStatsKey' =>
'ticket',
395 array(
'ticket_opened'),
399 'groupName' =>
'BankAccount',
401 array(
'bank_account',
'chequereceipt',
'widthdraw_direct_debit',
'widthdraw_credit_transfer'),
405 'groupName' =>
'Members',
406 'globalStatsKey' =>
'members',
408 array(
'member_shift',
'member_expired'),
412 'groupName' =>
'ExpenseReport',
413 'globalStatsKey' =>
'expensereports',
415 array(
'expensereport_toapprove',
'expensereport_topay'),
419 'groupName' =>
'Holidays',
420 'globalStatsKey' =>
'holidays',
426 $object =
new stdClass();
428 'dashboardgroup' => $dashboardgroup
430 $reshook = $hookmanager->executeHooks(
'addOpenElementsDashboardGroup', $parameters, $object, $action);
432 $dashboardgroup = array_merge($dashboardgroup, $hookmanager->resArray);
437 $totallate = $totaltodo = 0;
441 $valid_dashboardlines = array();
442 foreach ($dashboardlines as $workboardid => $tmp) {
444 $tmp->id = $workboardid;
445 $valid_dashboardlines[$workboardid] = $tmp;
450 foreach ($valid_dashboardlines as $board) {
451 if (is_numeric($board->nbtodo) && is_numeric($board->nbtodolate) && $board->nbtodolate > 0) {
452 $totaltodo += $board->nbtodo;
453 $totallate += $board->nbtodolate;
457 $openedDashBoardSize =
'info-box-sm';
458 foreach ($dashboardgroup as $dashbordelement) {
459 if (is_array($dashbordelement[
'stats']) && count($dashbordelement[
'stats']) > 2) {
460 $openedDashBoardSize =
'';
465 $totalLateNumber = $totallate;
466 $totallatePercentage = ((!empty($totaltodo)) ? round($totallate / $totaltodo * 100, 2) : 0);
467 if (!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) {
468 $totallate = $totallatePercentage;
472 $boxwork .=
'<div class="box">';
473 $boxwork .=
'<table summary="'.dol_escape_htmltag($langs->trans(
"WorkingBoard")).
'" class="noborder boxtable boxtablenobottom boxworkingboard centpercent">'.
"\n";
474 $boxwork .=
'<tr class="liste_titre">';
475 $boxwork .=
'<th class="liste_titre"><div class="inline-block valignmiddle">'.$langs->trans(
"DolibarrWorkBoard").
'</div>';
477 if ($totallate > 0) {
478 $text = $langs->transnoentitiesnoconv(
"WarningYouHaveAtLeastOneTaskLate").
' ('.$langs->transnoentitiesnoconv(
480 $totallate.(!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ?
'%' :
'')
483 $text = $langs->transnoentitiesnoconv(
"NoItemLate");
485 $text .=
'. '.$langs->transnoentitiesnoconv(
"LateDesc");
487 $options =
'height="24px" style="float: right"';
488 $boxwork .=
showWeather($totallate, $text, $options,
'inline-block valignmiddle');
491 $boxwork .=
'</tr>'.
"\n";
494 $nbworkboardempty = 0;
495 $isIntopOpenedDashBoard = $globalStatInTopOpenedDashBoard = array();
496 if (!empty($valid_dashboardlines)) {
497 $openedDashBoard =
'';
499 $boxwork .=
'<tr class="nobottom nohover"><td class="tdboxstats nohover flexcontainer centpercent"><div style="display: flex: flex-wrap: wrap">';
501 foreach ($dashboardgroup as $groupKey => $groupElement) {
505 if (empty($conf->global->MAIN_DISABLE_NEW_OPENED_DASH_BOARD)) {
506 foreach ($groupElement[
'stats'] as $infoKey) {
507 if (!empty($valid_dashboardlines[$infoKey])) {
508 $boards[] = $valid_dashboardlines[$infoKey];
509 $isIntopOpenedDashBoard[] = $infoKey;
514 if (!empty($boards)) {
515 if (!empty($groupElement[
'lang'])) {
516 $langs->load($groupElement[
'lang']);
518 $groupName = $langs->trans($groupElement[
'groupName']);
519 $groupKeyLowerCase = strtolower($groupKey);
522 $globalStatsKey =
false;
523 if (!empty($groupElement[
'globalStatsKey']) && empty($groupElement[
'globalStats'])) {
524 $globalStatsKey = $groupElement[
'globalStatsKey'];
525 $groupElement[
'globalStats'] = array();
528 $openedDashBoard .=
'<div class="box-flex-item"><div class="box-flex-item-with-margin">'.
"\n";
529 $openedDashBoard .=
' <div class="info-box '.$openedDashBoardSize.
'">'.
"\n";
530 $openedDashBoard .=
' <span class="info-box-icon bg-infobox-'.$groupKeyLowerCase.
'">'.
"\n";
531 $openedDashBoard .=
' <i class="fa fa-dol-'.$groupKeyLowerCase.
'"></i>'.
"\n";
534 if (!empty($groupElement[
'globalStats'])) {
535 $globalStatInTopOpenedDashBoard[] = $globalStatsKey;
536 $openedDashBoard .=
'<span class="info-box-icon-text" title="'.$groupElement[
'globalStats'][
'text'].
'">'.$groupElement[
'globalStats'][
'nbTotal'].
'</span>';
539 $openedDashBoard .=
'</span>'.
"\n";
540 $openedDashBoard .=
'<div class="info-box-content">'.
"\n";
542 $openedDashBoard .=
'<div class="info-box-title" title="'.strip_tags($groupName).
'">'.$groupName.
'</div>'.
"\n";
543 $openedDashBoard .=
'<div class="info-box-lines">'.
"\n";
545 foreach ($boards as $board) {
546 $openedDashBoard .=
'<div class="info-box-line spanoverflow nowrap">';
548 if (!empty($board->labelShort)) {
549 $infoName =
'<span class="marginrightonly" title="'.$board->label.
'">'.$board->labelShort.
'</span>';
551 $infoName =
'<span class="marginrightonly">'.$board->label.
'</span>';
554 $textLateTitle = $langs->trans(
"NActionsLate", $board->nbtodolate);
555 $textLateTitle .=
' ('.$langs->trans(
"Late").
' = '.$langs->trans(
"DateReference").
' > '.$langs->trans(
"DateToday").
' '.(ceil(empty($board->warning_delay) ? 0 : $board->warning_delay) >= 0 ?
'+' :
'').ceil(empty($board->warning_delay) ? 0 : $board->warning_delay).
' '.$langs->trans(
"days").
')';
557 if ($board->id ==
'bank_account') {
558 $textLateTitle .=
'<br><span class="opacitymedium">'.$langs->trans(
"IfYouDontReconcileDisableProperty", $langs->transnoentitiesnoconv(
"Conciliable")).
'</span>';
562 if ($board->nbtodolate > 0) {
563 $textLate .=
'<span title="'.dol_escape_htmltag($textLateTitle).
'" class="classfortooltip badge badge-warning">';
564 $textLate .=
'<i class="fa fa-exclamation-triangle"></i> '.$board->nbtodolate;
565 $textLate .=
'</span>';
569 if ($board->nbtodo > 0) {
570 $nbtodClass =
'badge badge-info';
572 $nbtodClass =
'opacitymedium';
576 $labeltoshow = $board->label.
' ('.$board->nbtodo.
')';
577 if ($board->total > 0) {
578 $labeltoshow .=
' - '.price($board->total, 0, $langs, 1, -1, -1, $conf->currency);
580 $openedDashBoard .=
'<a href="'.$board->url.
'" class="info-box-text info-box-text-a">'.$infoName.
'<span class="classfortooltip'.($nbtodClass ?
' '.$nbtodClass :
'').
'" title="'.$labeltoshow.
'" >';
581 $openedDashBoard .= $board->nbtodo;
582 if ($board->total > 0 && !empty($conf->global->MAIN_WORKBOARD_SHOW_TOTAL_WO_TAX)) {
583 $openedDashBoard .=
' : '.price($board->total, 0, $langs, 1, -1, -1, $conf->currency);
585 $openedDashBoard .=
'</span>';
587 if ($board->url_late) {
588 $openedDashBoard .=
'</a>';
589 $openedDashBoard .=
' <a href="'.$board->url_late.
'" class="info-box-text info-box-text-a paddingleft">';
591 $openedDashBoard .=
' ';
593 $openedDashBoard .= $textLate;
595 $openedDashBoard .=
'</a>'.
"\n";
596 $openedDashBoard .=
'</div>'.
"\n";
601 $openedDashBoard .=
' </div><!-- /.info-box-lines --></div><!-- /.info-box-content -->'.
"\n";
602 $openedDashBoard .=
' </div><!-- /.info-box -->'.
"\n";
603 $openedDashBoard .=
'</div><!-- /.box-flex-item-with-margin -->'.
"\n";
604 $openedDashBoard .=
'</div><!-- /.box-flex-item -->'.
"\n";
605 $openedDashBoard .=
"\n";
609 if ($showweather && !empty($isIntopOpenedDashBoard)) {
610 $appendClass = (!empty($conf->global->MAIN_DISABLE_METEO) && $conf->global->MAIN_DISABLE_METEO == 2 ?
' hideonsmartphone' :
'');
614 if ($totallate > 0) {
615 $text = $langs->transnoentitiesnoconv(
"WarningYouHaveAtLeastOneTaskLate").
' ('.$langs->transnoentitiesnoconv(
617 $totallate.(!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ?
'%' :
'')
620 $text = $langs->transnoentitiesnoconv(
"NoItemLate");
622 $text .=
'. '.$langs->transnoentitiesnoconv(
"LateDesc");
624 $weatherDashBoard =
'<div class="box-flex-item '.$appendClass.
'"><div class="box-flex-item-with-margin">'.
"\n";
625 $weatherDashBoard .=
' <div class="info-box '.$openedDashBoardSize.
' info-box-weather info-box-weather-level'.$weather->level.
'">'.
"\n";
626 $weatherDashBoard .=
' <span class="info-box-icon">';
627 $weatherDashBoard .=
img_weather(
'', $weather->level,
'', 0,
'valignmiddle width50');
628 $weatherDashBoard .=
' </span>'.
"\n";
629 $weatherDashBoard .=
' <div class="info-box-content">'.
"\n";
630 $weatherDashBoard .=
' <div class="info-box-title">'.$langs->trans(
'GlobalOpenedElemView').
'</div>'.
"\n";
632 if ($totallatePercentage > 0 && !empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) {
633 $weatherDashBoard .=
' <span class="info-box-number">'.$langs->transnoentitiesnoconv(
635 price($totallatePercentage).
'%'
637 $weatherDashBoard .=
' <span class="progress-description">'.$langs->trans(
642 $weatherDashBoard .=
' <span class="info-box-number">'.$langs->transnoentitiesnoconv(
646 if ($totallatePercentage > 0) {
647 $weatherDashBoard .=
' <span class="progress-description">'.$langs->trans(
649 price($totallatePercentage).
'%'
654 $weatherDashBoard .=
' </div><!-- /.info-box-content -->'.
"\n";
655 $weatherDashBoard .=
' </div><!-- /.info-box -->'.
"\n";
656 $weatherDashBoard .=
'</div><!-- /.box-flex-item-with-margin -->'.
"\n";
657 $weatherDashBoard .=
'</div><!-- /.box-flex-item -->'.
"\n";
658 $weatherDashBoard .=
"\n";
660 $openedDashBoard = $weatherDashBoard.$openedDashBoard;
663 if (!empty($isIntopOpenedDashBoard)) {
664 for ($i = 1; $i <= 10; $i++) {
665 $openedDashBoard .=
'<div class="box-flex-item filler"></div>';
669 $nbworkboardcount = 0;
670 foreach ($valid_dashboardlines as $infoKey => $board) {
671 if (in_array($infoKey, $isIntopOpenedDashBoard)) {
676 if (empty($board->nbtodo)) {
682 $textlate = $langs->trans(
"NActionsLate", $board->nbtodolate);
683 $textlate .=
' ('.$langs->trans(
"Late").
' = '.$langs->trans(
"DateReference").
' > '.$langs->trans(
"DateToday").
' '.(ceil($board->warning_delay) >= 0 ?
'+' :
'').ceil($board->warning_delay).
' '.$langs->trans(
"days").
')';
686 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats130 boxstatsborder">';
687 $boxwork .=
'<div class="boxstatscontent">';
688 $boxwork .=
'<span class="boxstatstext" title="'.dol_escape_htmltag($board->label).
'">'.$board->img.
' <span>'.$board->label.
'</span></span><br>';
689 $boxwork .=
'<a class="valignmiddle dashboardlineindicator" href="'.$board->url.
'"><span class="dashboardlineindicator'.(($board->nbtodo == 0) ?
' dashboardlineok' :
'').
'">'.$board->nbtodo.
'</span></a>';
690 if ($board->total > 0 && !empty($conf->global->MAIN_WORKBOARD_SHOW_TOTAL_WO_TAX)) {
691 $boxwork .=
' / <a class="valignmiddle dashboardlineindicator" href="'.$board->url.
'"><span class="dashboardlineindicator'.(($board->nbtodo == 0) ?
' dashboardlineok' :
'').
'">'.
price($board->total).
'</span></a>';
693 $boxwork .=
'</div>';
694 if ($board->nbtodolate > 0) {
695 $boxwork .=
'<div class="dashboardlinelatecoin nowrap">';
696 $boxwork .=
'<a title="'.dol_escape_htmltag($textlate).
'" class="valignmiddle dashboardlineindicatorlate'.($board->nbtodolate > 0 ?
' dashboardlineko' :
' dashboardlineok').
'" href="'.((!$board->url_late) ? $board->url : $board->url_late).
'">';
701 'class="inline-block hideonsmartphone valigntextbottom"'
703 $boxwork .=
'<span class="dashboardlineindicatorlate'.($board->nbtodolate > 0 ?
' dashboardlineko' :
' dashboardlineok').
'">';
704 $boxwork .= $board->nbtodolate;
705 $boxwork .=
'</span>';
707 $boxwork .=
'</div>';
709 $boxwork .=
'</div></div>';
713 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
714 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
715 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
716 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
718 $boxwork .=
'</div>';
719 $boxwork .=
'</td></tr>';
721 $boxwork .=
'<tr class="nohover">';
722 $boxwork .=
'<td class="nohover valignmiddle opacitymedium">';
723 $boxwork .= $langs->trans(
"NoOpenedElementToProcess");
728 $boxwork .=
'</td></tr>';
730 $boxwork .=
'</table>';
731 $boxwork .=
'</div>';
733 if (!empty($isIntopOpenedDashBoard)) {
734 print
'<div class="fichecenter">';
735 print
'<div class="opened-dash-board-wrap"><div class="box-flex-container">'.$openedDashBoard.
'</div></div>';
741print
'<div class="clearboth"></div>';
743print
'<div class="fichecenter fichecenterbis">';
750$boxlist =
'<div class="twocolumns">';
752$boxlist .=
'<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
753if (!empty($nbworkboardcount)) {
754 $boxlist .= $boxwork;
757$boxlist .= $resultboxes[
'boxlista'];
761$boxlist .=
'<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
763$boxlist .= $resultboxes[
'boxlistb'];
797 return img_weather($text, $weather->picto, $options, 0, $morecss);
812 $weather =
new stdClass();
813 $weather->picto =
'';
818 $used_conf = empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ?
'MAIN_METEO_LEVEL' :
'MAIN_METEO_PERCENTAGE_LEVEL';
823 $level1 = $offset + $factor;
825 $level2 = $offset + 2 * $factor;
827 $level3 = $offset + 3 * $factor;
830 if ($totallate <= $level0) {
831 $weather->picto =
'weather-clear.png';
833 } elseif ($totallate <= $level1) {
834 $weather->picto =
'weather-few-clouds.png';
836 } elseif ($totallate <= $level2) {
837 $weather->picto =
'weather-clouds.png';
839 } elseif ($totallate <= $level3) {
840 $weather->picto =
'weather-many-clouds.png';
843 $weather->picto =
'weather-storm.png';
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
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 contracts.
Class to manage Trips and Expenses.
Class to manage suppliers invoices.
Class to manage invoices.
Class of the module paid holiday.
static saveboxorder($dbs, $zone, $boxorder, $userid=0)
Save order of boxes for area and user.
Class to manage projects.
Class to manage proposals.
Class to manage cheque delivery receipts.
Class to manage price ask supplier.
img_weather($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $morecss='')
Show weather picto.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
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.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
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...
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='')
Show information for admin users or standard users.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
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...
getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $object=null, $include=null)
Return array of possible common substitutions.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
showWeather($totallate, $text, $options, $morecss='')
Show weather logo.
getWeatherStatus($totallate)
get weather level $conf->global->MAIN_METEO_LEVELx
Class to generate the form for creating a new ticket.