dolibarr 25.0.0-alpha
list.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
4 * Copyright (C) 2004-2023 Laurent Destailleur <eldy@users.sourceforge.net>
5 * Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
6 * Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
7 * Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 3 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <https://www.gnu.org/licenses/>.
21 */
22
29// Load Dolibarr environment
30require '../../main.inc.php';
40require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
41require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
42require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
43require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
44
45// Load translation files required by the page
46$langs->loadLangs(array("members", "companies", "banks"));
47
48$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'create'/'add', 'edit'/'update', 'view', ...
49$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
50$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ?
51$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
52$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
53$toselect = GETPOST('toselect', 'array:int'); // Array of ids of elements selected into a list
54$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search
55$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
56$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
57$mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...)
58
59$statut = (GETPOSTISSET("statut") ? GETPOST("statut", "alpha") : 1);
60$search_ref = GETPOST('search_ref', 'alpha');
61$search_id = GETPOST('search_id', 'alpha');
62$search_type = GETPOSTINT('search_type');
63$search_lastname = GETPOST('search_lastname', 'alpha');
64$search_firstname = GETPOST('search_firstname', 'alpha');
65$search_login = GETPOST('search_login', 'alpha');
66$search_note = GETPOST('search_note', 'alpha');
67$search_account = GETPOST('search_account', 'alpha');
68$search_amount = GETPOST('search_amount', 'alpha');
69$search_all = trim(GETPOST('search_all', 'alphanohtml'));
70// Start Date (Subscription Date)
71$search_dateadh_startday = GETPOSTINT('search_dateadh_startday');
72$search_dateadh_startmonth = GETPOSTINT('search_dateadh_startmonth');
73$search_dateadh_startyear = GETPOSTINT('search_dateadh_startyear');
74$search_dateadh_endday = GETPOSTINT('search_dateadh_endday');
75$search_dateadh_endmonth = GETPOSTINT('search_dateadh_endmonth');
76$search_dateadh_endyear = GETPOSTINT('search_dateadh_endyear');
77$search_dateadh_start = dol_mktime(0, 0, 0, $search_dateadh_startmonth, $search_dateadh_startday, $search_dateadh_startyear);
78$search_dateadh_end = dol_mktime(23, 59, 59, $search_dateadh_endmonth, $search_dateadh_endday, $search_dateadh_endyear);
79// End Date (Expiration Date)
80$search_datef_startday = GETPOSTINT('search_datef_startday');
81$search_datef_startmonth = GETPOSTINT('search_datef_startmonth');
82$search_datef_startyear = GETPOSTINT('search_datef_startyear');
83$search_datef_endday = GETPOSTINT('search_datef_endday');
84$search_datef_endmonth = GETPOSTINT('search_datef_endmonth');
85$search_datef_endyear = GETPOSTINT('search_datef_endyear');
86$search_datef_start = dol_mktime(0, 0, 0, $search_datef_startmonth, $search_datef_startday, $search_datef_startyear);
87$search_datef_end = dol_mktime(23, 59, 59, $search_datef_endmonth, $search_datef_endday, $search_datef_endyear);
88
89$date_select = GETPOST("date_select", 'alpha');
90
91// Load variable for pagination
92$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
93$sortfield = GETPOST('sortfield', 'aZ09comma');
94$sortorder = GETPOST('sortorder', 'aZ09comma');
95$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page");
96if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
97 // If $page is not defined, or '' or -1 or if we click on clear filters
98 $page = 0;
99}
100$offset = $limit * $page;
101$pageprev = $page - 1;
102$pagenext = $page + 1;
103if (!$sortorder) {
104 $sortorder = "DESC";
105}
106if (!$sortfield) {
107 $sortfield = "c.dateadh";
108}
109
110// Initialize a technical objects
111$object = new Subscription($db);
112$hookmanager->initHooks(array('subscriptionlist'));
113
114// Fetch optionals attributes and labels
115$extrafields->fetch_name_optionals_label($object->table_element);
116
117$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
118
119// List of fields to search into when doing a "search in all"
120$fieldstosearchall = array(
121 'c.rowid' => 'Ref',
122 'c.note' => "Label",
123);
124$arrayfields = array(
125 'c.rowid' => array('label' => 'TechnicalID', 'checked' => '-1', 'position' => 1),
126 'd.ref' => array('label' => "Ref", 'checked' => '1'),
127 'd.fk_type' => array('label' => "Type", 'checked' => '1'),
128 'd.lastname' => array('label' => "Lastname", 'checked' => '1'),
129 'd.firstname' => array('label' => "Firstname", 'checked' => '1'),
130 'd.login' => array('label' => "Login", 'checked' => '1'),
131 'c.note' => array('label' => "Label", 'checked' => '1'),
132 'd.bank' => array('label' => "BankAccount", 'checked' => '1', 'enabled' => (string) (int) (isModEnabled('bank'))),
133 /*'d.note_public'=>array('label'=>"NotePublic", 'checked'=>0),
134 'd.note_private'=>array('label'=>"NotePrivate", 'checked'=>0),*/
135 'c.dateadh' => array('label' => "DateSubscription", 'checked' => '1', 'position' => 100),
136 'c.datef' => array('label' => "EndSubscription", 'checked' => '1', 'position' => 101),
137 'd.amount' => array('label' => "Amount", 'checked' => '1', 'position' => 102),
138 'c.datec' => array('label' => "DateCreation", 'checked' => '0', 'position' => 500),
139 'c.tms' => array('label' => "DateModificationShort", 'checked' => '0', 'position' => 500),
140// 'd.statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000)
141);
142// Add hook to complete $arrayfield
143$parameters = array('arrayfields' => &$arrayfields);
144$reshook = $hookmanager->executeHooks('completeArrayFields', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
145
146// Security check
147restrictedArea($user, 'adherent', '', '', 'cotisation');
148
149$permissiontodelete = $user->hasRight('adherent', 'cotisation', 'creer');
150
151
152/*
153 * Actions
154 */
155
156if (GETPOST('cancel', 'alpha')) {
157 $action = 'list';
158 $massaction = '';
159}
160if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') {
161 $massaction = '';
162}
163
164$parameters = array('socid' => null);
165$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
166if ($reshook < 0) {
167 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
168}
169
170if (empty($reshook)) {
171 // Selection of new fields
172 include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
173
174 // Purge search criteria
175 if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers
176 $search_type = "";
177 $search_ref = "";
178 $search_id = "";
179 $search_lastname = "";
180 $search_firstname = "";
181 $search_login = "";
182 $search_note = "";
183 $search_amount = "";
184 $search_account = "";
185 $toselect = array();
186 $search_array_options = array();
187 $search_dateadh_startday = '';
188 $search_dateadh_startmonth = '';
189 $search_dateadh_startyear = '';
190 $search_dateadh_endday = '';
191 $search_dateadh_endmonth = '';
192 $search_dateadh_endyear = '';
193 $search_dateadh_start = '';
194 $search_dateadh_end = '';
195 $search_datef_startday = '';
196 $search_datef_startmonth = '';
197 $search_datef_startyear = '';
198 $search_datef_endday = '';
199 $search_datef_endmonth = '';
200 $search_datef_endyear = '';
201 $search_datef_start = '';
202 $search_datef_end = '';
203 }
204 if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')
205 || GETPOST('button_search_x', 'alpha') || GETPOST('button_search.x', 'alpha') || GETPOST('button_search', 'alpha')) {
206 $massaction = ''; // Protection to avoid mass action if we force a new search during a mass action confirmation
207 }
208
209 // Mass actions
210 $objectclass = 'Subscription';
211 $objectlabel = 'Subscription';
212 $uploaddir = $conf->member->dir_output;
213 include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
214}
215
216
217/*
218 * View
219 */
220
221$form = new Form($db);
222$subscription = new Subscription($db);
223$adherent = new Adherent($db);
224$adht = new AdherentType($db);
225$accountstatic = new Account($db);
226
227$now = dol_now();
228
229// Build and execute select
230// --------------------------------------------------------------------
231$sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe, d.photo, d.statut as status,";
232$sql .= " d.gender, d.email, d.morphy,";
233$sql .= " c.rowid as crowid, c.fk_type, c.subscription,";
234$sql .= " c.dateadh, c.datef, c.datec as date_creation, c.tms as date_modification,";
235$sql .= " c.fk_bank as bank, c.note as note_private,";
236$sql .= " b.fk_account";
237// Add fields from extrafields
238if (!empty($extrafields->attributes[$object->table_element]['label'])) {
239 foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
240 $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : "");
241 }
242}
243// Add fields from hooks
244$parameters = array();
245$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
246$sql .= $hookmanager->resPrint;
247$sql = preg_replace('/,\s*$/', '', $sql);
248
249$sqlfields = $sql; // $sql fields to remove for count total
250
251$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d";
252$sql .= " JOIN ".MAIN_DB_PREFIX."subscription as c on d.rowid = c.fk_adherent";
253$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."adherent_extrafields as ef on (d.rowid = ef.fk_object)";
254$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON c.fk_bank = b.rowid";
255$sql .= " WHERE d.entity IN (".getEntity('adherent').")";
256if (isset($date_select) && $date_select != '') {
257 $sql .= " AND c.dateadh >= '".((int) $date_select)."-01-01 00:00:00'";
258 $sql .= " AND c.dateadh < '".((int) $date_select + 1)."-01-01 00:00:00'";
259}
260if ($search_ref) {
261 if (is_numeric($search_ref)) {
262 $sql .= " AND c.rowid = ".((int) $search_ref);
263 } else {
264 $sql .= " AND 1 = 2"; // Always wrong
265 }
266}
267if ($search_id) {
268 $sql .= natural_search("c.rowid", $search_id);
269}
270if ($search_type > 0) {
271 $sql .= natural_search(array('c.fk_type'), (string) $search_type);
272}
273if ($search_lastname) {
274 $sql .= natural_search(array('d.lastname', 'd.societe'), $search_lastname);
275}
276if ($search_firstname) {
277 $sql .= natural_search(array('d.firstname'), $search_firstname);
278}
279if ($search_login) {
280 $sql .= natural_search('d.login', $search_login);
281}
282if ($search_note) {
283 $sql .= natural_search('c.note', $search_note);
284}
285if ($search_account > 0) {
286 $sql .= " AND b.fk_account = ".((int) $search_account);
287}
288if ($search_amount) {
289 $sql .= natural_search('c.subscription', $search_amount, 1);
290}
291if ($search_all) {
292 $sql .= natural_search(array_keys($fieldstosearchall), $search_all);
293}
294if ($search_dateadh_start) {
295 $sql .= " AND c.dateadh >= '".$db->idate($search_dateadh_start)."'";
296}
297if ($search_dateadh_end) {
298 $sql .= " AND c.dateadh <= '".$db->idate($search_dateadh_end)."'";
299}
300if ($search_datef_start) {
301 $sql .= " AND c.datef >= '".$db->idate($search_datef_start)."'";
302}
303if ($search_datef_end) {
304 $sql .= " AND c.datef <= '".$db->idate($search_datef_end)."'";
305}
306// Add where from extra fields
307include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
308// Add where from hooks
309$parameters = array();
310$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
311$sql .= $hookmanager->resPrint;
312
313// Count total nb of records
314$nbtotalofrecords = '';
315if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
316 /* The fast and low memory method to get and count full list converts the sql into a sql count */
317 $sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql);
318 $sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount);
319 $resql = $db->query($sqlforcount);
320 if ($resql) {
321 $objforcount = $db->fetch_object($resql);
322 $nbtotalofrecords = $objforcount->nbtotalofrecords;
323 } else {
324 dol_print_error($db);
325 }
326
327 if (($page * $limit) > (int) $nbtotalofrecords) { // if total resultset is smaller than the paging size (filtering), goto and load page 0
328 $page = 0;
329 $offset = 0;
330 }
331 $db->free($resql);
332}
333
334// Complete request and execute it with limit
335$sql .= $db->order($sortfield, $sortorder);
336if ($limit) {
337 $sql .= $db->plimit($limit + 1, $offset);
338}
339
340$resql = $db->query($sql);
341if (!$resql) {
342 dol_print_error($db);
343 exit;
344}
345
346$num = $db->num_rows($resql);
347
348
349// Direct jump if only one record found
350if ($num == 1 && getDolGlobalString('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
351 $obj = $db->fetch_object($resql);
352 $id = $obj->rowid;
353 header("Location: ".DOL_URL_ROOT.'/adherents/subscription/card.php?id='.$id);
354 exit;
355}
356
357// Output page
358// --------------------------------------------------------------------
359
360$title = $langs->trans("Subscriptions");
361if (!empty($date_select)) {
362 $title .= ' ('.$langs->trans("Year").' '.$date_select.')';
363}
364$help_url = 'EN:Module_Foundations|FR:Module_Adh&eacute;rents|ES:M&oacute;dulo_Miembros|DE:Modul_Mitglieder';
365
366llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-member page-subscription-list bodyforlist');
367
368$arrayofselected = is_array($toselect) ? $toselect : array();
369
370$param = '';
371if (!empty($mode)) {
372 $param .= '&mode='.urlencode($mode);
373}
374if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
375 $param .= '&contextpage='.urlencode($contextpage);
376}
377if ($limit > 0 && $limit != $conf->liste_limit) {
378 $param .= '&limit='.((int) $limit);
379}
380if ($statut != '') {
381 $param .= "&statut=".urlencode($statut);
382}
383if ($search_type) {
384 $param .= "&search_type=".((int) $search_type);
385}
386if ($search_id) {
387 $param .= "&search_id=".((int) $search_id);
388}
389if ($date_select) {
390 $param .= "&date_select=".urlencode($date_select);
391}
392if ($search_lastname) {
393 $param .= "&search_lastname=".urlencode($search_lastname);
394}
395if ($search_login) {
396 $param .= "&search_login=".urlencode($search_login);
397}
398if ($search_account) {
399 $param .= "&search_account=".urlencode($search_account);
400}
401if ($search_amount) {
402 $param .= "&search_amount=".urlencode($search_amount);
403}
404if ($optioncss != '') {
405 $param .= '&optioncss='.urlencode($optioncss);
406}
407// Subscription Start Date (dateadh)
408if ($search_dateadh_startday) $param .= '&search_dateadh_startday='.urlencode((string) $search_dateadh_startday);
409if ($search_dateadh_startmonth) $param .= '&search_dateadh_startmonth='.urlencode((string) $search_dateadh_startmonth);
410if ($search_dateadh_startyear) $param .= '&search_dateadh_startyear='.urlencode((string) $search_dateadh_startyear);
411
412// Subscription End Date (dateadh)
413if ($search_dateadh_endday) $param .= '&search_dateadh_endday='.urlencode((string) $search_dateadh_endday);
414if ($search_dateadh_endmonth) $param .= '&search_dateadh_endmonth='.urlencode((string) $search_dateadh_endmonth);
415if ($search_dateadh_endyear) $param .= '&search_dateadh_endyear='.urlencode((string) $search_dateadh_endyear);
416
417// End Subscription Start Date (datef)
418if ($search_datef_startday) $param .= '&search_datef_startday='.urlencode((string) $search_datef_startday);
419if ($search_datef_startmonth) $param .= '&search_datef_startmonth='.urlencode((string) $search_datef_startmonth);
420if ($search_datef_startyear) $param .= '&search_datef_startyear='.urlencode((string) $search_datef_startyear);
421
422// End Subscription End Date (datef)
423if ($search_datef_endday) $param .= '&search_datef_endday='.urlencode((string) $search_datef_endday);
424if ($search_datef_endmonth) $param .= '&search_datef_endmonth='.urlencode((string) $search_datef_endmonth);
425if ($search_datef_endyear) $param .= '&search_datef_endyear='.urlencode((string) $search_datef_endyear);
426
427// Add $param from extra fields
428include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
429// Add $param from hooks
430$parameters = array('param' => &$param);
431$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
432$param .= $hookmanager->resPrint;
433
434// List of mass actions available
435$arrayofmassactions = array(
436 //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
437 //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
438);
439if (!empty($permissiontodelete)) {
440 $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
441}
442if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete'))) {
443 $arrayofmassactions = array();
444}
445$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
446
447print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
448if ($optioncss != '') {
449 print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
450}
451print '<input type="hidden" name="token" value="'.newToken().'">';
452print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
453print '<input type="hidden" name="action" value="list">';
454print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
455print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
456print '<input type="hidden" name="page" value="'.$page.'">';
457print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
458print '<input type="hidden" name="date_select" value="'.$date_select.'">';
459print '<input type="hidden" name="page_y" value="">';
460print '<input type="hidden" name="mode" value="'.$mode.'">';
461
462$newcardbutton = '';
463$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'));
464$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'));
465$newcardbutton .= dolGetButtonTitle($langs->trans('Statistics'), '', 'fa fa-chart-bar imgforviewmode', dol_buildpath('/adherents/stats/index.php', 1).'?objecttype=adherent@adherent'.preg_replace('/(&|\?)*(mode|groupby)=[^&]+/', '', $param), '', ($mode == 'statistics' ? 2 : 1), array('morecss' => 'reposition'));
466if ($user->hasRight('adherent', 'cotisation', 'creer')) {
467 $newcardbutton .= dolGetButtonTitleSeparator();
468 $newcardbutton .= dolGetButtonTitle($langs->trans('NewSubscription'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/list.php?status=-1,1');
469}
470
471print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $subscription->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
472
473$topicmail = "Information";
474$modelmail = "subscription";
475$objecttmp = new Subscription($db);
476$trackid = 'sub'.$object->id;
477include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
478
479if ($search_all) {
480 $setupstring = '';
481 foreach ($fieldstosearchall as $key => $val) {
482 $fieldstosearchall[$key] = $langs->trans($val);
483 $setupstring .= $key."=".$val.";";
484 }
485 print '<!-- Search done like if MYOBJECT_QUICKSEARCH_ON_FIELDS = '.$setupstring.' -->'."\n";
486 print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).implode(', ', $fieldstosearchall).'</div>'."\n";
487}
488
489$moreforfilter = '';
490/*$moreforfilter.='<div class="divsearchfield">';
491 $moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escape_htmltag($search_myfield).'">';
492 $moreforfilter.= '</div>';*/
493
494$parameters = array();
495$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
496if (empty($reshook)) {
497 $moreforfilter .= $hookmanager->resPrint;
498} else {
499 $moreforfilter = $hookmanager->resPrint;
500}
501
502if (!empty($moreforfilter)) {
503 print '<div class="liste_titre liste_titre_bydiv centpercent">';
504 print $moreforfilter;
505 print '</div>';
506}
507
508$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
509$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, $conf->main_checkbox_left_column); // This also change content of $arrayfields with user setup
510$selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
511$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
512
513print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
514print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
515
516// Fields title search
517// --------------------------------------------------------------------
518print '<tr class="liste_titre_filter">';
519// Action column
520if ($conf->main_checkbox_left_column) {
521 print '<td class="liste_titre center maxwidthsearch">';
522 $searchpicto = $form->showFilterButtons('left');
523 print $searchpicto;
524 print '</td>';
525}
526// Technical ID
527if (!empty($arrayfields['c.rowid']['checked'])) {
528 print '<td class="liste_titre center">';
529 print '<input class="width50" type="text" name="search_id" value="'.dol_escape_htmltag($search_id).'">';
530 print '</td>';
531}
532
533// Ref
534if (!empty($arrayfields['d.ref']['checked'])) {
535 print '<td class="liste_titre left">';
536 print '<input class="flat maxwidth50" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'"></td>';
537}
538
539// Type
540if (!empty($arrayfields['d.fk_type']['checked'])) {
541 print '<td class="liste_titre left">';
542 print $form->selectarray("search_type", $adht->liste_array(), $search_type, 1);
543 print'</td>';
544}
545
546if (!empty($arrayfields['d.lastname']['checked'])) {
547 print '<td class="liste_titre left">';
548 print '<input class="flat maxwidth75" type="text" name="search_lastname" value="'.dol_escape_htmltag($search_lastname).'"></td>';
549}
550
551if (!empty($arrayfields['d.firstname']['checked'])) {
552 print '<td class="liste_titre left">';
553 print '<input class="flat maxwidth75" type="text" name="search_firstname" value="'.dol_escape_htmltag($search_firstname).'"></td>';
554}
555
556if (!empty($arrayfields['d.login']['checked'])) {
557 print '<td class="liste_titre left">';
558 print '<input class="flat maxwidth75" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).'"></td>';
559}
560
561if (!empty($arrayfields['c.note']['checked'])) {
562 print '<td class="liste_titre">';
563 print '<input class="flat maxwidth100" type="text" name="search_note" value="'.dol_escape_htmltag($search_note).'"></td>';
564 print '</td>';
565}
566
567if (!empty($arrayfields['d.bank']['checked'])) {
568 print '<td class="liste_titre">';
569 $form->select_comptes($search_account, 'search_account', 0, '', 1, '', 0, 'maxwidth100');
570 print '</td>';
571}
572
573if (!empty($arrayfields['c.dateadh']['checked'])) {
574 print '<td class="liste_titre center">';
575 print $form->selectDate($search_dateadh_start, 'search_dateadh_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
576 print '<br>';
577 print $form->selectDate($search_dateadh_end, 'search_dateadh_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('To'));
578 print '</td>';
579}
580
581if (!empty($arrayfields['c.datef']['checked'])) {
582 print '<td class="liste_titre center">';
583 print $form->selectDate($search_datef_start, 'search_datef_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
584 print '<br>';
585 print $form->selectDate($search_datef_end, 'search_datef_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('To'));
586 print '</td>';
587}
588
589if (!empty($arrayfields['d.amount']['checked'])) {
590 print '<td class="liste_titre right">';
591 print '<input class="flat" type="text" name="search_amount" value="'.dol_escape_htmltag($search_amount).'" size="4">';
592 print '</td>';
593}
594// Extra fields
595include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
596
597// Fields from hook
598$parameters = array('arrayfields' => $arrayfields);
599$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
600print $hookmanager->resPrint;
601// Date creation
602if (!empty($arrayfields['c.datec']['checked'])) {
603 print '<td class="liste_titre">';
604 print '</td>';
605}
606// Date modification
607if (!empty($arrayfields['c.tms']['checked'])) {
608 print '<td class="liste_titre">';
609 print '</td>';
610}
611
612// Action column
613if (!$conf->main_checkbox_left_column) {
614 print '<td class="liste_titre center maxwidthsearch">';
615 $searchpicto = $form->showFilterButtons();
616 print $searchpicto;
617 print '</td>';
618}
619print '</tr>'."\n";
620
621$totalarray = array();
622$totalarray['nbfield'] = 0;
623
624// Fields title label
625// --------------------------------------------------------------------
626print '<tr class="liste_titre">';
627// Action column
628if ($conf->main_checkbox_left_column) {
629 print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
630 $totalarray['nbfield']++;
631}
632// Technical ID
633if (!empty($arrayfields['c.rowid']['checked'])) {
634 print_liste_field_titre($arrayfields['c.rowid']['label'], $_SERVER["PHP_SELF"], 'c.rowid', '', $param, '', $sortfield, $sortorder, 'center ');
635 $totalarray['nbfield']++;
636}
637if (!empty($arrayfields['d.ref']['checked'])) {
638 print_liste_field_titre($arrayfields['d.ref']['label'], $_SERVER["PHP_SELF"], "c.rowid", "", $param, "", $sortfield, $sortorder);
639 $totalarray['nbfield']++;
640}
641if (!empty($arrayfields['d.fk_type']['checked'])) {
642 print_liste_field_titre($arrayfields['d.fk_type']['label'], $_SERVER["PHP_SELF"], "c.fk_type", "", $param, "", $sortfield, $sortorder);
643 $totalarray['nbfield']++;
644}
645if (!empty($arrayfields['d.lastname']['checked'])) {
646 print_liste_field_titre($arrayfields['d.lastname']['label'], $_SERVER["PHP_SELF"], "d.lastname", "", $param, "", $sortfield, $sortorder);
647 $totalarray['nbfield']++;
648}
649if (!empty($arrayfields['d.firstname']['checked'])) {
650 print_liste_field_titre($arrayfields['d.firstname']['label'], $_SERVER["PHP_SELF"], "d.firstname", "", $param, "", $sortfield, $sortorder);
651 $totalarray['nbfield']++;
652}
653if (!empty($arrayfields['d.login']['checked'])) {
654 print_liste_field_titre($arrayfields['d.login']['label'], $_SERVER["PHP_SELF"], "d.login", "", $param, "", $sortfield, $sortorder);
655 $totalarray['nbfield']++;
656}
657if (!empty($arrayfields['c.note']['checked'])) {
658 print_liste_field_titre($arrayfields['c.note']['label'], $_SERVER["PHP_SELF"], "c.note", "", $param, '', $sortfield, $sortorder);
659 $totalarray['nbfield']++;
660}
661if (!empty($arrayfields['d.bank']['checked'])) {
662 print_liste_field_titre($arrayfields['d.bank']['label'], $_SERVER["PHP_SELF"], "b.fk_account", "", $param, "", $sortfield, $sortorder);
663 $totalarray['nbfield']++;
664}
665if (!empty($arrayfields['c.dateadh']['checked'])) {
666 print_liste_field_titre($arrayfields['c.dateadh']['label'], $_SERVER["PHP_SELF"], "c.dateadh", "", $param, '', $sortfield, $sortorder, 'center nowraponall ');
667 $totalarray['nbfield']++;
668}
669if (!empty($arrayfields['c.datef']['checked'])) {
670 print_liste_field_titre($arrayfields['c.datef']['label'], $_SERVER["PHP_SELF"], "c.datef", "", $param, '', $sortfield, $sortorder, 'center nowraponall ');
671 $totalarray['nbfield']++;
672}
673if (!empty($arrayfields['d.amount']['checked'])) {
674 print_liste_field_titre($arrayfields['d.amount']['label'], $_SERVER["PHP_SELF"], "c.subscription", "", $param, '', $sortfield, $sortorder, 'right ');
675 $totalarray['nbfield']++;
676}
677
678// Extra fields
679include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
680
681// Hook fields
682$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => &$totalarray);
683$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
684print $hookmanager->resPrint;
685if (!empty($arrayfields['c.datec']['checked'])) {
686 print_liste_field_titre($arrayfields['c.datec']['label'], $_SERVER["PHP_SELF"], "c.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
687}
688if (!empty($arrayfields['c.tms']['checked'])) {
689 print_liste_field_titre($arrayfields['c.tms']['label'], $_SERVER["PHP_SELF"], "c.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
690}
691// Action column
692if (!$conf->main_checkbox_left_column) {
693 print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
694 $totalarray['nbfield']++;
695}
696print '</tr>'."\n";
697
698// Loop on record
699// --------------------------------------------------------------------
700$i = 0;
701$savnbfield = $totalarray['nbfield'];
702$totalarray = array();
703$totalarray['nbfield'] = 0;
704$imaxinloop = ($limit ? min($num, $limit) : $num);
705while ($i < $imaxinloop) {
706 $obj = $db->fetch_object($resql);
707 if (empty($obj)) {
708 break; // Should not happen
709 }
710
711 $subscription->ref = $obj->crowid;
712 $subscription->id = $obj->crowid;
713 $subscription->dateh = $db->jdate($obj->dateadh);
714 $subscription->datef = $db->jdate($obj->datef);
715 $subscription->amount = $obj->subscription;
716 $subscription->fk_adherent = $obj->rowid;
717
718 $adherent->lastname = $obj->lastname;
719 $adherent->firstname = $obj->firstname;
720 $adherent->company = $obj->societe;
721 $adherent->ref = $obj->rowid;
722 $adherent->id = $obj->rowid;
723 $adherent->statut = $obj->status;
724 $adherent->status = $obj->status;
725 $adherent->login = $obj->login;
726 $adherent->photo = $obj->photo;
727 $adherent->gender = $obj->gender;
728 $adherent->morphy = $obj->morphy;
729 $adherent->email = $obj->email;
730 $adherent->typeid = $obj->fk_type;
731 $adherent->datefin = $db->jdate($obj->datef);
732
733 $typeid = ($obj->fk_type > 0 ? $obj->fk_type : $adherent->typeid);
734 $adht = new AdherentType($db);
735 $adht->fetch($typeid);
736
737 $adherent->need_subscription = (int) $adht->subscription;
738
739 if ($mode == 'kanban') {
740 if ($i == 0) {
741 print '<tr class="trkanban"><td colspan="'.$savnbfield.'">';
742 print '<div class="box-flex-container kanban">';
743 }
744 // Output Kanban
745 if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
746 $selected = 0;
747 if (in_array($object->id, $arrayofselected)) {
748 $selected = 1;
749 }
750 }
751
752 //fetch information needs on this mode
753
754 if ($obj->fk_account > 0) {
755 $accountstatic->id = $obj->fk_account;
756 $accountstatic->fetch($obj->fk_account);
757 }
758 // Output Kanban
759 print $subscription->getKanbanView('', array('selected' => in_array($object->id, $arrayofselected), 'adherent_type' => $adht, 'member' => $adherent, 'bank' => ($obj->fk_account > 0 ? $accountstatic : null)));
760 if ($i == ($imaxinloop - 1)) {
761 print '</div>';
762 print '</td></tr>';
763 }
764 } else {
765 // Show here line of result
766 $j = 0;
767 print '<tr data-rowid="'.$object->id.'" class="oddeven">';
768 // Action column
769 if ($conf->main_checkbox_left_column) {
770 print '<td class="nowrap center">';
771 if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
772 $selected = 0;
773 if (in_array($obj->crowid, $arrayofselected)) {
774 $selected = 1;
775 }
776 print '<input id="cb'.$obj->crowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->crowid.'"'.($selected ? ' checked="checked"' : '').'>';
777 }
778 print '</td>';
779 if (!$i) {
780 $totalarray['nbfield']++;
781 }
782 }
783 // Technical ID
784 if (!empty($arrayfields['c.rowid']['checked'])) {
785 print '<td class="center" data-key="id">'.dolPrintHTML($obj->crowid).'</td>';
786 if (!$i) {
787 $totalarray['nbfield']++;
788 }
789 }
790 // Ref
791 if (!empty($arrayfields['d.ref']['checked'])) {
792 print '<td class="nowraponall">'.$subscription->getNomUrl(1).'</td>';
793 if (!$i) {
794 $totalarray['nbfield']++;
795 }
796 }
797 // Type
798 if (!empty($arrayfields['d.fk_type']['checked'])) {
799 print '<td class="tdoverflowmax100">';
800 if ($typeid > 0) {
801 print $adht->getNomUrl(1);
802 }
803 print '</td>';
804 if (!$i) {
805 $totalarray['nbfield']++;
806 }
807 }
808
809 // Lastname
810 if (!empty($arrayfields['d.lastname']['checked'])) {
811 print '<td class="tdoverflowmax125">'.$adherent->getNomUrl(-1, 0, 'card', 'lastname').'</td>';
812 if (!$i) {
813 $totalarray['nbfield']++;
814 }
815 }
816 // Firstname
817 if (!empty($arrayfields['d.firstname']['checked'])) {
818 print '<td class="tdoverflowmax125" title="'.dolPrintHTMLForAttribute($adherent->firstname).'">'.dolPrintHTML($adherent->firstname).'</td>';
819 if (!$i) {
820 $totalarray['nbfield']++;
821 }
822 }
823
824 // Login
825 if (!empty($arrayfields['d.login']['checked'])) {
826 print '<td class="tdoverflowmax150" title="'.dolPrintHTMLForAttribute($adherent->login).'">'.dolPrintHTML($adherent->login).'</td>';
827 if (!$i) {
828 $totalarray['nbfield']++;
829 }
830 }
831
832 // Note
833 if (!empty($arrayfields['c.note']['checked'])) {
834 print '<td class="" title="'.dolPrintHTMLForAttribute($obj->note_private).'">';
835 print '<div class="twolinesmax-normallineheight minwidth200onall">';
836 print '<span class="spantitle">';
837 print dolPrintHTML(dolGetFirstLineOfText($obj->note_private));
838 print '</span>';
839 print '</div>';
840 print '</td>';
841 if (!$i) {
842 $totalarray['nbfield']++;
843 }
844 }
845
846 // Banque
847 if (!empty($arrayfields['d.bank']['checked'])) {
848 print '<td class="tdoverflowmax100">';
849 if ($obj->fk_account > 0) {
850 $accountstatic->id = $obj->fk_account;
851 $accountstatic->fetch($obj->fk_account);
852 //$accountstatic->label=$obj->label;
853 print $accountstatic->getNomUrl(1);
854 }
855 print "</td>\n";
856 if (!$i) {
857 $totalarray['nbfield']++;
858 }
859 }
860
861 // Date start
862 if (!empty($arrayfields['c.dateadh']['checked'])) {
863 print '<td class="center nowraponall">'.dol_print_date($db->jdate($obj->dateadh), 'day')."</td>\n";
864 if (!$i) {
865 $totalarray['nbfield']++;
866 }
867 }
868 // Date end
869 if (!empty($arrayfields['c.datef']['checked'])) {
870 print '<td class="center nowraponall">'.dol_print_date($db->jdate($obj->datef), 'day')."</td>\n";
871 if (!$i) {
872 $totalarray['nbfield']++;
873 }
874 }
875 // Price
876 if (!empty($arrayfields['d.amount']['checked'])) {
877 print '<td class="right amount">'.price($obj->subscription).'</td>';
878 if (!$i) {
879 $totalarray['nbfield']++;
880 }
881 if (!$i) {
882 $totalarray['pos'][$totalarray['nbfield']] = 'd.amount';
883 }
884 if (empty($totalarray['val']['d.amount'])) {
885 $totalarray['val']['d.amount'] = $obj->subscription;
886 } else {
887 $totalarray['val']['d.amount'] += $obj->subscription;
888 }
889 }
890 // Extra fields
891 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
892 // Fields from hook
893 $parameters = array('arrayfields' => $arrayfields, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray);
894 $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
895 print $hookmanager->resPrint;
896 // Date creation
897 if (!empty($arrayfields['c.datec']['checked'])) {
898 print '<td class="nowrap center">';
899 print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
900 print '</td>';
901 if (!$i) {
902 $totalarray['nbfield']++;
903 }
904 }
905 // Date modification
906 if (!empty($arrayfields['c.tms']['checked'])) {
907 print '<td class="nowrap center">';
908 print dol_print_date($db->jdate($obj->date_modification), 'dayhour', 'tzuser');
909 print '</td>';
910 if (!$i) {
911 $totalarray['nbfield']++;
912 }
913 }
914 // Action column
915 if (!$conf->main_checkbox_left_column) {
916 print '<td class="nowrap center">';
917 if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
918 $selected = 0;
919 if (in_array($obj->crowid, $arrayofselected)) {
920 $selected = 1;
921 }
922 print '<input id="cb'.$obj->crowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->crowid.'"'.($selected ? ' checked="checked"' : '').'>';
923 }
924 print '</td>';
925 if (!$i) {
926 $totalarray['nbfield']++;
927 }
928 }
929
930 print '</tr>'."\n";
931 }
932 $i++;
933}
934
935// Show total line
936include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
937
938
939// If no record found
940if ($num == 0) {
941 $colspan = 1;
942 foreach ($arrayfields as $key => $val) {
943 if (!empty($val['checked'])) {
944 $colspan++;
945 }
946 }
947 print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
948}
949
950$db->free($resql);
951
952$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql);
953$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
954print $hookmanager->resPrint;
955
956print '</table>'."\n";
957print '</div>'."\n";
958
959print '</form>'."\n";
960
961// End of page
962llxFooter();
963$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
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 bank accounts.
Class to manage members of a foundation.
Class to manage members type.
Class to manage generation of HTML components Only common components must be here.
Class to manage subscriptions of foundation members.
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
dol_now($mode='gmt')
Return date for now.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed information (by default a local PHP server timestamp) Rep...
dolGetFirstLineOfText($text, $nboflines=1, $charset='UTF-8')
Return first line of text.
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.
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_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
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).
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
print_liste_field_titre($name, $file="", $field="", $begin="", $param="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
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.
dolGetButtonTitleSeparator($moreClass="")
Add space between dolGetButtonTitle.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $nodie=0, $mode='')
Check permissions of a user to show a page and an object.