31define(
'CSRFCHECK_WITH_TOKEN', 1);
33require
'main.inc.php';
44require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
47$_GET[
'mainmenu'] =
GETPOST(
'mainmenu',
'aZ09') ?
GETPOST(
'mainmenu',
'aZ09') :
'home';
48$action =
GETPOST(
'action',
'aZ09');
50$hookmanager->initHooks(array(
'index'));
52require_once DOL_DOCUMENT_ROOT.
'/core/redirect_if_setup_not_complete.inc.php';
60 require_once DOL_DOCUMENT_ROOT.
'/core/class/infobox.class.php';
63 $boxorder =
GETPOST(
'boxorder',
'aZ09');
64 $boxorder .=
GETPOST(
'boxcombo',
'aZ09');
77if (!isset($form) || !is_object($form)) {
81$appli = constant(
'DOL_APPLICATION_TITLE');
84 $appli = (preg_match(
'/^\+/', $applicustom) ? $appli :
'').$applicustom;
86 $appli .=
" ".DOL_VERSION;
90$title = $langs->trans(
"HomeArea").
' - '.$appli;
101 $motd = preg_replace(
'/<br(\s[\sa-zA-Z_="]*)?\/?>/i',
'<br>',
getDolGlobalString(
'MAIN_MOTD'));
103 $substitutionarray = getCommonSubstitutionArray($langs);
107 print
"\n<!-- Start of welcome text -->\n";
108 print
'<table class="centpercent notopnoleftnoright"><tr><td>';
110 print
'</td></tr></table><br>';
111 print
"\n<!-- End of welcome text -->\n";
120 $langs->loadLangs(array(
"other"));
122 $messagetoshow =
info_admin($messagetoshow, 0, 0,
'warning',
'clearboth');
125 $parameters = array(
'type' =>
'MAIN_FORCE_SYSTEM_MESSAGE');
126 $reshook = $hookmanager->executeHooks(
'messageOfTheDay', $parameters, $tmpobject, $action);
128 $messagetoshow .= $hookmanager->resPrint;
130 if ($messagetoshow) {
131 print
'<!-- show system message -->';
138 $langs->loadLangs(array(
"other"));
140 $messagetoshow = $langs->trans(
"YourInstallIsOldThanksToUpgrade");
142 $messagetoshow = $langs->trans(
getDolGlobalString(
'MAIN_FORCE_UPGRADE_MESSAGE',
"YourInstallIsOldThanksToUpgrade"));
145 $messagetoshow .=
'<br><a href="'.getDolGlobalString(
'MAIN_FORCE_UPGRADE_URL').
'" target="_blank">'.
getDolGlobalString(
'MAIN_FORCE_UPGRADE_URL').
'</a>';
147 $messagetoshow =
info_admin($messagetoshow, 0, 0,
'warning',
'clearboth');
170 $lockfile = DOL_DATA_ROOT.
'/install.lock';
171 if (!empty($lockfile) && !file_exists($lockfile) && is_dir(DOL_DOCUMENT_ROOT.
"/install")) {
172 $langs->load(
"errors");
174 $messagetoshow .=
info_admin($langs->transnoentities(
"WarningLockFileDoesNotExists", DOL_DATA_ROOT).
' '.$langs->transnoentities(
"WarningUntilDirRemoved", DOL_DOCUMENT_ROOT.
"/install"), 0, 0,
'warning',
'clearboth');
181 $newPerm = $currentPerm & ~0222;
187 $langs->load(
"errors");
188 $messagetoshow .=
info_admin($langs->transnoentities(
"WarningConfFileMustBeReadOnly").
' '.$langs->transnoentities(
"WarningUntilDirRemoved", DOL_DOCUMENT_ROOT.
"/install"), 0, 0,
'warning',
'clearboth');
193 $parameters = array(
'type' =>
'MAIN_REMOVE_INSTALL_WARNING');
194 $reshook = $hookmanager->executeHooks(
'messageOfTheDay', $parameters, $tmpobject, $action);
196 $messagetoshow .= $hookmanager->resPrint;
198 if ($messagetoshow) {
199 print
'<!-- show security warning -->';
209print
load_fiche_titre(
' ', $resultboxes[
'selectboxlist'],
'', 0,
'',
'titleforhome');
212$langs->loadLangs(array(
'commercial',
'bills',
'orders',
'contracts'));
219 $dashboardlines = array();
222 require_once DOL_DOCUMENT_ROOT.
'/core/class/workboardresponse.class.php';
226 include_once DOL_DOCUMENT_ROOT.
'/comm/action/class/actioncomm.class.php';
228 $dashboardlines[$board->element] = $board->load_board($user);
233 include_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
235 $dashboardlines[$board->element] = $board->load_board($user);
240 include_once DOL_DOCUMENT_ROOT.
'/projet/class/task.class.php';
242 $dashboardlines[$board->element] = $board->load_board($user);
247 include_once DOL_DOCUMENT_ROOT.
'/comm/propal/class/propal.class.php';
249 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
251 $dashboardlines[$board->element.
'_signed'] = $board->load_board($user,
"signed");
256 $langs->load(
"supplier_proposal");
257 include_once DOL_DOCUMENT_ROOT.
'/supplier_proposal/class/supplier_proposal.class.php';
259 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
261 $dashboardlines[$board->element.
'_signed'] = $board->load_board($user,
"signed");
266 include_once DOL_DOCUMENT_ROOT.
'/commande/class/commande.class.php';
269 $dashboardlines[$board->element.
'_toship'] = $board->load_board($user,
'toship');
272 $dashboardlines[$board->element.
'_tobill'] = $board->load_board($user,
'tobill');
275 $dashboardlines[$board->element.
'_shippedtobill'] = $board->load_board($user,
'shippedtobill');
280 include_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.commande.class.php';
282 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
283 $dashboardlines[$board->element.
'_awaiting'] = $board->load_board($user,
'awaiting');
288 include_once DOL_DOCUMENT_ROOT.
'/contrat/class/contrat.class.php';
290 $dashboardlines[$board->element.
'_inactive'] = $board->load_board($user,
"inactive");
292 $dashboardlines[$board->element.
'_active'] = $board->load_board($user,
"active");
297 include_once DOL_DOCUMENT_ROOT.
'/ticket/class/ticket.class.php';
299 $dashboardlines[$board->element.
'_opened'] = $board->load_board($user,
"opened");
306 include_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
308 $dashboardlines[$board->element] = $board->load_board($user);
312 if (
isModEnabled(
'supplier_invoice') && !
getDolGlobalString(
'MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight(
'fournisseur',
'facture',
'lire')) {
313 include_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.facture.class.php';
315 $dashboardlines[$board->element] = $board->load_board($user);
320 include_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
322 $nb = $board->countAccountToReconcile();
324 $dashboardlines[$board->element] = $board->load_board($user);
331 include_once DOL_DOCUMENT_ROOT .
'/compta/paiement/cheque/class/remisecheque.class.php';
333 $dashboardlines[$board->element] = $board->load_board($user);
336 include_once DOL_DOCUMENT_ROOT.
'/compta/prelevement/class/bonprelevement.class.php';
338 $dashboardlines[$board->element .
'_direct_debit'] = $board->load_board($user,
'direct-debit');
341 include_once DOL_DOCUMENT_ROOT.
'/compta/prelevement/class/bonprelevement.class.php';
343 $dashboardlines[$board->element .
'_credit_transfer'] = $board->load_board($user,
'credit-transfer');
349 include_once DOL_DOCUMENT_ROOT.
'/adherents/class/adherent.class.php';
351 $dashboardlines[$board->element.
'_shift'] = $board->load_board($user,
'shift');
352 $dashboardlines[$board->element.
'_expired'] = $board->load_board($user,
'expired');
357 include_once DOL_DOCUMENT_ROOT.
'/expensereport/class/expensereport.class.php';
359 $dashboardlines[$board->element.
'_toapprove'] = $board->load_board($user,
'toapprove');
364 include_once DOL_DOCUMENT_ROOT.
'/expensereport/class/expensereport.class.php';
366 $dashboardlines[$board->element.
'_topay'] = $board->load_board($user,
'topay');
371 include_once DOL_DOCUMENT_ROOT.
'/holiday/class/holiday.class.php';
373 $dashboardlines[$board->element] = $board->load_board($user);
377 include_once DOL_DOCUMENT_ROOT.
'/mrp/class/mo.class.php';
378 $board =
new Mo(
$db);
379 $dashboardlines[$board->element] = $board->load_board($user);
383 $parameters = array();
385 $reshook = $hookmanager->executeHooks(
386 'addOpenElementsDashboardLine',
392 $dashboardlines = array_merge($dashboardlines, $hookmanager->resArray);
395 $dashboardgroup = array(
398 'groupName' =>
'Agenda',
399 'stats' => array(
'action'),
403 'groupName' =>
'Projects',
404 'globalStatsKey' =>
'projects',
405 'stats' => array(
'project',
'project_task'),
409 'groupName' =>
'Proposals',
410 'globalStatsKey' =>
'proposals',
412 array(
'propal_opened',
'propal_signed'),
416 'groupName' =>
'Orders',
417 'globalStatsKey' =>
'orders',
419 array(
'commande_toship',
'commande_tobill',
'commande_shippedtobill'),
423 'groupName' =>
'Invoices',
424 'globalStatsKey' =>
'invoices',
428 'supplier_proposal' =>
430 'lang' =>
'supplier_proposal',
431 'groupName' =>
'SupplierProposals',
432 'globalStatsKey' =>
'askprice',
434 array(
'supplier_proposal_opened',
'supplier_proposal_signed'),
438 'groupName' =>
'SuppliersOrders',
439 'globalStatsKey' =>
'supplier_orders',
441 array(
'order_supplier_opened',
'order_supplier_awaiting'),
443 'invoice_supplier' =>
445 'groupName' =>
'BillsSuppliers',
446 'globalStatsKey' =>
'supplier_invoices',
448 array(
'invoice_supplier'),
452 'groupName' =>
'Contracts',
453 'globalStatsKey' =>
'Contracts',
455 array(
'contrat_inactive',
'contrat_active'),
459 'groupName' =>
'Tickets',
460 'globalStatsKey' =>
'ticket',
462 array(
'ticket_opened'),
466 'groupName' =>
'BankAccount',
468 array(
'bank_account',
'chequereceipt',
'widthdraw_direct_debit',
'widthdraw_credit_transfer'),
472 'groupName' =>
'Members',
473 'globalStatsKey' =>
'members',
475 array(
'member_shift',
'member_expired'),
479 'groupName' =>
'ExpenseReport',
480 'globalStatsKey' =>
'expensereports',
482 array(
'expensereport_toapprove',
'expensereport_topay'),
486 'groupName' =>
'Holidays',
487 'globalStatsKey' =>
'holidays',
494 'globalStatsKey' =>
'mrp',
501 'dashboardgroup' => $dashboardgroup
503 $reshook = $hookmanager->executeHooks(
'addOpenElementsDashboardGroup', $parameters, $object, $action);
505 $dashboardgroup = array_merge($dashboardgroup, $hookmanager->resArray);
510 $totallate = $totaltodo = 0;
514 $valid_dashboardlines = array();
515 foreach ($dashboardlines as $workboardid => $tmp) {
517 $tmp->id = (
string) $workboardid;
518 $valid_dashboardlines[$workboardid] = $tmp;
522 foreach ($valid_dashboardlines as $board) {
523 if (is_numeric($board->nbtodo) && is_numeric($board->nbtodolate) && $board->nbtodolate > 0) {
524 $totaltodo += $board->nbtodo;
525 $totallate += $board->nbtodolate;
529 $openedDashBoardSize =
'info-box-sm';
530 foreach ($dashboardgroup as $dashbordelement) {
531 if (is_array($dashbordelement[
'stats']) && count($dashbordelement[
'stats']) > 2) {
532 $openedDashBoardSize =
'';
537 $totalLateNumber = $totallate;
538 $totallatePercentage = ((!empty($totaltodo)) ? round($totallate / $totaltodo * 100, 2) : 0);
540 $totallate = $totallatePercentage;
545 $boxwork .=
'<div class="box">';
546 $boxwork .=
'<table summary="'.dol_escape_htmltag($langs->trans(
"WorkingBoard")).
'" class="noborder boxtable boxtablenobottom boxworkingboard centpercent">'.
"\n";
547 $boxwork .=
'<tr class="liste_titre">';
548 $boxwork .=
'<th class="liste_titre"><div class="inline-block valignmiddle">'.$langs->trans(
"DolibarrWorkBoard").
'</div>';
550 if ($totallate > 0) {
551 $text = $langs->transnoentitiesnoconv(
"WarningYouHaveAtLeastOneTaskLate").
' ('.$langs->transnoentitiesnoconv(
553 $totallate.(getDolGlobalString(
'MAIN_USE_METEO_WITH_PERCENTAGE') ?
'%' :
'')
556 $text = $langs->transnoentitiesnoconv(
"NoItemLate");
558 $text .=
'. '.$langs->transnoentitiesnoconv(
"LateDesc");
560 $options =
'height="24px" style="float: right"';
561 $boxwork .=
showWeather($totallate, $text, $options,
'inline-block valignmiddle');
564 $boxwork .=
'</tr>'.
"\n";
567 $nbworkboardempty = 0;
568 $isIntopOpenedDashBoard = array();
569 $openedDashBoard =
'';
570 if (!empty($valid_dashboardlines)) {
571 $boxwork .=
'<tr class="nobottom nohover"><td class="tdboxstats nohover flexcontainer centpercent"><div style="display: flex: flex-wrap: wrap">';
572 foreach ($dashboardgroup as $groupKey => $groupElement) {
577 foreach ($groupElement[
'stats'] as $infoKey) {
578 if (!empty($valid_dashboardlines[$infoKey])) {
579 $boards[] = $valid_dashboardlines[$infoKey];
580 $isIntopOpenedDashBoard[] = $infoKey;
586 if (!empty($boards)) {
587 if (!empty($groupElement[
'lang'])) {
588 $langs->load($groupElement[
'lang']);
591 $groupName = $langs->trans($groupElement[
'groupName']);
592 $groupKeyLowerCase = strtolower($groupKey);
595 $globalStatsKey =
false;
596 if (!empty($groupElement[
'globalStatsKey']) && empty($groupElement[
'globalStats'])) {
597 $globalStatsKey = $groupElement[
'globalStatsKey'];
598 $groupElement[
'globalStats'] = array();
603 'action' =>
dol_buildpath(
'/comm/action/card.php?action=create', 1),
604 'project' =>
dol_buildpath(
'/projet/card.php?action=create', 1),
605 'propal' =>
dol_buildpath(
'/comm/propal/card.php?action=create', 1),
606 'commande' =>
dol_buildpath(
'/commande/card.php?action=create', 1),
607 'facture' =>
dol_buildpath(
'/compta/facture/card.php?action=create', 1),
608 'supplier_proposal' =>
dol_buildpath(
'/supplier_proposal/card.php?action=create', 1),
609 'order_supplier' =>
dol_buildpath(
'/fourn/commande/card.php?action=create', 1),
610 'invoice_supplier' =>
dol_buildpath(
'/fourn/facture/card.php?action=create', 1),
611 'contrat' =>
dol_buildpath(
'/contrat/card.php?action=create', 1),
612 'ticket' =>
dol_buildpath(
'/ticket/card.php?action=create', 1),
613 'bank_account' =>
dol_buildpath(
'/compta/bank/card.php?action=create', 1),
614 'member' =>
dol_buildpath(
'/adherents/card.php?action=create', 1),
615 'expensereport' =>
dol_buildpath(
'/expensereport/card.php?action=create', 1),
616 'holiday' =>
dol_buildpath(
'/holiday/card.php?action=create', 1),
617 'cubes' =>
dol_buildpath(
'/mrp/mo_card.php?action=create', 1),
620 $infoboxMoreCss =
'';
621 if (array_key_exists($groupKey, $arrayLinks)) {
622 $infoboxMoreCss =
'infobox-haslink';
625 $openedDashBoard .=
'<div class="box-flex-item"><div class="box-flex-item-with-margin">'.
"\n";
626 $openedDashBoard .=
' <div class="info-box '.$openedDashBoardSize.
' '.$infoboxMoreCss.
'">'.
"\n";
627 $openedDashBoard .=
' <span class="info-box-icon bg-infobox-'.$groupKeyLowerCase.
'">'.
"\n";
628 $openedDashBoard .=
' <i class="fa fa-dol-'.$groupKeyLowerCase.
'"></i>'.
"\n";
631 if (!empty($groupElement[
'globalStats'])) {
632 $openedDashBoard .=
'<span class="info-box-icon-text" title="'.$groupElement[
'globalStats'][
'text'].
'">'.$groupElement[
'globalStats'][
'nbTotal'].
'</span>';
635 if (array_key_exists($groupKey, $arrayLinks)) {
636 $openedDashBoard .=
' <a href="'.$arrayLinks[$groupKey].
'" class="info-box-createlink"><span class="fas fa-plus-circle"></span></a>'.
"\n";
639 $openedDashBoard .=
'</span>'.
"\n";
640 $openedDashBoard .=
'<div class="info-box-content">'.
"\n";
642 $openedDashBoard .=
'<div class="info-box-title" title="'.dolPrintHTMLForAttribute($groupName).
'">'.$groupName.
'</div>'.
"\n";
643 $openedDashBoard .=
'<div class="info-box-lines">'.
"\n";
645 foreach ($boards as $board) {
646 $openedDashBoard .=
'<div class="info-box-line spanoverflow nowrap">';
648 if (!empty($board->labelShort)) {
649 $infoName =
'<div class="marginrightonly inline-block valignmiddle info-box-line-text" title="'.$board->label.
'">'.$board->labelShort.
'</div>';
651 $infoName =
'<div class="marginrightonly inline-block valignmiddle info-box-line-text">'.$board->label.
'</div>';
654 $textLateTitle = $langs->trans(
"NActionsLate", $board->nbtodolate);
657 if ($board->id ==
'mo') {
658 $dateOrder = $langs->trans(
"DateToday") .
" > " . $langs->trans(
"DateReference");
660 $dateOrder = $langs->trans(
"DateReference") .
" > " . $langs->trans(
"DateToday");
662 $warningDelay = ceil(empty($board->warning_delay) ? 0 : $board->warning_delay);
664 if ($warningDelay >= 0) {
668 $textLateTitle .=
" (" . $langs->trans(
"Late") .
" = $dateOrder $sign$warningDelay " . $langs->trans(
"days") .
")";
670 if ($board->id ==
'bank_account') {
671 $textLateTitle .=
'<br><span class="opacitymedium">'.$langs->trans(
"IfYouDontReconcileDisableProperty", $langs->transnoentitiesnoconv(
"Conciliable")).
'</span>';
675 if ($board->nbtodolate > 0) {
676 $textLate .=
'<span title="'.dol_escape_htmltag($textLateTitle).
'" class="classfortooltip badge badge-warning">';
677 $textLate .=
'<i class="fa fa-exclamation-triangle hideonsmartphone"></i> '.$board->nbtodolate;
678 $textLate .=
'</span>';
682 if ($board->nbtodo > 0) {
683 $nbtodClass =
'badge badge-info';
685 $nbtodClass =
'opacitymedium';
689 $labeltoshow = $board->label.
' ('.$board->nbtodo.
')';
690 if ($board->total > 0) {
691 $labeltoshow .=
' - '.price($board->total, 0, $langs, 1, -1, -1,
getDolCurrency());
693 $openedDashBoard .=
'<a href="'.$board->url.
'" class="info-box-text info-box-text-a">';
694 $openedDashBoard .= $infoName;
695 $openedDashBoard .=
'</a>';
696 $openedDashBoard .=
'<div class="inline-block nowraponall">';
697 $openedDashBoard .=
'<a href="'.$board->url.
'" class="info-box-text info-box-text-a">';
698 $openedDashBoard .=
'<span class="classfortooltip'.($nbtodClass ?
' '.$nbtodClass :
'').
'" title="'.$labeltoshow.
'">';
699 $openedDashBoard .= $board->nbtodo;
701 $openedDashBoard .=
' : '.price($board->total, 0, $langs, 1, -1, -1,
getDolCurrency());
703 $openedDashBoard .=
'</span>';
704 $openedDashBoard .=
'</a>';
707 if ($board->url_late) {
708 $openedDashBoard .=
'</div>';
709 $openedDashBoard .=
' <div class="inline-block"><a href="'.$board->url_late.
'" class="info-box-text info-box-text-a paddingleft">';
711 $openedDashBoard .=
' <span class="info-box-text info-box-text-a displaycontents">';
713 $openedDashBoard .= $textLate;
714 if ($board->url_late) {
715 $openedDashBoard .=
'</a>';
717 $openedDashBoard .=
'</span>';
720 $openedDashBoard .=
'</div>'.
"\n";
722 $openedDashBoard .=
'</div>'.
"\n";
727 $openedDashBoard .=
' </div><!-- /.info-box-lines --></div><!-- /.info-box-content -->'.
"\n";
728 $openedDashBoard .=
' </div><!-- /.info-box -->'.
"\n";
729 $openedDashBoard .=
'</div><!-- /.box-flex-item-with-margin -->'.
"\n";
730 $openedDashBoard .=
'</div><!-- /.box-flex-item -->'.
"\n";
731 $openedDashBoard .=
"\n";
735 if ($showweather && !empty($isIntopOpenedDashBoard)) {
736 $appendClass = (
getDolGlobalInt(
'MAIN_DISABLE_METEO') == 2 ?
' hideonsmartphone' :
'');
740 if ($totallate > 0) {
741 $text = $langs->transnoentitiesnoconv(
"WarningYouHaveAtLeastOneTaskLate").
' ('.$langs->transnoentitiesnoconv(
743 $totallate.(getDolGlobalString(
'MAIN_USE_METEO_WITH_PERCENTAGE') ?
'%' :
'')
746 $text = $langs->transnoentitiesnoconv(
"NoItemLate");
748 $text .=
'. '.$langs->transnoentitiesnoconv(
"LateDesc");
750 $weatherDashBoard =
'<div class="box-flex-item '.$appendClass.
'"><div class="box-flex-item-with-margin">'.
"\n";
751 $weatherDashBoard .=
' <div class="info-box '.$openedDashBoardSize.
' info-box-weather info-box-weather-level'.$weather->level.
'">'.
"\n";
752 $weatherDashBoard .=
' <span class="info-box-icon">';
753 $weatherDashBoard .=
img_weather(
'', $weather->level,
'', 0,
'valignmiddle width50');
754 $weatherDashBoard .=
' </span>'.
"\n";
755 $weatherDashBoard .=
' <div class="info-box-content">'.
"\n";
756 $weatherDashBoard .=
' <div class="info-box-title">'.$langs->trans(
'GlobalOpenedElemView').
'</div>'.
"\n";
758 if ($totallatePercentage > 0 &&
getDolGlobalString(
'MAIN_USE_METEO_WITH_PERCENTAGE')) {
759 $weatherDashBoard .=
' <span class="info-box-number">'.$langs->transnoentitiesnoconv(
761 price($totallatePercentage).
'%'
763 $weatherDashBoard .=
' <span class="progress-description">'.$langs->trans(
768 $weatherDashBoard .=
' <span class="info-box-number">'.$langs->transnoentitiesnoconv(
770 (
string) $totalLateNumber
772 if ($totallatePercentage > 0) {
773 $weatherDashBoard .=
' <span class="progress-description">'.$langs->trans(
775 price($totallatePercentage).
'%'
780 $weatherDashBoard .=
' </div><!-- /.info-box-content -->'.
"\n";
781 $weatherDashBoard .=
' </div><!-- /.info-box -->'.
"\n";
782 $weatherDashBoard .=
'</div><!-- /.box-flex-item-with-margin -->'.
"\n";
783 $weatherDashBoard .=
'</div><!-- /.box-flex-item -->'.
"\n";
784 $weatherDashBoard .=
"\n";
786 $openedDashBoard = $weatherDashBoard.$openedDashBoard;
789 if (!empty($isIntopOpenedDashBoard)) {
790 for ($i = 1; $i <= 10; $i++) {
791 $openedDashBoard .=
'<div class="box-flex-item filler"></div>';
795 $nbworkboardcount = 0;
796 foreach ($valid_dashboardlines as $infoKey => $board) {
797 if (in_array($infoKey, $isIntopOpenedDashBoard)) {
802 if (empty($board->nbtodo)) {
808 $textlate = $langs->trans(
"NActionsLate", $board->nbtodolate);
809 $textlate .=
' ('.$langs->trans(
"Late").
' = '.$langs->trans(
"DateReference").
' > '.$langs->trans(
"DateToday").
' '.(ceil($board->warning_delay) >= 0 ?
'+' :
'').ceil($board->warning_delay).
' '.$langs->trans(
"days").
')';
812 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats130 boxstatsborder">';
813 $boxwork .=
'<div class="boxstatscontent">';
814 $boxwork .=
'<span class="boxstatstext" title="'.dol_escape_htmltag($board->label).
'">'.$board->img.
' <span>'.$board->label.
'</span></span><br>';
815 $boxwork .=
'<a class="valignmiddle dashboardlineindicator" href="'.$board->url.
'"><span class="dashboardlineindicator'.(($board->nbtodo == 0) ?
' dashboardlineok' :
'').
'">'.$board->nbtodo.
'</span></a>';
817 $boxwork .=
' / <a class="valignmiddle dashboardlineindicator" href="'.$board->url.
'"><span class="dashboardlineindicator'.(($board->nbtodo == 0) ?
' dashboardlineok' :
'').
'">'.
price($board->total).
'</span></a>';
819 $boxwork .=
'</div>';
820 if ($board->nbtodolate > 0) {
821 $boxwork .=
'<div class="dashboardlinelatecoin nowrap">';
822 $boxwork .=
'<a title="'.dol_escape_htmltag($textlate).
'" class="valignmiddle dashboardlineindicatorlate'.($board->nbtodolate > 0 ?
' dashboardlineko' :
' dashboardlineok').
'" href="'.((!$board->url_late) ? $board->url : $board->url_late).
'">';
827 'class="inline-block hideonsmartphone valigntextbottom"'
829 $boxwork .=
'<span class="dashboardlineindicatorlate'.($board->nbtodolate > 0 ?
' dashboardlineko' :
' dashboardlineok').
'">';
830 $boxwork .= $board->nbtodolate;
831 $boxwork .=
'</span>';
833 $boxwork .=
'</div>';
835 $boxwork .=
'</div></div>';
839 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
840 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
841 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
842 $boxwork .=
'<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats150empty"></div></div>';
844 $boxwork .=
'</div>';
845 $boxwork .=
'</td></tr>';
847 $boxwork .=
'<tr class="nohover">';
848 $boxwork .=
'<td class="nohover valignmiddle opacitymedium">';
849 $boxwork .= $langs->trans(
"NoOpenedElementToProcess");
854 $boxwork .=
'</td></tr>';
856 $boxwork .=
'</table>';
857 $boxwork .=
'</div>';
859 if (!empty($isIntopOpenedDashBoard)) {
860 print
'<div class="fichecenter">';
861 print
'<div class="opened-dash-board-wrap"><div class="box-flex-container">'.$openedDashBoard.
'</div></div>';
867print
'<div class="clearboth"></div>';
869print
'<div class="fichecenter fichecenterbis">';
876$boxlist =
'<div class="twocolumns">';
878$boxlist .=
'<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
879if (!empty($nbworkboardcount)) {
880 $boxlist .= $boxwork;
883$boxlist .= $resultboxes[
'boxlista'];
887$boxlist .=
'<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
889$boxlist .= $resultboxes[
'boxlistb'];
924 return img_weather($text, $weather->picto, $options, 0, $morecss);
937 $weather->picto =
'';
942 $used_conf = (
getDolGlobalString(
'MAIN_USE_METEO_WITH_PERCENTAGE') ?
'MAIN_METEO_PERCENTAGE_LEVEL' :
'MAIN_METEO_LEVEL');
947 $level1 = $offset + $factor;
949 $level2 = $offset + 2 * $factor;
951 $level3 = $offset + 3 * $factor;
954 if ($totallate <= $level0) {
955 $weather->picto =
'weather-clear.png';
957 } elseif ($totallate <= $level1) {
958 $weather->picto =
'weather-few-clouds.png';
960 } elseif ($totallate <= $level2) {
961 $weather->picto =
'weather-clouds.png';
963 } elseif ($totallate <= $level3) {
964 $weather->picto =
'weather-many-clouds.png';
967 $weather->picto =
'weather-storm.png';
if(! $sortfield) if(! $sortorder) $object
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
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.
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 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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='', $textonpictotooltip='')
Show information in HTML for admin users or standard users.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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.
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...
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
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.
showWeather($totallate, $text, $options, $morecss='')
Show weather logo.
getWeatherStatus($totallate)
get weather status for conf 'MAIN_METEO_LEVELx'
print $langs trans("Show") . '< td style="' . $timeColor . '" align="center"> s</td > badge status0 badge status4 badge status3 Error badge status8< td align="center">< span class="badge ' . $badge . '"></span ></td >< td align="center">< a href="#" class="button button-small" onclick="openLogModal(this)" data-req="' . dol_escape_htmltag($reqSafe) . '" data-res="' . dol_escape_htmltag($resSafe) . '" data-err="' . dol_escape_htmltag($errSafe) . '">< span class="fa fa-search-plus"></span ></a ></td ></tr >< tr >< td colspan="' . $colspan . '" class="opacitymedium"></td ></tr ></table ></div ></form > logModal none logModal none s a JSON string
buildzip.php
Class to generate the form for creating a new ticket.