36require
'../../main.inc.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/lib/asset.lib.php';
38require_once DOL_DOCUMENT_ROOT.
"/core/lib/admin.lib.php";
43$langs->loadLangs(array(
"admin",
"assets"));
51$action =
GETPOST(
'action',
'aZ09');
52$backtopage =
GETPOST(
'backtopage',
'alpha');
54$value =
GETPOST(
'value',
'alpha');
55$label =
GETPOST(
'label',
'alpha');
56$scandir =
GETPOST(
'scan_dir',
'alpha');
59$arrayofparameters = array(
60 'ASSET_ACCOUNTANCY_CATEGORY' => array(
'type' =>
'accountancy_category',
'enabled' => 1),
61 'ASSET_DEPRECIATION_DURATION_PER_YEAR' => array(
'type' =>
'string',
'css' =>
'minwidth200',
'enabled' => 1),
74$dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
77$myTmpObjects = array();
78$myTmpObjects[
'asset'] = array(
'label' =>
'Asset',
'includerefgeneration' => 1,
'includedocgeneration' => 0,
'class' =>
'Asset');
80$tmpobjectkey =
GETPOST(
'object',
'aZ09');
81if ($tmpobjectkey && !array_key_exists($tmpobjectkey, $myTmpObjects)) {
90include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
92if ($action ==
'updateMask') {
93 $maskconst =
GETPOST(
'maskconst',
'alpha');
94 $mask =
GETPOST(
'mask',
'alpha');
96 if ($maskconst && preg_match(
'/_MASK$/', $maskconst)) {
108} elseif ($action ==
'specimen' && $tmpobjectkey) {
109 $modele =
GETPOST(
'module',
'alpha');
111 $className = $myTmpObjects[$tmpobjectkey][
'class'];
112 $tmpobject =
new $className($db);
113 $tmpobject->initAsSpecimen();
118 $dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
119 foreach ($dirmodels as $reldir) {
120 $file =
dol_buildpath($reldir.
"core/modules/asset/doc/pdf_".$modele.
"_".strtolower($tmpobjectkey).
".modules.php", 0);
121 if (file_exists($file)) {
122 $classname =
"pdf_".$modele;
127 if ($classname !==
'') {
130 $module =
new $classname($db);
131 '@phan-var-force ModelePDFAsset $module';
133 if ($module->write_file($tmpobject, $langs) > 0) {
134 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=".strtolower($tmpobjectkey).
"&file=SPECIMEN.pdf");
142 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
144} elseif ($action ==
'setmod') {
146 if (!empty($tmpobjectkey)) {
147 $constforval =
'ASSET_'.strtoupper($tmpobjectkey).
"_ADDON";
150} elseif ($action ==
'set') {
153} elseif ($action ==
'del') {
156 if (!empty($tmpobjectkey)) {
157 $constforval =
'ASSET_'.strtoupper($tmpobjectkey).
'_ADDON_PDF';
163} elseif ($action ==
'setdoc') {
165 if (!empty($tmpobjectkey)) {
166 $constforval =
'ASSET_'.strtoupper($tmpobjectkey).
'_ADDON_PDF';
170 $conf->global->$constforval = $value;
179} elseif ($action ==
'unsetdoc') {
180 if (!empty($tmpobjectkey)) {
181 $constforval =
'ASSET_'.strtoupper($tmpobjectkey).
'_ADDON_PDF';
192$form =
new Form($db);
195$page_name =
"AssetSetup";
197llxHeader(
'', $langs->trans($page_name), $help_url);
200$linkback =
'<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1').
'">'.$langs->trans(
"BackToModuleList").
'</a>';
208foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
209 if ($myTmpObjectArray[
'includerefgeneration']) {
215 print
load_fiche_titre($langs->trans(
"AssetNumberingModules", $myTmpObjectKey),
'',
'');
217 print
'<table class="noborder centpercent">';
218 print
'<tr class="liste_titre">';
219 print
'<td>'.$langs->trans(
"Name").
'</td>';
220 print
'<td>'.$langs->trans(
"Description").
'</td>';
221 print
'<td class="nowrap">'.$langs->trans(
"Example").
'</td>';
222 print
'<td class="center" width="60">'.$langs->trans(
"Status").
'</td>';
223 print
'<td class="center" width="16">'.$langs->trans(
"ShortInfo").
'</td>';
228 foreach ($dirmodels as $reldir) {
232 $handle = opendir($dir);
233 if (is_resource($handle)) {
234 while (($file = readdir($handle)) !==
false) {
235 if (strpos($file,
'mod_'.strtolower($myTmpObjectKey).
'_') === 0 && substr($file,
dol_strlen($file) - 3, 3) ==
'php') {
236 $file = substr($file, 0,
dol_strlen($file) - 4);
238 require_once $dir.
'/'.$file.
'.php';
240 $module =
new $file($db);
241 '@phan-var-force ModeleNumRefAsset $module';
244 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
247 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
251 if ($module->isEnabled()) {
252 dol_include_once(
'/'.$moduledir.
'/class/'.strtolower($myTmpObjectKey).
'.class.php');
254 print
'<tr class="oddeven"><td>'.$module->name.
"</td><td>\n";
255 print $module->info($langs);
259 print
'<td class="nowrap">';
260 $tmp = $module->getExample();
261 if (preg_match(
'/^Error/', $tmp)) {
262 $langs->load(
"errors");
263 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
264 } elseif ($tmp ==
'NotConfigured') {
265 print $langs->trans($tmp);
271 print
'<td class="center">';
272 $constforvar =
'ASSET_'.strtoupper($myTmpObjectKey).
'_ADDON';
274 print
img_picto($langs->trans(
"Activated"),
'switch_on');
276 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=setmod&token='.
newToken().
'&object='.strtolower($myTmpObjectKey).
'&value='.urlencode($file).
'">';
277 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
282 $className = $myTmpObjectArray[
'class'];
283 $mytmpinstance =
new $className($db);
284 $mytmpinstance->initAsSpecimen();
288 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
290 $nextval = $module->getNextValue($mytmpinstance);
291 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
292 $htmltooltip .=
''.$langs->trans(
"NextValue").
': ';
294 if (preg_match(
'/^Error/', $nextval) || $nextval ==
'NotConfigured') {
295 $nextval = $langs->trans($nextval);
297 $htmltooltip .= $nextval.
'<br>';
299 $htmltooltip .= $langs->trans($module->error).
'<br>';
303 print
'<td class="center">';
304 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
315 print
"</table><br>\n";
318 if ($myTmpObjectArray[
'includedocgeneration']) {
323 $type = strtolower($myTmpObjectKey);
325 print
load_fiche_titre($langs->trans(
"DocumentModules", $myTmpObjectKey),
'',
'');
330 $sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
331 $sql .=
" WHERE type = '".$db->escape($type).
"'";
332 $sql .=
" AND entity = ".$conf->entity;
333 $resql = $db->query($sql);
336 $num_rows = $db->num_rows($resql);
337 while ($i < $num_rows) {
338 $array = $db->fetch_array($resql);
339 if (is_array($array)) {
340 array_push($def, $array[0]);
348 print
"<table class=\"noborder\" width=\"100%\">\n";
349 print
"<tr class=\"liste_titre\">\n";
350 print
'<td>'.$langs->trans(
"Name").
'</td>';
351 print
'<td>'.$langs->trans(
"Description").
'</td>';
352 print
'<td class="center" width="60">'.$langs->trans(
"Status").
"</td>\n";
353 print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
354 print
'<td class="center" width="38">'.$langs->trans(
"ShortInfo").
'</td>';
355 print
'<td class="center" width="38">'.$langs->trans(
"Preview").
'</td>';
360 foreach ($dirmodels as $reldir) {
361 foreach (array(
'',
'/doc') as $valdir) {
362 $realpath = $reldir.
"core/modules/".$moduledir.$valdir;
366 $handle = opendir($dir);
367 if (is_resource($handle)) {
369 while (($file = readdir($handle)) !==
false) {
375 foreach ($filelist as $file) {
376 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
377 if (file_exists($dir.
'/'.$file)) {
378 $name = substr($file, 4,
dol_strlen($file) - 16);
379 $classname = substr($file, 0,
dol_strlen($file) - 12);
381 require_once $dir.
'/'.$file;
382 $module =
new $classname($db);
383 '@phan-var-force ModelePDFAsset $module';
385 $modulequalified = 1;
386 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
387 $modulequalified = 0;
389 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
390 $modulequalified = 0;
393 if ($modulequalified) {
394 print
'<tr class="oddeven"><td width="100">';
395 print(empty($module->name) ? $name : $module->
name);
397 if (method_exists($module,
'info')) {
398 print $module->info($langs);
400 print $module->description;
405 if (in_array($name, $def)) {
406 print
'<td class="center">'.
"\n";
407 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.
newToken().
'&value='.urlencode($name).
'">';
408 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
412 print
'<td class="center">'.
"\n";
413 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>';
418 print
'<td class="center">';
419 $constforvar =
'ASSET_'.strtoupper($myTmpObjectKey).
'_ADDON';
423 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>';
425 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>';
430 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
431 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
432 if ($module->type ==
'pdf') {
433 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
435 $htmltooltip .=
'<br>'.$langs->trans(
"Path").
': '.preg_replace(
'/^\//',
'', $realpath).
'/'.$file;
437 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
438 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
439 $htmltooltip .=
'<br>'.$langs->trans(
"MultiLanguage").
': '.
yn($module->option_multilang, 1, 1);
441 print
'<td class="center">';
442 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
446 print
'<td class="center">';
447 if ($module->type ==
'pdf') {
448 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'&object='.$myTmpObjectKey.
'">'.
img_object($langs->trans(
"Preview"),
'pdf').
'</a>';
450 print
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
468if ($action ==
'edit') {
469 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
470 print
'<input type="hidden" name="token" value="'.newToken().
'">';
471 print
'<input type="hidden" name="action" value="update">';
473 print
'<table class="noborder centpercent">';
474 print
'<tr class="liste_titre"><td class="titlefield">'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
476 foreach ($arrayofparameters as $constname => $val) {
477 if ($val[
'enabled'] == 1) {
479 print
'<tr class="oddeven"><td>';
480 $tooltiphelp = (($langs->trans($constname .
'Tooltip') != $constname .
'Tooltip') ? $langs->trans($constname .
'Tooltip') :
'');
481 print
'<span id="helplink'.$constname.
'" class="spanforparamtooltip">'.$form->textwithpicto($langs->trans($constname), $tooltiphelp, 1,
'info',
'', 0, 3,
'tootips'.$constname).
'</span>';
484 if ($val[
'type'] ==
'textarea') {
485 print
'<textarea class="flat" name="'.$constname.
'" id="'.$constname.
'" cols="50" rows="5" wrap="soft">' .
"\n";
487 print
"</textarea>\n";
488 } elseif ($val[
'type'] ==
'html') {
489 require_once DOL_DOCUMENT_ROOT .
'/core/class/doleditor.class.php';
490 $doleditor =
new DolEditor($constname,
getDolGlobalString($constname),
'', 160,
'dolibarr_notes',
'',
false,
false, isModEnabled(
'fckeditor'), ROWS_5,
'90%');
491 $doleditor->Create();
492 } elseif ($val[
'type'] ==
'yesno') {
494 } elseif (preg_match(
'/emailtemplate:/', $val[
'type'])) {
495 include_once DOL_DOCUMENT_ROOT .
'/core/class/html.formmail.class.php';
498 $tmp = explode(
':', $val[
'type']);
499 $nboftemplates = $formmail->fetchAllEMailTemplate($tmp[1], $user,
null, 1);
501 $arrayofmessagename = array();
502 if (is_array($formmail->lines_model)) {
503 foreach ($formmail->lines_model as $modelmail) {
506 if (!empty($arrayofmessagename[$modelmail->label])) {
507 $moreonlabel =
' <span class="opacitymedium">(' . $langs->trans(
"SeveralLangugeVariatFound") .
')</span>';
510 $arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace(
'/\(|\)/',
'', $modelmail->label)) . $moreonlabel;
513 print $form->selectarray($constname, $arrayofmessagename,
getDolGlobalString($constname),
'None', 0, 0,
'', 0, 0, 0,
'',
'', 1);
514 } elseif (preg_match(
'/category:/', $val[
'type'])) {
515 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
516 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
519 $tmp = explode(
':', $val[
'type']);
520 print
img_picto(
'',
'category',
'class="pictofixedwidth"');
521 print $formother->select_categories($tmp[1],
getDolGlobalString($constname), $constname, 0, $langs->trans(
'CustomersProspectsCategoriesShort'));
522 } elseif (preg_match(
'/thirdparty_type/', $val[
'type'])) {
523 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
525 print $formcompany->selectProspectCustomerType(
getDolGlobalString($constname), $constname);
526 } elseif ($val[
'type'] ==
'securekey') {
527 print
'<input required="required" type="text" class="flat" id="'.$constname.
'" name="'.$constname.
'" value="'.(
GETPOST($constname,
'alpha') ?
GETPOST($constname,
'alpha') :
getDolGlobalString($constname)).
'" size="40">';
528 if (!empty(
$conf->use_javascript_ajax)) {
529 print
' '.img_picto($langs->trans(
'Generate'),
'refresh',
'id="generate_token'.$constname.
'" class="linkobject"');
533 include_once DOL_DOCUMENT_ROOT.
'/core/lib/security2.lib.php';
535 } elseif ($val[
'type'] ==
'product') {
536 if (isModEnabled(
"product") || isModEnabled(
"service")) {
538 $form->select_produits($selected, $constname,
'', 0);
540 } elseif ($val[
'type'] ==
'accountancy_code') {
542 if (isModEnabled(
'accounting')) {
543 require_once DOL_DOCUMENT_ROOT .
'/core/class/html.formaccounting.class.php';
545 print $formaccounting->select_account($selected, $constname, 1, array(), 1, 1,
'minwidth150 maxwidth300', 1);
547 print
'<input name="' . $constname .
'" class="maxwidth200" value="' .
dol_escape_htmltag($selected) .
'">';
549 } elseif ($val[
'type'] ==
'accountancy_category') {
551 if (isModEnabled(
'accounting')) {
552 print
'<input type="text" name="' . $constname .
'" list="pcg_type_datalist" value="' . $selected .
'">';
554 print
'<datalist id="pcg_type_datalist">';
555 require_once DOL_DOCUMENT_ROOT .
'/accountancy/class/accountancysystem.class.php';
558 $sql =
'SELECT DISTINCT pcg_type FROM ' . MAIN_DB_PREFIX .
'accounting_account';
559 $sql .=
" WHERE fk_pcg_version = '" . $db->escape($accountsystem->ref) .
"'";
560 $sql .=
' AND entity in ('.getEntity(
'accounting_account', 0).
')';
561 $sql .=
' LIMIT 50000';
562 $resql = $db->query($sql);
564 while ($obj = $db->fetch_object($resql)) {
570 print
'<input name="' . $constname .
'" class="maxwidth200" value="' .
dol_escape_htmltag($selected) .
'">';
573 print
'<input name="'.$constname.
'" class="flat '.(empty($val[
'css']) ?
'minwidth200' : $val[
'css']).
'" value="'.
getDolGlobalString($constname).
'">';
580 print
'<br><div class="center">';
581 print
'<input class="button button-save" type="submit" value="'.$langs->trans(
"Save").
'">';
587 if (!empty($arrayofparameters)) {
588 print
'<table class="noborder centpercent">';
589 print
'<tr class="liste_titre"><td class="titlefield">'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
591 foreach ($arrayofparameters as $constname => $val) {
592 if ($val[
'enabled'] == 1) {
594 print
'<tr class="oddeven"><td>';
595 $tooltiphelp = (($langs->trans($constname .
'Tooltip') != $constname .
'Tooltip') ? $langs->trans($constname .
'Tooltip') :
'');
596 print $form->textwithpicto($langs->trans($constname), $tooltiphelp);
599 if ($val[
'type'] ==
'textarea') {
601 } elseif ($val[
'type'] ==
'html') {
603 } elseif ($val[
'type'] ==
'yesno') {
604 print ajax_constantonoff($constname);
605 } elseif (preg_match(
'/emailtemplate:/', $val[
'type'])) {
606 include_once DOL_DOCUMENT_ROOT .
'/core/class/html.formmail.class.php';
609 $tmp = explode(
':', $val[
'type']);
611 $template = $formmail->getEMailTemplate($db, $tmp[1], $user, $langs,
getDolGlobalString($constname));
615 print $langs->trans($template->label);
616 } elseif (preg_match(
'/category:/', $val[
'type'])) {
621 } elseif ($result > 0) {
622 $ways = $c->print_all_ways(
' >> ',
'none', 0, 1);
624 foreach ($ways as $way) {
625 $toprint[] =
'<li class="select2-search-choice-dolibarr noborderoncategories"' . ($c->color ?
' style="background: #' . $c->color .
';"' :
' style="background: #bbb"') .
'>' . $way .
'</li>';
627 print
'<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">' . implode(
' ', $toprint) .
'</ul></div>';
629 } elseif (preg_match(
'/thirdparty_type/', $val[
'type'])) {
631 print $langs->trans(
"Prospect");
633 print $langs->trans(
"ProspectCustomer");
635 print $langs->trans(
"Customer");
637 print $langs->trans(
"NorProspectNorCustomer");
639 } elseif ($val[
'type'] ==
'product') {
644 } elseif ($resprod < 0) {
647 } elseif ($val[
'type'] ==
'accountancy_code') {
648 if (isModEnabled(
'accounting')) {
649 require_once DOL_DOCUMENT_ROOT .
'/accountancy/class/accountingaccount.class.php';
653 print $accountingaccount->getNomUrl(0, 1, 1,
'', 1);
666 print
'<div class="tabsAction">';
667 print
'<a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?action=edit&token='.
newToken().
'">'.$langs->trans(
"Modify").
'</a>';
670 print
'<br>'.$langs->trans(
"NothingToSetup");
674if (empty($setupnotempty)) {
675 print
'<br>'.$langs->trans(
"NothingToSetup");
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
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.
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.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
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'.
yn($yesno, $format=1, $color=0)
Return yes or no in current language.
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.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
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...
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
$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.