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');
177if ($action ==
'specimen') {
178 $modele =
GETPOST(
'module',
'alpha');
181 $product->initAsSpecimen();
186 $dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
187 foreach ($dirmodels as $reldir) {
188 $file =
dol_buildpath($reldir.
"core/modules/product/doc/pdf_".$modele.
".modules.php", 0);
189 if (file_exists($file)) {
190 $classname =
"pdf_".$modele;
195 if ($classname !==
'') {
198 $module =
new $classname($db);
200 '@phan-var-force ModelePDFProduct $module';
202 if ($module->write_file($product, $langs,
'') > 0) {
203 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=product&file=SPECIMEN.pdf");
211 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
216if ($action ==
'set') {
220if ($action ==
'del') {
230if ($action ==
'setdoc') {
234 $conf->global->PRODUCT_ADDON_PDF = $value;
245if ($action ==
'set') {
246 $const =
"PRODUCT_SPECIAL_".strtoupper(
GETPOST(
'spe',
'alpha'));
248 if (
GETPOST(
'value',
'alpha')) {
259if (preg_match(
'/set_(.+)/', $action, $reg)) {
260 $keyforvar = $reg[1];
268if (preg_match(
'/del_(.+)/', $action, $reg)) {
269 $keyforvar = $reg[1];
289$title = $langs->trans(
'ProductServiceSetup');
290$tab = $langs->trans(
"ProductsAndServices");
291if (!isModEnabled(
"product")) {
292 $title = $langs->trans(
'ServiceSetup');
293 $tab = $langs->trans(
'Services');
294} elseif (!isModEnabled(
"service")) {
295 $title = $langs->trans(
'ProductSetup');
296 $tab = $langs->trans(
'Products');
299llxHeader(
'', $title,
'',
'', 0, 0,
'',
'',
'',
'mod-product page-admin_product');
301$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
307$form =
new Form($db);
310$dirproduct = array(
'/core/modules/product/');
311$dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
315print
'<div class="div-table-responsive-no-min">';
316print
'<table class="noborder centpercent">'.
"\n";
317print
'<tr class="liste_titre">'.
"\n";
318print
' <td>'.$langs->trans(
"Name").
'</td>';
319print
' <td>'.$langs->trans(
"Description").
'</td>';
320print
' <td>'.$langs->trans(
"Example").
'</td>';
321print
' <td class="center" width="80">'.$langs->trans(
"Status").
'</td>';
322print
' <td class="center"></td>';
325foreach ($dirproduct as $dirroot) {
328 $handle = @opendir($dir);
329 if (is_resource($handle)) {
331 while (($file = readdir($handle)) !==
false) {
332 if (substr($file, 0, 16) ==
'mod_codeproduct_' && substr($file, -3) ==
'php') {
333 $file = substr($file, 0,
dol_strlen($file) - 4);
341 $modCodeProduct =
new $file();
342 '@phan-var-force ModeleProductCode $modCodeProduct';
345 if ($modCodeProduct->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
348 if ($modCodeProduct->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
352 print
'<tr class="oddeven">'.
"\n";
353 print
'<td width="140">'.$modCodeProduct->name.
'</td>'.
"\n";
354 print
'<td>'.$modCodeProduct->info($langs).
'</td>'.
"\n";
355 print
'<td class="nowrap"><span class="opacitymedium">'.$modCodeProduct->getExample($langs).
'</span></td>'.
"\n";
358 print
'<td class="center">'.
"\n";
359 print
img_picto($langs->trans(
"Activated"),
'switch_on');
363 if (!(isModEnabled(
'multicompany') && ((is_object($mc) && !empty($mc->sharings[
'referent'])) && ($mc->sharings[
'referent'] ==
$conf->entity)))) {
365 print
'<td class="center">';
367 print
'<a class="reposition" href="'.$_SERVER[
'PHP_SELF'].
'?action=setcodeproduct&token='.
newToken().
'&value='.urlencode($file).
'">';
369 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
376 print
'<td class="center">';
377 $s = $modCodeProduct->getToolTip($langs,
'', -1);
378 print $form->textwithpicto(
'', $s, 1);
393$sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
394$sql .=
" WHERE type = '".$db->escape($type).
"'";
395$sql .=
" AND entity = ".$conf->entity;
396$resql = $db->query($sql);
399 $num_rows = $db->num_rows($resql);
400 while ($i < $num_rows) {
401 $array = $db->fetch_array($resql);
402 if (is_array($array)) {
403 array_push($def, $array[0]);
415print
'<div class="div-table-responsive-no-min">';
416print
'<table class="noborder centpercent">';
417print
'<tr class="liste_titre">';
418print
'<td>'.$langs->trans(
"Name").
'</td>';
419print
'<td>'.$langs->trans(
"Description").
'</td>';
420print
'<td class="center" width="60">'.$langs->trans(
"Status").
"</td>\n";
421print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
422print
'<td class="center"></td>';
423print
'<td class="center" width="80">'.$langs->trans(
"Preview").
'</td>';
429foreach ($dirmodels as $reldir) {
430 foreach (array(
'',
'/doc') as $valdir) {
431 $dir =
dol_buildpath($reldir.
"core/modules/product".$valdir);
433 $handle = opendir($dir);
434 if (is_resource($handle)) {
435 while (($file = readdir($handle)) !==
false) {
441 foreach ($filelist as $file) {
442 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
443 if (file_exists($dir.
'/'.$file)) {
444 $name = substr($file, 4,
dol_strlen($file) - 16);
445 $classname = substr($file, 0,
dol_strlen($file) - 12);
447 require_once $dir.
'/'.$file;
448 $module =
new $classname($db);
449 '@phan-var-force ModelePDFProduct $module';
451 $modulequalified = 1;
452 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
453 $modulequalified = 0;
455 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
456 $modulequalified = 0;
459 if ($modulequalified) {
460 print
'<tr class="oddeven"><td width="100">';
461 print(empty($module->name) ? $name : $module->
name);
463 if (method_exists($module,
'info')) {
464 print $module->info($langs);
466 print $module->description;
471 if (in_array($name, $def)) {
472 print
'<td class="center">'.
"\n";
473 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.
newToken().
'&value='.urlencode($name).
'">';
474 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
478 print
'<td class="center">'.
"\n";
479 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>';
484 print
'<td class="center">';
486 print
img_picto($langs->trans(
"Default"),
'on');
488 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>';
493 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
494 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
495 if ($module->type ==
'pdf') {
496 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
498 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
499 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
500 $htmltooltip .=
'<br>'.$langs->trans(
"MultiLanguage").
': '.
yn($module->option_multilang, 1, 1);
503 print
'<td class="center">';
504 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
508 print
'<td class="center">';
509 if ($module->type ==
'pdf') {
510 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'contract').
'</a>';
512 print
img_object($langs->transnoentitiesnoconv(
"PreviewNotAvailable"),
'generic');
538print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
539print
'<input type="hidden" name="token" value="'.newToken().
'">';
540print
'<input type="hidden" name="action" value="other">';
541print
'<input type="hidden" name="page_y" value="">';
547print
'<div class="div-table-responsive-no-min">';
548print
'<table class="noborder centpercent">';
549print
'<tr class="liste_titre">';
550print
'<td>'.$langs->trans(
"Parameters").
'</td>'.
"\n";
551print
'<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
557print
'<tr class="oddeven">';
558print
'<td>'.$langs->trans(
"AssociatedProductsAbility").
'</td>';
559print
'<td class="right">';
560print ajax_constantonoff(
"PRODUIT_SOUSPRODUITS", array(),
$conf->entity, 0, 0, 1, 0);
568print
'<tr class="oddeven">';
569print
'<td>'.$langs->trans(
"VariantsAbility").
'</td>';
570print
'<td class="right">';
573if (!isModEnabled(
'variants')) {
574 print
'<span class="opacitymedium">'.$langs->trans(
"ModuleMustBeEnabled", $langs->transnoentitiesnoconv(
"Module610Name")).
'</span>';
576 print
yn(1).
' <span class="opacitymedium">('.$langs->trans(
"ModuleIsEnabled", $langs->transnoentitiesnoconv(
"Module610Name")).
')</span>';
584print
'<tr class="oddeven">';
585if (!isModEnabled(
'multicompany')) {
586 print
'<td>'.$langs->trans(
"PricingRule").
'</td>';
588 print
'<td>'.$form->textwithpicto($langs->trans(
"PricingRule"), $langs->trans(
"SamePriceAlsoForSharedCompanies"), 1).
'</td>';
590print
'<td class="right">';
591$current_rule =
'PRODUCT_PRICE_UNIQ';
593 $current_rule =
'PRODUIT_MULTIPRICES';
596 $current_rule =
'PRODUIT_CUSTOMER_PRICES_BY_QTY';
599 $current_rule =
'PRODUIT_CUSTOMER_PRICES';
602 $current_rule =
'PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES';
605 $current_rule =
'PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES';
607print $form->selectarray(
"princingrule", $select_pricing_rules, $current_rule, 0, 0, 0,
'', 1, 0, 0,
'',
'maxwidth400', 1);
614 print
'<tr class="oddeven">';
615 print
'<td>'.$langs->trans(
"MultiPricesNumPrices").
'</td>';
616 print
'<td class="right"><input size="3" type="text" class="flat right" name="value_PRODUIT_MULTIPRICES_LIMIT" value="' .
getDolGlobalString(
'PRODUIT_MULTIPRICES_LIMIT').
'"></td>';
621print
'<tr class="oddeven">';
622print
'<td>'.$langs->trans(
"DefaultPriceType").
'</td>';
623print
'<td class="right">';
624print $form->selectPriceBaseType(
$conf->global->PRODUCT_PRICE_BASE_TYPE,
"price_base_type");
629if (isModEnabled(
"supplier_order") || isModEnabled(
"supplier_invoice")) {
630 print
'<tr class="oddeven">';
631 print
'<td>'.$form->textwithpicto($langs->trans(
"UseProductSupplierPackaging"), $langs->trans(
"PackagingForThisProductDesc")).
'</td>';
632 print
'<td align="right">';
633 print ajax_constantonoff(
"PRODUCT_USE_SUPPLIER_PACKAGING", array(),
$conf->entity, 0, 0, 0, 0);
638 print
'<tr class="oddeven">';
639 print
'<td>'.$langs->trans(
"UseProductFournDesc").
'</td>';
640 print
'<td class="right">';
641 print ajax_constantonoff(
"PRODUIT_FOURN_TEXTS", array(),
$conf->entity, 0, 0, 0, 0);
650print
'<div class="center">';
651print
'<input type="submit" class="button reposition" value="'.$langs->trans(
"Modify").
'">';
661print
'<div class="div-table-responsive-no-min">';
662print
'<table class="noborder centpercent">';
663print
'<tr class="liste_titre">';
664print
'<td>'.$langs->trans(
"Parameters").
'</td>'.
"\n";
665print
'<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
670print
'<tr class="oddeven">';
671print
'<td>'.$form->textwithpicto($langs->trans(
"UseSearchToSelectProduct"), $langs->trans(
'UseSearchToSelectProductTooltip'), 1).
'</td>';
672if (empty(
$conf->use_javascript_ajax)) {
673 print
'<td class="nowrap right">';
674 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
677 print
'<td class="right">';
679 '0' => $langs->trans(
"No"),
680 '1' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 1).
'</span>',
681 '2' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 2).
'</span>',
682 '3' => $langs->trans(
"Yes").
' - <span class="opacitymedium">'.$langs->trans(
"NumberOfKeyToSearch", 3).
'</span>',
684 print $form->selectarray(
"activate_usesearchtoselectproduct", $arrval,
getDolGlobalInt(
'PRODUIT_USE_SEARCH_TO_SELECT'), 0, 0, 0,
'', 0, 0, 0,
'',
'minwidth125imp maxwidth400');
690print
'<tr class="oddeven">';
691print
'<td>'.$langs->trans(
"NumberOfProductShowInSelect").
'</td>';
692print
'<td class="right"><input size="3" type="text" class="flat" name="value_PRODUIT_LIMIT_SIZE" value="' .
getDolGlobalString(
'PRODUIT_LIMIT_SIZE', 1000).
'"></td>';
697print
'<tr class="oddeven">';
698print
'<td>'.$langs->trans(
"OnProductSelectAddProductDesc").
'</td>';
699print
'<td class="right">';
700print
'<!-- PRODUIT_AUTOFILL_DESC -->';
701print $form->selectarray(
702 "activate_FillProductDescAuto",
703 array(0 =>
'DoNotAutofillButAutoConcat', 1 =>
'AutoFillFormFieldBeforeSubmit', 2 =>
'DoNotUseDescriptionOfProdut'),
713 'minwidth125imp maxwidth400',
720print
'<tr class="oddeven">';
721print
'<td>'.$langs->trans(
"ViewProductDescInFormAbility").
'</td>';
722print
'<td class="right">';
723$arrayofchoices = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes").
' ('.$langs->trans(
"DesktopsOnly").
')',
'2' => $langs->trans(
"Yes").
' ('.$langs->trans(
"DesktopsAndSmartphones").
')');
724print $form->selectarray(
"PRODUIT_DESC_IN_FORM", $arrayofchoices,
getDolGlobalInt(
'PRODUIT_DESC_IN_FORM'), 0);
752 print
'<tr class="oddeven">';
753 print
'<td>'.$langs->trans(
"ViewProductDescInThirdpartyLanguageAbility").
'</td>';
754 print
'<td class="right">';
755 print $form->selectyesno(
"activate_viewProdTextsInThirdpartyLanguage", (
getDolGlobalString(
'PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE') ?
$conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE : 0), 1);
763 $dir = DOL_DOCUMENT_ROOT.
"/product/canvas/";
765 print
'<tr class="liste_titre">';
766 print
'<td>'.$langs->trans(
"ProductSpecial").
'</td>'.
"\n";
767 print
'<td class="right">'.$langs->trans(
"Value").
'</td>'.
"\n";
771 require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
773 $handle = opendir($dir);
774 if (is_resource($handle)) {
775 while (($file = readdir($handle)) !==
false) {
776 if (file_exists($dir.$file.
'/product.'.$file.
'.class.php')) {
777 $classfile = $dir.$file.
'/product.'.$file.
'.class.php';
778 $classname =
'Product'.ucfirst($file);
780 require_once $classfile;
785 if (
$conf->$module->enabled) {
786 print
'<tr class="oddeven"><td>';
790 print
'</td><td class="right">';
792 $const =
"PRODUCT_SPECIAL_".strtoupper($file);
795 print
img_picto($langs->trans(
"Active"),
'tick');
796 print
'</td><td class="right">';
797 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.
newToken().
'&spe='.urlencode($file).
'&value=0">'.$langs->trans(
"Disable").
'</a>';
799 print
' </td><td class="right">';
800 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.
newToken().
'&spe='.urlencode($file).
'&value=1">'.$langs->trans(
"Activate").
'</a>';
817print
'<div class="center">';
818print
'<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)
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.