dolibarr 21.0.0-beta
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';
28require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php';
29
38// Load translation files required by the page
39$langs->loadLangs(array('bookmarks', 'admin'));
40
41// Get Parameters
42$action = GETPOST('action', 'aZ09');
43$massaction = GETPOST('massaction', 'alpha');
44$show_files = GETPOSTINT('show_files');
45$confirm = GETPOST('confirm', 'alpha');
46$cancel = GETPOST('cancel', 'alpha');
47$toselect = GETPOST('toselect', 'array');
48$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'bookmarklist'; // To manage different context of search
49$backtopage = GETPOST('backtopage', 'alpha');
50$optioncss = GETPOST('optioncss', 'alpha');
51$mode = GETPOST('mode', 'aZ');
52
53$id = GETPOSTINT("id");
54$search_title = GETPOST('search_title', 'alpha');
55
56// Load variable for pagination
57$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
58$sortfield = GETPOST('sortfield', 'aZ09comma');
59$sortorder = GETPOST('sortorder', 'aZ09comma');
60$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page");
61if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
62 // If $page is not defined, or '' or -1 or if we click on clear filters
63 $page = 0;
64}
65$offset = $limit * $page;
66$pageprev = $page - 1;
67$pagenext = $page + 1;
68if (!$sortfield) {
69 $sortfield = 'b.position';
70}
71if (!$sortorder) {
72 $sortorder = 'ASC';
73}
74
75// Initialize Objects
76$object = new Bookmark($db);
77$extrafields = new ExtraFields($db);
78$arrayfields = array();
79$hookmanager->initHooks(array('bookmarklist')); // Note that conf->hooks_modules contains array
80
81if ($id > 0) {
82 $object->fetch($id);
83}
84
85$object->fields = dol_sort_array($object->fields, 'position');
86$arrayfields = dol_sort_array($arrayfields, 'position');
87
88// Security check
89restrictedArea($user, 'bookmark', $object);
90
91// Permissions
92$permissiontoread = $user->hasRight('bookmark', 'lire');
93$permissiontoadd = $user->hasRight('bookmark', 'creer');
94$permissiontodelete = ($user->hasRight('bookmark', 'supprimer') || ($permissiontoadd && $object->fk_user == $user->id));
95
96
97/*
98 * Actions
99 */
100
101if (GETPOST('cancel', 'alpha')) {
102 $action = 'list';
103 $massaction = '';
104}
105if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') {
106 $massaction = '';
107}
108
109$parameters = array();
110$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
111if ($reshook < 0) {
112 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
113}
114
115if (empty($reshook)) {
116 // Selection of new fields
117 include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
118
119 if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')
120 || GETPOST('button_search_x', 'alpha') || GETPOST('button_search.x', 'alpha') || GETPOST('button_search', 'alpha')) {
121 $massaction = ''; // Protection to avoid mass action if we force a new search during a mass action confirmation
122 }
123
124 // Mass actions
125 $objectclass = 'Bookmark';
126 $objectlabel = 'Bookmark';
127 $uploaddir = $conf->bookmark->dir_output;
128 include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
129
130 if ($action == 'delete' && $permissiontodelete) {
131 $object->fetch($id);
132 $res = $object->delete($user);
133 if ($res > 0) {
134 header("Location: ".$_SERVER["PHP_SELF"]);
135 exit;
136 } else {
137 setEventMessages($object->error, $object->errors, 'errors');
138 $action = '';
139 }
140 }
141}
142
143
144/*
145 * View
146 */
147
148$form = new Form($db);
149
150$now = dol_now();
151
152//$help_url = "EN:Module_MyObject|FR:Module_MyObject_FR|ES:Módulo_MyObject";
153$help_url = '';
154$title = $langs->trans("Bookmarks");
155$morejs = array();
156$morecss = array();
157
158
159// Build and execute select
160// --------------------------------------------------------------------
161$sql = "SELECT b.rowid, b.dateb, b.fk_user, b.url, b.target, b.title, b.favicon, b.position,";
162$sql .= " u.login, u.lastname, u.firstname";
163// Add fields from extrafields
164if (!empty($extrafields->attributes[$object->table_element]['label'])) {
165 foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
166 $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : '');
167 }
168}
169// Add fields from hooks
170$parameters = array();
171$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook
172$sql .= $hookmanager->resPrint;
173$sql = preg_replace('/,\s*$/', '', $sql);
174
175$sqlfields = $sql; // $sql fields to remove for count total
176
177$sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as b LEFT JOIN ".MAIN_DB_PREFIX."user as u ON b.fk_user=u.rowid";
178$sql .= " WHERE 1=1";
179if ($search_title) {
180 $sql .= natural_search('title', $search_title);
181}
182$sql .= " AND b.entity IN (".getEntity('bookmark').")";
183if (!$user->admin) {
184 $sql .= " AND (b.fk_user = ".((int) $user->id)." OR b.fk_user is NULL OR b.fk_user = 0)";
185}
186
187// Count total nb of records
188$nbtotalofrecords = '';
189if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
190 /* The fast and low memory method to get and count full list converts the sql into a sql count */
191 $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql);
192 $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount);
193 $resql = $db->query($sqlforcount);
194 if ($resql) {
195 $objforcount = $db->fetch_object($resql);
196 $nbtotalofrecords = $objforcount->nbtotalofrecords;
197 } else {
198 dol_print_error($db);
199 }
200
201 if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
202 $page = 0;
203 $offset = 0;
204 }
205 $db->free($resql);
206}
207
208// Complete request and execute it with limit
209$sql .= $db->order($sortfield.", position", $sortorder);
210if ($limit) {
211 $sql .= $db->plimit($limit + 1, $offset);
212}
213
214$resql = $db->query($sql);
215if (!$resql) {
216 dol_print_error($db);
217 exit;
218}
219
220$num = $db->num_rows($resql);
221
222
223// Output page
224// --------------------------------------------------------------------
225
226llxHeader('', $title, '', '', 0, 0, '', '', '', 'bodyforlist mod-bookmarks page-list');
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}
243// Add $param from extra fields
244include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
245// Add $param from hooks
246$parameters = array('param' => &$param);
247$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook
248$param .= $hookmanager->resPrint;
249
250// List of mass actions available
251$arrayofmassactions = array(
252 //'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"),
253 //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
254 //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
255 //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
256);
257if (!empty($permissiontodelete)) {
258 $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
259}
260if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete'))) {
261 $arrayofmassactions = array();
262}
263$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
264
265print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
266if ($optioncss != '') {
267 print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
268}
269print '<input type="hidden" name="token" value="'.newToken().'">';
270print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
271print '<input type="hidden" name="action" value="list">';
272print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
273print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
274print '<input type="hidden" name="page" value="'.$page.'">';
275print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
276print '<input type="hidden" name="page_y" value="">';
277print '<input type="hidden" name="mode" value="'.$mode.'">';
278
279
280$newcardbutton = '';
281$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);
282
283print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bookmark', 0, $newcardbutton, '', $limit, 0, 0, 1);
284
285// Add code for pre mass action (confirmation or email presend form)
286$topicmail = "SendBookmarkRef";
287$modelmail = "bookmark";
288$objecttmp = new Bookmark($db);
289$trackid = 'bookmark'.$object->id;
290include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
291
292$moreforfilter = '';
293
294$parameters = array();
295$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
296if (empty($reshook)) {
297 $moreforfilter .= $hookmanager->resPrint;
298} else {
299 $moreforfilter = $hookmanager->resPrint;
300}
301
302if (!empty($moreforfilter)) {
303 print '<div class="liste_titre liste_titre_bydiv centpercent">';
304 print $moreforfilter;
305 print '</div>';
306}
307
308$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
309$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields
310$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
311
312print '<div class="div-table-responsive">';
313print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
314
315// Fields title search
316// --------------------------------------------------------------------
317// TODO
318
319$totalarray = array();
320$totalarray['nbfield'] = 0;
321
322// Fields title label
323// --------------------------------------------------------------------
324print '<tr class="liste_titre">';
325if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
326 print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
327 $totalarray['nbfield']++;
328}
329print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "b.rowid", "", $param, '', $sortfield, $sortorder);
330$totalarray['nbfield']++;
331print_liste_field_titre("Title", $_SERVER["PHP_SELF"], "b.title", "", $param, '', $sortfield, $sortorder);
332$totalarray['nbfield']++;
333print_liste_field_titre("Link", $_SERVER["PHP_SELF"], "b.url", "", $param, '', $sortfield, $sortorder);
334$totalarray['nbfield']++;
335print_liste_field_titre("Target", $_SERVER["PHP_SELF"], "b.target", "", $param, '', $sortfield, $sortorder, 'center ');
336$totalarray['nbfield']++;
337print_liste_field_titre("Visibility", $_SERVER["PHP_SELF"], "u.lastname", "", $param, '', $sortfield, $sortorder, 'center ');
338$totalarray['nbfield']++;
339print_liste_field_titre("DateCreation", $_SERVER["PHP_SELF"], "b.dateb", "", $param, '', $sortfield, $sortorder, 'center ');
340$totalarray['nbfield']++;
341print_liste_field_titre("Position", $_SERVER["PHP_SELF"], "b.position", "", $param, '', $sortfield, $sortorder, 'right ');
342$totalarray['nbfield']++;
343if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
344 print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
345 $totalarray['nbfield']++;
346}
347print '</tr>'."\n";
348
349// Loop on record
350// --------------------------------------------------------------------
351$i = 0;
352$savnbfield = $totalarray['nbfield'];
353$totalarray = array();
354$totalarray['nbfield'] = 0;
355$imaxinloop = ($limit ? min($num, $limit) : $num);
356while ($i < $imaxinloop) {
357 $obj = $db->fetch_object($resql);
358 if (empty($obj)) {
359 break; // Should not happen
360 }
361
362 $object->id = $obj->rowid;
363 $object->ref = $obj->rowid;
364
365 if ($mode == 'kanban') {
366 if ($i == 0) {
367 print '<tr><td colspan="'.$savnbfield.'">';
368 print '<div class="box-flex-container">';
369 }
370 // Output Kanban
371 $selected = -1;
372 if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
373 $selected = 0;
374 if (in_array($object->id, $arrayofselected)) {
375 $selected = 1;
376 }
377 }
378 print $object->getKanbanView('', array('selected' => $selected));
379 if ($i == ($imaxinloop - 1)) {
380 print '</div>';
381 print '</td></tr>';
382 }
383 } else {
384 // Show here line of result
385 $j = 0;
386 print '<tr data-rowid="'.$object->id.'" class="oddeven">';
387 // Action column
388 if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
389 print '<td class="nowrap center">';
390 if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
391 $selected = 0;
392 if (in_array($object->id, $arrayofselected)) {
393 $selected = 1;
394 }
395 print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
396 }
397 print '</td>';
398 if (!$i) {
399 $totalarray['nbfield']++;
400 }
401 }
402
403 // Id
404 print '<td class="nowraponall">';
405 print $object->getNomUrl(1);
406 print '</td>';
407
408 $linkintern = 1;
409 if (preg_match('/^http/i', $obj->url)) {
410 $linkintern = 0;
411 }
412 $title = $obj->title;
413 $link = $obj->url;
414 $canedit = $permissiontoadd;
415 $candelete = $permissiontodelete;
416
417 // Title
418 print '<td class="tdoverflowmax250" alt="'.dol_escape_htmltag($title).'">';
419 print dol_escape_htmltag($title);
420 print "</td>\n";
421
422 // Url
423 print '<td class="tdoverflowmax250">';
424 if (empty($linkintern)) {
425 print img_picto('', 'url', 'class="pictofixedwidth"');
426 print '<a class="" href="'.$obj->url.'"'.($obj->target ? ' target="newlink" rel="noopener"' : '').'>';
427 } else {
428 //print img_picto('', 'rightarrow', 'class="pictofixedwidth"');
429 print '<a class="" href="'.$obj->url.'">';
430 }
431 print $link;
432 print '</a>';
433 print "</td>\n";
434
435 // Target
436 print '<td class="tdoverflowmax125 center">';
437 if ($obj->target == 0) {
438 print $langs->trans("BookmarkTargetReplaceWindowShort");
439 }
440 if ($obj->target == 1) {
441 print $langs->trans("BookmarkTargetNewWindowShort");
442 }
443 print "</td>\n";
444
445 // Author
446 print '<td class="tdoverflowmax125 center">';
447 if ($obj->fk_user > 0) {
448 if (empty($conf->cache['users'][$obj->fk_user])) {
449 $tmpuser = new User($db);
450 $tmpuser->fetch($obj->fk_user);
451 $conf->cache['users'][$obj->fk_user] = $tmpuser;
452 }
453 $tmpuser = $conf->cache['users'][$obj->fk_user];
454 print $tmpuser->getNomUrl(-1);
455 } else {
456 print '<span class="opacitymedium">'.$langs->trans("Everybody").'</span>';
457 if (!$user->admin) {
458 $candelete = false;
459 $canedit = false;
460 }
461 }
462 print "</td>\n";
463
464 // Date creation
465 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>";
466
467 // Position
468 print '<td class="right">'.$obj->position."</td>";
469
470 // Action column
471 if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
472 print '<td class="nowrap center">';
473 if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
474 $selected = 0;
475 if (in_array($object->id, $arrayofselected)) {
476 $selected = 1;
477 }
478 print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
479 }
480 print '</td>';
481 if (!$i) {
482 $totalarray['nbfield']++;
483 }
484 }
485
486 print "</tr>\n";
487 }
488
489 $i++;
490}
491
492// Show total line
493include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
494
495// If no record found
496if ($num == 0) {
497 $colspan = 1;
498 foreach ($arrayfields as $key => $val) {
499 if (!empty($val['checked'])) {
500 $colspan++;
501 }
502 }
503 print '<tr><td colspan="'.$savnbfield.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
504}
505
506$db->free($resql);
507
508$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
509$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
510print $hookmanager->resPrint;
511
512print '</table>'."\n";
513print '</div>'."\n";
514
515print '</form>'."\n";
516
517
518// End of page
519llxFooter();
520$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 bookmarks.
Class to manage standard extra fields.
Class to manage generation of HTML components Only common components must be here.
Class to manage Dolibarr users.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
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)
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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...
dol_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
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).
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...
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get 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.
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.
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...
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
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.