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