dolibarr 25.0.0-alpha
list.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2005-2022 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
4 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
26// Load Dolibarr environment
27require '../main.inc.php';
37require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php';
38
39// Load translation files required by the page
40$langs->loadLangs(array('other', 'admin'));
41
42// Get Parameters
43$action = GETPOST('action', 'aZ09');
44$massaction = GETPOST('massaction', 'alpha');
45$show_files = GETPOSTINT('show_files');
46$confirm = GETPOST('confirm', 'alpha');
47$cancel = GETPOST('cancel', 'alpha');
48$toselect = GETPOST('toselect', 'array:int');
49$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'bookmarklist'; // To manage different context of search
50$backtopage = GETPOST('backtopage', 'alpha');
51$optioncss = GETPOST('optioncss', 'alpha');
52$mode = GETPOST('mode', 'aZ');
53
54$id = GETPOSTINT("id");
55$search_title = GETPOST('search_title', 'alpha');
56
57// Load variable for pagination
58$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
59$sortfield = GETPOST('sortfield', 'aZ09comma');
60$sortorder = GETPOST('sortorder', 'aZ09comma');
61$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page");
62if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
63 // If $page is not defined, or '' or -1 or if we click on clear filters
64 $page = 0;
65}
66$offset = $limit * $page;
67$pageprev = $page - 1;
68$pagenext = $page + 1;
69if (!$sortfield) {
70 $sortfield = 'b.position';
71}
72if (!$sortorder) {
73 $sortorder = 'ASC';
74}
75
76// Initialize Objects
77$object = new Bookmark($db);
78
79$arrayfields = array();
80// Add hook to complete $arrayfield
81$parameters = array('arrayfields' => &$arrayfields);
82$reshook = $hookmanager->executeHooks('completeArrayFields', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
83$hookmanager->initHooks(array('bookmarklist')); // Note that conf->hooks_modules contains array
84
85if ($id > 0) {
86 $object->fetch($id);
87}
88
89$object->fields = dol_sort_array($object->fields, 'position');
90$arrayfields = dol_sort_array($arrayfields, 'position');
91
92// Security check
93restrictedArea($user, 'bookmark', $object);
94
95// Permissions
96$permissiontoread = $user->hasRight('bookmark', 'lire');
97$permissiontoadd = $user->hasRight('bookmark', 'creer');
98$permissiontodelete = ($user->hasRight('bookmark', 'supprimer') || ($permissiontoadd && $object->fk_user == $user->id));
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$parameters = array();
114$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
115if ($reshook < 0) {
116 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
117}
118
119if (empty($reshook)) {
120 // Selection of new fields
121 include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
122
123 if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')
124 || GETPOST('button_search_x', 'alpha') || GETPOST('button_search.x', 'alpha') || GETPOST('button_search', 'alpha')) {
125 $massaction = ''; // Protection to avoid mass action if we force a new search during a mass action confirmation
126 }
127
128 // Mass actions
129 $objectclass = 'Bookmark';
130 $objectlabel = 'Bookmark';
131 $uploaddir = $conf->bookmark->dir_output;
132 include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
133
134 if ($action == 'delete' && $permissiontodelete) {
135 $object->fetch($id);
136 $res = $object->delete($user);
137 if ($res > 0) {
138 header("Location: ".$_SERVER["PHP_SELF"]);
139 exit;
140 } else {
141 setEventMessages($object->error, $object->errors, 'errors');
142 $action = '';
143 }
144 }
145}
146
147
148/*
149 * View
150 */
151
152$form = new Form($db);
153
154$now = dol_now();
155
156//$help_url = "EN:Module_MyObject|FR:Module_MyObject_FR|ES:Módulo_MyObject";
157$help_url = '';
158$title = $langs->trans("Bookmarks");
159$morejs = array();
160$morecss = array();
161
162
163// Build and execute select
164// --------------------------------------------------------------------
165$sql = "SELECT b.rowid, b.dateb, b.fk_user, b.url, b.target, b.title, b.favicon, b.position,";
166$sql .= " u.login, u.lastname, u.firstname";
167// Add fields from extrafields
168if (!empty($extrafields->attributes[$object->table_element]['label'])) {
169 foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
170 $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : '');
171 }
172}
173// Add fields from hooks
174$parameters = array();
175$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook
176$sql .= $hookmanager->resPrint;
177$sql = preg_replace('/,\s*$/', '', $sql);
178
179$sqlfields = $sql; // $sql fields to remove for count total
180
181$sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as b LEFT JOIN ".MAIN_DB_PREFIX."user as u ON b.fk_user=u.rowid";
182$sql .= " WHERE 1=1";
183if ($search_title) {
184 $sql .= natural_search('title', $search_title);
185}
186$sql .= " AND b.entity IN (".getEntity('bookmark').")";
187if (!$user->admin) {
188 $sql .= " AND (b.fk_user = ".((int) $user->id)." OR b.fk_user is NULL OR b.fk_user = 0)";
189}
190
191// Count total nb of records
192$nbtotalofrecords = '';
193if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
194 /* The fast and low memory method to get and count full list converts the sql into a sql count */
195 $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql);
196 $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount);
197 $resql = $db->query($sqlforcount);
198 if ($resql) {
199 $objforcount = $db->fetch_object($resql);
200 $nbtotalofrecords = $objforcount->nbtotalofrecords;
201 } else {
203 }
204
205 if (($page * $limit) > (int) $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
206 $page = 0;
207 $offset = 0;
208 }
209 $db->free($resql);
210}
211
212// Complete request and execute it with limit
213$sql .= $db->order($sortfield.", position", $sortorder);
214if ($limit) {
215 $sql .= $db->plimit($limit + 1, $offset);
216}
217
218$resql = $db->query($sql);
219if (!$resql) {
221 exit;
222}
223
224$num = $db->num_rows($resql);
225
226
227// Output page
228// --------------------------------------------------------------------
229
230llxHeader('', $title, '', '', 0, 0, '', '', '', 'bodyforlist mod-bookmarks page-list');
231
232$arrayofselected = is_array($toselect) ? $toselect : array();
233
234$param = '';
235if (!empty($mode)) {
236 $param .= '&mode='.urlencode($mode);
237}
238if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
239 $param .= '&contextpage='.urlencode($contextpage);
240}
241if ($limit > 0 && $limit != $conf->liste_limit) {
242 $param .= '&limit='.((int) $limit);
243}
244if ($optioncss != '') {
245 $param .= '&optioncss='.urlencode($optioncss);
246}
247// Add $param from extra fields
248include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
249// Add $param from hooks
250$parameters = array('param' => &$param);
251$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook
252$param .= $hookmanager->resPrint;
253
254// List of mass actions available
255$arrayofmassactions = array(
256 //'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"),
257 //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
258 //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
259 //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
260);
261if (!empty($permissiontodelete)) {
262 $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
263}
264if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete'))) {
265 $arrayofmassactions = array();
266}
267$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
268
269print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
270if ($optioncss != '') {
271 print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
272}
273print '<input type="hidden" name="token" value="'.newToken().'">';
274print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
275print '<input type="hidden" name="action" value="list">';
276print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
277print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
278print '<input type="hidden" name="page" value="'.$page.'">';
279print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
280print '<input type="hidden" name="page_y" value="">';
281print '<input type="hidden" name="mode" value="'.$mode.'">';
282
283
284$newcardbutton = '';
285$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/bookmarks/card.php?action=create&backtopage='.urlencode(DOL_URL_ROOT.'/bookmarks/list.php'), '', $permissiontoadd);
286
287print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bookmark', 0, $newcardbutton, '', $limit, 0, 0, 1);
288
289// Add code for pre mass action (confirmation or email presend form)
290$topicmail = "SendBookmarkRef";
291$modelmail = "bookmark";
292$objecttmp = new Bookmark($db);
293$trackid = 'bookmark'.$object->id;
294include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
295
296$moreforfilter = '';
297
298$parameters = array();
299$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
300if (empty($reshook)) {
301 $moreforfilter .= $hookmanager->resPrint;
302} else {
303 $moreforfilter = $hookmanager->resPrint;
304}
305
306if (!empty($moreforfilter)) {
307 print '<div class="liste_titre liste_titre_bydiv centpercent">';
308 print $moreforfilter;
309 print '</div>';
310}
311
312$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
313$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, $conf->main_checkbox_left_column); // This also change content of $arrayfields
314$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
315
316print '<div class="div-table-responsive">';
317print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
318
319// Fields title search
320// --------------------------------------------------------------------
321// TODO
322
323$totalarray = array();
324$totalarray['nbfield'] = 0;
325
326// Fields title label
327// --------------------------------------------------------------------
328print '<tr class="liste_titre">';
329if ($conf->main_checkbox_left_column) {
330 print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
331 $totalarray['nbfield']++;
332}
333print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "b.rowid", "", $param, '', $sortfield, $sortorder);
334$totalarray['nbfield']++;
335print_liste_field_titre("Title", $_SERVER["PHP_SELF"], "b.title", "", $param, '', $sortfield, $sortorder);
336$totalarray['nbfield']++;
337print_liste_field_titre("Link", $_SERVER["PHP_SELF"], "b.url", "", $param, '', $sortfield, $sortorder);
338$totalarray['nbfield']++;
339print_liste_field_titre("Target", $_SERVER["PHP_SELF"], "b.target", "", $param, '', $sortfield, $sortorder, 'center ');
340$totalarray['nbfield']++;
341print_liste_field_titre("Visibility", $_SERVER["PHP_SELF"], "u.lastname", "", $param, '', $sortfield, $sortorder, 'center ');
342$totalarray['nbfield']++;
343print_liste_field_titre("DateCreation", $_SERVER["PHP_SELF"], "b.dateb", "", $param, '', $sortfield, $sortorder, 'center ');
344$totalarray['nbfield']++;
345print_liste_field_titre("Position", $_SERVER["PHP_SELF"], "b.position", "", $param, '', $sortfield, $sortorder, 'right ');
346$totalarray['nbfield']++;
347if (!$conf->main_checkbox_left_column) {
348 print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
349 $totalarray['nbfield']++;
350}
351print '</tr>'."\n";
352
353// Loop on record
354// --------------------------------------------------------------------
355$i = 0;
356$savnbfield = $totalarray['nbfield'];
357$totalarray = array();
358$totalarray['nbfield'] = 0;
359$imaxinloop = ($limit ? min($num, $limit) : $num);
360while ($i < $imaxinloop) {
361 $obj = $db->fetch_object($resql);
362 if (empty($obj)) {
363 break; // Should not happen
364 }
365
366 $object->id = $obj->rowid;
367 $object->ref = $obj->rowid;
368
369 if ($mode == 'kanban') {
370 if ($i == 0) {
371 print '<tr><td colspan="'.$savnbfield.'">';
372 print '<div class="box-flex-container">';
373 }
374 // Output Kanban
375 $selected = -1;
376 if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
377 $selected = 0;
378 if (in_array($object->id, $arrayofselected)) {
379 $selected = 1;
380 }
381 }
382 print $object->getKanbanView('', array('selected' => $selected));
383 if ($i == ($imaxinloop - 1)) {
384 print '</div>';
385 print '</td></tr>';
386 }
387 } else {
388 // Show here line of result
389 $j = 0;
390 print '<tr data-rowid="'.$object->id.'" class="oddeven">';
391 // Action column
392 if ($conf->main_checkbox_left_column) {
393 print '<td class="nowrap center">';
394 if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
395 $selected = 0;
396 if (in_array($object->id, $arrayofselected)) {
397 $selected = 1;
398 }
399 print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
400 }
401 print '</td>';
402 if (!$i) {
403 $totalarray['nbfield']++;
404 }
405 }
406
407 // Id
408 print '<td class="nowraponall">';
409 print $object->getNomUrl(1);
410 print '</td>';
411
412 $linkintern = 1;
413 if (preg_match('/^http/i', $obj->url)) {
414 $linkintern = 0;
415 }
416 $title = $obj->title;
417 $link = $obj->url;
418 $canedit = $permissiontoadd;
419 $candelete = $permissiontodelete;
420
421 // Title
422 print '<td class="tdoverflowmax250" alt="'.dol_escape_htmltag($title).'">';
423 print dol_escape_htmltag($title);
424 print "</td>\n";
425
426 // Url
427 print '<td class="tdoverflowmax250">';
428 if (empty($linkintern)) {
429 print img_picto('', 'url', 'class="pictofixedwidth"');
430 print '<a class="" href="'.$obj->url.'"'.($obj->target ? ' target="newlink" rel="noopener"' : '').'>';
431 } else {
432 print '<a class="" href="'.$obj->url.'">';
433 }
434 print $link;
435 print '</a>';
436 print "</td>\n";
437
438 // Target
439 print '<td class="tdoverflowmax125 center">';
440 if ($obj->target == 0) {
441 print $langs->trans("BookmarkTargetReplaceWindowShort");
442 }
443 if ($obj->target == 1) {
444 print $langs->trans("BookmarkTargetNewWindowShort");
445 }
446 print "</td>\n";
447
448 // Author
449 print '<td class="tdoverflowmax125 center">';
450 if ($obj->fk_user > 0) {
451 if (empty($conf->cache['users'][$obj->fk_user])) {
452 $tmpuser = new User($db);
453 $tmpuser->fetch($obj->fk_user);
454 $conf->cache['users'][$obj->fk_user] = $tmpuser;
455 }
456 $tmpuser = $conf->cache['users'][$obj->fk_user];
457 print $tmpuser->getNomUrl(-1);
458 } else {
459 print '<span class="opacitymedium">'.$langs->trans("Everybody").'</span>';
460 if (!$user->admin) {
461 $candelete = false;
462 $canedit = false;
463 }
464 }
465 print "</td>\n";
466
467 // Date creation
468 print '<td class="center" title="'.dol_escape_htmltag(dol_print_date($db->jdate($obj->dateb), 'dayhour')).'">'.dol_print_date($db->jdate($obj->dateb), 'day')."</td>";
469
470 // Position
471 print '<td class="right">'.$obj->position."</td>";
472
473 // Action column
474 if (!$conf->main_checkbox_left_column) {
475 print '<td class="nowrap center">';
476 if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
477 $selected = 0;
478 if (in_array($object->id, $arrayofselected)) {
479 $selected = 1;
480 }
481 print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
482 }
483 print '</td>';
484 if (!$i) {
485 $totalarray['nbfield']++;
486 }
487 }
488
489 print "</tr>\n";
490 }
491
492 $i++;
493}
494
495// Show total line
496include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
497
498// If no record found
499if ($num == 0) {
500 $colspan = 1;
501 foreach ($arrayfields as $key => $val) {
502 if (!empty($val['checked'])) {
503 $colspan++;
504 }
505 }
506 print '<tr><td colspan="'.$savnbfield.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
507}
508
509$db->free($resql);
510
511$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
512$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
513print $hookmanager->resPrint;
514
515print '</table>'."\n";
516print '</div>'."\n";
517
518print '</form>'."\n";
519
520
521// End of page
522llxFooter();
523$db->close();
$id
Support class for third parties, contacts, members, users or resources.
Definition account.php:47
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
$totalarray
Definition list.php:501
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:91
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:73
Class to manage bookmarks.
Class to manage generation of HTML components Only common components must be here.
Class to manage Dolibarr users.
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $db
API class for accounts.
dol_now($mode='gmt')
Return date for now.
natural_search($fields, $value, $mode=0, $nofirstand=0, $sqltoadd='')
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.
dol_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by the value of a given key, which produces ascending (default) or descending out...
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
print_liste_field_titre($name, $file="", $field="", $begin="", $param="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
print_barre_liste($title, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $selectlimitsuffix=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
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)
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.
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get title line of an array.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
Definition html.lib.php:172
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.