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';
179include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
182if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
185 $search_address =
"";
189 $search_country =
"";
192 $search_max_users =
"";
195 $search_array_options = array();
198$permissiontoread = $user->hasRight(
'resource',
'read');
199$permissiontoadd = $user->hasRight(
'resource',
'write');
200$permissiontodelete = $user->hasRight(
'resource',
'delete');
201if (!$permissiontoread) {
206$objectclass =
'Dolresource';
207$objectlabel =
'Resources';
208$uploaddir = $conf->resource->dir_output;
209include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
215if (
GETPOST(
'cancel',
'alpha')) {
219if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') {
223$parameters = array();
224$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
233$form =
new Form($db);
237$title = $langs->trans(
'Resources');
241$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
242$selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage);
248$sql .=
" t.address,";
251$sql .=
" t.fk_country,";
252$sql .=
" t.fk_state,";
253$sql .=
" t.description,";
256$sql .=
" t.max_users,";
258$sql .=
" t.fk_code_type_resource,";
259$sql .=
" t.tms as date_modification,";
260$sql .=
" t.datec as date_creation, ";
261$sql .=
" ty.label as type_label, ";
262$sql .=
" st.nom as state_label, ";
263$sql .=
" co.label as country_label ";
265if (!empty($extrafields->attributes[
$object->table_element][
'label'])) {
266 foreach ($extrafields->attributes[
$object->table_element][
'label'] as $key => $val) {
267 $sql .= ($extrafields->attributes[
$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
" as options_".$key :
'');
271$parameters = array();
272$reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object, $action);
273$sql .= $hookmanager->resPrint;
277$sql .=
" FROM ".MAIN_DB_PREFIX.
"resource as t";
278$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_type_resource as ty ON ty.code=t.fk_code_type_resource";
279$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_departements as st ON st.rowid=t.fk_state";
280$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_country as co ON co.rowid=t.fk_country";
281if (isset($extrafields->attributes[
$object->table_element][
'label']) && is_array($extrafields->attributes[
$object->table_element][
'label']) && count($extrafields->attributes[
$object->table_element][
'label'])) {
282 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (t.rowid = ef.fk_object)";
286$parameters = array();
287$reshook = $hookmanager->executeHooks(
'printFieldListFrom', $parameters, $object, $action);
288$sql .= $hookmanager->resPrint;
290$sql .=
" WHERE t.entity IN (".getEntity(
'resource').
")";
292if (!empty($search_all)) {
293 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
301if ($search_address) {
313if ($search_country && $search_country !=
'-1') {
314 $sql .=
" AND t.fk_country IN (".$db->sanitize($search_country).
')';
322if ($search_max_users) {
330include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
332$parameters = array();
333$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object, $action);
334$sql .= $hookmanager->resPrint;
337$nbtotalofrecords =
'';
340 $sqlforcount = preg_replace(
'/^'.preg_quote($sqlfields,
'/').
'/',
'SELECT COUNT(*) as nbtotalofrecords', $sql);
341 $sqlforcount = preg_replace(
'/GROUP BY .*$/',
'', $sqlforcount);
342 $resql = $db->query($sqlforcount);
344 $objforcount = $db->fetch_object($resql);
345 $nbtotalofrecords = $objforcount->nbtotalofrecords;
350 if (($page * $limit) > (
int) $nbtotalofrecords) {
358$sql .= $db->order($sortfield, $sortorder);
360 $sql .= $db->plimit($limit + 1, $offset);
363$resql = $db->query($sql);
369$num = $db->num_rows($resql);
372if ($num == 1 &&
getDolGlobalString(
'MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
373 $obj = $db->fetch_object($resql);
381llxHeader(
'', $title, $help_url,
'', 0, 0, $morejs, $morecss,
'',
'mod-resource page-list bodyforlist');
383$arrayofselected = is_array($toselect) ? $toselect : array();
386if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
387 $param .=
'&contextpage='.urlencode($contextpage);
389if ($limit > 0 && $limit != $conf->liste_limit) {
390 $param .=
'&limit='.((int) $limit);
392if ($search_ref !=
'') {
393 $param .=
'&search_ref='.urlencode($search_ref);
395if ($search_type !=
'') {
396 $param .=
'&search_type='.urlencode($search_type);
398if ($search_address !=
'') {
399 $param .=
'&search_address='.urlencode($search_address);
401if ($search_zip !=
'') {
402 $param .=
'&search_zip='.urlencode($search_zip);
404if ($search_town !=
'') {
405 $param .=
'&search_town='.urlencode($search_town);
407if ($search_state !=
'') {
408 $param .=
'&search_state='.urlencode($search_state);
410if ($search_country !=
'') {
411 $param .=
'&search_country='.urlencode($search_country);
413if ($search_phone !=
'') {
414 $param .=
'&search_phone='.urlencode($search_phone);
416if ($search_email !=
'') {
417 $param .=
'&search_email='.urlencode($search_email);
419if ($search_max_users !=
'') {
420 $param .=
'&search_max_users='.urlencode($search_max_users);
422if ($search_url !=
'') {
423 $param .=
'&search_url='.urlencode($search_url);
427include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
430$arrayofmassactions = array();
431if (!empty($permissiontodelete)) {
432 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
434if (
GETPOSTINT(
'nomassaction') || in_array($massaction, array(
'presend',
'predelete'))) {
435 $arrayofmassactions = array();
437$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
439$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
440$selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN'));
442print
'<form method="POST" id="searchFormList" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
443if ($optioncss !=
'') {
444 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
446print
'<input type="hidden" name="token" value="'.newToken().
'">';
447print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
448print
'<input type="hidden" name="action" value="list">';
449print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
450print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
451print
'<input type="hidden" name="page" value="'.$page.
'">';
452print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
455$url = DOL_URL_ROOT.
'/resource/card.php?action=create';
457$newcardbutton =
dolGetButtonTitle($langs->trans(
'NewResource'),
'',
'fa fa-plus-circle', $url,
'', $permissiontoadd);
459print_barre_liste($title, $page, $_SERVER[
'PHP_SELF'], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'object_'.
$object->picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
462$trackid =
'int'.$object->id;
463include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
467 foreach ($fieldstosearchall as $key => $val) {
468 $fieldstosearchall[$key] = $langs->trans($val);
469 $setupstring .= $key.
"=".$val.
";";
471 print
'<!-- Search done like if RESOURCE_QUICKSEARCH_ON_FIELDS = '.$setupstring.
' -->'.
"\n";
472 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).implode(
', ', $fieldstosearchall).
'</div>';
475$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
476$selectedfields = ($form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
getDolGlobalString(
'MAIN_CHECKBOX_LEFT_COLUMN')));
477$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
479print
'<div class="div-table-responsive">';
480print
'<table class="tagtable liste">'.
"\n";
484print
'<tr class="liste_titre_filter">';
487 print
'<td class="liste_titre maxwidthsearch center">';
488 $searchpicto = $form->showFilterButtons(
'left');
492if (!empty($arrayfields[
't.ref'][
'checked'])) {
493 print
'<td class="liste_titre">';
494 print
'<input type="text" class="flat" name="search_ref" value="'.$search_ref.
'" size="8">';
497if (!empty($arrayfields[
'ty.label'][
'checked'])) {
498 print
'<td class="liste_titre">';
499 print
'<input type="text" class="flat" name="search_type" value="'.$search_type.
'" size="8">';
502if (!empty($arrayfields[
't.address'][
'checked'])) {
503 print
'<td class="liste_titre">';
504 print
'<input type="text" class="flat" name="search_address" value="'.$search_address.
'" size="8">';
507if (!empty($arrayfields[
't.zip'][
'checked'])) {
508 print
'<td class="liste_titre">';
509 print
'<input type="text" class="flat" name="search_zip" value="'.$search_zip.
'" size="8">';
512if (!empty($arrayfields[
't.town'][
'checked'])) {
513 print
'<td class="liste_titre">';
514 print
'<input type="text" class="flat" name="search_town" value="'.$search_town.
'" size="8">';
517if (!empty($arrayfields[
'st.nom'][
'checked'])) {
518 print
'<td class="liste_titre">';
519 print
'<input type="text" class="flat" name="search_state" value="'.$search_state.
'" size="8">';
522if (!empty($arrayfields[
'co.label'][
'checked'])) {
523 print
'<td class="liste_titre">';
524 print $form->select_country($search_country,
'search_country',
'', 0,
'minwidth100imp maxwidth100');
527if (!empty($arrayfields[
't.phone'][
'checked'])) {
528 print
'<td class="liste_titre">';
529 print
'<input type="text" class="flat" name="search_phone" value="'.$search_phone.
'" size="8">';
532if (!empty($arrayfields[
't.email'][
'checked'])) {
533 print
'<td class="liste_titre">';
534 print
'<input type="text" class="flat" name="search_email" value="'.$search_email.
'" size="8">';
537if (!empty($arrayfields[
't.max_users'][
'checked'])) {
538 print
'<td class="liste_titre">';
539 print
'<input type="text" class="flat" name="search_max_users" value="'.$search_max_users.
'" size="8">';
542if (!empty($arrayfields[
't.url'][
'checked'])) {
543 print
'<td class="liste_titre">';
544 print
'<input type="text" class="flat" name="search_url" value="'.$search_url.
'" size="8">';
548include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
552 print
'<td class="liste_titre center maxwidthsearch">';
553 $searchpicto = $form->showFilterButtons();
564print
'<tr class="liste_titre">';
567 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ');
569if (!empty($arrayfields[
't.ref'][
'checked'])) {
571 print_liste_field_titre($arrayfields[
't.ref'][
'label'], $_SERVER[
"PHP_SELF"],
"t.ref",
"", $param,
"", $sortfield, $sortorder);
573if (!empty($arrayfields[
'ty.label'][
'checked'])) {
574 print_liste_field_titre($arrayfields[
'ty.label'][
'label'], $_SERVER[
"PHP_SELF"],
"ty.label",
"", $param,
"", $sortfield, $sortorder);
576if (!empty($arrayfields[
't.address'][
'checked'])) {
577 print_liste_field_titre($arrayfields[
't.address'][
'label'], $_SERVER[
"PHP_SELF"],
"t.address",
"", $param,
"", $sortfield, $sortorder);
579if (!empty($arrayfields[
't.zip'][
'checked'])) {
580 print_liste_field_titre($arrayfields[
't.zip'][
'label'], $_SERVER[
"PHP_SELF"],
"t.zip",
"", $param,
"", $sortfield, $sortorder);
582if (!empty($arrayfields[
't.town'][
'checked'])) {
583 print_liste_field_titre($arrayfields[
't.town'][
'label'], $_SERVER[
"PHP_SELF"],
"t.town",
"", $param,
"", $sortfield, $sortorder);
585if (!empty($arrayfields[
'st.nom'][
'checked'])) {
586 print_liste_field_titre($arrayfields[
'st.nom'][
'label'], $_SERVER[
"PHP_SELF"],
"st.nom",
"", $param,
"", $sortfield, $sortorder);
588if (!empty($arrayfields[
'co.label'][
'checked'])) {
589 print_liste_field_titre($arrayfields[
'co.label'][
'label'], $_SERVER[
"PHP_SELF"],
"co.label",
"", $param,
"", $sortfield, $sortorder);
591if (!empty($arrayfields[
't.phone'][
'checked'])) {
592 print_liste_field_titre($arrayfields[
't.phone'][
'label'], $_SERVER[
"PHP_SELF"],
"t.phone",
"", $param,
"", $sortfield, $sortorder);
594if (!empty($arrayfields[
't.email'][
'checked'])) {
595 print_liste_field_titre($arrayfields[
't.email'][
'label'], $_SERVER[
"PHP_SELF"],
"t.email",
"", $param,
"", $sortfield, $sortorder);
597if (!empty($arrayfields[
't.max_users'][
'checked'])) {
598 print_liste_field_titre($arrayfields[
't.max_users'][
'label'], $_SERVER[
"PHP_SELF"],
"t.max_users",
"", $param,
"", $sortfield, $sortorder);
600if (!empty($arrayfields[
't.url'][
'checked'])) {
601 print_liste_field_titre($arrayfields[
't.url'][
'label'], $_SERVER[
"PHP_SELF"],
"t.url",
"", $param,
"", $sortfield, $sortorder);
604include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
607 print_liste_field_titre($selectedfields, $_SERVER[
"PHP_SELF"],
"",
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ');
617$imaxinloop = ($limit ? min($num, $limit) : $num);
618while ($i < $imaxinloop) {
619 $obj = $db->fetch_object($resql);
620 $objectstatic->id = $obj->rowid;
621 $objectstatic->ref = $obj->ref;
622 $objectstatic->type_label = $obj->type_label;
623 $objectstatic->address = $obj->address;
624 $objectstatic->zip = $obj->zip;
625 $objectstatic->town = $obj->town;
626 $objectstatic->state = $obj->state_label;
627 $objectstatic->country = $obj->country_label;
628 $objectstatic->phone = $obj->phone;
629 $objectstatic->email = $obj->email;
630 $objectstatic->max_users = $obj->max_users;
631 $objectstatic->url = $obj->url;
633 print
'<tr data-rowid="'.$obj->rowid.
'" class="oddeven row-with-select">';
637 print
'<td class="nowrap center">';
638 if ($massactionbutton || $massaction) {
640 if (in_array($obj->rowid, $arrayofselected)) {
643 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
651 if (!empty($arrayfields[
't.ref'][
'checked'])) {
652 print
'<td class="tdoverflowmax150">'.$objectstatic->getNomUrl(5).
'</td>';
658 if (!empty($arrayfields[
'ty.label'][
'checked'])) {
659 print
'<td class="tdoverflowmax200">'.$objectstatic->type_label.
'</td>';
665 if (!empty($arrayfields[
't.address'][
'checked'])) {
666 print
'<td>'.$objectstatic->address.
'</td>';
672 if (!empty($arrayfields[
't.zip'][
'checked'])) {
673 print
'<td>'.$objectstatic->zip.
'</td>';
679 if (!empty($arrayfields[
't.town'][
'checked'])) {
680 print
'<td>'.$objectstatic->town.
'</td>';
686 if (!empty($arrayfields[
'st.nom'][
'checked'])) {
687 print
'<td>'.$objectstatic->state.
'</td>';
693 if (!empty($arrayfields[
'co.label'][
'checked'])) {
694 print
'<td>'.$objectstatic->country.
'</td>';
700 if (!empty($arrayfields[
't.phone'][
'checked'])) {
701 print
'<td>'.dol_print_phone($objectstatic->phone,
'', 0, 0,
'AC_TEL',
" ",
'phone').
'</td>';
707 if (!empty($arrayfields[
't.email'][
'checked'])) {
708 print
'<td>'.dol_print_email($objectstatic->email, 0, 0, 1, 0, 0, 1).
'</td>';
714 if (!empty($arrayfields[
't.max_users'][
'checked'])) {
715 print
'<td>'.$objectstatic->max_users.
'</td>';
721 if (!empty($arrayfields[
't.url'][
'checked'])) {
722 print
'<td>'.dol_print_url($objectstatic->url,
'_blank', 32, 1).
'</td>';
728 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
732 print
'<td class="nowrap center">';
733 if ($massactionbutton || $massaction) {
735 if (in_array($obj->rowid, $arrayofselected)) {
738 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
751include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
756 foreach ($arrayfields as $key => $val) {
757 if (!empty($val[
'checked'])) {
761 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
766$parameters = array(
'arrayfields' => $arrayfields,
'sql' => $sql);
767$reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object, $action);
768print $hookmanager->resPrint;
770print
'</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.
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)
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, $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)
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.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.