35require
'../../main.inc.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/lib/product.lib.php';
38require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
39require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formbarcode.class.php';
42$langs->loadLangs(array(
"admin",
"products"));
45if (!$user->admin || (!isModEnabled(
"product") && !isModEnabled(
"service"))) {
49$action =
GETPOST(
'action',
'aZ09');
50$value =
GETPOST(
'value',
'alpha');
51$modulepart =
GETPOST(
'modulepart',
'aZ09');
53$label =
GETPOST(
'label',
'alpha');
54$scandir =
GETPOST(
'scan_dir',
'alpha');
58$select_pricing_rules = array(
59 'PRODUCT_PRICE_UNIQ' => $langs->trans(
'PriceCatalogue'),
60 'PRODUIT_MULTIPRICES' => $langs->trans(
'MultiPricesAbility'),
61 'PRODUIT_CUSTOMER_PRICES' => $langs->trans(
'PriceByCustomer'),
63$keyforparam =
'PRODUIT_CUSTOMER_PRICES_BY_QTY';
64if (
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') >= 1 || !empty($conf->global->$keyforparam)) {
65 $select_pricing_rules[
'PRODUIT_CUSTOMER_PRICES_BY_QTY'] = $langs->trans(
'PriceByQuantity').
' ('.$langs->trans(
"VersionExperimental").
')';
67$keyforparam =
'PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES';
68if (
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') >= 2 || !empty($conf->global->$keyforparam)) {
69 $select_pricing_rules[
'PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES'] = $langs->trans(
'MultiPricesAbility').
'+'.$langs->trans(
'PriceByQuantity').
' ('.$langs->trans(
"VersionExperimental").
')';
74 dolibarr_set_const($db,
'PRODUIT_MULTIPRICES_LIMIT', 5,
'chaine', 0,
'', $conf->entity);
84$nomessageinsetmoduleoptions = 1;
85include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
87if ($action ==
'setcodeproduct') {
88 if (
dolibarr_set_const($db,
"PRODUCT_CODEPRODUCT_ADDON", $value,
'chaine', 0,
'', $conf->entity) > 0) {
89 header(
"Location: ".$_SERVER[
"PHP_SELF"]);
96if ($action ==
'other' &&
GETPOST(
'value_PRODUIT_LIMIT_SIZE') >= 0) {
97 $res =
dolibarr_set_const($db,
"PRODUIT_LIMIT_SIZE",
GETPOST(
'value_PRODUIT_LIMIT_SIZE'),
'chaine', 0,
'', $conf->entity);
102if ($action ==
'other' &&
GETPOST(
'value_PRODUIT_MULTIPRICES_LIMIT') > 0) {
103 $res =
dolibarr_set_const($db,
"PRODUIT_MULTIPRICES_LIMIT",
GETPOST(
'value_PRODUIT_MULTIPRICES_LIMIT'),
'chaine', 0,
'', $conf->entity);
108if ($action ==
'other') {
109 $princingrules =
GETPOST(
'princingrule',
'alpha');
110 foreach ($select_pricing_rules as $tmprule => $tmplabel) {
111 if ($tmprule == $princingrules) {
112 if ($princingrules ==
'PRODUCT_PRICE_UNIQ') {
113 $res =
dolibarr_set_const($db,
'PRODUIT_MULTIPRICES', 0,
'chaine', 0,
'', $conf->entity);
114 $res =
dolibarr_set_const($db,
'PRODUIT_CUSTOMER_PRICES_BY_QTY', 0,
'chaine', 0,
'', $conf->entity);
115 $res =
dolibarr_set_const($db,
'PRODUIT_CUSTOMER_PRICES', 0,
'chaine', 0,
'', $conf->entity);
118 $multirule = explode(
'&', $princingrules);
119 foreach ($multirule as $rulesselected) {
124 if (strpos($tmprule,
'&') ===
false) {
130 $value =
GETPOST(
'price_base_type',
'alpha');
131 $res =
dolibarr_set_const($db,
"PRODUCT_PRICE_BASE_TYPE", $value,
'chaine', 0,
'', $conf->entity);
136 $value =
GETPOST(
'PRODUIT_DESC_IN_FORM',
'alpha');
137 $res =
dolibarr_set_const($db,
"PRODUIT_DESC_IN_FORM", $value,
'chaine', 0,
'', $conf->entity);
139 $value =
GETPOST(
'activate_viewProdTextsInThirdpartyLanguage',
'alpha');
140 $res =
dolibarr_set_const($db,
"PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE", $value,
'chaine', 0,
'', $conf->entity);
142 $value =
GETPOST(
'activate_mergePropalProductCard',
'alpha');
143 $res =
dolibarr_set_const($db,
"PRODUIT_PDF_MERGE_PROPAL", $value,
'chaine', 0,
'', $conf->entity);
145 $value =
GETPOST(
'activate_usesearchtoselectproduct',
'alpha');
146 $res =
dolibarr_set_const($db,
"PRODUIT_USE_SEARCH_TO_SELECT", $value,
'chaine', 0,
'', $conf->entity);
148 $value =
GETPOST(
'activate_FillProductDescAuto',
'alpha');
149 $res =
dolibarr_set_const($db,
"PRODUIT_AUTOFILL_DESC", $value,
'chaine', 0,
'', $conf->entity);
151 if (GETPOSTISSET(
'PRODUIT_FOURN_TEXTS')) {
152 $value =
GETPOST(
'PRODUIT_FOURN_TEXTS',
'alpha');
153 $res =
dolibarr_set_const($db,
"PRODUIT_FOURN_TEXTS", $value,
'chaine', 0,
'', $conf->entity);
156 if (GETPOSTISSET(
'PRODUCT_USE_SUPPLIER_PACKAGING')) {
157 $value =
GETPOST(
'PRODUCT_USE_SUPPLIER_PACKAGING',
'alpha');
158 $res =
dolibarr_set_const($db,
"PRODUCT_USE_SUPPLIER_PACKAGING", $value,
'chaine', 0,
'', $conf->entity);
163if ($action ==
'specimen') {
164 $modele =
GETPOST(
'module',
'alpha');
167 $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)) {
176 $classname =
"pdf_".$modele;
181 if ($classname !==
'') {
184 $module =
new $classname($db);
186 if ($module->write_file($product, $langs,
'') > 0) {
187 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=product&file=SPECIMEN.pdf");
195 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
200if ($action ==
'set') {
204if ($action ==
'del') {
214if ($action ==
'setdoc') {
215 if (
dolibarr_set_const($db,
"PRODUCT_ADDON_PDF", $value,
'chaine', 0,
'', $conf->entity)) {
218 $conf->global->PRODUCT_ADDON_PDF = $value;
229if ($action ==
'set') {
230 $const =
"PRODUCT_SPECIAL_".strtoupper(
GETPOST(
'spe',
'alpha'));
232 if (
GETPOST(
'value',
'alpha')) {
243if (preg_match(
'/set_(.+)/', $action, $reg)) {
244 $keyforvar = $reg[1];
252if (preg_match(
'/del_(.+)/', $action, $reg)) {
253 $keyforvar = $reg[1];
273$title = $langs->trans(
'ProductServiceSetup');
274$tab = $langs->trans(
"ProductsAndServices");
275if (!isModEnabled(
"product")) {
276 $title = $langs->trans(
'ServiceSetup');
277 $tab = $langs->trans(
'Services');
278} elseif (!isModEnabled(
"service")) {
279 $title = $langs->trans(
'ProductSetup');
280 $tab = $langs->trans(
'Products');
283llxHeader(
'', $title,
'',
'', 0, 0,
'',
'',
'',
'mod-product page-admin_product');
285$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
291$form =
new Form($db);
294$dirproduct = array(
'/core/modules/product/');
295$dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
299print
'<div class="div-table-responsive-no-min">';
300print
'<table class="noborder centpercent">'.
"\n";
301print
'<tr class="liste_titre">'.
"\n";
302print
' <td>'.$langs->trans(
"Name").
'</td>';
303print
' <td>'.$langs->trans(
"Description").
'</td>';
304print
' <td>'.$langs->trans(
"Example").
'</td>';
305print
' <td class="center" width="80">'.$langs->trans(
"Status").
'</td>';
306print
' <td class="center"></td>';
309foreach ($dirproduct as $dirroot) {
312 $handle = @opendir($dir);
313 if (is_resource($handle)) {
315 while (($file = readdir($handle)) !==
false) {
316 if (substr($file, 0, 16) ==
'mod_codeproduct_' && substr($file, -3) ==
'php') {
317 $file = substr($file, 0,
dol_strlen($file) - 4);
325 $modCodeProduct =
new $file();
328 if ($modCodeProduct->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
331 if ($modCodeProduct->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
335 print
'<tr class="oddeven">'.
"\n";
336 print
'<td width="140">'.$modCodeProduct->name.
'</td>'.
"\n";
337 print
'<td>'.$modCodeProduct->info($langs).
'</td>'.
"\n";
338 print
'<td class="nowrap"><span class="opacitymedium">'.$modCodeProduct->getExample($langs).
'</span></td>'.
"\n";
340 if (
getDolGlobalString(
'PRODUCT_CODEPRODUCT_ADDON') && $conf->global->PRODUCT_CODEPRODUCT_ADDON == $file) {
341 print
'<td class="center">'.
"\n";
342 print
img_picto($langs->trans(
"Activated"),
'switch_on');
346 if (isModEnabled(
'multicompany') && (is_object($mc) && !empty($mc->sharings[
'referent']) && $mc->sharings[
'referent'] == $conf->entity) ?
false : true) {
348 print
'<td class="center">';
350 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setcodeproduct&token='.
newToken().
'&value='.urlencode($file).
'">';
352 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
359 print
'<td class="center">';
360 $s = $modCodeProduct->getToolTip($langs,
null, -1);
361 print $form->textwithpicto(
'', $s, 1);
376$sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
377$sql .=
" WHERE type = '".$db->escape($type).
"'";
378$sql .=
" AND entity = ".$conf->entity;
379$resql = $db->query($sql);
382 $num_rows = $db->num_rows($resql);
383 while ($i < $num_rows) {
384 $array = $db->fetch_array($resql);
385 if (is_array($array)) {
386 array_push($def, $array[0]);
398print
'<div class="div-table-responsive-no-min">';
399print
'<table class="noborder centpercent">';
400print
'<tr class="liste_titre">';
401print
'<td>'.$langs->trans(
"Name").
'</td>';
402print
'<td>'.$langs->trans(
"Description").
'</td>';
403print
'<td class="center" width="60">'.$langs->trans(
"Status").
"</td>\n";
404print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
405print
'<td class="center"></td>';
406print
'<td class="center" width="80">'.$langs->trans(
"Preview").
'</td>';
412foreach ($dirmodels as $reldir) {
413 foreach (array(
'',
'/doc') as $valdir) {
414 $dir =
dol_buildpath($reldir.
"core/modules/product".$valdir);
416 $handle = opendir($dir);
417 if (is_resource($handle)) {
418 while (($file = readdir($handle)) !==
false) {
424 foreach ($filelist as $file) {
425 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
426 if (file_exists($dir.
'/'.$file)) {
427 $name = substr($file, 4,
dol_strlen($file) - 16);
428 $classname = substr($file, 0,
dol_strlen($file) - 12);
430 require_once $dir.
'/'.$file;
431 $module =
new $classname($db);
433 $modulequalified = 1;
434 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
435 $modulequalified = 0;
437 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
438 $modulequalified = 0;
441 if ($modulequalified) {
442 print
'<tr class="oddeven"><td width="100">';
443 print(empty($module->name) ? $name : $module->
name);
445 if (method_exists($module,
'info')) {
446 print $module->info($langs);
448 print $module->description;
453 if (in_array($name, $def)) {
454 print
'<td class="center">'.
"\n";
455 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.
newToken().
'&value='.urlencode($name).
'">';
456 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
460 print
'<td class="center">'.
"\n";
461 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>';
466 print
'<td class="center">';
468 print
img_picto($langs->trans(
"Default"),
'on');
470 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>';
475 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
476 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
477 if ($module->type ==
'pdf') {
478 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
480 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
481 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
482 $htmltooltip .=
'<br>'.$langs->trans(
"MultiLanguage").
': '.
yn($module->option_multilang, 1, 1);
485 print
'<td class="center">';
486 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
490 print
'<td class="center">';
491 if ($module->type ==
'pdf') {
492 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'contract').
'</a>';
494 print
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
520print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
521print
'<input type="hidden" name="token" value="'.newToken().
'">';
522print
'<input type="hidden" name="action" value="other">';
523print
'<input type="hidden" name="page_y" value="">';
529print
'<div class="div-table-responsive-no-min">';
530print
'<table class="noborder centpercent">';
531print
'<tr class="liste_titre">';
532print
'<td>'.$langs->trans(
"Parameters").
'</td>'.
"\n";
533print
'<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
539print
'<tr class="oddeven">';
540print
'<td>'.$langs->trans(
"AssociatedProductsAbility").
'</td>';
541print
'<td class="right">';
542print ajax_constantonoff(
"PRODUIT_SOUSPRODUITS", array(), $conf->entity, 0, 0, 1, 0);
550print
'<tr class="oddeven">';
551print
'<td>'.$langs->trans(
"VariantsAbility").
'</td>';
552print
'<td class="right">';
555if (!isModEnabled(
'variants')) {
556 print
'<span class="opacitymedium">'.$langs->trans(
"ModuleMustBeEnabled", $langs->transnoentitiesnoconv(
"Module610Name")).
'</span>';
558 print
yn(1).
' <span class="opacitymedium">('.$langs->trans(
"ModuleIsEnabled", $langs->transnoentitiesnoconv(
"Module610Name")).
')</span>';
566print
'<tr class="oddeven">';
567if (!isModEnabled(
'multicompany')) {
568 print
'<td>'.$langs->trans(
"PricingRule").
'</td>';
570 print
'<td>'.$form->textwithpicto($langs->trans(
"PricingRule"), $langs->trans(
"SamePriceAlsoForSharedCompanies"), 1).
'</td>';
572print
'<td class="right">';
573$current_rule =
'PRODUCT_PRICE_UNIQ';
575 $current_rule =
'PRODUIT_MULTIPRICES';
578 $current_rule =
'PRODUIT_CUSTOMER_PRICES_BY_QTY';
581 $current_rule =
'PRODUIT_CUSTOMER_PRICES';
584 $current_rule =
'PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES';
586print $form->selectarray(
"princingrule", $select_pricing_rules, $current_rule, 0, 0, 0,
'', 1, 0, 0,
'',
'maxwidth400', 1);
593 print
'<tr class="oddeven">';
594 print
'<td>'.$langs->trans(
"MultiPricesNumPrices").
'</td>';
595 print
'<td class="right"><input size="3" type="text" class="flat right" name="value_PRODUIT_MULTIPRICES_LIMIT" value="' .
getDolGlobalString(
'PRODUIT_MULTIPRICES_LIMIT').
'"></td>';
600print
'<tr class="oddeven">';
601print
'<td>'.$langs->trans(
"DefaultPriceType").
'</td>';
602print
'<td class="right">';
603print $form->selectPriceBaseType($conf->global->PRODUCT_PRICE_BASE_TYPE,
"price_base_type");
608if (isModEnabled(
"supplier_order") || isModEnabled(
"supplier_invoice")) {
609 print
'<tr class="oddeven">';
610 print
'<td>'.$form->textwithpicto($langs->trans(
"UseProductSupplierPackaging"), $langs->trans(
"PackagingForThisProductDesc")).
'</td>';
611 print
'<td align="right">';
612 print ajax_constantonoff(
"PRODUCT_USE_SUPPLIER_PACKAGING", array(), $conf->entity, 0, 0, 0, 0);
617 print
'<tr class="oddeven">';
618 print
'<td>'.$langs->trans(
"UseProductFournDesc").
'</td>';
619 print
'<td class="right">';
620 print ajax_constantonoff(
"PRODUIT_FOURN_TEXTS", array(), $conf->entity, 0, 0, 0, 0);
629print
'<div class="center">';
630print
'<input type="submit" class="button reposition" value="'.$langs->trans(
"Modify").
'">';
637print
'<div class="div-table-responsive-no-min">';
638print
'<table class="noborder centpercent">';
639print
'<tr class="liste_titre">';
640print
'<td>'.$langs->trans(
"Parameters").
'</td>'.
"\n";
641print
'<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
646print
'<tr class="oddeven">';
647print
'<td>'.$form->textwithpicto($langs->trans(
"UseSearchToSelectProduct"), $langs->trans(
'UseSearchToSelectProductTooltip'), 1).
'</td>';
648if (empty($conf->use_javascript_ajax)) {
649 print
'<td class="nowrap right">';
650 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
653 print
'<td class="right">';
655 '0' => $langs->trans(
"No"),
656 '1' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 1).
')',
657 '2' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 2).
')',
658 '3' => $langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 3).
')',
660 print $form->selectarray(
"activate_usesearchtoselectproduct", $arrval, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT);
666 print
'<tr class="oddeven">';
667 print
'<td>'.$langs->trans(
"NumberOfProductShowInSelect").
'</td>';
668 print
'<td class="right"><input size="3" type="text" class="flat" name="value_PRODUIT_LIMIT_SIZE" value="' .
getDolGlobalString(
'PRODUIT_LIMIT_SIZE').
'"></td>';
673print
'<tr class="oddeven">';
674print
'<td>'.$langs->trans(
"OnProductSelectAddProductDesc").
'</td>';
675print
'<td class="right">';
676print
'<!-- PRODUIT_AUTOFILL_DESC -->';
677print $form->selectarray(
678 "activate_FillProductDescAuto",
679 array(0 =>
'DoNotAutofillButAutoConcat', 1 =>
'AutoFillFormFieldBeforeSubmit', 2 =>
'DoNotUseDescriptionOfProdut'),
680 !
getDolGlobalString(
'PRODUIT_AUTOFILL_DESC') ? 0 : $conf->global->PRODUIT_AUTOFILL_DESC,
689 'minwidth100imp maxwidth400',
696print
'<tr class="oddeven">';
697print
'<td>'.$langs->trans(
"ViewProductDescInFormAbility").
'</td>';
698print
'<td class="right">';
699$arrayofchoices = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes").
' ('.$langs->trans(
"DesktopsOnly").
')',
'2' => $langs->trans(
"Yes").
' ('.$langs->trans(
"DesktopsAndSmartphones").
')');
700print $form->selectarray(
"PRODUIT_DESC_IN_FORM", $arrayofchoices,
getDolGlobalInt(
'PRODUIT_DESC_IN_FORM'), 0);
728 print
'<tr class="oddeven">';
729 print
'<td>'.$langs->trans(
"ViewProductDescInThirdpartyLanguageAbility").
'</td>';
730 print
'<td class="right">';
731 print $form->selectyesno(
"activate_viewProdTextsInThirdpartyLanguage", (
getDolGlobalString(
'PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE') ? $conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE : 0), 1);
739 $dir = DOL_DOCUMENT_ROOT.
"/product/canvas/";
741 print
'<tr class="liste_titre">';
742 print
'<td>'.$langs->trans(
"ProductSpecial").
'</td>'.
"\n";
743 print
'<td class="right">'.$langs->trans(
"Value").
'</td>'.
"\n";
747 require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
749 $handle = opendir($dir);
750 if (is_resource($handle)) {
751 while (($file = readdir($handle)) !==
false) {
752 if (file_exists($dir.$file.
'/product.'.$file.
'.class.php')) {
753 $classfile = $dir.$file.
'/product.'.$file.
'.class.php';
754 $classname =
'Product'.ucfirst($file);
756 require_once $classfile;
761 if ($conf->$module->enabled) {
762 print
'<tr class="oddeven"><td>';
766 print
'</td><td class="right">';
768 $const =
"PRODUCT_SPECIAL_".strtoupper($file);
771 print
img_picto($langs->trans(
"Active"),
'tick');
772 print
'</td><td class="right">';
773 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.
newToken().
'&spe='.urlencode($file).
'&value=0">'.$langs->trans(
"Disable").
'</a>';
775 print
' </td><td class="right">';
776 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.
newToken().
'&spe='.urlencode($file).
'&value=1">'.$langs->trans(
"Activate").
'</a>';
793print
'<div class="center">';
794print
'<input type="submit" class="button reposition" value="'.$langs->trans(
"Modify").
'">';
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.
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($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)
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
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_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)
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.
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 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 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.