dolibarr  13.0.2
contact.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2006-2015 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <https://www.gnu.org/licenses/>.
18  */
19 
26 require "../../main.inc.php";
27 require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
28 require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
29 require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
30 require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
31 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
32 
33 // Load translation files required by the page
34 $langs->loadLangs(array('projects', 'companies'));
35 
36 $id = GETPOST('id', 'int');
37 $ref = GETPOST('ref', 'alpha');
38 $action = GETPOST('action', 'aZ09');
39 $confirm = GETPOST('confirm', 'alpha');
40 $withproject = GETPOST('withproject', 'int');
41 $project_ref = GETPOST('project_ref', 'alpha');
42 
43 // Security check
44 $socid = 0;
45 //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 assignement.
46 //$result = restrictedArea($user, 'projet', $id, 'projet_task');
47 if (!$user->rights->projet->lire) accessforbidden();
48 
49 $object = new Task($db);
50 $projectstatic = new Project($db);
51 
52 
53 /*
54  * Actions
55  */
56 
57 // Add new contact
58 if ($action == 'addcontact' && $user->rights->projet->creer)
59 {
60  $source = 'internal';
61  if (GETPOST("addsourceexternal")) {
62  $source ='external';
63  }
64 
65  $result = $object->fetch($id, $ref);
66 
67  if ($result > 0 && $id > 0)
68  {
69  if ($source == 'internal') {
70  $idfortaskuser = ((GETPOST("userid") != 0 && GETPOST('userid') != -1) ? GETPOST("userid") : 0); // GETPOST('contactid') may val -1 to mean empty or -2 to means "everybody"
71  $typeid = GETPOST('type');
72  } else {
73  $idfortaskuser = ((GETPOST("contactid") > 0) ? GETPOST("contactid", 'int') : 0); // GETPOST('contactid') may val -1 to mean empty or -2 to means "everybody"
74  $typeid = GETPOST('typecontact');
75  }
76  if ($idfortaskuser == -2)
77  {
78  $result = $projectstatic->fetch($object->fk_project);
79  if ($result <= 0)
80  {
81  dol_print_error($db, $projectstatic->error, $projectstatic->errors);
82  } else {
83  $contactsofproject = $projectstatic->getListContactId('internal');
84  foreach ($contactsofproject as $key => $val)
85  {
86  $result = $object->add_contact($val, $typeid, $source);
87  }
88  }
89  } else {
90  $result = $object->add_contact($idfortaskuser, $typeid, $source);
91  }
92  }
93 
94  if ($result >= 0) {
95  header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id.($withproject ? '&withproject=1' : ''));
96  exit;
97  } else {
98  if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
99  $langs->load("errors");
100  setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors');
101  } else {
102  setEventMessages($object->error, $object->errors, 'errors');
103  }
104  }
105 }
106 
107 // bascule du statut d'un contact
108 if ($action == 'swapstatut' && $user->rights->projet->creer)
109 {
110  if ($object->fetch($id, $ref)) {
111  $result = $object->swapContactStatus(GETPOST('ligne'));
112  } else {
113  dol_print_error($db);
114  }
115 }
116 
117 // Efface un contact
118 if ($action == 'deleteline' && $user->rights->projet->creer)
119 {
120  $object->fetch($id, $ref);
121  $result = $object->delete_contact($_GET["lineid"]);
122 
123  if ($result >= 0)
124  {
125  header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id.($withproject ? '&withproject=1' : ''));
126  exit;
127  } else {
128  dol_print_error($db);
129  }
130 }
131 
132 // Retrieve First Task ID of Project if withprojet is on to allow project prev next to work
133 if (!empty($project_ref) && !empty($withproject))
134 {
135  if ($projectstatic->fetch(0, $project_ref) > 0)
136  {
137  $tasksarray = $object->getTasksArray(0, 0, $projectstatic->id, $socid, 0);
138  if (count($tasksarray) > 0)
139  {
140  $id = $tasksarray[0]->id;
141  } else {
142  header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject ? '&withproject=1' : '').(empty($mode) ? '' : '&mode='.$mode));
143  exit;
144  }
145  }
146 }
147 
148 /*
149  * View
150  */
151 
152 llxHeader('', $langs->trans("Task"));
153 
154 $form = new Form($db);
155 $formcompany = new FormCompany($db);
156 $contactstatic = new Contact($db);
157 $userstatic = new User($db);
158 
159 
160 /* *************************************************************************** */
161 /* */
162 /* Mode vue et edition */
163 /* */
164 /* *************************************************************************** */
165 
166 if ($id > 0 || !empty($ref))
167 {
168  if ($object->fetch($id, $ref) > 0)
169  {
170  if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_TASK) && method_exists($object, 'fetchComments') && empty($object->comments)) $object->fetchComments();
171  $id = $object->id; // So when doing a search from ref, id is also set correctly.
172 
173  $result = $projectstatic->fetch($object->fk_project);
174  if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic, 'fetchComments') && empty($projectstatic->comments)) $projectstatic->fetchComments();
175  if (!empty($projectstatic->socid)) $projectstatic->fetch_thirdparty();
176 
177  $object->project = clone $projectstatic;
178 
179  $userWrite = $projectstatic->restrictedProjectArea($user, 'write');
180 
181  if ($withproject)
182  {
183  // Tabs for project
184  $tab = 'tasks';
185  $head = project_prepare_head($projectstatic);
186  print dol_get_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public ? 'projectpub' : 'project'));
187 
188  $param = ($mode == 'mine' ? '&mode=mine' : '');
189 
190  // Project card
191 
192  $linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
193 
194  $morehtmlref = '<div class="refidno">';
195  // Title
196  $morehtmlref .= $projectstatic->title;
197  // Thirdparty
198  if ($projectstatic->thirdparty->id > 0)
199  {
200  $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$projectstatic->thirdparty->getNomUrl(1, 'project');
201  }
202  $morehtmlref .= '</div>';
203 
204  // Define a complementary filter for search of next/prev ref.
205  if (!$user->rights->projet->all->lire)
206  {
207  $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
208  $projectstatic->next_prev_filter = " rowid in (".(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
209  }
210 
211  dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
212 
213  print '<div class="fichecenter">';
214  print '<div class="fichehalfleft">';
215  print '<div class="underbanner clearboth"></div>';
216 
217  print '<table class="border tableforfield centpercent">';
218 
219  // Usage
220  print '<tr><td class="tdtop">';
221  print $langs->trans("Usage");
222  print '</td>';
223  print '<td>';
224  if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
225  {
226  print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> ';
227  $htmltext = $langs->trans("ProjectFollowOpportunity");
228  print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
229  print '<br>';
230  }
231  if (empty($conf->global->PROJECT_HIDE_TASKS))
232  {
233  print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> ';
234  $htmltext = $langs->trans("ProjectFollowTasks");
235  print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
236  print '<br>';
237  }
238  if (!empty($conf->global->PROJECT_BILL_TIME_SPENT))
239  {
240  print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> ';
241  $htmltext = $langs->trans("ProjectBillTimeDescription");
242  print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
243  print '<br>';
244  }
245  print '</td></tr>';
246 
247  // Visibility
248  print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
249  if ($projectstatic->public) print $langs->trans('SharedProject');
250  else print $langs->trans('PrivateProject');
251  print '</td></tr>';
252 
253  // Date start - end
254  print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
255  $start = dol_print_date($projectstatic->date_start, 'day');
256  print ($start ? $start : '?');
257  $end = dol_print_date($projectstatic->date_end, 'day');
258  print ' - ';
259  print ($end ? $end : '?');
260  if ($projectstatic->hasDelay()) print img_warning("Late");
261  print '</td></tr>';
262 
263  // Budget
264  print '<tr><td>'.$langs->trans("Budget").'</td><td>';
265  if (strcmp($projectstatic->budget_amount, '')) print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency);
266  print '</td></tr>';
267 
268  // Other attributes
269  $cols = 2;
270  //include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
271 
272  print '</table>';
273 
274  print '</div>';
275  print '<div class="fichehalfright">';
276  print '<div class="ficheaddleft">';
277  print '<div class="underbanner clearboth"></div>';
278 
279  print '<table class="border tableforfield" width="100%">';
280 
281  // Description
282  print '<td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>';
283  print nl2br($projectstatic->description);
284  print '</td></tr>';
285 
286  // Categories
287  if ($conf->categorie->enabled) {
288  print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
289  print $form->showCategories($projectstatic->id, 'project', 1);
290  print "</td></tr>";
291  }
292 
293  print '</table>';
294 
295  print '</div>';
296  print '</div>';
297  print '</div>';
298 
299  print '<div class="clearboth"></div>';
300 
302 
303  print '<br>';
304  }
305 
306 
307  // To verify role of users
308  //$userAccess = $projectstatic->restrictedProjectArea($user); // We allow task affected to user even if a not allowed project
309  //$arrayofuseridoftask=$object->getListContactId('internal');
310 
311  $head = task_prepare_head($object);
312  print dol_get_fiche_head($head, 'task_contact', $langs->trans("Task"), -1, 'projecttask', 0, '', 'reposition');
313 
314 
315  $param = (GETPOST('withproject') ? '&withproject=1' : '');
316  $linkback = GETPOST('withproject') ? '<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>' : '';
317 
318  if (!GETPOST('withproject') || empty($projectstatic->id))
319  {
320  $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
321  $object->next_prev_filter = " fk_projet in (".$projectsListId.")";
322  } else $object->next_prev_filter = " fk_projet = ".$projectstatic->id;
323 
324  $morehtmlref = '';
325 
326  // Project
327  if (empty($withproject))
328  {
329  $result = $projectstatic->fetch($object->fk_project);
330  $morehtmlref .= '<div class="refidno">';
331  $morehtmlref .= $langs->trans("Project").': ';
332  $morehtmlref .= $projectstatic->getNomUrl(1);
333  $morehtmlref .= '<br>';
334 
335  // Third party
336  $morehtmlref .= $langs->trans("ThirdParty").': ';
337  if ($projectstatic->socid > 0) {
338  $projectstatic->fetch_thirdparty();
339  $morehtmlref .= $projectstatic->thirdparty->getNomUrl(1);
340  }
341 
342  $morehtmlref .= '</div>';
343  }
344 
345  dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param, 0, '', '', 1);
346 
348 
349  /*
350  * Lines of contacts
351  */
352  /*
353  // Contacts lines (modules that overwrite templates must declare this into descriptor)
354  $dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl'));
355  foreach($dirtpls as $reldir)
356  {
357  $res=@include dol_buildpath($reldir.'/contacts.tpl.php');
358  if ($res) break;
359  }
360  */
361 
362  /*
363  * Add a new contact line
364  */
365  print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="POST">';
366  print '<input type="hidden" name="token" value="'.newToken().'">';
367  print '<input type="hidden" name="action" value="addcontact">';
368  print '<input type="hidden" name="id" value="'.$id.'">';
369  if ($withproject) print '<input type="hidden" name="withproject" value="'.$withproject.'">';
370 
371  print '<table class="noborder centpercent">';
372 
373  if ($action != 'editline' && $user->rights->projet->creer)
374  {
375  print '<tr class="liste_titre">';
376  print '<td>'.$langs->trans("NatureOfContact").'</td>';
377  print '<td>'.$langs->trans("ThirdParty").'</td>';
378  print '<td>'.$langs->trans("Users").'</td>';
379  print '<td>'.$langs->trans("ContactType").'</td>';
380  print '<td colspan="3">&nbsp;</td>';
381  print "</tr>\n";
382 
383  // Ligne ajout pour contact interne
384  print '<tr class="oddeven nohover">';
385 
386  print '<td class="nowrap">';
387  print img_object('', 'user').' '.$langs->trans("Users");
388  print '</td>';
389 
390  print '<td>';
391  print $conf->global->MAIN_INFO_SOCIETE_NOM;
392  print '</td>';
393 
394  print '<td>';
395  // On recupere les id des users deja selectionnes
396  if ($object->project->public) $contactsofproject = ''; // Everybody
397  else $contactsofproject = $projectstatic->getListContactId('internal');
398  print $form->select_dolusers((GETPOSTISSET('userid') ? GETPOST('userid', 'int') : $user->id), 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 1, $langs->trans("ResourceNotAssignedToProject"));
399  print '</td>';
400  print '<td>';
401  $formcompany->selectTypeContact($object, '', 'type', 'internal', 'rowid');
402  print '</td>';
403  print '<td class="right" colspan="3" ><input type="submit" class="button" value="'.$langs->trans("Add").'" name="addsourceinternal"></td>';
404  print '</tr>';
405 
406  // Line to add an external contact. Only if project linked to a third party.
407  if ($projectstatic->socid)
408  {
409  print '<tr class="oddeven">';
410 
411  print '<td class="nowrap">';
412  print img_object('', 'contact').' '.$langs->trans("ThirdPartyContacts");
413  print '</td>';
414 
415  print '<td>';
416  $thirdpartyofproject = $projectstatic->getListContactId('thirdparty');
417  $selectedCompany = isset($_GET["newcompany"]) ? $_GET["newcompany"] : $projectstatic->socid;
418  $selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany', $thirdpartyofproject, 0, '&withproject='.$withproject);
419  print '</td>';
420 
421  print '<td>';
422  $contactofproject = $projectstatic->getListContactId('external');
423  print $form->selectcontacts($selectedCompany, '', 'contactid', 0, '', $contactofproject, 0, '', false, 0, 0);
424  $nbofcontacts = $form->num;
425  print '</td>';
426  print '<td>';
427  $formcompany->selectTypeContact($object, '', 'typecontact', 'external', 'rowid');
428  print '</td>';
429  print '<td class="right" colspan="3" ><input type="submit" class="button" id="add-customer-contact" name="addsourceexternal" value="'.$langs->trans("Add").'"';
430  if (!$nbofcontacts) print ' disabled';
431  print '></td>';
432  print '</tr>';
433  }
434  }
435 
436  // List of contact line
437  print '<tr class="liste_titre">';
438  print '<td>'.$langs->trans("Source").'</td>';
439  print '<td>'.$langs->trans("ThirdParty").'</td>';
440  print '<td>'.$langs->trans("TaskContact").'</td>';
441  print '<td>'.$langs->trans("ContactType").'</td>';
442  print '<td class="center">'.$langs->trans("Status").'</td>';
443  print '<td colspan="2">&nbsp;</td>';
444  print "</tr>\n";
445 
446  $companystatic = new Societe($db);
447 
448  foreach (array('internal', 'external') as $source)
449  {
450  $tab = $object->liste_contact(-1, $source);
451 
452  $num = count($tab);
453 
454  $i = 0;
455  while ($i < $num)
456  {
457  print '<tr class="oddeven" valign="top">';
458 
459  // Source
460  print '<td class="left">';
461  if ($tab[$i]['source'] == 'internal') print $langs->trans("User");
462  if ($tab[$i]['source'] == 'external') print $langs->trans("ThirdPartyContact");
463  print '</td>';
464 
465  // Societe
466  print '<td class="left">';
467  if ($tab[$i]['socid'] > 0)
468  {
469  $companystatic->fetch($tab[$i]['socid']);
470  print $companystatic->getNomUrl(1);
471  }
472  if ($tab[$i]['socid'] < 0)
473  {
474  print $conf->global->MAIN_INFO_SOCIETE_NOM;
475  }
476  if (!$tab[$i]['socid'])
477  {
478  print '&nbsp;';
479  }
480  print '</td>';
481 
482  // Contact
483  print '<td>';
484  if ($tab[$i]['source'] == 'internal')
485  {
486  $userstatic->id = $tab[$i]['id'];
487  $userstatic->lastname = $tab[$i]['lastname'];
488  $userstatic->firstname = $tab[$i]['firstname'];
489  $userstatic->photo = $tab[$i]['photo'];
490  $userstatic->login = $tab[$i]['login'];
491  $userstatic->email = $tab[$i]['email'];
492  $userstatic->statut = $tab[$i]['statuscontact'];
493 
494  print $userstatic->getNomUrl(-1);
495  }
496  if ($tab[$i]['source'] == 'external')
497  {
498  $contactstatic->id = $tab[$i]['id'];
499  $contactstatic->lastname = $tab[$i]['lastname'];
500  $contactstatic->firstname = $tab[$i]['firstname'];
501  $contactstatic->email = $tab[$i]['email'];
502  $contactstatic->statut = $tab[$i]['statuscontact'];
503  print $contactstatic->getNomUrl(1);
504  }
505  print '</td>';
506 
507  // Type de contact
508  print '<td>'.$tab[$i]['libelle'].'</td>';
509 
510  // Statut
511  print '<td class="center">';
512  // Activation desativation du contact
513  if ($object->statut >= 0) print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=swapstatut&ligne='.$tab[$i]['rowid'].($withproject ? '&withproject=1' : '').'">';
514  print $contactstatic->LibStatut($tab[$i]['status'], 3);
515  if ($object->statut >= 0) print '</a>';
516  print '</td>';
517 
518  // Icon update et delete
519  print '<td class="center nowrap">';
520  if ($user->rights->projet->creer)
521  {
522  print '&nbsp;';
523  print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=deleteline&token='.newToken().'&lineid='.$tab[$i]['rowid'].($withproject ? '&withproject=1' : '').'">';
524  print img_picto($langs->trans('Unlink'), 'unlink');
525  print '</a>';
526  }
527  print '</td>';
528 
529  print "</tr>\n";
530 
531  $i++;
532  }
533  }
534  print "</table>";
535 
536  print "</form>";
537  } else {
538  print "ErrorRecordNotFound";
539  }
540 }
541 
542 if (is_object($hookmanager))
543 {
544  $hookmanager->initHooks(array('contacttpl'));
545  $parameters = array();
546  $reshook = $hookmanager->executeHooks('formContactTpl', $parameters, $object, $action);
547 }
548 
549 // End of page
550 llxFooter();
551 $db->close();
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Class to manage contact/addresses.
Class to manage Dolibarr users.
Definition: user.class.php:44
img_warning($titlealt= 'default', $moreatt= '', $morecss= 'pictowarning')
Show warning logo.
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...
llxHeader()
Empty header.
Definition: wrapper.php:45
Class to build HTML component for third parties management Only common components are here...
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
Class to manage generation of HTML components Only common components must be here.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname.
Class to manage third parties objects (customers, suppliers, prospects...)
Class to manage projects.
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it&#39;s its name (generic function)
img_object($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
print $_SERVER["PHP_SELF"]
Edit parameters.
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
project_prepare_head(Project $project)
Prepare array with list of tabs.
Definition: project.lib.php:36
print
Draft customers invoices.
Definition: index.php:89
Class to manage tasks.
Definition: task.class.php:35
dol_print_date($time, $format= '', $tzoutput= 'auto', $outputlangs= '', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
newToken()
Return the value of token currently saved into session with name &#39;newtoken&#39;.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_banner_tab($object, $paramid, $morehtml= '', $shownav=1, $fieldid= 'rowid', $fieldref= 'ref', $morehtmlref= '', $moreparam= '', $nodbprefix=0, $morehtmlleft= '', $morehtmlstatus= '', $onlybanner=0, $morehtmlright= '')
Show tab footer of a card.
llxFooter()
Empty footer.
Definition: wrapper.php:59
task_prepare_head($object)
Prepare array with list of tabs.