34require
'../../main.inc.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/lib/product.lib.php';
37require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
38require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formbarcode.class.php';
41$langs->loadLangs(array(
"admin",
"products"));
44if (!$user->admin || (!isModEnabled(
"product") && !isModEnabled(
"service"))) {
48$action =
GETPOST(
'action',
'aZ09');
49$value =
GETPOST(
'value',
'alpha');
50$modulepart =
GETPOST(
'modulepart',
'aZ09');
52$label =
GETPOST(
'label',
'alpha');
53$scandir =
GETPOST(
'scan_dir',
'alpha');
57$select_pricing_rules = array(
58 'PRODUCT_PRICE_UNIQ'=>$langs->trans(
'PriceCatalogue'),
59 'PRODUIT_MULTIPRICES'=>$langs->trans(
'MultiPricesAbility'),
60 'PRODUIT_CUSTOMER_PRICES'=>$langs->trans(
'PriceByCustomer'),
62$keyforparam =
'PRODUIT_CUSTOMER_PRICES_BY_QTY';
63if (
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') >= 1 || !empty($conf->global->$keyforparam)) {
64 $select_pricing_rules[
'PRODUIT_CUSTOMER_PRICES_BY_QTY'] = $langs->trans(
'PriceByQuantity').
' ('.$langs->trans(
"VersionExperimental").
')';
66$keyforparam =
'PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES';
67if (
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') >= 2 || !empty($conf->global->$keyforparam)) {
68 $select_pricing_rules[
'PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES'] = $langs->trans(
'MultiPricesAbility').
'+'.$langs->trans(
'PriceByQuantity').
' ('.$langs->trans(
"VersionExperimental").
')';
73 dolibarr_set_const($db,
'PRODUIT_MULTIPRICES_LIMIT', 5,
'chaine', 0,
'', $conf->entity);
83$nomessageinsetmoduleoptions = 1;
84include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
86if ($action ==
'setcodeproduct') {
87 if (
dolibarr_set_const($db,
"PRODUCT_CODEPRODUCT_ADDON", $value,
'chaine', 0,
'', $conf->entity) > 0) {
88 header(
"Location: ".$_SERVER[
"PHP_SELF"]);
95if ($action ==
'other' &&
GETPOST(
'value_PRODUIT_LIMIT_SIZE') >= 0) {
96 $res =
dolibarr_set_const($db,
"PRODUIT_LIMIT_SIZE",
GETPOST(
'value_PRODUIT_LIMIT_SIZE'),
'chaine', 0,
'', $conf->entity);
101if ($action ==
'other' &&
GETPOST(
'value_PRODUIT_MULTIPRICES_LIMIT') > 0) {
102 $res =
dolibarr_set_const($db,
"PRODUIT_MULTIPRICES_LIMIT",
GETPOST(
'value_PRODUIT_MULTIPRICES_LIMIT'),
'chaine', 0,
'', $conf->entity);
107if ($action ==
'other') {
108 $princingrules =
GETPOST(
'princingrule',
'alpha');
109 foreach ($select_pricing_rules as $tmprule => $tmplabel) {
110 if ($tmprule == $princingrules) {
111 if ($princingrules ==
'PRODUCT_PRICE_UNIQ') {
112 $res =
dolibarr_set_const($db,
'PRODUIT_MULTIPRICES', 0,
'chaine', 0,
'', $conf->entity);
113 $res =
dolibarr_set_const($db,
'PRODUIT_CUSTOMER_PRICES_BY_QTY', 0,
'chaine', 0,
'', $conf->entity);
114 $res =
dolibarr_set_const($db,
'PRODUIT_CUSTOMER_PRICES', 0,
'chaine', 0,
'', $conf->entity);
117 $multirule = explode(
'&', $princingrules);
118 foreach ($multirule as $rulesselected) {
123 if (strpos($tmprule,
'&') ===
false) {
129 $value =
GETPOST(
'price_base_type',
'alpha');
130 $res =
dolibarr_set_const($db,
"PRODUCT_PRICE_BASE_TYPE", $value,
'chaine', 0,
'', $conf->entity);
135 $value =
GETPOST(
'PRODUIT_DESC_IN_FORM',
'alpha');
136 $res =
dolibarr_set_const($db,
"PRODUIT_DESC_IN_FORM", $value,
'chaine', 0,
'', $conf->entity);
138 $value =
GETPOST(
'activate_viewProdTextsInThirdpartyLanguage',
'alpha');
139 $res =
dolibarr_set_const($db,
"PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE", $value,
'chaine', 0,
'', $conf->entity);
141 $value =
GETPOST(
'activate_mergePropalProductCard',
'alpha');
142 $res =
dolibarr_set_const($db,
"PRODUIT_PDF_MERGE_PROPAL", $value,
'chaine', 0,
'', $conf->entity);
144 $value =
GETPOST(
'activate_usesearchtoselectproduct',
'alpha');
145 $res =
dolibarr_set_const($db,
"PRODUIT_USE_SEARCH_TO_SELECT", $value,
'chaine', 0,
'', $conf->entity);
147 $value =
GETPOST(
'activate_FillProductDescAuto',
'alpha');
148 $res =
dolibarr_set_const($db,
"PRODUIT_AUTOFILL_DESC", $value,
'chaine', 0,
'', $conf->entity);
150 if (GETPOSTISSET(
'PRODUIT_FOURN_TEXTS')) {
151 $value =
GETPOST(
'PRODUIT_FOURN_TEXTS',
'alpha');
152 $res =
dolibarr_set_const($db,
"PRODUIT_FOURN_TEXTS", $value,
'chaine', 0,
'', $conf->entity);
155 if (GETPOSTISSET(
'PRODUCT_USE_SUPPLIER_PACKAGING')) {
156 $value =
GETPOST(
'PRODUCT_USE_SUPPLIER_PACKAGING',
'alpha');
157 $res =
dolibarr_set_const($db,
"PRODUCT_USE_SUPPLIER_PACKAGING", $value,
'chaine', 0,
'', $conf->entity);
162if ($action ==
'specimen') {
163 $modele =
GETPOST(
'module',
'alpha');
166 $product->initAsSpecimen();
172 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
173 foreach ($dirmodels as $reldir) {
174 $file =
dol_buildpath($reldir.
"core/modules/product/doc/pdf_".$modele.
".modules.php", 0);
175 if (file_exists($file)) {
177 $classname =
"pdf_".$modele;
185 $module =
new $classname($db);
187 if ($module->write_file($product, $langs,
'') > 0) {
188 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=product&file=SPECIMEN.pdf");
196 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
201if ($action ==
'set') {
205if ($action ==
'del') {
215if ($action ==
'setdoc') {
216 if (
dolibarr_set_const($db,
"PRODUCT_ADDON_PDF", $value,
'chaine', 0,
'', $conf->entity)) {
219 $conf->global->PRODUCT_ADDON_PDF = $value;
230if ($action ==
'set') {
231 $const =
"PRODUCT_SPECIAL_".strtoupper(
GETPOST(
'spe',
'alpha'));
233 if (
GETPOST(
'value',
'alpha')) {
244if (preg_match(
'/set_(.+)/', $action, $reg)) {
245 $keyforvar = $reg[1];
253if (preg_match(
'/del_(.+)/', $action, $reg)) {
254 $keyforvar = $reg[1];
274$title = $langs->trans(
'ProductServiceSetup');
275$tab = $langs->trans(
"ProductsAndServices");
276if (!isModEnabled(
"product")) {
277 $title = $langs->trans(
'ServiceSetup');
278 $tab = $langs->trans(
'Services');
279} elseif (!isModEnabled(
"service")) {
280 $title = $langs->trans(
'ProductSetup');
281 $tab = $langs->trans(
'Products');
286$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
292$form =
new Form($db);
295$dirproduct = array(
'/core/modules/product/');
296$dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
300print
'<div class="div-table-responsive-no-min">';
301print
'<table class="noborder centpercent">'.
"\n";
302print
'<tr class="liste_titre">'.
"\n";
303print
' <td>'.$langs->trans(
"Name").
'</td>';
304print
' <td>'.$langs->trans(
"Description").
'</td>';
305print
' <td>'.$langs->trans(
"Example").
'</td>';
306print
' <td class="center" width="80">'.$langs->trans(
"Status").
'</td>';
307print
' <td class="center"></td>';
310foreach ($dirproduct as $dirroot) {
313 $handle = @opendir($dir);
314 if (is_resource($handle)) {
316 while (($file = readdir($handle)) !==
false) {
317 if (substr($file, 0, 16) ==
'mod_codeproduct_' && substr($file, -3) ==
'php') {
318 $file = substr($file, 0,
dol_strlen($file) - 4);
326 $modCodeProduct =
new $file();
329 if ($modCodeProduct->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
332 if ($modCodeProduct->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
336 print
'<tr class="oddeven">'.
"\n";
337 print
'<td width="140">'.$modCodeProduct->name.
'</td>'.
"\n";
338 print
'<td>'.$modCodeProduct->info($langs).
'</td>'.
"\n";
339 print
'<td class="nowrap"><span class="opacitymedium">'.$modCodeProduct->getExample($langs).
'</span></td>'.
"\n";
341 if (
getDolGlobalString(
'PRODUCT_CODEPRODUCT_ADDON') && $conf->global->PRODUCT_CODEPRODUCT_ADDON == $file) {
342 print
'<td class="center">'.
"\n";
343 print
img_picto($langs->trans(
"Activated"),
'switch_on');
347 if (isModEnabled(
'multicompany') && (is_object($mc) && !empty($mc->sharings[
'referent']) && $mc->sharings[
'referent'] == $conf->entity) ?
false : true) {
349 print
'<td class="center">';
351 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setcodeproduct&token='.newToken().
'&value='.urlencode($file).
'">';
353 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
360 print
'<td class="center">';
361 $s = $modCodeProduct->getToolTip($langs,
null, -1);
362 print $form->textwithpicto(
'', $s, 1);
377$sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
378$sql .=
" WHERE type = '".$db->escape($type).
"'";
379$sql .=
" AND entity = ".$conf->entity;
380$resql = $db->query($sql);
383 $num_rows = $db->num_rows($resql);
384 while ($i < $num_rows) {
385 $array = $db->fetch_array($resql);
386 array_push($def, $array[0]);
397print
'<div class="div-table-responsive-no-min">';
398print
'<table class="noborder centpercent">';
399print
'<tr class="liste_titre">';
400print
'<td>'.$langs->trans(
"Name").
'</td>';
401print
'<td>'.$langs->trans(
"Description").
'</td>';
402print
'<td class="center" width="60">'.$langs->trans(
"Status").
"</td>\n";
403print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
404print
'<td class="center"></td>';
405print
'<td class="center" width="80">'.$langs->trans(
"Preview").
'</td>';
410foreach ($dirmodels as $reldir) {
411 foreach (array(
'',
'/doc') as $valdir) {
412 $dir =
dol_buildpath($reldir.
"core/modules/product".$valdir);
414 $handle = opendir($dir);
415 if (is_resource($handle)) {
416 while (($file = readdir($handle)) !==
false) {
422 foreach ($filelist as $file) {
423 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
424 if (file_exists($dir.
'/'.$file)) {
425 $name = substr($file, 4,
dol_strlen($file) - 16);
426 $classname = substr($file, 0,
dol_strlen($file) - 12);
428 require_once $dir.
'/'.$file;
429 $module =
new $classname($db);
431 $modulequalified = 1;
432 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
433 $modulequalified = 0;
435 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
436 $modulequalified = 0;
439 if ($modulequalified) {
440 print
'<tr class="oddeven"><td width="100">';
441 print(empty($module->name) ? $name : $module->
name);
443 if (method_exists($module,
'info')) {
444 print $module->info($langs);
446 print $module->description;
451 if (in_array($name, $def)) {
452 print
'<td class="center">'.
"\n";
453 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.newToken().
'&value='.urlencode($name).
'">';
454 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
458 print
'<td class="center">'.
"\n";
459 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>';
464 print
'<td class="center">';
466 print
img_picto($langs->trans(
"Default"),
'on');
468 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>';
473 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
474 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
475 if ($module->type ==
'pdf') {
476 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
478 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
479 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
480 $htmltooltip .=
'<br>'.$langs->trans(
"MultiLanguage").
': '.
yn($module->option_multilang, 1, 1);
483 print
'<td class="center">';
484 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
488 print
'<td class="center">';
489 if ($module->type ==
'pdf') {
490 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'contract').
'</a>';
492 print
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
518print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
519print
'<input type="hidden" name="token" value="'.newToken().
'">';
520print
'<input type="hidden" name="action" value="other">';
521print
'<input type="hidden" name="page_y" value="">';
527print
'<div class="div-table-responsive-no-min">';
528print
'<table class="noborder centpercent">';
529print
'<tr class="liste_titre">';
530print
'<td>'.$langs->trans(
"Parameters").
'</td>'.
"\n";
531print
'<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
537print
'<tr class="oddeven">';
538print
'<td>'.$langs->trans(
"AssociatedProductsAbility").
'</td>';
539print
'<td class="right">';
540print ajax_constantonoff(
"PRODUIT_SOUSPRODUITS", array(), $conf->entity, 0, 0, 1, 0);
548print
'<tr class="oddeven">';
549print
'<td>'.$langs->trans(
"VariantsAbility").
'</td>';
550print
'<td class="right">';
553if (!isModEnabled(
'variants')) {
554 print
'<span class="opacitymedium">'.$langs->trans(
"ModuleMustBeEnabled", $langs->transnoentitiesnoconv(
"Module610Name")).
'</span>';
556 print
yn(1).
' <span class="opacitymedium">('.$langs->trans(
"ModuleIsEnabled", $langs->transnoentitiesnoconv(
"Module610Name")).
')</span>';
564print
'<tr class="oddeven">';
565if (!isModEnabled(
'multicompany')) {
566 print
'<td>'.$langs->trans(
"PricingRule").
'</td>';
568 print
'<td>'.$form->textwithpicto($langs->trans(
"PricingRule"), $langs->trans(
"SamePriceAlsoForSharedCompanies"), 1).
'</td>';
570print
'<td class="right">';
571$current_rule =
'PRODUCT_PRICE_UNIQ';
573 $current_rule =
'PRODUIT_MULTIPRICES';
576 $current_rule =
'PRODUIT_CUSTOMER_PRICES_BY_QTY';
579 $current_rule =
'PRODUIT_CUSTOMER_PRICES';
582 $current_rule =
'PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES';
584print $form->selectarray(
"princingrule", $select_pricing_rules, $current_rule, 0, 0, 0,
'', 1, 0, 0,
'',
'maxwidth400', 1);
591 print
'<tr class="oddeven">';
592 print
'<td>'.$langs->trans(
"MultiPricesNumPrices").
'</td>';
593 print
'<td class="right"><input size="3" type="text" class="flat right" name="value_PRODUIT_MULTIPRICES_LIMIT" value="' .
getDolGlobalString(
'PRODUIT_MULTIPRICES_LIMIT').
'"></td>';
598print
'<tr class="oddeven">';
599print
'<td>'.$langs->trans(
"DefaultPriceType").
'</td>';
600print
'<td class="right">';
601print $form->selectPriceBaseType($conf->global->PRODUCT_PRICE_BASE_TYPE,
"price_base_type");
606if (isModEnabled(
"supplier_order") || isModEnabled(
"supplier_invoice")) {
607 print
'<tr class="oddeven">';
608 print
'<td>'.$form->textwithpicto($langs->trans(
"UseProductSupplierPackaging"), $langs->trans(
"PackagingForThisProductDesc")).
'</td>';
609 print
'<td align="right">';
610 print ajax_constantonoff(
"PRODUCT_USE_SUPPLIER_PACKAGING", array(), $conf->entity, 0, 0, 0, 0);
615 print
'<tr class="oddeven">';
616 print
'<td>'.$langs->trans(
"UseProductFournDesc").
'</td>';
617 print
'<td class="right">';
618 print ajax_constantonoff(
"PRODUIT_FOURN_TEXTS", array(), $conf->entity, 0, 0, 0, 0);
627print
'<div class="center">';
628print
'<input type="submit" class="button reposition" value="'.$langs->trans(
"Modify").
'">';
635print
'<div class="div-table-responsive-no-min">';
636print
'<table class="noborder centpercent">';
637print
'<tr class="liste_titre">';
638print
'<td>'.$langs->trans(
"Parameters").
'</td>'.
"\n";
639print
'<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
644print
'<tr class="oddeven">';
645print
'<td>'.$form->textwithpicto($langs->trans(
"UseSearchToSelectProduct"), $langs->trans(
'UseSearchToSelectProductTooltip'), 1).
'</td>';
646if (empty($conf->use_javascript_ajax)) {
647 print
'<td class="nowrap right">';
648 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
651 print
'<td class="right">';
653 '0'=>$langs->trans(
"No"),
654 '1'=>$langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 1).
')',
655 '2'=>$langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 2).
')',
656 '3'=>$langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 3).
')',
658 print $form->selectarray(
"activate_usesearchtoselectproduct", $arrval, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT);
664 print
'<tr class="oddeven">';
665 print
'<td>'.$langs->trans(
"NumberOfProductShowInSelect").
'</td>';
666 print
'<td class="right"><input size="3" type="text" class="flat" name="value_PRODUIT_LIMIT_SIZE" value="' .
getDolGlobalString(
'PRODUIT_LIMIT_SIZE').
'"></td>';
671print
'<tr class="oddeven">';
672print
'<td>'.$langs->trans(
"OnProductSelectAddProductDesc").
'</td>';
673print
'<td class="right">';
674print
'<!-- PRODUIT_AUTOFILL_DESC -->';
675print $form->selectarray(
676 "activate_FillProductDescAuto",
677 array(0=>
'DoNotAutofillButAutoConcat', 1=>
'AutoFillFormFieldBeforeSubmit', 2=>
'DoNotUseDescriptionOfProdut'),
678 !
getDolGlobalString(
'PRODUIT_AUTOFILL_DESC') ? 0 : $conf->global->PRODUIT_AUTOFILL_DESC,
687 'minwidth100imp maxwidth400',
694print
'<tr class="oddeven">';
695print
'<td>'.$langs->trans(
"ViewProductDescInFormAbility").
'</td>';
696print
'<td class="right">';
697$arrayofchoices = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes").
' ('.$langs->trans(
"DesktopsOnly").
')',
'2' => $langs->trans(
"Yes").
' ('.$langs->trans(
"DesktopsAndSmartphones").
')');
698print $form->selectarray(
"PRODUIT_DESC_IN_FORM", $arrayofchoices,
getDolGlobalInt(
'PRODUIT_DESC_IN_FORM'), 0);
726 print
'<tr class="oddeven">';
727 print
'<td>'.$langs->trans(
"ViewProductDescInThirdpartyLanguageAbility").
'</td>';
728 print
'<td class="right">';
729 print $form->selectyesno(
"activate_viewProdTextsInThirdpartyLanguage", (
getDolGlobalString(
'PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE') ? $conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE : 0), 1);
737 $dir = DOL_DOCUMENT_ROOT.
"/product/canvas/";
739 print
'<tr class="liste_titre">';
740 print
'<td>'.$langs->trans(
"ProductSpecial").
'</td>'.
"\n";
741 print
'<td class="right">'.$langs->trans(
"Value").
'</td>'.
"\n";
745 require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
747 $handle = opendir($dir);
748 if (is_resource($handle)) {
749 while (($file = readdir($handle)) !==
false) {
750 if (file_exists($dir.$file.
'/product.'.$file.
'.class.php')) {
751 $classfile = $dir.$file.
'/product.'.$file.
'.class.php';
752 $classname =
'Product'.ucfirst($file);
754 require_once $classfile;
755 $object =
new $classname();
757 $module = $object->module;
759 if ($conf->$module->enabled) {
760 print
'<tr class="oddeven"><td>';
762 print $object->description;
764 print
'</td><td class="right">';
766 $const =
"PRODUCT_SPECIAL_".strtoupper($file);
769 print
img_picto($langs->trans(
"Active"),
'tick');
770 print
'</td><td class="right">';
771 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.newToken().
'&spe='.urlencode($file).
'&value=0">'.$langs->trans(
"Disable").
'</a>';
773 print
' </td><td class="right">';
774 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.newToken().
'&spe='.urlencode($file).
'&value=1">'.$langs->trans(
"Activate").
'</a>';
791print
'<div class="center">';
792print
'<input type="submit" class="button reposition" value="'.$langs->trans(
"Modify").
'">';
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.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage products or services.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
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_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0)
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.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
if(!function_exists( 'dol_getprefix')) dol_include_once($relpath, $classname='')
Make an include_once using default root and alternate root if it fails.
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.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
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 informations.
$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.