Trad: Traductions manquantes
This commit is contained in:
parent
ebd68fdd59
commit
abf514487a
@ -104,9 +104,9 @@ if ($_GET["action"] == 'edit')
|
|||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr class="pair"><td width="50%">Longueur maximum des listes</td><td><input name="size_liste_limit" size="20" value="' . SIZE_LISTE_LIMIT . '"></td></tr>';
|
print '<tr class="pair"><td width="50%">'.$langs->trans("MaxSizeList").'</td><td><input name="size_liste_limit" size="20" value="' . SIZE_LISTE_LIMIT . '"></td></tr>';
|
||||||
|
|
||||||
print '<tr class="impair"><td width="50%">Gestionnaire du menu du haut</td>';
|
print '<tr class="impair"><td width="50%">'.$langs->trans("MenuTopManager").'</td>';
|
||||||
print '<td><select name="main_menu_barretop">';
|
print '<td><select name="main_menu_barretop">';
|
||||||
$dir = "../includes/menus/barre_top/";
|
$dir = "../includes/menus/barre_top/";
|
||||||
$handle=opendir($dir);
|
$handle=opendir($dir);
|
||||||
@ -178,7 +178,7 @@ else
|
|||||||
$var=True;
|
$var=True;
|
||||||
foreach ($searchform as $key => $value) {
|
foreach ($searchform as $key => $value) {
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'"><td>'.$searchformtitle[$key].'</td><td>' . ($searchformconst[$key]?"oui":"non") . '</td></tr>';
|
print '<tr '.$bc[$var].'"><td>'.$searchformtitle[$key].'</td><td>' . ($searchformconst[$key]?$langs->trans("yes"):$langs->trans("no")) . '</td></tr>';
|
||||||
}
|
}
|
||||||
print '</table><br>';
|
print '</table><br>';
|
||||||
|
|
||||||
|
|||||||
@ -22,15 +22,16 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\file htdocs/admin/modules.php
|
\file htdocs/admin/modules.php
|
||||||
\brief Page de configuration et activation des modules
|
\brief Page de configuration et activation des modules
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
|
|
||||||
if (!$user->admin)
|
if (!$user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// TODO mettre cette section dans la base de données
|
// TODO mettre cette section dans la base de données
|
||||||
@ -38,92 +39,87 @@ if (!$user->admin)
|
|||||||
|
|
||||||
if ($_GET["action"] == 'set' && $user->admin)
|
if ($_GET["action"] == 'set' && $user->admin)
|
||||||
{
|
{
|
||||||
Activate($_GET["value"]);
|
Activate($_GET["value"]);
|
||||||
|
|
||||||
Header("Location: modules.php?spe=".$_GET["spe"]);
|
Header("Location: modules.php?spe=".$_GET["spe"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_GET["action"] == 'reset' && $user->admin)
|
if ($_GET["action"] == 'reset' && $user->admin)
|
||||||
{
|
{
|
||||||
UnActivate($_GET["value"]);
|
UnActivate($_GET["value"]);
|
||||||
|
|
||||||
Header("Location: modules.php?spe=".$_GET["spe"]);
|
Header("Location: modules.php?spe=".$_GET["spe"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function Activate($value)
|
function Activate($value)
|
||||||
{
|
{
|
||||||
global $db, $modules;
|
global $db, $modules;
|
||||||
|
|
||||||
$modName = $value;
|
$modName = $value;
|
||||||
|
|
||||||
// Activation du module
|
// Activation du module
|
||||||
if ($modName)
|
if ($modName)
|
||||||
{
|
{
|
||||||
$file = $modName . ".class.php";
|
$file = $modName . ".class.php";
|
||||||
include_once("../includes/modules/$file");
|
include_once("../includes/modules/$file");
|
||||||
$objMod = new $modName($db);
|
$objMod = new $modName($db);
|
||||||
$objMod->init();
|
$objMod->init();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Activation des modules dont le module dépend
|
// Activation des modules dont le module dépend
|
||||||
for ($i = 0; $i < sizeof($objMod->depends); $i++)
|
for ($i = 0; $i < sizeof($objMod->depends); $i++)
|
||||||
{
|
{
|
||||||
Activate($objMod->depends[$i]);
|
Activate($objMod->depends[$i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function UnActivate($value)
|
function UnActivate($value)
|
||||||
{
|
{
|
||||||
global $db, $modules;
|
global $db, $modules;
|
||||||
|
|
||||||
$modName = $value;
|
$modName = $value;
|
||||||
|
|
||||||
// Desactivation du module
|
// Desactivation du module
|
||||||
if ($modName)
|
if ($modName)
|
||||||
{
|
{
|
||||||
$file = $modName . ".class.php";
|
$file = $modName . ".class.php";
|
||||||
include_once("../includes/modules/$file");
|
include_once("../includes/modules/$file");
|
||||||
$objMod = new $modName($db);
|
$objMod = new $modName($db);
|
||||||
$objMod->remove();
|
$objMod->remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Desactivation des modules qui dependent de lui
|
// Desactivation des modules qui dependent de lui
|
||||||
for ($i = 0; $i < sizeof($objMod->requiredby); $i++)
|
for ($i = 0; $i < sizeof($objMod->requiredby); $i++)
|
||||||
{
|
{
|
||||||
UnActivate($objMod->requiredby[$i]);
|
UnActivate($objMod->requiredby[$i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Header("Location: modules.php");
|
Header("Location: modules.php");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
if (!$user->admin)
|
|
||||||
{
|
|
||||||
print "Forbidden";
|
|
||||||
llxfooter();
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$_GET["spe"])
|
if (!$_GET["spe"])
|
||||||
{
|
{
|
||||||
print_titre($langs->trans("Modules"));
|
print_titre($langs->trans("ModulesCommon"));
|
||||||
print "<br>".$langs->trans("ModulesDesc")."<br>\n";
|
print "<br>".$langs->trans("ModulesDesc")."<br>\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print_titre($langs->trans("Modules Speciaux"));
|
print_titre($langs->trans("ModulesSpecial"));
|
||||||
|
print "<br>".$langs->trans("ModulesSpecialDesc")."<br>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<table class="noborder" cellpadding="3" cellspacing="0">';
|
print '<table class="noborder">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Family").'</td>';
|
print '<td>'.$langs->trans("Family").'</td>';
|
||||||
print '<td>'.$langs->trans("Module").'</td>';
|
print '<td>'.$langs->trans("Module").'</td>';
|
||||||
@ -142,30 +138,29 @@ $i = 0;
|
|||||||
$j = 0;
|
$j = 0;
|
||||||
while (($file = readdir($handle))!==false)
|
while (($file = readdir($handle))!==false)
|
||||||
{
|
{
|
||||||
if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, strlen($file) - 10) == '.class.php')
|
if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, strlen($file) - 10) == '.class.php')
|
||||||
{
|
{
|
||||||
$modName = substr($file, 0, strlen($file) - 10);
|
$modName = substr($file, 0, strlen($file) - 10);
|
||||||
|
|
||||||
if ($modName)
|
if ($modName)
|
||||||
{
|
{
|
||||||
include_once("../includes/modules/$file");
|
include_once("../includes/modules/$file");
|
||||||
$objMod = new $modName($db);
|
$objMod = new $modName($db);
|
||||||
|
|
||||||
if ($objMod->numero > 0)
|
if ($objMod->numero > 0)
|
||||||
{
|
{
|
||||||
$j = $objMod->numero;
|
$j = $objMod->numero;
|
||||||
// $modules[$objMod->numero] = $modName;
|
}
|
||||||
}
|
else
|
||||||
else
|
{
|
||||||
{
|
$j = 1000 + $i;
|
||||||
$j = 1000 + $i;
|
}
|
||||||
}
|
$modules[$i] = $modName;
|
||||||
$modules[$i] = $modName;
|
$numero[$i] = $j;
|
||||||
$numero[$i] = $j;
|
$orders[$i] = "$objMod->family"."_".$j; // Tri par famille puis numero module
|
||||||
$orders[$i] = "$objMod->family"."_".$j; // Tri par famille puis numero module
|
$j++;
|
||||||
$j++;
|
$i++;
|
||||||
$i++;
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,89 +179,98 @@ $familylib=array(
|
|||||||
);
|
);
|
||||||
foreach ($orders as $key => $value)
|
foreach ($orders as $key => $value)
|
||||||
{
|
{
|
||||||
$tab=split('_',$value);
|
$tab=split('_',$value);
|
||||||
$family=$tab[0]; $numero=$tab[1];
|
$family=$tab[0]; $numero=$tab[1];
|
||||||
|
|
||||||
$var=!$var;
|
$modName = $modules[$key];
|
||||||
$modName = $modules[$key];
|
if ($modName)
|
||||||
if ($modName)
|
|
||||||
{
|
{
|
||||||
$objMod = new $modName($db);
|
$objMod = new $modName($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
$const_name = $objMod->const_name;
|
$const_name = $objMod->const_name;
|
||||||
$const_value = $objMod->const_config;
|
$const_value = $objMod->const_config;
|
||||||
|
|
||||||
if ($oldfamily && $family!=$oldfamily) { print '<tr class="liste_titre"><td colspan="6"></td></tr>'; }
|
if ($oldfamily && $family!=$oldfamily && $atleastoneforfamily) {
|
||||||
|
print '<tr class="liste_titre"><td colspan="6"></td></tr>';
|
||||||
if((!$objMod->special && !$_GET["spe"] ) or ($objMod->special && $_GET["spe"]))
|
$atleastoneforfamily=0;
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
print "<tr $bc[$var]>";
|
|
||||||
|
|
||||||
print "<td class='body'>";
|
|
||||||
if ($family!=$oldfamily) { print '<div class="titre">'.$familylib[$family].'</td>'; $oldfamily=$family; }
|
|
||||||
else { print ' '; }
|
|
||||||
print "</td>";
|
|
||||||
print "<td>";
|
|
||||||
print $objMod->name;
|
|
||||||
print "</td><td>\n";
|
|
||||||
print $objMod->description;
|
|
||||||
print '</td><td align="center">';
|
|
||||||
|
|
||||||
if ($const_value == 1)
|
|
||||||
{
|
|
||||||
print '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/tick.png" border="0"></a>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print " ";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</td><td align="center">';
|
if((!$objMod->special && !$_GET["spe"] ) or ($objMod->special && $_GET["spe"]))
|
||||||
|
|
||||||
|
|
||||||
if ($const_value == 1)
|
|
||||||
{
|
{
|
||||||
print '<a href="modules.php?action=reset&value='.$modName.'&spe='.$_GET["spe"].'">'.$langs->trans("Disable").'</a></td>';
|
$atleastoneforfamily=1;
|
||||||
|
$var=!$var;
|
||||||
|
|
||||||
|
print "<tr $bc[$var]>";
|
||||||
|
|
||||||
|
print "<td class='body'>";
|
||||||
|
if ($family!=$oldfamily) { print '<div class="titre">'.$familylib[$family].'</div></td>'; $oldfamily=$family; }
|
||||||
|
else { print ' '; }
|
||||||
|
print "</td>";
|
||||||
|
print "<td>";
|
||||||
|
print $objMod->name;
|
||||||
|
print "</td><td>\n";
|
||||||
|
print $objMod->description;
|
||||||
|
print '</td><td align="center">';
|
||||||
|
|
||||||
|
if ($const_value == 1)
|
||||||
|
{
|
||||||
|
print '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/tick.png" border="0"></a>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print " ";
|
||||||
|
}
|
||||||
|
|
||||||
|
print '</td><td align="center">';
|
||||||
|
|
||||||
|
|
||||||
if ($objMod->config_page_url)
|
if ($const_value == 1)
|
||||||
{
|
{
|
||||||
if (is_array($objMod->config_page_url)) {
|
print '<a href="modules.php?action=reset&value='.$modName.'&spe='.$_GET["spe"].'">'.$langs->trans("Disable").'</a></td>';
|
||||||
print '<td>';
|
|
||||||
$i=0;
|
|
||||||
foreach ($objMod->config_page_url as $page) {
|
|
||||||
if ($i++) { print '<a href="'.$page.'">'.ucfirst($page).'</a> '; }
|
|
||||||
else { print '<a href="'.$page.'">'.$langs->trans("Setup").'</a> '; }
|
|
||||||
}
|
|
||||||
print '</td>';
|
|
||||||
} else {
|
|
||||||
print '<td><a href="'.$objMod->config_page_url.'">'.$langs->trans("Setup").'</a></td>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print "<td> </td>";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<a href="modules.php?action=set&value='.$modName.'&spe='.$_GET["spe"].'">'.$langs->trans("Activate").'</a></td><td> </td>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '</tr>';
|
if ($objMod->config_page_url)
|
||||||
|
{
|
||||||
|
if (is_array($objMod->config_page_url)) {
|
||||||
|
print '<td>';
|
||||||
|
$i=0;
|
||||||
|
foreach ($objMod->config_page_url as $page) {
|
||||||
|
if ($i++) { print '<a href="'.$page.'">'.ucfirst($page).'</a> '; }
|
||||||
|
else { print '<a href="'.$page.'">'.$langs->trans("Setup").'</a> '; }
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
} else {
|
||||||
|
print '<td><a href="'.$objMod->config_page_url.'">'.$langs->trans("Setup").'</a></td>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print "<td> </td>";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<a href="modules.php?action=set&value='.$modName.'&spe='.$_GET["spe"].'">'.$langs->trans("Activate").'</a></td><td> </td>';
|
||||||
|
}
|
||||||
|
|
||||||
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
if(!$_GET["spe"] )
|
|
||||||
|
if ($_GET["spe"])
|
||||||
{
|
{
|
||||||
print '<br><a href="./modules.php?spe=1">Modules spéciaux</a>';
|
print '<br><a href="./modules.php?spe=0">'.$langs->trans("ModulesCommon").'</a>';
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<br><a href="./modules.php?spe=1">'.$langs->trans("ModulesSpecial").'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user