clean and update code
This commit is contained in:
parent
bcf5c5d78a
commit
9e9d52a662
@ -148,7 +148,6 @@ print "<br>\n";
|
||||
$selectedvalue=$conf->global->AGENDA_DISABLE_EXT;
|
||||
if ($selectedvalue==1) $selectedvalue=0; else $selectedvalue=1;
|
||||
|
||||
$var=true;
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print "<tr class=\"liste_titre\">";
|
||||
@ -202,7 +201,6 @@ print '<td align="right">'.$langs->trans("Color").'</td>';
|
||||
print "</tr>";
|
||||
|
||||
$i=1;
|
||||
$var=true;
|
||||
while ($i <= $MAXAGENDA)
|
||||
{
|
||||
$key=$i;
|
||||
|
||||
@ -157,7 +157,6 @@ foreach($dirbarcode as $reldir)
|
||||
/*
|
||||
* CHOIX ENCODAGE
|
||||
*/
|
||||
$var=true;
|
||||
|
||||
print '<br>';
|
||||
print load_fiche_titre($langs->trans("BarcodeEncodeModule"),'','');
|
||||
@ -185,7 +184,6 @@ if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$var=true;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
@ -277,7 +275,6 @@ print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"update\">";
|
||||
|
||||
$var=true;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013-2014 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2013-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -31,11 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("companies");
|
||||
$langs->load("bills");
|
||||
$langs->load("other");
|
||||
$langs->load("banks");
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("admin","companies","bills","other","banks"));
|
||||
|
||||
if (!$user->admin)
|
||||
accessforbidden();
|
||||
@ -133,8 +130,6 @@ foreach ($dirmodels as $reldir)
|
||||
$handle = opendir($dir);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
$var=true;
|
||||
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (! is_dir($dir.$file) || (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS'))
|
||||
@ -166,7 +161,6 @@ foreach ($dirmodels as $reldir)
|
||||
|
||||
if ($module->isEnabled())
|
||||
{
|
||||
$var = !$var;
|
||||
print '<tr class="oddeven"><td width="100">';
|
||||
print (empty($module->name)?$name:$module->name);
|
||||
print "</td><td>\n";
|
||||
@ -254,9 +248,6 @@ print '<td>'.$langs->trans("Parameters").'</td>';
|
||||
print '<td align="center" width="60"> </td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
$var=true;
|
||||
|
||||
$var=! $var;
|
||||
|
||||
$substitutionarray=pdf_getSubstitutionArray($langs, null, null, 2);
|
||||
$substitutionarray['__(AnyTranslationKey)__']=$langs->trans("Translation");
|
||||
|
||||
@ -72,8 +72,6 @@ print '<form method="post" action="clicktodial.php">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="setvalue">';
|
||||
|
||||
$var=true;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Name").'</td>';
|
||||
|
||||
@ -286,7 +286,6 @@ foreach ($dirmodels as $reldir)
|
||||
$handle = opendir($dir);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
$var=true;
|
||||
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
@ -406,7 +405,6 @@ print "</tr>\n";
|
||||
|
||||
clearstatcache();
|
||||
|
||||
$var=true;
|
||||
foreach ($dirmodels as $reldir)
|
||||
{
|
||||
foreach (array('','/doc') as $valdir)
|
||||
@ -537,7 +535,6 @@ print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Value").'</td>';
|
||||
print "<td> </td>\n";
|
||||
print "</tr>\n";
|
||||
$var=true;
|
||||
|
||||
$substitutionarray=pdf_getSubstitutionArray($langs, null, null, 2);
|
||||
$substitutionarray['__(AnyTranslationKey)__']=$langs->trans("Translation");
|
||||
@ -545,7 +542,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_ORDER_FREE_TEXT">';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2015 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
|
||||
@ -28,9 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/contract.lib.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("errors");
|
||||
$langs->load("contracts");
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("admin","errors","contracts"));
|
||||
|
||||
if (!$user->admin) accessforbidden();
|
||||
|
||||
@ -220,7 +219,6 @@ foreach ($dirmodels as $reldir)
|
||||
$handle = opendir($dir);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
$var=true;
|
||||
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
@ -339,7 +337,6 @@ print "</tr>\n";
|
||||
|
||||
clearstatcache();
|
||||
|
||||
$var=true;
|
||||
foreach ($dirmodels as $reldir)
|
||||
{
|
||||
foreach (array('','/doc') as $valdir)
|
||||
@ -377,7 +374,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";
|
||||
@ -472,7 +468,6 @@ print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Value").'</td>';
|
||||
print "</tr>\n";
|
||||
$var=true;
|
||||
|
||||
$substitutionarray=pdf_getSubstitutionArray($langs, array('objectamount'), null, 2);
|
||||
$substitutionarray['__(AnyTranslationKey)__']=$langs->trans("Translation");
|
||||
@ -480,7 +475,6 @@ $htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
|
||||
foreach($substitutionarray as $key => $val) $htmltext.=$key.'<br>';
|
||||
$htmltext.='</i>';
|
||||
|
||||
$var=! $var;
|
||||
print '<tr class="oddeven"><td colspan="2">';
|
||||
print $form->textwithpicto($langs->trans("FreeLegalTextOnContracts"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'tooltiphelp');
|
||||
print '<br>';
|
||||
|
||||
@ -144,7 +144,7 @@ if ($action == 'update')
|
||||
$plus='';
|
||||
if(!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) $plus = '_PERCENTAGE';
|
||||
// Update values
|
||||
for($i=0;$i<4;$i++) {
|
||||
for($i=0; $i<4; $i++) {
|
||||
if(isset($_POST['MAIN_METEO'.$plus.'_LEVEL'.$i])) dolibarr_set_const($db, 'MAIN_METEO'.$plus.'_LEVEL'.$i, GETPOST('MAIN_METEO'.$plus.'_LEVEL'.$i, 'int'),'chaine',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
@ -172,7 +172,6 @@ if ($action == 'edit')
|
||||
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'" name="form_index">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
$var=true;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("DelaysOfToleranceBeforeWarning").'</td><td class="center" width="120px">'.$langs->trans("Value").'</td></tr>';
|
||||
@ -215,7 +214,6 @@ else
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("DelaysOfToleranceBeforeWarning").'</td><td class="center" width="120px">'.$langs->trans("Value").'</td></tr>';
|
||||
$var=true;
|
||||
|
||||
foreach($modules as $module => $delays)
|
||||
{
|
||||
@ -241,7 +239,6 @@ else
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td class="center" width="120px">'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
$var=false;
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("MAIN_DISABLE_METEO").'</td><td class="center">' . yn($conf->global->MAIN_DISABLE_METEO) . '</td></tr>';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user