diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index eac796f6710..9dd63a5d660 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -181,48 +181,49 @@ while (($file = readdir($handle))!==false) { if (is_dir($dir.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS') { - $var = !$var; - print ''; - echo "$file"; - print "\n"; - $filebis = $file."/".$file.".modules.php"; - - // Chargement de la classe de numérotation - $classname = "mod_facture_".$file; - require_once($dir.$filebis); - - $module = new $classname($db); - print $module->info(); - - print ''; - - // Affiche example - print ''.$module->getExample().''; - - print ''; - if ($conf->global->FACTURE_ADDON == "$file") - { - print img_tick($langs->trans("Activated")); - } - else - { - print ''.$langs->trans("Default").''; - } - print ''; - - // Info - $htmltooltip=''; - $nextval=$module->getNextValue(); - if ($nextval != $langs->trans("NotAvailable")) - { - $htmltooltip=''.$langs->trans("NextValue").': '.$nextval; - } - print 'tooltip_properties($htmltooltip).'>'; - print ($htmltooltip?img_help(0):''); - print ''; - - print "\n"; + if (is_readable($dir.$filebis)) + { + $var = !$var; + print ''; + echo "$file"; + print "\n"; + + // Chargement de la classe de numérotation + require_once($dir.$filebis); + $classname = "mod_facture_".$file; + $module = new $classname($db); + print $module->info(); + + print ''; + + // Affiche example + print ''.$module->getExample().''; + + print ''; + if ($conf->global->FACTURE_ADDON == "$file") + { + print img_tick($langs->trans("Activated")); + } + else + { + print ''.$langs->trans("Default").''; + } + print ''; + + // Info + $htmltooltip=''; + $nextval=$module->getNextValue(); + if ($nextval != $langs->trans("NotAvailable")) + { + $htmltooltip=''.$langs->trans("NextValue").': '.$nextval; + } + print 'tooltip_properties($htmltooltip).'>'; + print ($htmltooltip?img_help(0):''); + print ''; + + print "\n"; + } } } closedir($handle);