dolibarr  16.0.5
partnership_list.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
3  * Copyright (C) 2021 NextGestion <contact@nextgestion.com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <https://www.gnu.org/licenses/>.
17  */
18 
25 // Load Dolibarr environment
26 require '../main.inc.php';
27 
28 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
29 require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
30 require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
31 require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
32 require_once DOL_DOCUMENT_ROOT.'/partnership/class/partnership.class.php';
33 
34 // for other modules
35 //dol_include_once('/othermodule/class/otherobject.class.php');
36 
37 // Load translation files required by the page
38 $langs->loadLangs(array("partnership", "members", "other"));
39 
40 $action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
41 $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
42 $show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ?
43 $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
44 $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
45 $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
46 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search
47 $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
48 $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
49 $mode = GETPOST('mode', 'aZ');
50 
51 $id = GETPOST('id', 'int');
52 
53 // Load variable for pagination
54 $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
55 $sortfield = GETPOST('sortfield', 'aZ09comma');
56 $sortorder = GETPOST('sortorder', 'aZ09comma');
57 $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
58 if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
59  // If $page is not defined, or '' or -1 or if we click on clear filters
60  $page = 0;
61 }
62 $offset = $limit * $page;
63 $pageprev = $page - 1;
64 $pagenext = $page + 1;
65 
66 // Initialize technical objects
67 $object = new Partnership($db);
68 $extrafields = new ExtraFields($db);
69 $adherent = new Adherent($db);
70 $diroutputmassaction = $conf->partnership->dir_output.'/temp/massgeneration/'.$user->id;
71 $hookmanager->initHooks(array('partnershiplist')); // Note that conf->hooks_modules contains array
72 
73 // Fetch optionals attributes and labels
74 $extrafields->fetch_name_optionals_label($object->table_element);
75 //$extrafields->fetch_name_optionals_label($object->table_element_line);
76 
77 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
78 
79 $managedfor = getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR', 'thirdparty');
80 
81 if ($managedfor != 'member' && $sortfield == 'd.datefin') $sortfield = '';
82 
83 // Default sort order (if not yet defined by previous GETPOST)
84 if (!$sortfield) {
85  reset($object->fields); // Reset is required to avoid key() to return null.
86  $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition.
87 }
88 if (!$sortorder) {
89  $sortorder = "ASC";
90 }
91 
92 // Initialize array of search criterias
93 $search_all = GETPOST('search_all', 'alphanohtml');
94 $search = array();
95 foreach ($object->fields as $key => $val) {
96  if (GETPOST('search_'.$key, 'alpha') !== '') {
97  $search[$key] = GETPOST('search_'.$key, 'alpha');
98  }
99  if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
100  $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int'));
101  $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_'.$key.'_dtendmonth', 'int'), GETPOST('search_'.$key.'_dtendday', 'int'), GETPOST('search_'.$key.'_dtendyear', 'int'));
102  }
103 }
104 $search_filter = GETPOST("search_filter", 'alpha');
105 $filter = GETPOST("filter", 'alpha');
106 if ($filter) {
107  $search_filter = $filter; // For backward compatibility
108 }
109 
110 // List of fields to search into when doing a "search in all"
111 $fieldstosearchall = array();
112 foreach ($object->fields as $key => $val) {
113  if (!empty($val['searchall'])) {
114  $fieldstosearchall['t.'.$key] = $val['label'];
115  }
116 }
117 
118 // Definition of array of fields for columns
119 $arrayfields = array();
120 foreach ($object->fields as $key => $val) {
121  // If $val['visible']==0, then we never show the field
122  if (!empty($val['visible'])) {
123  $visible = (int) dol_eval($val['visible'], 1);
124  $arrayfields['t.'.$key] = array(
125  'label'=>$val['label'],
126  'checked'=>(($visible < 0) ? 0 : 1),
127  'enabled'=>(abs($visible) != 3 && dol_eval($val['enabled'], 1)),
128  'position'=>$val['position'],
129  'help'=> isset($val['help']) ? $val['help'] : ''
130  );
131  }
132 }
133 // Extra fields
134 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
135 
136 $object->fields = dol_sort_array($object->fields, 'position');
137 $arrayfields = dol_sort_array($arrayfields, 'position');
138 
139 $permissiontoread = $user->rights->partnership->read;
140 $permissiontoadd = $user->rights->partnership->write;
141 $permissiontodelete = $user->rights->partnership->delete;
142 
143 // Security check
144 if (empty($conf->partnership->enabled)) {
145  accessforbidden('Module not enabled');
146 }
147 $socid = 0;
148 if ($user->socid > 0) { // Protection if external user
149  //$socid = $user->socid;
150  accessforbidden();
151 }
152 //$result = restrictedArea($user, 'partnership');
153 //if (!$permissiontoread) accessforbidden();
154 
155 $error = 0;
156 
157 
158 /*
159  * Actions
160  */
161 
162 if (GETPOST('cancel', 'alpha')) {
163  $action = 'list';
164  $massaction = '';
165 }
166 if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') {
167  $massaction = '';
168 }
169 
170 $parameters = array();
171 $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
172 if ($reshook < 0) {
173  setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
174 }
175 
176 if (empty($reshook)) {
177  // Selection of new fields
178  include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
179 
180  // Purge search criteria
181  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
182  foreach ($object->fields as $key => $val) {
183  $search[$key] = '';
184  if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
185  $search[$key.'_dtstart'] = '';
186  $search[$key.'_dtend'] = '';
187  }
188  }
189  $toselect = array();
190  $search_array_options = array();
191  }
192  if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')
193  || GETPOST('button_search_x', 'alpha') || GETPOST('button_search.x', 'alpha') || GETPOST('button_search', 'alpha')) {
194  $massaction = ''; // Protection to avoid mass action if we force a new search during a mass action confirmation
195  }
196 
197  // Mass actions
198  $objectclass = 'Partnership';
199  $objectlabel = 'Partnership';
200  $uploaddir = $conf->partnership->dir_output;
201  include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
202 
203  // Validate and approve
204  if (!$error && $massaction == 'approve' && $permissiontoadd) {
205  $objecttmp = new Partnership($db);
206 
207  $db->begin();
208  $error = 0;
209  $result = 0;
210 
211  foreach ($toselect as $checked) {
212  if ($objecttmp->fetch($checked)) {
213  if ($objecttmp->status == $objecttmp::STATUS_DRAFT) {
214  //$objecttmp->date = dol_now();
215  $result = $objecttmp->validate($user);
216  }
217 
218  if ($result >= 0 && $objecttmp->status == $objecttmp::STATUS_VALIDATED) {
219  $result = $objecttmp->approve($user);
220  if ($result > 0) {
221  setEventMessages($langs->trans("PartnershipRefApproved", $objecttmp->ref), null);
222  } else {
223  setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
224  $error++;
225  }
226  } else {
227  setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
228  $error++;
229  }
230  }
231  }
232 
233  if (!$error) {
234  $db->commit();
235  } else {
236  $db->rollback();
237  }
238  }
239 
240  // Cancel partnership
241  if ($massaction == 'cancel' && $permissiontoadd) {
242  $db->begin();
243 
244  $objecttmp = new $objectclass($db);
245  $nbok = 0;
246  foreach ($toselect as $toselectid) {
247  $result = $objecttmp->fetch($toselectid);
248  if ($result > 0) {
249  $result = $objecttmp->cancel($user, 0);
250  if ($result == 0) {
251  setEventMessages($langs->trans('StatusOfRefMustBe', $objecttmp->ref, $objecttmp->LibStatut($objecttmp::STATUS_APPROVED)), null, 'warnings');
252  $error++;
253  } elseif ($result <= 0) {
254  setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
255  $error++;
256  break;
257  } else {
258  $nbok++;
259  }
260  } else {
261  setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
262  $error++;
263  break;
264  }
265  }
266 
267  if (!$error) {
268  setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs');
269  $db->commit();
270  } else {
271  $db->rollback();
272  }
273  }
274 }
275 
276 
277 
278 /*
279  * View
280  */
281 
282 $form = new Form($db);
283 
284 $now = dol_now();
285 
286 //$help_url="EN:Module_Partnership|FR:Module_Partnership_FR|ES:Módulo_Partnership";
287 $help_url = '';
288 $title = $langs->trans("Partnerships");
289 $morejs = array();
290 $morecss = array();
291 
292 
293 // Build and execute select
294 // --------------------------------------------------------------------
295 $sql = 'SELECT ';
296 $sql .= $object->getFieldList('t');
297 if ($managedfor == 'member') {
298  $sql .= ', d.datefin, d.fk_adherent_type, dty.subscription';
299 }
300 // Add fields from extrafields
301 if (!empty($extrafields->attributes[$object->table_element]['label'])) {
302  foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
303  $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : '');
304  }
305 }
306 // Add fields from hooks
307 $parameters = array();
308 $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook
309 $sql .= preg_replace('/^,/', '', $hookmanager->resPrint);
310 $sql = preg_replace('/,\s*$/', '', $sql);
311 $sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t";
312 if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
313  $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)";
314 }
315 if ($managedfor == 'member') {
316  $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."adherent as d on (d.rowid = t.fk_member)";
317  $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."adherent_type as dty on (dty.rowid = d.fk_adherent_type)";
318 }
319 // Add table from hooks
320 $parameters = array();
321 $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook
322 $sql .= $hookmanager->resPrint;
323 if ($object->ismultientitymanaged == 1) {
324  $sql .= " WHERE t.entity IN (".getEntity($object->element).")";
325 } else {
326  $sql .= " WHERE 1 = 1";
327 }
328 if ($managedfor == 'member')
329  $sql .= " AND fk_member > 0";
330 else $sql .= " AND fk_soc > 0";
331 foreach ($search as $key => $val) {
332  if (array_key_exists($key, $object->fields)) {
333  if ($key == 'status' && $search[$key] == -1) {
334  continue;
335  }
336  $mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0);
337  if ((strpos($object->fields[$key]['type'], 'integer:') === 0) || (strpos($object->fields[$key]['type'], 'sellist:') === 0) || !empty($object->fields[$key]['arrayofkeyval'])) {
338  if ($search[$key] == '-1' || ($search[$key] === '0' && (empty($object->fields[$key]['arrayofkeyval']) || !array_key_exists('0', $object->fields[$key]['arrayofkeyval'])))) {
339  $search[$key] = '';
340  }
341  $mode_search = 2;
342  }
343  if ($search[$key] != '') {
344  $sql .= natural_search("t.".$db->escape($key), $search[$key], (($key == 'status') ? 2 : $mode_search));
345  }
346  } else {
347  if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') {
348  $columnName = preg_replace('/(_dtstart|_dtend)$/', '', $key);
349  if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) {
350  if (preg_match('/_dtstart$/', $key)) {
351  $sql .= " AND t.".$db->escape($columnName)." >= '".$db->idate($search[$key])."'";
352  }
353  if (preg_match('/_dtend$/', $key)) {
354  $sql .= " AND t.".$db->escape($columnName)." <= '".$db->idate($search[$key])."'";
355  }
356  }
357  }
358  }
359 }
360 if ($managedfor == 'member') {
361  if ($search_filter == 'withoutsubscription') {
362  $sql .= " AND (d.datefin IS NULL)";
363  }
364  if ($search_filter == 'uptodate') {
365  $sql .= " AND (d.datefin >= '".$db->idate($now)."' OR dty.subscription = 0)";
366  }
367  if ($search_filter == 'outofdate') {
368  $sql .= " AND (d.datefin < '".$db->idate($now)."' AND dty.subscription = 1)";
369  }
370 }
371 if ($search_all) {
372  $sql .= natural_search(array_keys($fieldstosearchall), $search_all);
373 }
374 //$sql.= dolSqlDateFilter("t.field", $search_xxxday, $search_xxxmonth, $search_xxxyear);
375 // Add where from extra fields
376 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
377 // Add where from hooks
378 $parameters = array();
379 $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook
380 $sql .= $hookmanager->resPrint;
381 
382 /* If a group by is required
383 $sql.= " GROUP BY ";
384 foreach($object->fields as $key => $val) {
385  $sql .= "t.".$db->escape($key).", ";
386 }
387 // Add fields from extrafields
388 if (! empty($extrafields->attributes[$object->table_element]['label'])) {
389  foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
390  $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : '');
391  }
392 }
393 // Add where from hooks
394 $parameters=array();
395 $reshook=$hookmanager->executeHooks('printFieldListGroupBy',$parameters, $object); // Note that $action and $object may have been modified by hook
396 $sql.=$hookmanager->resPrint;
397 $sql=preg_replace('/,\s*$/','', $sql);
398 */
399 
400 // Count total nb of records
401 $nbtotalofrecords = '';
402 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
403  /* The fast and low memory method to get and count full list converts the sql into a sql count */
404  $sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/', 'SELECT COUNT(*) as nbtotalofrecords FROM', $sql);
405  $resql = $db->query($sqlforcount);
406  if ($resql) {
407  $objforcount = $db->fetch_object($resql);
408  $nbtotalofrecords = $objforcount->nbtotalofrecords;
409  } else {
410  dol_print_error($db);
411  }
412 
413  if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0
414  $page = 0;
415  $offset = 0;
416  }
417  $db->free($resql);
418 }
419 
420 // Complete request and execute it with limit
421 $sql .= $db->order($sortfield, $sortorder);
422 if ($limit) {
423  $sql .= $db->plimit($limit + 1, $offset);
424 }
425 
426 $resql = $db->query($sql);
427 if (!$resql) {
428  dol_print_error($db);
429  exit;
430 }
431 
432 $num = $db->num_rows($resql);
433 
434 
435 // Direct jump if only one record found
436 if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) {
437  $obj = $db->fetch_object($resql);
438  $id = $obj->rowid;
439  header("Location: ".dol_buildpath('/partnership/partnership_card.php', 1).'?id='.$id);
440  exit;
441 }
442 
443 
444 // Output page
445 // --------------------------------------------------------------------
446 
447 llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'classforhorizontalscrolloftabs');
448 
449 
450 $arrayofselected = is_array($toselect) ? $toselect : array();
451 
452 $param = '';
453 if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
454  $param .= '&contextpage='.urlencode($contextpage);
455 }
456 if ($limit > 0 && $limit != $conf->liste_limit) {
457  $param .= '&limit='.urlencode($limit);
458 }
459 foreach ($search as $key => $val) {
460  if (is_array($search[$key]) && count($search[$key])) {
461  foreach ($search[$key] as $skey) {
462  if ($skey != '') {
463  $param .= '&search_'.$key.'[]='.urlencode($skey);
464  }
465  }
466  } elseif ($search[$key] != '') {
467  $param .= '&search_'.$key.'='.urlencode($search[$key]);
468  }
469 }
470 if ($optioncss != '') {
471  $param .= '&optioncss='.urlencode($optioncss);
472 }
473 if ($search_filter && $search_filter != '-1') {
474  $param .= "&search_filter=".urlencode($search_filter);
475 }
476 // Add $param from extra fields
477 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
478 // Add $param from hooks
479 $parameters = array();
480 $reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook
481 $param .= $hookmanager->resPrint;
482 
483 // List of mass actions available
484 $arrayofmassactions = array(
485  //'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"),
486  'approve'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("ValidateAndApprove"),
487  'cancel'=>img_picto('', 'close_title', 'class="pictofixedwidth"').$langs->trans("Cancel"),
488  //'generate_doc'=>img_picto('', 'pdf').$langs->trans("ReGeneratePDF"),
489  //'builddoc'=>img_picto('', 'pdf').$langs->trans("PDFMerge"),
490  'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendMail"),
491 );
492 if ($permissiontodelete) {
493  $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
494 }
495 if (GETPOST('nomassaction', 'int') || in_array($massaction, array('prevalidate', 'presend', 'predelete'))) {
496  $arrayofmassactions = array();
497 }
498 $massactionbutton = $form->selectMassAction('', $arrayofmassactions);
499 
500 print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
501 if ($optioncss != '') {
502  print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
503 }
504 print '<input type="hidden" name="token" value="'.newToken().'">';
505 print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
506 print '<input type="hidden" name="action" value="list">';
507 print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
508 print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
509 print '<input type="hidden" name="page" value="'.$page.'">';
510 print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
511 print '<input type="hidden" name="mode" value="'.$mode.'">';
512 
513 $newcardbutton = '';
514 $newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/partnership/partnership_card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd);
515 
516 print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_'.$object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
517 
518 // Add code for pre mass action (confirmation or email presend form)
519 $topicmail = "SendPartnershipRef";
520 $modelmail = "partnership_send";
521 $objecttmp = new Partnership($db);
522 $trackid = 'pship'.$object->id;
523 include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
524 
525 if ($search_all) {
526  $setupstring = '';
527  foreach ($fieldstosearchall as $key => $val) {
528  $fieldstosearchall[$key] = $langs->trans($val);
529  $setupstring .= $key."=".$val.";";
530  }
531  print '<!-- Search done like if PRODUCT_QUICKSEARCH_ON_FIELDS = '.$setupstring.' -->'."\n";
532  print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>'."\n";
533 }
534 
535 $moreforfilter = '';
536 /*$moreforfilter.='<div class="divsearchfield">';
537 $moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escape_htmltag($search_myfield).'">';
538 $moreforfilter.= '</div>';*/
539 
540 $parameters = array();
541 $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
542 if (empty($reshook)) {
543  $moreforfilter .= $hookmanager->resPrint;
544 } else {
545  $moreforfilter = $hookmanager->resPrint;
546 }
547 
548 if (!empty($moreforfilter)) {
549  print '<div class="liste_titre liste_titre_bydiv centpercent">';
550  print $moreforfilter;
551  print '</div>';
552 }
553 
554 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
555 $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields
556 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
557 
558 print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
559 print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
560 
561 
562 if ($managedfor == 'member') {
563  $arrayfields['t.fk_member']['checked'] = 1;
564 } else {
565  $arrayfields['t.fk_soc']['checked'] = 1;
566 }
567 // Fields title search
568 // --------------------------------------------------------------------
569 print '<tr class="liste_titre">';
570 // Action column
571 if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
572  print '<td class="liste_titre maxwidthsearch">';
573  $searchpicto = $form->showFilterButtons('left');
574  print $searchpicto;
575  print '</td>';
576 }
577 foreach ($object->fields as $key => $val) {
578  $searchkey = empty($search[$key]) ? '' : $search[$key];
579  $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']);
580  if ($key == 'status') {
581  $cssforfield .= ($cssforfield ? ' ' : '').'center';
582  } elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) {
583  $cssforfield .= ($cssforfield ? ' ' : '').'center';
584  } elseif (in_array($val['type'], array('timestamp'))) {
585  $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
586  } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'rowid' && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
587  $cssforfield .= ($cssforfield ? ' ' : '').'right';
588  }
589  if (!empty($arrayfields['t.'.$key]['checked'])) {
590  print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">';
591  if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) {
592  print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1);
593  } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:') === 0)) {
594  print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', $cssforfield.' maxwidth250', 1);
595  } elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
596  print '<div class="nowrap">';
597  print $form->selectDate($search[$key.'_dtstart'] ? $search[$key.'_dtstart'] : '', "search_".$key."_dtstart", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
598  print '</div>';
599  print '<div class="nowrap">';
600  print $form->selectDate($search[$key.'_dtend'] ? $search[$key.'_dtend'] : '', "search_".$key."_dtend", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
601  print '</div>';
602  } elseif ($key == 'lang') {
603  require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
604  $formadmin = new FormAdmin($db);
605  print $formadmin->select_language($search[$key], 'search_lang', 0, null, 1, 0, 0, 'minwidth150 maxwidth200', 2);
606  } else {
607  print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag(isset($search[$key]) ? $search[$key] : '').'">';
608  }
609  print '</td>';
610  }
611 }
612 // End of subscription date
613 if ($managedfor == 'member') {
614  print '<td class="liste_titre center">';
615  $selectarray = array('-1'=>'', 'withoutsubscription'=>$langs->trans("WithoutSubscription"), 'uptodate'=>$langs->trans("UpToDate"), 'outofdate'=>$langs->trans("OutOfDate"));
616  print $form->selectarray('search_filter', $selectarray, $search_filter);
617  print '</td>';
618 }
619 // Extra fields
620 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
621 
622 // Fields from hook
623 $parameters = array('arrayfields'=>$arrayfields);
624 $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
625 print $hookmanager->resPrint;
626 // Action column
627 if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
628  print '<td class="liste_titre maxwidthsearch">';
629  $searchpicto = $form->showFilterButtons();
630  print $searchpicto;
631  print '</td>';
632 }
633 print '</tr>'."\n";
634 
635 $totalarray = array();
636 $totalarray['nbfield'] = 0;
637 
638 // Fields title label
639 // --------------------------------------------------------------------
640 print '<tr class="liste_titre">';
641 if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
642  print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
643 }
644 foreach ($object->fields as $key => $val) {
645  $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']);
646  if ($key == 'status') {
647  $cssforfield .= ($cssforfield ? ' ' : '').'center';
648  } elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) {
649  $cssforfield .= ($cssforfield ? ' ' : '').'center';
650  } elseif (in_array($val['type'], array('timestamp'))) {
651  $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
652  } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'rowid' && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
653  $cssforfield .= ($cssforfield ? ' ' : '').'right';
654  }
655  $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
656  if (!empty($arrayfields['t.'.$key]['checked'])) {
657  print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n";
658  $totalarray['nbfield']++;
659  }
660 }
661 // End of subscription date
662 if ($managedfor == 'member') {
663  $key = 'datefin';
664  $cssforfield = 'center';
665  print getTitleFieldOfList('SubscriptionEndDate', 0, $_SERVER['PHP_SELF'], 'd.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n";
666 }
667 // Extra fields
668 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
669 // Hook fields
670 $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray);
671 $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
672 print $hookmanager->resPrint;
673 // Action column
674 if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
675  print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
676 }
677 $totalarray['nbfield']++;
678 print '</tr>'."\n";
679 
680 
681 // Detect if we need a fetch on each output line
682 $needToFetchEachLine = 0;
683 if (isset($extrafields->attributes[$object->table_element]['computed']) && is_array($extrafields->attributes[$object->table_element]['computed']) && count($extrafields->attributes[$object->table_element]['computed']) > 0) {
684  foreach ($extrafields->attributes[$object->table_element]['computed'] as $key => $val) {
685  if (preg_match('/\$object/', $val)) {
686  $needToFetchEachLine++; // There is at least one compute field that use $object
687  }
688  }
689 }
690 
691 
692 // Loop on record
693 // --------------------------------------------------------------------
694 $i = 0;
695 $savnbfield = $totalarray['nbfield'];
696 $totalarray = array();
697 $totalarray['nbfield'] = 0;
698 $imaxinloop = ($limit ? min($num, $limit) : $num);
699 while ($i < $imaxinloop) {
700  $obj = $db->fetch_object($resql);
701  if (empty($obj)) {
702  break; // Should not happen
703  }
704 
705  // Store properties in $object
706  $object->setVarsFromFetchObj($obj);
707 
708  if ($mode == 'kanban') {
709  if ($i == 0) {
710  print '<tr><td colspan="'.$savnbfield.'">';
711  print '<div class="box-flex-container">';
712  }
713  // Output Kanban
714  print $object->getKanbanView('');
715  if ($i == ($imaxinloop - 1)) {
716  print '</div>';
717  print '</td></tr>';
718  }
719  } else {
720  // Show here line of result
721  $j = 0;
722  print '<tr data-rowid="'.$object->id.'" class="oddeven">';
723  // Action column
724  if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
725  print '<td class="nowrap center">';
726  if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
727  $selected = 0;
728  if (in_array($object->id, $arrayofselected)) {
729  $selected = 1;
730  }
731  print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
732  }
733  print '</td>';
734  }
735  foreach ($object->fields as $key => $val) {
736  $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']);
737  if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) {
738  $cssforfield .= ($cssforfield ? ' ' : '').'center';
739  } elseif ($key == 'status') {
740  $cssforfield .= ($cssforfield ? ' ' : '').'center';
741  }
742 
743  if (in_array($val['type'], array('timestamp'))) {
744  $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
745  } elseif ($key == 'ref') {
746  $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
747  }
748 
749  if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('rowid', 'status')) && empty($val['arrayofkeyval'])) {
750  $cssforfield .= ($cssforfield ? ' ' : '').'right';
751  }
752  //if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100';
753 
754  if (!empty($arrayfields['t.'.$key]['checked'])) {
755  print '<td'.($cssforfield ? ' class="'.$cssforfield.'"' : '');
756  if (preg_match('/tdoverflow/', $cssforfield)) {
757  print ' title="'.dol_escape_htmltag($object->$key).'"';
758  }
759  print '>';
760  if ($key == 'status') {
761  print $object->getLibStatut(5);
762  } elseif ($key == 'rowid') {
763  print $object->showOutputField($val, $key, $object->id, '');
764  } else {
765  print $object->showOutputField($val, $key, $object->$key, '');
766  }
767  print '</td>';
768  if (!$i) {
769  $totalarray['nbfield']++;
770  }
771  if (!empty($val['isameasure']) && $val['isameasure'] == 1) {
772  if (!$i) {
773  $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key;
774  }
775  if (!isset($totalarray['val'])) {
776  $totalarray['val'] = array();
777  }
778  if (!isset($totalarray['val']['t.'.$key])) {
779  $totalarray['val']['t.'.$key] = 0;
780  }
781  $totalarray['val']['t.'.$key] += $object->$key;
782  }
783  }
784  }
785  // End of subscription date
786  if ($managedfor == 'member') {
787  print '<td class="nowrap center endofsubscriptiondate">';
788  $result = $adherent->fetch($object->fk_member);
789  if ($result) {
790  $datefin = $adherent->datefin;
791  if ($datefin) {
792  print dol_print_date($datefin, 'day');
793  if ($adherent->hasDelay()) {
794  $textlate .= ' ('.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($conf->adherent->subscription->warning_delay / 60 / 60 / 24) >= 0 ? '+' : '').ceil($conf->adherent->subscription->warning_delay / 60 / 60 / 24).' '.$langs->trans("days").')';
795  print " ".img_warning($langs->trans("SubscriptionLate").$textlate);
796  }
797  } else {
798  if ($adherent->subscription == 'yes') {
799  print $langs->trans("SubscriptionNotReceived");
800  if ($adherent->statut > 0) {
801  print " ".img_warning();
802  }
803  } else {
804  print '&nbsp;';
805  }
806  }
807  }
808  print '</td>';
809  }
810  // Extra fields
811  include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
812  // Fields from hook
813  $parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
814  $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
815  print $hookmanager->resPrint;
816  // Action column
817  if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
818  print '<td class="nowrap center">';
819  if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
820  $selected = 0;
821  if (in_array($object->id, $arrayofselected)) {
822  $selected = 1;
823  }
824  print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
825  }
826  print '</td>';
827  }
828  if (!$i) {
829  $totalarray['nbfield']++;
830  }
831 
832  print '</tr>'."\n";
833  }
834 
835  $i++;
836 }
837 if ($managedfor != 'member') $totalarray['nbfield']++; // End of subscription date
838 
839 // Show total line
840 include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
841 
842 // If no record found
843 if ($num == 0) {
844  $colspan = 1;
845  foreach ($arrayfields as $key => $val) {
846  if (!empty($val['checked'])) {
847  $colspan++;
848  }
849  }
850  if ($managedfor != 'member') $colspan++; // End of subscription date
851  print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
852 }
853 
854 
855 $db->free($resql);
856 
857 $parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
858 $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
859 print $hookmanager->resPrint;
860 
861 print '</table>'."\n";
862 print '</div>'."\n";
863 
864 print '</form>'."\n";
865 
866 if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) {
867  $hidegeneratedfilelistifempty = 1;
868  if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) {
869  $hidegeneratedfilelistifempty = 0;
870  }
871 
872  require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
873  $formfile = new FormFile($db);
874 
875  // Show list of available documents
876  $urlsource = $_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
877  $urlsource .= str_replace('&amp;', '&', $param);
878 
879  $filedir = $diroutputmassaction;
880  $genallowed = $permissiontoread;
881  $delallowed = $permissiontoadd;
882 
883  print $formfile->showdocuments('massfilesarea_partnership', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty);
884 }
885 
886 // End of page
887 llxFooter();
888 $db->close();
dol_escape_htmltag
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields.
Definition: functions.lib.php:1468
llxFooter
llxFooter()
Empty footer.
Definition: wrapper.php:73
getTitleFieldOfList
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get title line of an array.
Definition: functions.lib.php:5049
GETPOST
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Definition: functions.lib.php:484
dol_print_error
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
Definition: functions.lib.php:4844
dol_sort_array
dol_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by second index function, which produces ascending (default) or descending output...
Definition: functions.lib.php:8385
Partnership
Class for Partnership.
Definition: partnership.class.php:34
dol_buildpath
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
Definition: functions.lib.php:1062
$form
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:142
FormAdmin
Class to generate html code for admin pages.
Definition: html.formadmin.class.php:30
$help_url
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
Definition: agenda.php:116
dol_print_date
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
Definition: functions.lib.php:2514
img_picto
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
Definition: functions.lib.php:3880
FormFile
Class to offer components to list and upload files.
Definition: html.formfile.class.php:36
dolGetButtonTitle
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.
Definition: functions.lib.php:10605
print_barre_liste
print_barre_liste($titre, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $hideselectlimit=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
Definition: functions.lib.php:5257
Adherent
Class to manage members of a foundation.
Definition: adherent.class.php:46
getDolGlobalString
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
Definition: functions.lib.php:80
GETPOSTISSET
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
Definition: functions.lib.php:386
natural_search
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...
Definition: functions.lib.php:9420
dol_eval
dol_eval($s, $returnvalue=0, $hideerrors=1, $onlysimplestring='1')
Replace eval function to add more security.
Definition: functions.lib.php:8611
ExtraFields
Class to manage standard extra fields.
Definition: extrafields.class.php:39
Form
Class to manage generation of HTML components Only common components must be here.
Definition: html.form.class.php:52
dol_now
dol_now($mode='auto')
Return date for now.
Definition: functions.lib.php:2845
$resql
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire)||(isModEnabled('supplier_invoice') && $user->rights->supplier_invoice->lire)) if(isModEnabled('don') &&!empty($user->rights->don->lire)) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
Definition: index.php:742
setEventMessages
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
Definition: functions.lib.php:8137
accessforbidden
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
Definition: security.lib.php:933
dol_mktime
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
Definition: functions.lib.php:2757
llxHeader
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Definition: wrapper.php:59