28require
'../../main.inc.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/lib/asset.lib.php';
37require_once DOL_DOCUMENT_ROOT.
"/core/lib/admin.lib.php";
42$langs->loadLangs(array(
"admin",
"assets"));
50$action =
GETPOST(
'action',
'aZ09');
51$backtopage =
GETPOST(
'backtopage',
'alpha');
53$value =
GETPOST(
'value',
'alpha');
54$label =
GETPOST(
'label',
'alpha');
55$scandir =
GETPOST(
'scan_dir',
'alpha');
63$arrayofdaycountconventions = array();
65 $arrayofdaycountconventions[$conventioncode] = $langs->trans($conventionlabelkey);
71$arrayofparameters = array(
72 'ASSET_ACCOUNTANCY_CATEGORY' => array(
'type' =>
'accountancy_category',
'enabled' => 1),
73 'ASSET_DEPRECIATION_DAY_COUNT_CONVENTION' => array(
'type' =>
'select',
'arrayofkeyval' => $arrayofdaycountconventions,
'default' =>
getAssetDepreciationDayCountConvention(),
'css' =>
'minwidth300',
'enabled' => 1),
85$dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
89 'asset' => array(
'label' =>
'Asset',
'includerefgeneration' => 1,
'includedocgeneration' => 1,
'class' =>
'Asset')
92$tmpobjectkey =
GETPOST(
'object',
'aZ09');
93if ($tmpobjectkey && !array_key_exists($tmpobjectkey, $myTmpObjects)) {
102include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
104if ($action ==
'updateMask') {
105 $maskconst =
GETPOST(
'maskconst',
'alpha');
106 $mask =
GETPOST(
'mask',
'alpha');
108 if ($maskconst && preg_match(
'/_MASK$/', $maskconst)) {
116 setEventMessages($langs->trans(
"SetupSaved"),
null,
'mesgs');
118 setEventMessages($langs->trans(
"Error"),
null,
'errors');
120} elseif ($action ==
'specimen' && $tmpobjectkey) {
121 $modele =
GETPOST(
'module',
'alpha');
123 $className = $myTmpObjects[$tmpobjectkey][
'class'];
124 $tmpobject =
new $className($db);
125 $tmpobject->initAsSpecimen();
130 $dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
131 foreach ($dirmodels as $reldir) {
132 $file =
dol_buildpath($reldir.
"core/modules/asset/doc/pdf_".$modele.
"_".strtolower($tmpobjectkey).
".modules.php", 0);
133 if (file_exists($file)) {
134 $classname =
"pdf_".$modele;
139 if ($classname !==
'') {
143 '@phan-var-force ModelePDFAsset $module';
145 if (
$module->write_file($tmpobject, $langs) > 0) {
146 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=".strtolower($tmpobjectkey).
"&file=SPECIMEN.pdf");
149 setEventMessages(
$module->error,
null,
'errors');
153 setEventMessages($langs->trans(
"ErrorModuleNotFound"),
null,
'errors');
154 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
156} elseif ($action ==
'setmod') {
158 if (!empty($tmpobjectkey)) {
159 $constforval =
'ASSET_'.strtoupper($tmpobjectkey).
"_ADDON";
162} elseif ($action ==
'set') {
165} elseif ($action ==
'del') {
168 if (!empty($tmpobjectkey)) {
169 $constforval =
'ASSET_'.strtoupper($tmpobjectkey).
'_ADDON_PDF';
175} elseif ($action ==
'setdoc') {
177 if (!empty($tmpobjectkey)) {
178 $constforval =
'ASSET_'.strtoupper($tmpobjectkey).
'_ADDON_PDF';
182 $conf->global->$constforval = $value;
191} elseif ($action ==
'unsetdoc') {
192 if (!empty($tmpobjectkey)) {
193 $constforval =
'ASSET_'.strtoupper($tmpobjectkey).
'_ADDON_PDF';
204$form =
new Form($db);
207$page_name =
"AssetSetup";
209llxHeader(
'', $langs->trans($page_name), $help_url);
212$linkback =
'<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1').
'">'.img_picto($langs->trans(
"BackToModuleList"),
'back',
'class="pictofixedwidth"').
'<span class="hideonsmartphone">'.$langs->trans(
"BackToModuleList").
'</span></a>';
220foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
221 if ($myTmpObjectArray[
'includerefgeneration']) {
225 print
load_fiche_titre($langs->trans(
"AssetNumberingModules", $myTmpObjectKey),
'',
'');
227 print
'<table class="noborder centpercent">';
228 print
'<tr class="liste_titre">';
229 print
'<td>'.$langs->trans(
"Name").
'</td>';
230 print
'<td>'.$langs->trans(
"Description").
'</td>';
231 print
'<td class="nowrap">'.$langs->trans(
"Example").
'</td>';
232 print
'<td class="center" width="60">'.$langs->trans(
"Status").
'</td>';
233 print
'<td class="center" width="16">'.$langs->trans(
"ShortInfo").
'</td>';
238 foreach ($dirmodels as $reldir) {
242 $handle = opendir($dir);
243 if (is_resource($handle)) {
244 while (($file = readdir($handle)) !==
false) {
245 if (strpos($file,
'mod_'.strtolower($myTmpObjectKey).
'_') === 0 &&
dol_substr($file,
dol_strlen($file) - 3, 3) ==
'php') {
248 require_once $dir.
'/'.$file.
'.php';
251 '@phan-var-force ModeleNumRefAsset $module';
262 dol_include_once(
'/'.$moduledir.
'/class/'.strtolower($myTmpObjectKey).
'.class.php');
264 print
'<tr class="oddeven"><td>'.$module->name.
"</td><td>\n";
269 print
'<td class="nowrap">';
271 if (preg_match(
'/^Error/', $tmp)) {
272 $langs->load(
"errors");
273 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
274 } elseif ($tmp ==
'NotConfigured') {
275 print $langs->trans($tmp);
281 print
'<td class="center">';
282 $constforvar =
'ASSET_'.strtoupper($myTmpObjectKey).
'_ADDON';
283 $defaultifnotset =
'mod_asset_standard';
285 if ($activenumberingmodel == $file) {
286 print img_picto($langs->trans(
"Activated"),
'switch_on');
288 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=setmod&token='.
newToken().
'&object='.strtolower($myTmpObjectKey).
'&value='.urlencode($file).
'">';
289 print img_picto($langs->trans(
"Disabled"),
'switch_off');
294 $className = $myTmpObjectArray[
'class'];
295 $mytmpinstance =
new $className($db);
296 $mytmpinstance->initAsSpecimen();
300 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.
$module->getVersion().
'</b><br>';
302 $nextval =
$module->getNextValue($mytmpinstance);
303 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
304 $htmltooltip .=
''.$langs->trans(
"NextValue").
': ';
306 if (preg_match(
'/^Error/', $nextval) || $nextval ==
'NotConfigured') {
307 $nextval = $langs->trans($nextval);
309 $htmltooltip .= $nextval.
'<br>';
311 $htmltooltip .= $langs->trans(
$module->error).
'<br>';
315 print
'<td class="center">';
316 print $form->textwithpicto(
'', $htmltooltip, 1,
'info');
327 print
"</table><br>\n";
330 if ($myTmpObjectArray[
'includedocgeneration']) {
334 $type = strtolower($myTmpObjectKey);
336 print
load_fiche_titre($langs->trans(
"DocumentModules", $myTmpObjectKey),
'',
'');
342 $sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
343 $sql .=
" WHERE type = '".$db->escape($type).
"'";
344 $sql .=
" AND entity = ".((int)
$conf->entity);
345 $resql = $db->query($sql);
348 $num_rows = $db->num_rows($resql);
349 while ($i < $num_rows) {
350 $array = $db->fetch_array($resql);
351 if (is_array($array)) {
352 array_push($def, $array[0]);
357 dol_print_error($db);
360 print
"<table class=\"noborder\" width=\"100%\">\n";
361 print
"<tr class=\"liste_titre\">\n";
362 print
'<td>'.$langs->trans(
"Name").
'</td>';
363 print
'<td>'.$langs->trans(
"Description").
'</td>';
364 print
'<td class="center" width="60">'.$langs->trans(
"Status").
"</td>\n";
365 print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
366 print
'<td class="center" width="38">'.$langs->trans(
"ShortInfo").
'</td>';
367 print
'<td class="center" width="38">'.$langs->trans(
"Preview").
'</td>';
372 foreach ($dirmodels as $reldir) {
373 foreach (array(
'',
'/doc') as $valdir) {
374 $realpath = $reldir.
"core/modules/".$moduledir.$valdir;
378 $handle = opendir($dir);
379 if (is_resource($handle)) {
381 while (($file = readdir($handle)) !==
false) {
387 foreach ($filelist as $file) {
388 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
389 if (file_exists($dir.
'/'.$file)) {
393 require_once $dir.
'/'.$file;
395 '@phan-var-force ModelePDFAsset $module';
397 $modulequalified = 1;
399 $modulequalified = 0;
402 $modulequalified = 0;
405 if ($modulequalified) {
406 print
'<tr class="oddeven"><td width="100">';
409 if (method_exists(
$module,
'info')) {
417 if (in_array($name, $def)) {
418 print
'<td class="center">'.
"\n";
419 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.
newToken().
'&value='.urlencode($name).
'">';
420 print img_picto($langs->trans(
"Enabled"),
'switch_on');
424 print
'<td class="center">'.
"\n";
425 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.
newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode(
$module->scandir).
'&label='.urlencode(
$module->name).
'">'.img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
430 print
'<td class="center">';
431 $constforvar =
'ASSET_'.strtoupper($myTmpObjectKey).
'_ADDON';
435 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=unsetdoc&token='.
newToken().
'&object='.urlencode(strtolower($myTmpObjectKey)).
'&value='.urlencode($name).
'&scan_dir='.urlencode(
$module->scandir).
'&label='.urlencode(
$module->name).
'&type='.urlencode($type).
'" alt="'.$langs->trans(
"Disable").
'">'.img_picto($langs->trans(
"Enabled"),
'on').
'</a>';
437 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=setdoc&token='.
newToken().
'&object='.urlencode(strtolower($myTmpObjectKey)).
'&value='.urlencode($name).
'&scan_dir='.urlencode(
$module->scandir).
'&label='.urlencode(
$module->name).
'" alt="'.$langs->trans(
"Default").
'">'.img_picto($langs->trans(
"Disabled"),
'off').
'</a>';
442 $htmltooltip =
''.$langs->trans(
"Name").
': '.
$module->name;
443 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.(
$module->type ?
$module->type : $langs->trans(
"Unknown"));
445 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.
$module->page_largeur.
'/'.
$module->page_hauteur;
447 $htmltooltip .=
'<br>'.$langs->trans(
"Path").
': '.preg_replace(
'/^\//',
'', $realpath).
'/'.$file;
449 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
450 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.yn(
$module->option_logo, 1, 1);
451 $htmltooltip .=
'<br>'.$langs->trans(
"MultiLanguage").
': '.yn(
$module->option_multilang, 1, 1);
453 print
'<td class="center">';
454 print $form->textwithpicto(
'', $htmltooltip, 1,
'info');
458 print
'<td class="center">';
460 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'&object='.$myTmpObjectKey.
'">'.img_object($langs->trans(
"Preview"),
'pdf').
'</a>';
462 print img_object($langs->transnoentitiesnoconv(
"PreviewNotAvailable"),
'generic');
480if ($action ==
'edit') {
481 print
'<form method="POST" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
482 print
'<input type="hidden" name="token" value="'.newToken().
'">';
483 print
'<input type="hidden" name="action" value="update">';
485 print
'<table class="noborder centpercent">';
486 print
'<tr class="liste_titre"><td class="titlefield">'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
488 foreach ($arrayofparameters as $constname => $val) {
489 if ($val[
'enabled'] == 1) {
490 print
'<tr class="oddeven"><td>';
491 $tooltiphelp = (($langs->trans($constname .
'Tooltip') != $constname .
'Tooltip') ? $langs->trans($constname .
'Tooltip') :
'');
492 print
'<span id="helplink'.$constname.
'" class="spanforparamtooltip">'.$form->textwithpicto($langs->trans($constname), $tooltiphelp, 1,
'info',
'', 0, 3,
'tootips'.$constname).
'</span>';
495 if ($val[
'type'] ==
'select') {
496 $selected =
getDolGlobalString($constname, isset($val[
'default']) ? $val[
'default'] :
'');
497 if (!isset($val[
'arrayofkeyval'][$selected])) {
500 $selected = isset($val[
'default']) ? $val[
'default'] :
'';
502 print $form->selectarray($constname, $val[
'arrayofkeyval'], $selected, 0, 0, 0,
'', 0, 0, 0,
'', (empty($val[
'css']) ?
'minwidth200' : $val[
'css']));
503 } elseif ($val[
'type'] ==
'textarea') {
504 print
'<textarea class="flat" name="'.$constname.
'" id="'.$constname.
'" cols="50" rows="5" wrap="soft">' .
"\n";
506 print
"</textarea>\n";
507 } elseif ($val[
'type'] ==
'html') {
508 require_once DOL_DOCUMENT_ROOT .
'/core/class/doleditor.class.php';
509 $doleditor =
new DolEditor($constname,
getDolGlobalString($constname),
'', 160,
'dolibarr_notes',
'',
false,
false,
isModEnabled(
'fckeditor'), ROWS_5,
'90%');
510 $doleditor->Create();
511 } elseif ($val[
'type'] ==
'yesno') {
513 } elseif (preg_match(
'/emailtemplate:/', $val[
'type'])) {
514 include_once DOL_DOCUMENT_ROOT .
'/core/class/html.formmail.class.php';
517 $tmp = explode(
':', $val[
'type']);
518 $nboftemplates = $formmail->fetchAllEMailTemplate($tmp[1], $user,
null, 1);
520 $arrayofmessagename = array();
521 if (is_array($formmail->lines_model)) {
522 foreach ($formmail->lines_model as $modelmail) {
525 if (!empty($arrayofmessagename[$modelmail->label])) {
526 $moreonlabel =
' <span class="opacitymedium">(' . $langs->trans(
"SeveralLangugeVariatFound") .
')</span>';
529 $arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace(
'/\(|\)/',
'', $modelmail->label)) . $moreonlabel;
532 print $form->selectarray($constname, $arrayofmessagename,
getDolGlobalString($constname),
'None', 0, 0,
'', 0, 0, 0,
'',
'', 1);
533 } elseif (preg_match(
'/category:/', $val[
'type'])) {
534 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
535 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
538 $tmp = explode(
':', $val[
'type']);
539 print img_picto(
'',
'category',
'class="pictofixedwidth"');
540 print $formother->select_categories($tmp[1],
getDolGlobalInt($constname), $constname, 0, $langs->trans(
'CustomersProspectsCategoriesShort'));
541 } elseif (preg_match(
'/thirdparty_type/', $val[
'type'])) {
542 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
544 print $formcompany->selectProspectCustomerType(
getDolGlobalString($constname), $constname);
545 } elseif ($val[
'type'] ==
'securekey') {
546 print
'<input required="required" type="text" class="flat" id="'.$constname.
'" name="'.$constname.
'" value="'.(
GETPOST($constname,
'alpha') ?
GETPOST($constname,
'alpha') :
getDolGlobalString($constname)).
'" size="40">';
547 if (!empty(
$conf->use_javascript_ajax)) {
548 print
' '.img_picto($langs->trans(
'Generate'),
'refresh',
'id="generate_token'.$constname.
'" class="linkobject"');
552 include_once DOL_DOCUMENT_ROOT.
'/core/lib/security2.lib.php';
554 } elseif ($val[
'type'] ==
'product') {
557 $form->select_produits($selected, $constname,
'', 0);
559 } elseif ($val[
'type'] ==
'accountancy_code') {
562 require_once DOL_DOCUMENT_ROOT .
'/core/class/html.formaccounting.class.php';
564 print $formaccounting->select_account($selected, $constname, 1, array(), 1, 1,
'minwidth150 maxwidth300',
'1');
566 print
'<input name="' . $constname .
'" class="maxwidth200" value="' .
dol_escape_htmltag($selected) .
'">';
568 } elseif ($val[
'type'] ==
'accountancy_category') {
571 print
'<input type="text" name="' . $constname .
'" list="pcg_type_datalist" value="' . $selected .
'">';
573 print
'<datalist id="pcg_type_datalist">';
574 require_once DOL_DOCUMENT_ROOT .
'/accountancy/class/accountancysystem.class.php';
577 $sql =
'SELECT DISTINCT pcg_type FROM ' . MAIN_DB_PREFIX .
'accounting_account';
578 $sql .=
" WHERE fk_pcg_version = '" . $db->escape($accountsystem->ref) .
"'";
579 $sql .=
' AND entity in ('.getEntity(
'accounting_account', 0).
')';
580 $sql .=
' LIMIT 50000';
581 $resql = $db->query($sql);
583 while ($obj = $db->fetch_object($resql)) {
589 print
'<input name="' . $constname .
'" class="maxwidth200" value="' .
dol_escape_htmltag($selected) .
'">';
592 print
'<input name="'.$constname.
'" class="flat '.(empty($val[
'css']) ?
'minwidth200' : $val[
'css']).
'" value="'.
getDolGlobalString($constname).
'">';
599 print
'<br><div class="center">';
600 print
'<input class="button button-save" type="submit" value="'.$langs->trans(
"Save").
'">';
606 if (!empty($arrayofparameters)) {
607 print
'<table class="noborder centpercent">';
608 print
'<tr class="liste_titre"><td class="titlefield">'.$langs->trans(
"Parameter").
'</td><td></td></tr>';
610 foreach ($arrayofparameters as $constname => $val) {
611 if ($val[
'enabled'] == 1) {
612 print
'<tr class="oddeven"><td>';
613 $tooltiphelp = (($langs->trans($constname .
'Tooltip') != $constname .
'Tooltip') ? $langs->trans($constname .
'Tooltip') :
'');
614 print $form->textwithpicto($langs->trans($constname), $tooltiphelp);
617 if ($val[
'type'] ==
'select') {
618 $selected =
getDolGlobalString($constname, isset($val[
'default']) ? $val[
'default'] :
'');
619 print isset($val[
'arrayofkeyval'][$selected]) ? $val[
'arrayofkeyval'][$selected] :
dol_escape_htmltag($selected);
620 } elseif ($val[
'type'] ==
'textarea') {
622 } elseif ($val[
'type'] ==
'html') {
624 } elseif ($val[
'type'] ==
'yesno') {
625 print ajax_constantonoff($constname);
626 } elseif (preg_match(
'/emailtemplate:/', $val[
'type'])) {
627 include_once DOL_DOCUMENT_ROOT .
'/core/class/html.formmail.class.php';
630 $tmp = explode(
':', $val[
'type']);
632 $template = $formmail->getEMailTemplate($db, $tmp[1], $user, $langs,
getDolGlobalInt($constname));
634 setEventMessages(
null, $formmail->errors,
'errors');
636 print $langs->trans($template->label);
637 } elseif (preg_match(
'/category:/', $val[
'type'])) {
641 setEventMessages(
null,
$c->errors,
'errors');
642 } elseif ($result > 0) {
643 $ways =
$c->print_all_ways(
'auto',
'none', 0, 1);
645 foreach ($ways as $way) {
646 $toprint[] =
'<li class="select2-search-choice-dolibarr noborderoncategories"' . (
$c->color ?
' style="background: #' .
$c->color .
';"' :
' style="background: #bbb"') .
'>' . $way .
'</li>';
648 print
'<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">' . implode(
' ', $toprint) .
'</ul></div>';
650 } elseif (preg_match(
'/thirdparty_type/', $val[
'type'])) {
652 print $langs->trans(
"Prospect");
654 print $langs->trans(
"ProspectCustomer");
656 print $langs->trans(
"Customer");
658 print $langs->trans(
"NorProspectNorCustomer");
660 } elseif ($val[
'type'] ==
'product') {
665 } elseif ($resprod < 0) {
666 setEventMessages(
null, $product->errors,
"errors");
668 } elseif ($val[
'type'] ==
'accountancy_code') {
670 require_once DOL_DOCUMENT_ROOT .
'/accountancy/class/accountingaccount.class.php';
674 print $accountingaccount->getNomUrl(0, 1, 1,
'', 1);
687 print
'<div class="tabsAction">';
688 print
'<a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?action=edit&token='.
newToken().
'">'.$langs->trans(
"Modify").
'</a>';
691 print
'<br>'.$langs->trans(
"NothingToSetup");
addDocumentModel($name, $type, $label='', $description='')
Add document model used by doc generator.
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
delDocumentModel($name, $type)
Delete document model used by doc generator.
assetAdminPrepareHead()
Prepare admin pages header.
getAssetDepreciationDayCountConventions()
Return the list of the day count conventions available to compute the prorata temporis of a depreciat...
getAssetDepreciationDayCountConvention()
Return the day count convention to use to compute the prorata temporis of a depreciation.
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.
Class to manage accountancy systems.
Class to manage accounting accounts.
Class to manage categories.
Class to manage a WYSIWYG editor.
Class to manage products or services.
if(! $sortfield) if(! $sortorder) $module
dol_nl2br($stringtoencode, $nl2brmode=0, $forxml=false)
Replace CRLF in string with a HTML BR tag.
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
if(!function_exists( 'dol_getprefix')) dol_include_once($relpath, $classname='')
Make an include_once using default root and alternate root if it fails.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
dol_substr($string, $start, $length=null, $stringencoding='', $trunconbytes=0)
Make a substring.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
$conf db name
Only used if Module[ID]Name translation string is not found.
dolJSToSetRandomPassword($htmlname, $htmlnameofbutton='generate_token', $generic=1)
Output javascript to autoset a generated password using default module into a HTML element.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.