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