27require
'../../../main.inc.php';
28require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/product/stock/stocktransfer/class/stocktransfer.class.php';
35$langs->loadLangs(array(
"stocks",
"other"));
37$action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
38$massaction =
GETPOST(
'massaction',
'alpha');
39$show_files =
GETPOST(
'show_files',
'int');
40$confirm =
GETPOST(
'confirm',
'alpha');
41$cancel =
GETPOST(
'cancel',
'alpha');
42$toselect =
GETPOST(
'toselect',
'array');
43$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'stocktransferlist';
44$backtopage =
GETPOST(
'backtopage',
'alpha');
45$optioncss =
GETPOST(
'optioncss',
'aZ');
50$limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
51$sortfield =
GETPOST(
'sortfield',
'alpha');
52$sortorder =
GETPOST(
'sortorder',
'alpha');
53$page = GETPOSTISSET(
'pageplusone') ? (
GETPOST(
'pageplusone') - 1) :
GETPOST(
"page",
'int');
54if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) { $page = 0; }
55$offset = $limit * $page;
62$diroutputmassaction = $conf->stocktransfer->dir_output.
'/temp/massgeneration/'.$user->id;
63$hookmanager->initHooks(array(
'stocktransferlist'));
66$extrafields->fetch_name_optionals_label($object->table_element);
69$search_array_options = $extrafields->getOptionalsFromPost($object->table_element,
'',
'search_');
72if (!$sortfield) $sortfield =
"t.".key($object->fields);
73if (!$sortorder) $sortorder =
"ASC";
76$search_all =
GETPOST(
'search_all',
'alphanohtml') ? trim(
GETPOST(
'search_all',
'alphanohtml')) : trim(
GETPOST(
'sall',
'alphanohtml'));
78foreach ($object->fields as $key => $val) {
79 if (
GETPOST(
'search_'.$key,
'alpha') !==
'') $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
83$fieldstosearchall = array();
84foreach ($object->fields as $key => $val) {
85 if ($val[
'searchall']) $fieldstosearchall[
't.'.$key] = $val[
'label'];
89$arrayfields = array();
90foreach ($object->fields as $key => $val) {
92 if (!empty($val[
'visible'])) $arrayfields[
't.'.$key] = array(
'label'=>$val[
'label'],
'checked'=>(($val[
'visible'] < 0) ? 0 : 1),
'enabled'=>(
verifCond($val[
'enabled']) && ($val[
'visible'] != 3)),
'position'=>$val[
'position']);
96if (is_array($extrafields->attributes[$object->table_element][
'label']) && count($extrafields->attributes[$object->table_element][
'label']) > 0) {
97 foreach ($extrafields->attributes[$object->table_element][
'label'] as $key => $val) {
98 if (!empty($extrafields->attributes[$object->table_element][
'list'][$key])) {
99 $arrayfields[
"ef.".$key] = array(
100 'label'=>$extrafields->attributes[$object->table_element][
'label'][$key],
101 'checked'=>(($extrafields->attributes[$object->table_element][
'list'][$key] < 0) ? 0 : 1),
102 'position'=>$extrafields->attributes[$object->table_element][
'pos'][$key],
103 'enabled'=>(abs($extrafields->attributes[$object->table_element][
'list'][$key]) != 3 && $extrafields->attributes[$object->table_element][
'perms'][$key]),
104 'langfile'=>$extrafields->attributes[$object->table_element][
'langfile'][$key]
112$permissiontoread = $user->rights->stocktransfer->stocktransfer->read;
113$permissiontoadd = $user->rights->stocktransfer->stocktransfer->write;
114$permissiontodelete = $user->rights->stocktransfer->stocktransfer->delete;
117if (empty($conf->stocktransfer->enabled))
accessforbidden(
'Module not enabled');
119if ($user->socid > 0) {
132if (
GETPOST(
'cancel',
'alpha')) { $action =
'list'; $massaction =
''; }
133if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend') { $massaction =
''; }
135$parameters = array();
136$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
137if ($reshook < 0)
setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
139if (empty($reshook)) {
141 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
144 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
145 foreach ($object->fields as $key => $val) {
149 $search_array_options = array();
151 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')
152 ||
GETPOST(
'button_search_x',
'alpha') ||
GETPOST(
'button_search.x',
'alpha') ||
GETPOST(
'button_search',
'alpha')) {
157 $objectclass =
'StockTransfer';
158 $objectlabel =
'StockTransfer';
159 $uploaddir = $conf->stocktransfer->dir_output;
160 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
169$form =
new Form($db);
175$title = $langs->trans(
'StockTransferList');
181$sql .= $object->getFieldList(
't');
183if (!empty($extrafields->attributes[$object->table_element][
'label'])) {
184 foreach ($extrafields->attributes[$object->table_element][
'label'] as $key => $val) {
185 $sql .= ($extrafields->attributes[$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
" as options_".$key :
'');
189$parameters = array();
190$reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object);
191$sql .= $hookmanager->resPrint;
192$sql = preg_replace(
'/,\s*$/',
'', $sql);
193$sql .=
" FROM ".MAIN_DB_PREFIX.$object->table_element.
" as t";
194if (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)";
195if ($object->ismultientitymanaged == 1) $sql .=
" WHERE t.entity IN (".getEntity($object->element).
")";
196else $sql .=
" WHERE 1 = 1";
197foreach ($search as $key => $val) {
198 if ($key ==
'status' && $search[$key] == -1)
continue;
199 $mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0);
200 if (strpos($object->fields[$key][
'type'],
'integer:') === 0) {
201 if ($search[$key] ==
'-1') $search[$key] =
'';
204 if ($search[$key] !=
'') $sql .=
natural_search($key, $search[$key], (($key ==
'status') ? 2 : $mode_search));
206if ($search_all) $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
209include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
211$parameters = array();
212$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object);
213$sql .= $hookmanager->resPrint;
232$sql .= $db->order($sortfield, $sortorder);
235$nbtotalofrecords =
'';
237 $resql = $db->query($sql);
238 $nbtotalofrecords = $db->num_rows($resql);
239 if (($page * $limit) > $nbtotalofrecords) {
245if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) {
246 $num = $nbtotalofrecords;
248 if ($limit) $sql .= $db->plimit($limit + 1, $offset);
250 $resql = $db->query($sql);
256 $num = $db->num_rows($resql);
260if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) {
261 $obj = $db->fetch_object($resql);
263 header(
"Location: ".
dol_buildpath(
'/product/stock/stocktransfer/stocktransfer_card.php', 1).
'?id='.$id);
274print
'<script type="text/javascript" language="javascript">
275jQuery(document).ready(function() {
276 function init_myfunc()
278 jQuery("#myid").removeAttr(\'disabled\');
279 jQuery("#myid").attr(\'disabled\',\'disabled\');
282 jQuery("#mybutton").click(function() {
288$arrayofselected = is_array($toselect) ? $toselect : array();
291if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) $param .=
'&contextpage='.urlencode($contextpage);
292if ($limit > 0 && $limit != $conf->liste_limit) $param .=
'&limit='.((int) $limit);
293foreach ($search as $key => $val) {
294 if (is_array($search[$key]) && count($search[$key]))
foreach ($search[$key] as $skey) $param .=
'&search_'.$key.
'[]='.urlencode($skey);
295 else $param .=
'&search_'.$key.
'='.urlencode($search[$key]);
297if ($optioncss !=
'') $param .=
'&optioncss='.urlencode($optioncss);
299include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
302$arrayofmassactions = array(
308if ($permissiontodelete) $arrayofmassactions[
'predelete'] =
'<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans(
"Delete");
309if (
GETPOST(
'nomassaction',
'int') || in_array($massaction, array(
'presend',
'predelete'))) $arrayofmassactions = array();
310$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
312print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">'.
"\n";
313if ($optioncss !=
'') print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
314print
'<input type="hidden" name="token" value="'.newToken().
'">';
315print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
316print
'<input type="hidden" name="action" value="list">';
317print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
318print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
320print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
322$newcardbutton =
dolGetButtonTitle($langs->trans(
'New'),
'',
'fa fa-plus-circle',
dol_buildpath(
'/product/stock/stocktransfer/stocktransfer_card.php', 1).
'?action=create',
'', $permissiontoadd);
324print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords,
'object_'.$object->picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
327$topicmail =
"SendStockTransferRef";
328$modelmail =
"stocktransfer";
330$trackid =
'xxxx'.$object->id;
331include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
334 foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val);
335 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).join(
', ', $fieldstosearchall).
'</div>';
343$parameters = array();
344$reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object);
345if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint;
346else $moreforfilter = $hookmanager->resPrint;
348if (!empty($moreforfilter)) {
349 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
350 print $moreforfilter;
354$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
355$selectedfields = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage);
356$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
358print
'<div class="div-table-responsive">';
359print
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
364print
'<tr class="liste_titre">';
365foreach ($object->fields as $key => $val) {
366 $cssforfield = (empty($val[
'css']) ?
'' : $val[
'css']);
367 if ($key ==
'status') $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
368 elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'center';
369 elseif (in_array($val['
type'], array('timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
370 elseif (in_array($val['
type'], array('
double(24,8)', '
double(6,3)', 'integer', 'real', '
price')) && $val['label'] != 'TechnicalID') $cssforfield .= ($cssforfield ? ' ' : '').'right';
371 if (!empty($arrayfields['t.'.$key]['checked'])) {
372 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').
'">';
373 if (is_array($val[
'arrayofkeyval'])) print $form->selectarray(
'search_'.$key, $val[
'arrayofkeyval'], $search[$key], $val[
'notnull'], 0, 0,
'', 1, 0, 0,
'',
'maxwidth75');
374 elseif (strpos($val[
'type'],
'integer:') === 0) {
375 print $object->showInputField($val, $key, $search[$key],
'',
'',
'search_',
'maxwidth150', 1);
376 } elseif (!preg_match(
'/^(date|timestamp)/', $val[
'type'])) print
'<input type="text" class="flat maxwidth75" name="search_'.$key.
'" value="'.
dol_escape_htmltag($search[$key]).
'">';
381include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
384$parameters = array(
'arrayfields'=>$arrayfields);
385$reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters, $object);
386print $hookmanager->resPrint;
388print
'<td class="liste_titre maxwidthsearch">';
389$searchpicto = $form->showFilterButtons();
397print
'<tr class="liste_titre">';
398foreach ($object->fields as $key => $val) {
399 $cssforfield = (empty($val[
'css']) ?
'' : $val[
'css']);
400 if ($key ==
'status') $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
401 elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'center';
402 elseif (in_array($val['
type'], array('timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
403 elseif (in_array($val['
type'], array('
double(24,8)', '
double(6,3)', 'integer', 'real', '
price')) && $val['label'] != 'TechnicalID') $cssforfield .= ($cssforfield ? ' ' : '').'right';
404 if (!empty($arrayfields['t.'.$key]['checked'])) {
405 print
getTitleFieldOfList($arrayfields[
't.'.$key][
'label'], 0, $_SERVER[
'PHP_SELF'],
't.'.$key,
'', $param, ($cssforfield ?
'class="'.$cssforfield.
'"' :
''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.
' ' :
'')).
"\n";
409include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
411$parameters = array(
'arrayfields'=>$arrayfields,
'param'=>$param,
'sortfield'=>$sortfield,
'sortorder'=>$sortorder);
412$reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters, $object);
413print $hookmanager->resPrint;
415print
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
420$needToFetchEachLine = 0;
421if (isset($extrafields->attributes[$object->table_element][
'computed']) && is_array($extrafields->attributes[$object->table_element][
'computed']) && count($extrafields->attributes[$object->table_element][
'computed']) > 0) {
422 foreach ($extrafields->attributes[$object->table_element][
'computed'] as $key => $val) {
423 if (!is_null($val) && preg_match(
'/\$object/', $val)) {
424 $needToFetchEachLine++;
433$totalarray = array();
434while ($i < ($limit ? min($num, $limit) : $num)) {
435 $obj = $db->fetch_object($resql);
436 if (empty($obj))
break;
439 $object->setVarsFromFetchObj($obj);
442 print
'<tr class="oddeven">';
443 foreach ($object->fields as $key => $val) {
444 $cssforfield = (empty($val[
'css']) ?
'' : $val[
'css']);
445 if (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
446 elseif ($key ==
'status') $cssforfield .= ($cssforfield ? ' ' : '').'center';
448 if (in_array($val['
type'], array('timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
449 elseif ($key == '
ref') $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
451 if (in_array($val['
type'], array('
double(24,8)', '
double(6,3)', 'integer', 'real', '
price')) && $key != 'status') $cssforfield .= ($cssforfield ? ' ' : '').'right';
454 if (!empty($arrayfields['t.'.$key]['checked'])) {
455 print
'<td'.($cssforfield ?
' class="'.$cssforfield.
'"' :
'').
'>';
456 if ($key ==
'status') print $object->getLibStatut(5);
458 print $object->showOutputField($val, $key, $object->$key,
'');
459 if ($key ===
'date_prevue_depart' && $object->lead_time_for_warning > 0 && $object->$key > 0) {
460 $date_prevue_depart = $object->$key;
461 $date_prevue_depart_plus_delai = $date_prevue_depart;
462 if ($object->lead_time_for_warning > 0) $date_prevue_depart_plus_delai = strtotime(date(
'Y-m-d', $date_prevue_depart) .
' + '.$object->lead_time_for_warning.
' day');
463 if ($date_prevue_depart_plus_delai < strtotime(date(
'Y-m-d'))) print
img_warning($langs->trans(
'Alert').
' - '.$langs->trans(
'Late'));
467 if (!$i) $totalarray[
'nbfield']++;
468 if (!empty($val[
'isameasure'])) {
469 if (!$i) $totalarray[
'pos'][$totalarray[
'nbfield']] =
't.'.$key;
470 $totalarray[
'val'][
't.'.$key] += $object->$key;
475 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
477 $parameters = array(
'arrayfields'=>$arrayfields,
'object'=>$object,
'obj'=>$obj,
'i'=>$i,
'totalarray'=>&$totalarray);
478 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $object);
479 print $hookmanager->resPrint;
481 print
'<td class="nowrap center">';
482 if ($massactionbutton || $massaction) {
484 if (in_array($object->id, $arrayofselected)) $selected = 1;
485 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
488 if (!$i) $totalarray[
'nbfield']++;
496include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
501 foreach ($arrayfields as $key => $val) {
if (!empty($val[
'checked'])) $colspan++; }
502 print
'<tr><td colspan="'.$colspan.
'" class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</td></tr>';
508$parameters = array(
'arrayfields'=>$arrayfields,
'sql'=>$sql);
509$reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object);
510print $hookmanager->resPrint;
512print
'</table>'.
"\n";
517if (in_array(
'builddoc', array_keys($arrayofmassactions)) && ($nbtotalofrecords ===
'' || $nbtotalofrecords)) {
518 $hidegeneratedfilelistifempty = 1;
519 if ($massaction ==
'builddoc' || $action ==
'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0;
521 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
525 $urlsource = $_SERVER[
'PHP_SELF'].
'?sortfield='.$sortfield.
'&sortorder='.$sortorder;
526 $urlsource .= str_replace(
'&',
'&', $param);
528 $filedir = $diroutputmassaction;
529 $genallowed = $permissiontoread;
530 $delallowed = $permissiontoadd;
532 print $formfile->showdocuments(
'massfilesarea_stocktransfer',
'', $filedir, $urlsource, 0, $delallowed,
'', 1, 1, 0, 48, 1, $param, $title,
'',
'',
'',
null, $hidegeneratedfilelistifempty);
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
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...
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.
dol_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return dolibarr global constant int value.
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...
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get 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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
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.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
verifCond($strToEvaluate)
Verify if condition in string is ok or not.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
if(!defined( 'CSRFCHECK_WITH_TOKEN'))
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.