dolibarr 24.0.0-beta
ganttview.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
5 * Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
6 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
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 */
21
28require "../main.inc.php";
29require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
30require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
31require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
32require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
33require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
34require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
35require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
36require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
46$id = GETPOST('id', 'intcomma');
47$ref = GETPOST('ref', 'alpha');
48$action = GETPOST('action', 'aZ09');
49
50$mode = GETPOST('mode', 'alpha');
51$mine = ($mode == 'mine' ? 1 : 0);
52
53$object = new Project($db);
54
55include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'
56if (getDolGlobalString('PROJECT_ALLOW_COMMENT_ON_PROJECT') && method_exists($object, 'fetchComments') && empty($object->comments)) {
57 $object->fetchComments();
58}
59
60// Security check
61$socid = 0;
62//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignment.
63$result = restrictedArea($user, 'projet', $id, 'projet&project');
64
65// Load translation files required by the page
66$langs->loadlangs(array('users', 'projects'));
67
68
69$extrafields->fetch_name_optionals_label($object->table_element);
70$object->fetch_optionals();
71
72$permissiontoadd = ($user->hasRight('projet', 'all', 'creer') || $user->hasRight('projet', 'creer'));
73$permissiontoeditextra = $permissiontoadd;
74if (GETPOST('attribute', 'aZ09') && isset($extrafields->attributes[$object->table_element]['perms'][GETPOST('attribute', 'aZ09')])) {
75 $permissiontoeditextra = dol_eval((string) $extrafields->attributes[$object->table_element]['perms'][GETPOST('attribute', 'aZ09')]);
76}
77$error = 0;
78
79/*
80 * Actions
81 */
82
83if ($action == 'update_extras' && $permissiontoeditextra) {
84 $object->oldcopy = dol_clone($object, 2);
85 $attribute_name = GETPOST('attribute', 'aZ09');
86 $ret = $extrafields->setOptionalsFromPost(null, $object, $attribute_name);
87 if ($ret < 0) {
88 $error++;
89 }
90 if (!$error) {
91 $result = $object->updateExtraField($attribute_name, 'PROJECT_MODIFY');
92 if ($result < 0) {
93 setEventMessages($object->error, $object->errors, 'errors');
94 $error++;
95 }
96 }
97 if ($error) {
98 $action = 'edit_extras';
99 }
100}
101
102
103/*
104 * View
105 */
106
107$form = new Form($db);
108$formother = new FormOther($db);
109$userstatic = new User($db);
110$companystatic = new Societe($db);
111$contactstatic = new Contact($db);
112$task = new Task($db);
113
114$arrayofcss = array('/includes/jsgantt/jsgantt.css');
115$arrayofjs = [];
116if (!empty($conf->use_javascript_ajax)) {
117 $arrayofjs = [
118 '/includes/jsgantt/jsgantt.js',
119 '/projet/jsgantt_language.js.php?lang='.$langs->defaultlang
120 ];
121}
122
123//$title=$langs->trans("Gantt").($object->ref?' - '.$object->ref.' '.$object->name:'');
124$title = $langs->trans("Gantt");
125if (getDolGlobalString('MAIN_HTML_TITLE') && preg_match('/projectnameonly/', getDolGlobalString('MAIN_HTML_TITLE')) && $object->name) {
126 $title = ($object->ref ? $object->ref.' '.$object->name.' - ' : '').$langs->trans("Gantt");
127}
128$help_url = "EN:Module_Projects|FR:Module_Projets|ES:M&oacute;dulo_Proyectos";
129
130llxHeader("", $title, $help_url, '', 0, 0, $arrayofjs, $arrayofcss, '', 'mod-project page-card_ganttview');
131
132$userWrite = 0;
133$param = '';
134
135if (($id > 0 && is_numeric($id)) || !empty($ref)) {
136 // To verify role of users
137 //$userAccess = $object->restrictedProjectArea($user,'read');
138 $userWrite = $object->restrictedProjectArea($user, 'write');
139 //$userDelete = $object->restrictedProjectArea($user,'delete');
140 //print "userAccess=".$userAccess." userWrite=".$userWrite." userDelete=".$userDelete;
141
142 $tab = 'tasks';
143
144 $head = project_prepare_head($object);
145 print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, ($object->public ? 'projectpub' : 'project'));
146
147 $param = ($mode == 'mine' ? '&mode=mine' : '');
148
149
150
151 // Project card
152
153 if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) {
154 $tmpurl = $_SESSION['pageforbacktolist']['project'];
155 $tmpurl = preg_replace('/__SOCID__/', (string) $object->socid, $tmpurl);
156 $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
157 } else {
158 $linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
159 }
160
161 $morehtmlref = '<div class="refidno">';
162 // Title
163 $morehtmlref .= $object->title;
164 // Thirdparty
165 if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) {
166 $morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1, 'project');
167 }
168 $morehtmlref .= '</div>';
169
170 // Define a complementary filter for search of next/prev ref.
171 if (!$user->hasRight('projet', 'all', 'lire')) {
172 $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
173 $object->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
174 }
175
176 dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
177
178
179 print '<div class="fichecenter">';
180 print '<div class="fichehalfleft">';
181 print '<div class="underbanner clearboth"></div>';
182
183 print '<table class="border tableforfield centpercent">';
184
185 // Usage
186 if (getDolGlobalString('PROJECT_USE_OPPORTUNITIES') || !getDolGlobalString('PROJECT_HIDE_TASKS') || isModEnabled('eventorganization')) {
187 print '<tr><td class="tdtop">';
188 print $langs->trans("Usage");
189 print '</td>';
190 print '<td>';
191 if (getDolGlobalString('PROJECT_USE_OPPORTUNITIES')) {
192 print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_opportunity ? ' checked="checked"' : '')).'"> ';
193 $htmltext = $langs->trans("ProjectFollowOpportunity");
194 print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
195 print '<br>';
196 }
197 if (!getDolGlobalString('PROJECT_HIDE_TASKS')) {
198 print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_task ? ' checked="checked"' : '')).'"> ';
199 $htmltext = $langs->trans("ProjectFollowTasks");
200 print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
201 print '<br>';
202 }
203 if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) {
204 print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_bill_time ? ' checked="checked"' : '')).'"> ';
205 $htmltext = $langs->trans("ProjectBillTimeDescription");
206 print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
207 print '<br>';
208 }
209 if (isModEnabled('eventorganization')) {
210 print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')).'"> ';
211 $htmltext = $langs->trans("EventOrganizationDescriptionLong");
212 print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
213 }
214 print '</td></tr>';
215 }
216
217 // Visibility
218 print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
219 if ($object->public) {
220 print img_picto($langs->trans('SharedProject'), 'world', 'class="paddingrightonly"');
221 print $langs->trans('SharedProject');
222 } else {
223 print img_picto($langs->trans('PrivateProject'), 'private', 'class="paddingrightonly"');
224 print $langs->trans('PrivateProject');
225 }
226 print '</td></tr>';
227
228 // Budget
229 print '<tr><td>'.$langs->trans("Budget").'</td><td>';
230 if (!is_null($object->budget_amount) && strcmp($object->budget_amount, '')) {
231 print price($object->budget_amount, 0, $langs, 1, 0, 0, $conf->currency);
232 }
233 print '</td></tr>';
234
235 // Date start - end project
236 print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
237 $start = dol_print_date($object->date_start, 'day');
238 print($start ? $start : '?');
239 $end = dol_print_date($object->date_end, 'day');
240 print ' - ';
241 print($end ? $end : '?');
242 if ($object->hasDelay()) {
243 print img_warning("Late");
244 }
245 print '</td></tr>';
246
247 // Other attributes
248 $cols = 2;
249 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
250
251 print '</table>';
252
253 print '</div>';
254 print '<div class="fichehalfright">';
255 print '<div class="underbanner clearboth"></div>';
256
257 print '<table class="border tableforfield centpercent">';
258
259 // Description
260 print '<td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>';
261 print nl2br($object->description);
262 print '</td></tr>';
263
264 // Categories
265 if (isModEnabled('category')) {
266 print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
267 print $form->showCategories($object->id, Categorie::TYPE_PROJECT, 1);
268 print "</td></tr>";
269 }
270
271 print '</table>';
272
273 print '</div>';
274 print '</div>';
275
276 print '<div class="clearboth"></div>';
277
278 print dol_get_fiche_end();
279
280 print '<br>';
281}
282
283// Link to create task
284$linktocreatetaskParam = array();
285$linktocreatetaskUserRight = false;
286if ($user->hasRight('projet', 'all', 'creer') || $user->hasRight('projet', 'creer')) {
287 if ($object->public || $userWrite > 0) {
288 $linktocreatetaskUserRight = true;
289 } else {
290 $linktocreatetaskParam['attr']['title'] = $langs->trans("NotOwnerOfProject");
291 }
292}
293
294$linktocreatetask = dolGetButtonTitle($langs->trans('AddTask'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id.'&action=create'.$param.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.$object->id), '', (int) $linktocreatetaskUserRight, $linktocreatetaskParam);
295
296$linktotasks = dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars paddingleft imgforviewmode', DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id, '', 1, array('morecss' => 'reposition'));
297$linktotasks .= dolGetButtonTitle($langs->trans('ViewGantt'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1', '', 1, array('morecss' => 'reposition marginleftonly btnTitleSelected'));
298
299//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'generic', 0, '', '', 0, 1);
300print load_fiche_titre($title, $linktotasks.' &nbsp; '.$linktocreatetask, 'projecttask');
301
302
303// Get list of tasks in tasksarray and taskarrayfiltered
304// We need all tasks (even not limited to a user because a task to user
305// can have a parent that is not affected to him).
306$tasksarray = $task->getTasksArray(null, null, ($object->id ? $object->id : $id), $socid, 0);
307// We load also tasks limited to a particular user
308//$tasksrole=($_REQUEST["mode"]=='mine' ? $task->getUserRolesForProjectsOrTasks(null, $user, $object->id, 0) : '');
309//var_dump($tasksarray);
310//var_dump($tasksrole);
311
312
313if (count($tasksarray) > 0) {
314 // Show Gant diagram from $taskarray using JSGantt
315
316 $dateformat = $langs->trans("FormatDateShortJQuery"); // Used by include ganttchart.inc.php later
317 $datehourformat = $langs->trans("FormatDateShortJQuery").' '.$langs->trans("FormatHourShortJQuery"); // Used by include ganttchart.inc.php later
318 $array_contacts = array();
319 $tasks = array();
320 $task_dependencies = array();
321 $taskcursor = 0;
322 foreach ($tasksarray as $key => $val) { // Task array are sorted by "project, position, date"
323 $task->fetch($val->id, '');
324
325 $idparent = ($val->fk_task_parent ? $val->fk_task_parent : '-'.$val->fk_project); // If start with -, id is a project id
326
327 $tasks[$taskcursor]['task_id'] = $val->id;
328 $tasks[$taskcursor]['task_alternate_id'] = ($taskcursor + 1); // An id that has same order than position (required by ganttchart)
329 $tasks[$taskcursor]['task_project_id'] = $val->fk_project;
330 $tasks[$taskcursor]['task_parent'] = $idparent;
331
332 $tasks[$taskcursor]['task_is_group'] = 0;
333 $tasks[$taskcursor]['task_css'] = 'gtaskblue';
334 $tasks[$taskcursor]['task_position'] = $val->rang;
335 $tasks[$taskcursor]['task_planned_workload'] = $val->planned_workload;
336
337 if ($val->fk_task_parent != 0 && $task->hasChildren() > 0) {
338 $tasks[$taskcursor]['task_is_group'] = 1;
339 $tasks[$taskcursor]['task_css'] = 'ggroupblack';
340 //$tasks[$taskcursor]['task_css'] = 'gtaskblue';
341 } elseif ($task->hasChildren() > 0) {
342 $tasks[$taskcursor]['task_is_group'] = 1;
343 //$tasks[$taskcursor]['task_is_group'] = 0;
344 $tasks[$taskcursor]['task_css'] = 'ggroupblack';
345 //$tasks[$taskcursor]['task_css'] = 'gtaskblue';
346 }
347 $tasks[$taskcursor]['task_milestone'] = 0;
348 $tasks[$taskcursor]['task_percent_complete'] = $val->progress;
349 //$tasks[$taskcursor]['task_name']=$task->getNomUrl(1);
350 //print dol_print_date($val->date_start).dol_print_date($val->date_end).'<br>'."\n";
351 $tasks[$taskcursor]['task_name'] = $val->ref.' - '.$val->label;
352 $tasks[$taskcursor]['task_start_date'] = $val->date_start;
353 $tasks[$taskcursor]['task_end_date'] = $val->date_end;
354 $tasks[$taskcursor]['task_color'] = 'b4d1ea';
355
356 $idofusers = $task->getListContactId('internal');
357 $idofcontacts = $task->getListContactId('external');
358 $s = '';
359 if (count($idofusers) > 0) {
360 $s .= $langs->trans("Internals").': ';
361 $i = 0;
362 foreach ($idofusers as $valid) {
363 $userstatic->fetch($valid);
364 if ($i) {
365 $s .= ', ';
366 }
367 $s .= $userstatic->login;
368 $i++;
369 }
370 }
371 //if (count($idofusers)>0 && (count($idofcontacts)>0)) $s.=' - ';
372 if (count($idofcontacts) > 0) {
373 if ($s) {
374 $s .= ' - ';
375 }
376 $s .= $langs->trans("Externals").': ';
377 $i = 0;
378 $contactidfound = array();
379 foreach ($idofcontacts as $valid) {
380 if (empty($contactidfound[$valid])) {
381 $res = $contactstatic->fetch($valid);
382 if ($res > 0) {
383 if ($i) {
384 $s .= ', ';
385 }
386 $s .= $contactstatic->getFullName($langs);
387 $contactidfound[$valid] = 1;
388 $i++;
389 }
390 }
391 }
392 }
393
394 /* For JSGanttImproved */
395 //if ($s) $tasks[$taskcursor]['task_resources']=implode(',',$idofusers);
396 $tasks[$taskcursor]['task_resources'] = $s;
397 if ($s) {
398 $tasks[$taskcursor]['task_resources'] = '<a href="'.DOL_URL_ROOT.'/projet/tasks/contact.php?id='.$val->id.'&withproject=1" title="'.dol_escape_htmltag($s).'">'.$langs->trans("Contacts").'</a>';
399 }
400 //print "xxx".$val->id.$tasks[$taskcursor]['task_resources'];
401 $tasks[$taskcursor]['note'] = $task->note_public;
402 $taskcursor++;
403 }
404
405 // Search parent to set task_parent_alternate_id (required by ganttchart)
406 foreach ($tasks as $tmpkey => $tmptask) {
407 foreach ($tasks as $tmptask2) {
408 if ($tmptask2['task_id'] == $tmptask['task_parent']) {
409 $tasks[$tmpkey]['task_parent_alternate_id'] = $tmptask2['task_alternate_id'];
410 break;
411 }
412 }
413 if (empty($tasks[$tmpkey]['task_parent_alternate_id'])) {
414 $tasks[$tmpkey]['task_parent_alternate_id'] = $tasks[$tmpkey]['task_parent'];
415 }
416 }
417
418 print "\n";
419
420 if (!empty($conf->use_javascript_ajax)) {
421 //var_dump($_SESSION);
422
423 // How the date for data are formatted (format used bu jsgantt)
424 $dateformatinput = 'yyyy-mm-dd';
425 // How the date for data are formatted (format used by dol_print_date)
426 $dateformatinput2 = 'standard';
427 //var_dump($dateformatinput);
428 //var_dump($dateformatinput2);
429
430 $moreforfilter = '<div class="liste_titre liste_titre_bydiv centpercent">';
431
432 $moreforfilter .= '<div class="divsearchfield">';
433 //$moreforfilter .= $langs->trans("TasksAssignedTo").': ';
434 //$moreforfilter .= $form->select_dolusers($tmpuser->id > 0 ? $tmpuser->id : '', 'search_user_id', 1);
435 $moreforfilter .= '&nbsp;';
436 $moreforfilter .= '</div>';
437
438 $moreforfilter .= '</div>';
439
440 print $moreforfilter;
441
442 print '<div class="div-table-responsive">';
443
444 print '<div id="tabs" class="gantt" style="width: 80vw;">'."\n";
445 include_once DOL_DOCUMENT_ROOT.'/projet/ganttchart.inc.php';
446 print '</div>'."\n";
447
448 print '</div>';
449 } else {
450 $langs->load("admin");
451 print $langs->trans("AvailableOnlyIfJavascriptAndAjaxNotDisabled");
452 }
453} else {
454 print '<div class="opacitymedium">'.$langs->trans("NoTasks").'</div>';
455}
456
457// End of page
458llxFooter();
459$db->close();
$id
Support class for third parties, contacts, members, users or resources.
Definition account.php:47
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:91
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.
Definition wrapper.php:73
Class to manage contact/addresses.
Class to manage generation of HTML components Only common components must be here.
Class to help generate other html components Only common components are here.
Class to manage projects.
Class to manage third parties objects (customers, suppliers, prospects...)
Class to manage tasks.
Class to manage Dolibarr users.
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.
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)
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
dolGetButtonTitle($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_eval($s, $returnvalue=1, $hideerrors=1, $onlysimplestring='1')
Replace eval function to add more security.
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.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_clone($srcobject, $native=2)
Create a clone of instance of object (new instance with same value for each properties) With native =...
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
project_prepare_head(Project $project, $moreparam='')
Prepare array with list of tabs.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.