dolibarr 19.0.3
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(array('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->hasRight('don', 'creer')) {
294 $newcardbutton .= dolGetButtonTitleSeparator();
295 $newcardbutton .= dolGetButtonTitle($langs->trans('NewDonation'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/don/card.php?action=create');
296}
297
298print_barre_liste($langs->trans("Donations"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'object_donation', 0, $newcardbutton, '', $limit, 0, 0, 1);
299
300if ($search_all) {
301 $setupstring = '';
302 foreach ($fieldstosearchall as $key => $val) {
303 $fieldstosearchall[$key] = $langs->trans($val);
304 $setupstring .= $key."=".$val.";";
305 }
306 print '<!-- Search done like if DONATION_QUICKSEARCH_ON_FIELDS = '.$setupstring.' -->'."\n";
307 print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>';
308}
309
310$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
311$selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')) : ''); // This also change content of $arrayfields
312$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
313
314print '<div class="div-table-responsive">';
315print '<table class="tagtable nobottomiftotal liste'.(!empty($moreforfilter) ? " listwithfilterbefore" : "").'">'."\n";
316
317// Fields title search
318// --------------------------------------------------------------------
319print '<tr class="liste_titre_filter">';
320// Action column
321if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
322 print '<td class="liste_titre center maxwidthsearch">';
323 $searchpicto = $form->showFilterButtons('left');
324 print $searchpicto;
325 print '</td>';
326}
327print '<td class="liste_titre">';
328print '<input class="flat" size="10" type="text" name="search_ref" value="'.$search_ref.'">';
329print '</td>';
330if (getDolGlobalString('DONATION_USE_THIRDPARTIES')) {
331 print '<td class="liste_titre">';
332 print '<input class="flat" size="10" type="text" name="search_thirdparty" value="'.$search_thirdparty.'">';
333 print '</td>';
334} else {
335 print '<td class="liste_titre">';
336 print '<input class="flat" size="10" type="text" name="search_company" value="'.$search_company.'">';
337 print '</td>';
338}
339print '<td class="liste_titre">';
340print '<input class="flat" size="10" type="text" name="search_name" value="'.$search_name.'">';
341print '</td>';
342print '<td class="liste_titre left">';
343print '&nbsp;';
344print '</td>';
345if (isModEnabled('project')) {
346 print '<td class="liste_titre right">';
347 print '&nbsp;';
348 print '</td>';
349}
350print '<td class="liste_titre right"><input name="search_amount" class="flat" type="text" size="8" value="'.$search_amount.'"></td>';
351print '<td class="liste_titre center parentonrightofpage">';
352$liststatus = array(
353 Don::STATUS_DRAFT=>$langs->trans("DonationStatusPromiseNotValidated"),
354 Don::STATUS_VALIDATED=>$langs->trans("DonationStatusPromiseValidated"),
355 Don::STATUS_PAID=>$langs->trans("DonationStatusPaid"),
356 Don::STATUS_CANCELED=>$langs->trans("Canceled")
357);
358print $form->selectarray('search_status', $liststatus, $search_status, -4, 0, 0, '', 0, 0, 0, '', 'search_status maxwidth100 onrightofpage');
359print '</td>';
360if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
361 print '<td class="liste_titre center maxwidthsearch">';
362 $searchpicto = $form->showFilterButtons();
363 print $searchpicto;
364 print '</td>';
365}
366print '</tr>'."\n";
367
368$totalarray = array();
369$totalarray['nbfield'] = 0;
370
371// Fields title label
372// --------------------------------------------------------------------
373print '<tr class="liste_titre">';
374// Action column
375if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
377 $totalarray['nbfield']++;
378}
379print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "d.rowid", "", $param, "", $sortfield, $sortorder);
380$totalarray['nbfield']++;
381if (getDolGlobalString('DONATION_USE_THIRDPARTIES')) {
382 print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "d.fk_soc", "", $param, "", $sortfield, $sortorder);
383 $totalarray['nbfield']++;
384} else {
385 print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "d.societe", "", $param, "", $sortfield, $sortorder);
386 $totalarray['nbfield']++;
387}
388print_liste_field_titre("Name", $_SERVER["PHP_SELF"], "d.lastname", "", $param, "", $sortfield, $sortorder);
389$totalarray['nbfield']++;
390print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "d.datedon", "", $param, '', $sortfield, $sortorder, 'center ');
391$totalarray['nbfield']++;
392if (isModEnabled('project')) {
393 $langs->load("projects");
394 print_liste_field_titre("Project", $_SERVER["PHP_SELF"], "d.fk_projet", "", $param, "", $sortfield, $sortorder);
395 $totalarray['nbfield']++;
396}
397print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "d.amount", "", $param, '', $sortfield, $sortorder, 'right ');
398$totalarray['nbfield']++;
399print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "d.fk_statut", "", $param, '', $sortfield, $sortorder, 'center ');
400$totalarray['nbfield']++;
401if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
403 $totalarray['nbfield']++;
404}
405print '</tr>'."\n";
406
407$i = 0;
408$savnbfield = $totalarray['nbfield'];
409$totalarray = array();
410$totalarray['nbfield'] = 0;
411$imaxinloop = ($limit ? min($num, $limit) : $num);
412while ($i < $imaxinloop) {
413 $obj = $db->fetch_object($resql);
414
415 $donationstatic->setVarsFromFetchObj($obj);
416
417 $company = new Societe($db);
418 $result = $company->fetch($obj->socid);
419
420 if ($mode == 'kanban') {
421 if ($i == 0) {
422 print '<tr class="trkanban"><td colspan="'.$savnbfield.'">';
423 print '<div class="box-flex-container kanban">';
424 }
425 // Output Kanban
426 $donationstatic->amount = $obj->amount;
427 $donationstatic->date = $obj->datedon;
428 $donationstatic->labelStatus = $obj->status;
429 $donationstatic->id = $obj->rowid;
430 $donationstatic->ref = $obj->rowid;
431
432 if (!empty($obj->socid) && $company->id > 0) {
433 $donationstatic->societe = $company->getNomUrl(1);
434 } else {
435 $donationstatic->societe = $obj->societe;
436 }
437
438 $object = $donationstatic;
439
440 $selected = -1;
441 if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
442 $selected = 0;
443 if (in_array($object->id, $arrayofselected)) {
444 $selected = 1;
445 }
446 }
447 print $donationstatic->getKanbanView('', array('selected' => $selected));
448 if ($i == ($imaxinloop - 1)) {
449 print '</div>';
450 print '</td></tr>';
451 }
452 } else {
453 print '<tr class="oddeven">';
454 if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
455 print '<td></td>';
456 }
457 $donationstatic->id = $obj->rowid;
458 $donationstatic->ref = $obj->rowid;
459 $donationstatic->lastname = $obj->lastname;
460 $donationstatic->firstname = $obj->firstname;
461 print "<td>".$donationstatic->getNomUrl(1)."</td>";
462 if (getDolGlobalString('DONATION_USE_THIRDPARTIES')) {
463 if (!empty($obj->socid) && $company->id > 0) {
464 print "<td>".$company->getNomUrl(1)."</td>";
465 } else {
466 print "<td>".$obj->societe."</td>";
467 }
468 } else {
469 print "<td>".$obj->societe."</td>";
470 }
471 print "<td>".$donationstatic->getFullName($langs)."</td>";
472 print '<td class="center">'.dol_print_date($db->jdate($obj->datedon), 'day').'</td>';
473 if (isModEnabled('project')) {
474 print "<td>";
475 if ($obj->pid) {
476 $projectstatic->id = $obj->pid;
477 $projectstatic->ref = $obj->ref;
478 $projectstatic->id = $obj->pid;
479 $projectstatic->public = $obj->public;
480 $projectstatic->title = $obj->title;
481 print $projectstatic->getNomUrl(1);
482 } else {
483 print '&nbsp;';
484 }
485 print "</td>\n";
486 }
487 print '<td class="right"><span class="amount">'.price($obj->amount).'</span></td>';
488
489 // Status
490 print '<td class="center">'.$donationstatic->LibStatut($obj->status, 5).'</td>';
491 if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
492 print '<td></td>';
493 }
494 print "</tr>";
495 }
496 $i++;
497}
498print "</table>";
499print '</div>';
500print "</form>\n";
501$db->free($resql);
502
503
504llxFooter();
505$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 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 a 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.
dolGetButtonTitleSeparator($moreClass="")
Add space between dolGetButtonTitle.
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.