36require
'../../main.inc.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
38require_once DOL_DOCUMENT_ROOT.
'/core/lib/product.lib.php';
39require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
40require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formbarcode.class.php';
52$langs->loadLangs(array(
"admin",
"products"));
55if (!$user->admin || (!isModEnabled(
"product") && !isModEnabled(
"service"))) {
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' => $langs->trans(
'PriceCatalogue'),
70 'PRODUIT_MULTIPRICES' => $langs->trans(
'MultiPricesAbility'),
71 'PRODUIT_CUSTOMER_PRICES' => $langs->trans(
'PriceByCustomer'),
72 'PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES' => $langs->trans(
'PriceByCustomeAndMultiPricesAbility'),
74$keyforparam =
'PRODUIT_CUSTOMER_PRICES_BY_QTY';
76 $select_pricing_rules[
'PRODUIT_CUSTOMER_PRICES_BY_QTY'] = $langs->trans(
'PriceByQuantity').
' ('.$langs->trans(
"VersionExperimental").
')';
78$keyforparam =
'PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES';
80 $select_pricing_rules[
'PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES'] = $langs->trans(
'MultiPricesAbility').
'+'.$langs->trans(
'PriceByQuantity').
' ('.$langs->trans(
"VersionExperimental").
')';
95$nomessageinsetmoduleoptions = 1;
96include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
98if ($action ==
'setcodeproduct') {
100 header(
"Location: ".$_SERVER[
"PHP_SELF"]);
107if ($action ==
'other' &&
GETPOST(
'value_PRODUIT_LIMIT_SIZE') >= 0) {
113if ($action ==
'other' &&
GETPOST(
'value_PRODUIT_MULTIPRICES_LIMIT') > 0) {
119if ($action ==
'other') {
120 $princingrules =
GETPOST(
'princingrule',
'alpha');
121 foreach ($select_pricing_rules as $tmprule => $tmplabel) {
122 if ($tmprule == $princingrules) {
123 if ($princingrules ==
'PRODUCT_PRICE_UNIQ') {
128 $res =
dolibarr_set_const($db,
'PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES', 0,
'chaine', 0,
'',
$conf->entity);
132 $multirule = explode(
'&', $princingrules);
133 foreach ($multirule as $rulesselected) {
138 if (strpos($tmprule,
'&') ===
false) {
144 $value =
GETPOST(
'price_base_type',
'alpha');
150 $value =
GETPOST(
'PRODUIT_DESC_IN_FORM',
'alpha');
153 $value =
GETPOST(
'activate_viewProdTextsInThirdpartyLanguage',
'alpha');
154 $res =
dolibarr_set_const($db,
"PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE", $value,
'chaine', 0,
'',
$conf->entity);
156 $value =
GETPOST(
'activate_mergePropalProductCard',
'alpha');
159 $value =
GETPOST(
'activate_usesearchtoselectproduct',
'alpha');
162 $value =
GETPOST(
'activate_FillProductDescAuto',
'alpha');
165 if (GETPOSTISSET(
'PRODUIT_FOURN_TEXTS')) {
166 $value =
GETPOST(
'PRODUIT_FOURN_TEXTS',
'alpha');
170 if (GETPOSTISSET(
'PRODUCT_USE_SUPPLIER_PACKAGING')) {
171 $value =
GETPOST(
'PRODUCT_USE_SUPPLIER_PACKAGING',
'alpha');
175 if (GETPOSTISSET(
'PRODUCT_USE_CUSTOMER_PACKAGING')) {
176 $value =
GETPOST(
'PRODUCT_USE_CUSTOMER_PACKAGING',
'alpha');
182if ($action ==
'specimen') {
183 $modele =
GETPOST(
'module',
'alpha');
186 $product->initAsSpecimen();
191 $dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
192 foreach ($dirmodels as $reldir) {
193 $file =
dol_buildpath($reldir.
"core/modules/product/doc/pdf_".$modele.
".modules.php", 0);
194 if (file_exists($file)) {
195 $classname =
"pdf_".$modele;
200 if ($classname !==
'') {
203 $module =
new $classname($db);
205 '@phan-var-force ModelePDFProduct $module';
207 if ($module->write_file($product, $langs,
'') > 0) {
208 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=product&file=SPECIMEN.pdf");
216 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
221if ($action ==
'set') {
225if ($action ==
'del') {
235if ($action ==
'setdoc') {
239 $conf->global->PRODUCT_ADDON_PDF = $value;
250if ($action ==
'set') {
251 $const =
"PRODUCT_SPECIAL_".strtoupper(
GETPOST(
'spe',
'alpha'));
253 if (
GETPOST(
'value',
'alpha')) {
264if (preg_match(
'/set_(.+)/', $action, $reg)) {
265 $keyforvar = $reg[1];
273if (preg_match(
'/del_(.+)/', $action, $reg)) {
274 $keyforvar = $reg[1];
294$title = $langs->trans(
'ProductServiceSetup');
295$tab = $langs->trans(
"ProductsAndServices");
296if (!isModEnabled(
"product")) {
297 $title = $langs->trans(
'ServiceSetup');
298 $tab = $langs->trans(
'Services');
299} elseif (!isModEnabled(
"service")) {
300 $title = $langs->trans(
'ProductSetup');
301 $tab = $langs->trans(
'Products');
304llxHeader(
'', $title,
'',
'', 0, 0,
'',
'',
'',
'mod-product page-admin_product');
306$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
312$form =
new Form($db);
315$dirproduct = array(
'/core/modules/product/');
316$dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
320print
'<div class="div-table-responsive-no-min">';
321print
'<table class="noborder centpercent">'.
"\n";
322print
'<tr class="liste_titre">'.
"\n";
323print
' <td>'.$langs->trans(
"Name").
'</td>';
324print
' <td>'.$langs->trans(
"Description").
'</td>';
325print
' <td>'.$langs->trans(
"Example").
'</td>';
326print
' <td class="center" width="80">'.$langs->trans(
"Status").
'</td>';
327print
' <td class="center"></td>';
330foreach ($dirproduct as $dirroot) {
333 $handle = @opendir($dir);
334 if (is_resource($handle)) {
336 while (($file = readdir($handle)) !==
false) {
337 if (substr($file, 0, 16) ==
'mod_codeproduct_' && substr($file, -3) ==
'php') {
338 $file = substr($file, 0,
dol_strlen($file) - 4);
346 $modCodeProduct =
new $file();
347 '@phan-var-force ModeleProductCode $modCodeProduct';
350 if ($modCodeProduct->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
353 if ($modCodeProduct->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
357 print
'<tr class="oddeven">'.
"\n";
358 print
'<td width="140">'.$modCodeProduct->name.
'</td>'.
"\n";
359 print
'<td>'.$modCodeProduct->info($langs).
'</td>'.
"\n";
360 print
'<td class="nowrap"><span class="opacitymedium">'.$modCodeProduct->getExample($langs).
'</span></td>'.
"\n";
363 print
'<td class="center">'.
"\n";
364 print
img_picto($langs->trans(
"Activated"),
'switch_on');
370 print
'<td class="center">';
372 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setcodeproduct&token='.
newToken().
'&value='.urlencode($file).
'">';
374 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
381 print
'<td class="center">';
382 $s = $modCodeProduct->getToolTip($langs,
'', -1);
383 print $form->textwithpicto(
'', $s, 1);
398$sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
399$sql .=
" WHERE type = '".$db->escape($type).
"'";
400$sql .=
" AND entity = ".$conf->entity;
401$resql = $db->query($sql);
404 $num_rows = $db->num_rows($resql);
405 while ($i < $num_rows) {
406 $array = $db->fetch_array($resql);
407 if (is_array($array)) {
408 array_push($def, $array[0]);
420print
'<div class="div-table-responsive-no-min">';
421print
'<table class="noborder centpercent">';
422print
'<tr class="liste_titre">';
423print
'<td>'.$langs->trans(
"Name").
'</td>';
424print
'<td>'.$langs->trans(
"Description").
'</td>';
425print
'<td class="center" width="60">'.$langs->trans(
"Status").
"</td>\n";
426print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
427print
'<td class="center"></td>';
428print
'<td class="center" width="80">'.$langs->trans(
"Preview").
'</td>';
434foreach ($dirmodels as $reldir) {
435 foreach (array(
'',
'/doc') as $valdir) {
436 $dir =
dol_buildpath($reldir.
"core/modules/product".$valdir);
438 $handle = opendir($dir);
439 if (is_resource($handle)) {
440 while (($file = readdir($handle)) !==
false) {
446 foreach ($filelist as $file) {
447 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
448 if (file_exists($dir.
'/'.$file)) {
449 $name = substr($file, 4,
dol_strlen($file) - 16);
450 $classname = substr($file, 0,
dol_strlen($file) - 12);
452 require_once $dir.
'/'.$file;
453 $module =
new $classname($db);
454 '@phan-var-force ModelePDFProduct $module';
456 $modulequalified = 1;
457 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
458 $modulequalified = 0;
460 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
461 $modulequalified = 0;
464 if ($modulequalified) {
465 print
'<tr class="oddeven"><td width="100">';
466 print(empty($module->name) ? $name : $module->
name);
468 if (method_exists($module,
'info')) {
469 print $module->info($langs);
471 print $module->description;
476 if (in_array($name, $def)) {
477 print
'<td class="center">'.
"\n";
478 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.
newToken().
'&value='.urlencode($name).
'">';
479 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
483 print
'<td class="center">'.
"\n";
484 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>';
489 print
'<td class="center">';
491 print
img_picto($langs->trans(
"Default"),
'on');
493 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>';
498 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
499 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
500 if ($module->type ==
'pdf') {
501 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
503 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
504 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
505 $htmltooltip .=
'<br>'.$langs->trans(
"MultiLanguage").
': '.
yn($module->option_multilang, 1, 1);
508 print
'<td class="center">';
509 print $form->textwithpicto(
'', $htmltooltip, 1,
'info');
513 print
'<td class="center">';
514 if ($module->type ==
'pdf') {
515 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'contract').
'</a>';
517 print
img_object($langs->transnoentitiesnoconv(
"PreviewNotAvailable"),
'generic');
543print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
544print
'<input type="hidden" name="token" value="'.newToken().
'">';
545print
'<input type="hidden" name="action" value="other">';
546print
'<input type="hidden" name="page_y" value="">';
552print
'<div class="div-table-responsive-no-min">';
553print
'<table class="noborder centpercent">';
554print
'<tr class="liste_titre">';
555print
'<td>'.$langs->trans(
"Parameters").
'</td>'.
"\n";
556print
'<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
562print
'<tr class="oddeven">';
563print
'<td>'.$langs->trans(
"AssociatedProductsAbility").
'</td>';
564print
'<td class="right">';
565print ajax_constantonoff(
"PRODUIT_SOUSPRODUITS", array(),
$conf->entity, 0, 0, 1, 0);
573print
'<tr class="oddeven">';
574print
'<td>'.$langs->trans(
"VariantsAbility").
'</td>';
575print
'<td class="right">';
578if (!isModEnabled(
'variants')) {
579 print
'<span class="opacitymedium">'.$langs->trans(
"ModuleMustBeEnabled", $langs->transnoentitiesnoconv(
"Module610Name")).
'</span>';
581 print
yn(1).
' <span class="opacitymedium">('.$langs->trans(
"ModuleIsEnabled", $langs->transnoentitiesnoconv(
"Module610Name")).
')</span>';
589print
'<tr class="oddeven">';
590if (!isModEnabled(
'multicompany')) {
591 print
'<td>'.$langs->trans(
"PricingRule").
'</td>';
593 print
'<td>'.$form->textwithpicto($langs->trans(
"PricingRule"), $langs->trans(
"SamePriceAlsoForSharedCompanies"), 1).
'</td>';
595print
'<td class="right">';
596$current_rule =
'PRODUCT_PRICE_UNIQ';
598 $current_rule =
'PRODUIT_MULTIPRICES';
601 $current_rule =
'PRODUIT_CUSTOMER_PRICES_BY_QTY';
604 $current_rule =
'PRODUIT_CUSTOMER_PRICES';
607 $current_rule =
'PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES';
610 $current_rule =
'PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES';
612print $form->selectarray(
"princingrule", $select_pricing_rules, $current_rule, 0, 0, 0,
'', 1, 0, 0,
'',
'maxwidth400', 1);
619 print
'<tr class="oddeven">';
620 print
'<td>'.$langs->trans(
"MultiPricesNumPrices").
'</td>';
621 print
'<td class="right"><input size="3" type="text" class="flat right" name="value_PRODUIT_MULTIPRICES_LIMIT" value="' .
getDolGlobalString(
'PRODUIT_MULTIPRICES_LIMIT').
'"></td>';
626print
'<tr class="oddeven">';
627print
'<td>'.$langs->trans(
"DefaultPriceType").
'</td>';
628print
'<td class="right">';
629print $form->selectPriceBaseType(
$conf->global->PRODUCT_PRICE_BASE_TYPE,
"price_base_type");
634if (isModEnabled(
"supplier_order") || isModEnabled(
"supplier_invoice")) {
635 print
'<tr class="oddeven">';
636 print
'<td>'.$form->textwithpicto($langs->trans(
"UseProductSupplierPackaging"), $langs->trans(
"PackagingForThisProductDesc")).
'</td>';
637 print
'<td align="right">';
638 print ajax_constantonoff(
"PRODUCT_USE_SUPPLIER_PACKAGING", array(),
$conf->entity, 0, 0, 0, 0);
643 print
'<tr class="oddeven">';
644 print
'<td>'.$langs->trans(
"UseProductFournDesc").
'</td>';
645 print
'<td class="right">';
646 print ajax_constantonoff(
"PRODUIT_FOURN_TEXTS", array(),
$conf->entity, 0, 0, 0, 0);
653if (isModEnabled(
"order") || isModEnabled(
"invoice")) {
654 print
'<tr class="oddeven">';
655 print
'<td>'.$form->textwithpicto($langs->trans(
"UseProductCustomerPackaging"), $langs->trans(
"PackagingForThisProductSellDesc")).
'</td>';
656 print
'<td align="right">';
657 print ajax_constantonoff(
"PRODUCT_USE_CUSTOMER_PACKAGING", array(),
$conf->entity, 0, 0, 0, 0);
666print
'<div class="center">';
667print
'<input type="submit" class="button reposition" value="'.$langs->trans(
"Modify").
'">';
677print
'<div class="div-table-responsive-no-min">';
678print
'<table class="noborder centpercent">';
679print
'<tr class="liste_titre">';
680print
'<td>'.$langs->trans(
"Parameters").
'</td>'.
"\n";
681print
'<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
686print
'<tr class="oddeven">';
687print
'<td>'.$form->textwithpicto($langs->trans(
"UseSearchToSelectProduct"), $langs->trans(
'UseSearchToSelectProductTooltip'), 1).
'</td>';
688if (empty(
$conf->use_javascript_ajax)) {
689 print
'<td class="nowrap right">';
690 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
693 print
'<td class="right">';
695 '0' => $langs->trans(
"No"),
696 '1' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 1).
'</span>',
697 '2' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 2).
'</span>',
698 '3' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 3).
'</span>',
700 print $form->selectarray(
"activate_usesearchtoselectproduct", $arrval,
getDolGlobalInt(
'PRODUIT_USE_SEARCH_TO_SELECT'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth125imp maxwidth400');
706print
'<tr class="oddeven">';
707print
'<td>'.$langs->trans(
"NumberOfProductShowInSelect").
'</td>';
708print
'<td class="right"><input size="3" type="text" class="flat" name="value_PRODUIT_LIMIT_SIZE" value="' .
getDolGlobalString(
'PRODUIT_LIMIT_SIZE', 1000).
'"></td>';
713print
'<tr class="oddeven">';
714print
'<td>'.$langs->trans(
"OnProductSelectAddProductDesc").
'</td>';
715print
'<td class="right">';
716print
'<!-- PRODUIT_AUTOFILL_DESC -->';
717print $form->selectarray(
718 "activate_FillProductDescAuto",
719 array(0 =>
'DoNotAutofillButAutoConcat', 1 =>
'AutoFillFormFieldBeforeSubmit', 2 =>
'DoNotUseDescriptionOfProdut'),
729 'minwidth125imp maxwidth400',
736print
'<tr class="oddeven">';
737print
'<td>'.$langs->trans(
"ViewProductDescInFormAbility").
'</td>';
738print
'<td class="right">';
739$arrayofchoices = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes").
' ('.$langs->trans(
"DesktopsOnly").
')',
'2' => $langs->trans(
"Yes").
' ('.$langs->trans(
"DesktopsAndSmartphones").
')');
740print $form->selectarray(
"PRODUIT_DESC_IN_FORM", $arrayofchoices,
getDolGlobalInt(
'PRODUIT_DESC_IN_FORM'), 0);
768 print
'<tr class="oddeven">';
769 print
'<td>'.$langs->trans(
"ViewProductDescInThirdpartyLanguageAbility").
'</td>';
770 print
'<td class="right">';
771 print $form->selectyesno(
"activate_viewProdTextsInThirdpartyLanguage", (
getDolGlobalString(
'PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE') ?
$conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE : 0), 1);
779 $dir = DOL_DOCUMENT_ROOT.
"/product/canvas/";
781 print
'<tr class="liste_titre">';
782 print
'<td>'.$langs->trans(
"ProductSpecial").
'</td>'.
"\n";
783 print
'<td class="right">'.$langs->trans(
"Value").
'</td>'.
"\n";
787 require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
789 $handle = opendir($dir);
790 if (is_resource($handle)) {
791 while (($file = readdir($handle)) !==
false) {
792 if (file_exists($dir.$file.
'/product.'.$file.
'.class.php')) {
793 $classfile = $dir.$file.
'/product.'.$file.
'.class.php';
794 $classname =
'Product'.ucfirst($file);
796 require_once $classfile;
801 if (
$conf->$module->enabled) {
802 print
'<tr class="oddeven"><td>';
806 print
'</td><td class="right">';
808 $const =
"PRODUCT_SPECIAL_".strtoupper($file);
811 print
img_picto($langs->trans(
"Active"),
'tick');
812 print
'</td><td class="right">';
813 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.
newToken().
'&spe='.urlencode($file).
'&value=0">'.$langs->trans(
"Disable").
'</a>';
815 print
' </td><td class="right">';
816 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.
newToken().
'&spe='.urlencode($file).
'&value=1">'.$langs->trans(
"Activate").
'</a>';
833print
'<div class="center">';
834print
'<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.
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.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
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.
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.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
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.