Fix: Show error message
This commit is contained in:
parent
ab8d73226b
commit
d6abe49da2
@ -230,25 +230,29 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
if (substr($file, 0, 13) == 'mod_commande_' && substr($file, dol_strlen($file)-3, 3) == 'php')
|
if (substr($file, 0, 13) == 'mod_commande_' && substr($file, dol_strlen($file)-3, 3) == 'php')
|
||||||
{
|
{
|
||||||
$file = substr($file, 0, dol_strlen($file)-4);
|
$file = substr($file, 0, dol_strlen($file)-4);
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/commande/".$file.".php");
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/commande/".$file.".php");
|
||||||
|
|
||||||
$module = new $file;
|
$module = new $file;
|
||||||
|
|
||||||
// Show modules according to features level
|
// Show modules according to features level
|
||||||
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
|
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
|
||||||
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
|
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
|
||||||
|
|
||||||
if ($module->isEnabled())
|
if ($module->isEnabled())
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td>'.$module->nom."</td><td>\n";
|
print '<tr '.$bc[$var].'><td>'.$module->nom."</td><td>\n";
|
||||||
print $module->info();
|
print $module->info();
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Examples
|
// Show example of numbering module
|
||||||
print '<td nowrap="nowrap">'.$module->getExample()."</td>\n";
|
print '<td nowrap="nowrap">';
|
||||||
|
$tmp=$module->getExample();
|
||||||
|
if (preg_match('/^Error/',$tmp)) print $langs->trans($tmp);
|
||||||
|
else print $tmp;
|
||||||
|
print '</td>'."\n";
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if ($conf->global->COMMANDE_ADDON == "$file")
|
if ($conf->global->COMMANDE_ADDON == "$file")
|
||||||
{
|
{
|
||||||
@ -261,10 +265,10 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
$commande=new Commande($db);
|
$commande=new Commande($db);
|
||||||
$commande->initAsSpecimen();
|
$commande->initAsSpecimen();
|
||||||
|
|
||||||
// Info
|
// Info
|
||||||
$htmltooltip='';
|
$htmltooltip='';
|
||||||
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
||||||
@ -282,11 +286,11 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print $html->textwithpicto('',$htmltooltip,1,0);
|
print $html->textwithpicto('',$htmltooltip,1,0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -357,7 +361,7 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
{
|
{
|
||||||
$name = substr($file, 4, dol_strlen($file) -16);
|
$name = substr($file, 4, dol_strlen($file) -16);
|
||||||
$classname = substr($file, 0, dol_strlen($file) -12);
|
$classname = substr($file, 0, dol_strlen($file) -12);
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr ".$bc[$var].">\n <td>";
|
print "<tr ".$bc[$var].">\n <td>";
|
||||||
print "$name";
|
print "$name";
|
||||||
@ -366,7 +370,7 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
$module = new $classname($db);
|
$module = new $classname($db);
|
||||||
print $module->description;
|
print $module->description;
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
// Activated
|
// Activated
|
||||||
print "<td align=\"center\">\n";
|
print "<td align=\"center\">\n";
|
||||||
if (in_array($name, $def))
|
if (in_array($name, $def))
|
||||||
@ -389,7 +393,7 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
|
||||||
// Defaut
|
// Defaut
|
||||||
print "<td align=\"center\">";
|
print "<td align=\"center\">";
|
||||||
if ($conf->global->COMMANDE_ADDON_PDF == "$name")
|
if ($conf->global->COMMANDE_ADDON_PDF == "$name")
|
||||||
@ -403,7 +407,7 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Info
|
// Info
|
||||||
$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
|
$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
|
||||||
$htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
|
$htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
|
||||||
@ -416,14 +420,14 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
//$htmltooltip.='<br>'.$langs->trans("Escompte").': '.yn($module->option_escompte,1,1);
|
//$htmltooltip.='<br>'.$langs->trans("Escompte").': '.yn($module->option_escompte,1,1);
|
||||||
//$htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1);
|
//$htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1);
|
||||||
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark,1,1);
|
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark,1,1);
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print $html->textwithpicto('',$htmltooltip,1,0);
|
print $html->textwithpicto('',$htmltooltip,1,0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"),'order').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"),'order').'</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -119,8 +119,12 @@ if (is_resource($handle))
|
|||||||
print $module->info();
|
print $module->info();
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Examples
|
// Show example of numbering module
|
||||||
print '<td nowrap="nowrap">'.$module->getExample()."</td>\n";
|
print '<td nowrap="nowrap">';
|
||||||
|
$tmp=$module->getExample();
|
||||||
|
if (preg_match('/^Error/',$tmp)) print $langs->trans($tmp);
|
||||||
|
else print $tmp;
|
||||||
|
print '</td>'."\n";
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if ($conf->global->CONTRACT_ADDON == "$file")
|
if ($conf->global->CONTRACT_ADDON == "$file")
|
||||||
|
|||||||
@ -306,21 +306,21 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
if (is_resource($handle))
|
if (is_resource($handle))
|
||||||
{
|
{
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
while (($file = readdir($handle))!==false)
|
while (($file = readdir($handle))!==false)
|
||||||
{
|
{
|
||||||
if (substr($file, 0, 15) == 'mod_expedition_' && substr($file, dol_strlen($file)-3, 3) == 'php')
|
if (substr($file, 0, 15) == 'mod_expedition_' && substr($file, dol_strlen($file)-3, 3) == 'php')
|
||||||
{
|
{
|
||||||
$file = substr($file, 0, dol_strlen($file)-4);
|
$file = substr($file, 0, dol_strlen($file)-4);
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/expedition/".$file.".php");
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/expedition/".$file.".php");
|
||||||
|
|
||||||
$module = new $file;
|
$module = new $file;
|
||||||
|
|
||||||
// Show modules according to features level
|
// Show modules according to features level
|
||||||
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
|
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
|
||||||
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
|
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
|
||||||
|
|
||||||
if ($module->isEnabled())
|
if ($module->isEnabled())
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
@ -328,10 +328,14 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
print $module->info();
|
print $module->info();
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Examples
|
// Show example of numbering module
|
||||||
print '<td nowrap="nowrap">'.$module->getExample()."</td>\n";
|
print '<td nowrap="nowrap">';
|
||||||
|
$tmp=$module->getExample();
|
||||||
|
if (preg_match('/^Error/',$tmp)) print $langs->trans($tmp);
|
||||||
|
else print $tmp;
|
||||||
|
print '</td>'."\n";
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if ($conf->global->EXPEDITION_ADDON_NUMBER == "$file")
|
if ($conf->global->EXPEDITION_ADDON_NUMBER == "$file")
|
||||||
{
|
{
|
||||||
@ -344,10 +348,10 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
$expedition=new Expedition($db);
|
$expedition=new Expedition($db);
|
||||||
$expedition->initAsSpecimen();
|
$expedition->initAsSpecimen();
|
||||||
|
|
||||||
// Info
|
// Info
|
||||||
$htmltooltip='';
|
$htmltooltip='';
|
||||||
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
||||||
@ -365,11 +369,11 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print $html->textwithpicto('',$htmltooltip,1,0);
|
print $html->textwithpicto('',$htmltooltip,1,0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -432,7 +436,7 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
{
|
{
|
||||||
$handle=opendir($dir);
|
$handle=opendir($dir);
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
if (is_resource($handle))
|
if (is_resource($handle))
|
||||||
{
|
{
|
||||||
while (($file = readdir($handle))!==false)
|
while (($file = readdir($handle))!==false)
|
||||||
@ -441,17 +445,17 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
{
|
{
|
||||||
$name = substr($file, 15, dol_strlen($file) - 27);
|
$name = substr($file, 15, dol_strlen($file) - 27);
|
||||||
$classname = substr($file, 0, dol_strlen($file) - 12);
|
$classname = substr($file, 0, dol_strlen($file) - 12);
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]><td>";
|
print "<tr $bc[$var]><td>";
|
||||||
print $name;
|
print $name;
|
||||||
print "</td><td>\n";
|
print "</td><td>\n";
|
||||||
require_once($dir.$file);
|
require_once($dir.$file);
|
||||||
$module = new $classname();
|
$module = new $classname();
|
||||||
|
|
||||||
print $module->description;
|
print $module->description;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Active
|
// Active
|
||||||
if (in_array($name, $def))
|
if (in_array($name, $def))
|
||||||
{
|
{
|
||||||
@ -474,7 +478,7 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default
|
// Default
|
||||||
print "<td align=\"center\">";
|
print "<td align=\"center\">";
|
||||||
if ($conf->global->EXPEDITION_ADDON_PDF == $name)
|
if ($conf->global->EXPEDITION_ADDON_PDF == $name)
|
||||||
@ -486,7 +490,7 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Info
|
// Info
|
||||||
$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
|
$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
|
||||||
$htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
|
$htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
|
||||||
@ -499,7 +503,7 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_object($langs->trans("Preview"),'sending').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_object($langs->trans("Preview"),'sending').'</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -507,7 +511,7 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -35,6 +35,7 @@ $langs->load("admin");
|
|||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
|
$langs->load("errors");
|
||||||
|
|
||||||
if (!$user->admin)
|
if (!$user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
@ -303,8 +304,12 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Affiche example
|
// Show example of numbering module
|
||||||
print '<td nowrap="nowrap">'.$module->getExample().'</td>';
|
print '<td nowrap="nowrap">';
|
||||||
|
$tmp=$module->getExample();
|
||||||
|
if (preg_match('/^Error/',$tmp)) print $langs->trans($tmp);
|
||||||
|
else print $tmp;
|
||||||
|
print '</td>'."\n";
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
//print "> ".$conf->global->FACTURE_ADDON." - ".$file;
|
//print "> ".$conf->global->FACTURE_ADDON." - ".$file;
|
||||||
@ -359,7 +364,7 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
|
|
||||||
if ($conf->global->FACTURE_ADDON.'.php' == $file) // If module is the one used, we show existing errors
|
if ($conf->global->FACTURE_ADDON.'.php' == $file) // If module is the one used, we show existing errors
|
||||||
{
|
{
|
||||||
if (! empty($module->error)) dol_htmloutput_errors($module->error,'');
|
if (! empty($module->error)) dol_htmloutput_errors($module->error,'',1);
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -206,39 +206,43 @@ clearstatcache();
|
|||||||
foreach ($conf->file->dol_document_root as $dirroot)
|
foreach ($conf->file->dol_document_root as $dirroot)
|
||||||
{
|
{
|
||||||
$dir = $dirroot . "/includes/modules/fichinter/";
|
$dir = $dirroot . "/includes/modules/fichinter/";
|
||||||
|
|
||||||
if (is_dir($dir))
|
if (is_dir($dir))
|
||||||
{
|
{
|
||||||
$handle = opendir($dir);
|
$handle = opendir($dir);
|
||||||
if (is_resource($handle))
|
if (is_resource($handle))
|
||||||
{
|
{
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
while (($file = readdir($handle))!==false)
|
while (($file = readdir($handle))!==false)
|
||||||
{
|
{
|
||||||
if (preg_match('/^(mod_.*)\.php$/i',$file,$reg))
|
if (preg_match('/^(mod_.*)\.php$/i',$file,$reg))
|
||||||
{
|
{
|
||||||
$file = $reg[1];
|
$file = $reg[1];
|
||||||
$classname = substr($file,4);
|
$classname = substr($file,4);
|
||||||
|
|
||||||
require_once($dir.$file.".php");
|
require_once($dir.$file.".php");
|
||||||
|
|
||||||
$module = new $file;
|
$module = new $file;
|
||||||
|
|
||||||
// Show modules according to features level
|
// Show modules according to features level
|
||||||
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
|
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
|
||||||
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
|
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
|
||||||
|
|
||||||
if ($module->isEnabled())
|
if ($module->isEnabled())
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td>'.$module->nom."</td><td>\n";
|
print '<tr '.$bc[$var].'><td>'.$module->nom."</td><td>\n";
|
||||||
print $module->info();
|
print $module->info();
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Examples
|
// Show example of numbering module
|
||||||
print '<td nowrap="nowrap">'.$module->getExample()."</td>\n";
|
print '<td nowrap="nowrap">';
|
||||||
|
$tmp=$module->getExample();
|
||||||
|
if (preg_match('/^Error/',$tmp)) print $langs->trans($tmp);
|
||||||
|
else print $tmp;
|
||||||
|
print '</td>'."\n";
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if ($conf->global->FICHEINTER_ADDON == $classname)
|
if ($conf->global->FICHEINTER_ADDON == $classname)
|
||||||
{
|
{
|
||||||
@ -249,10 +253,10 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$classname.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$classname.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
$ficheinter=new Fichinter($db);
|
$ficheinter=new Fichinter($db);
|
||||||
$ficheinter->initAsSpecimen();
|
$ficheinter->initAsSpecimen();
|
||||||
|
|
||||||
// Info
|
// Info
|
||||||
$htmltooltip='';
|
$htmltooltip='';
|
||||||
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
||||||
@ -264,7 +268,7 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print $html->textwithpicto('',$htmltooltip,1,0);
|
print $html->textwithpicto('',$htmltooltip,1,0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -332,9 +336,9 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
{
|
{
|
||||||
$name = substr($file, 4, dol_strlen($file) -16);
|
$name = substr($file, 4, dol_strlen($file) -16);
|
||||||
$classname = substr($file, 0, dol_strlen($file) -12);
|
$classname = substr($file, 0, dol_strlen($file) -12);
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|
||||||
print '<tr '.$bc[$var].'><td>';
|
print '<tr '.$bc[$var].'><td>';
|
||||||
echo "$name";
|
echo "$name";
|
||||||
print "</td><td>\n";
|
print "</td><td>\n";
|
||||||
@ -342,7 +346,7 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
$module = new $classname();
|
$module = new $classname();
|
||||||
print $module->description;
|
print $module->description;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Active
|
// Active
|
||||||
if (in_array($name, $def))
|
if (in_array($name, $def))
|
||||||
{
|
{
|
||||||
@ -365,7 +369,7 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Defaut
|
// Defaut
|
||||||
print "<td align=\"center\">";
|
print "<td align=\"center\">";
|
||||||
if ($conf->global->FICHEINTER_ADDON_PDF == "$name")
|
if ($conf->global->FICHEINTER_ADDON_PDF == "$name")
|
||||||
@ -377,7 +381,7 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Info
|
// Info
|
||||||
$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
|
$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
|
||||||
$htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
|
$htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
|
||||||
@ -394,7 +398,7 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"),'intervention').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"),'intervention').'</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -270,8 +270,12 @@ if (is_resource($handle))
|
|||||||
print $module->info();
|
print $module->info();
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Examples
|
// Show example of numbering module
|
||||||
print '<td nowrap="nowrap">'.$module->getExample()."</td>\n";
|
print '<td nowrap="nowrap">';
|
||||||
|
$tmp=$module->getExample();
|
||||||
|
if (preg_match('/^Error/',$tmp)) print $langs->trans($tmp);
|
||||||
|
else print $tmp;
|
||||||
|
print '</td>'."\n";
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if ($conf->global->COMMANDE_SUPPLIER_ADDON == "$file")
|
if ($conf->global->COMMANDE_SUPPLIER_ADDON == "$file")
|
||||||
|
|||||||
@ -227,25 +227,29 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
if (substr($file, 0, 14) == 'mod_livraison_' && substr($file, dol_strlen($file)-3, 3) == 'php')
|
if (substr($file, 0, 14) == 'mod_livraison_' && substr($file, dol_strlen($file)-3, 3) == 'php')
|
||||||
{
|
{
|
||||||
$file = substr($file, 0, dol_strlen($file)-4);
|
$file = substr($file, 0, dol_strlen($file)-4);
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/livraison/".$file.".php");
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/livraison/".$file.".php");
|
||||||
|
|
||||||
$module = new $file;
|
$module = new $file;
|
||||||
|
|
||||||
// Show modules according to features level
|
// Show modules according to features level
|
||||||
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
|
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
|
||||||
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
|
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
|
||||||
|
|
||||||
if ($module->isEnabled())
|
if ($module->isEnabled())
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td>'.$module->nom."</td><td>\n";
|
print '<tr '.$bc[$var].'><td>'.$module->nom."</td><td>\n";
|
||||||
print $module->info();
|
print $module->info();
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Affiche example
|
// Show example of numbering module
|
||||||
print '<td nowrap="nowrap">'.$module->getExample().'</td>';
|
print '<td nowrap="nowrap">';
|
||||||
|
$tmp=$module->getExample();
|
||||||
|
if (preg_match('/^Error/',$tmp)) print $langs->trans($tmp);
|
||||||
|
else print $tmp;
|
||||||
|
print '</td>'."\n";
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if ($conf->global->LIVRAISON_ADDON == "$file")
|
if ($conf->global->LIVRAISON_ADDON == "$file")
|
||||||
{
|
{
|
||||||
@ -256,10 +260,10 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
$livraison=new Livraison($db);
|
$livraison=new Livraison($db);
|
||||||
$livraison->initAsSpecimen();
|
$livraison->initAsSpecimen();
|
||||||
|
|
||||||
// Info
|
// Info
|
||||||
$htmltooltip='';
|
$htmltooltip='';
|
||||||
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
||||||
@ -277,11 +281,11 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print $html->textwithpicto('',$htmltooltip,1,0);
|
print $html->textwithpicto('',$htmltooltip,1,0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -352,17 +356,17 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
{
|
{
|
||||||
$name = substr($file, 4, dol_strlen($file) - 16);
|
$name = substr($file, 4, dol_strlen($file) - 16);
|
||||||
$classname = substr($file, 0, dol_strlen($file) - 12);
|
$classname = substr($file, 0, dol_strlen($file) - 12);
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]><td>";
|
print "<tr $bc[$var]><td>";
|
||||||
print $name;
|
print $name;
|
||||||
print "</td><td>\n";
|
print "</td><td>\n";
|
||||||
require_once($dir.$file);
|
require_once($dir.$file);
|
||||||
$module = new $classname($db);
|
$module = new $classname($db);
|
||||||
|
|
||||||
print $module->description;
|
print $module->description;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Activ
|
// Activ
|
||||||
if (in_array($name, $def))
|
if (in_array($name, $def))
|
||||||
{
|
{
|
||||||
@ -385,7 +389,7 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Defaut
|
// Defaut
|
||||||
print "<td align=\"center\">";
|
print "<td align=\"center\">";
|
||||||
if ($conf->global->LIVRAISON_ADDON_PDF == "$name")
|
if ($conf->global->LIVRAISON_ADDON_PDF == "$name")
|
||||||
@ -397,7 +401,7 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Info
|
// Info
|
||||||
$htmltooltip = ''.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
|
$htmltooltip = ''.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
|
||||||
$htmltooltip.='<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
|
$htmltooltip.='<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
|
||||||
@ -409,7 +413,7 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"),'sending').'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"),'sending').'</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -207,8 +207,12 @@ if (is_resource($handle))
|
|||||||
print $module->info();
|
print $module->info();
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Examples
|
// Show example of numbering module
|
||||||
print '<td nowrap="nowrap">'.$module->getExample()."</td>\n";
|
print '<td nowrap="nowrap">';
|
||||||
|
$tmp=$module->getExample();
|
||||||
|
if (preg_match('/^Error/',$tmp)) print $langs->trans($tmp);
|
||||||
|
else print $tmp;
|
||||||
|
print '</td>'."\n";
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if ($conf->global->PROJECT_ADDON == "$file")
|
if ($conf->global->PROJECT_ADDON == "$file")
|
||||||
|
|||||||
@ -225,7 +225,7 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
if (is_resource($handle))
|
if (is_resource($handle))
|
||||||
{
|
{
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
while (($file = readdir($handle))!==false)
|
while (($file = readdir($handle))!==false)
|
||||||
{
|
{
|
||||||
if (substr($file, 0, 12) == 'mod_propale_' && substr($file, dol_strlen($file)-3, 3) == 'php')
|
if (substr($file, 0, 12) == 'mod_propale_' && substr($file, dol_strlen($file)-3, 3) == 'php')
|
||||||
@ -247,8 +247,12 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
print $module->info();
|
print $module->info();
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Examples
|
// Show example of numbering module
|
||||||
print '<td nowrap="nowrap">'.$module->getExample()."</td>\n";
|
print '<td nowrap="nowrap">';
|
||||||
|
$tmp=$module->getExample();
|
||||||
|
if (preg_match('/^Error/',$tmp)) print $langs->trans($tmp);
|
||||||
|
else print $tmp;
|
||||||
|
print '</td>'."\n";
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if ($conf->global->PROPALE_ADDON == "$file")
|
if ($conf->global->PROPALE_ADDON == "$file")
|
||||||
@ -348,7 +352,7 @@ foreach ($conf->file->dol_document_root as $dirroot)
|
|||||||
if (is_dir($dir))
|
if (is_dir($dir))
|
||||||
{
|
{
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
$handle=opendir($dir);
|
$handle=opendir($dir);
|
||||||
if (is_resource($handle))
|
if (is_resource($handle))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -259,8 +259,12 @@ foreach ($arrayhandler as $key => $module)
|
|||||||
print $langs->trans("MinLength").': '.$module->length;
|
print $langs->trans("MinLength").': '.$module->length;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Affiche example
|
// Show example of numbering module
|
||||||
print '<td width="60">'.$module->getExample().'</td>';
|
print '<td nowrap="nowrap">';
|
||||||
|
$tmp=$module->getExample();
|
||||||
|
if (preg_match('/^Error/',$tmp)) print $langs->trans($tmp);
|
||||||
|
else print $tmp;
|
||||||
|
print '</td>'."\n";
|
||||||
|
|
||||||
print '<td width="100" align="center">';
|
print '<td width="100" align="center">';
|
||||||
if ($conf->global->USER_PASSWORD_GENERATED == $key)
|
if ($conf->global->USER_PASSWORD_GENERATED == $key)
|
||||||
|
|||||||
@ -74,4 +74,7 @@ WarningNoDocumentModelActivated=No model, for document generation, has been acti
|
|||||||
ErrorDatabaseParameterWrong=Database setup parameter '<b>%s</b>' has a value not compatible to use Dolibarr (must have value '<b>%s</b>').
|
ErrorDatabaseParameterWrong=Database setup parameter '<b>%s</b>' has a value not compatible to use Dolibarr (must have value '<b>%s</b>').
|
||||||
ErrorNumRefModel=A reference exists into database (%s) and is not compatible with this numbering rule. Remove record or renamed reference to activate this module.
|
ErrorNumRefModel=A reference exists into database (%s) and is not compatible with this numbering rule. Remove record or renamed reference to activate this module.
|
||||||
ErrorQtyTooLowForThisSupplier=Quantity too low for this supplier or no price defined on this product for this supplier
|
ErrorQtyTooLowForThisSupplier=Quantity too low for this supplier or no price defined on this product for this supplier
|
||||||
ErrorModuleSetupNotComplete=Setup of module looks to be uncomplete. Go on Setup - Modules to complete.
|
ErrorModuleSetupNotComplete=Setup of module looks to be uncomplete. Go on Setup - Modules to complete.
|
||||||
|
ErrorBadMask=Error on mask
|
||||||
|
ErrorBadMaskFailedToLocatePosOfSequence=Error, mask without sequence number
|
||||||
|
ErrorBadMaskBadRazMonth=Erreur, bad reset value
|
||||||
Loading…
Reference in New Issue
Block a user