27 require
'../main.inc.php';
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.
'/asset/class/asset.class.php';
34 $langs->loadLangs(array(
"assets",
"other"));
36 $action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
37 $massaction =
GETPOST(
'massaction',
'alpha');
38 $show_files =
GETPOST(
'show_files',
'int');
39 $confirm =
GETPOST(
'confirm',
'alpha');
40 $cancel =
GETPOST(
'cancel',
'alpha');
41 $toselect =
GETPOST(
'toselect',
'array');
42 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'assetlist';
43 $backtopage =
GETPOST(
'backtopage',
'alpha');
44 $optioncss =
GETPOST(
'optioncss',
'aZ');
49 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
50 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
51 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
53 if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha') || (empty($toselect) && $massaction ===
'0')) {
56 $offset = $limit * $page;
57 $pageprev = $page - 1;
58 $pagenext = $page + 1;
61 $object =
new Asset($db);
63 $diroutputmassaction = $conf->asset->dir_output.
'/temp/massgeneration/'.$user->id;
64 $hookmanager->initHooks(array(
'assetlist'));
67 $extrafields->fetch_name_optionals_label($object->table_element);
70 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element,
'',
'search_');
74 reset($object->fields);
75 $sortfield =
"t.".key($object->fields);
82 $search_all =
GETPOST(
'search_all',
'alphanohtml');
84 foreach ($object->fields as $key => $val) {
85 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
86 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
88 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
89 $search[$key.
'_dtstart'] =
dol_mktime(0, 0, 0,
GETPOST(
'search_'.$key.
'_dtstartmonth',
'int'),
GETPOST(
'search_'.$key.
'_dtstartday',
'int'),
GETPOST(
'search_'.$key.
'_dtstartyear',
'int'));
90 $search[$key.
'_dtend'] =
dol_mktime(23, 59, 59,
GETPOST(
'search_'.$key.
'_dtendmonth',
'int'),
GETPOST(
'search_'.$key.
'_dtendday',
'int'),
GETPOST(
'search_'.$key.
'_dtendyear',
'int'));
95 $fieldstosearchall = array();
96 foreach ($object->fields as $key => $val) {
97 if (!empty($val[
'searchall'])) {
98 $fieldstosearchall[
't.'.$key] = $val[
'label'];
103 $arrayfields = array();
104 foreach ($object->fields as $key => $val) {
106 if (!empty($val[
'visible'])) {
107 $visible = (int)
dol_eval($val[
'visible'], 1);
108 $arrayfields[
't.'.$key] = array(
109 'label'=>$val[
'label'],
110 'checked'=>(($visible < 0) ? 0 : 1),
111 'enabled'=>($visible != 3 &&
dol_eval($val[
'enabled'], 1)),
112 'position'=>$val[
'position'],
113 'help'=> isset($val[
'help']) ? $val[
'help'] :
''
118 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
123 $permissiontoread = $user->hasRight(
'asset',
'read');
124 $permissiontoadd = $user->hasRight(
'asset',
'write');
125 $permissiontodelete = $user->hasRight(
'asset',
'delete');
134 $socid = 0;
if ($user->socid > 0) $socid = $user->socid;
135 $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
136 restrictedArea($user, $object->element, $object->id, $object->table_element,
'',
'fk_soc',
'rowid', $isdraft);
146 if (
GETPOST(
'cancel',
'alpha')) {
150 if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
154 $parameters = array();
155 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
160 if (empty($reshook)) {
162 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
165 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
166 foreach ($object->fields as $key => $val) {
168 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
169 $search[$key.
'_dtstart'] =
'';
170 $search[$key.
'_dtend'] =
'';
174 $search_array_options = array();
176 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')
177 ||
GETPOST(
'button_search_x',
'alpha') ||
GETPOST(
'button_search.x',
'alpha') ||
GETPOST(
'button_search',
'alpha')) {
182 $objectclass =
'Asset';
183 $objectlabel =
'Asset';
184 $uploaddir = $conf->asset->dir_output;
185 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
199 $title = $langs->trans(
'ListOf', $langs->transnoentitiesnoconv(
"Assets"));
207 $sql .= $object->getFieldList(
't');
209 if (!empty($extrafields->attributes[$object->table_element][
'label'])) {
210 foreach ($extrafields->attributes[$object->table_element][
'label'] as $key => $val) {
211 $sql .= ($extrafields->attributes[$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
" as options_".$key :
'');
215 $parameters = array();
216 $reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object);
217 $sql .= $hookmanager->resPrint;
218 $sql = preg_replace(
'/,\s*$/',
'',
$sql);
222 $sql .=
" FROM ".MAIN_DB_PREFIX.$object->table_element.
" as t";
223 if (isset($extrafields->attributes[$object->table_element][
'label']) && is_array($extrafields->attributes[$object->table_element][
'label']) && count($extrafields->attributes[$object->table_element][
'label'])) {
224 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (t.rowid = ef.fk_object)";
227 $parameters = array();
228 $reshook = $hookmanager->executeHooks(
'printFieldListFrom', $parameters, $object);
229 $sql .= $hookmanager->resPrint;
230 if ($object->ismultientitymanaged == 1) {
231 $sql .=
" WHERE t.entity IN (".getEntity($object->element).
")";
233 $sql .=
" WHERE 1 = 1";
235 foreach ($search as $key => $val) {
236 if (array_key_exists($key, $object->fields)) {
237 if ($key ==
'status' && $search[$key] == -1) {
240 $mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0);
241 if ((strpos($object->fields[$key][
'type'],
'integer:') === 0) || (strpos($object->fields[$key][
'type'],
'sellist:') === 0) || !empty($object->fields[$key][
'arrayofkeyval'])) {
242 if ($search[$key] ==
'-1' || ($search[$key] ===
'0' && (empty($object->fields[$key][
'arrayofkeyval']) || !array_key_exists(
'0', $object->fields[$key][
'arrayofkeyval'])))) {
247 if ($search[$key] !=
'') {
251 if (preg_match(
'/(_dtstart|_dtend)$/', $key) && $search[$key] !=
'') {
252 $columnName = preg_replace(
'/(_dtstart|_dtend)$/',
'', $key);
253 if (preg_match(
'/^(date|timestamp|datetime)/', $object->fields[$columnName][
'type'])) {
254 if (preg_match(
'/_dtstart$/', $key)) {
255 $sql .=
" AND t.".$columnName.
" >= '".$db->idate($search[$key]).
"'";
257 if (preg_match(
'/_dtend$/', $key)) {
258 $sql .=
" AND t." . $columnName .
" <= '" . $db->idate($search[$key]) .
"'";
269 include 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;
301 $nbtotalofrecords =
'';
304 $sqlforcount = preg_replace(
'/^'.preg_quote($sqlfields,
'/').
'/',
'SELECT COUNT(*) as nbtotalofrecords',
$sql);
305 $sqlforcount = preg_replace(
'/GROUP BY .*$/',
'', $sqlforcount);
306 $resql = $db->query($sqlforcount);
308 $objforcount = $db->fetch_object($resql);
309 $nbtotalofrecords = $objforcount->nbtotalofrecords;
314 if (($page * $limit) > $nbtotalofrecords) {
322 $sql .= $db->order($sortfield, $sortorder);
324 $sql .= $db->plimit($limit + 1, $offset);
327 $resql = $db->query(
$sql);
333 $num = $db->num_rows($resql);
337 if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) {
338 $obj = $db->fetch_object($resql);
340 header(
"Location: ".DOL_URL_ROOT.
'/asset/card.php?id='.$id);
350 $arrayofselected = is_array($toselect) ? $toselect : array();
353 if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
354 $param .=
'&contextpage='.urlencode($contextpage);
356 if ($limit > 0 && $limit != $conf->liste_limit) {
357 $param .=
'&limit='.((int) $limit);
359 foreach ($search as $key => $val) {
360 if (is_array($search[$key]) && count($search[$key])) {
361 foreach ($search[$key] as $skey) {
363 $param .=
'&search_'.$key.
'[]='.urlencode($skey);
366 } elseif ($search[$key] !=
'') {
367 $param .=
'&search_'.$key.
'='.urlencode($search[$key]);
370 if ($optioncss !=
'') {
371 $param .=
'&optioncss='.urlencode($optioncss);
374 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
376 $parameters = array();
377 $reshook = $hookmanager->executeHooks(
'printFieldListSearchParam', $parameters, $object);
378 $param .= $hookmanager->resPrint;
381 $arrayofmassactions = array(
387 if ($permissiontodelete) {
388 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
390 if (
GETPOST(
'nomassaction',
'int') || in_array($massaction, array(
'presend',
'predelete'))) {
391 $arrayofmassactions = array();
393 $massactionbutton =
$form->selectMassAction(
'', $arrayofmassactions);
395 print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">'.
"\n";
396 if ($optioncss !=
'') {
397 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
399 print
'<input type="hidden" name="token" value="'.newToken().
'">';
400 print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
401 print
'<input type="hidden" name="action" value="list">';
402 print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
403 print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
404 print
'<input type="hidden" name="page" value="'.$page.
'">';
405 print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
407 $newcardbutton =
dolGetButtonTitle($langs->trans(
'New'),
'',
'fa fa-plus-circle', DOL_URL_ROOT.
'/asset/card.php?action=create&backtopage='.urlencode($_SERVER[
'PHP_SELF']),
'', $permissiontoadd);
409 print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'object_'.$object->picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
412 $topicmail =
"SendAssetRef";
413 $modelmail =
"asset";
414 $objecttmp =
new Asset($db);
415 $trackid =
'asset'.$object->id;
416 include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
419 foreach ($fieldstosearchall as $key => $val) {
420 $fieldstosearchall[$key] = $langs->trans($val);
422 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).join(
', ', $fieldstosearchall).
'</div>';
430 $parameters = array();
431 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object);
432 if (empty($reshook)) {
433 $moreforfilter .= $hookmanager->resPrint;
435 $moreforfilter = $hookmanager->resPrint;
438 if (!empty($moreforfilter)) {
439 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
440 print $moreforfilter;
444 $varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
445 $selectedfields =
$form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage);
446 $selectedfields .= (count($arrayofmassactions) ?
$form->showCheckAddButtons(
'checkforselect', 1) :
'');
448 print
'<div class="div-table-responsive">';
449 print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
454 print
'<tr class="liste_titre">';
455 foreach ($object->fields as $key => $val) {
456 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
457 if ($key ==
'status') {
458 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
459 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
460 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
461 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
462 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
463 } elseif (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && $val[
'label'] !=
'TechnicalID' && empty($val[
'arrayofkeyval'])) {
464 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
466 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
467 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').
'">';
468 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
469 print
$form->selectarray(
'search_'.$key, $val[
'arrayofkeyval'], (isset($search[$key]) ? $search[$key] :
''), $val[
'notnull'], 0, 0,
'', 1, 0, 0,
'',
'maxwidth100', 1);
470 } elseif ((strpos($val[
'type'],
'integer:') === 0) || (strpos($val[
'type'],
'sellist:') === 0)) {
471 print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] :
''),
'',
'',
'search_',
'maxwidth125', 1);
472 } elseif (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
473 print
'<div class="nowrap">';
474 print
$form->selectDate($search[$key.
'_dtstart'] ? $search[$key.
'_dtstart'] :
'',
"search_".$key.
"_dtstart", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
476 print
'<div class="nowrap">';
477 print
$form->selectDate($search[$key.
'_dtend'] ? $search[$key.
'_dtend'] :
'',
"search_".$key.
"_dtend", 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
479 } elseif ($key ==
'lang') {
480 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
482 print $formadmin->select_language($search[$key],
'search_lang', 0,
null, 1, 0, 0,
'minwidth150 maxwidth200', 2);
484 print
'<input type="text" class="flat maxwidth75" name="search_'.$key.
'" value="'.
dol_escape_htmltag(isset($search[$key]) ? $search[$key] :
'').
'">';
490 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
493 $parameters = array(
'arrayfields'=>$arrayfields);
494 $reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters, $object);
495 print $hookmanager->resPrint;
497 print
'<td class="liste_titre maxwidthsearch">';
498 $searchpicto =
$form->showFilterButtons();
506 print
'<tr class="liste_titre">';
507 foreach ($object->fields as $key => $val) {
508 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
509 if ($key ==
'status') {
510 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
511 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
512 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
513 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
514 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
515 } elseif (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && $val[
'label'] !=
'TechnicalID' && empty($val[
'arrayofkeyval'])) {
516 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
518 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
519 print
getTitleFieldOfList($arrayfields[
't.'.$key][
'label'], 0, $_SERVER[
'PHP_SELF'],
't.'.$key,
'', $param, ($cssforfield ?
'class="'.$cssforfield.
'"' :
''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.
' ' :
'')).
"\n";
523 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
525 $parameters = array(
'arrayfields'=>$arrayfields,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder);
526 $reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters, $object);
527 print $hookmanager->resPrint;
529 print
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
534 $needToFetchEachLine = 0;
535 if (isset($extrafields->attributes[$object->table_element][
'computed']) && is_array($extrafields->attributes[$object->table_element][
'computed']) && count($extrafields->attributes[$object->table_element][
'computed']) > 0) {
536 foreach ($extrafields->attributes[$object->table_element][
'computed'] as $key => $val) {
537 if (!is_null($val) && preg_match(
'/\$object/', $val)) {
538 $needToFetchEachLine++;
547 $totalarray = array();
548 $totalarray[
'nbfield'] = 0;
549 while ($i < ($limit ? min($num, $limit) : $num)) {
550 $obj = $db->fetch_object($resql);
556 $object->setVarsFromFetchObj($obj);
559 print
'<tr class="oddeven">';
560 foreach ($object->fields as $key => $val) {
561 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
562 if (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
563 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
564 } elseif ($key ==
'status') {
565 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
568 if (in_array($val[
'type'], array(
'timestamp'))) {
569 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
570 } elseif ($key ==
'ref') {
571 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
574 if (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && !in_array($key, array(
'rowid',
'status')) && empty($val[
'arrayofkeyval'])) {
575 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
579 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
580 print
'<td'.($cssforfield ?
' class="'.$cssforfield.
'"' :
'').
'>';
581 if ($key ==
'status') {
582 print $object->getLibStatut(5);
583 } elseif ($key ==
'rowid') {
584 print $object->showOutputField($val, $key, $object->id,
'');
586 print $object->showOutputField($val, $key, $object->$key,
'');
590 $totalarray[
'nbfield']++;
592 if (!empty($val[
'isameasure']) && $val[
'isameasure'] == 1) {
594 $totalarray[
'pos'][$totalarray[
'nbfield']] =
't.'.$key;
596 if (!isset($totalarray[
'val'])) {
597 $totalarray[
'val'] = array();
599 if (!isset($totalarray[
'val'][
't.'.$key])) {
600 $totalarray[
'val'][
't.'.$key] = 0;
602 $totalarray[
'val'][
't.'.$key] += $object->$key;
607 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
609 $parameters = array(
'arrayfields'=>$arrayfields,
'object'=>$object,
'obj'=>$obj,
'i'=>$i,
'totalarray'=>&$totalarray);
610 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $object);
611 print $hookmanager->resPrint;
613 print
'<td class="nowrap center">';
614 if ($massactionbutton || $massaction) {
616 if (in_array($object->id, $arrayofselected)) {
619 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
623 $totalarray[
'nbfield']++;
632 include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
637 foreach ($arrayfields as $key => $val) {
638 if (!empty($val[
'checked'])) {
642 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
648 $parameters = array(
'arrayfields'=>$arrayfields,
'sql'=>
$sql);
649 $reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object);
650 print $hookmanager->resPrint;
652 print
'</table>'.
"\n";
655 print
'</form>'.
"\n";
657 if (in_array(
'builddoc', $arrayofmassactions) && ($nbtotalofrecords ===
'' || $nbtotalofrecords)) {
658 $hidegeneratedfilelistifempty = 1;
659 if ($massaction ==
'builddoc' || $action ==
'remove_file' || $show_files) {
660 $hidegeneratedfilelistifempty = 0;
663 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
667 $urlsource = $_SERVER[
'PHP_SELF'].
'?sortfield='.$sortfield.
'&sortorder='.$sortorder;
668 $urlsource .= str_replace(
'&',
'&', $param);
670 $filedir = $diroutputmassaction;
671 $genallowed = $permissiontoread;
672 $delallowed = $permissiontoadd;
674 print $formfile->showdocuments(
'massfilesarea_asset',
'', $filedir, $urlsource, 0, $delallowed,
'', 1, 1, 0, 48, 1, $param, $title,
'',
'',
'',
null, $hidegeneratedfilelistifempty);