26require
'../main.inc.php';
27require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
28require_once DOL_DOCUMENT_ROOT.
'/core/lib/agenda.lib.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/class/events.class.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
35require_once DOL_DOCUMENT_ROOT.
'/emailcollector/class/emailcollector.class.php';
38$langs->loadLangs(array(
"admin",
"other"));
40$action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
41$massaction =
GETPOST(
'massaction',
'alpha');
43$confirm =
GETPOST(
'confirm',
'alpha');
44$cancel =
GETPOST(
'cancel',
'alpha');
45$toselect =
GETPOST(
'toselect',
'array');
46$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'emailcollectorlist';
47$backtopage =
GETPOST(
'backtopage',
'alpha');
48$optioncss =
GETPOST(
'optioncss',
'aZ');
55$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
56$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
58if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha') || (empty($toselect) && $massaction ===
'0')) {
62$offset = $limit * $page;
71$diroutputmassaction = $conf->emailcollector->dir_output.
'/temp/massgeneration/'.$user->id;
72$hookmanager->initHooks(array(
'emailcollectorlist'));
75$extrafields->fetch_name_optionals_label(
$object->table_element);
77$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
89if ($user->socid > 0) {
96$search_all =
GETPOST(
'search_all',
'alphanohtml');
98foreach (
$object->fields as $key => $val) {
99 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
100 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
102 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
109$fieldstosearchall = array();
110foreach (
$object->fields as $key => $val) {
111 if (!empty($val[
'searchall'])) {
112 $fieldstosearchall[
't.'.$key] = $val[
'label'];
117$arrayfields = array();
118foreach (
$object->fields as $key => $val) {
120 if (!empty($val[
'visible'])) {
121 $visible = (int)
dol_eval($val[
'visible'], 1);
122 $arrayfields[
't.'.$key] = array(
123 'label' => $val[
'label'],
124 'checked' => (($visible < 0) ? 0 : 1),
125 'enabled' => (abs($visible) != 3 && (bool)
dol_eval($val[
'enabled'], 1)),
126 'position' => $val[
'position'],
127 'help' => isset($val[
'help']) ? $val[
'help'] :
''
132include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
137$permissiontoread = $user->admin;
138$permissiontoadd = $user->admin;
139$permissiontodelete = $user->admin;
144if (!isModEnabled(
'emailcollector')) {
154if (
GETPOST(
'cancel',
'alpha')) {
158if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
162$parameters = array();
163$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
168if (empty($reshook)) {
170 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
173 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
174 foreach (
$object->fields as $key => $val) {
176 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
177 $search[$key.
'_dtstart'] =
'';
178 $search[$key.
'_dtend'] =
'';
182 $search_array_options = array();
184 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')
185 ||
GETPOST(
'button_search_x',
'alpha') ||
GETPOST(
'button_search.x',
'alpha') ||
GETPOST(
'button_search',
'alpha')) {
190 $objectclass =
'EmailCollector';
191 $objectlabel =
'EmailCollector';
192 $uploaddir = $conf->emailcollector->dir_output;
193 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
202$form =
new Form($db);
206$help_url =
"EN:Module_EMail_Collector|FR:Module_Collecteur_de_courrier_électronique|ES:Module_EMail_Collector";
207$title = $langs->trans(
'EmailCollectors');
215$sql .=
$object->getFieldList(
't');
217if (!empty($extrafields->attributes[
$object->table_element][
'label'])) {
218 foreach ($extrafields->attributes[
$object->table_element][
'label'] as $key => $val) {
219 $sql .= ($extrafields->attributes[
$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
" as options_".$key :
'');
223$parameters = array();
224$reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object);
225$sql .= $hookmanager->resPrint;
226$sql = preg_replace(
'/,\s*$/',
'', $sql);
227$sql .=
" FROM ".MAIN_DB_PREFIX.$object->table_element.
" as t";
228if (isset($extrafields->attributes[
$object->table_element][
'label']) && is_array($extrafields->attributes[
$object->table_element][
'label']) && count($extrafields->attributes[
$object->table_element][
'label'])) {
229 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (t.rowid = ef.fk_object)";
231if (
$object->ismultientitymanaged == 1) {
232 $sql .=
" WHERE t.entity IN (".getEntity(
$object->element).
")";
234 $sql .=
" WHERE 1 = 1";
236foreach ($search as $key => $val) {
237 if (array_key_exists($key,
$object->fields)) {
238 if ($key ==
'status' && $search[$key] == -1) {
242 if ((strpos(
$object->fields[$key][
'type'],
'integer:') === 0) || (strpos(
$object->fields[$key][
'type'],
'sellist:') === 0) || !empty(
$object->fields[$key][
'arrayofkeyval'])) {
243 if ($search[$key] ==
'-1' || ($search[$key] ===
'0' && (empty(
$object->fields[$key][
'arrayofkeyval']) || !array_key_exists(
'0',
$object->fields[$key][
'arrayofkeyval'])))) {
248 if ($search[$key] !=
'') {
249 $sql .=
natural_search(
"t.".$db->sanitize($key), $search[$key], (($key ==
'status') ? 2 : $mode_search));
252 if (preg_match(
'/(_dtstart|_dtend)$/', $key) && $search[$key] !=
'') {
253 $columnName = preg_replace(
'/(_dtstart|_dtend)$/',
'', $key);
254 if (preg_match(
'/^(date|timestamp|datetime)/',
$object->fields[$columnName][
'type'])) {
255 if (preg_match(
'/_dtstart$/', $key)) {
256 $sql .=
" AND t.".$db->escape($columnName).
" >= '".$db->idate($search[$key]).
"'";
258 if (preg_match(
'/_dtend$/', $key)) {
259 $sql .=
" AND t.".$db->escape($columnName).
" <= '".$db->idate($search[$key]).
"'";
266 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
269include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
271$parameters = array();
272$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object);
273$sql .= $hookmanager->resPrint;
275$nbtotalofrecords =
'';
277 $resql = $db->query($sql);
278 $nbtotalofrecords = $db->num_rows($resql);
280 if (($page * $limit) > $nbtotalofrecords) {
288$sql .= $db->order($sortfield, $sortorder);
290 $sql .= $db->plimit($limit + 1, $offset);
293$resql = $db->query($sql);
299$num = $db->num_rows($resql);
302if ($num == 1 &&
getDolGlobalString(
'MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
303 $obj = $db->fetch_object($resql);
305 header(
"Location: ".DOL_URL_ROOT.
'/emailcollector/emailcollector_card.php?id='.$id);
313llxHeader(
'', $title, $help_url,
'', 0, 0, $morejs, $morecss,
'',
'bodyforlist mod-user page-emailcollector_list');
316$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
322$head[$h][0] = DOL_URL_ROOT.
"/admin/emailcollector_list.php";
323$head[$h][1] = $langs->trans(
"Setup");
324$head[$h][2] =
'common';
331$arrayofselected = is_array($toselect) ? $toselect : array();
334if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
335 $param .=
'&contextpage='.urlencode($contextpage);
337if ($limit > 0 && $limit != $conf->liste_limit) {
338 $param .=
'&limit='.((int) $limit);
340foreach ($search as $key => $val) {
341 if (is_array($search[$key]) && count($search[$key])) {
342 foreach ($search[$key] as $skey) {
344 $param .=
'&search_'.$key.
'[]='.urlencode($skey);
347 } elseif ($search[$key] !=
'') {
348 $param .=
'&search_'.$key.
'='.urlencode($search[$key]);
351if ($optioncss !=
'') {
352 $param .=
'&optioncss='.urlencode($optioncss);
355include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
357$parameters = array();
358$reshook = $hookmanager->executeHooks(
'printFieldListSearchParam', $parameters, $object);
359$param .= $hookmanager->resPrint;
362$arrayofmassactions = array(
366if ($permissiontodelete) {
367 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
369if (
GETPOSTINT(
'nomassaction') || in_array($massaction, array(
'presend',
'predelete'))) {
370 $arrayofmassactions = array();
372$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
374print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">'.
"\n";
375if ($optioncss !=
'') {
376 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
378print
'<input type="hidden" name="token" value="'.newToken().
'">';
379print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
380print
'<input type="hidden" name="action" value="list">';
381print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
382print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
383print
'<input type="hidden" name="page" value="'.$page.
'">';
384print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
387$newcardbutton .=
dolGetButtonTitle($langs->trans(
'New'),
'',
'fa fa-plus-circle',
'emailcollector_card.php?action=create&backtopage='.urlencode($_SERVER[
'PHP_SELF']),
'', $permissiontoadd);
389print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'email', 0, $newcardbutton,
'', $limit, 0, 0, 1);
396include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
403$parameters = array();
404$reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object, $action);
405if (empty($reshook)) {
406 $moreforfilter .= $hookmanager->resPrint;
408 $moreforfilter = $hookmanager->resPrint;
411if (!empty($moreforfilter)) {
412 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
413 print $moreforfilter;
417$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
418$selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN'));
419$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
421print
'<div class="div-table-responsive">';
422print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
427print
'<tr class="liste_titre">';
430 print
'<td class="liste_titre maxwidthsearch">';
431 $searchpicto = $form->showFilterButtons(
'left');
435foreach (
$object->fields as $key => $val) {
436 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
437 if ($key ==
'status') {
438 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
439 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
440 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
441 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
442 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
443 } elseif (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && $val[
'label'] !=
'TechnicalID' && empty($val[
'arrayofkeyval'])) {
444 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
446 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
447 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').
'">';
448 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
449 print $form->selectarray(
'search_'.$key, $val[
'arrayofkeyval'], (isset($search[$key]) ? $search[$key] :
''), $val[
'notnull'], 0, 0,
'', 1, 0, 0,
'',
'maxwidth100', 1);
450 } elseif ((strpos($val[
'type'],
'integer:') === 0) || (strpos($val[
'type'],
'sellist:') === 0)) {
451 print
$object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] :
''),
'',
'',
'search_',
'maxwidth125', 1);
452 } elseif (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
453 print
'<div class="nowrap">';
454 print $form->selectDate($search[$key.
'_dtstart'] ? $search[$key.
'_dtstart'] :
'',
"search_".$key.
"_dtstart", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
456 print
'<div class="nowrap">';
457 print $form->selectDate($search[$key.
'_dtend'] ? $search[$key.
'_dtend'] :
'',
"search_".$key.
"_dtend", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
459 } elseif ($key ==
'lang') {
460 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
462 print $formadmin->select_language($search[$key],
'search_lang', 0,
null, 1, 0, 0,
'minwidth100imp maxwidth125', 2);
464 print
'<input type="text" class="flat maxwidth75" name="search_'.$key.
'" value="'.
dol_escape_htmltag(isset($search[$key]) ? $search[$key] :
'').
'">';
470include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
473$parameters = array(
'arrayfields'=>$arrayfields);
474$reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters, $object);
475print $hookmanager->resPrint;
478 print
'<td class="liste_titre maxwidthsearch">';
479 $searchpicto = $form->showFilterButtons();
485$totalarray = array();
486$totalarray[
'nbfield'] = 0;
490print
'<tr class="liste_titre">';
492 print
getTitleFieldOfList(($mode !=
'kanban' ? $selectedfields :
''), 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
494foreach (
$object->fields as $key => $val) {
495 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
496 if ($key ==
'status') {
497 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
498 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
499 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
500 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
501 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
502 } elseif (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && $val[
'label'] !=
'TechnicalID' && empty($val[
'arrayofkeyval'])) {
503 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
505 $cssforfield = preg_replace(
'/small\s*/',
'', $cssforfield);
506 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
507 print
getTitleFieldOfList($arrayfields[
't.'.$key][
'label'], 0, $_SERVER[
'PHP_SELF'],
't.'.$key,
'', $param, ($cssforfield ?
'class="'.$cssforfield.
'"' :
''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.
' ' :
'')).
"\n";
508 $totalarray[
'nbfield']++;
512include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
514$parameters = array(
'arrayfields'=>$arrayfields,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder,
'totalarray'=>&$totalarray);
515$reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters, $object);
516print $hookmanager->resPrint;
519 print
getTitleFieldOfList(($mode !=
'kanban' ? $selectedfields :
''), 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
521$totalarray[
'nbfield']++;
526$needToFetchEachLine = 0;
527if (isset($extrafields->attributes[
$object->table_element][
'computed']) && is_array($extrafields->attributes[
$object->table_element][
'computed']) && count($extrafields->attributes[
$object->table_element][
'computed']) > 0) {
528 foreach ($extrafields->attributes[
$object->table_element][
'computed'] as $key => $val) {
529 if (!is_null($val) && preg_match(
'/\$object/', $val)) {
530 $needToFetchEachLine++;
539$savnbfield = $totalarray[
'nbfield'];
540$totalarray[
'nbfield'] = 0;
541$imaxinloop = ($limit ? min($num, $limit) : $num);
542while ($i < $imaxinloop) {
543 $obj = $db->fetch_object($resql);
549 $object->setVarsFromFetchObj($obj);
551 if ($mode ==
'kanban') {
553 print
'<tr class="trkanban"><td colspan="'.$savnbfield.
'">';
554 print
'<div class="box-flex-container kanban">';
558 if ($massactionbutton || $massaction) {
560 if (in_array(
$object->id, $arrayofselected)) {
564 print
$object->getKanbanView(
'', array(
'selected' => $selected));
565 if ($i == ($imaxinloop - 1)) {
572 print
'<tr data-rowid="'.$object->id.
'" class="oddeven">';
575 print
'<td class="nowrap center">';
576 if ($massactionbutton || $massaction) {
578 if (in_array(
$object->id, $arrayofselected)) {
581 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.
$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
585 foreach (
$object->fields as $key => $val) {
586 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
587 if (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
588 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
589 } elseif ($key ==
'status') {
590 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
593 if (in_array($val[
'type'], array(
'timestamp'))) {
594 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
595 } elseif ($key ==
'ref') {
596 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
599 if (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && !in_array($key, array(
'rowid',
'status')) && empty($val[
'arrayofkeyval'])) {
600 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
604 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
605 print
'<td'.($cssforfield ?
' class="'.$cssforfield.(preg_match(
'/tdoverflow/', $cssforfield) ?
' classfortooltip' :
'').
'"' :
'');
606 if (preg_match(
'/tdoverflow/', $cssforfield) && !is_numeric(
$object->$key)) {
607 print
' title="'.dol_escape_htmltag(
$object->$key).
'"';
610 if ($key ==
'status') {
611 print
$object->getLibStatut(5);
612 } elseif ($key ==
'lastresult') {
613 print
'<div class="twolinesmax">';
616 } elseif ($key ==
'rowid') {
623 $totalarray[
'nbfield']++;
625 if (!empty($val[
'isameasure']) && $val[
'isameasure'] == 1) {
627 $totalarray[
'pos'][$totalarray[
'nbfield']] =
't.'.$key;
629 if (!isset($totalarray[
'val'])) {
630 $totalarray[
'val'] = array();
632 if (!isset($totalarray[
'val'][
't.'.$key])) {
633 $totalarray[
'val'][
't.'.$key] = 0;
635 $totalarray[
'val'][
't.'.$key] +=
$object->$key;
640 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
642 $parameters = array(
'arrayfields'=>$arrayfields,
'object'=>$object,
'obj'=>$obj,
'i'=>$i,
'totalarray'=>&$totalarray);
643 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $object);
644 print $hookmanager->resPrint;
647 print
'<td class="nowrap center">';
648 if ($massactionbutton || $massaction) {
650 if (in_array(
$object->id, $arrayofselected)) {
653 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.
$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
658 $totalarray[
'nbfield']++;
668include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
674 foreach ($arrayfields as $key => $val) {
675 if (!empty($val[
'checked'])) {
679 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
685$parameters = array(
'arrayfields'=>$arrayfields,
'sql'=>$sql);
686$reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object);
687print $hookmanager->resPrint;
689print
'</table>'.
"\n";
695print
'<div class="div-table-responsive-no-min">';
696print
'<table class="noborder centpercent">';
698print
'<tr class="liste_titre">';
699print
'<td>'.$langs->trans(
"Parameter").
'</td>';
704print
'<tr class="oddeven"><td>';
706print $langs->trans(
"MAIN_IMAP_USE_PHPIMAP");
708print
'<td class="left">';
709if ($conf->use_javascript_ajax) {
710 print ajax_constantonoff(
'MAIN_IMAP_USE_PHPIMAP');
712 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
713 print $form->selectarray(
"MAIN_IMAP_USE_PHPIMAP", $arrval, $conf->global->MAIN_IMAP_USE_PHPIMAP);
719print
'<tr class="oddeven"><td>'.$form->textwithpicto($langs->trans(
"EmailCollectorHideMailHeaders"), $langs->transnoentitiesnoconv(
"EmailCollectorHideMailHeadersHelp")).
'</td>';
720print
'<td class="left">';
721if ($conf->use_javascript_ajax) {
722 print ajax_constantonoff(
'MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER');
724 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
725 print $form->selectarray(
"MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER", $arrval,
getDolGlobalString(
'TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND'));
737if (in_array(
'builddoc', array_keys($arrayofmassactions)) && ($nbtotalofrecords ===
'' || $nbtotalofrecords)) {
738 $hidegeneratedfilelistifempty = 1;
739 if ($massaction ==
'builddoc' || $action ==
'remove_file' || $show_files) {
740 $hidegeneratedfilelistifempty = 0;
743 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
747 $urlsource = $_SERVER[
'PHP_SELF'].
'?sortfield='.$sortfield.
'&sortorder='.$sortorder;
748 $urlsource .= str_replace(
'&',
'&', $param);
750 $filedir = $diroutputmassaction;
751 $genallowed = $permissiontoread;
752 $delallowed = $permissiontoadd;
754 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()
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.
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.
print_barre_liste($title, $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.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
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 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.