clean and update code
This commit is contained in:
parent
e5d8dec2f9
commit
edbe32ea0c
@ -32,9 +32,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/mailmanspip.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("members");
|
||||
$langs->load("mailmanspip");
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("admin", "members", "mailmanspip"));
|
||||
|
||||
if (! $user->admin) accessforbidden();
|
||||
|
||||
@ -118,8 +117,6 @@ print load_fiche_titre($langs->trans("MailmanSpipSetup"),$linkback,'title_setup'
|
||||
$head = mailmanspip_admin_prepare_head();
|
||||
|
||||
|
||||
$var=true;
|
||||
|
||||
/*
|
||||
* Spip
|
||||
*/
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2008-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013-2017 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2013-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -28,8 +28,8 @@
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("stocks");
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("admin", "stocks"));
|
||||
|
||||
// Securit check
|
||||
if (!$user->admin) accessforbidden();
|
||||
@ -162,11 +162,9 @@ print '<tr class="liste_titre">';
|
||||
print " <td>".$langs->trans("RuleForStockManagementDecrease")."</td>\n";
|
||||
print " <td align=\"right\" width=\"160\"> </td>\n";
|
||||
print '</tr>'."\n";
|
||||
$var=true;
|
||||
|
||||
$found=0;
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("DeStockOnBill").'</td>';
|
||||
print '<td align="right">';
|
||||
@ -266,11 +264,9 @@ print '<tr class="liste_titre">';
|
||||
print " <td>".$langs->trans("RuleForStockManagementIncrease")."</td>\n";
|
||||
print " <td align=\"right\" width=\"160\"> </td>\n";
|
||||
print '</tr>'."\n";
|
||||
$var=true;
|
||||
|
||||
$found=0;
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("ReStockOnBill").'</td>';
|
||||
print '<td align="right">';
|
||||
@ -362,8 +358,8 @@ print "</td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
// Option to force stock to be enough before adding a line into document
|
||||
if($conf->invoice->enabled) {
|
||||
$var = !$var;
|
||||
if($conf->invoice->enabled)
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("StockMustBeEnoughForInvoice").'</td>';
|
||||
print '<td align="right">';
|
||||
@ -377,8 +373,8 @@ if($conf->invoice->enabled) {
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
if($conf->order->enabled) {
|
||||
$var = !$var;
|
||||
if($conf->order->enabled)
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("StockMustBeEnoughForOrder").'</td>';
|
||||
print '<td align="right">';
|
||||
@ -392,8 +388,8 @@ if($conf->order->enabled) {
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
if($conf->expedition->enabled) {
|
||||
$var = !$var;
|
||||
if($conf->expedition->enabled)
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("StockMustBeEnoughForShipment").'</td>';
|
||||
print '<td align="right">';
|
||||
@ -408,7 +404,6 @@ if($conf->expedition->enabled) {
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
|
||||
print '<br>';
|
||||
|
||||
$virtualdiffersfromphysical=0;
|
||||
@ -423,7 +418,7 @@ if ($virtualdiffersfromphysical)
|
||||
print " <td>".$langs->trans("RuleForStockReplenishment")." ".img_help('help',$langs->trans("VirtualDiffersFromPhysical"))."</td>\n";
|
||||
print " <td align=\"right\" width=\"160\"> </td>\n";
|
||||
print '</tr>'."\n";
|
||||
$var = !$var;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("UseVirtualStockByDefault").'</td>';
|
||||
print '<td align="right">';
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2017 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -34,9 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("other");
|
||||
$langs->load("orders");
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("admin", "other", "orders"));
|
||||
|
||||
if (!$user->admin)
|
||||
accessforbidden();
|
||||
@ -233,7 +232,6 @@ foreach ($dirmodels as $reldir)
|
||||
$handle = opendir($dir);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
$var=true;
|
||||
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2017 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -34,9 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("other");
|
||||
$langs->load("orders");
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("admin", "other", "orders"));
|
||||
|
||||
if (!$user->admin)
|
||||
accessforbidden();
|
||||
@ -262,7 +261,6 @@ foreach ($dirmodels as $reldir)
|
||||
$handle = opendir($dir);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
$var=true;
|
||||
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
|
||||
@ -27,12 +27,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("errors");
|
||||
$langs->load('other');
|
||||
$langs->load('bills');
|
||||
$langs->load('orders');
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("admin", "errors", "other", "bills", "orders"));
|
||||
|
||||
if (! $user->admin) accessforbidden();
|
||||
|
||||
@ -217,7 +213,6 @@ foreach ($dirmodels as $reldir)
|
||||
$handle = opendir($dir);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
$var=true;
|
||||
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
@ -249,7 +244,6 @@ foreach ($dirmodels as $reldir)
|
||||
|
||||
if ($module->isEnabled())
|
||||
{
|
||||
$var = !$var;
|
||||
print '<tr class="oddeven"><td width="100">';
|
||||
echo preg_replace('/\-.*$/','',preg_replace('/mod_supplier_payment_/','',preg_replace('/\.php$/','',$file)));
|
||||
print "</td><td>\n";
|
||||
@ -360,7 +354,6 @@ foreach ($dirmodels as $reldir)
|
||||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db, new PaiementFourn($db));
|
||||
|
||||
|
||||
print "<tr class=\"oddeven\">\n";
|
||||
print "<td>";
|
||||
print (empty($module->name)?$name:$module->name);
|
||||
|
||||
@ -28,10 +28,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/supplier_proposal.lib.php';
|
||||
$langs->load("admin");
|
||||
$langs->load("errors");
|
||||
$langs->load('other');
|
||||
$langs->load('supplier_proposal');
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("admin", "errors", "other", "supplier_proposal"));
|
||||
|
||||
if (! $user->admin) accessforbidden();
|
||||
|
||||
@ -247,7 +246,6 @@ foreach ($dirmodels as $reldir)
|
||||
$handle = opendir($dir);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
$var=true;
|
||||
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
@ -366,7 +364,6 @@ print "</tr>\n";
|
||||
|
||||
clearstatcache();
|
||||
|
||||
$var=true;
|
||||
foreach ($dirmodels as $reldir)
|
||||
{
|
||||
foreach (array('','/doc') as $valdir)
|
||||
@ -403,7 +400,6 @@ foreach ($dirmodels as $reldir)
|
||||
|
||||
if ($modulequalified)
|
||||
{
|
||||
$var = !$var;
|
||||
print '<tr class="oddeven"><td width="100">';
|
||||
print (empty($module->name)?$name:$module->name);
|
||||
print "</td><td>\n";
|
||||
@ -492,7 +488,6 @@ print '<br>';
|
||||
*/
|
||||
print load_fiche_titre($langs->trans("OtherOptions"),'','');
|
||||
|
||||
$var=true;
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print "<td>".$langs->trans("Parameter")."</td>\n";
|
||||
@ -506,7 +501,6 @@ $htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
|
||||
foreach($substitutionarray as $key => $val) $htmltext.=$key.'<br>';
|
||||
$htmltext.='</i>';
|
||||
|
||||
$var=! $var;
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="set_SUPPLIER_PROPOSAL_FREE_TEXT">';
|
||||
@ -585,7 +579,7 @@ print "<tr class=\"liste_titre\">\n";
|
||||
print " <td>".$langs->trans("Name")."</td>\n";
|
||||
print " <td>".$langs->trans("Value")."</td>\n";
|
||||
print "</tr>\n";
|
||||
print "<tr ".$bc[false].">\n <td width=\"140\">".$langs->trans("PathDirectory")."</td>\n <td>".$conf->supplier_proposal->dir_output."</td>\n</tr>\n";
|
||||
print "<tr class=\"oddeven\">\n <td width=\"140\">".$langs->trans("PathDirectory")."</td>\n <td>".$conf->supplier_proposal->dir_output."</td>\n</tr>\n";
|
||||
print "</table>\n<br>";
|
||||
|
||||
llxFooter();
|
||||
|
||||
@ -279,7 +279,6 @@ print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
print '<td align="right"><input type="submit" class="button" '.$option.' value="'.$langs->trans("Modify").'"></td>';
|
||||
print "</tr>\n";
|
||||
$var=true;
|
||||
|
||||
print '<tr class="oddeven"><td width="140">'.$langs->trans("SyslogLevel").'</td>';
|
||||
print '<td colspan="2"><select class="flat" name="level" '.$option.'>';
|
||||
|
||||
@ -32,9 +32,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("members");
|
||||
$langs->load("users");
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("admin", "members", "users"));
|
||||
|
||||
if (! $user->admin) accessforbidden();
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
@ -165,7 +165,6 @@ print "</tr>\n";
|
||||
|
||||
clearstatcache();
|
||||
|
||||
$var=true;
|
||||
foreach ($dirmodels as $reldir)
|
||||
{
|
||||
foreach (array('','/doc') as $valdir)
|
||||
@ -202,7 +201,6 @@ foreach ($dirmodels as $reldir)
|
||||
|
||||
if ($modulequalified)
|
||||
{
|
||||
$var = !$var;
|
||||
print '<tr class="oddeven"><td width="100">';
|
||||
print (empty($module->name)?$name:$module->name);
|
||||
print "</td><td>\n";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user