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