37require
'../../main.inc.php';
46require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
47require_once DOL_DOCUMENT_ROOT.
'/core/lib/product.lib.php';
48require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
49require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formbarcode.class.php';
52$langs->loadLangs(array(
"admin",
"products"));
59$action =
GETPOST(
'action',
'aZ09');
60$value =
GETPOST(
'value',
'alpha');
61$modulepart =
GETPOST(
'modulepart',
'aZ09');
63$label =
GETPOST(
'label',
'alpha');
64$scandir =
GETPOST(
'scan_dir',
'alpha');
68$select_pricing_rules = array(
69 'PRODUCT_PRICE_UNIQ' => array(
'label' => $langs->trans(
'PriceCatalogue')),
70 'PRODUIT_MULTIPRICES' => array(
'label' => $langs->trans(
'MultiPricesAbility')),
71 'PRODUIT_CUSTOMER_PRICES' => array(
'label' => $langs->trans(
'PriceByCustomer')),
72 'PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES' => array(
'label' => $langs->trans(
'PriceByCustomeAndMultiPricesAbility')),
74$keyforparam =
'PRODUIT_CUSTOMER_PRICES_BY_QTY';
76 $select_pricing_rules[
'PRODUIT_CUSTOMER_PRICES_BY_QTY'] = array(
77 'label' => $langs->trans(
'PriceByQuantity').
' ('.$langs->trans(
"VersionExperimental").
')',
78 'data-html' => $langs->trans(
'PriceByQuantity').
' <span class="opacitymedium">('.$langs->trans(
"VersionExperimental").
')</span>'
81$keyforparam =
'PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES';
83 $select_pricing_rules[
'PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES'] = array(
'label' => $langs->trans(
'MultiPricesAbility').
'+'.$langs->trans(
'PriceByQuantity').
' ('.$langs->trans(
"VersionExperimental").
')');
98$nomessageinsetmoduleoptions = 1;
99include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
101if ($action ==
'setcodeproduct') {
103 header(
"Location: ".$_SERVER[
"PHP_SELF"]);
110if ($action ==
'other' &&
GETPOST(
'value_PRODUIT_LIMIT_SIZE') >= 0) {
116if ($action ==
'other' &&
GETPOST(
'value_PRODUIT_MULTIPRICES_LIMIT') > 0) {
122if ($action ==
'other') {
123 $princingrules =
GETPOST(
'princingrule',
'alpha');
124 foreach ($select_pricing_rules as $tmprule => $tmplabel) {
125 if ($tmprule == $princingrules) {
126 if ($princingrules ==
'PRODUCT_PRICE_UNIQ') {
135 $multirule = explode(
'&', $princingrules);
136 foreach ($multirule as $rulesselected) {
141 if (strpos($tmprule,
'&') ===
false) {
147 $value =
GETPOST(
'price_base_type',
'alpha');
153 $value =
GETPOST(
'PRODUIT_DESC_IN_FORM',
'alpha');
156 $value =
GETPOST(
'activate_viewProdTextsInThirdpartyLanguage',
'alpha');
159 $value =
GETPOST(
'activate_mergePropalProductCard',
'alpha');
162 $value =
GETPOST(
'activate_usesearchtoselectproduct',
'alpha');
165 $value =
GETPOST(
'activate_FillProductDescAuto',
'alpha');
168 if (GETPOSTISSET(
'PRODUIT_FOURN_TEXTS')) {
169 $value =
GETPOST(
'PRODUIT_FOURN_TEXTS',
'alpha');
173 if (GETPOSTISSET(
'PRODUCT_USE_SUPPLIER_PACKAGING')) {
174 $value =
GETPOST(
'PRODUCT_USE_SUPPLIER_PACKAGING',
'alpha');
178 if (GETPOSTISSET(
'PRODUCT_USE_CUSTOMER_PACKAGING')) {
179 $value =
GETPOST(
'PRODUCT_USE_CUSTOMER_PACKAGING',
'alpha');
185if ($action ==
'specimen') {
186 $modele =
GETPOST(
'module',
'alpha');
189 $product->initAsSpecimen();
194 $dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
195 foreach ($dirmodels as $reldir) {
196 $file =
dol_buildpath($reldir.
"core/modules/product/doc/pdf_".$modele.
".modules.php", 0);
197 if (file_exists($file)) {
198 $classname =
"pdf_".$modele;
203 if ($classname !==
'') {
206 $module =
new $classname(
$db);
208 '@phan-var-force ModelePDFProduct $module';
210 if ($module->write_file($product, $langs,
'') > 0) {
211 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=product&file=SPECIMEN.pdf");
219 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
224if ($action ==
'set') {
228if ($action ==
'del') {
238if ($action ==
'setdoc') {
242 $conf->global->PRODUCT_ADDON_PDF = $value;
253if ($action ==
'set') {
254 $const =
"PRODUCT_SPECIAL_".strtoupper(
GETPOST(
'spe',
'alpha'));
256 if (
GETPOST(
'value',
'alpha')) {
267if (preg_match(
'/set_(.+)/', $action, $reg)) {
268 $keyforvar = $reg[1];
276if (preg_match(
'/del_(.+)/', $action, $reg)) {
277 $keyforvar = $reg[1];
297$title = $langs->trans(
'ProductServiceSetup');
298$tab = $langs->trans(
"ProductsAndServices");
300 $title = $langs->trans(
'ServiceSetup');
301 $tab = $langs->trans(
'Services');
303 $title = $langs->trans(
'ProductSetup');
304 $tab = $langs->trans(
'Products');
307llxHeader(
'', $title,
'',
'', 0, 0,
'',
'',
'',
'mod-product page-admin_product');
309$linkback =
'<a href="'.dolBuildUrl(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>';
318$dirproduct = array(
'/core/modules/product/');
319$dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
323print
'<div class="div-table-responsive-no-min">';
324print
'<table class="noborder centpercent">'.
"\n";
325print
'<tr class="liste_titre">'.
"\n";
326print
' <td>'.$langs->trans(
"Name").
'</td>';
327print
' <td>'.$langs->trans(
"Description").
'</td>';
328print
' <td>'.$langs->trans(
"Example").
'</td>';
329print
' <td class="center" width="80">'.$langs->trans(
"Status").
'</td>';
330print
' <td class="center" width="60"></td>';
333$arrayofmodules = array();
335foreach ($dirproduct as $dirroot) {
338 $handle = @opendir($dir);
339 if (is_resource($handle)) {
341 while (($file = readdir($handle)) !==
false) {
342 if (substr($file, 0, 16) ==
'mod_codeproduct_' && substr($file, -3) ==
'php') {
343 $file = substr($file, 0,
dol_strlen($file) - 4);
351 $modCodeProduct =
new $file();
352 '@phan-var-force ModeleProductCode $modCodeProduct';
355 if ($modCodeProduct->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
358 if ($modCodeProduct->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
362 $arrayofmodules[$file] = $modCodeProduct;
370'@phan-var-force array<string,ModeleProductCode> $arrayofmodules';
372foreach ($arrayofmodules as $file => $modCodeProduct) {
373 print
'<tr class="oddeven">'.
"\n";
374 print
'<td width="140">'.$modCodeProduct->name.
'</td>'.
"\n";
375 print
'<td>'.$modCodeProduct->info($langs).
'</td>'.
"\n";
376 print
'<td class="nowrap"><span class="opacitymedium">'.$modCodeProduct->getExample($langs).
'</span></td>'.
"\n";
379 print
'<td class="center">'.
"\n";
380 print
img_picto($langs->trans(
"Activated"),
'switch_on');
386 print
'<td class="center">';
388 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setcodeproduct&token='.newToken().
'&value='.urlencode($file).
'">';
390 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
397 print
'<td class="center">';
398 $s = $modCodeProduct->getToolTip($langs,
'', -1);
399 print $form->textwithpicto(
'', $s, 1);
411$sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
412$sql .=
" WHERE type = '".$db->escape($type).
"'";
413$sql .=
" AND entity = ".((int)
$conf->entity);
414$resql =
$db->query($sql);
417 $num_rows =
$db->num_rows($resql);
418 while ($i < $num_rows) {
419 $array =
$db->fetch_array($resql);
420 if (is_array($array)) {
421 array_push($def, $array[0]);
433print
'<div class="div-table-responsive-no-min">';
434print
'<table class="noborder centpercent">';
435print
'<tr class="liste_titre">';
436print
'<td>'.$langs->trans(
"Name").
'</td>';
437print
'<td>'.$langs->trans(
"Description").
'</td>';
438print
'<td class="center" width="60">'.$langs->trans(
"Status").
"</td>\n";
439print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
440print
'<td class="center"></td>';
441print
'<td class="center" width="80">'.$langs->trans(
"Preview").
'</td>';
447foreach ($dirmodels as $reldir) {
448 foreach (array(
'',
'/doc') as $valdir) {
449 $dir =
dol_buildpath($reldir.
"core/modules/product".$valdir);
451 $handle = opendir($dir);
452 if (is_resource($handle)) {
453 while (($file = readdir($handle)) !==
false) {
459 foreach ($filelist as $file) {
460 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
461 if (file_exists($dir.
'/'.$file)) {
462 $name = substr($file, 4,
dol_strlen($file) - 16);
463 $classname = substr($file, 0,
dol_strlen($file) - 12);
465 require_once $dir.
'/'.$file;
466 $module =
new $classname(
$db);
467 '@phan-var-force ModelePDFProduct $module';
469 $modulequalified = 1;
470 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
471 $modulequalified = 0;
473 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
474 $modulequalified = 0;
477 if ($modulequalified) {
478 print
'<tr class="oddeven"><td width="100">';
479 print(empty($module->name) ? $name : $module->
name);
481 if (method_exists($module,
'info')) {
482 print $module->info($langs);
484 print $module->description;
489 if (in_array($name, $def)) {
490 print
'<td class="center">'.
"\n";
491 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.newToken().
'&value='.urlencode($name).
'">';
492 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
496 print
'<td class="center">'.
"\n";
497 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>';
502 print
'<td class="center">';
504 print
img_picto($langs->trans(
"Default"),
'on');
506 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=setdoc&token='.newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"Disabled"),
'off').
'</a>';
511 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
512 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
513 if ($module->type ==
'pdf') {
514 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
516 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
517 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
518 $htmltooltip .=
'<br>'.$langs->trans(
"MultiLanguage").
': '.
yn($module->option_multilang, 1, 1);
521 print
'<td class="center">';
522 print $form->textwithpicto(
'', $htmltooltip, 1,
'info');
526 print
'<td class="center">';
527 if ($module->type ==
'pdf') {
528 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'contract').
'</a>';
530 print
img_object($langs->transnoentitiesnoconv(
"PreviewNotAvailable"),
'generic');
556print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
557print
'<input type="hidden" name="token" value="'.newToken().
'">';
558print
'<input type="hidden" name="action" value="other">';
559print
'<input type="hidden" name="page_y" value="">';
565print
'<div class="div-table-responsive-no-min">';
566print
'<table class="noborder centpercent">';
567print
'<tr class="liste_titre">';
568print
'<td>'.$langs->trans(
"Parameters").
'</td>'.
"\n";
569print
'<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
575print
'<tr class="oddeven">';
576print
'<td>'.$langs->trans(
"AssociatedProductsAbility").
'</td>';
577print
'<td class="right">';
578print ajax_constantonoff(
"PRODUIT_SOUSPRODUITS", array(),
$conf->entity, 0, 0, 1, 0);
585print
'<tr class="oddeven">';
586print
'<td>'.$langs->trans(
"VariantsAbility").
'</td>';
587print
'<td class="right">';
589 print
'<span class="opacitymedium">'.$langs->trans(
"ModuleMustBeEnabled", $langs->transnoentitiesnoconv(
"Module610Name")).
'</span>';
591 print
yn(1).
' <span class="opacitymedium">('.$langs->trans(
"ModuleIsEnabled", $langs->transnoentitiesnoconv(
"Module610Name")).
')</span>';
599print
'<tr class="oddeven">';
601 print
'<td>'.$langs->trans(
"PricingRule").
'</td>';
603 print
'<td>'.$form->textwithpicto($langs->trans(
"PricingRule"), $langs->trans(
"SamePriceAlsoForSharedCompanies"), 1).
'</td>';
605print
'<td class="right">';
606$current_rule =
'PRODUCT_PRICE_UNIQ';
608 $current_rule =
'PRODUIT_MULTIPRICES';
611 $current_rule =
'PRODUIT_CUSTOMER_PRICES_BY_QTY';
614 $current_rule =
'PRODUIT_CUSTOMER_PRICES';
617 $current_rule =
'PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES';
620 $current_rule =
'PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES';
622print $form->selectarray(
"princingrule", $select_pricing_rules, $current_rule, 0, 0, 0,
'', 1, 0, 0,
'',
'maxwidth400', 1);
629 print
'<tr class="oddeven">';
630 print
'<td>'.$langs->trans(
"MultiPricesNumPrices").
'</td>';
631 print
'<td class="right"><input size="3" type="text" class="flat right" name="value_PRODUIT_MULTIPRICES_LIMIT" value="' .
getDolGlobalString(
'PRODUIT_MULTIPRICES_LIMIT').
'"></td>';
636print
'<tr class="oddeven">';
637print
'<td>'.$langs->trans(
"DefaultPriceType").
'</td>';
638print
'<td class="right">';
639print $form->selectPriceBaseType(
getDolGlobalString(
'PRODUCT_PRICE_BASE_TYPE'),
"price_base_type");
645 print
'<tr class="oddeven">';
646 print
'<td>'.$form->textwithpicto($langs->trans(
"UseProductCustomerPackaging", $langs->transnoentities(
"PackagingForThisProduct")), $langs->trans(
"PackagingForThisProductDesc")).
'</td>';
647 print
'<td class="right">';
649 print
'<span class="opacitymedium">'.$langs->trans(
"NotSupportedWithRuleForCustomerPrice").
'</span>';
651 print ajax_constantonoff(
"PRODUCT_USE_CUSTOMER_PACKAGING", array(),
$conf->entity, 0, 0, 0, 0);
659 print
'<tr class="oddeven">';
660 print
'<td>'.$form->textwithpicto($langs->trans(
"UseProductSupplierPackaging", $langs->transnoentities(
"PackagingForThisProduct")), $langs->trans(
"PackagingForThisProductDesc")).
'</td>';
661 print
'<td class="right">';
662 print ajax_constantonoff(
"PRODUCT_USE_SUPPLIER_PACKAGING", array(),
$conf->entity, 0, 0, 0, 0);
666 print
'<tr class="oddeven">';
667 print
'<td>'.$langs->trans(
"UseProductFournDesc").
'</td>';
668 print
'<td class="right">';
669 print ajax_constantonoff(
"PRODUIT_FOURN_TEXTS", array(),
$conf->entity, 0, 0, 0, 0);
677print
'<div class="center">';
678print
'<input type="submit" class="button reposition" value="'.$langs->trans(
"Modify").
'">';
688print
'<div class="div-table-responsive-no-min">';
689print
'<table class="noborder centpercent">';
690print
'<tr class="liste_titre">';
691print
'<td>'.$langs->trans(
"Parameters").
'</td>'.
"\n";
692print
'<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
697print
'<tr class="oddeven">';
698print
'<td>'.$form->textwithpicto($langs->trans(
"UseSearchToSelectProduct"), $langs->trans(
'UseSearchToSelectProductTooltip'), 1).
'</td>';
699if (empty(
$conf->use_javascript_ajax)) {
700 print
'<td class="nowrap right">';
701 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
704 print
'<td class="right">';
706 '0' => $langs->trans(
"No"),
707 '1' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 1).
'</span>',
708 '2' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 2).
'</span>',
709 '3' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 3).
'</span>',
711 print $form->selectarray(
"activate_usesearchtoselectproduct", $arrval,
getDolGlobalInt(
'PRODUIT_USE_SEARCH_TO_SELECT'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth125imp maxwidth400');
717print
'<tr class="oddeven">';
718print
'<td>'.$langs->trans(
"NumberOfProductShowInSelect").
'</td>';
719print
'<td class="right"><input size="3" type="text" class="flat" name="value_PRODUIT_LIMIT_SIZE" value="' .
getDolGlobalString(
'PRODUIT_LIMIT_SIZE', 1000).
'"></td>';
724print
'<tr class="oddeven">';
725print
'<td>'.$langs->trans(
"OnProductSelectAddProductDesc").
'</td>';
726print
'<td class="right">';
727print
'<!-- PRODUIT_AUTOFILL_DESC -->';
728print $form->selectarray(
729 "activate_FillProductDescAuto",
730 array(0 =>
'DoNotAutofillButAutoConcat', 1 =>
'AutoFillFormFieldBeforeSubmit', 2 =>
'DoNotUseDescriptionOfProdut'),
740 'minwidth125imp maxwidth400',
747print
'<tr class="oddeven">';
748print
'<td>'.$langs->trans(
"ViewProductDescInFormAbility").
'</td>';
749print
'<td class="right">';
750$arrayofchoices = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes").
' ('.$langs->trans(
"DesktopsOnly").
')',
'2' => $langs->trans(
"Yes").
' ('.$langs->trans(
"DesktopsAndSmartphones").
')');
751print $form->selectarray(
"PRODUIT_DESC_IN_FORM", $arrayofchoices,
getDolGlobalInt(
'PRODUIT_DESC_IN_FORM'), 0);
779 print
'<tr class="oddeven">';
780 print
'<td>'.$langs->trans(
"ViewProductDescInThirdpartyLanguageAbility").
'</td>';
781 print
'<td class="right">';
782 print $form->selectyesno(
"activate_viewProdTextsInThirdpartyLanguage",
getDolGlobalInt(
'PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE'), 1);
790 $dir = DOL_DOCUMENT_ROOT.
"/product/canvas/";
792 print
'<tr class="liste_titre">';
793 print
'<td>'.$langs->trans(
"ProductSpecial").
'</td>'.
"\n";
794 print
'<td class="right">'.$langs->trans(
"Value").
'</td>'.
"\n";
798 require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
800 $handle = opendir($dir);
801 if (is_resource($handle)) {
802 while (($file = readdir($handle)) !==
false) {
803 if (file_exists($dir.$file.
'/product.'.$file.
'.class.php')) {
804 $classfile = $dir.$file.
'/product.'.$file.
'.class.php';
805 $classname =
'Product'.ucfirst($file);
807 require_once $classfile;
812 if (
$conf->$module->enabled) {
813 print
'<tr class="oddeven"><td>';
817 print
'</td><td class="right">';
819 $const =
"PRODUCT_SPECIAL_".strtoupper($file);
822 print
img_picto($langs->trans(
"Active"),
'tick');
823 print
'</td><td class="right">';
824 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.newToken().
'&spe='.urlencode($file).
'&value=0">'.$langs->trans(
"Disable").
'</a>';
826 print
' </td><td class="right">';
827 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.newToken().
'&spe='.urlencode($file).
'&value=1">'.$langs->trans(
"Activate").
'</a>';
844print
'<div class="center">';
845print
'<input type="submit" class="button reposition" value="'.$langs->trans(
"Modify").
'">';
if(! $sortfield) if(! $sortorder) $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.
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 products or services.
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, $allowothertags=array())
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, $morecssdiv='')
Show tabs of a record.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $allowothertags=array())
Show a picto called object_picto (generic function)
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
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...
if(!function_exists( 'dol_getprefix')) dol_include_once($relpath, $classname='')
Make an include_once using default root and alternate root if it fails.
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...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
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.
product_admin_prepare_head()
Return array head with list of tabs to view object information.
$conf db name
Only used if Module[ID]Name translation string is not found.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.