29require
'../main.inc.php';
30require_once DOL_DOCUMENT_ROOT.
'/resource/class/dolresource.class.php';
41$langs->loadLangs(array(
"resource",
"companies",
"other"));
45$action =
GETPOST(
'action',
'alpha');
46$massaction =
GETPOST(
'massaction',
'alpha');
47$confirm =
GETPOST(
'confirm',
'alpha');
48$toselect =
GETPOST(
'toselect',
'array');
49$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'interventionlist';
52$element =
GETPOST(
'element',
'alpha');
56$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
57$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
58$optioncss =
GETPOST(
'optioncss',
'alpha');
61$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'resourcelist';
68$extrafields->fetch_name_optionals_label(
$object->table_element);
69$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
70if (!is_array($search_array_options)) {
71 $search_array_options = array();
73$search_ref =
GETPOST(
"search_ref",
'alpha');
74$search_type =
GETPOST(
"search_type",
'alpha');
75$search_address =
GETPOST(
"search_address",
'alpha');
76$search_zip =
GETPOST(
"search_zip",
'alpha');
77$search_town =
GETPOST(
"search_town",
'alpha');
78$search_state =
GETPOST(
"search_state",
'alpha');
79$search_country =
GETPOST(
"search_country",
'alpha');
80$search_phone =
GETPOST(
"search_phone",
'alpha');
81$search_email =
GETPOST(
"search_email",
'alpha');
82$search_max_users =
GETPOST(
"search_max_users",
'alpha');
83$search_url =
GETPOST(
"search_url",
'alpha');
87$hookmanager->initHooks(array(
'resourcelist'));
89if (empty($sortorder)) {
92if (empty($sortfield)) {
96$search_all = trim(
GETPOST(
'search_all',
'alphanohtml'));
102if (empty($page) || $page == -1) {
105$offset = $limit * $page;
106$pageprev = $page - 1;
107$pagenext = $page + 1;
111 'label' => $langs->trans(
"Ref"),
116 'label' => $langs->trans(
"Type"),
120 't.address' => array(
121 'label' => $langs->trans(
"Address"),
126 'label' => $langs->trans(
"Zip"),
131 'label' => $langs->trans(
"Town"),
136 'label' => $langs->trans(
"State"),
141 'label' => $langs->trans(
"Country"),
146 'label' => $langs->trans(
"Phone"),
151 'label' => $langs->trans(
"Email"),
155 't.max_users' => array(
156 'label' => $langs->trans(
"MaxUsersLabel"),
161 'label' => $langs->trans(
"URL"),
167include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
171'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';
173include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
176if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
179 $search_address =
"";
183 $search_country =
"";
186 $search_max_users =
"";
189 $search_array_options = array();
192$permissiontoread = $user->hasRight(
'resource',
'read');
193$permissiontoadd = $user->hasRight(
'resource',
'write');
194$permissiontodelete = $user->hasRight(
'resource',
'delete');
195if (!$permissiontoread) {
200$objectclass =
'Dolresource';
201$objectlabel =
'Resources';
202$uploaddir =
$conf->resource->dir_output;
203include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
209if (
GETPOST(
'cancel',
'alpha')) {
213if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
217$parameters = array();
218$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
227$form =
new Form($db);
231$title = $langs->trans(
'Resources');
235$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
236$selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage);
242$sql .=
" t.address,";
245$sql .=
" t.fk_country,";
246$sql .=
" t.fk_state,";
247$sql .=
" t.description,";
250$sql .=
" t.max_users,";
252$sql .=
" t.fk_code_type_resource,";
253$sql .=
" t.tms as date_modification,";
254$sql .=
" t.datec as date_creation, ";
255$sql .=
" ty.label as type_label, ";
256$sql .=
" st.nom as state_label, ";
257$sql .=
" co.label as country_label ";
259if (!empty($extrafields->attributes[
$object->table_element][
'label'])) {
260 foreach ($extrafields->attributes[
$object->table_element][
'label'] as $key => $val) {
261 $sql .= ($extrafields->attributes[
$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
" as options_".$key :
'');
265$parameters = array();
266$reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object, $action);
267$sql .= $hookmanager->resPrint;
271$sql .=
" FROM ".MAIN_DB_PREFIX.
"resource as t";
272$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_type_resource as ty ON ty.code=t.fk_code_type_resource";
273$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_departements as st ON st.rowid=t.fk_state";
274$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_country as co ON co.rowid=t.fk_country";
275if (isset($extrafields->attributes[
$object->table_element][
'label']) && is_array($extrafields->attributes[
$object->table_element][
'label']) && count($extrafields->attributes[
$object->table_element][
'label'])) {
276 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (t.rowid = ef.fk_object)";
280$parameters = array();
281$reshook = $hookmanager->executeHooks(
'printFieldListFrom', $parameters, $object, $action);
282$sql .= $hookmanager->resPrint;
284$sql .=
" WHERE t.entity IN (".getEntity(
'resource').
")";
291if ($search_address) {
303if ($search_country && $search_country !=
'-1') {
304 $sql .=
" AND t.fk_country IN (".$db->sanitize($search_country).
')';
312if ($search_max_users) {
320include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
322$parameters = array();
323$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object, $action);
324$sql .= $hookmanager->resPrint;
327$nbtotalofrecords =
'';
330 $sqlforcount = preg_replace(
'/^'.preg_quote($sqlfields,
'/').
'/',
'SELECT COUNT(*) as nbtotalofrecords', $sql);
331 $sqlforcount = preg_replace(
'/GROUP BY .*$/',
'', $sqlforcount);
332 $resql = $db->query($sqlforcount);
334 $objforcount = $db->fetch_object($resql);
335 $nbtotalofrecords = $objforcount->nbtotalofrecords;
340 if (($page * $limit) > $nbtotalofrecords) {
348$sql .= $db->order($sortfield, $sortorder);
350 $sql .= $db->plimit($limit + 1, $offset);
353$resql = $db->query($sql);
359$num = $db->num_rows($resql);
362if ($num == 1 &&
getDolGlobalString(
'MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
363 $obj = $db->fetch_object($resql);
371llxHeader(
'', $title, $help_url,
'', 0, 0, $morejs, $morecss,
'',
'mod-resource page-list bodyforlist');
373$arrayofselected = is_array($toselect) ? $toselect : array();
376if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
377 $param .=
'&contextpage='.urlencode($contextpage);
379if ($limit > 0 && $limit !=
$conf->liste_limit) {
380 $param .=
'&limit='.((int) $limit);
382if ($search_ref !=
'') {
383 $param .=
'&search_ref='.urlencode($search_ref);
385if ($search_type !=
'') {
386 $param .=
'&search_type='.urlencode($search_type);
388if ($search_address !=
'') {
389 $param .=
'&search_address='.urlencode($search_address);
391if ($search_zip !=
'') {
392 $param .=
'&search_zip='.urlencode($search_zip);
394if ($search_town !=
'') {
395 $param .=
'&search_town='.urlencode($search_town);
397if ($search_state !=
'') {
398 $param .=
'&search_state='.urlencode($search_state);
400if ($search_country !=
'') {
401 $param .=
'&search_country='.urlencode($search_country);
403if ($search_phone !=
'') {
404 $param .=
'&search_phone='.urlencode($search_phone);
406if ($search_email !=
'') {
407 $param .=
'&search_email='.urlencode($search_email);
409if ($search_max_users !=
'') {
410 $param .=
'&search_max_users='.urlencode($search_max_users);
412if ($search_url !=
'') {
413 $param .=
'&search_url='.urlencode($search_url);
417include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
420$arrayofmassactions = array();
421if (!empty($permissiontodelete)) {
422 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
424if (
GETPOSTINT(
'nomassaction') || in_array($massaction, array(
'presend',
'predelete'))) {
425 $arrayofmassactions = array();
427$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
429$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
430$selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN'));
432print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">';
433if ($optioncss !=
'') {
434 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
436print
'<input type="hidden" name="token" value="'.newToken().
'">';
437print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
438print
'<input type="hidden" name="action" value="list">';
439print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
440print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
441print
'<input type="hidden" name="page" value="'.$page.
'">';
442print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
445$url = DOL_URL_ROOT.
'/resource/card.php?action=create';
447$newcardbutton =
dolGetButtonTitle($langs->trans(
'NewResource'),
'',
'fa fa-plus-circle', $url,
'', $permissiontoadd);
449print_barre_liste($title, $page, $_SERVER[
'PHP_SELF'], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'object_'.
$object->picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
452$trackid =
'int'.$object->id;
453include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
455$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
456$selectedfields = ($form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN')));
457$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
459print
'<div class="div-table-responsive">';
460print
'<table class="tagtable liste">'.
"\n";
464print
'<tr class="liste_titre_filter">';
467 print
'<td class="liste_titre maxwidthsearch center">';
468 $searchpicto = $form->showFilterButtons(
'left');
472if (!empty($arrayfields[
't.ref'][
'checked'])) {
473 print
'<td class="liste_titre">';
474 print
'<input type="text" class="flat" name="search_ref" value="'.$search_ref.
'" size="8">';
477if (!empty($arrayfields[
'ty.label'][
'checked'])) {
478 print
'<td class="liste_titre">';
479 print
'<input type="text" class="flat" name="search_type" value="'.$search_type.
'" size="8">';
482if (!empty($arrayfields[
't.address'][
'checked'])) {
483 print
'<td class="liste_titre">';
484 print
'<input type="text" class="flat" name="search_address" value="'.$search_address.
'" size="8">';
487if (!empty($arrayfields[
't.zip'][
'checked'])) {
488 print
'<td class="liste_titre">';
489 print
'<input type="text" class="flat" name="search_zip" value="'.$search_zip.
'" size="8">';
492if (!empty($arrayfields[
't.town'][
'checked'])) {
493 print
'<td class="liste_titre">';
494 print
'<input type="text" class="flat" name="search_town" value="'.$search_town.
'" size="8">';
497if (!empty($arrayfields[
'st.nom'][
'checked'])) {
498 print
'<td class="liste_titre">';
499 print
'<input type="text" class="flat" name="search_state" value="'.$search_state.
'" size="8">';
502if (!empty($arrayfields[
'co.label'][
'checked'])) {
503 print
'<td class="liste_titre">';
504 print $form->select_country($search_country,
'search_country',
'', 0,
'minwidth100imp maxwidth100');
507if (!empty($arrayfields[
't.phone'][
'checked'])) {
508 print
'<td class="liste_titre">';
509 print
'<input type="text" class="flat" name="search_phone" value="'.$search_phone.
'" size="8">';
512if (!empty($arrayfields[
't.email'][
'checked'])) {
513 print
'<td class="liste_titre">';
514 print
'<input type="text" class="flat" name="search_email" value="'.$search_email.
'" size="8">';
517if (!empty($arrayfields[
't.max_users'][
'checked'])) {
518 print
'<td class="liste_titre">';
519 print
'<input type="text" class="flat" name="search_max_users" value="'.$search_max_users.
'" size="8">';
522if (!empty($arrayfields[
't.url'][
'checked'])) {
523 print
'<td class="liste_titre">';
524 print
'<input type="text" class="flat" name="search_url" value="'.$search_url.
'" size="8">';
528include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
532 print
'<td class="liste_titre center maxwidthsearch">';
533 $searchpicto = $form->showFilterButtons();
539$totalarray = array();
540$totalarray[
'nbfield'] = 0;
544print
'<tr class="liste_titre">';
547 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ');
549if (!empty($arrayfields[
't.ref'][
'checked'])) {
551 print_liste_field_titre($arrayfields[
't.ref'][
'label'], $_SERVER[
"PHP_SELF"],
"t.ref",
"", $param,
"", $sortfield, $sortorder);
553if (!empty($arrayfields[
'ty.label'][
'checked'])) {
554 print_liste_field_titre($arrayfields[
'ty.label'][
'label'], $_SERVER[
"PHP_SELF"],
"ty.label",
"", $param,
"", $sortfield, $sortorder);
556if (!empty($arrayfields[
't.address'][
'checked'])) {
557 print_liste_field_titre($arrayfields[
't.address'][
'label'], $_SERVER[
"PHP_SELF"],
"t.address",
"", $param,
"", $sortfield, $sortorder);
559if (!empty($arrayfields[
't.zip'][
'checked'])) {
560 print_liste_field_titre($arrayfields[
't.zip'][
'label'], $_SERVER[
"PHP_SELF"],
"t.zip",
"", $param,
"", $sortfield, $sortorder);
562if (!empty($arrayfields[
't.town'][
'checked'])) {
563 print_liste_field_titre($arrayfields[
't.town'][
'label'], $_SERVER[
"PHP_SELF"],
"t.town",
"", $param,
"", $sortfield, $sortorder);
565if (!empty($arrayfields[
'st.nom'][
'checked'])) {
566 print_liste_field_titre($arrayfields[
'st.nom'][
'label'], $_SERVER[
"PHP_SELF"],
"st.nom",
"", $param,
"", $sortfield, $sortorder);
568if (!empty($arrayfields[
'co.label'][
'checked'])) {
569 print_liste_field_titre($arrayfields[
'co.label'][
'label'], $_SERVER[
"PHP_SELF"],
"co.label",
"", $param,
"", $sortfield, $sortorder);
571if (!empty($arrayfields[
't.phone'][
'checked'])) {
572 print_liste_field_titre($arrayfields[
't.phone'][
'label'], $_SERVER[
"PHP_SELF"],
"t.phone",
"", $param,
"", $sortfield, $sortorder);
574if (!empty($arrayfields[
't.email'][
'checked'])) {
575 print_liste_field_titre($arrayfields[
't.email'][
'label'], $_SERVER[
"PHP_SELF"],
"t.email",
"", $param,
"", $sortfield, $sortorder);
577if (!empty($arrayfields[
't.max_users'][
'checked'])) {
578 print_liste_field_titre($arrayfields[
't.max_users'][
'label'], $_SERVER[
"PHP_SELF"],
"t.max_users",
"", $param,
"", $sortfield, $sortorder);
580if (!empty($arrayfields[
't.url'][
'checked'])) {
581 print_liste_field_titre($arrayfields[
't.url'][
'label'], $_SERVER[
"PHP_SELF"],
"t.url",
"", $param,
"", $sortfield, $sortorder);
584include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
587 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ');
594$savnbfield = $totalarray[
'nbfield'];
595$totalarray = array();
596$totalarray[
'nbfield'] = 0;
597$imaxinloop = ($limit ? min($num, $limit) : $num);
598while ($i < $imaxinloop) {
599 $obj = $db->fetch_object($resql);
600 $objectstatic->id = $obj->rowid;
601 $objectstatic->ref = $obj->ref;
602 $objectstatic->type_label = $obj->type_label;
603 $objectstatic->address = $obj->address;
604 $objectstatic->zip = $obj->zip;
605 $objectstatic->town = $obj->town;
606 $objectstatic->state = $obj->state_label;
607 $objectstatic->country = $obj->country_label;
608 $objectstatic->phone = $obj->phone;
609 $objectstatic->email = $obj->email;
610 $objectstatic->max_users = $obj->max_users;
611 $objectstatic->url = $obj->url;
613 print
'<tr data-rowid="'.$obj->rowid.
'" class="oddeven">';
616 print
'<td class="nowrap center">';
617 if ($massactionbutton || $massaction) {
619 if (in_array($obj->rowid, $arrayofselected)) {
622 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
626 $totalarray[
'nbfield']++;
630 if (!empty($arrayfields[
't.ref'][
'checked'])) {
631 print
'<td>'.$objectstatic->getNomUrl(5).
'</td>';
633 $totalarray[
'nbfield']++;
637 if (!empty($arrayfields[
'ty.label'][
'checked'])) {
638 print
'<td>'.$objectstatic->type_label.
'</td>';
640 $totalarray[
'nbfield']++;
644 if (!empty($arrayfields[
't.address'][
'checked'])) {
645 print
'<td>'.$objectstatic->address.
'</td>';
647 $totalarray[
'nbfield']++;
651 if (!empty($arrayfields[
't.zip'][
'checked'])) {
652 print
'<td>'.$objectstatic->zip.
'</td>';
654 $totalarray[
'nbfield']++;
658 if (!empty($arrayfields[
't.town'][
'checked'])) {
659 print
'<td>'.$objectstatic->town.
'</td>';
661 $totalarray[
'nbfield']++;
665 if (!empty($arrayfields[
'st.nom'][
'checked'])) {
666 print
'<td>'.$objectstatic->state.
'</td>';
668 $totalarray[
'nbfield']++;
672 if (!empty($arrayfields[
'co.label'][
'checked'])) {
673 print
'<td>'.$objectstatic->country.
'</td>';
675 $totalarray[
'nbfield']++;
679 if (!empty($arrayfields[
't.phone'][
'checked'])) {
680 print
'<td>'.dol_print_phone($objectstatic->phone,
'', 0, 0,
'AC_TEL',
" ",
'phone').
'</td>';
682 $totalarray[
'nbfield']++;
686 if (!empty($arrayfields[
't.email'][
'checked'])) {
687 print
'<td>'.dol_print_email($objectstatic->email, 0, 0, 1, 0, 0, 1).
'</td>';
689 $totalarray[
'nbfield']++;
693 if (!empty($arrayfields[
't.max_users'][
'checked'])) {
694 print
'<td>'.$objectstatic->max_users.
'</td>';
696 $totalarray[
'nbfield']++;
700 if (!empty($arrayfields[
't.url'][
'checked'])) {
701 print
'<td>'.dol_print_url($objectstatic->url,
'_blank', 32, 1).
'</td>';
703 $totalarray[
'nbfield']++;
707 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
711 print
'<td class="nowrap center">';
712 if ($massactionbutton || $massaction) {
714 if (in_array($obj->rowid, $arrayofselected)) {
717 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
721 $totalarray[
'nbfield']++;
730include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
735 foreach ($arrayfields as $key => $val) {
736 if (!empty($val[
'checked'])) {
740 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
745$parameters = array(
'arrayfields' => $arrayfields,
'sql' => $sql);
746$reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object, $action);
747print $hookmanager->resPrint;
749print
'</table>'.
"\n";
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
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.
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, $allowothertags=array())
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.
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.
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...
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...
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show 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_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
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.
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.