49 if (!$res && !empty(
$_SERVER[
"CONTEXT_DOCUMENT_ROOT"])) $res = @include
$_SERVER[
"CONTEXT_DOCUMENT_ROOT"].
"/main.inc.php";
51 $tmp = empty(
$_SERVER[
'SCRIPT_FILENAME']) ?
'' :
$_SERVER[
'SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1;
52 while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; }
53 if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1)).
"/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1)).
"/main.inc.php";
54 if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1))).
"/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1))).
"/main.inc.php";
56 if (!$res && file_exists(
"../main.inc.php")) $res = @include
"../main.inc.php";
57 if (!$res && file_exists(
"../../main.inc.php")) $res = @include
"../../main.inc.php";
58 if (!$res && file_exists(
"../../../main.inc.php")) $res = @include
"../../../main.inc.php";
59 if (!$res) die(
"Include of main fails");
61 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
62 require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
63 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
66 require_once __DIR__.
'/class/myobject.class.php';
72 $langs->loadLangs(array(
"mymodule@mymodule",
"other"));
74 $action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
75 $massaction =
GETPOST(
'massaction',
'alpha');
76 $show_files =
GETPOST(
'show_files',
'int');
77 $confirm =
GETPOST(
'confirm',
'alpha');
78 $cancel =
GETPOST(
'cancel',
'alpha');
79 $toselect =
GETPOST(
'toselect',
'array');
80 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'myobjectlist';
81 $backtopage =
GETPOST(
'backtopage',
'alpha');
82 $optioncss =
GETPOST(
'optioncss',
'aZ');
87 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
88 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
89 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
91 if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) { $page = 0; }
92 $offset = $limit * $page;
93 $pageprev = $page - 1;
94 $pagenext = $page + 1;
99 $diroutputmassaction = $conf->mymodule->dir_output.
'/temp/massgeneration/'.$user->id;
100 $hookmanager->initHooks(array(
'myobjectlist'));
103 $extrafields->fetch_name_optionals_label($object->table_element);
106 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element,
'',
'search_');
109 if (!$sortfield) { reset($object->fields); $sortfield=
"t.".key($object->fields); }
110 if (!$sortorder) $sortorder =
"ASC";
113 $search_all =
GETPOST(
'search_all',
'alphanohtml') ?
GETPOST(
'search_all',
'alphanohtml') :
GETPOST(
'sall',
'alphanohtml');
115 foreach ($object->fields as $key => $val)
117 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
121 $fieldstosearchall = array();
122 foreach ($object->fields as $key => $val)
124 if ($val[
'searchall']) $fieldstosearchall[
't.'.$key] = $val[
'label'];
128 $arrayfields = array();
129 foreach ($object->fields as $key => $val) {
131 if (!empty($val[
'visible'])) {
132 $visible = (int)
dol_eval($val[
'visible'], 1);
133 $arrayfields[
't.'.$key] = array(
134 'label'=>$val[
'label'],
135 'checked'=>(($visible < 0) ? 0 : 1),
136 'enabled'=>($visible != 3 &&
dol_eval($val[
'enabled'], 1)),
137 'position'=>$val[
'position'],
143 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
148 $permissiontoread = $user->rights->mymodule->myobject->read;
149 $permissiontoadd = $user->rights->mymodule->myobject->write;
150 $permissiontodelete = $user->rights->mymodule->myobject->delete;
153 if (empty($conf->mymodule->enabled))
accessforbidden(
'Module not enabled');
155 if ($user->socid > 0)
169 if (
GETPOST(
'cancel',
'alpha')) { $action =
'list'; $massaction =
''; }
170 if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') { $massaction =
''; }
172 $parameters = array();
173 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
174 if ($reshook < 0)
setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
179 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
182 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha'))
184 foreach ($object->fields as $key => $val) {
188 $search_array_options = array();
190 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')
191 ||
GETPOST(
'button_search_x',
'alpha') ||
GETPOST(
'button_search.x',
'alpha') ||
GETPOST(
'button_search',
'alpha'))
197 $objectclass =
'MyObject';
198 $objectlabel =
'MyObject';
199 $uploaddir = $conf->mymodule->dir_output;
200 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
209 $form =
new Form($db);
215 $title = $langs->trans(
'ListOf', $langs->transnoentitiesnoconv(
"MyObjects"));
221 foreach ($object->fields as $key => $val)
223 $sql .=
't.'.$key.
', ';
226 if (!empty($extrafields->attributes[$object->table_element][
'label'])) {
227 foreach ($extrafields->attributes[$object->table_element][
'label'] as $key => $val) $sql .= ($extrafields->attributes[$object->table_element][
'type'][$key] !=
'separate' ?
"ef.".$key.
' as options_'.$key.
', ' :
'');
230 $parameters = array();
231 $reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object);
232 $sql .= preg_replace(
'/^,/',
'', $hookmanager->resPrint);
233 $sql = preg_replace(
'/,\s*$/',
'', $sql);
234 $sql .=
" FROM ".MAIN_DB_PREFIX.$object->table_element.
" as t";
235 if (is_array($extrafields->attributes[$object->table_element][
'label']) && count($extrafields->attributes[$object->table_element][
'label'])) $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (t.rowid = ef.fk_object)";
237 $parameters = array();
238 $reshook = $hookmanager->executeHooks(
'printFieldListFrom', $parameters, $object);
239 $sql .= $hookmanager->resPrint;
240 if ($object->ismultientitymanaged == 1) $sql .=
" WHERE t.entity IN (".getEntity($object->element).
")";
241 else $sql .=
" WHERE 1 = 1";
242 foreach ($search as $key => $val)
244 if ($key ==
'status' && $search[$key] == -1)
continue;
245 $mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0);
246 if (strpos($object->fields[$key][
'type'],
'integer:') === 0) {
247 if ($search[$key] ==
'-1') $search[$key] =
'';
250 if ($search[$key] !=
'') $sql .=
natural_search($key, $search[$key], (($key ==
'status') ? 2 : $mode_search));
252 if ($search_all) $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
255 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
257 $parameters = array();
258 $reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object);
259 $sql .= $hookmanager->resPrint;
278 $sql .= $db->order($sortfield, $sortorder);
281 $nbtotalofrecords =
'';
282 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
283 $resql = $db->query($sql);
284 $nbtotalofrecords = $db->num_rows(
$resql);
285 if (($page * $limit) > $nbtotalofrecords) {
291 if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) {
292 $num = $nbtotalofrecords;
294 if ($limit) $sql .= $db->plimit($limit + 1, $offset);
296 $resql = $db->query($sql);
302 $num = $db->num_rows(
$resql);
306 if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page)
308 $obj = $db->fetch_object(
$resql);
310 header(
"Location: ".
dol_buildpath(
'/mymodule/myobject_card.php', 1).
'?id='.$id);
321 print '<script type="text/javascript" language="javascript">
322 jQuery(document).ready(function() {
323 function init_myfunc()
325 jQuery("#myid").removeAttr(\'disabled\');
326 jQuery("#myid").attr(\'disabled\',\'disabled\');
329 jQuery("#mybutton").click(function() {
335 $arrayofselected = is_array($toselect) ? $toselect : array();
338 if (!empty($contextpage) && $contextpage !=
$_SERVER[
"PHP_SELF"]) $param .=
'&contextpage='.urlencode($contextpage);
339 if ($limit > 0 && $limit != $conf->liste_limit) $param .=
'&limit='.urlencode($limit);
340 foreach ($search as $key => $val)
342 if (is_array($search[$key]) && count($search[$key]))
foreach ($search[$key] as $skey) $param .=
'&search_'.$key.
'[]='.urlencode($skey);
343 else $param .=
'&search_'.$key.
'='.urlencode($search[$key]);
345 if ($optioncss !=
'') $param .=
'&optioncss='.urlencode($optioncss);
347 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
349 $parameters = array();
350 $reshook = $hookmanager->executeHooks(
'printFieldListSearchParam', $parameters, $object);
351 $param .= $hookmanager->resPrint;
354 $arrayofmassactions = array(
360 if ($permissiontodelete) $arrayofmassactions[
'predelete'] =
'<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans(
"Delete");
361 if (
GETPOST(
'nomassaction',
'int') || in_array($massaction, array(
'presend',
'predelete'))) $arrayofmassactions = array();
362 $massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
364 print '<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">'.
"\n";
365 if ($optioncss !=
'')
print '<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
366 print '<input type="hidden" name="token" value="'.newToken().
'">';
367 print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
368 print '<input type="hidden" name="action" value="list">';
369 print '<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
370 print '<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
371 print '<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
373 $newcardbutton =
dolGetButtonTitle($langs->trans(
'New'),
'',
'fa fa-plus-circle',
dol_buildpath(
'/mymodule/myobject_card.php', 1).
'?action=create&backtopage='.urlencode(
$_SERVER[
'PHP_SELF']),
'', $permissiontoadd);
375 print_barre_liste($title, $page,
$_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'object_'.$object->picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
378 $topicmail =
"SendMyObjectRef";
379 $modelmail =
"myobject";
381 $trackid =
'xxxx'.$object->id;
382 include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
386 foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val);
387 print '<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).join(
', ', $fieldstosearchall).
'</div>';
395 $parameters = array();
396 $reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object);
397 if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint;
398 else $moreforfilter = $hookmanager->resPrint;
400 if (!empty($moreforfilter))
402 print '<div class="liste_titre liste_titre_bydiv centpercent">';
403 print $moreforfilter;
407 $varpage = empty($contextpage) ?
$_SERVER[
"PHP_SELF"] : $contextpage;
408 $selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage);
409 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
411 print '<div class="div-table-responsive">';
412 print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
417 print '<tr class="liste_titre">';
418 foreach ($object->fields as $key => $val)
420 $cssforfield = (empty($val[
'css']) ?
'' : $val[
'css']);
421 if ($key ==
'status') $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
422 elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'center';
423 elseif (in_array($val['
type'], array('timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
424 elseif (in_array($val['type'], array('
double(24,8)', '
double(6,3)', 'integer', 'real', '
price')) && $val['label'] != 'TechnicalID') $cssforfield .= ($cssforfield ? ' ' : '').'right';
425 if (!empty($arrayfields['t.'.$key]['checked']))
427 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').
'">';
428 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) print $form->selectarray(
'search_'.$key, $val[
'arrayofkeyval'], $search[$key], $val[
'notnull'], 0, 0,
'', 1, 0, 0,
'',
'maxwidth100', 1);
429 elseif (strpos($val[
'type'],
'integer:') === 0) {
430 print $object->showInputField($val, $key, $search[$key],
'',
'',
'search_',
'maxwidth125', 1);
431 } elseif (!preg_match(
'/^(date|timestamp)/', $val[
'type'])) print '<input type="text" class="flat maxwidth75"
name="search_'.$key.'" value="'.
dol_escape_htmltag($search[$key]).'">';
436 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
439 $parameters = array('arrayfields'=>$arrayfields);
440 $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object);
441 print $hookmanager->resPrint;
443 print '<td class="liste_titre maxwidthsearch">';
444 $searchpicto = $form->showFilterButtons();
452 print '<tr class="liste_titre">';
453 foreach ($object->
fields as $key => $val)
455 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
456 if ($key ==
'status') $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
457 elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'center';
458 elseif (in_array($val['type'], array('timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
459 elseif (in_array($val['type'], array('
double(24,8)', '
double(6,3)', 'integer', 'real', '
price')) && $val['label'] != 'TechnicalID') $cssforfield .= ($cssforfield ? ' ' : '').'right';
460 if (!empty($arrayfields['t.'.$key]['checked']))
462 print
getTitleFieldOfList($arrayfields[
't.'.$key][
'label'], 0,
$_SERVER[
'PHP_SELF'],
't.'.$key,
'', $param, ($cssforfield ?
'class="'.$cssforfield.
'"' :
''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.
' ' :
'')).
"\n";
466 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
468 $parameters = array(
'arrayfields'=>$arrayfields,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder);
469 $reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters, $object);
470 print $hookmanager->resPrint;
472 print
getTitleFieldOfList($selectedfields, 0,
$_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
477 $needToFetchEachLine = 0;
478 if (is_array($extrafields->attributes[$object->table_element][
'computed']) && count($extrafields->attributes[$object->table_element][
'computed']) > 0)
480 foreach ($extrafields->attributes[$object->table_element][
'computed'] as $key => $val)
482 if (preg_match(
'/\$object/', $val)) $needToFetchEachLine++;
490 $totalarray = array();
491 while ($i < ($limit ? min($num, $limit) : $num))
493 $obj = $db->fetch_object(
$resql);
494 if (empty($obj))
break;
497 $object->setVarsFromFetchObj($obj);
500 print
'<tr class="oddeven">';
501 foreach ($object->fields as $key => $val)
503 $cssforfield = (empty($val[
'css']) ?
'' : $val[
'css']);
504 if (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
505 elseif ($key ==
'status') $cssforfield .= ($cssforfield ? ' ' : '').'center';
507 if (in_array($val['type'], array('timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
508 elseif ($key == 'ref') $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
510 if (in_array($val['type'], array('
double(24,8)', '
double(6,3)', 'integer', 'real', '
price')) && !in_array($key, array('
rowid', 'status'))) $cssforfield .= ($cssforfield ? ' ' : '').'right';
513 if (!empty($arrayfields['t.'.$key]['checked']))
515 print
'<td'.($cssforfield ?
' class="'.$cssforfield.
'"' :
'').
'>';
516 if ($key ==
'status') print $object->getLibStatut(5);
517 else print $object->showOutputField($val, $key, $object->$key,
'');
519 if (!$i) $totalarray[
'nbfield']++;
520 if (!empty($val[
'isameasure']))
522 if (!$i) $totalarray[
'pos'][$totalarray[
'nbfield']] =
't.'.$key;
523 $totalarray[
'val'][
't.'.$key] += $object->$key;
528 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
530 $parameters = array(
'arrayfields'=>$arrayfields,
'object'=>$object,
'obj'=>$obj,
'i'=>$i,
'totalarray'=>&$totalarray);
531 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $object);
532 print $hookmanager->resPrint;
534 print
'<td class="nowrap center">';
535 if ($massactionbutton || $massaction)
538 if (in_array($object->id, $arrayofselected)) $selected = 1;
539 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
542 if (!$i) $totalarray[
'nbfield']++;
550 include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
556 foreach ($arrayfields as $key => $val) {
if (!empty($val[
'checked'])) $colspan++; }
557 print
'<tr><td colspan="'.$colspan.
'" class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</td></tr>';
563 $parameters = array(
'arrayfields'=>$arrayfields,
'sql'=>$sql);
564 $reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object);
565 print $hookmanager->resPrint;
567 print
'</table>'.
"\n";
570 print
'</form>'.
"\n";
572 if (in_array(
'builddoc', $arrayofmassactions) && ($nbtotalofrecords ===
'' || $nbtotalofrecords))
574 $hidegeneratedfilelistifempty = 1;
575 if ($massaction ==
'builddoc' || $action ==
'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0;
577 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
581 $urlsource =
$_SERVER[
'PHP_SELF'].
'?sortfield='.$sortfield.
'&sortorder='.$sortorder;
582 $urlsource .= str_replace(
'&',
'&', $param);
584 $filedir = $diroutputmassaction;
585 $genallowed = $permissiontoread;
586 $delallowed = $permissiontoadd;
588 print $formfile->showdocuments(
'massfilesarea_mymodule',
'', $filedir, $urlsource, 0, $delallowed,
'', 1, 1, 0, 48, 1, $param, $title,
'',
'',
'', null, $hidegeneratedfilelistifempty);
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_eval($s, $returnvalue=0, $hideerrors=1)
Replace eval function to add more security.
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.
</td >< tdcolspan="3">< spanclass="opacitymedium"></span ></td ></tr >< trclass="liste_total"> CREANCES DETTES< tdcolspan="3"class="right"></td >< tdcolspan="3"class="right"></td ></tr > CREANCES DETTES RECETTES DEPENSES trips CREANCES DETTES Y m expensereport p date_valid Y m expensereport pe datep $db idate($date_start)."' AND $column < p rowid
foreach($object->fields as $key=> $val) if(is_array($extrafields->attributes[$object->table_element]['label'])&&count($extrafields->attributes[$object->table_element]['label']) > 0) $object fields
dol_now($mode= 'auto')
Return date for now.
$conf db name
Only used if Module[ID]Name translation string is not found.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
price($amount, $form=0, $outlangs= '', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code= '')
Function to format a value into an amount for visual output Function used into PDF and HTML pages...
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
print_barre_liste($titre, $page, $file, $options= '', $sortfield= '', $sortorder= '', $morehtmlcenter= '', $num=-1, $totalnboflines= '', $picto= 'generic', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limit=-1, $hideselectlimit=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow= '')
Print a title with navigation controls for pagination.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname.
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
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...
print $_SERVER["PHP_SELF"]
Edit parameters.
dol_sort_array(&$array, $index, $order= 'asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by second index function, which produces ascending (default) or descending output...
print
Draft customers invoices.
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
print $_SERVER["PHP_SELF"] n
Edit parameters.
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip= '', $forcenowrapcolumntitle=0)
Get title line of an array.
if(!defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN'
Draft customers invoices.
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $keepmoretags= '', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields...