28require
'../main.inc.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/agenda.lib.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/class/events.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
37require_once DOL_DOCUMENT_ROOT.
'/emailcollector/class/emailcollector.class.php';
40$langs->loadLangs(array(
"admin",
"other"));
42$action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
43$massaction =
GETPOST(
'massaction',
'alpha');
45$confirm =
GETPOST(
'confirm',
'alpha');
46$cancel =
GETPOST(
'cancel',
'alpha');
47$toselect =
GETPOST(
'toselect',
'array');
48$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'emailcollectorlist';
49$backtopage =
GETPOST(
'backtopage',
'alpha');
50$optioncss =
GETPOST(
'optioncss',
'aZ');
57$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
58$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
60if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha') || (empty($toselect) && $massaction ===
'0')) {
64$offset = $limit * $page;
73$diroutputmassaction = $conf->emailcollector->dir_output.
'/temp/massgeneration/'.$user->id;
74$hookmanager->initHooks(array(
'emailcollectorlist'));
77$extrafields->fetch_name_optionals_label(
$object->table_element);
79$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
91if ($user->socid > 0) {
98$search_all =
GETPOST(
'search_all',
'alphanohtml');
100foreach (
$object->fields as $key => $val) {
101 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
102 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
104 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
111$fieldstosearchall = array();
112foreach (
$object->fields as $key => $val) {
113 if (!empty($val[
'searchall'])) {
114 $fieldstosearchall[
't.'.$key] = $val[
'label'];
119$arrayfields = array();
120foreach (
$object->fields as $key => $val) {
122 if (!empty($val[
'visible'])) {
123 $visible = (int)
dol_eval((
string) $val[
'visible'], 1);
124 $arrayfields[
't.'.$key] = array(
125 'label' => $val[
'label'],
126 'checked' => (($visible < 0) ? 0 : 1),
127 'enabled' => (abs($visible) != 3 && (bool)
dol_eval($val[
'enabled'], 1)),
128 'position' => $val[
'position'],
129 'help' => isset($val[
'help']) ? $val[
'help'] :
''
134include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
139$permissiontoread = $user->admin;
140$permissiontoadd = $user->admin;
141$permissiontodelete = $user->admin;
146if (!isModEnabled(
'emailcollector')) {
156if (
GETPOST(
'cancel',
'alpha')) {
160if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
164$parameters = array();
165$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
170if (empty($reshook)) {
172 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
175 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
176 foreach (
$object->fields as $key => $val) {
178 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
179 $search[$key.
'_dtstart'] =
'';
180 $search[$key.
'_dtend'] =
'';
184 $search_array_options = array();
186 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')
187 ||
GETPOST(
'button_search_x',
'alpha') ||
GETPOST(
'button_search.x',
'alpha') ||
GETPOST(
'button_search',
'alpha')) {
192 $objectclass =
'EmailCollector';
193 $objectlabel =
'EmailCollector';
194 $uploaddir = $conf->emailcollector->dir_output;
195 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
204$form =
new Form($db);
208$help_url =
"EN:Module_EMail_Collector|FR:Module_Collecteur_de_courrier_électronique|ES:Module_EMail_Collector";
209$title = $langs->trans(
'EmailCollectors');
217$sql .=
$object->getFieldList(
't');
219if (!empty($extrafields->attributes[
$object->table_element][
'label'])) {
220 foreach ($extrafields->attributes[
$object->table_element][
'label'] as $key => $val) {
221 $sql .= ($extrafields->attributes[
$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
" as options_".$key :
'');
225$parameters = array();
226$reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object);
227$sql .= $hookmanager->resPrint;
228$sql = preg_replace(
'/,\s*$/',
'', $sql);
229$sql .=
" FROM ".MAIN_DB_PREFIX.$object->table_element.
" as t";
230if (isset($extrafields->attributes[
$object->table_element][
'label']) && is_array($extrafields->attributes[
$object->table_element][
'label']) && count($extrafields->attributes[
$object->table_element][
'label'])) {
231 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (t.rowid = ef.fk_object)";
233if (
$object->ismultientitymanaged == 1) {
234 $sql .=
" WHERE t.entity IN (".getEntity(
$object->element).
")";
236 $sql .=
" WHERE 1 = 1";
238foreach ($search as $key => $val) {
239 if (array_key_exists($key,
$object->fields)) {
240 if ($key ==
'status' && $search[$key] == -1) {
244 if ((strpos(
$object->fields[$key][
'type'],
'integer:') === 0) || (strpos(
$object->fields[$key][
'type'],
'sellist:') === 0) || !empty(
$object->fields[$key][
'arrayofkeyval'])) {
245 if ($search[$key] ==
'-1' || ($search[$key] ===
'0' && (empty(
$object->fields[$key][
'arrayofkeyval']) || !array_key_exists(
'0',
$object->fields[$key][
'arrayofkeyval'])))) {
250 if ($search[$key] !=
'') {
251 $sql .=
natural_search(
"t.".$db->sanitize($key), $search[$key], (($key ==
'status') ? 2 : $mode_search));
254 if (preg_match(
'/(_dtstart|_dtend)$/', $key) && $search[$key] !=
'') {
255 $columnName = preg_replace(
'/(_dtstart|_dtend)$/',
'', $key);
256 if (preg_match(
'/^(date|timestamp|datetime)/',
$object->fields[$columnName][
'type'])) {
257 if (preg_match(
'/_dtstart$/', $key)) {
258 $sql .=
" AND t.".$db->escape($columnName).
" >= '".$db->idate($search[$key]).
"'";
260 if (preg_match(
'/_dtend$/', $key)) {
261 $sql .=
" AND t.".$db->escape($columnName).
" <= '".$db->idate($search[$key]).
"'";
268 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
271include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
273$parameters = array();
274$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object);
275$sql .= $hookmanager->resPrint;
277$nbtotalofrecords =
'';
279 $resql = $db->query($sql);
280 $nbtotalofrecords = $db->num_rows($resql);
282 if (($page * $limit) > $nbtotalofrecords) {
290$sql .= $db->order($sortfield, $sortorder);
292 $sql .= $db->plimit($limit + 1, $offset);
295$resql = $db->query($sql);
301$num = $db->num_rows($resql);
304if ($num == 1 &&
getDolGlobalString(
'MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
305 $obj = $db->fetch_object($resql);
307 header(
"Location: ".DOL_URL_ROOT.
'/emailcollector/emailcollector_card.php?id='.$id);
315llxHeader(
'', $title, $help_url,
'', 0, 0, $morejs, $morecss,
'',
'bodyforlist mod-user page-emailcollector_list');
318$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
324$head[$h][0] = DOL_URL_ROOT.
"/admin/emailcollector_list.php";
325$head[$h][1] = $langs->trans(
"Setup");
326$head[$h][2] =
'common';
333$arrayofselected = is_array($toselect) ? $toselect : array();
336if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
337 $param .=
'&contextpage='.urlencode($contextpage);
339if ($limit > 0 && $limit != $conf->liste_limit) {
340 $param .=
'&limit='.((int) $limit);
342foreach ($search as $key => $val) {
343 if (is_array($search[$key]) && count($search[$key])) {
344 foreach ($search[$key] as $skey) {
346 $param .=
'&search_'.$key.
'[]='.urlencode($skey);
349 } elseif ($search[$key] !=
'') {
350 $param .=
'&search_'.$key.
'='.urlencode($search[$key]);
353if ($optioncss !=
'') {
354 $param .=
'&optioncss='.urlencode($optioncss);
357include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
359$parameters = array();
360$reshook = $hookmanager->executeHooks(
'printFieldListSearchParam', $parameters, $object);
361$param .= $hookmanager->resPrint;
364$arrayofmassactions = array(
368if ($permissiontodelete) {
369 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
371if (
GETPOSTINT(
'nomassaction') || in_array($massaction, array(
'presend',
'predelete'))) {
372 $arrayofmassactions = array();
374$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
376print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">'.
"\n";
377if ($optioncss !=
'') {
378 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
380print
'<input type="hidden" name="token" value="'.newToken().
'">';
381print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
382print
'<input type="hidden" name="action" value="list">';
383print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
384print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
385print
'<input type="hidden" name="page" value="'.$page.
'">';
386print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
389$newcardbutton .=
dolGetButtonTitle($langs->trans(
'New'),
'',
'fa fa-plus-circle',
'emailcollector_card.php?action=create&backtopage='.urlencode($_SERVER[
'PHP_SELF']),
'', $permissiontoadd);
391print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'email', 0, $newcardbutton,
'', $limit, 0, 0, 1);
398include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
405$parameters = array();
406$reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object, $action);
407if (empty($reshook)) {
408 $moreforfilter .= $hookmanager->resPrint;
410 $moreforfilter = $hookmanager->resPrint;
413if (!empty($moreforfilter)) {
414 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
415 print $moreforfilter;
419$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
420$selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN'));
421$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
423print
'<div class="div-table-responsive">';
424print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
429print
'<tr class="liste_titre">';
432 print
'<td class="liste_titre maxwidthsearch">';
433 $searchpicto = $form->showFilterButtons(
'left');
437foreach (
$object->fields as $key => $val) {
438 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
439 if ($key ==
'status') {
440 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
441 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
442 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
443 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
444 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
445 } elseif (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && $val[
'label'] !=
'TechnicalID' && empty($val[
'arrayofkeyval'])) {
446 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
448 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
449 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').
'">';
450 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
451 print $form->selectarray(
'search_'.$key, $val[
'arrayofkeyval'], (isset($search[$key]) ? $search[$key] :
''), $val[
'notnull'], 0, 0,
'', 1, 0, 0,
'',
'maxwidth100', 1);
452 } elseif ((strpos($val[
'type'],
'integer:') === 0) || (strpos($val[
'type'],
'sellist:') === 0)) {
453 print
$object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] :
''),
'',
'',
'search_',
'maxwidth125', 1);
454 } elseif (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
455 print
'<div class="nowrap">';
456 print $form->selectDate($search[$key.
'_dtstart'] ? $search[$key.
'_dtstart'] :
'',
"search_".$key.
"_dtstart", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
458 print
'<div class="nowrap">';
459 print $form->selectDate($search[$key.
'_dtend'] ? $search[$key.
'_dtend'] :
'',
"search_".$key.
"_dtend", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
461 } elseif ($key ==
'lang') {
462 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
464 print $formadmin->select_language($search[$key],
'search_lang', 0, array(), 1, 0, 0,
'minwidth100imp maxwidth125', 2);
466 print
'<input type="text" class="flat maxwidth'.($val[
'type'] ==
'integer' ?
'50' :
'75').
'" name="search_'.$key.
'" value="'.
dol_escape_htmltag(isset($search[$key]) ? $search[$key] :
'').
'">';
472include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
475$parameters = array(
'arrayfields' => $arrayfields);
476$reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters, $object);
477print $hookmanager->resPrint;
480 print
'<td class="liste_titre maxwidthsearch">';
481 $searchpicto = $form->showFilterButtons();
487$totalarray = array();
488$totalarray[
'nbfield'] = 0;
492print
'<tr class="liste_titre">';
494 print
getTitleFieldOfList(($mode !=
'kanban' ? $selectedfields :
''), 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
496foreach (
$object->fields as $key => $val) {
497 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
498 if ($key ==
'status') {
499 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
500 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
501 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
502 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
503 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
504 } elseif (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && $val[
'label'] !=
'TechnicalID' && empty($val[
'arrayofkeyval'])) {
505 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
507 $cssforfield = preg_replace(
'/small\s*/',
'', $cssforfield);
508 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
509 print
getTitleFieldOfList($arrayfields[
't.'.$key][
'label'], 0, $_SERVER[
'PHP_SELF'],
't.'.$key,
'', $param, ($cssforfield ?
'class="'.$cssforfield.
'"' :
''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.
' ' :
'')).
"\n";
510 $totalarray[
'nbfield']++;
514include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
516$parameters = array(
'arrayfields' => $arrayfields,
'param' => $param,
'sortfield' => $sortfield,
'sortorder' => $sortorder,
'totalarray' => &$totalarray);
517$reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters, $object);
518print $hookmanager->resPrint;
521 print
getTitleFieldOfList(($mode !=
'kanban' ? $selectedfields :
''), 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
523$totalarray[
'nbfield']++;
528$needToFetchEachLine = 0;
529if (isset($extrafields->attributes[
$object->table_element][
'computed']) && is_array($extrafields->attributes[
$object->table_element][
'computed']) && count($extrafields->attributes[
$object->table_element][
'computed']) > 0) {
530 foreach ($extrafields->attributes[
$object->table_element][
'computed'] as $key => $val) {
531 if (!is_null($val) && preg_match(
'/\$object/', $val)) {
532 $needToFetchEachLine++;
541$savnbfield = $totalarray[
'nbfield'];
542$totalarray[
'nbfield'] = 0;
543$imaxinloop = ($limit ? min($num, $limit) : $num);
544while ($i < $imaxinloop) {
545 $obj = $db->fetch_object($resql);
551 $object->setVarsFromFetchObj($obj);
553 if ($mode ==
'kanban') {
555 print
'<tr class="trkanban"><td colspan="'.$savnbfield.
'">';
556 print
'<div class="box-flex-container kanban">';
560 if ($massactionbutton || $massaction) {
562 if (in_array(
$object->id, $arrayofselected)) {
566 print
$object->getKanbanView(
'', array(
'selected' => $selected));
567 if ($i == ($imaxinloop - 1)) {
574 print
'<tr data-rowid="'.$object->id.
'" class="oddeven">';
577 print
'<td class="nowrap center">';
578 if ($massactionbutton || $massaction) {
580 if (in_array(
$object->id, $arrayofselected)) {
583 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.
$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
587 foreach (
$object->fields as $key => $val) {
588 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
589 if (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
590 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
591 } elseif ($key ==
'status') {
592 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
595 if (in_array($val[
'type'], array(
'timestamp'))) {
596 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
597 } elseif ($key ==
'ref') {
598 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
601 if (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && !in_array($key, array(
'rowid',
'status')) && empty($val[
'arrayofkeyval'])) {
602 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
606 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
607 print
'<td'.($cssforfield ?
' class="'.$cssforfield.(preg_match(
'/tdoverflow/', $cssforfield) ?
' classfortooltip' :
'').
'"' :
'');
608 if (preg_match(
'/tdoverflow/', $cssforfield) && !is_numeric(
$object->$key)) {
609 print
' title="'.dol_escape_htmltag(
$object->$key).
'"';
612 if ($key ==
'status') {
613 print
$object->getLibStatut(5);
614 } elseif ($key ==
'lastresult') {
615 print
'<div class="twolinesmax">';
618 } elseif ($key ==
'rowid') {
625 $totalarray[
'nbfield']++;
627 if (!empty($val[
'isameasure']) && $val[
'isameasure'] == 1) {
629 $totalarray[
'pos'][$totalarray[
'nbfield']] =
't.'.$key;
631 if (!isset($totalarray[
'val'])) {
632 $totalarray[
'val'] = array();
634 if (!isset($totalarray[
'val'][
't.'.$key])) {
635 $totalarray[
'val'][
't.'.$key] = 0;
637 $totalarray[
'val'][
't.'.$key] +=
$object->$key;
642 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
644 $parameters = array(
'arrayfields' => $arrayfields,
'object' => $object,
'obj' => $obj,
'i' => $i,
'totalarray' => &$totalarray);
645 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $object);
646 print $hookmanager->resPrint;
649 print
'<td class="nowrap center">';
650 if ($massactionbutton || $massaction) {
652 if (in_array(
$object->id, $arrayofselected)) {
655 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.
$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
660 $totalarray[
'nbfield']++;
670include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
676 foreach ($arrayfields as $key => $val) {
677 if (!empty($val[
'checked'])) {
681 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
687$parameters = array(
'arrayfields' => $arrayfields,
'sql' => $sql);
688$reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object);
689print $hookmanager->resPrint;
691print
'</table>'.
"\n";
697print
'<div class="div-table-responsive-no-min">';
698print
'<table class="noborder centpercent">';
700print
'<tr class="liste_titre">';
701print
'<td>'.$langs->trans(
"Parameter").
'</td>';
706print
'<tr class="oddeven"><td>';
708print $langs->trans(
"MAIN_IMAP_USE_PHPIMAP");
710print
'<td class="left">';
711if ($conf->use_javascript_ajax) {
712 print ajax_constantonoff(
'MAIN_IMAP_USE_PHPIMAP');
714 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
715 print $form->selectarray(
"MAIN_IMAP_USE_PHPIMAP", $arrval, $conf->global->MAIN_IMAP_USE_PHPIMAP);
721print
'<tr class="oddeven"><td>'.$form->textwithpicto($langs->trans(
"EmailCollectorHideMailHeaders"), $langs->transnoentitiesnoconv(
"EmailCollectorHideMailHeadersHelp")).
'</td>';
722print
'<td class="left">';
723if ($conf->use_javascript_ajax) {
724 print ajax_constantonoff(
'MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER');
726 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
727 print $form->selectarray(
"MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER", $arrval,
getDolGlobalString(
'TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND'));
739if (in_array(
'builddoc', array_keys($arrayofmassactions)) && ($nbtotalofrecords ===
'' || $nbtotalofrecords)) {
740 $hidegeneratedfilelistifempty = 1;
741 if ($massaction ==
'builddoc' || $action ==
'remove_file' || $show_files) {
742 $hidegeneratedfilelistifempty = 0;
745 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
749 $urlsource = $_SERVER[
'PHP_SELF'].
'?sortfield='.$sortfield.
'&sortorder='.$sortorder;
750 $urlsource .= str_replace(
'&',
'&', $param);
752 $filedir = $diroutputmassaction;
753 $genallowed = $permissiontoread;
754 $delallowed = $permissiontoadd;
756 print $formfile->showdocuments(
'massfilesarea_emailcollector',
'', $filedir, $urlsource, 0, $delallowed,
'', 1, 1, 0, 48, 1, $param, $title,
'',
'',
'',
null, $hidegeneratedfilelistifempty);
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
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.
Class for EmailCollector.
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...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
print_barre_liste($title, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $selectlimitsuffix=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
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.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_eval($s, $returnvalue=1, $hideerrors=1, $onlysimplestring='1')
Replace eval function to add more security.
natural_search($fields, $value, $mode=0, $nofirstand=0)
Generate natural SQL search string for a criteria (this criteria can be tested on one or several fiel...
dol_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by the value of a given key, which produces ascending (default) or descending out...
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get title line of an array.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.