dolibarr 23.0.3
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-2025 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 '<form name="listactionsfilter" class="listactionsfilter" action="' . $_SERVER["PHP_SELF"] . '" method="get">';
86 print '<input type="hidden" name="token" value="'.newToken().'">';
87 print '<input type="hidden" name="year" value="'.((int) $year).'">';
88 print '<input type="hidden" name="month" value="'.((int) $month).'">';
89 print '<input type="hidden" name="day" value="'.((int) $day).'">';
90 if ($massaction != 'predelete' && $massaction != 'preaffecttag') { // When $massaction == 'predelete', action may be already output to 'delete' by the mass action system.
91 print '<input type="hidden" name="action" value="'.$action.'">';
92 }
93 print '<input type="hidden" name="search_showbirthday" value="'.((int) $showbirthday).'">';
94
95 print '<div class="divsearchfield">';
96 // Type
97 $multiselect = 0;
98 if (getDolGlobalString('MAIN_ENABLE_MULTISELECT_TYPE')) { // We use an option here because it adds bugs when used on agenda page "peruser" and "list"
99 $multiselect = (getDolGlobalString('AGENDA_USE_EVENT_TYPE'));
100 }
101 print img_picto($langs->trans("ActionType"), 'square', 'class="pictofixedwidth inline-block" style="color: #ddd;"');
102 print $formactions->select_type_actions($actioncode, "search_actioncode", $excludetype, (getDolGlobalString('AGENDA_USE_EVENT_TYPE') ? -1 : 1), 0, $multiselect, 0, 'minwidth150 maxwidth200 widthcentpercentminusx', 1);
103 print '</div>';
104
105 if ($canedit) {
106 // Assigned to user
107 print '<div class="divsearchfield">';
108 print img_picto($langs->trans("ActionsToDoBy"), 'user', 'class="pictofixedwidth inline-block"');
109 print $form->select_dolusers($filtert, 'search_filtert', 1, null, (int) !$canedit, '', '', '0', 0, 0, '', 2, '', 'minwidth100 maxwidth250 widthcentpercentminusx');
110 print '</div>';
111
112 // Assigned to user group
113 print '<div class="divsearchfield">';
114 print img_picto($langs->trans("ToUserOfGroup"), 'object_group', 'class="pictofixedwidth inline-block"');
115 print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', (int) !$canedit, '', array(), '0', false, 'minwidth100 maxwidth250 widthcentpercentminusx');
116 print '</div>';
117
118 if (isModEnabled('resource')) {
119 include_once DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php';
120 $formresource = new FormResource($db);
121
122 // Resource
123 print '<div class="divsearchfield">';
124 print img_picto($langs->trans("Resource"), 'object_resource', 'class="pictofixedwidth inline-block"');
125 print $formresource->select_resource_list($resourceid, "search_resourceid", '', 1, 0, 0, [], '', 2, 0, 'minwidth100 maxwidth250 widthcentpercentminusx');
126 print '</div>';
127 }
128 }
129
130 if (isModEnabled('societe') && $user->hasRight('societe', 'lire')) {
131 print '<div class="divsearchfield">';
132 print img_picto($langs->trans("ThirdParty"), 'company', 'class="pictofixedwidth inline-block"');
133 print $form->select_company($socid, 'search_socid', '', '&nbsp;', 0, 0, array(), 0, 'minwidth100 maxwidth250 widthcentpercentminusx');
134 print '</div>';
135 }
136
137 if (isModEnabled('project') && $user->hasRight('projet', 'lire')) {
138 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
139 $formproject = new FormProjets($db);
140
141 print '<div class="divsearchfield">';
142 print img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth inline-block"');
143 print $formproject->select_projects($socid ? $socid : -1, (string) $pid, 'search_projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, 'minwidth100 maxwidth250 widthcentpercentminusx');
144 print '</div>';
145 }
146
147 if (isModEnabled('category') && $user->hasRight('categorie', 'lire')) {
148 require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
149 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
150 $formother = new FormOther($db);
151 $langs->load('categories');
152
153 print '<div class="divsearchfield">';
154 print img_picto($langs->trans('Categories'), 'category', 'class="pictofixedwidth"');
155 print $formother->select_categories('actioncomm', $search_categ_cus, 'search_categ_cus', 1, $langs->trans('Categories'), 'minwidth100 maxwidth250 widthcentpercentminusx');
156 print '</div>';
157 }
158
159 if ($canedit && !preg_match('/list/', $_SERVER["PHP_SELF"])) {
160 // Status
161 print '<div class="divsearchfield">';
162 print img_picto($langs->trans("Status"), 'status', 'class="pictofixedwidth inline-block"');
163 $formactions->form_select_status_action('formaction', $status, 1, 'search_status', 1, 2, 'minwidth100');
164 print '</div>';
165 }
166
167 // Hooks
168 $parameters = array('canedit' => $canedit, 'pid' => $pid, 'socid' => $socid);
169 $object = null; // Null on purpose: @phan-suppress-next-line PhanPluginConstantVariableNull
170 $reshook = $hookmanager->executeHooks('searchAgendaFrom', $parameters, $object, $action); // Note that $action and $object may have been
171
172 print '<div class="clearboth"></div>';
173}
174
175
182function show_array_actions_to_do($max = 5)
183{
184 global $langs, $conf, $user, $db, $socid;
185
186 $now = dol_now();
187
188 include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
189 include_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php';
190
191 $sql = "SELECT a.id, a.label, a.datep as dp, a.datep2 as dp2, a.fk_user_author, a.percent";
192 $sql .= ", c.code, c.libelle as type_label";
193 $sql .= ", s.rowid as socid, s.nom as name, s.name_alias";
194 $sql .= ", s.code_client, s.code_compta, s.client";
195 $sql .= ", s.logo, s.email, s.entity";
196 $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a LEFT JOIN ";
197 $sql .= " ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action";
198 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
199 if (!$user->hasRight('societe', 'client', 'voir')) {
200 $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
201 }
202 $sql .= " WHERE a.entity IN (".getEntity('agenda').")";
203 $sql .= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))";
204 if (!$user->hasRight('societe', 'client', 'voir')) {
205 $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
206 }
207 if ($socid) {
208 $sql .= " AND s.rowid = ".((int) $socid);
209 }
210 $sql .= " ORDER BY a.datep DESC, a.id DESC";
211 $sql .= $db->plimit($max, 0);
212
213 $resql = $db->query($sql);
214 if ($resql) {
215 $num = $db->num_rows($resql);
216
217 print '<div class="div-table-responsive-no-min">';
218 print '<table class="noborder centpercent">';
219 print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("LastActionsToDo", $max).'</th>';
220 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>';
221 print '</tr>';
222
223 $i = 0;
224
225 $staticaction = new ActionComm($db);
226 $customerstatic = new Client($db);
227
228 while ($i < $num) {
229 $obj = $db->fetch_object($resql);
230
231
232 print '<tr class="oddeven">';
233
234 $staticaction->type_code = $obj->code;
235 $staticaction->label = ($obj->label ? $obj->label : $obj->type_label);
236 $staticaction->id = $obj->id;
237 print '<td>'.$staticaction->getNomUrl(1, 34).'</td>';
238
239 // print '<td>'.dol_trunc($obj->label,22).'</td>';
240
241 print '<td>';
242 if ($obj->socid > 0) {
243 $customerstatic->id = $obj->socid;
244 $customerstatic->name = $obj->name;
245 //$customerstatic->name_alias = $obj->name_alias;
246 $customerstatic->code_client = $obj->code_client;
247 $customerstatic->code_compta = $obj->code_compta;
248 $customerstatic->code_compta_client = $obj->code_compta;
249 $customerstatic->client = $obj->client;
250 $customerstatic->logo = $obj->logo;
251 $customerstatic->email = $obj->email;
252 $customerstatic->entity = $obj->entity;
253 print $customerstatic->getNomUrl(1, '', 40);
254 }
255 print '</td>';
256
257 $datep = $db->jdate($obj->dp);
258 $datep2 = $db->jdate($obj->dp2);
259
260 // Date
261 print '<td width="100" class="right tddate">'.dol_print_date($datep, 'day').'&nbsp;';
262 $late = 0;
263 if ($obj->percent == 0 && $datep && $datep < time()) {
264 $late = 1;
265 }
266 if ($obj->percent == 0 && !$datep && $datep2 && $datep2 < time()) {
267 $late = 1;
268 }
269 if ($obj->percent > 0 && $obj->percent < 100 && $datep2 && $datep2 < time()) {
270 $late = 1;
271 }
272 if ($obj->percent > 0 && $obj->percent < 100 && !$datep2 && $datep && $datep < time()) {
273 $late = 1;
274 }
275 if ($late) {
276 print img_warning($langs->trans("Late"));
277 }
278 print "</td>";
279
280 // Statut
281 print '<td class="right" width="14">'.$staticaction->LibStatut($obj->percent, 3)."</td>\n";
282
283 print "</tr>\n";
284
285 $i++;
286 }
287 print "</table></div><br>";
288
289 $db->free($resql);
290 } else {
291 dol_print_error($db);
292 }
293}
294
295
303{
304 global $langs, $conf, $user, $db, $socid;
305
306 $now = dol_now();
307
308 $sql = "SELECT a.id, a.percent, a.datep as da, a.datep2 as da2, a.fk_user_author, a.label";
309 $sql .= ", c.code, c.libelle";
310 $sql .= ", s.rowid as socid, s.nom as name, s.name_alias";
311 $sql .= ", s.code_client, s.code_compta, s.client";
312 $sql .= ", s.logo, s.email, s.entity";
313 $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a LEFT JOIN ";
314 $sql .= " ".MAIN_DB_PREFIX."c_actioncomm as c ON c.id = a.fk_action ";
315 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
316 if (!$user->hasRight('societe', 'client', 'voir')) {
317 $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
318 }
319 $sql .= " WHERE a.entity IN (".getEntity('agenda').")";
320 $sql .= " AND (a.percent >= 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))";
321 if (!$user->hasRight('societe', 'client', 'voir')) {
322 $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
323 }
324 if ($socid) {
325 $sql .= " AND s.rowid = ".((int) $socid);
326 }
327 $sql .= " ORDER BY a.datep2 DESC";
328 $sql .= $db->plimit($max, 0);
329
330 $resql = $db->query($sql);
331 if ($resql) {
332 $num = $db->num_rows($resql);
333
334 print '<div class="div-table-responsive-no-min">';
335 print '<table class="noborder centpercent">';
336 print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("LastDoneTasks", $max).'</th>';
337 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>';
338 print '</tr>';
339
340 $i = 0;
341
342 $staticaction = new ActionComm($db);
343 $customerstatic = new Societe($db);
344
345 while ($i < $num) {
346 $obj = $db->fetch_object($resql);
347
348
349 print '<tr class="oddeven">';
350
351 $staticaction->type_code = $obj->code;
352 $staticaction->label = $obj->label;
353 $staticaction->id = $obj->id;
354 print '<td>'.$staticaction->getNomUrl(1, 34).'</td>';
355
356 //print '<td>'.dol_trunc($obj->label,24).'</td>';
357
358 print '<td>';
359 if ($obj->socid > 0) {
360 $customerstatic->id = $obj->socid;
361 $customerstatic->name = $obj->name;
362 //$customerstatic->name_alias = $obj->name_alias;
363 $customerstatic->code_client = $obj->code_client;
364 $customerstatic->code_compta = $obj->code_compta;
365 $customerstatic->code_compta_client = $obj->code_compta;
366 $customerstatic->client = $obj->client;
367 $customerstatic->logo = $obj->logo;
368 $customerstatic->email = $obj->email;
369 $customerstatic->entity = $obj->entity;
370 print $customerstatic->getNomUrl(1, '', 30);
371 }
372 print '</td>';
373
374 // Date
375 print '<td width="100" class="right tddate">'.dol_print_date($db->jdate($obj->da2), 'day');
376 print "</td>";
377
378 // Status
379 print '<td class="right" width="14">'.$staticaction->LibStatut($obj->percent, 3)."</td>\n";
380
381 print "</tr>\n";
382 $i++;
383 }
384 // TODO Ajouter rappel pour "il y a des contrats a mettre en service"
385 // TODO Ajouter rappel pour "il y a des contrats qui arrivent a expiration"
386 print "</table></div><br>";
387
388 $db->free($resql);
389 } else {
390 dol_print_error($db);
391 }
392}
393
394
401{
402 global $langs, $conf, $user, $db;
403
404 $extrafields = new ExtraFields($db);
405 $extrafields->fetch_name_optionals_label('actioncomm');
406
407 $h = 0;
408 $head = array();
409
410 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT."/admin/agenda_other.php");
411 $head[$h][1] = $langs->trans("Miscellaneous");
412 $head[$h][2] = 'other';
413 $h++;
414
415 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT."/admin/agenda.php");
416 $head[$h][1] = $langs->trans("AutoActions");
417 $head[$h][2] = 'autoactions';
418 $h++;
419
420 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT."/admin/agenda_reminder.php");
421 $head[$h][1] = $langs->trans("Reminders");
422 $head[$h][2] = 'reminders';
423 $h++;
424
425 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT."/admin/agenda_xcal.php");
426 $head[$h][1] = $langs->trans("ExportCal");
427 $head[$h][2] = 'xcal';
428 $h++;
429
430 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT."/admin/agenda_extsites.php");
431 $head[$h][1] = $langs->trans("ExtSites");
432 $head[$h][2] = 'extsites';
433 $h++;
434
435 complete_head_from_modules($conf, $langs, null, $head, $h, 'agenda_admin');
436
437 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT."/admin/agenda_extrafields.php");
438 $head[$h][1] = $langs->trans("ExtraFields");
439 $nbExtrafields = $extrafields->attributes['actioncomm']['count'];
440 if ($nbExtrafields > 0) {
441 $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbExtrafields.'</span>';
442 }
443 $head[$h][2] = 'attributes';
444 $h++;
445
446 complete_head_from_modules($conf, $langs, null, $head, $h, 'agenda_admin', 'remove');
447
448
449 return $head;
450}
451
459{
460 global $db, $langs, $conf, $user;
461
462 $h = 0;
463 $head = array();
464
465 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/comm/action/card.php', ['id'=> $object->id]);
466 $head[$h][1] = $langs->trans("CardAction");
467 $head[$h][2] = 'card';
468 $h++;
469
470 // Tab to link resources
471 if (isModEnabled('resource')) {
472 include_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php';
473 $resource = new Dolresource($db);
474
475 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/resource/element_resource.php', ['element' => 'action', 'element_id'=> $object->id]);
476 $listofresourcelinked = $resource->getElementResources($object->element, $object->id);
477 $nbResources = (is_array($listofresourcelinked) ? count($listofresourcelinked) : 0);
478 $head[$h][1] = $langs->trans("Resources");
479 if ($nbResources > 0) {
480 $head[$h][1] .= (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') ? '<span class="badge marginleftonlyshort">'.($nbResources).'</span>' : '');
481 }
482 $head[$h][2] = 'resources';
483 $h++;
484 }
485
486 // Attached files
487 require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
488 require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
489 $upload_dir = $conf->agenda->dir_output."/".$object->id;
490 $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
491 $nbLinks = Link::count($db, $object->element, $object->id);
492 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/comm/action/document.php', ['id' => $object->id]);
493 $head[$h][1] = $langs->trans("Documents");
494 if (($nbFiles + $nbLinks) > 0) {
495 $head[$h][1] .= (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') ? '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>' : '');
496 }
497 $head[$h][2] = 'documents';
498 $h++;
499
500 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/comm/action/info.php', ['id' => $object->id]);
501 $head[$h][1] = $langs->trans('Info');
502 $head[$h][2] = 'info';
503 $h++;
504
505 complete_head_from_modules($conf, $langs, $object, $head, $h, 'action');
506
507 complete_head_from_modules($conf, $langs, $object, $head, $h, 'action', 'remove');
508
509 return $head;
510}
511
512
520{
521 global $langs, $conf, $user;
522
523 $h = 0;
524 $head = array();
525 $query = [];
526 parse_str($param, $query);
527
528 $query = array_merge($query, ['mode' => 'show_list']);
529 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/comm/action/list.php', $query);
530 $head[$h][1] = $langs->trans("ViewList");
531 $head[$h][2] = 'cardlist';
532 $h++;
533
534 $query['mode'] = 'show_month';
535 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/comm/action/index.php', $query);
536 $head[$h][1] = $langs->trans("ViewCal");
537 $head[$h][2] = 'cardmonth';
538 $h++;
539
540 $query['mode'] = 'show_week';
541 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/comm/action/index.php', $query);
542 $head[$h][1] = $langs->trans("ViewWeek");
543 $head[$h][2] = 'cardweek';
544 $h++;
545
546 $query['mode'] = 'show_day';
547 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/comm/action/index.php', $query);
548 $head[$h][1] = $langs->trans("ViewDay");
549 $head[$h][2] = 'cardday';
550 $h++;
551
552 unset($query['mode']);
553 if (getDolGlobalString('AGENDA_SHOW_PERTYPE')) {
554 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/comm/action/pertype.php', $query);
555 $head[$h][1] = $langs->trans("ViewPerType");
556 $head[$h][2] = 'cardpertype';
557 $h++;
558 }
559
560 $newparam = $param;
561 $newparam = preg_replace('/&?search_filtert=\d+/', '', $newparam);
562 $query = [];
563 parse_str($newparam, $query);
564
565 $head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/comm/action/peruser.php', $query);
566 $head[$h][1] = $langs->trans("ViewPerUser");
567 $head[$h][2] = 'cardperuser';
568 $h++;
569
570
571 // Show more tabs from modules
572 // Entries must be declared in modules descriptor with line
573 // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
574 // $this->tabs = array('entity:-tabname); to remove a tab
575 complete_head_from_modules($conf, $langs, null, $head, $h, 'agenda');
576
577 complete_head_from_modules($conf, $langs, null, $head, $h, 'agenda', 'remove');
578
579 return $head;
580}
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 standard extra fields.
Class to manage building of HTML components.
Class permettant la generation de composants html autre 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...)
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)
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.