Correction bug #13892
This commit is contained in:
parent
ec9c73a677
commit
cb71f4ab9a
@ -51,16 +51,11 @@ if ($_GET["action"] == 'set')
|
|||||||
$classname = 'methode_expedition_'.$_GET["value"];
|
$classname = 'methode_expedition_'.$_GET["value"];
|
||||||
require_once($file);
|
require_once($file);
|
||||||
|
|
||||||
$obj = new $classname();
|
$obj = new $classname($db);
|
||||||
|
|
||||||
// Mise a jour statut
|
$obj->Active($_GET["statut"]);
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."expedition_methode set status='".$_GET["statut"]."'";
|
|
||||||
$sql.= " WHERE rowid = ".$obj->id;
|
|
||||||
print "$sql";
|
|
||||||
exit;
|
|
||||||
|
|
||||||
Header("Location: expedition.php");
|
Header("Location: expedition.php");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_GET["action"] == 'setpdf')
|
if ($_GET["action"] == 'setpdf')
|
||||||
@ -130,17 +125,17 @@ if ($_GET["action"] == 'setdef')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."expedition_methode WHERE statut = 1";
|
||||||
|
$db->fetch_all_rows($sql, $mods);
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
|
|
||||||
$dir = DOL_DOCUMENT_ROOT."/expedition/mods/";
|
$dir = DOL_DOCUMENT_ROOT."/expedition/mods/";
|
||||||
|
|
||||||
|
|
||||||
// Méthode de livraison
|
// Méthode de livraison
|
||||||
|
|
||||||
print_titre($langs->trans("SendingsSetup"));
|
print_titre($langs->trans("SendingsSetup"));
|
||||||
@ -152,7 +147,8 @@ print_titre($langs->trans("SendingMethod"));
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td width="140">'.$langs->trans("Name").'</td><td>'.$langs->trans("Description").'</td>';
|
print '<td width="140">'.$langs->trans("Name").'</td><td>'.$langs->trans("Description").'</td>';
|
||||||
print '<td align="center" colspan="2">'.$langs->trans("Active").'</td>';
|
print '<td align="center"> </td>';
|
||||||
|
print '<td align="center">'.$langs->trans("Active").'</td>';
|
||||||
print '<td align="center">'.$langs->trans("Default").'</td>';
|
print '<td align="center">'.$langs->trans("Default").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -180,11 +176,18 @@ if(is_dir($dir)) {
|
|||||||
|
|
||||||
print '</td><td align="center">';
|
print '</td><td align="center">';
|
||||||
|
|
||||||
|
if (in_array($obj->id, $mods))
|
||||||
|
{
|
||||||
|
print img_tick();
|
||||||
|
print '</td><td align="center">';
|
||||||
|
print '<a href="expedition.php?action=set&statut=0&value='.$name.'">'.$langs->trans("Disable").'</a>';
|
||||||
|
|
||||||
print " ";
|
}
|
||||||
print "</td><td>\n";
|
else
|
||||||
|
{
|
||||||
|
print ' </td><td align="center">';
|
||||||
print '<a href="expedition.php?action=set&statut=1&value='.$name.'">'.$langs->trans("Activate").'</a>';
|
print '<a href="expedition.php?action=set&statut=1&value='.$name.'">'.$langs->trans("Activate").'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -199,7 +202,6 @@ if(is_dir($dir)) {
|
|||||||
print '<a href="expedition.php?action=setdef&value='.$name.'">'.$langs->trans("Default").'</a>';
|
print '<a href="expedition.php?action=setdef&value='.$name.'">'.$langs->trans("Default").'</a>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user