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) || !
getDolGlobalString(
'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;
84 $title = $langs->trans(
"HomeArea").
' - ' .
getDolGlobalString(
'MAIN_APPLICATION_TITLE');
93print
load_fiche_titre(
' ', $resultboxes[
'selectboxlist'],
'', 0,
'',
'titleforhome');
96 $conf->global->MAIN_MOTD = preg_replace(
'/<br(\s[\sa-zA-Z_="]*)?\/?>/i',
'<br>', $conf->global->MAIN_MOTD);
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";
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');
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'));
163 $dashboardlines = array();
166 require_once DOL_DOCUMENT_ROOT.
'/core/class/workboardresponse.class.php';
169 if (isModEnabled(
'agenda') && !
getDolGlobalString(
'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') && !
getDolGlobalString(
'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);
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') && !
getDolGlobalString(
'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') && !
getDolGlobalString(
'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') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_CUSTOMER') && $user->hasRight(
'commande',
'lire')) {
210 include_once DOL_DOCUMENT_ROOT.
'/commande/class/commande.class.php';
213 $dashboardlines[$board->element.
'_toship'] = $board->load_board($user,
'toship');
216 $dashboardlines[$board->element.
'_tobill'] = $board->load_board($user,
'tobill');
219 $dashboardlines[$board->element.
'_shippedtobill'] = $board->load_board($user,
'shippedtobill');
223 if (isModEnabled(
'supplier_order') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight(
'fournisseur',
'commande',
'lire')) {
224 include_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.commande.class.php';
226 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
227 $dashboardlines[$board->element.
'_awaiting'] = $board->load_board($user,
'awaiting');
231 if (isModEnabled(
'contrat') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_CONTRACT') && $user->hasRight(
'contrat',
'lire')) {
232 include_once DOL_DOCUMENT_ROOT.
'/contrat/class/contrat.class.php';
234 $dashboardlines[$board->element.
'_inactive'] = $board->load_board($user,
"inactive");
236 $dashboardlines[$board->element.
'_active'] = $board->load_board($user,
"active");
240 if (isModEnabled(
'ticket') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_TICKET') && $user->hasRight(
'ticket',
'read')) {
241 include_once DOL_DOCUMENT_ROOT.
'/ticket/class/ticket.class.php';
243 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
249 if (isModEnabled(
'facture') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_CUSTOMER') && $user->hasRight(
'facture',
'lire')) {
250 include_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
252 $dashboardlines[$board->element] = $board->load_board($user);
256 if (isModEnabled(
'supplier_invoice') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight(
'fournisseur',
'facture',
'lire')) {
257 include_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.facture.class.php';
259 $dashboardlines[$board->element] = $board->load_board($user);
263 if (isModEnabled(
'banque') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_BANK') && $user->hasRight(
'banque',
'lire') && !$user->socid) {
264 include_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
266 $nb = $board->countAccountToReconcile();
268 $dashboardlines[$board->element] = $board->load_board($user);
274 if (isModEnabled(
'banque') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_BANK') && $user->hasRight(
'banque',
'lire') && !$user->socid) {
276 include_once DOL_DOCUMENT_ROOT .
'/compta/paiement/cheque/class/remisecheque.class.php';
278 $dashboardlines[$board->element] = $board->load_board($user);
280 if (isModEnabled(
'prelevement')) {
281 include_once DOL_DOCUMENT_ROOT.
'/compta/prelevement/class/bonprelevement.class.php';
283 $dashboardlines[$board->element .
'_direct_debit'] = $board->load_board($user,
'direct_debit');
285 if (isModEnabled(
'paymentbybanktransfer')) {
286 include_once DOL_DOCUMENT_ROOT.
'/compta/prelevement/class/bonprelevement.class.php';
288 $dashboardlines[$board->element .
'_credit_transfer'] = $board->load_board($user,
'credit_transfer');
293 if (isModEnabled(
'adherent') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_ADHERENT') && $user->hasRight(
'adherent',
'lire') && !$user->socid) {
294 include_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
296 $dashboardlines[$board->element.
'_shift'] = $board->load_board($user,
'shift');
297 $dashboardlines[$board->element.
'_expired'] = $board->load_board($user,
'expired');
301 if (isModEnabled(
'expensereport') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight(
'expensereport',
'approve')) {
302 include_once DOL_DOCUMENT_ROOT.
'/expensereport/class/expensereport.class.php';
304 $dashboardlines[$board->element.
'_toapprove'] = $board->load_board($user,
'toapprove');
308 if (isModEnabled(
'expensereport') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight(
'expensereport',
'to_paid')) {
309 include_once DOL_DOCUMENT_ROOT.
'/expensereport/class/expensereport.class.php';
311 $dashboardlines[$board->element.
'_topay'] = $board->load_board($user,
'topay');
315 if (isModEnabled(
'holiday') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_HOLIDAY') && $user->hasRight(
'holiday',
'approve')) {
316 include_once DOL_DOCUMENT_ROOT.
'/holiday/class/holiday.class.php';
318 $dashboardlines[$board->element] = $board->load_board($user);
322 $parameters = array();
324 $reshook = $hookmanager->executeHooks(
325 'addOpenElementsDashboardLine',
331 $dashboardlines = array_merge($dashboardlines, $hookmanager->resArray);
335 $dashboardgroup = array(
338 'groupName' =>
'Agenda',
339 'stats' => array(
'action'),
343 'groupName' =>
'Projects',
344 'globalStatsKey' =>
'projects',
345 'stats' => array(
'project',
'project_task'),
349 'groupName' =>
'Proposals',
350 'globalStatsKey' =>
'proposals',
352 array(
'propal_opened',
'propal_signed'),
356 'groupName' =>
'Orders',
357 'globalStatsKey' =>
'orders',
359 array(
'commande_toship',
'commande_tobill',
'commande_shippedtobill'),
363 'groupName' =>
'Invoices',
364 'globalStatsKey' =>
'invoices',
368 'supplier_proposal' =>
370 'lang' =>
'supplier_proposal',
371 'groupName' =>
'SupplierProposals',
372 'globalStatsKey' =>
'askprice',
374 array(
'supplier_proposal_opened',
'supplier_proposal_signed'),
378 'groupName' =>
'SuppliersOrders',
379 'globalStatsKey' =>
'supplier_orders',
381 array(
'order_supplier_opened',
'order_supplier_awaiting'),
383 'invoice_supplier' =>
385 'groupName' =>
'BillsSuppliers',
386 'globalStatsKey' =>
'supplier_invoices',
388 array(
'invoice_supplier'),
392 'groupName' =>
'Contracts',
393 'globalStatsKey' =>
'Contracts',
395 array(
'contrat_inactive',
'contrat_active'),
399 'groupName' =>
'Tickets',
400 'globalStatsKey' =>
'ticket',
402 array(
'ticket_opened'),
406 'groupName' =>
'BankAccount',
408 array(
'bank_account',
'chequereceipt',
'widthdraw_direct_debit',
'widthdraw_credit_transfer'),
412 'groupName' =>
'Members',
413 'globalStatsKey' =>
'members',
415 array(
'member_shift',
'member_expired'),
419 'groupName' =>
'ExpenseReport',
420 'globalStatsKey' =>
'expensereports',
422 array(
'expensereport_toapprove',
'expensereport_topay'),
426 'groupName' =>
'Holidays',
427 'globalStatsKey' =>
'holidays',
435 'dashboardgroup' => $dashboardgroup
437 $reshook = $hookmanager->executeHooks(
'addOpenElementsDashboardGroup', $parameters, $object, $action);
439 $dashboardgroup = array_merge($dashboardgroup, $hookmanager->resArray);
444 $totallate = $totaltodo = 0;
448 $valid_dashboardlines = array();
449 foreach ($dashboardlines as $workboardid => $tmp) {
451 $tmp->id = $workboardid;
452 $valid_dashboardlines[$workboardid] = $tmp;
457 foreach ($valid_dashboardlines as $board) {
458 if (is_numeric($board->nbtodo) && is_numeric($board->nbtodolate) && $board->nbtodolate > 0) {
459 $totaltodo += $board->nbtodo;
460 $totallate += $board->nbtodolate;
464 $openedDashBoardSize =
'info-box-sm';
465 foreach ($dashboardgroup as $dashbordelement) {
466 if (is_array($dashbordelement[
'stats']) && count($dashbordelement[
'stats']) > 2) {
467 $openedDashBoardSize =
'';
472 $totalLateNumber = $totallate;
473 $totallatePercentage = ((!empty($totaltodo)) ? round($totallate / $totaltodo * 100, 2) : 0);
475 $totallate = $totallatePercentage;
479 $boxwork .=
'<div class="box">';
480 $boxwork .=
'<table summary="'.dol_escape_htmltag($langs->trans(
"WorkingBoard")).
'" class="noborder boxtable boxtablenobottom boxworkingboard centpercent">'.
"\n";
481 $boxwork .=
'<tr class="liste_titre">';
482 $boxwork .=
'<th class="liste_titre"><div class="inline-block valignmiddle">'.$langs->trans(
"DolibarrWorkBoard").
'</div>';
484 if ($totallate > 0) {
485 $text = $langs->transnoentitiesnoconv(
"WarningYouHaveAtLeastOneTaskLate").
' ('.$langs->transnoentitiesnoconv(
487 $totallate.(getDolGlobalString(
'MAIN_USE_METEO_WITH_PERCENTAGE') ?
'%' :
'')
490 $text = $langs->transnoentitiesnoconv(
"NoItemLate");
492 $text .=
'. '.$langs->transnoentitiesnoconv(
"LateDesc");
494 $options =
'height="24px" style="float: right"';
495 $boxwork .=
showWeather($totallate, $text, $options,
'inline-block valignmiddle');
498 $boxwork .=
'</tr>'.
"\n";
501 $nbworkboardempty = 0;
502 $isIntopOpenedDashBoard = $globalStatInTopOpenedDashBoard = array();
503 if (!empty($valid_dashboardlines)) {
504 $openedDashBoard =
'';
506 $boxwork .=
'<tr class="nobottom nohover"><td class="tdboxstats nohover flexcontainer centpercent"><div style="display: flex: flex-wrap: wrap">';
508 foreach ($dashboardgroup as $groupKey => $groupElement) {
513 foreach ($groupElement[
'stats'] as $infoKey) {
514 if (!empty($valid_dashboardlines[$infoKey])) {
515 $boards[] = $valid_dashboardlines[$infoKey];
516 $isIntopOpenedDashBoard[] = $infoKey;
521 if (!empty($boards)) {
522 if (!empty($groupElement[
'lang'])) {
523 $langs->load($groupElement[
'lang']);
525 $groupName = $langs->trans($groupElement[
'groupName']);
526 $groupKeyLowerCase = strtolower($groupKey);
529 $globalStatsKey =
false;
530 if (!empty($groupElement[
'globalStatsKey']) && empty($groupElement[
'globalStats'])) {
531 $globalStatsKey = $groupElement[
'globalStatsKey'];
532 $groupElement[
'globalStats'] = array();
535 $openedDashBoard .=
'<div class="box-flex-item"><div class="box-flex-item-with-margin">'.
"\n";
536 $openedDashBoard .=
' <div class="info-box '.$openedDashBoardSize.
'">'.
"\n";
537 $openedDashBoard .=
' <span class="info-box-icon bg-infobox-'.$groupKeyLowerCase.
'">'.
"\n";
538 $openedDashBoard .=
' <i class="fa fa-dol-'.$groupKeyLowerCase.
'"></i>'.
"\n";
541 if (!empty($groupElement[
'globalStats'])) {
542 $globalStatInTopOpenedDashBoard[] = $globalStatsKey;
543 $openedDashBoard .=
'<span class="info-box-icon-text" title="'.$groupElement[
'globalStats'][
'text'].
'">'.$groupElement[
'globalStats'][
'nbTotal'].
'</span>';
546 $openedDashBoard .=
'</span>'.
"\n";
547 $openedDashBoard .=
'<div class="info-box-content">'.
"\n";
549 $openedDashBoard .=
'<div class="info-box-title" title="'.strip_tags($groupName).
'">'.$groupName.
'</div>'.
"\n";
550 $openedDashBoard .=
'<div class="info-box-lines">'.
"\n";
552 foreach ($boards as $board) {
553 $openedDashBoard .=
'<div class="info-box-line spanoverflow nowrap">';
555 if (!empty($board->labelShort)) {
556 $infoName =
'<div class="marginrightonly inline-block valignmiddle info-box-line-text" title="'.$board->label.
'">'.$board->labelShort.
'</div>';
558 $infoName =
'<div class="marginrightonly inline-block valignmiddle info-box-line-text">'.$board->label.
'</div>';
561 $textLateTitle = $langs->trans(
"NActionsLate", $board->nbtodolate);
562 $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").
')';
564 if ($board->id ==
'bank_account') {
565 $textLateTitle .=
'<br><span class="opacitymedium">'.$langs->trans(
"IfYouDontReconcileDisableProperty", $langs->transnoentitiesnoconv(
"Conciliable")).
'</span>';
569 if ($board->nbtodolate > 0) {
570 $textLate .=
'<span title="'.dol_escape_htmltag($textLateTitle).
'" class="classfortooltip badge badge-warning">';
571 $textLate .=
'<i class="fa fa-exclamation-triangle"></i> '.$board->nbtodolate;
572 $textLate .=
'</span>';
576 if ($board->nbtodo > 0) {
577 $nbtodClass =
'badge badge-info';
579 $nbtodClass =
'opacitymedium';
583 $labeltoshow = $board->label.
' ('.$board->nbtodo.
')';
584 if ($board->total > 0) {
585 $labeltoshow .=
' - '.price($board->total, 0, $langs, 1, -1, -1, $conf->currency);
587 $openedDashBoard .=
'<a href="'.$board->url.
'" class="info-box-text info-box-text-a">';
588 $openedDashBoard .= $infoName;
589 $openedDashBoard .=
'<div class="inline-block nowraponall">';
590 $openedDashBoard .=
'<span class="classfortooltip'.($nbtodClass ?
' '.$nbtodClass :
'').
'" title="'.$labeltoshow.
'">';
591 $openedDashBoard .= $board->nbtodo;
593 $openedDashBoard .=
' : '.price($board->total, 0, $langs, 1, -1, -1, $conf->currency);
595 $openedDashBoard .=
'</span>';
598 if ($board->url_late) {
599 $openedDashBoard .=
'</div></a>';
600 $openedDashBoard .=
' <div class="inline-block"><a href="'.$board->url_late.
'" class="info-box-text info-box-text-a paddingleft">';
602 $openedDashBoard .=
' ';
604 $openedDashBoard .= $textLate;
606 $openedDashBoard .=
'</a>'.
"\n";
607 $openedDashBoard .=
'</div>';
608 $openedDashBoard .=
'</div>'.
"\n";
613 $openedDashBoard .=
' </div><!-- /.info-box-lines --></div><!-- /.info-box-content -->'.
"\n";
614 $openedDashBoard .=
' </div><!-- /.info-box -->'.
"\n";
615 $openedDashBoard .=
'</div><!-- /.box-flex-item-with-margin -->'.
"\n";
616 $openedDashBoard .=
'</div><!-- /.box-flex-item -->'.
"\n";
617 $openedDashBoard .=
"\n";
621 if ($showweather && !empty($isIntopOpenedDashBoard)) {
622 $appendClass = (
getDolGlobalInt(
'MAIN_DISABLE_METEO') == 2 ?
' hideonsmartphone' :
'');
626 if ($totallate > 0) {
627 $text = $langs->transnoentitiesnoconv(
"WarningYouHaveAtLeastOneTaskLate").
' ('.$langs->transnoentitiesnoconv(
629 $totallate.(getDolGlobalString(
'MAIN_USE_METEO_WITH_PERCENTAGE') ?
'%' :
'')
632 $text = $langs->transnoentitiesnoconv(
"NoItemLate");
634 $text .=
'. '.$langs->transnoentitiesnoconv(
"LateDesc");
636 $weatherDashBoard =
'<div class="box-flex-item '.$appendClass.
'"><div class="box-flex-item-with-margin">'.
"\n";
637 $weatherDashBoard .=
' <div class="info-box '.$openedDashBoardSize.
' info-box-weather info-box-weather-level'.$weather->level.
'">'.
"\n";
638 $weatherDashBoard .=
' <span class="info-box-icon">';
639 $weatherDashBoard .=
img_weather(
'', $weather->level,
'', 0,
'valignmiddle width50');
640 $weatherDashBoard .=
' </span>'.
"\n";
641 $weatherDashBoard .=
' <div class="info-box-content">'.
"\n";
642 $weatherDashBoard .=
' <div class="info-box-title">'.$langs->trans(
'GlobalOpenedElemView').
'</div>'.
"\n";
644 if ($totallatePercentage > 0 &&
getDolGlobalString(
'MAIN_USE_METEO_WITH_PERCENTAGE')) {
645 $weatherDashBoard .=
' <span class="info-box-number">'.$langs->transnoentitiesnoconv(
647 price($totallatePercentage).
'%'
649 $weatherDashBoard .=
' <span class="progress-description">'.$langs->trans(
654 $weatherDashBoard .=
' <span class="info-box-number">'.$langs->transnoentitiesnoconv(
658 if ($totallatePercentage > 0) {
659 $weatherDashBoard .=
' <span class="progress-description">'.$langs->trans(
661 price($totallatePercentage).
'%'
666 $weatherDashBoard .=
' </div><!-- /.info-box-content -->'.
"\n";
667 $weatherDashBoard .=
' </div><!-- /.info-box -->'.
"\n";
668 $weatherDashBoard .=
'</div><!-- /.box-flex-item-with-margin -->'.
"\n";
669 $weatherDashBoard .=
'</div><!-- /.box-flex-item -->'.
"\n";
670 $weatherDashBoard .=
"\n";
672 $openedDashBoard = $weatherDashBoard.$openedDashBoard;
675 if (!empty($isIntopOpenedDashBoard)) {
676 for ($i = 1; $i <= 10; $i++) {
677 $openedDashBoard .=
'<div class="box-flex-item filler"></div>';
681 $nbworkboardcount = 0;
682 foreach ($valid_dashboardlines as $infoKey => $board) {
683 if (in_array($infoKey, $isIntopOpenedDashBoard)) {
688 if (empty($board->nbtodo)) {
694 $textlate = $langs->trans(
"NActionsLate", $board->nbtodolate);
695 $textlate .=
' ('.$langs->trans(
"Late").
' = '.$langs->trans(
"DateReference").
' > '.$langs->trans(
"DateToday").
' '.(ceil($board->warning_delay) >= 0 ?
'+' :
'').ceil($board->warning_delay).
' '.$langs->trans(
"days").
')';
698 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats130 boxstatsborder">';
699 $boxwork .=
'<div class="boxstatscontent">';
700 $boxwork .=
'<span class="boxstatstext" title="'.dol_escape_htmltag($board->label).
'">'.$board->img.
' <span>'.$board->label.
'</span></span><br>';
701 $boxwork .=
'<a class="valignmiddle dashboardlineindicator" href="'.$board->url.
'"><span class="dashboardlineindicator'.(($board->nbtodo == 0) ?
' dashboardlineok' :
'').
'">'.$board->nbtodo.
'</span></a>';
703 $boxwork .=
' / <a class="valignmiddle dashboardlineindicator" href="'.$board->url.
'"><span class="dashboardlineindicator'.(($board->nbtodo == 0) ?
' dashboardlineok' :
'').
'">'.
price($board->total).
'</span></a>';
705 $boxwork .=
'</div>';
706 if ($board->nbtodolate > 0) {
707 $boxwork .=
'<div class="dashboardlinelatecoin nowrap">';
708 $boxwork .=
'<a title="'.dol_escape_htmltag($textlate).
'" class="valignmiddle dashboardlineindicatorlate'.($board->nbtodolate > 0 ?
' dashboardlineko' :
' dashboardlineok').
'" href="'.((!$board->url_late) ? $board->url : $board->url_late).
'">';
713 'class="inline-block hideonsmartphone valigntextbottom"'
715 $boxwork .=
'<span class="dashboardlineindicatorlate'.($board->nbtodolate > 0 ?
' dashboardlineko' :
' dashboardlineok').
'">';
716 $boxwork .= $board->nbtodolate;
717 $boxwork .=
'</span>';
719 $boxwork .=
'</div>';
721 $boxwork .=
'</div></div>';
725 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
726 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
727 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
728 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
730 $boxwork .=
'</div>';
731 $boxwork .=
'</td></tr>';
733 $boxwork .=
'<tr class="nohover">';
734 $boxwork .=
'<td class="nohover valignmiddle opacitymedium">';
735 $boxwork .= $langs->trans(
"NoOpenedElementToProcess");
740 $boxwork .=
'</td></tr>';
742 $boxwork .=
'</table>';
743 $boxwork .=
'</div>';
745 if (!empty($isIntopOpenedDashBoard)) {
746 print
'<div class="fichecenter">';
747 print
'<div class="opened-dash-board-wrap"><div class="box-flex-container">'.$openedDashBoard.
'</div></div>';
753print
'<div class="clearboth"></div>';
755print
'<div class="fichecenter fichecenterbis">';
762$boxlist =
'<div class="twocolumns">';
764$boxlist .=
'<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
765if (!empty($nbworkboardcount)) {
766 $boxlist .= $boxwork;
769$boxlist .= $resultboxes[
'boxlista'];
773$boxlist .=
'<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
775$boxlist .= $resultboxes[
'boxlistb'];
809 return img_weather($text, $weather->picto, $options, 0, $morecss);
825 $weather->picto =
'';
830 $used_conf = !
getDolGlobalString(
'MAIN_USE_METEO_WITH_PERCENTAGE') ?
'MAIN_METEO_LEVEL' :
'MAIN_METEO_PERCENTAGE_LEVEL';
835 $level1 = $offset + $factor;
837 $level2 = $offset + 2 * $factor;
839 $level3 = $offset + 3 * $factor;
842 if ($totallate <= $level0) {
843 $weather->picto =
'weather-clear.png';
845 } elseif ($totallate <= $level1) {
846 $weather->picto =
'weather-few-clouds.png';
848 } elseif ($totallate <= $level2) {
849 $weather->picto =
'weather-clouds.png';
851 } elseif ($totallate <= $level3) {
852 $weather->picto =
'weather-many-clouds.png';
855 $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.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
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.