dolibarr 18.0.6
list.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
5 * Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
6 * Copyright (C) 2019 Thibault FOUCART <support@ptibogxiv.net>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 */
21
28// Load Dolibarr environment
29require '../main.inc.php';
30require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
31if (isModEnabled('project')) {
32 require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
33}
34
35// Load translation files required by the page
36$langs->loadLangs(array('companies', 'donations'));
37
38$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'create'/'add', 'edit'/'update', 'view', ...
39$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
40$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'sclist';
41
42$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
43$sortfield = GETPOST('sortfield', 'aZ09comma');
44$sortorder = GETPOST('sortorder', 'aZ09comma');
45$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
46$type = GETPOST('type', 'aZ');
47$mode = GETPOST('mode', 'alpha');
48if (empty($page) || $page == -1) {
49 $page = 0;
50} // If $page is not defined, or '' or -1
51$offset = $limit * $page;
52$pageprev = $page - 1;
53$pagenext = $page + 1;
54if (!$sortorder) {
55 $sortorder = "DESC";
56}
57if (!$sortfield) {
58 $sortfield = "d.datedon";
59}
60
61$search_status = (GETPOST("search_status", 'intcomma') != '') ? GETPOST("search_status", 'intcomma') : "-4";
62$search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
63$search_ref = GETPOST('search_ref', 'alpha');
64$search_company = GETPOST('search_company', 'alpha');
65$search_thirdparty = GETPOST('search_thirdparty', 'alpha');
66$search_name = GETPOST('search_name', 'alpha');
67$search_amount = GETPOST('search_amount', 'alpha');
68$optioncss = GETPOST('optioncss', 'alpha');
69$moreforfilter = GETPOST('moreforfilter', 'alpha');
70
71if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // Both test are required to be compatible with all browsers
72 $search_all = "";
73 $search_ref = "";
74 $search_company = "";
75 $search_thirdparty = "";
76 $search_name = "";
77 $search_amount = "";
78 $search_status = '';
79}
80
81// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
82$hookmanager->initHooks(array('donationlist'));
83
84
85// List of fields to search into when doing a "search in all"
86$fieldstosearchall = array(
87 'd.rowid'=>'Id',
88 'd.ref'=>'Ref',
89 'd.lastname'=>'Lastname',
90 'd.firstname'=>'Firstname',
91);
92
93// Security check
94$result = restrictedArea($user, 'don');
95
96$permissiontoread = $user->hasRight('don', 'read');
97$permissiontoadd = $user->hasRight('don', 'write');
98$permissiontodelete = $user->hasRight('don', 'delete');
99
100
101/*
102 * Actions
103 */
104
105if (GETPOST('cancel', 'alpha')) {
106 $action = 'list';
107 $massaction = '';
108}
109if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') {
110 $massaction = '';
111}
112
113
114
115/*
116 * View
117 */
118
119$form = new Form($db);
120$donationstatic = new Don($db);
121if (isModEnabled('project')) {
122 $projectstatic = new Project($db);
123}
124
125$title = $langs->trans("Donations");
126$help_url = 'EN:Module_Donations|FR:Module_Dons|ES:M&oacute;dulo_Donaciones|DE:Modul_Spenden';
127
128
129// Build and execute select
130// --------------------------------------------------------------------
131$sql = "SELECT d.rowid, d.datedon, d.fk_soc as socid, d.firstname, d.lastname, d.societe,";
132$sql .= " d.amount, d.fk_statut as status,";
133$sql .= " p.rowid as pid, p.ref, p.title, p.public";
134
135$sqlfields = $sql; // $sql fields to remove for count total
136
137$sql .= " FROM ".MAIN_DB_PREFIX."don as d LEFT JOIN ".MAIN_DB_PREFIX."projet AS p";
138$sql .= " ON p.rowid = d.fk_projet";
139$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe AS s ON s.rowid = d.fk_soc";
140$sql .= " WHERE d.entity IN (". getEntity('donation') . ")";
141
142if ($search_status != '' && $search_status != '-4') {
143 $sql .= " AND d.fk_statut IN (".$db->sanitize($search_status).")";
144}
145if (trim($search_ref) != '') {
146 $sql .= natural_search(['d.ref', "d.rowid"], $search_ref);
147}
148if (trim($search_all) != '') {
149 $sql .= natural_search(array_keys($fieldstosearchall), $search_all);
150}
151if (trim($search_company) != '') {
152 $sql .= natural_search('d.societe', $search_company);
153}
154if (trim($search_thirdparty) != '') {
155 $sql .= natural_search("s.nom", $search_thirdparty);
156}
157if (trim($search_name) != '') {
158 $sql .= natural_search(array('d.lastname', 'd.firstname'), $search_name);
159}
160if ($search_amount) {
161 $sql .= natural_search('d.amount', $search_amount, 1);
162}
163
164// Count total nb of records
165$nbtotalofrecords = '';
166if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
167 /* The fast and low memory method to get and count full list converts the sql into a sql count */
168 $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql);
169 $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount);
170 $resql = $db->query($sqlforcount);
171 if ($resql) {
172 $objforcount = $db->fetch_object($resql);
173 $nbtotalofrecords = $objforcount->nbtotalofrecords;
174 } else {
175 dol_print_error($db);
176 }
177
178 if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller than the paging size (filtering), goto and load page 0
179 $page = 0;
180 $offset = 0;
181 }
182 $db->free($resql);
183}
184
185// Complete request and execute it with limit
186$sql .= $db->order($sortfield, $sortorder);
187if ($limit) {
188 $sql .= $db->plimit($limit + 1, $offset);
189}
190
191$resql = $db->query($sql);
192if (!$resql) {
193 dol_print_error($db);
194 exit;
195}
196
197$num = $db->num_rows($resql);
198
199// Direct jump if only one record found
200if ($num == 1 && !getDolGlobalInt('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
201 $obj = $db->fetch_object($resql);
202 $id = $obj->rowid;
203 header("Location: ".dol_buildpath('/mymodule/myobject_card.php', 1).'?id='.$id);
204 exit;
205}
206
207
208// Output page
209// --------------------------------------------------------------------
210
211llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
212
213// Example : Adding jquery code
214// print '<script type="text/javascript">
215// jQuery(document).ready(function() {
216// function init_myfunc()
217// {
218// jQuery("#myid").removeAttr(\'disabled\');
219// jQuery("#myid").attr(\'disabled\',\'disabled\');
220// }
221// init_myfunc();
222// jQuery("#mybutton").click(function() {
223// init_myfunc();
224// });
225// });
226// </script>';
227
228$arrayofselected = is_array($toselect) ? $toselect : array();
229
230$param = '';
231if (!empty($mode)) {
232 $param .= '&mode='.urlencode($mode);
233}
234if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
235 $param .= '&contextpage='.urlencode($contextpage);
236}
237if ($limit > 0 && $limit != $conf->liste_limit) {
238 $param .= '&limit='.((int) $limit);
239}
240if ($optioncss != '') {
241 $param .= '&optioncss='.urlencode($optioncss);
242}
243if ($search_status && $search_status != -1) {
244 $param .= '&search_status='.urlencode($search_status);
245}
246if ($search_ref) {
247 $param .= '&search_ref='.urlencode($search_ref);
248}
249if ($search_company) {
250 $param .= '&search_company='.urlencode($search_company);
251}
252if ($search_name) {
253 $param .= '&search_name='.urlencode($search_name);
254}
255if ($search_amount) {
256 $param .= '&search_amount='.urlencode($search_amount);
257}
258
259// List of mass actions available
260$arrayofmassactions = array(
261 //'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"),
262 //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
263 //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
264 //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
265);
266if (!empty($permissiontodelete)) {
267 $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
268}
269if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) {
270 $arrayofmassactions = array();
271}
272$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
273
274
275print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
276if ($optioncss != '') {
277 print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
278}
279print '<input type="hidden" name="token" value="'.newToken().'">';
280print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
281print '<input type="hidden" name="action" value="list">';
282print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
283print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
284print '<input type="hidden" name="page" value="'.$page.'">';
285print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
286print '<input type="hidden" name="page_y" value="">';
287print '<input type="hidden" name="mode" value="'.$mode.'">';
288print '<input type="hidden" name="type" value="'.$type.'">';
289
290$newcardbutton = '';
291$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
292$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
293if ($user->rights->don->creer) {
294 $newcardbutton .= dolGetButtonTitle($langs->trans('NewDonation'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/don/card.php?action=create');
295}
296
297print_barre_liste($langs->trans("Donations"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'object_donation', 0, $newcardbutton, '', $limit, 0, 0, 1);
298
299if ($search_all) {
300 $setupstring = '';
301 foreach ($fieldstosearchall as $key => $val) {
302 $fieldstosearchall[$key] = $langs->trans($val);
303 $setupstring .= $key."=".$val.";";
304 }
305 print '<!-- Search done like if DONATION_QUICKSEARCH_ON_FIELDS = '.$setupstring.' -->'."\n";
306 print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>';
307}
308
309$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
310$selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')) : ''); // This also change content of $arrayfields
311$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
312
313print '<div class="div-table-responsive">';
314print '<table class="tagtable nobottomiftotal liste'.(!empty($moreforfilter) ? " listwithfilterbefore" : "").'">'."\n";
315
316// Fields title search
317// --------------------------------------------------------------------
318print '<tr class="liste_titre_filter">';
319// Action column
320if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
321 print '<td class="liste_titre center maxwidthsearch">';
322 $searchpicto = $form->showFilterButtons('left');
323 print $searchpicto;
324 print '</td>';
325}
326print '<td class="liste_titre">';
327print '<input class="flat" size="10" type="text" name="search_ref" value="'.$search_ref.'">';
328print '</td>';
329if (!empty($conf->global->DONATION_USE_THIRDPARTIES)) {
330 print '<td class="liste_titre">';
331 print '<input class="flat" size="10" type="text" name="search_thirdparty" value="'.$search_thirdparty.'">';
332 print '</td>';
333} else {
334 print '<td class="liste_titre">';
335 print '<input class="flat" size="10" type="text" name="search_company" value="'.$search_company.'">';
336 print '</td>';
337}
338print '<td class="liste_titre">';
339print '<input class="flat" size="10" type="text" name="search_name" value="'.$search_name.'">';
340print '</td>';
341print '<td class="liste_titre left">';
342print '&nbsp;';
343print '</td>';
344if (isModEnabled('project')) {
345 print '<td class="liste_titre right">';
346 print '&nbsp;';
347 print '</td>';
348}
349print '<td class="liste_titre right"><input name="search_amount" class="flat" type="text" size="8" value="'.$search_amount.'"></td>';
350print '<td class="liste_titre right parentonrightofpage">';
351$liststatus = array(
352 Don::STATUS_DRAFT=>$langs->trans("DonationStatusPromiseNotValidated"),
353 Don::STATUS_VALIDATED=>$langs->trans("DonationStatusPromiseValidated"),
354 Don::STATUS_PAID=>$langs->trans("DonationStatusPaid"),
355 Don::STATUS_CANCELED=>$langs->trans("Canceled")
356);
357print $form->selectarray('search_status', $liststatus, $search_status, -4, 0, 0, '', 0, 0, 0, '', 'search_status maxwidth100 onrightofpage');
358print '</td>';
359if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
360 print '<td class="liste_titre center maxwidthsearch">';
361 $searchpicto = $form->showFilterButtons();
362 print $searchpicto;
363 print '</td>';
364}
365print '</tr>'."\n";
366
367$totalarray = array();
368$totalarray['nbfield'] = 0;
369
370// Fields title label
371// --------------------------------------------------------------------
372print '<tr class="liste_titre">';
373// Action column
374if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
376 $totalarray['nbfield']++;
377}
378print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "d.rowid", "", $param, "", $sortfield, $sortorder);
379$totalarray['nbfield']++;
380if (!empty($conf->global->DONATION_USE_THIRDPARTIES)) {
381 print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "d.fk_soc", "", $param, "", $sortfield, $sortorder);
382 $totalarray['nbfield']++;
383} else {
384 print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "d.societe", "", $param, "", $sortfield, $sortorder);
385 $totalarray['nbfield']++;
386}
387print_liste_field_titre("Name", $_SERVER["PHP_SELF"], "d.lastname", "", $param, "", $sortfield, $sortorder);
388$totalarray['nbfield']++;
389print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "d.datedon", "", $param, '', $sortfield, $sortorder, 'center ');
390$totalarray['nbfield']++;
391if (isModEnabled('project')) {
392 $langs->load("projects");
393 print_liste_field_titre("Project", $_SERVER["PHP_SELF"], "d.fk_projet", "", $param, "", $sortfield, $sortorder);
394 $totalarray['nbfield']++;
395}
396print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "d.amount", "", $param, '', $sortfield, $sortorder, 'right ');
397$totalarray['nbfield']++;
398print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "d.fk_statut", "", $param, '', $sortfield, $sortorder, 'right ');
399$totalarray['nbfield']++;
400if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
402 $totalarray['nbfield']++;
403}
404print '</tr>'."\n";
405
406$i = 0;
407$savnbfield = $totalarray['nbfield'];
408$totalarray = array();
409$totalarray['nbfield'] = 0;
410$imaxinloop = ($limit ? min($num, $limit) : $num);
411while ($i < $imaxinloop) {
412 $obj = $db->fetch_object($resql);
413
414 $donationstatic->setVarsFromFetchObj($obj);
415
416 $company = new Societe($db);
417 $result = $company->fetch($obj->socid);
418
419 if ($mode == 'kanban') {
420 if ($i == 0) {
421 print '<tr class="trkanban"><td colspan="'.$savnbfield.'">';
422 print '<div class="box-flex-container kanban">';
423 }
424 // Output Kanban
425 $donationstatic->amount = $obj->amount;
426 $donationstatic->date = $obj->datedon;
427 $donationstatic->labelStatus = $obj->status;
428 $donationstatic->id = $obj->rowid;
429 $donationstatic->ref = $obj->rowid;
430
431 if (!empty($obj->socid) && $company->id > 0) {
432 $donationstatic->societe = $company->getNomUrl(1);
433 } else {
434 $donationstatic->societe = $obj->societe;
435 }
436
437 $object = $donationstatic;
438
439 $selected = -1;
440 if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
441 $selected = 0;
442 if (in_array($object->id, $arrayofselected)) {
443 $selected = 1;
444 }
445 }
446 print $donationstatic->getKanbanView('', array('selected' => $selected));
447 if ($i == ($imaxinloop - 1)) {
448 print '</div>';
449 print '</td></tr>';
450 }
451 } else {
452 print '<tr class="oddeven">';
453 if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
454 print '<td></td>';
455 }
456 $donationstatic->id = $obj->rowid;
457 $donationstatic->ref = $obj->rowid;
458 $donationstatic->lastname = $obj->lastname;
459 $donationstatic->firstname = $obj->firstname;
460 print "<td>".$donationstatic->getNomUrl(1)."</td>";
461 if (!empty($conf->global->DONATION_USE_THIRDPARTIES)) {
462 if (!empty($obj->socid) && $company->id > 0) {
463 print "<td>".$company->getNomUrl(1)."</td>";
464 } else {
465 print "<td>".$obj->societe."</td>";
466 }
467 } else {
468 print "<td>".$obj->societe."</td>";
469 }
470 print "<td>".$donationstatic->getFullName($langs)."</td>";
471 print '<td class="center">'.dol_print_date($db->jdate($obj->datedon), 'day').'</td>';
472 if (isModEnabled('project')) {
473 print "<td>";
474 if ($obj->pid) {
475 $projectstatic->id = $obj->pid;
476 $projectstatic->ref = $obj->ref;
477 $projectstatic->id = $obj->pid;
478 $projectstatic->public = $obj->public;
479 $projectstatic->title = $obj->title;
480 print $projectstatic->getNomUrl(1);
481 } else {
482 print '&nbsp;';
483 }
484 print "</td>\n";
485 }
486 print '<td class="right"><span class="amount">'.price($obj->amount).'</span></td>';
487 print '<td class="right">'.$donationstatic->LibStatut($obj->status, 5).'</td>';
488 if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
489 print '<td></td>';
490 }
491 print "</tr>";
492 }
493 $i++;
494}
495print "</table>";
496print '</div>';
497print "</form>\n";
498$db->free($resql);
499
500
501llxFooter();
502$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:56
llxFooter()
Empty footer.
Definition wrapper.php:70
Class to manage donations.
Definition don.class.php:40
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...)
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dolGetButtonTitle($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
natural_search($fields, $value, $mode=0, $nofirstand=0)
Generate natural SQL search string for a criteria (this criteria can be tested on one or several fiel...
getDolGlobalInt($key, $default=0)
Return dolibarr global constant int value.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
print_barre_liste($titre, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $hideselectlimit=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
getEntity($element, $shared=1, $currentobject=null)
Get list of entity id to use.
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.