diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index 18ff057e033..574db7d626c 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -36,11 +36,17 @@ $langs->load("bills"); if (!$user->admin) accessforbidden(); +$barcode_encode_type_set = BARCODE_ENCODE_TYPE; $typeconst=array('yesno','texte','chaine'); if ($_GET["action"] == 'settype' && $user->admin) { + if (dolibarr_set_const($db, "BARCODE_ENCODE_TYPE",$_GET["value"])) + $barcode_encode_type_set = $_GET["value"]; +} + +/* $sql = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'BARCODE_ENCODE_TYPE';"; $db->query($sql); @@ -48,7 +54,7 @@ if ($_GET["action"] == 'settype' && $user->admin) ('BARCODE_ENCODE_TYPE','".$_POST["host"]."',0);"; $db->query($sql); } - +*/ llxHeader('',$langs->trans("BarcodeSetup"),'BarcodeConfiguration'); @@ -63,20 +69,162 @@ print_titre($langs->trans("BarcodeEncodeModule")); print ''; -print ''; -print ''; +//print ''; +//print ''; + print ''; + +print ''; +print ''; +print ''; +print ''; +print "\n"; + +clearstatcache(); +$var=True; + +//EAN13 + print ''; + + // Affiche example + print ''; + + print '\n"; + +//UPC + print ''; + + // Affiche example + print ''; + + print '\n"; + +//ISBN + print ''; + + // Affiche example + print ''; + + print '\n"; + +//code 39 + print ''; + + // Affiche example + print ''; + + print '\n"; + + +//code 128 + print ''; + + // Affiche example + print ''; + + print '\n"; + +//I25 + print ''; + + // Affiche example + print ''; + + print '\n"; + + + + +/* print ''; print ''; print "\n"; - -/* print ''; print '\n"; print ''; print '\n"; -*/ print ''; +*/ + print "
'.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Example").''.$langs->trans("Default").'
'; + print "EAN13"; + print "\n"; + + print "information"; + print ''; + if ($barcode_encode_type_set == "EAN13") + { + print img_tick(); + } + else + { + print ''.$langs->trans("Default").''; + } + print "
'; + print "UPC"; + print "\n"; + print "information"; + print ''; + if ($barcode_encode_type_set == "UPC") + { + print img_tick(); + } + else + { + print ''.$langs->trans("Default").''; + } + print "
'; + print "ISBN"; + print "\n"; + print "information"; + print ''; + if ($barcode_encode_type_set == "ISBN") + { + print img_tick(); + } + else + { + print ''.$langs->trans("Default").''; + } + print "
'; + print "code 39"; + print "\n"; + print "information"; + print ''; + if ($barcode_encode_type_set == "code39") + { + print img_tick(); + } + else + { + print ''.$langs->trans("Default").''; + } + print "
'; + print "Code 128"; + print "\n"; + print "information"; + print ''; + if ($barcode_encode_type_set == "code128") + { + print img_tick(); + } + else + { + print ''.$langs->trans("Default").''; + } + print "
'; + print "I25"; + print "\n"; + print "information"; + print ''; + if ($barcode_encode_type_set == "I25") + { + print img_tick(); + } + else + { + print ''.$langs->trans("Default").''; + } + print "
'.$langs->trans('Name').''.$langs->trans('Description').'
'.$langs->trans('OptionModeTrue').''.nl2br($langs->trans('OptionModeTrueDesc'))."
'.$langs->trans('OptionModeVirtual').''.$langs->trans('OptionModeVirtualDesc')."
\n";