dolibarr 21.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-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 // Budget
259 print '<tr><td>'.$langs->trans("Budget").'</td><td>';
260 if (isset($projectstatic->budget_amount) && strcmp($projectstatic->budget_amount, '')) {
261 print price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency);
262 }
263 print '</td></tr>';
264
265 // Date start - end project
266 print '<tr><td>'.$langs->trans("Dates").'</td><td>';
267 $start = dol_print_date($projectstatic->date_start, 'day');
268 print($start ? $start : '?');
269 $end = dol_print_date($projectstatic->date_end, 'day');
270 print ' - ';
271 print($end ? $end : '?');
272 if ($projectstatic->hasDelay()) {
273 print img_warning("Late");
274 }
275 print '</td></tr>';
276
277 // Visibility
278 print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
279 if ($projectstatic->public) {
280 print img_picto($langs->trans('SharedProject'), 'world', 'class="paddingrightonly"');
281 print $langs->trans('SharedProject');
282 } else {
283 print img_picto($langs->trans('PrivateProject'), 'private', 'class="paddingrightonly"');
284 print $langs->trans('PrivateProject');
285 }
286 print '</td></tr>';
287
288 // Other attributes
289 $cols = 2;
290 $savobject = $object;
291 $object = $projectstatic;
292 include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
293 $object = $savobject;
294
295 print '</table>';
296
297 print '</div>';
298 print '<div class="fichehalfright">';
299 print '<div class="underbanner clearboth"></div>';
300
301 print '<table class="border tableforfield centpercent">';
302
303 // Categories
304 if (isModEnabled('category')) {
305 print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
306 print $form->showCategories($projectstatic->id, 'project', 1);
307 print "</td></tr>";
308 }
309
310 // Description
311 print '<tr><td class="titlefield'.($projectstatic->description ? ' noborderbottom' : '').'" colspan="2">'.$langs->trans("Description").'</td></tr>';
312 if ($projectstatic->description) {
313 print '<tr><td class="nottitleforfield" colspan="2">';
314 print '<div class="longmessagecut">';
315 print dolPrintHTML($projectstatic->description);
316 print '</div>';
317 print '</td></tr>';
318 }
319
320 print '</table>';
321
322 print '</div>';
323 print '</div>';
324
325 print '<div class="clearboth"></div>';
326
327 print dol_get_fiche_end();
328
329 print '<br>';
330 }
331
332
333 // To verify role of users
334 //$userAccess = $projectstatic->restrictedProjectArea($user); // We allow task affected to user even if a not allowed project
335 //$arrayofuseridoftask=$object->getListContactId('internal');
336
337 $head = task_prepare_head($object);
338 print dol_get_fiche_head($head, 'task_contact', $langs->trans("Task"), -1, 'projecttask', 0, '', 'reposition');
339
340
341 $param = (GETPOST('withproject') ? '&withproject=1' : '');
342 $linkback = GETPOST('withproject') ? '<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>' : '';
343
344 if (!GETPOST('withproject') || empty($projectstatic->id)) {
345 $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
346 $object->next_prev_filter = "fk_projet:IN:".$db->sanitize($projectsListId);
347 } else {
348 $object->next_prev_filter = "fk_projet:=:".((int) $projectstatic->id);
349 }
350
351 $morehtmlref = '';
352
353 // Project
354 if (empty($withproject)) {
355 $result = $projectstatic->fetch($object->fk_project);
356 $morehtmlref .= '<div class="refidno">';
357 $morehtmlref .= $langs->trans("Project").': ';
358 $morehtmlref .= $projectstatic->getNomUrl(1);
359 $morehtmlref .= '<br>';
360
361 // Third party
362 $morehtmlref .= $langs->trans("ThirdParty").': ';
363 if ($projectstatic->socid > 0) {
364 $projectstatic->fetch_thirdparty();
365 $morehtmlref .= $projectstatic->thirdparty->getNomUrl(1);
366 }
367
368 $morehtmlref .= '</div>';
369 }
370
371 dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param, 0, '', '', 1);
372
373 print dol_get_fiche_end();
374
375 /*
376 * Lines of contacts
377 */
378 /*
379 // Contacts lines (modules that overwrite templates must declare this into descriptor)
380 $dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl'));
381 foreach($dirtpls as $reldir)
382 {
383 $res=@include dol_buildpath($reldir.'/contacts.tpl.php');
384 if ($res) break;
385 }
386 */
387
388 /*
389 * Add a new contact line
390 */
391 print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="POST">';
392 print '<input type="hidden" name="token" value="'.newToken().'">';
393 print '<input type="hidden" name="action" value="addcontact">';
394 print '<input type="hidden" name="id" value="'.$id.'">';
395 if ($withproject) {
396 print '<input type="hidden" name="withproject" value="'.$withproject.'">';
397 }
398
399 print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
400 print '<table class="noborder centpercent">';
401
402 if ($action != 'editline' && $user->hasRight('projet', 'creer')) {
403 print '<tr class="liste_titre">';
404 print '<td>'.$langs->trans("NatureOfContact").'</td>';
405 print '<td>'.$langs->trans("ThirdParty").'</td>';
406 print '<td>'.$langs->trans("Users").'</td>';
407 print '<td>'.$langs->trans("ContactType").'</td>';
408 print '<td colspan="3">&nbsp;</td>';
409 print "</tr>\n";
410
411 // Ligne ajout pour contact interne
412 print '<tr class="oddeven nohover">';
413
414 print '<td class="nowrap">';
415 print img_object('', 'user').' '.$langs->trans("Users");
416 print '</td>';
417
418 print '<td>';
419 print $conf->global->MAIN_INFO_SOCIETE_NOM;
420 print '</td>';
421
422 print '<td>';
423 // On recupere les id des users deja selectionnes
424 if ($object->project->public) {
425 $contactsofproject = ''; // Everybody
426 } else {
427 $contactsofproject = $projectstatic->getListContactId('internal');
428 }
429 print $form->select_dolusers((GETPOSTISSET('userid') ? GETPOSTINT('userid') : $user->id), 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 1, $langs->trans("ResourceNotAssignedToProject"));
430 print '</td>';
431 print '<td>';
432 $formcompany->selectTypeContact($object, '', 'type', 'internal', 'position');
433 print '</td>';
434 print '<td class="right" colspan="3" ><input type="submit" class="button button-add small" value="'.$langs->trans("Add").'" name="addsourceinternal"></td>';
435 print '</tr>';
436
437 // Line to add an external contact. Only if project linked to a third party.
438 if ($projectstatic->socid) {
439 print '<tr class="oddeven">';
440
441 print '<td class="nowrap">';
442 print img_object('', 'contact').' '.$langs->trans("ThirdPartyContacts");
443 print '</td>';
444
445 print '<td>';
446 $thirdpartyofproject = $projectstatic->getListContactId('thirdparty');
447 $selectedCompany = GETPOSTISSET("newcompany") ? GETPOST("newcompany") : $projectstatic->socid;
448 $selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany', $thirdpartyofproject, 0, '&withproject='.$withproject);
449 print '</td>';
450
451 print '<td>';
452 $contactofproject = $projectstatic->getListContactId('external');
453 //print $form->selectcontacts($selectedCompany, '', 'contactid', 0, '', $contactofproject, 0, '', false, 0, 0);
454 print $form->select_contact($selectedCompany, '', 'contactid', 0, '', $contactofproject, 0, 'maxwidth300 widthcentpercentminusx', true);
455 $nbofcontacts = $form->num;
456 print '</td>';
457 print '<td>';
458 $formcompany->selectTypeContact($object, '', 'typecontact', 'external', 'position');
459 print '</td>';
460 print '<td class="right" colspan="3" ><input type="submit" class="button button-add small" id="add-customer-contact" name="addsourceexternal" value="'.$langs->trans("Add").'"';
461 if (!$nbofcontacts) {
462 print ' disabled';
463 }
464 print '></td>';
465 print '</tr>';
466 }
467 }
468
469 // List of contact line
470 print '<tr class="liste_titre">';
471 print '<td>'.$langs->trans("Source").'</td>';
472 print '<td>'.$langs->trans("ThirdParty").'</td>';
473 print '<td>'.$langs->trans("TaskContact").'</td>';
474 print '<td>'.$langs->trans("ContactType").'</td>';
475 print '<td class="center">'.$langs->trans("Status").'</td>';
476 print '<td colspan="2">&nbsp;</td>';
477 print "</tr>\n";
478
479 $companystatic = new Societe($db);
480
481 foreach (array('internal', 'external') as $source) {
482 $tab = $object->liste_contact(-1, $source);
483
484 $num = count($tab);
485
486 $i = 0;
487 while ($i < $num) {
488 print '<tr class="oddeven" valign="top">';
489
490 // Source
491 print '<td class="left">';
492 if ($tab[$i]['source'] == 'internal') {
493 print $langs->trans("User");
494 }
495 if ($tab[$i]['source'] == 'external') {
496 print $langs->trans("ThirdPartyContact");
497 }
498 print '</td>';
499
500 // Societe
501 print '<td class="left">';
502 if ($tab[$i]['socid'] > 0) {
503 $companystatic->fetch($tab[$i]['socid']);
504 print $companystatic->getNomUrl(1);
505 }
506 if ($tab[$i]['socid'] < 0) {
507 print $conf->global->MAIN_INFO_SOCIETE_NOM;
508 }
509 if (!$tab[$i]['socid']) {
510 print '&nbsp;';
511 }
512 print '</td>';
513
514 // Contact
515 print '<td>';
516 if ($tab[$i]['source'] == 'internal') {
517 $userstatic->id = $tab[$i]['id'];
518 $userstatic->lastname = $tab[$i]['lastname'];
519 $userstatic->firstname = $tab[$i]['firstname'];
520 $userstatic->photo = $tab[$i]['photo'];
521 $userstatic->login = $tab[$i]['login'];
522 $userstatic->email = $tab[$i]['email'];
523 $userstatic->gender = $tab[$i]['gender'];
524 $userstatic->status = $tab[$i]['statuscontact'];
525
526 print $userstatic->getNomUrl(-1);
527 }
528 if ($tab[$i]['source'] == 'external') {
529 $contactstatic->id = $tab[$i]['id'];
530 $contactstatic->lastname = $tab[$i]['lastname'];
531 $contactstatic->firstname = $tab[$i]['firstname'];
532 $contactstatic->email = $tab[$i]['email'];
533 $contactstatic->statut = $tab[$i]['statuscontact'];
534 print $contactstatic->getNomUrl(1);
535 }
536 print '</td>';
537
538 // Type de contact
539 print '<td>'.$tab[$i]['libelle'].'</td>';
540
541 // Statut
542 print '<td class="center">';
543 // Activation desativation du contact
544 if ($object->status >= 0) {
545 print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=swapstatut&ligne='.$tab[$i]['rowid'].($withproject ? '&withproject=1' : '').'">';
546 }
547 print $contactstatic->LibStatut($tab[$i]['status'], 3);
548 if ($object->status >= 0) {
549 print '</a>';
550 }
551 print '</td>';
552
553 // Icon update et delete
554 print '<td class="center nowrap">';
555 if ($user->hasRight('projet', 'creer')) {
556 print '&nbsp;';
557 print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=deleteline&token='.newToken().'&lineid='.$tab[$i]['rowid'].($withproject ? '&withproject=1' : '').'">';
558 print img_picto($langs->trans('Unlink'), 'unlink');
559 print '</a>';
560 }
561 print '</td>';
562
563 print "</tr>\n";
564
565 $i++;
566 }
567 }
568 print "</table>";
569 print '</div>';
570
571 print "</form>";
572 } else {
573 print "ErrorRecordNotFound";
574 }
575}
576
577if (is_object($hookmanager)) {
578 $hookmanager->initHooks(array('contacttpl'));
579 $parameters = array();
580 $reshook = $hookmanager->executeHooks('formContactTpl', $parameters, $object, $action);
581}
582
583// End of page
584llxFooter();
585$db->close();
$id
Definition account.php:48
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:66
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:87
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.
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.
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.
dolPrintHTML($s, $allowiframe=0)
Return a string (that can be on several lines) ready to be output on a HTML page.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $allowothertags=array())
Show a picto called object_picto (generic function)
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.