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';
48$langs->loadLangs(array(
"admin",
"other"));
50$action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
51$massaction =
GETPOST(
'massaction',
'alpha');
53$confirm =
GETPOST(
'confirm',
'alpha');
54$cancel =
GETPOST(
'cancel',
'alpha');
55$toselect =
GETPOST(
'toselect',
'array');
56$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'emailcollectorlist';
57$backtopage =
GETPOST(
'backtopage',
'alpha');
58$optioncss =
GETPOST(
'optioncss',
'aZ');
65$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
66$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
68if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha') || (empty($toselect) && $massaction ===
'0')) {
72$offset = $limit * $page;
81$diroutputmassaction =
$conf->emailcollector->dir_output.
'/temp/massgeneration/'.$user->id;
82$hookmanager->initHooks(array(
'emailcollectorlist'));
85$extrafields->fetch_name_optionals_label(
$object->table_element);
87$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
99if ($user->socid > 0) {
106$search_all =
GETPOST(
'search_all',
'alphanohtml');
108foreach (
$object->fields as $key => $val) {
109 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
110 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
112 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
119$fieldstosearchall = array();
120foreach (
$object->fields as $key => $val) {
121 if (!empty($val[
'searchall'])) {
122 $fieldstosearchall[
't.'.$key] = $val[
'label'];
127$arrayfields = array();
128foreach (
$object->fields as $key => $val) {
130 if (!empty($val[
'visible'])) {
131 $visible = (int)
dol_eval((
string) $val[
'visible'], 1);
132 $arrayfields[
't.'.$key] = array(
133 'label' => $val[
'label'],
134 'checked' => (($visible < 0) ? 0 : 1),
135 'enabled' => (abs($visible) != 3 && (bool)
dol_eval($val[
'enabled'], 1)),
136 'position' => $val[
'position'],
137 'help' => isset($val[
'help']) ? $val[
'help'] :
''
142include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
147$permissiontoread = $user->admin;
148$permissiontoadd = $user->admin;
149$permissiontodelete = $user->admin;
154if (!isModEnabled(
'emailcollector')) {
164if (
GETPOST(
'cancel',
'alpha')) {
168if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
172$parameters = array();
173$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
178if (empty($reshook)) {
180 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
183 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
184 foreach (
$object->fields as $key => $val) {
186 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
187 $search[$key.
'_dtstart'] =
'';
188 $search[$key.
'_dtend'] =
'';
192 $search_array_options = array();
194 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')
195 ||
GETPOST(
'button_search_x',
'alpha') ||
GETPOST(
'button_search.x',
'alpha') ||
GETPOST(
'button_search',
'alpha')) {
200 $objectclass =
'EmailCollector';
201 $objectlabel =
'EmailCollector';
202 $uploaddir =
$conf->emailcollector->dir_output;
203 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
212$form =
new Form($db);
216$help_url =
"EN:Module_EMail_Collector|FR:Module_Collecteur_de_courrier_électronique|ES:Module_EMail_Collector";
217$title = $langs->trans(
'EmailCollectors');
225$sql .=
$object->getFieldList(
't');
227if (!empty($extrafields->attributes[
$object->table_element][
'label'])) {
228 foreach ($extrafields->attributes[
$object->table_element][
'label'] as $key => $val) {
229 $sql .= ($extrafields->attributes[
$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
" as options_".$key :
'');
233$parameters = array();
234$reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object);
235$sql .= $hookmanager->resPrint;
236$sql = preg_replace(
'/,\s*$/',
'', $sql);
237$sql .=
" FROM ".MAIN_DB_PREFIX.$object->table_element.
" as t";
238if (isset($extrafields->attributes[
$object->table_element][
'label']) && is_array($extrafields->attributes[
$object->table_element][
'label']) && count($extrafields->attributes[
$object->table_element][
'label'])) {
239 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (t.rowid = ef.fk_object)";
241if (
$object->ismultientitymanaged == 1) {
242 $sql .=
" WHERE t.entity IN (".getEntity(
$object->element).
")";
244 $sql .=
" WHERE 1 = 1";
246foreach ($search as $key => $val) {
247 if (array_key_exists($key,
$object->fields)) {
248 if ($key ==
'status' && $search[$key] == -1) {
252 if ((strpos(
$object->fields[$key][
'type'],
'integer:') === 0) || (strpos(
$object->fields[$key][
'type'],
'sellist:') === 0) || !empty(
$object->fields[$key][
'arrayofkeyval'])) {
253 if ($search[$key] ==
'-1' || ($search[$key] ===
'0' && (empty(
$object->fields[$key][
'arrayofkeyval']) || !array_key_exists(
'0',
$object->fields[$key][
'arrayofkeyval'])))) {
258 if ($search[$key] !=
'') {
259 $sql .=
natural_search(
"t.".$db->sanitize($key), $search[$key], (($key ==
'status') ? 2 : $mode_search));
262 if (preg_match(
'/(_dtstart|_dtend)$/', $key) && $search[$key] !=
'') {
263 $columnName = preg_replace(
'/(_dtstart|_dtend)$/',
'', $key);
264 if (preg_match(
'/^(date|timestamp|datetime)/',
$object->fields[$columnName][
'type'])) {
265 if (preg_match(
'/_dtstart$/', $key)) {
266 $sql .=
" AND t.".$db->escape($columnName).
" >= '".$db->idate($search[$key]).
"'";
268 if (preg_match(
'/_dtend$/', $key)) {
269 $sql .=
" AND t.".$db->escape($columnName).
" <= '".$db->idate($search[$key]).
"'";
276 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
279include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
281$parameters = array();
282$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object);
283$sql .= $hookmanager->resPrint;
285$nbtotalofrecords =
'';
287 $resql = $db->query($sql);
288 $nbtotalofrecords = $db->num_rows($resql);
290 if (($page * $limit) > $nbtotalofrecords) {
298$sql .= $db->order($sortfield, $sortorder);
300 $sql .= $db->plimit($limit + 1, $offset);
303$resql = $db->query($sql);
309$num = $db->num_rows($resql);
312if ($num == 1 &&
getDolGlobalString(
'MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
313 $obj = $db->fetch_object($resql);
315 header(
"Location: ".DOL_URL_ROOT.
'/emailcollector/emailcollector_card.php?id='.$id);
323llxHeader(
'', $title, $help_url,
'', 0, 0, $morejs, $morecss,
'',
'bodyforlist mod-user page-emailcollector_list');
326$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
332$head[$h][0] = DOL_URL_ROOT.
"/admin/emailcollector_list.php";
333$head[$h][1] = $langs->trans(
"Setup");
334$head[$h][2] =
'common';
341$arrayofselected = is_array($toselect) ? $toselect : array();
344if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
345 $param .=
'&contextpage='.urlencode($contextpage);
347if ($limit > 0 && $limit !=
$conf->liste_limit) {
348 $param .=
'&limit='.((int) $limit);
350foreach ($search as $key => $val) {
351 if (is_array($search[$key]) && count($search[$key])) {
352 foreach ($search[$key] as $skey) {
354 $param .=
'&search_'.$key.
'[]='.urlencode($skey);
357 } elseif ($search[$key] !=
'') {
358 $param .=
'&search_'.$key.
'='.urlencode($search[$key]);
361if ($optioncss !=
'') {
362 $param .=
'&optioncss='.urlencode($optioncss);
365include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
367$parameters = array();
368$reshook = $hookmanager->executeHooks(
'printFieldListSearchParam', $parameters, $object);
369$param .= $hookmanager->resPrint;
372$arrayofmassactions = array(
376if ($permissiontodelete) {
377 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
379if (
GETPOSTINT(
'nomassaction') || in_array($massaction, array(
'presend',
'predelete'))) {
380 $arrayofmassactions = array();
382$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
384print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">'.
"\n";
385if ($optioncss !=
'') {
386 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
388print
'<input type="hidden" name="token" value="'.newToken().
'">';
389print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
390print
'<input type="hidden" name="action" value="list">';
391print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
392print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
393print
'<input type="hidden" name="page" value="'.$page.
'">';
394print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
397$newcardbutton .=
dolGetButtonTitle($langs->trans(
'New'),
'',
'fa fa-plus-circle',
'emailcollector_card.php?action=create&backtopage='.urlencode($_SERVER[
'PHP_SELF']),
'', $permissiontoadd);
399print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'email', 0, $newcardbutton,
'', $limit, 0, 0, 1);
406include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
413$parameters = array();
414$reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object, $action);
415if (empty($reshook)) {
416 $moreforfilter .= $hookmanager->resPrint;
418 $moreforfilter = $hookmanager->resPrint;
421if (!empty($moreforfilter)) {
422 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
423 print $moreforfilter;
427$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
428$selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN'));
429$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
431print
'<div class="div-table-responsive">';
432print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
437print
'<tr class="liste_titre">';
440 print
'<td class="liste_titre maxwidthsearch">';
441 $searchpicto = $form->showFilterButtons(
'left');
445foreach (
$object->fields as $key => $val) {
446 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
447 if ($key ==
'status') {
448 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
449 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
450 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
451 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
452 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
453 } elseif (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && $val[
'label'] !=
'TechnicalID' && empty($val[
'arrayofkeyval'])) {
454 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
456 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
457 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').
'">';
458 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
459 print $form->selectarray(
'search_'.$key, $val[
'arrayofkeyval'], (isset($search[$key]) ? $search[$key] :
''), $val[
'notnull'], 0, 0,
'', 1, 0, 0,
'',
'maxwidth100', 1);
460 } elseif ((strpos($val[
'type'],
'integer:') === 0) || (strpos($val[
'type'],
'sellist:') === 0)) {
461 print
$object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] :
''),
'',
'',
'search_',
'maxwidth125', 1);
462 } elseif (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
463 print
'<div class="nowrap">';
464 print $form->selectDate($search[$key.
'_dtstart'] ? $search[$key.
'_dtstart'] :
'',
"search_".$key.
"_dtstart", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
466 print
'<div class="nowrap">';
467 print $form->selectDate($search[$key.
'_dtend'] ? $search[$key.
'_dtend'] :
'',
"search_".$key.
"_dtend", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
469 } elseif ($key ==
'lang') {
470 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
472 print $formadmin->select_language($search[$key],
'search_lang', 0, array(), 1, 0, 0,
'minwidth100imp maxwidth125', 2);
474 print
'<input type="text" class="flat maxwidth'.($val[
'type'] ==
'integer' ?
'50' :
'75').
'" name="search_'.$key.
'" value="'.
dol_escape_htmltag(isset($search[$key]) ? $search[$key] :
'').
'">';
480include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
483$parameters = array(
'arrayfields' => $arrayfields);
484$reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters, $object);
485print $hookmanager->resPrint;
488 print
'<td class="liste_titre maxwidthsearch">';
489 $searchpicto = $form->showFilterButtons();
495$totalarray = array();
496$totalarray[
'nbfield'] = 0;
500print
'<tr class="liste_titre">';
502 print
getTitleFieldOfList(($mode !=
'kanban' ? $selectedfields :
''), 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
504foreach (
$object->fields as $key => $val) {
505 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
506 if ($key ==
'status') {
507 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
508 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
509 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
510 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
511 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
512 } elseif (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && $val[
'label'] !=
'TechnicalID' && empty($val[
'arrayofkeyval'])) {
513 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
515 $cssforfield = preg_replace(
'/small\s*/',
'', $cssforfield);
516 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
517 print
getTitleFieldOfList($arrayfields[
't.'.$key][
'label'], 0, $_SERVER[
'PHP_SELF'],
't.'.$key,
'', $param, ($cssforfield ?
'class="'.$cssforfield.
'"' :
''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.
' ' :
'')).
"\n";
518 $totalarray[
'nbfield']++;
522include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
524$parameters = array(
'arrayfields' => $arrayfields,
'param' => $param,
'sortfield' => $sortfield,
'sortorder' => $sortorder,
'totalarray' => &$totalarray);
525$reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters, $object);
526print $hookmanager->resPrint;
529 print
getTitleFieldOfList(($mode !=
'kanban' ? $selectedfields :
''), 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
531$totalarray[
'nbfield']++;
536$needToFetchEachLine = 0;
537if (isset($extrafields->attributes[
$object->table_element][
'computed']) && is_array($extrafields->attributes[
$object->table_element][
'computed']) && count($extrafields->attributes[
$object->table_element][
'computed']) > 0) {
538 foreach ($extrafields->attributes[
$object->table_element][
'computed'] as $key => $val) {
539 if (!is_null($val) && preg_match(
'/\$object/', $val)) {
540 $needToFetchEachLine++;
549$savnbfield = $totalarray[
'nbfield'];
550$totalarray[
'nbfield'] = 0;
551$imaxinloop = ($limit ? min($num, $limit) : $num);
552while ($i < $imaxinloop) {
553 $obj = $db->fetch_object($resql);
559 $object->setVarsFromFetchObj($obj);
561 if ($mode ==
'kanban') {
563 print
'<tr class="trkanban"><td colspan="'.$savnbfield.
'">';
564 print
'<div class="box-flex-container kanban">';
568 if ($massactionbutton || $massaction) {
570 if (in_array(
$object->id, $arrayofselected)) {
574 print
$object->getKanbanView(
'', array(
'selected' => $selected));
575 if ($i == ($imaxinloop - 1)) {
582 print
'<tr data-rowid="'.$object->id.
'" class="oddeven">';
585 print
'<td class="nowrap center">';
586 if ($massactionbutton || $massaction) {
588 if (in_array(
$object->id, $arrayofselected)) {
591 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.
$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
595 foreach (
$object->fields as $key => $val) {
596 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
597 if (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
598 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
599 } elseif ($key ==
'status') {
600 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
603 if (in_array($val[
'type'], array(
'timestamp'))) {
604 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
605 } elseif ($key ==
'ref') {
606 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
609 if (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && !in_array($key, array(
'rowid',
'status')) && empty($val[
'arrayofkeyval'])) {
610 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
614 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
615 print
'<td'.($cssforfield ?
' class="'.$cssforfield.(preg_match(
'/tdoverflow/', $cssforfield) ?
' classfortooltip' :
'').
'"' :
'');
616 if (preg_match(
'/tdoverflow/', $cssforfield) && !is_numeric(
$object->$key)) {
617 print
' title="'.dol_escape_htmltag(
$object->$key).
'"';
620 if ($key ==
'status') {
621 print
$object->getLibStatut(5);
622 } elseif ($key ==
'lastresult') {
623 print
'<div class="twolinesmax">';
626 } elseif ($key ==
'rowid') {
633 $totalarray[
'nbfield']++;
635 if (!empty($val[
'isameasure']) && $val[
'isameasure'] == 1) {
637 $totalarray[
'pos'][$totalarray[
'nbfield']] =
't.'.$key;
639 if (!isset($totalarray[
'val'])) {
640 $totalarray[
'val'] = array();
642 if (!isset($totalarray[
'val'][
't.'.$key])) {
643 $totalarray[
'val'][
't.'.$key] = 0;
645 $totalarray[
'val'][
't.'.$key] +=
$object->$key;
650 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
652 $parameters = array(
'arrayfields' => $arrayfields,
'object' => $object,
'obj' => $obj,
'i' => $i,
'totalarray' => &$totalarray);
653 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $object);
654 print $hookmanager->resPrint;
657 print
'<td class="nowrap center">';
658 if ($massactionbutton || $massaction) {
660 if (in_array(
$object->id, $arrayofselected)) {
663 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.
$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
668 $totalarray[
'nbfield']++;
678include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
684 foreach ($arrayfields as $key => $val) {
685 if (!empty($val[
'checked'])) {
689 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
695$parameters = array(
'arrayfields' => $arrayfields,
'sql' => $sql);
696$reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object);
697print $hookmanager->resPrint;
699print
'</table>'.
"\n";
705print
'<div class="div-table-responsive-no-min">';
706print
'<table class="noborder centpercent">';
708print
'<tr class="liste_titre">';
709print
'<td>'.$langs->trans(
"Parameter").
'</td>';
714print
'<tr class="oddeven"><td>';
716print $langs->trans(
"MAIN_IMAP_USE_PHPIMAP");
718print
'<td class="left">';
719if (
$conf->use_javascript_ajax) {
720 print ajax_constantonoff(
'MAIN_IMAP_USE_PHPIMAP');
722 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
723 print $form->selectarray(
"MAIN_IMAP_USE_PHPIMAP", $arrval,
$conf->global->MAIN_IMAP_USE_PHPIMAP);
729print
'<tr class="oddeven"><td>'.$form->textwithpicto($langs->trans(
"EmailCollectorHideMailHeaders"), $langs->transnoentitiesnoconv(
"EmailCollectorHideMailHeadersHelp")).
'</td>';
730print
'<td class="left">';
731if (
$conf->use_javascript_ajax) {
732 print ajax_constantonoff(
'MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER');
734 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
735 print $form->selectarray(
"MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER", $arrval,
getDolGlobalString(
'TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND'));
747if (in_array(
'builddoc', array_keys($arrayofmassactions)) && ($nbtotalofrecords ===
'' || $nbtotalofrecords)) {
748 $hidegeneratedfilelistifempty = 1;
749 if ($massaction ==
'builddoc' || $action ==
'remove_file' || $show_files) {
750 $hidegeneratedfilelistifempty = 0;
753 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
757 $urlsource = $_SERVER[
'PHP_SELF'].
'?sortfield='.$sortfield.
'&sortorder='.$sortorder;
758 $urlsource .= str_replace(
'&',
'&', $param);
760 $filedir = $diroutputmassaction;
761 $genallowed = $permissiontoread;
762 $delallowed = $permissiontoadd;
764 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...
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.