diff --git a/htdocs/admin/fournisseur.php b/htdocs/admin/fournisseur.php index ac2087bbf64..208ed58daaa 100644 --- a/htdocs/admin/fournisseur.php +++ b/htdocs/admin/fournisseur.php @@ -52,13 +52,13 @@ $specimenthirdparty->initAsSpecimen(); if ($action == 'updateMask') { - $maskconstorder=$_POST['maskconstorder']; - $maskorder=$_POST['maskorder']; - if ($maskconstorder) $res = dolibarr_set_const($db,$maskconstorder,$maskorder,'chaine',0,'',$conf->entity); + $maskconstorder=$_POST['maskconstorder']; + $maskorder=$_POST['maskorder']; + if ($maskconstorder) $res = dolibarr_set_const($db,$maskconstorder,$maskorder,'chaine',0,'',$conf->entity); - if (! $res > 0) $error++; + if (! $res > 0) $error++; - if (! $error) + if (! $error) { $mesg = "".$langs->trans("SetupSaved").""; } @@ -70,76 +70,76 @@ if ($action == 'updateMask') if ($action == 'specimen') // For orders { - $modele=GETPOST("module"); + $modele=GETPOST("module"); - $commande = new CommandeFournisseur($db); - $commande->initAsSpecimen(); + $commande = new CommandeFournisseur($db); + $commande->initAsSpecimen(); $commande->thirdparty=$specimenthirdparty; - // Charge le modele - $dir = "/core/modules/supplier_order/pdf/"; - $file = "pdf_".$modele.".modules.php"; - $file = dol_buildpath($dir.$file); - if (file_exists($file)) - { - $classname = "pdf_".$modele; - require_once($file); + // Charge le modele + $dir = "/core/modules/supplier_order/pdf/"; + $file = "pdf_".$modele.".modules.php"; + $file = dol_buildpath($dir.$file); + if (file_exists($file)) + { + $classname = "pdf_".$modele; + require_once($file); - $obj = new $classname($db,$commande); + $obj = new $classname($db,$commande); - if ($obj->write_file($commande,$langs) > 0) - { - header("Location: ".DOL_URL_ROOT."/document.php?modulepart=commande_fournisseur&file=SPECIMEN.pdf"); - return; - } - else - { - $mesg='
'.$obj->error.'
'; - dol_syslog($obj->error, LOG_ERR); - } - } - else - { - $mesg='
'.$langs->trans("ErrorModuleNotFound").'
'; - dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); - } + if ($obj->write_file($commande,$langs) > 0) + { + header("Location: ".DOL_URL_ROOT."/document.php?modulepart=commande_fournisseur&file=SPECIMEN.pdf"); + return; + } + else + { + $mesg='
'.$obj->error.'
'; + dol_syslog($obj->error, LOG_ERR); + } + } + else + { + $mesg='
'.$langs->trans("ErrorModuleNotFound").'
'; + dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); + } } if ($action == 'specimenfacture') // For invoices { - $modele=GETPOST("module"); + $modele=GETPOST("module"); - $facture = new FactureFournisseur($db); - $facture->initAsSpecimen(); + $facture = new FactureFournisseur($db); + $facture->initAsSpecimen(); $facture->thirdparty=$specimenthirdparty; // Define who should has build the invoice (so the supplier) - // Charge le modele - $dir = "/core/modules/supplier_invoice/pdf/"; - $file = "pdf_".$modele.".modules.php"; - $file = dol_buildpath($dir.$file); + // Charge le modele + $dir = "/core/modules/supplier_invoice/pdf/"; + $file = "pdf_".$modele.".modules.php"; + $file = dol_buildpath($dir.$file); if (file_exists($file)) - { - $classname = "pdf_".$modele; - require_once($file); + { + $classname = "pdf_".$modele; + require_once($file); - $obj = new $classname($db,$facture); + $obj = new $classname($db,$facture); - if ($obj->write_file($facture,$langs) > 0) - { - header("Location: ".DOL_URL_ROOT."/document.php?modulepart=facture_fournisseur&file=SPECIMEN.pdf"); - return; - } - else - { - $mesg='
'.$obj->error.'
'; - dol_syslog($obj->error, LOG_ERR); - } - } - else - { - $mesg='
'.$langs->trans("ErrorModuleNotFound").'
'; - dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); - } + if ($obj->write_file($facture,$langs) > 0) + { + header("Location: ".DOL_URL_ROOT."/document.php?modulepart=facture_fournisseur&file=SPECIMEN.pdf"); + return; + } + else + { + $mesg='
'.$obj->error.'
'; + dol_syslog($obj->error, LOG_ERR); + } + } + else + { + $mesg='
'.$langs->trans("ErrorModuleNotFound").'
'; + dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); + } } if ($action == 'set') @@ -149,87 +149,87 @@ if ($action == 'set') $sql.= ($_GET["label"]?"'".$db->escape($_GET["label"])."'":'null').", "; $sql.= (! empty($_GET["scandir"])?"'".$db->escape($_GET["scandir"])."'":"null"); $sql.= ")"; - $res=$db->query($sql); - if ($res) - { + $res=$db->query($sql); + if ($res) + { - } -// else dol_print_error($db); + } + // else dol_print_error($db); } if ($action == 'del') { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."document_model"; - $sql.= " WHERE nom = '".$value."'"; - $sql.= " AND type = '".$type."'"; - $sql.= " AND entity = ".$conf->entity; - $db->query($sql); - if ($res) - { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."document_model"; + $sql.= " WHERE nom = '".$value."'"; + $sql.= " AND type = '".$type."'"; + $sql.= " AND entity = ".$conf->entity; + $db->query($sql); + if ($res) + { - } -// else dol_print_error($db); + } + // else dol_print_error($db); } if ($action == 'setdoc') { - $db->begin(); + $db->begin(); - if ($_GET["type"] == 'order_supplier' && dolibarr_set_const($db, "COMMANDE_SUPPLIER_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) - { - $conf->global->COMMANDE_SUPPLIER_ADDON_PDF = $value; - } + if ($_GET["type"] == 'order_supplier' && dolibarr_set_const($db, "COMMANDE_SUPPLIER_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) + { + $conf->global->COMMANDE_SUPPLIER_ADDON_PDF = $value; + } - if ($_GET["type"] == 'invoice_supplier' && dolibarr_set_const($db, "INVOICE_SUPPLIER_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) - { - $conf->global->INVOICE_SUPPLIER_ADDON_PDF = $value; - } + if ($_GET["type"] == 'invoice_supplier' && dolibarr_set_const($db, "INVOICE_SUPPLIER_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) + { + $conf->global->INVOICE_SUPPLIER_ADDON_PDF = $value; + } - // On active le modele - $sql_del = "DELETE FROM ".MAIN_DB_PREFIX."document_model"; - $sql_del.= " WHERE nom = '".$db->escape($value)."'"; - $sql_del.= " AND type = '".$type."'"; - $sql_del.= " AND entity = ".$conf->entity; - $result1=$db->query($sql_del); + // On active le modele + $sql_del = "DELETE FROM ".MAIN_DB_PREFIX."document_model"; + $sql_del.= " WHERE nom = '".$db->escape($value)."'"; + $sql_del.= " AND type = '".$type."'"; + $sql_del.= " AND entity = ".$conf->entity; + $result1=$db->query($sql_del); $sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)"; $sql.= " VALUES ('".$db->escape($value)."', '".$type."', ".$conf->entity.", "; $sql.= ($_GET["label"]?"'".$db->escape($_GET["label"])."'":'null').", "; $sql.= (! empty($_GET["scandir"])?"'".$db->escape($_GET["scandir"])."'":"null"); $sql.= ")"; - $result2=$db->query($sql); - if ($result1 && $result2) - { - $db->commit(); - } - else - { - $db->rollback(); - } + $result2=$db->query($sql); + if ($result1 && $result2) + { + $db->commit(); + } + else + { + $db->rollback(); + } } if ($action == 'setmod') { - // TODO Verifier si module numerotation choisi peut etre active - // par appel methode canBeActivated + // TODO Verifier si module numerotation choisi peut etre active + // par appel methode canBeActivated - dolibarr_set_const($db, "COMMANDE_SUPPLIER_ADDON",$value,'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "COMMANDE_SUPPLIER_ADDON",$value,'chaine',0,'',$conf->entity); } if ($action == 'addcat') { - $fourn = new Fournisseur($db); - $fourn->CreateCategory($user,$_POST["cat"]); + $fourn = new Fournisseur($db); + $fourn->CreateCategory($user,$_POST["cat"]); } if ($action == 'set_SUPPLIER_INVOICE_FREE_TEXT') { - $free = GETPOST("SUPPLIER_INVOICE_FREE_TEXT"); - $res = dolibarr_set_const($db, "SUPPLIER_INVOICE_FREE_TEXT",$free,'chaine',0,'',$conf->entity); + $free = GETPOST("SUPPLIER_INVOICE_FREE_TEXT"); + $res = dolibarr_set_const($db, "SUPPLIER_INVOICE_FREE_TEXT",$free,'chaine',0,'',$conf->entity); - if (! $res > 0) $error++; + if (! $res > 0) $error++; - if (! $error) + if (! $error) { $mesg = "".$langs->trans("SetupSaved").""; } @@ -238,6 +238,8 @@ if ($action == 'set_SUPPLIER_INVOICE_FREE_TEXT') $mesg = "".$langs->trans("Error").""; } } + + /* * View */ @@ -269,87 +271,89 @@ clearstatcache(); foreach ($conf->file->dol_document_root as $dirroot) { - $dir = $dirroot . "/core/modules/supplier_order/"; + $dir = $dirroot . "/core/modules/supplier_order/"; - if (is_dir($dir)) - { - $handle = opendir($dir); - if (is_resource($handle)) - { - $var=true; + if (is_dir($dir)) + { + $handle = opendir($dir); + if (is_resource($handle)) + { + $var=true; - while (($file = readdir($handle))!==false) - { - if (substr($file, 0, 25) == 'mod_commande_fournisseur_' && substr($file, dol_strlen($file)-3, 3) == 'php') - { - $file = substr($file, 0, dol_strlen($file)-4); + while (($file = readdir($handle))!==false) + { + if (substr($file, 0, 25) == 'mod_commande_fournisseur_' && substr($file, dol_strlen($file)-3, 3) == 'php') + { + $file = substr($file, 0, dol_strlen($file)-4); - require_once($dir.$file.".php"); + require_once($dir.$file.".php"); - $module = new $file; + $module = new $file; - if ($module->isEnabled()) - { - // Show modules according to features level - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + if ($module->isEnabled()) + { + // Show modules according to features level + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; - $var=!$var; - print ''.$module->nom."\n"; - print $module->info(); - print ''; + $var=!$var; + print ''.$module->nom."\n"; + print $module->info(); + print ''; - // Show example of numbering module - print ''; + // Show example of numbering module + print ''; $tmp=$module->getExample(); - if (preg_match('/^Error/',$tmp)) { $langs->load("errors"); print '
'.$langs->trans($tmp).'
'; } + if (preg_match('/^Error/',$tmp)) { + $langs->load("errors"); print '
'.$langs->trans($tmp).'
'; + } elseif ($tmp=='NotConfigured') print $langs->trans($tmp); else print $tmp; - print ''."\n"; + print ''."\n"; - print ''; - if ($conf->global->COMMANDE_SUPPLIER_ADDON == "$file") - { - print img_picto($langs->trans("Activated"),'switch_on'); - } - else - { - print ''.img_picto($langs->trans("Disabled"),'switch_off').''; - } - print ''; + print ''; + if ($conf->global->COMMANDE_SUPPLIER_ADDON == "$file") + { + print img_picto($langs->trans("Activated"),'switch_on'); + } + else + { + print ''.img_picto($langs->trans("Disabled"),'switch_off').''; + } + print ''; - $commande=new CommandeFournisseur($db); - $commande->initAsSpecimen(); + $commande=new CommandeFournisseur($db); + $commande->initAsSpecimen(); - // Info - $htmltooltip=''; - $htmltooltip.=''.$langs->trans("Version").': '.$module->getVersion().'
'; - $facture->type=0; - $nextval=$module->getNextValue($mysoc,$commande); - if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval - { - $htmltooltip.=''.$langs->trans("NextValue").': '; - if ($nextval) - { - $htmltooltip.=$nextval.'
'; - } - else - { - $htmltooltip.=$langs->trans($module->error).'
'; - } - } + // Info + $htmltooltip=''; + $htmltooltip.=''.$langs->trans("Version").': '.$module->getVersion().'
'; + $facture->type=0; + $nextval=$module->getNextValue($mysoc,$commande); + if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval + { + $htmltooltip.=''.$langs->trans("NextValue").': '; + if ($nextval) + { + $htmltooltip.=$nextval.'
'; + } + else + { + $htmltooltip.=$langs->trans($module->error).'
'; + } + } - print ''; - print $form->textwithpicto('',$htmltooltip,1,0); - print ''; + print ''; + print $form->textwithpicto('',$htmltooltip,1,0); + print ''; - print ''; - } - } - } - closedir($handle); - } - } + print ''; + } + } + } + closedir($handle); + } + } } print '
'; @@ -374,18 +378,18 @@ $sql.= " AND entity = ".$conf->entity; $resql=$db->query($sql); if ($resql) { - $i = 0; - $num_rows=$db->num_rows($resql); - while ($i < $num_rows) - { - $array = $db->fetch_array($resql); - array_push($def, $array[0]); - $i++; - } + $i = 0; + $num_rows=$db->num_rows($resql); + while ($i < $num_rows) + { + $array = $db->fetch_array($resql); + array_push($def, $array[0]); + $i++; + } } else { - dol_print_error($db); + dol_print_error($db); } print ''."\n"; @@ -401,90 +405,90 @@ clearstatcache(); foreach ($conf->file->dol_document_root as $dirroot) { - $dir = $dirroot . "/core/modules/supplier_order/pdf/"; + $dir = $dirroot . "/core/modules/supplier_order/pdf/"; - if (is_dir($dir)) - { - $var=true; + if (is_dir($dir)) + { + $var=true; - $handle=opendir($dir); + $handle=opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle))!==false) - { - if (preg_match('/\.modules\.php$/i',$file) && substr($file,0,4) == 'pdf_') - { - $name = substr($file, 4, dol_strlen($file) -16); - $classname = substr($file, 0, dol_strlen($file) -12); + if (is_resource($handle)) + { + while (($file = readdir($handle))!==false) + { + if (preg_match('/\.modules\.php$/i',$file) && substr($file,0,4) == 'pdf_') + { + $name = substr($file, 4, dol_strlen($file) -16); + $classname = substr($file, 0, dol_strlen($file) -12); - $var=!$var; - print "\n"; - print "\n"; - print "\n"; + $var=!$var; + print "\n"; + print "\n"; + print "\n"; - // Active - if (in_array($name, $def)) - { - print '"; - } - else - { - print '"; - } + // Active + if (in_array($name, $def)) + { + print '"; + } + else + { + print '"; + } - // Defaut - print ''; + // Defaut + print ''; - // Info - $htmltooltip = ''.$langs->trans("Name").': '.$module->name; - $htmltooltip.='
'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); - $htmltooltip.='
'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; - $htmltooltip.='

'.$langs->trans("FeaturesSupported").':'; - $htmltooltip.='
'.$langs->trans("Logo").': '.yn($module->option_logo,1,1); - $htmltooltip.='
'.$langs->trans("PaymentMode").': '.yn($module->option_modereg,1,1); - $htmltooltip.='
'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg,1,1); - print ''; - print ''; + // Info + $htmltooltip = ''.$langs->trans("Name").': '.$module->name; + $htmltooltip.='
'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); + $htmltooltip.='
'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; + $htmltooltip.='

'.$langs->trans("FeaturesSupported").':'; + $htmltooltip.='
'.$langs->trans("Logo").': '.yn($module->option_logo,1,1); + $htmltooltip.='
'.$langs->trans("PaymentMode").': '.yn($module->option_modereg,1,1); + $htmltooltip.='
'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg,1,1); + print ''; + print ''; - print "\n"; - } - } + print "\n"; + } + } - closedir($handle); - } - } + closedir($handle); + } + } } print '
".$name."\n"; - require_once($dir.$file); - $module = new $classname($db,$specimenthirdparty); - print $module->description; - print "
".$name."\n"; + require_once($dir.$file); + $module = new $classname($db,$specimenthirdparty); + print $module->description; + print "'."\n"; - if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF != "$name") - { - print 'scandir.'&label='.urlencode($module->name).'&type=order_supplier">'; - print img_picto($langs->trans("Enabled"),'switch_on'); - print ''; - } - else - { - print img_picto($langs->trans("Enabled"),'switch_on'); - } - print "'."\n"; - print 'scandir.'&label='.urlencode($module->name).'&type=order_supplier">'.img_picto($langs->trans("Disabled"),'switch_off').''; - print "'."\n"; + if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF != "$name") + { + print 'scandir.'&label='.urlencode($module->name).'&type=order_supplier">'; + print img_picto($langs->trans("Enabled"),'switch_on'); + print ''; + } + else + { + print img_picto($langs->trans("Enabled"),'switch_on'); + } + print "'."\n"; + print 'scandir.'&label='.urlencode($module->name).'&type=order_supplier">'.img_picto($langs->trans("Disabled"),'switch_off').''; + print "'; - if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF == "$name") - { - print img_picto($langs->trans("Default"),'on'); - } - else - { - print 'scandir.'&label='.urlencode($module->name).'&type=order_supplier"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').''; - } - print ''; + if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF == "$name") + { + print img_picto($langs->trans("Default"),'on'); + } + else + { + print 'scandir.'&label='.urlencode($module->name).'&type=order_supplier"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').''; + } + print ''; - print $form->textwithpicto('',$htmltooltip,1,0); - print ''; - print ''.img_object($langs->trans("Preview"),'order').''; - print ''; + print $form->textwithpicto('',$htmltooltip,1,0); + print ''; + print ''.img_object($langs->trans("Preview"),'order').''; + print '

'; @@ -506,18 +510,18 @@ $sql.= " AND entity = ".$conf->entity; $resql=$db->query($sql); if ($resql) { - $i = 0; - $num_rows=$db->num_rows($resql); - while ($i < $num_rows) - { - $array = $db->fetch_array($resql); - array_push($def, $array[0]); - $i++; - } + $i = 0; + $num_rows=$db->num_rows($resql); + while ($i < $num_rows) + { + $array = $db->fetch_array($resql); + array_push($def, $array[0]); + $i++; + } } else { - dol_print_error($db); + dol_print_error($db); } @@ -534,88 +538,88 @@ clearstatcache(); foreach ($conf->file->dol_document_root as $dirroot) { - $dir = $dirroot . "/core/modules/supplier_invoice/pdf/"; + $dir = $dirroot . "/core/modules/supplier_invoice/pdf/"; - if (is_dir($dir)) - { - $var=true; + if (is_dir($dir)) + { + $var=true; - $handle=opendir($dir); + $handle=opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (preg_match('/\.modules\.php$/i',$file) && substr($file,0,4) == 'pdf_') - { - $name = substr($file, 4, dol_strlen($file) -16); - $classname = substr($file, 0, dol_strlen($file) -12); + if (is_resource($handle)) + { + while (($file = readdir($handle)) !== false) + { + if (preg_match('/\.modules\.php$/i',$file) && substr($file,0,4) == 'pdf_') + { + $name = substr($file, 4, dol_strlen($file) -16); + $classname = substr($file, 0, dol_strlen($file) -12); - $var=!$var; - print "\n"; - print "".$name."\n"; - print ""; - require_once($dir.$file); - $module = new $classname($db,$specimenthirdparty); - print $module->description; - print "\n"; + $var=!$var; + print "\n"; + print "".$name."\n"; + print ""; + require_once($dir.$file); + $module = new $classname($db,$specimenthirdparty); + print $module->description; + print "\n"; - // Active - if (in_array($name, $def)) - { - print "\n"; - if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF != "$name") - { - print 'scandir.'&label='.urlencode($module->name).'&type=invoice_supplier">'; - print img_picto($langs->trans("Enabled"),'switch_on'); - print ''; - } - else - { - print img_picto($langs->trans("Enabled"),'switch_on'); - } - print ""; - } - else - { - print "\n"; - print 'scandir.'&label='.urlencode($module->name).'&type=invoice_supplier">'.img_picto($langs->trans("Disabled"),'switch_off').''; - print ""; - } + // Active + if (in_array($name, $def)) + { + print "\n"; + if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF != "$name") + { + print 'scandir.'&label='.urlencode($module->name).'&type=invoice_supplier">'; + print img_picto($langs->trans("Enabled"),'switch_on'); + print ''; + } + else + { + print img_picto($langs->trans("Enabled"),'switch_on'); + } + print ""; + } + else + { + print "\n"; + print 'scandir.'&label='.urlencode($module->name).'&type=invoice_supplier">'.img_picto($langs->trans("Disabled"),'switch_off').''; + print ""; + } - // Defaut - print ""; - if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF == "$name") - { - print img_picto($langs->trans("Default"),'on'); - } - else - { - print 'scandir.'&label='.urlencode($module->name).'&type=invoice_supplier" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').''; - } - print ''; + // Defaut + print ""; + if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF == "$name") + { + print img_picto($langs->trans("Default"),'on'); + } + else + { + print 'scandir.'&label='.urlencode($module->name).'&type=invoice_supplier" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').''; + } + print ''; - // Info - $htmltooltip = ''.$langs->trans("Name").': '.$module->name; - $htmltooltip.='
'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); - $htmltooltip.='
'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; - $htmltooltip.='

'.$langs->trans("FeaturesSupported").':'; - $htmltooltip.='
'.$langs->trans("Logo").': '.yn($module->option_logo,1,1); - $htmltooltip.='
'.$langs->trans("PaymentMode").': '.yn($module->option_modereg,1,1); - $htmltooltip.='
'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg,1,1); - print ''; - print $form->textwithpicto('',$htmltooltip,1,0); - print ''; - print ''; - print ''.img_object($langs->trans("Preview"),'bill').''; - print ''; + // Info + $htmltooltip = ''.$langs->trans("Name").': '.$module->name; + $htmltooltip.='
'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); + $htmltooltip.='
'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; + $htmltooltip.='

'.$langs->trans("FeaturesSupported").':'; + $htmltooltip.='
'.$langs->trans("Logo").': '.yn($module->option_logo,1,1); + $htmltooltip.='
'.$langs->trans("PaymentMode").': '.yn($module->option_modereg,1,1); + $htmltooltip.='
'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg,1,1); + print ''; + print $form->textwithpicto('',$htmltooltip,1,0); + print ''; + print ''; + print ''.img_object($langs->trans("Preview"),'bill').''; + print ''; - print "\n"; - } - } - closedir($handle); - } - } + print "\n"; + } + } + closedir($handle); + } + } } print '
'; @@ -641,7 +645,7 @@ print ''; dol_htmloutput_mesg($mesg); -$db->close(); - llxFooter(); + +$db->close(); ?>