Merge pull request #8740 from grandoc/new_branch_04_05_2018
Clean and update code
This commit is contained in:
commit
95bd249ec6
@ -163,8 +163,6 @@ if ($action == 'edit')
|
|||||||
clearstatcache();
|
clearstatcache();
|
||||||
|
|
||||||
// Gestionnaires de menu
|
// Gestionnaires de menu
|
||||||
$var=true;
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Menu").'</td>';
|
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Menu").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -176,7 +174,6 @@ if ($action == 'edit')
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Menu top
|
// Menu top
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("DefaultMenuManager").'</td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("DefaultMenuManager").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$formadmin->select_menu(empty($conf->global->MAIN_MENU_STANDARD_FORCED)?$conf->global->MAIN_MENU_STANDARD:$conf->global->MAIN_MENU_STANDARD_FORCED, 'MAIN_MENU_STANDARD', $dirstandard, empty($conf->global->MAIN_MENU_STANDARD_FORCED)?'':' disabled');
|
$formadmin->select_menu(empty($conf->global->MAIN_MENU_STANDARD_FORCED)?$conf->global->MAIN_MENU_STANDARD:$conf->global->MAIN_MENU_STANDARD_FORCED, 'MAIN_MENU_STANDARD', $dirstandard, empty($conf->global->MAIN_MENU_STANDARD_FORCED)?'':' disabled');
|
||||||
@ -187,7 +184,6 @@ if ($action == 'edit')
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Menu smartphone
|
// Menu smartphone
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("DefaultMenuSmartphoneManager").'</td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("DefaultMenuSmartphoneManager").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$formadmin->select_menu(empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?$conf->global->MAIN_MENU_SMARTPHONE:$conf->global->MAIN_MENU_SMARTPHONE_FORCED, 'MAIN_MENU_SMARTPHONE', array_merge($dirstandard,$dirsmartphone), empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?'':' disabled');
|
$formadmin->select_menu(empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?$conf->global->MAIN_MENU_SMARTPHONE:$conf->global->MAIN_MENU_SMARTPHONE_FORCED, 'MAIN_MENU_SMARTPHONE', array_merge($dirstandard,$dirsmartphone), empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?'':' disabled');
|
||||||
@ -202,8 +198,6 @@ if ($action == 'edit')
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Gestionnaires de menu
|
// Gestionnaires de menu
|
||||||
$var=true;
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Menu").'</td>';
|
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Menu").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -267,7 +261,6 @@ if ($action == 'edit')
|
|||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($action != 'edit')
|
if ($action != 'edit')
|
||||||
{
|
{
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|||||||
@ -26,10 +26,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||||
|
|
||||||
$langs->load("admin");
|
// Load traductions files requiredby by page
|
||||||
$langs->load("errors");
|
$langs->loadLangs(array("admin", "other", "errors", "bills"));
|
||||||
$langs->load('other');
|
|
||||||
$langs->load('bills');
|
|
||||||
|
|
||||||
if (! $user->admin) accessforbidden();
|
if (! $user->admin) accessforbidden();
|
||||||
|
|
||||||
@ -131,8 +129,6 @@ foreach ($dirmodels as $reldir)
|
|||||||
$handle = opendir($dir);
|
$handle = opendir($dir);
|
||||||
if (is_resource($handle))
|
if (is_resource($handle))
|
||||||
{
|
{
|
||||||
$var=true;
|
|
||||||
|
|
||||||
while (($file = readdir($handle))!==false)
|
while (($file = readdir($handle))!==false)
|
||||||
{
|
{
|
||||||
if (! is_dir($dir.$file) || (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS'))
|
if (! is_dir($dir.$file) || (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS'))
|
||||||
@ -249,7 +245,6 @@ print '<td width="80"> </td>';
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Allow payments on different thirdparties bills but same parent company
|
// Allow payments on different thirdparties bills but same parent company
|
||||||
$var=! $var;
|
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $langs->trans("PaymentOnDifferentThirdBills");
|
print $langs->trans("PaymentOnDifferentThirdBills");
|
||||||
print '</td><td width="60" align="center">';
|
print '</td><td width="60" align="center">';
|
||||||
|
|||||||
@ -274,7 +274,6 @@ print "</tr>\n";
|
|||||||
|
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
|
|
||||||
$var=true;
|
|
||||||
foreach ($dirmodels as $reldir)
|
foreach ($dirmodels as $reldir)
|
||||||
{
|
{
|
||||||
foreach (array('','/doc') as $valdir)
|
foreach (array('','/doc') as $valdir)
|
||||||
|
|||||||
@ -33,10 +33,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.'/core/lib/pdf.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php';
|
||||||
$langs->load("admin");
|
|
||||||
$langs->load("errors");
|
// Load traductions files requiredby by page
|
||||||
$langs->load('other');
|
$langs->loadLangs(array("admin", "other", "errors", "propal"));
|
||||||
$langs->load('propal');
|
|
||||||
|
|
||||||
if (! $user->admin) accessforbidden();
|
if (! $user->admin) accessforbidden();
|
||||||
|
|
||||||
@ -266,8 +265,6 @@ foreach ($dirmodels as $reldir)
|
|||||||
$handle = opendir($dir);
|
$handle = opendir($dir);
|
||||||
if (is_resource($handle))
|
if (is_resource($handle))
|
||||||
{
|
{
|
||||||
$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')
|
||||||
@ -386,7 +383,6 @@ print "</tr>\n";
|
|||||||
|
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
|
|
||||||
$var=true;
|
|
||||||
foreach ($dirmodels as $reldir)
|
foreach ($dirmodels as $reldir)
|
||||||
{
|
{
|
||||||
foreach (array('','/doc') as $valdir)
|
foreach (array('','/doc') as $valdir)
|
||||||
@ -531,7 +527,6 @@ print '</tr>';
|
|||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
$var=! $var;
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="setusecustomercontactasrecipient">';
|
print '<input type="hidden" name="action" value="setusecustomercontactasrecipient">';
|
||||||
@ -631,7 +626,7 @@ print "<tr class=\"liste_titre\">\n";
|
|||||||
print " <td>".$langs->trans("Name")."</td>\n";
|
print " <td>".$langs->trans("Name")."</td>\n";
|
||||||
print " <td>".$langs->trans("Value")."</td>\n";
|
print " <td>".$langs->trans("Value")."</td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
print "<tr ".$bc[false].">\n <td width=\"140\">".$langs->trans("PathDirectory")."</td>\n <td>".$conf->propal->multidir_output[$conf->entity]."</td>\n</tr>\n";
|
print "<tr class=\"oddeven\">\n <td width=\"140\">".$langs->trans("PathDirectory")."</td>\n <td>".$conf->propal->multidir_output[$conf->entity]."</td>\n</tr>\n";
|
||||||
print "</table>\n<br>";
|
print "</table>\n<br>";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -26,10 +26,8 @@ require '../main.inc.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||||
|
|
||||||
$langs->load("users");
|
// Load traductions files requiredby by page
|
||||||
$langs->load("admin");
|
$langs->loadLangs(array("other", "users", "admin"));
|
||||||
$langs->load("other");
|
|
||||||
|
|
||||||
|
|
||||||
if (!$user->admin) accessforbidden();
|
if (!$user->admin) accessforbidden();
|
||||||
|
|
||||||
@ -124,7 +122,6 @@ if ($conf->use_javascript_ajax)
|
|||||||
|
|
||||||
|
|
||||||
// Timeout
|
// Timeout
|
||||||
$var=true;
|
|
||||||
|
|
||||||
print '<table width="100%" class="noborder">';
|
print '<table width="100%" class="noborder">';
|
||||||
|
|
||||||
@ -163,7 +160,7 @@ print '</td>';
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|
||||||
print '<tr '.$bcdd[$var].'>';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("MAIN_PROXY_HOST").'</td><td align="right">';
|
print '<td>'.$langs->trans("MAIN_PROXY_HOST").'</td><td align="right">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
@ -172,7 +169,7 @@ print '</td>';
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|
||||||
print '<tr '.$bcdd[$var].'>';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("MAIN_PROXY_PORT").'</td><td align="right">';
|
print '<td>'.$langs->trans("MAIN_PROXY_PORT").'</td><td align="right">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
@ -181,7 +178,7 @@ print '</td>';
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|
||||||
print '<tr '.$bcdd[$var].'>';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("MAIN_PROXY_USER").'</td><td align="right">';
|
print '<td>'.$langs->trans("MAIN_PROXY_USER").'</td><td align="right">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
@ -190,7 +187,7 @@ print '</td>';
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|
||||||
print '<tr '.$bcdd[$var].'>';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("MAIN_PROXY_PASS").'</td><td align="right">';
|
print '<td>'.$langs->trans("MAIN_PROXY_PASS").'</td><td align="right">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user