30require
'../main.inc.php';
38require_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:int');
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_all = trim(
GETPOST(
'search_all',
'alphanohtml'));
74$search_ref =
GETPOST(
"search_ref",
'alpha');
75$search_type =
GETPOST(
"search_type",
'alpha');
76$search_address =
GETPOST(
"search_address",
'alpha');
77$search_zip =
GETPOST(
"search_zip",
'alpha');
78$search_town =
GETPOST(
"search_town",
'alpha');
79$search_state =
GETPOST(
"search_state",
'alpha');
80$search_country =
GETPOST(
"search_country",
'alpha');
81$search_phone =
GETPOST(
"search_phone",
'alpha');
82$search_email =
GETPOST(
"search_email",
'alpha');
83$search_max_users =
GETPOST(
"search_max_users",
'alpha');
84$search_url =
GETPOST(
"search_url",
'alpha');
88$hookmanager->initHooks(array(
'resourcelist'));
90if (empty($sortorder)) {
93if (empty($sortfield)) {
97$search_all = trim(
GETPOST(
'search_all',
'alphanohtml'));
103if (empty($page) || $page == -1) {
106$offset = $limit * $page;
107$pageprev = $page - 1;
108$pagenext = $page + 1;
111$fieldstosearchall = array(
113 't.description' =>
'Description',
118 'label' => $langs->trans(
"Ref"),
123 'label' => $langs->trans(
"Type"),
127 't.address' => array(
128 'label' => $langs->trans(
"Address"),
133 'label' => $langs->trans(
"Zip"),
138 'label' => $langs->trans(
"Town"),
143 'label' => $langs->trans(
"State"),
148 'label' => $langs->trans(
"Country"),
153 'label' => $langs->trans(
"Phone"),
158 'label' => $langs->trans(
"Email"),
162 't.max_users' => array(
163 'label' => $langs->trans(
"MaxUsersLabel"),
168 'label' => $langs->trans(
"URL"),
174include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
176$parameters = array(
'arrayfields' => &$arrayfields);
177$reshook = $hookmanager->executeHooks(
'completeArrayFields', $parameters, $object, $action);
182include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
185if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
188 $search_address =
"";
192 $search_country =
"";
195 $search_max_users =
"";
198 $search_array_options = array();
201$permissiontoread = $user->hasRight(
'resource',
'read');
202$permissiontoadd = $user->hasRight(
'resource',
'write');
203$permissiontodelete = $user->hasRight(
'resource',
'delete');
204if (!$permissiontoread) {
209$objectclass =
'Dolresource';
210$objectlabel =
'Resources';
211$uploaddir =
$conf->resource->dir_output;
212include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
218if (
GETPOST(
'cancel',
'alpha')) {
222if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
226$parameters = array();
227$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
240$title = $langs->trans(
'Resources');
244$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
245$selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage);
251$sql .=
" t.address,";
254$sql .=
" t.fk_country,";
255$sql .=
" t.fk_state,";
256$sql .=
" t.description,";
259$sql .=
" t.max_users,";
261$sql .=
" t.fk_code_type_resource,";
262$sql .=
" t.tms as date_modification,";
263$sql .=
" t.datec as date_creation, ";
264$sql .=
" ty.label as type_label, ";
265$sql .=
" st.nom as state_label, ";
266$sql .=
" co.label as country_label ";
268if (!empty($extrafields->attributes[
$object->table_element][
'label'])) {
269 foreach ($extrafields->attributes[
$object->table_element][
'label'] as $key => $val) {
270 $sql .= ($extrafields->attributes[
$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
" as options_".$key :
'');
274$parameters = array();
275$reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object, $action);
276$sql .= $hookmanager->resPrint;
280$sql .=
" FROM ".MAIN_DB_PREFIX.
"resource as t";
281$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_type_resource as ty ON ty.code=t.fk_code_type_resource";
282$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_departements as st ON st.rowid=t.fk_state";
283$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_country as co ON co.rowid=t.fk_country";
284if (isset($extrafields->attributes[
$object->table_element][
'label']) && is_array($extrafields->attributes[
$object->table_element][
'label']) && count($extrafields->attributes[
$object->table_element][
'label'])) {
285 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (t.rowid = ef.fk_object)";
289$parameters = array();
290$reshook = $hookmanager->executeHooks(
'printFieldListFrom', $parameters, $object, $action);
291$sql .= $hookmanager->resPrint;
293$sql .=
" WHERE t.entity IN (".getEntity(
'resource').
")";
295if (!empty($search_all)) {
296 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
304if ($search_address) {
316if ($search_country && $search_country !=
'-1') {
317 $sql .=
" AND t.fk_country IN (".$db->sanitize($search_country).
')';
325if ($search_max_users) {
333include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
335$parameters = array();
336$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object, $action);
337$sql .= $hookmanager->resPrint;
340$nbtotalofrecords =
'';
343 $sqlforcount = preg_replace(
'/^'.preg_quote($sqlfields,
'/').
'/',
'SELECT COUNT(*) as nbtotalofrecords', $sql);
344 $sqlforcount = preg_replace(
'/GROUP BY .*$/',
'', $sqlforcount);
345 $resql =
$db->query($sqlforcount);
347 $objforcount =
$db->fetch_object($resql);
348 $nbtotalofrecords = $objforcount->nbtotalofrecords;
353 if (($page * $limit) > (
int) $nbtotalofrecords) {
361$sql .=
$db->order($sortfield, $sortorder);
363 $sql .=
$db->plimit($limit + 1, $offset);
366$resql =
$db->query($sql);
372$num =
$db->num_rows($resql);
375if ($num == 1 &&
getDolGlobalString(
'MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
376 $obj =
$db->fetch_object($resql);
384llxHeader(
'', $title, $help_url,
'', 0, 0, $morejs, $morecss,
'',
'mod-resource page-list bodyforlist');
386$arrayofselected = is_array($toselect) ? $toselect : array();
389if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
390 $param .=
'&contextpage='.urlencode($contextpage);
392if ($limit > 0 && $limit !=
$conf->liste_limit) {
393 $param .=
'&limit='.((int) $limit);
395if ($search_ref !=
'') {
396 $param .=
'&search_ref='.urlencode($search_ref);
398if ($search_type !=
'') {
399 $param .=
'&search_type='.urlencode($search_type);
401if ($search_address !=
'') {
402 $param .=
'&search_address='.urlencode($search_address);
404if ($search_zip !=
'') {
405 $param .=
'&search_zip='.urlencode($search_zip);
407if ($search_town !=
'') {
408 $param .=
'&search_town='.urlencode($search_town);
410if ($search_state !=
'') {
411 $param .=
'&search_state='.urlencode($search_state);
413if ($search_country !=
'') {
414 $param .=
'&search_country='.urlencode($search_country);
416if ($search_phone !=
'') {
417 $param .=
'&search_phone='.urlencode($search_phone);
419if ($search_email !=
'') {
420 $param .=
'&search_email='.urlencode($search_email);
422if ($search_max_users !=
'') {
423 $param .=
'&search_max_users='.urlencode($search_max_users);
425if ($search_url !=
'') {
426 $param .=
'&search_url='.urlencode($search_url);
430include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
433$arrayofmassactions = array();
434if (!empty($permissiontodelete)) {
435 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
437if (
GETPOSTINT(
'nomassaction') || in_array($massaction, array(
'presend',
'predelete'))) {
438 $arrayofmassactions = array();
440$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
442$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
443$selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
$conf->main_checkbox_left_column);
445print
'<form method="POST" id="searchFormList" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
446if ($optioncss !=
'') {
447 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
449print
'<input type="hidden" name="token" value="'.newToken().
'">';
450print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
451print
'<input type="hidden" name="action" value="list">';
452print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
453print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
454print
'<input type="hidden" name="page" value="'.$page.
'">';
455print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
458$url = DOL_URL_ROOT.
'/resource/card.php?action=create';
460$newcardbutton =
dolGetButtonTitle($langs->trans(
'NewResource'),
'',
'fa fa-plus-circle', $url,
'', $permissiontoadd);
462print_barre_liste($title, $page, $_SERVER[
'PHP_SELF'], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'object_'.
$object->picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
465$trackid =
'int'.$object->id;
466include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
470 foreach ($fieldstosearchall as $key => $val) {
471 $fieldstosearchall[$key] = $langs->trans($val);
472 $setupstring .= $key.
"=".$val.
";";
474 print
'<!-- Search done like if RESOURCE_QUICKSEARCH_ON_FIELDS = '.$setupstring.
' -->'.
"\n";
475 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).implode(
', ', $fieldstosearchall).
'</div>';
478$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
479$selectedfields = ($form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
$conf->main_checkbox_left_column));
480$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
482print
'<div class="div-table-responsive">';
483print
'<table class="tagtable liste">'.
"\n";
487print
'<tr class="liste_titre_filter">';
489if (
$conf->main_checkbox_left_column) {
490 print
'<td class="liste_titre maxwidthsearch center">';
491 $searchpicto = $form->showFilterButtons(
'left');
495if (!empty($arrayfields[
't.ref'][
'checked'])) {
496 print
'<td class="liste_titre">';
497 print
'<input type="text" class="flat" name="search_ref" value="'.$search_ref.
'" size="8">';
500if (!empty($arrayfields[
'ty.label'][
'checked'])) {
501 print
'<td class="liste_titre">';
502 print
'<input type="text" class="flat" name="search_type" value="'.$search_type.
'" size="8">';
505if (!empty($arrayfields[
't.address'][
'checked'])) {
506 print
'<td class="liste_titre">';
507 print
'<input type="text" class="flat" name="search_address" value="'.$search_address.
'" size="8">';
510if (!empty($arrayfields[
't.zip'][
'checked'])) {
511 print
'<td class="liste_titre">';
512 print
'<input type="text" class="flat" name="search_zip" value="'.$search_zip.
'" size="8">';
515if (!empty($arrayfields[
't.town'][
'checked'])) {
516 print
'<td class="liste_titre">';
517 print
'<input type="text" class="flat" name="search_town" value="'.$search_town.
'" size="8">';
520if (!empty($arrayfields[
'st.nom'][
'checked'])) {
521 print
'<td class="liste_titre">';
522 print
'<input type="text" class="flat" name="search_state" value="'.$search_state.
'" size="8">';
525if (!empty($arrayfields[
'co.label'][
'checked'])) {
526 print
'<td class="liste_titre">';
527 print $form->select_country($search_country,
'search_country',
'', 0,
'minwidth100imp maxwidth100');
530if (!empty($arrayfields[
't.phone'][
'checked'])) {
531 print
'<td class="liste_titre">';
532 print
'<input type="text" class="flat" name="search_phone" value="'.$search_phone.
'" size="8">';
535if (!empty($arrayfields[
't.email'][
'checked'])) {
536 print
'<td class="liste_titre">';
537 print
'<input type="text" class="flat" name="search_email" value="'.$search_email.
'" size="8">';
540if (!empty($arrayfields[
't.max_users'][
'checked'])) {
541 print
'<td class="liste_titre">';
542 print
'<input type="text" class="flat" name="search_max_users" value="'.$search_max_users.
'" size="8">';
545if (!empty($arrayfields[
't.url'][
'checked'])) {
546 print
'<td class="liste_titre">';
547 print
'<input type="text" class="flat" name="search_url" value="'.$search_url.
'" size="8">';
551include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
554if (!
$conf->main_checkbox_left_column) {
555 print
'<td class="liste_titre center maxwidthsearch">';
556 $searchpicto = $form->showFilterButtons();
567print
'<tr class="liste_titre">';
569if (
$conf->main_checkbox_left_column) {
570 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ');
572if (!empty($arrayfields[
't.ref'][
'checked'])) {
574 print_liste_field_titre($arrayfields[
't.ref'][
'label'], $_SERVER[
"PHP_SELF"],
"t.ref",
"", $param,
"", $sortfield, $sortorder);
576if (!empty($arrayfields[
'ty.label'][
'checked'])) {
577 print_liste_field_titre($arrayfields[
'ty.label'][
'label'], $_SERVER[
"PHP_SELF"],
"ty.label",
"", $param,
"", $sortfield, $sortorder);
579if (!empty($arrayfields[
't.address'][
'checked'])) {
580 print_liste_field_titre($arrayfields[
't.address'][
'label'], $_SERVER[
"PHP_SELF"],
"t.address",
"", $param,
"", $sortfield, $sortorder);
582if (!empty($arrayfields[
't.zip'][
'checked'])) {
583 print_liste_field_titre($arrayfields[
't.zip'][
'label'], $_SERVER[
"PHP_SELF"],
"t.zip",
"", $param,
"", $sortfield, $sortorder);
585if (!empty($arrayfields[
't.town'][
'checked'])) {
586 print_liste_field_titre($arrayfields[
't.town'][
'label'], $_SERVER[
"PHP_SELF"],
"t.town",
"", $param,
"", $sortfield, $sortorder);
588if (!empty($arrayfields[
'st.nom'][
'checked'])) {
589 print_liste_field_titre($arrayfields[
'st.nom'][
'label'], $_SERVER[
"PHP_SELF"],
"st.nom",
"", $param,
"", $sortfield, $sortorder);
591if (!empty($arrayfields[
'co.label'][
'checked'])) {
592 print_liste_field_titre($arrayfields[
'co.label'][
'label'], $_SERVER[
"PHP_SELF"],
"co.label",
"", $param,
"", $sortfield, $sortorder);
594if (!empty($arrayfields[
't.phone'][
'checked'])) {
595 print_liste_field_titre($arrayfields[
't.phone'][
'label'], $_SERVER[
"PHP_SELF"],
"t.phone",
"", $param,
"", $sortfield, $sortorder);
597if (!empty($arrayfields[
't.email'][
'checked'])) {
598 print_liste_field_titre($arrayfields[
't.email'][
'label'], $_SERVER[
"PHP_SELF"],
"t.email",
"", $param,
"", $sortfield, $sortorder);
600if (!empty($arrayfields[
't.max_users'][
'checked'])) {
601 print_liste_field_titre($arrayfields[
't.max_users'][
'label'], $_SERVER[
"PHP_SELF"],
"t.max_users",
"", $param,
"", $sortfield, $sortorder);
603if (!empty($arrayfields[
't.url'][
'checked'])) {
604 print_liste_field_titre($arrayfields[
't.url'][
'label'], $_SERVER[
"PHP_SELF"],
"t.url",
"", $param,
"", $sortfield, $sortorder);
607include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
609if (!
$conf->main_checkbox_left_column) {
610 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ');
620$imaxinloop = ($limit ? min($num, $limit) : $num);
621while ($i < $imaxinloop) {
622 $obj =
$db->fetch_object($resql);
623 $objectstatic->id = $obj->rowid;
624 $objectstatic->ref = $obj->ref;
625 $objectstatic->type_label = $obj->type_label;
626 $objectstatic->address = $obj->address;
627 $objectstatic->zip = $obj->zip;
628 $objectstatic->town = $obj->town;
629 $objectstatic->state = $obj->state_label;
630 $objectstatic->country = $obj->country_label;
631 $objectstatic->phone = $obj->phone;
632 $objectstatic->email = $obj->email;
633 $objectstatic->max_users = $obj->max_users;
634 $objectstatic->url = $obj->url;
636 print
'<tr data-rowid="'.$obj->rowid.
'" class="oddeven row-with-select">';
639 if (
$conf->main_checkbox_left_column) {
640 print
'<td class="nowrap center">';
641 if ($massactionbutton || $massaction) {
643 if (in_array($obj->rowid, $arrayofselected)) {
646 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
654 if (!empty($arrayfields[
't.ref'][
'checked'])) {
655 print
'<td class="tdoverflowmax150">'.$objectstatic->getNomUrl(5).
'</td>';
661 if (!empty($arrayfields[
'ty.label'][
'checked'])) {
662 print
'<td class="tdoverflowmax200">'.$objectstatic->type_label.
'</td>';
668 if (!empty($arrayfields[
't.address'][
'checked'])) {
669 print
'<td>'.$objectstatic->address.
'</td>';
675 if (!empty($arrayfields[
't.zip'][
'checked'])) {
676 print
'<td>'.$objectstatic->zip.
'</td>';
682 if (!empty($arrayfields[
't.town'][
'checked'])) {
683 print
'<td>'.$objectstatic->town.
'</td>';
689 if (!empty($arrayfields[
'st.nom'][
'checked'])) {
690 print
'<td>'.$objectstatic->state.
'</td>';
696 if (!empty($arrayfields[
'co.label'][
'checked'])) {
697 print
'<td>'.$objectstatic->country.
'</td>';
703 if (!empty($arrayfields[
't.phone'][
'checked'])) {
704 print
'<td>'.dol_print_phone($objectstatic->phone,
'', 0, 0,
'AC_TEL',
" ",
'phone').
'</td>';
710 if (!empty($arrayfields[
't.email'][
'checked'])) {
711 $showinvalidemail = (int) !
getDolGlobalInt(
'MAIN_SHOW_INVALID_EMAIL_IN_LIST');
712 print
'<td class="tdoverflowmax150" title="'.dolPrintHTMLForAttribute($obj->email).
'">'.
dol_print_email($objectstatic->email, 0, 0, 1, 0, $showinvalidemail, 1).
'</td>';
718 if (!empty($arrayfields[
't.max_users'][
'checked'])) {
719 print
'<td>'.$objectstatic->max_users.
'</td>';
725 if (!empty($arrayfields[
't.url'][
'checked'])) {
726 print
'<td>'.dol_print_url($objectstatic->url,
'_blank', 32, 1).
'</td>';
732 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
735 if (!
$conf->main_checkbox_left_column) {
736 print
'<td class="nowrap center">';
737 if ($massactionbutton || $massaction) {
739 if (in_array($obj->rowid, $arrayofselected)) {
742 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
755include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
760 foreach ($arrayfields as $key => $val) {
761 if (!empty($val[
'checked'])) {
765 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
770$parameters = array(
'arrayfields' => $arrayfields,
'sql' => $sql);
771$reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object, $action);
772print $hookmanager->resPrint;
774print
'</table>'.
"\n";
$id
Support class for third parties, contacts, members, users or resources.
if(! $sortfield) if(! $sortorder) $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.
dol_print_email($email, $contactid=0, $socid=0, $addlink=0, $max=0, $showinvalid=2, $withpicto=0, $morecss='paddingrightonly')
Show EMail link formatted for HTML output.
natural_search($fields, $value, $mode=0, $nofirstand=0, $sqltoadd='')
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...
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
print_liste_field_titre($name, $file="", $field="", $begin="", $param="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show 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, $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)
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_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.