dolibarr 24.0.0-beta
agenda.lib.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2008-2014 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
4 * Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
5 * Copyright (C) 2022-2026 Frédéric France <frederic.france@free.fr>
6 * Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 * or see https://www.gnu.org/
21 */
22
55 $form,
56 $canedit,
57 $status,
58 $year,
59 $month,
60 $day,
61 $showbirthday,
62 $filtera,
63 $filtert,
64 $filtered,
65 $pid,
66 $socid,
67 $action,
68 $showextcals = array(),
69 $actioncode = '',
70 $usergroupid = 0,
71 $excludetype = '',
72 $resourceid = 0,
73 $search_categ_cus = 0,
74 $search_import_key = ''
75) {
76 global $user, $langs, $db, $hookmanager;
77 global $massaction;
78
79 $langs->load("companies");
80
81 include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
82 $formactions = new FormActions($db);
83
84 // Filters
85 print '<input type="hidden" name="token" value="'.newToken().'">';
86 print '<input type="hidden" name="year" value="'.((int) $year).'">';
87 print '<input type="hidden" name="month" value="'.((int) $month).'">';
88 print '<input type="hidden" name="day" value="'.((int) $day).'">';
89 if ($massaction != 'predelete' && $massaction != 'preaffecttag') { // When $massaction == 'predelete', action may be already output to 'delete' by the mass action system.
90 print '<input type="hidden" name="action" value="'.$action.'">';
91 }
92 print '<input type="hidden" name="search_showbirthday" value="'.((int) $showbirthday).'">';
93
94 print '<div class="divsearchfield">';
95 // Type
96 $multiselect = 0;
97 if (getDolGlobalString('MAIN_ENABLE_MULTISELECT_TYPE')) { // We use an option here because it adds bugs when used on agenda page "peruser" and "list"
98 $multiselect = (getDolGlobalString('AGENDA_USE_EVENT_TYPE'));
99 }
100 print img_picto($langs->trans("ActionType"), 'square', 'class="pictofixedwidth inline-block" style="color: #ddd;"');
101 print $formactions->select_type_actions($actioncode, "search_actioncode", $excludetype, (getDolGlobalString('AGENDA_USE_EVENT_TYPE') ? -1 : 1), 0, $multiselect, 0, 'minwidth150 maxwidth200 widthcentpercentminusx', 1);
102 print '</div>';
103
104 if ($canedit) {
105 // Assigned to user
106 print '<div class="divsearchfield">';
107 print img_picto($langs->trans("ActionsToDoBy"), 'user', 'class="pictofixedwidth inline-block"');
108 print $form->select_dolusers($filtert, 'search_filtert', 1, null, (int) !$canedit, '', '', '0', 0, 0, '', 2, '', 'minwidth100 maxwidth250 widthcentpercentminusx');
109 print '</div>';
110
111 // Assigned to user group
112 print '<div class="divsearchfield">';
113 print img_picto($langs->trans("ToUserOfGroup"), 'object_group', 'class="pictofixedwidth inline-block"');
114 print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', (int) !$canedit, '', array(), '0', false, 'minwidth100 maxwidth250 widthcentpercentminusx');
115 print '</div>';
116
117 if (isModEnabled('resource')) {
118 include_once DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php';
119 $formresource = new FormResource($db);
120
121 // Resource
122 print '<div class="divsearchfield">';
123 print img_picto($langs->trans("Resource"), 'object_resource', 'class="pictofixedwidth inline-block"');
124 print $formresource->select_resource_list($resourceid, "search_resourceid", '', 1, 0, 0, [], '', 2, 0, 'minwidth100 maxwidth250 widthcentpercentminusx');
125 print '</div>';
126 }
127 }
128
129 if (isModEnabled('societe') && $user->hasRight('societe', 'lire')) {
130 print '<div class="divsearchfield">';
131 print img_picto($langs->trans("ThirdParty"), 'company', 'class="pictofixedwidth inline-block"');
132 print $form->select_company($socid, 'search_socid', '', '&nbsp;', 0, 0, array(), 0, 'minwidth100 maxwidth250 widthcentpercentminusx');
133 print '</div>';
134 }
135
136 if (isModEnabled('project') && $user->hasRight('projet', 'lire')) {
137 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
138 $formproject = new FormProjets($db);
139
140 print '<div class="divsearchfield">';
141 print img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth inline-block"');
142 print $formproject->select_projects($socid ? $socid : -1, (string) $pid, 'search_projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, 'minwidth100 maxwidth250 widthcentpercentminusx');
143 print '</div>';
144 }
145
146 if (isModEnabled('category') && $user->hasRight('categorie', 'lire')) {
147 require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
148 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
149 $formother = new FormOther($db);
150 $langs->load('categories');
151
152 print '<div class="divsearchfield">';
153 print img_picto($langs->trans('Categories'), 'category', 'class="pictofixedwidth"');
154 print $formother->select_categories('actioncomm', $search_categ_cus, 'search_categ_cus', 1, $langs->trans('Categories'), 'minwidth100 maxwidth250 widthcentpercentminusx');
155 print '</div>';
156 }
157
158 if ($canedit && !preg_match('/list/', $_SERVER["PHP_SELF"])) {
159 // Status
160 print '<div class="divsearchfield">';
161 print img_picto($langs->trans("Status"), 'status', 'class="pictofixedwidth inline-block"');
162 $formactions->form_select_status_action('formaction', $status, 1, 'search_status', 1, 2, 'minwidth100');
163 print '</div>';
164 }
165
166 // Hooks
167 $parameters = array('canedit' => $canedit, 'pid' => $pid, 'socid' => $socid);
168 $object = null; // Null on purpose: @phan-suppress-next-line PhanPluginConstantVariableNull
169 $reshook = $hookmanager->executeHooks('searchAgendaFrom', $parameters, $object, $action); // Note that $action and $object may have been
170
171 print '<div class="clearboth"></div>';
172}
173
174
181function show_array_actions_to_do($max = 5)
182{
183 global $langs, $conf, $user, $db, $socid;
184
185 $now = dol_now();
186
187 include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
188 include_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php';
189
190 $sql = "SELECT a.id, a.label, a.datep as dp, a.datep2 as dp2, a.fk_user_author, a.percent";
191 $sql .= ", c.code, c.libelle as type_label";
192 $sql .= ", s.rowid as socid, s.nom as name, s.name_alias";
193 $sql .= ", s.code_client, s.code_compta, s.client";
194 $sql .= ", s.logo, s.email, s.entity";
195 $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a LEFT JOIN ";
196 $sql .= " ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action";
197 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
198 if (!$user->hasRight('societe', 'client', 'voir')) {
199 $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
200 }
201 $sql .= " WHERE a.entity IN (".getEntity('agenda').")";
202 $sql .= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))";
203 if (!$user->hasRight('societe', 'client', 'voir')) {
204 $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
205 }
206 if ($socid) {
207 $sql .= " AND s.rowid = ".((int) $socid);
208 }
209 $sql .= " ORDER BY a.datep DESC, a.id DESC";
210 $sql .= $db->plimit($max, 0);
211
212 $resql = $db->query($sql);
213 if ($resql) {
214 $num = $db->num_rows($resql);
215
216 print '<div class="div-table-responsive-no-min">';
217 print '<table class="noborder centpercent">';
218 print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("LastActionsToDo", $max).'</th>';
219 print '<th colspan="2" class="right"><a class="commonlink" href="'.dolBuildUrl(DOL_URL_ROOT.'/comm/action/list.php', ['mode' => 'show_list', 'status' => 'todo']).'">'.$langs->trans("FullList").'</a></th>';
220 print '</tr>';
221
222 $i = 0;
223
224 $staticaction = new ActionComm($db);
225 $customerstatic = new Client($db);
226
227 while ($i < $num) {
228 $obj = $db->fetch_object($resql);
229
230
231 print '<tr class="oddeven">';
232
233 $staticaction->type_code = $obj->code;
234 $staticaction->label = ($obj->label ? $obj->label : $obj->type_label);
235 $staticaction->id = $obj->id;
236 print '<td>'.$staticaction->getNomUrl(1, 34).'</td>';
237
238 // print '<td>'.dol_trunc($obj->label,22).'</td>';
239
240 print '<td>';
241 if ($obj->socid > 0) {
242 $customerstatic->id = $obj->socid;
243 $customerstatic->name = $obj->name;
244 //$customerstatic->name_alias = $obj->name_alias;
245 $customerstatic->code_client = $obj->code_client;
246 $customerstatic->code_compta = $obj->code_compta;
247 $customerstatic->code_compta_client = $obj->code_compta;
248 $customerstatic->client = $obj->client;
249 $customerstatic->logo = $obj->logo;
250 $customerstatic->email = $obj->email;
251 $customerstatic->entity = $obj->entity;
252 print $customerstatic->getNomUrl(1, '', 40);
253 }
254 print '</td>';
255
256 $datep = $db->jdate($obj->dp);
257 $datep2 = $db->jdate($obj->dp2);
258
259 // Date
260 print '<td width="100" class="right tddate">'.dol_print_date($datep, 'day').'&nbsp;';
261 $late = 0;
262 if ($obj->percent == 0 && $datep && $datep < time()) {
263 $late = 1;
264 }
265 if ($obj->percent == 0 && !$datep && $datep2 && $datep2 < time()) {
266 $late = 1;
267 }
268 if ($obj->percent > 0 && $obj->percent < 100 && $datep2 && $datep2 < time()) {
269 $late = 1;
270 }
271 if ($obj->percent > 0 && $obj->percent < 100 && !$datep2 && $datep && $datep < time()) {
272 $late = 1;
273 }
274 if ($late) {
275 print img_warning($langs->trans("Late"));
276 }
277 print "</td>";
278
279 // Statut
280 print '<td class="right" width="14">'.$staticaction->LibStatut($obj->percent, 3)."</td>\n";
281
282 print "</tr>\n";
283
284 $i++;
285 }
286 print "</table></div><br>";
287
288 $db->free($resql);
289 } else {
291 }
292}
293
294
302{
303 global $langs, $conf, $user, $db, $socid;
304
305 $now = dol_now();
306
307 $sql = "SELECT a.id, a.percent, a.datep as da, a.datep2 as da2, a.fk_user_author, a.label";
308 $sql .= ", c.code, c.libelle";
309 $sql .= ", s.rowid as socid, s.nom as name, s.name_alias";
310 $sql .= ", s.code_client, s.code_compta, s.client";
311 $sql .= ", s.logo, s.email, s.entity";
312 $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a LEFT JOIN ";
313 $sql .= " ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action ";
314 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
315 if (!$user->hasRight('societe', 'client', 'voir')) {
316 $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
317 }
318 $sql .= " WHERE a.entity IN (".getEntity('agenda').")";
319 $sql .= " AND (a.percent >= 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))";
320 if (!$user->hasRight('societe', 'client', 'voir')) {
321 $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
322 }
323 if ($socid) {
324 $sql .= " AND s.rowid = ".((int) $socid);
325 }
326 $sql .= " ORDER BY a.datep2 DESC";
327 $sql .= $db->plimit($max, 0);
328
329 $resql = $db->query($sql);
330 if ($resql) {
331 $num = $db->num_rows($resql);
332
333 print '<div class="div-table-responsive-no-min">';
334 print '<table class="noborder centpercent">';
335 print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("LastDoneTasks", $max).'</th>';
336 print '<th colspan="2" class="right"><a class="commonlink" href="'.dolBuildUrl(DOL_URL_ROOT.'/comm/action/list.php', ['mode'=> 'show_list', 'status' => 'done']).'">'.$langs->trans("FullList").'</a></th>';
337 print '</tr>';
338
339 $i = 0;
340
341 $staticaction = new ActionComm($db);
342 $customerstatic = new Societe($db);
343
344 while ($i < $num) {
345 $obj = $db->fetch_object($resql);
346
347
348 print '<tr class="oddeven">';
349
350 $staticaction->type_code = $obj->code;
351 $staticaction->label = $obj->label;
352 $staticaction->id = $obj->id;
353 print '<td>'.$staticaction->getNomUrl(1, 34).'</td>';
354
355 //print '<td>'.dol_trunc($obj->label,24).'</td>';
356
357 print '<td>';
358 if ($obj->socid > 0) {
359 $customerstatic->id = $obj->socid;
360 $customerstatic->name = $obj->name;
361 //$customerstatic->name_alias = $obj->name_alias;
362 $customerstatic->code_client = $obj->code_client;
363 $customerstatic->code_compta = $obj->code_compta;
364 $customerstatic->code_compta_client = $obj->code_compta;
365 $customerstatic->client = $obj->client;
366 $customerstatic->logo = $obj->logo;
367 $customerstatic->email = $obj->email;
368 $customerstatic->entity = $obj->entity;
369 print $customerstatic->getNomUrl(1, '', 30);
370 }
371 print '</td>';
372
373 // Date
374 print '<td width="100" class="right tddate">'.dol_print_date($db->jdate($obj->da2), 'day');
375 print "</td>";
376
377 // Status
378 print '<td class="right" width="14">'.$staticaction->LibStatut($obj->percent, 3)."</td>\n";
379
380 print "</tr>\n";
381 $i++;
382 }
383 // TODO Add a reminder for "contracts need to be put in service."
384 // TODO Add reminder for "contracts expiring soon."
385 print "</table></div><br>";
386
387 $db->free($resql);
388 } else {
390 }
391}
392
393
400{
401 global $langs, $conf, $user, $extrafields;
402
403 $extrafields->fetch_name_optionals_label('actioncomm');
404
405 $h = 0;
406 $head = array();
407
408 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT."/admin/agenda_other.php");
409 $head[$h][1] = $langs->trans("Miscellaneous");
410 $head[$h][2] = 'other';
411 $h++;
412
413 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT."/admin/agenda.php");
414 $head[$h][1] = $langs->trans("AutoActions");
415 $head[$h][2] = 'autoactions';
416 $h++;
417
418 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT."/admin/agenda_reminder.php");
419 $head[$h][1] = $langs->trans("Reminders");
420 $head[$h][2] = 'reminders';
421 $h++;
422
423 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT."/admin/agenda_xcal.php");
424 $head[$h][1] = $langs->trans("ExportCal");
425 $head[$h][2] = 'xcal';
426 $h++;
427
428 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT."/admin/agenda_extsites.php");
429 $head[$h][1] = $langs->trans("ExtSites");
430 $head[$h][2] = 'extsites';
431 $h++;
432
433 complete_head_from_modules($conf, $langs, null, $head, $h, 'agenda_admin');
434
435 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT."/admin/agenda_extrafields.php");
436 $head[$h][1] = $langs->trans("ExtraFields");
437 $nbExtrafields = $extrafields->attributes['actioncomm']['count'];
438 if ($nbExtrafields > 0) {
439 $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbExtrafields.'</span>';
440 }
441 $head[$h][2] = 'attributes';
442 $h++;
443
444 complete_head_from_modules($conf, $langs, null, $head, $h, 'agenda_admin', 'remove');
445
446
447 return $head;
448}
449
457{
458 global $db, $langs, $conf, $user;
459
460 $h = 0;
461 $head = array();
462
463 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/comm/action/card.php', ['id'=> $object->id]);
464 $head[$h][1] = $langs->trans("CardAction");
465 $head[$h][2] = 'card';
466 $h++;
467
468 // Tab to link resources
469 if (isModEnabled('resource')) {
470 include_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php';
471 $resource = new Dolresource($db);
472
473 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/resource/element_resource.php', ['element' => 'action', 'element_id'=> $object->id]);
474 $listofresourcelinked = $resource->getElementResources($object->element, $object->id);
475 $nbResources = (is_array($listofresourcelinked) ? count($listofresourcelinked) : 0);
476 $head[$h][1] = $langs->trans("Resources");
477 if ($nbResources > 0) {
478 $head[$h][1] .= (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') ? '<span class="badge marginleftonlyshort">'.($nbResources).'</span>' : '');
479 }
480 $head[$h][2] = 'resources';
481 $h++;
482 }
483
484 // Attached files
485 require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
486 require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
487 $upload_dir = $conf->agenda->dir_output."/".$object->id;
488 $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
489 $nbLinks = Link::count($db, $object->element, $object->id);
490 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/comm/action/document.php', ['id' => $object->id]);
491 $head[$h][1] = $langs->trans("Documents");
492 if (($nbFiles + $nbLinks) > 0) {
493 $head[$h][1] .= (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') ? '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>' : '');
494 }
495 $head[$h][2] = 'documents';
496 $h++;
497
498 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/comm/action/info.php', ['id' => $object->id]);
499 $head[$h][1] = $langs->trans('Info');
500 $head[$h][2] = 'info';
501 $h++;
502
503 complete_head_from_modules($conf, $langs, $object, $head, $h, 'action');
504
505 complete_head_from_modules($conf, $langs, $object, $head, $h, 'action', 'remove');
506
507 return $head;
508}
509
510
518{
519 global $langs, $conf, $user;
520
521 $h = 0;
522 $head = array();
523 $query = [];
524 parse_str($param, $query);
525
526 $query = array_merge($query, ['mode' => 'show_list']);
527 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/comm/action/list.php', $query);
528 $head[$h][1] = $langs->trans("ViewList");
529 $head[$h][2] = 'cardlist';
530 $h++;
531
532 $query['mode'] = 'show_month';
533 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/comm/action/index.php', $query);
534 $head[$h][1] = $langs->trans("ViewCal");
535 $head[$h][2] = 'cardmonth';
536 $h++;
537
538 $query['mode'] = 'show_week';
539 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/comm/action/index.php', $query);
540 $head[$h][1] = $langs->trans("ViewWeek");
541 $head[$h][2] = 'cardweek';
542 $h++;
543
544 $query['mode'] = 'show_day';
545 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/comm/action/index.php', $query);
546 $head[$h][1] = $langs->trans("ViewDay");
547 $head[$h][2] = 'cardday';
548 $h++;
549
550 unset($query['mode']);
551 if (getDolGlobalString('AGENDA_SHOW_PERTYPE')) {
552 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/comm/action/pertype.php', $query);
553 $head[$h][1] = $langs->trans("ViewPerType");
554 $head[$h][2] = 'cardpertype';
555 $h++;
556 }
557
558 $newparam = $param;
559 $newparam = preg_replace('/&?search_filtert=\d+/', '', $newparam);
560 $query = [];
561 parse_str($newparam, $query);
562
563 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/comm/action/peruser.php', $query);
564 $head[$h][1] = $langs->trans("ViewPerUser");
565 $head[$h][2] = 'cardperuser';
566 $h++;
567
568
569 // Show more tabs from modules
570 // Entries must be declared in modules descriptor with line
571 // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
572 // $this->tabs = array('entity:-tabname); to remove a tab
573 complete_head_from_modules($conf, $langs, null, $head, $h, 'agenda');
574
575 complete_head_from_modules($conf, $langs, null, $head, $h, 'agenda', 'remove');
576
577 return $head;
578}
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
show_array_actions_to_do($max=5)
Show actions to do array.
print_actions_filter( $form, $canedit, $status, $year, $month, $day, $showbirthday, $filtera, $filtert, $filtered, $pid, $socid, $action, $showextcals=array(), $actioncode='', $usergroupid=0, $excludetype='', $resourceid=0, $search_categ_cus=0, $search_import_key='')
Show filter form in agenda view.
show_array_last_actions_done($max=5)
Show last actions array.
calendars_prepare_head($param)
Define head array for tabs of agenda setup pages.
agenda_prepare_head()
Prepare array with list of tabs.
actions_prepare_head($object)
Prepare array with list of tabs.
Class to manage agenda events (actions)
Class to manage customers or prospects.
DAO Resource object.
Class to manage building of HTML components.
Class to help generate other html components Only common components are here.
Class to manage building of HTML components.
Class to manage forms for the module resource.
Class to manage third parties objects (customers, suppliers, prospects...)
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $db
API class for accounts.
dol_dir_list($utf8_path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0, $nbsecondsold=0)
Scan a directory and return a list of files/directories.
Definition files.lib.php:64
dol_now($mode='gmt')
Return date for now.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
dolBuildUrl($url, $params=[], $addtoken=false, $anchor='')
Return path of url.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add', $filterorigmodule='')
Complete or removed entries into a head array (used to build tabs).
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
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