mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Fix: warning again and again...
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
@@ -29,10 +29,11 @@ include_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php");
|
||||
|
||||
$langs->load("admin");
|
||||
|
||||
if (!$user->admin) accessforbidden();
|
||||
if (! $user->admin) accessforbidden();
|
||||
|
||||
$rowid = GETPOST('rowid','int');
|
||||
$action = GETPOST('action');
|
||||
$action = GETPOST('action','alpha');
|
||||
$errmesg='';
|
||||
|
||||
// Definition des positions possibles pour les boites
|
||||
$pos_array = array(0); // Positions possibles pour une boite (0,1,2,...)
|
||||
@@ -396,7 +397,7 @@ foreach($boxactivated as $key => $box)
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.img_object("",$logo).' '.$box->boxlabel.'</td>';
|
||||
print '<td>' . ($box->note?$box->note:' ') . '</td>';
|
||||
print '<td align="center">' . $pos_name[$box->position] . '</td>';
|
||||
print '<td align="center">' . (isset($pos_name[$box->position])?$pos_name[$box->position]:'') . '</td>';
|
||||
$hasnext=($key < (count($boxactivated)-1));
|
||||
$hasprevious=($key != 0);
|
||||
print '<td align="center">'.($key+1).'</td>';
|
||||
|
||||
@@ -326,7 +326,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// Barcode
|
||||
if ($conf->barcode->enabled)
|
||||
if (! empty($conf->barcode->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("Gencod").'</td><td>';
|
||||
@@ -340,7 +340,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
print '<table width="100%" class="nocellnopadd"><tr class="nocellnopadd"><td valign="middle" class="nocellnopadd">';
|
||||
print '<input type="file" class="flat" name="logo" size="50">';
|
||||
print '</td><td valign="middle" align="right">';
|
||||
if ($mysoc->logo_mini)
|
||||
if (! empty($mysoc->logo_mini))
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=removelogo">'.img_delete($langs->trans("Delete")).'</a>';
|
||||
if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
|
||||
@@ -359,7 +359,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
// Note
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td valign="top">'.$langs->trans("Note").'</td><td>';
|
||||
print '<textarea class="flat" name="note" cols="80" rows="'.ROWS_5.'">'.$conf->global->MAIN_INFO_SOCIETE_NOTE.'</textarea></td></tr>';
|
||||
print '<textarea class="flat" name="note" cols="80" rows="'.ROWS_5.'">'.(! empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? $conf->global->MAIN_INFO_SOCIETE_NOTE : '').'</textarea></td></tr>';
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
@@ -396,9 +396,9 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId1",$mysoc->country_code).'</td><td>';
|
||||
if ($mysoc->country_code)
|
||||
if (! empty($mysoc->country_code))
|
||||
{
|
||||
print '<input name="siren" size="20" value="' . $conf->global->MAIN_INFO_SIREN . '">';
|
||||
print '<input name="siren" size="20" value="' . (! empty($conf->global->MAIN_INFO_SIREN) ? $conf->global->MAIN_INFO_SIREN : '') . '">';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -412,9 +412,9 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId2",$mysoc->country_code).'</td><td>';
|
||||
if ($mysoc->country_code)
|
||||
if (! empty($mysoc->country_code))
|
||||
{
|
||||
print '<input name="siret" size="20" value="' . $conf->global->MAIN_INFO_SIRET . '">';
|
||||
print '<input name="siret" size="20" value="' . (! empty($conf->global->MAIN_INFO_SIRET) ? $conf->global->MAIN_INFO_SIRET : '' ) . '">';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -428,9 +428,9 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId3",$mysoc->country_code).'</td><td>';
|
||||
if ($mysoc->country_code)
|
||||
if (! empty($mysoc->country_code))
|
||||
{
|
||||
print '<input name="ape" size="20" value="' . $conf->global->MAIN_INFO_APE . '">';
|
||||
print '<input name="ape" size="20" value="' . (! empty($conf->global->MAIN_INFO_APE) ? $conf->global->MAIN_INFO_APE : '') . '">';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -444,9 +444,9 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId4",$mysoc->country_code).'</td><td>';
|
||||
if ($mysoc->country_code)
|
||||
if (! empty($mysoc->country_code))
|
||||
{
|
||||
print '<input name="rcs" size="20" value="' . $conf->global->MAIN_INFO_RCS . '">';
|
||||
print '<input name="rcs" size="20" value="' . (! empty($conf->global->MAIN_INFO_RCS) ? $conf->global->MAIN_INFO_RCS : '') . '">';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -460,9 +460,9 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId5",$mysoc->country_code).'</td><td>';
|
||||
if ($mysoc->country_code)
|
||||
if (! empty($mysoc->country_code))
|
||||
{
|
||||
print '<input name="MAIN_INFO_PROFID5" size="20" value="' . $conf->global->MAIN_INFO_PROFID5 . '">';
|
||||
print '<input name="MAIN_INFO_PROFID5" size="20" value="' . (! empty($conf->global->MAIN_INFO_PROFID5) ? $conf->global->MAIN_INFO_PROFID5 : '') . '">';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -476,9 +476,9 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId6",$mysoc->country_code).'</td><td>';
|
||||
if ($mysoc->country_code)
|
||||
if (! empty($mysoc->country_code))
|
||||
{
|
||||
print '<input name="MAIN_INFO_PROFID6" size="20" value="' . $conf->global->MAIN_INFO_PROFID6 . '">';
|
||||
print '<input name="MAIN_INFO_PROFID6" size="20" value="' . (! empty($conf->global->MAIN_INFO_PROFID6) ? $conf->global->MAIN_INFO_PROFID6 : '') . '">';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -490,7 +490,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
// TVA Intra
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("VATIntra").'</td><td>';
|
||||
print '<input name="tva" size="20" value="' . $conf->global->MAIN_INFO_TVAINTRA . '">';
|
||||
print '<input name="tva" size="20" value="' . (! empty($conf->global->MAIN_INFO_TVAINTRA) ? $conf->global->MAIN_INFO_TVAINTRA : '') . '">';
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
@@ -33,9 +33,11 @@ $langs->load("contracts");
|
||||
$langs->load("bills");
|
||||
$langs->load("banks");
|
||||
|
||||
if (!$user->admin) accessforbidden();
|
||||
if (! $user->admin) accessforbidden();
|
||||
|
||||
if ( (isset($_POST["action"]) && $_POST["action"] == 'update'))
|
||||
$action=GETPOST('action','alpha');
|
||||
|
||||
if ($action == 'update')
|
||||
{
|
||||
//Conversion des jours en secondes
|
||||
if ($_POST["ActionsToDo"]) dolibarr_set_const($db, "MAIN_DELAY_ACTIONS_TODO",$_POST["ActionsToDo"],'chaine',0,'',$conf->entity);
|
||||
@@ -71,7 +73,7 @@ $form = new Form($db);
|
||||
$countrynotdefined='<font class="error">'.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')</font>';
|
||||
|
||||
|
||||
if ((isset($_GET["action"]) && $_GET["action"] == 'edit'))
|
||||
if ($action == 'edit')
|
||||
{
|
||||
print '<form method="post" action="delais.php" name="form_index">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@@ -82,7 +84,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit'))
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("DelaysOfToleranceBeforeWarning").'</td><td width="120px">'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
//
|
||||
if ($conf->agenda->enabled)
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
@@ -90,7 +92,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit'))
|
||||
print '<td>'.$langs->trans("DelaysOfToleranceActionsToDo").'</td><td>';
|
||||
print '<input size="5" name="ActionsToDo" value="'. ($conf->global->MAIN_DELAY_ACTIONS_TODO+0) . '"> ' . $langs->trans("days") . '</td></tr>';
|
||||
}
|
||||
if ($conf->commande->enabled)
|
||||
if (! empty($conf->commande->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
@@ -98,7 +100,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit'))
|
||||
print '<td>'.$langs->trans("DelaysOfToleranceOrdersToProcess").'</td><td>';
|
||||
print '<input size="5" name="OrdersToProcess" value="'. ($conf->global->MAIN_DELAY_ORDERS_TO_PROCESS+0) . '"> ' . $langs->trans("days") . '</td></tr>';
|
||||
}
|
||||
if ($conf->fournisseur->enabled)
|
||||
if (! empty($conf->fournisseur->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
@@ -106,7 +108,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit'))
|
||||
print '<td>'.$langs->trans("DelaysOfToleranceSuppliersOrdersToProcess").'</td><td>';
|
||||
print '<input size="5" name="SuppliersOrdersToProcess" value="'. ($conf->global->MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS+0) . '"> ' . $langs->trans("days") . '</td></tr>';
|
||||
}
|
||||
if ($conf->propal->enabled)
|
||||
if (! empty($conf->propal->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
@@ -114,7 +116,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit'))
|
||||
print '<td>'.$langs->trans("DelaysOfTolerancePropalsToClose").'</td><td>';
|
||||
print '<input size="5" name="PropalsToClose" value="'. ($conf->global->MAIN_DELAY_PROPALS_TO_CLOSE+0) . '"> ' . $langs->trans("days") . '</td></tr>';
|
||||
}
|
||||
if ($conf->propal->enabled)
|
||||
if (! empty($conf->propal->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
@@ -122,7 +124,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit'))
|
||||
print '<td>'.$langs->trans("DelaysOfTolerancePropalsToBill").'</td><td>';
|
||||
print '<input size="5" name="PropalsToBill" value="'. ($conf->global->MAIN_DELAY_PROPALS_TO_BILL+0) . '"> ' . $langs->trans("days") . '</td></tr>';
|
||||
}
|
||||
if ($conf->service->enabled)
|
||||
if (! empty($conf->service->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
@@ -130,7 +132,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit'))
|
||||
print '<td>'.$langs->trans("DelaysOfToleranceNotActivatedServices").'</td><td>';
|
||||
print '<input size="5" name="BoardNotActivatedServices" value="'. ($conf->global->MAIN_DELAY_NOT_ACTIVATED_SERVICES+0) . '"> ' . $langs->trans("days") . '</td></tr>';
|
||||
}
|
||||
if ($conf->service->enabled)
|
||||
if (! empty($conf->service->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
@@ -138,7 +140,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit'))
|
||||
print '<td>'.$langs->trans("DelaysOfToleranceRunningServices").'</td><td>';
|
||||
print '<input size="5" name="BoardRunningServices" value="'. ($conf->global->MAIN_DELAY_RUNNING_SERVICES +0). '"> ' . $langs->trans("days") . '</td></tr>';
|
||||
}
|
||||
if ($conf->facture->enabled)
|
||||
if (! empty($conf->facture->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
@@ -146,7 +148,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit'))
|
||||
print '<td>'.$langs->trans("DelaysOfToleranceCustomerBillsUnpaid").'</td><td>';
|
||||
print '<input size="5" name="CustomerBillsUnpaid" value="'. ($conf->global->MAIN_DELAY_CUSTOMER_BILLS_UNPAYED+0) . '"> ' . $langs->trans("days") . '</td></tr>';
|
||||
}
|
||||
if ($conf->fournisseur->enabled)
|
||||
if (! empty($conf->fournisseur->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
@@ -154,7 +156,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit'))
|
||||
print '<td>'.$langs->trans("DelaysOfToleranceSupplierBillsToPay").'</td><td>';
|
||||
print '<input size="5" name="SupplierBillsToPay" value="'. ($conf->global->MAIN_DELAY_SUPPLIER_BILLS_TO_PAY+0) . '"> ' . $langs->trans("days") . '</td></tr>';
|
||||
}
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
@@ -167,7 +169,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit'))
|
||||
print '<td>'.$langs->trans("DelaysOfToleranceChequesToDeposit").'</td><td>';
|
||||
print '<input size="5" name="ChequesToDeposit" value="'. ($conf->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT+0) . '"> ' . $langs->trans("days") . '</td></tr>';
|
||||
}
|
||||
if ($conf->adherent->enabled)
|
||||
if (! empty($conf->adherent->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
@@ -186,7 +188,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit'))
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$langs->trans("MAIN_DISABLE_METEO").'</td><td>' .$form->selectyesno('MAIN_DISABLE_METEO',$conf->global->MAIN_DISABLE_METEO,1) . '</td></tr>';
|
||||
print '<td>'.$langs->trans("MAIN_DISABLE_METEO").'</td><td>' .$form->selectyesno('MAIN_DISABLE_METEO',(isset($conf->global->MAIN_DISABLE_METEO)?1:0),1) . '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
@@ -209,14 +211,14 @@ else
|
||||
|
||||
$var=!$var;
|
||||
|
||||
if ($conf->agenda->enabled)
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td width="20px">'.img_object('','action').'</td>';
|
||||
print '<td>'.$langs->trans("DelaysOfToleranceActionsToDo").'</td><td>' . ($conf->global->MAIN_DELAY_ACTIONS_TODO+0) . ' ' . $langs->trans("days") . '</td></tr>';
|
||||
}
|
||||
|
||||
if ($conf->commande->enabled)
|
||||
if (! empty($conf->commande->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
@@ -224,7 +226,7 @@ else
|
||||
print '<td>'.$langs->trans("DelaysOfToleranceOrdersToProcess").'</td><td>' . ($conf->global->MAIN_DELAY_ORDERS_TO_PROCESS+0) . ' ' . $langs->trans("days") . '</td></tr>';
|
||||
}
|
||||
|
||||
if ($conf->fournisseur->enabled)
|
||||
if (! empty($conf->fournisseur->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
@@ -232,7 +234,7 @@ else
|
||||
print '<td>'.$langs->trans("DelaysOfToleranceSuppliersOrdersToProcess").'</td><td>' . ($conf->global->MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS+0) . ' ' . $langs->trans("days") . '</td></tr>';
|
||||
}
|
||||
|
||||
if ($conf->propal->enabled)
|
||||
if (! empty($conf->propal->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
@@ -240,7 +242,7 @@ else
|
||||
print '<td>'.$langs->trans("DelaysOfTolerancePropalsToClose").'</td><td>' . ($conf->global->MAIN_DELAY_PROPALS_TO_CLOSE+0). ' ' . $langs->trans("days") . '</td></tr>';
|
||||
}
|
||||
|
||||
if ($conf->propal->enabled)
|
||||
if (! empty($conf->propal->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
@@ -248,7 +250,7 @@ else
|
||||
print '<td>'.$langs->trans("DelaysOfTolerancePropalsToBill").'</td><td>' . ($conf->global->MAIN_DELAY_PROPALS_TO_BILL+0) . ' ' . $langs->trans("days") . '</td></tr>';
|
||||
}
|
||||
|
||||
if ($conf->service->enabled)
|
||||
if (! empty($conf->service->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
@@ -256,7 +258,7 @@ else
|
||||
print '<td>'.$langs->trans("DelaysOfToleranceNotActivatedServices").'</td><td>' . ($conf->global->MAIN_DELAY_NOT_ACTIVATED_SERVICES+0) . ' ' . $langs->trans("days") . '</td></tr>';
|
||||
}
|
||||
|
||||
if ($conf->service->enabled)
|
||||
if (! empty($conf->service->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
@@ -264,7 +266,7 @@ else
|
||||
print '<td>'.$langs->trans("DelaysOfToleranceRunningServices").'</td><td>' . ($conf->global->MAIN_DELAY_RUNNING_SERVICES+0). ' ' . $langs->trans("days") . '</td></tr>';
|
||||
}
|
||||
|
||||
if ($conf->facture->enabled)
|
||||
if (! empty($conf->facture->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
@@ -272,7 +274,7 @@ else
|
||||
print '<td>'.$langs->trans("DelaysOfToleranceCustomerBillsUnpaid").'</td><td>' . ($conf->global->MAIN_DELAY_CUSTOMER_BILLS_UNPAYED+0) . ' ' . $langs->trans("days") . '</td></tr>';
|
||||
}
|
||||
|
||||
if ($conf->fournisseur->enabled)
|
||||
if (! empty($conf->fournisseur->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
@@ -280,7 +282,7 @@ else
|
||||
print '<td>'.$langs->trans("DelaysOfToleranceSupplierBillsToPay").'</td><td>' . ($conf->global->MAIN_DELAY_SUPPLIER_BILLS_TO_PAY+0) . ' ' . $langs->trans("days") . '</td></tr>';
|
||||
}
|
||||
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
@@ -293,7 +295,7 @@ else
|
||||
print '<td>'.$langs->trans("DelaysOfToleranceChequesToDeposit").'</td><td>' . ($conf->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT+0) . ' ' . $langs->trans("days") . '</td></tr>';
|
||||
}
|
||||
|
||||
if ($conf->adherent->enabled)
|
||||
if (! empty($conf->adherent->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
@@ -368,7 +370,7 @@ print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
?>
|
||||
|
||||
@@ -208,7 +208,7 @@ if ($action == 'edit') // Edit
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
// Hide unauthorized button
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("ButtonHideUnauthorized").'</td><td>';
|
||||
@@ -238,7 +238,7 @@ if ($action == 'edit') // Edit
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageLogin").'</td><td colspan="2">';
|
||||
// Editeur wysiwyg
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
|
||||
$doleditor=new DolEditor('main_home',$conf->global->MAIN_HOME,'',142,'dolibarr_notes','In',false,true,true,ROWS_4,90);
|
||||
$doleditor=new DolEditor('main_home',(isset($conf->global->MAIN_HOME)?$conf->global->MAIN_HOME:''),'',142,'dolibarr_notes','In',false,true,true,ROWS_4,90);
|
||||
$doleditor->Create();
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
@@ -246,7 +246,7 @@ if ($action == 'edit') // Edit
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageOfDay").'</td><td colspan="2">';
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
|
||||
$doleditor=new DolEditor('main_motd',$conf->global->MAIN_MOTD,'',142,'dolibarr_notes','In',false,true,true,ROWS_4,90);
|
||||
$doleditor=new DolEditor('main_motd',(isset($conf->global->MAIN_MOTD)?$conf->global->MAIN_MOTD:''),'',142,'dolibarr_notes','In',false,true,true,ROWS_4,90);
|
||||
$doleditor->Create();
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
@@ -366,35 +366,37 @@ else // Show
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
// Hide unauthorized button
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("ButtonHideUnauthorized").'</td><td colspan="2">';
|
||||
print yn($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED,1);
|
||||
print yn((isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)?$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED:0),1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Link to help center
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelpCenter").'</td><td colspan="2">';
|
||||
print yn($conf->global->MAIN_HELPCENTER_DISABLELINK,1);
|
||||
print yn((isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0),1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Link to wiki help
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/'.$conf->theme.'/img//helpdoc.png','',1)).'</td><td colspan="2">';
|
||||
print yn($conf->global->MAIN_HELP_DISABLELINK,1);
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/helpdoc.png','',1)).'</td><td colspan="2">';
|
||||
print yn((isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0),1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Message login
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageLogin").'</td><td colspan="2">';
|
||||
print dol_htmlcleanlastbr($conf->global->MAIN_HOME);
|
||||
if (isset($conf->global->MAIN_HOME)) print dol_htmlcleanlastbr($conf->global->MAIN_HOME);
|
||||
else print ' ';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// Message of the day
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageOfDay").'</td><td colspan="2">';
|
||||
print dol_htmlcleanlastbr($conf->global->MAIN_MOTD);
|
||||
if (isset($conf->global->MAIN_MOTD)) print dol_htmlcleanlastbr($conf->global->MAIN_MOTD);
|
||||
else print ' ';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
/*
|
||||
@@ -415,7 +417,6 @@ else // Show
|
||||
}
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
?>
|
||||
$db->close();
|
||||
?>
|
||||
@@ -37,7 +37,7 @@ $langs->load("users");
|
||||
$langs->load("other");
|
||||
|
||||
// Security check
|
||||
if (!$user->admin) accessforbidden();
|
||||
if (! $user->admin) accessforbidden();
|
||||
|
||||
$dirstandard = array();
|
||||
$dirsmartphone = array();
|
||||
@@ -48,6 +48,9 @@ foreach($dirmenus as $dirmenu)
|
||||
$dirsmartphone[]=$dirmenu.'smartphone';
|
||||
}
|
||||
|
||||
$error=0;
|
||||
$errmsgs=array();
|
||||
|
||||
|
||||
// Cette page peut etre longue. On augmente le delai autorise.
|
||||
// Ne fonctionne que si on est pas en safe_mode.
|
||||
@@ -80,7 +83,6 @@ if ($action == 'update' && empty($_POST["cancel"]))
|
||||
if (isset($_POST["MAIN_MENUFRONT_SMARTPHONE"])) $listofmenuhandler[preg_replace('/((_back|_front)office)?\.php/i','',$_POST["MAIN_MENUFRONT_SMARTPHONE"])]=1;
|
||||
|
||||
// Initialize menu handlers
|
||||
$error=0; $errmsgs=array();
|
||||
foreach ($listofmenuhandler as $key => $val)
|
||||
{
|
||||
// Load sql init_menu_handler.sql file
|
||||
@@ -154,7 +156,7 @@ print $langs->trans("MenusDesc")."<br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
if (isset($_GET["action"]) && $_GET["action"] == 'edit')
|
||||
if ($action == 'edit')
|
||||
{
|
||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@@ -240,8 +242,8 @@ else
|
||||
print '<td>';
|
||||
$filelib=preg_replace('/.php$/i','',(empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?$conf->global->MAIN_MENU_SMARTPHONE:$conf->global->MAIN_MENU_SMARTPHONE_FORCED));
|
||||
print $filelib;
|
||||
if (preg_match('/smartphone/',$conf->global->MAIN_MENU_SMARTPHONE_FORCED)
|
||||
|| (empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED) && preg_match('/smartphone/',$conf->global->MAIN_MENU_SMARTPHONE)))
|
||||
if (! empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED) && preg_match('/smartphone/', $conf->global->MAIN_MENU_SMARTPHONE_FORCED)
|
||||
|| (empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED) && ! empty($conf->global->MAIN_MENU_SMARTPHONE) && preg_match('/smartphone/',$conf->global->MAIN_MENU_SMARTPHONE)))
|
||||
{
|
||||
print ' '.img_warning($langs->transnoentitiesnoconv("ThisForceAlsoTheme"));
|
||||
}
|
||||
@@ -249,8 +251,8 @@ else
|
||||
print '<td>';
|
||||
$filelib=preg_replace('/.php$/i','',(empty($conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED)?$conf->global->MAIN_MENUFRONT_SMARTPHONE:$conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED));
|
||||
print $filelib;
|
||||
if (preg_match('/smartphone/',$conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED)
|
||||
|| (empty($conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED) && preg_match('/smartphone/',$conf->global->MAIN_MENUFRONT_SMARTPHONE)))
|
||||
if (! empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED) && preg_match('/smartphone/',$conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED)
|
||||
|| (empty($conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED) && ! empty($conf->global->MAIN_MENU_SMARTPHONE) && preg_match('/smartphone/',$conf->global->MAIN_MENUFRONT_SMARTPHONE)))
|
||||
{
|
||||
print ' '.img_warning($langs->transnoentitiesnoconv("ThisForceAlsoTheme"));
|
||||
}
|
||||
@@ -266,7 +268,7 @@ print '</div>';
|
||||
dol_htmloutput_errors('',$errmsgs);
|
||||
|
||||
|
||||
if (! isset($_GET["action"]) || $_GET["action"] != 'edit')
|
||||
if ($action != 'edit')
|
||||
{
|
||||
print '<div class="tabsAction">';
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2009-2011 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2009-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
@@ -41,7 +41,9 @@ foreach($dirmenus as $dirmenu)
|
||||
$dirsmartphone[]=$dirmenu.'smartphone';
|
||||
}
|
||||
|
||||
$mesg=$_GET["mesg"];
|
||||
$action=GETPOST('action','alpha');
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$mesg=GETPOST('mesg');
|
||||
|
||||
$menu_handler_top=$conf->global->MAIN_MENU_STANDARD;
|
||||
$menu_handler_smartphone=$conf->global->MAIN_MENU_SMARTPHONE;
|
||||
@@ -52,15 +54,15 @@ $menu_handler_smartphone=preg_replace('/_frontoffice.php/i','',$menu_handler_sma
|
||||
|
||||
$menu_handler=$menu_handler_top;
|
||||
|
||||
if ($_REQUEST["handler_origine"]) $menu_handler=$_REQUEST["handler_origine"];
|
||||
if ($_REQUEST["menu_handler"]) $menu_handler=$_REQUEST["menu_handler"];
|
||||
if (isset($_REQUEST["handler_origine"])) $menu_handler=$_REQUEST["handler_origine"];
|
||||
if (isset($_REQUEST["menu_handler"])) $menu_handler=$_REQUEST["menu_handler"];
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (isset($_GET["action"]) && ($_GET["action"] == 'up'))
|
||||
if ($action == 'up')
|
||||
{
|
||||
$current=array();
|
||||
$previous=array();
|
||||
@@ -116,7 +118,7 @@ if (isset($_GET["action"]) && ($_GET["action"] == 'up'))
|
||||
$db->query($sql);
|
||||
}
|
||||
|
||||
if (isset($_GET["action"]) && $_GET["action"] == 'down')
|
||||
elseif ($action == 'down')
|
||||
{
|
||||
$current=array();
|
||||
$next=array();
|
||||
@@ -172,7 +174,7 @@ if (isset($_GET["action"]) && $_GET["action"] == 'down')
|
||||
$db->query($sql);
|
||||
}
|
||||
|
||||
if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes')
|
||||
elseif ($action == 'confirm_delete' && $confirm == 'yes')
|
||||
{
|
||||
$db->begin();
|
||||
|
||||
@@ -191,7 +193,7 @@ if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes')
|
||||
$db->rollback();
|
||||
|
||||
$reload = 0;
|
||||
$_GET["action"]='';
|
||||
$action='';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,7 +239,7 @@ print "<br>\n";
|
||||
|
||||
|
||||
// Confirmation for remove menu entry
|
||||
if ($_GET["action"] == 'delete')
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$sql = "SELECT m.titre";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."menu as m";
|
||||
@@ -341,8 +343,8 @@ else
|
||||
print '<div class="error">'.$langs->trans("ErrorFeatureNeedJavascript").'</div>';
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
print '<br>';
|
||||
|
||||
llxFooter();
|
||||
llxFooter();
|
||||
$db->close();
|
||||
?>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||
/* Copyright (C) 2010-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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,33 +28,35 @@ $langs->load("users");
|
||||
$langs->load("admin");
|
||||
$langs->load("other");
|
||||
|
||||
if (!$user->admin) accessforbidden();
|
||||
if (! $user->admin) accessforbidden();
|
||||
|
||||
$action=GETPOST('action','alpha');
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($_GET["action"] == 'activate_hidemenu')
|
||||
if ($action == 'activate_hidemenu')
|
||||
{
|
||||
dolibarr_set_const($db, "MAIN_MENU_HIDE_UNAUTHORIZED", '1','chaine',0,'',$conf->entity);
|
||||
Header("Location: ".$_SERVER["PHP_SELF"]);
|
||||
exit;
|
||||
}
|
||||
else if ($_GET["action"] == 'disable_hidemenu')
|
||||
else if ($action == 'disable_hidemenu')
|
||||
{
|
||||
dolibarr_del_const($db, "MAIN_MENU_HIDE_UNAUTHORIZED",$conf->entity);
|
||||
Header("Location: ".$_SERVER["PHP_SELF"]);
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($_GET["action"] == 'activate_layoutmenu')
|
||||
if ($action == 'activate_layoutmenu')
|
||||
{
|
||||
dolibarr_set_const($db, "MAIN_MENU_USE_JQUERY_LAYOUT", '1','chaine',0,'',$conf->entity);
|
||||
Header("Location: ".$_SERVER["PHP_SELF"]);
|
||||
exit;
|
||||
}
|
||||
else if ($_GET["action"] == 'disable_layoutmenu')
|
||||
else if ($action == 'disable_layoutmenu')
|
||||
{
|
||||
dolibarr_del_const($db, "MAIN_MENU_USE_JQUERY_LAYOUT",$conf->entity);
|
||||
Header("Location: ".$_SERVER["PHP_SELF"]);
|
||||
@@ -106,11 +108,11 @@ $var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td colspan="3">'.$langs->trans("HideUnauthorizedMenu").'</td>';
|
||||
print '<td align="center">';
|
||||
if ($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED == 0)
|
||||
if (empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED))
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=activate_hidemenu">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
}
|
||||
if($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED == 1)
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=disable_hidemenu">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
||||
}
|
||||
@@ -118,17 +120,17 @@ print "</td>";
|
||||
print '</tr>';
|
||||
|
||||
// Use a flip-hide menu
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL > 0)
|
||||
if (isset($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL > 0)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td colspan="3">'.$langs->trans("MenuUseLayout").'</td>';
|
||||
print '<td align="center">';
|
||||
if ($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT == 0)
|
||||
if (empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT))
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=activate_layoutmenu">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
}
|
||||
if($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT == 1)
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=disable_layoutmenu">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
||||
}
|
||||
@@ -138,7 +140,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0)
|
||||
|
||||
print '</table>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
?>
|
||||
$db->close();
|
||||
?>
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
@@ -32,6 +33,15 @@ class ModeleBoxes // Can't be abtract as it is instanciated to build "empty"
|
||||
var $error='';
|
||||
var $max=5;
|
||||
|
||||
var $rowid;
|
||||
var $id;
|
||||
var $position;
|
||||
var $box_order;
|
||||
var $fk_user;
|
||||
var $sourcefile;
|
||||
var $box_id;
|
||||
var $note;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
||||
@@ -271,9 +271,8 @@ class FormCompany
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$noselect.=$out;
|
||||
if (!empty($htmlname)) $out.= '</select>';
|
||||
if (!empty($htmlname) && $user->admin) $out.= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
|
||||
if (! empty($htmlname)) $out.= '</select>';
|
||||
if (! empty($htmlname) && $user->admin) $out.= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
@@ -93,11 +93,11 @@ class InfoBox
|
||||
$box=new $boxname($db,$obj->note);
|
||||
|
||||
// box properties
|
||||
$box->rowid=$obj->rowid;
|
||||
$box->id=$obj->box_id;
|
||||
$box->position=$obj->position;
|
||||
$box->box_order=$obj->box_order;
|
||||
$box->fk_user=$obj->fk_user;
|
||||
$box->rowid = (! empty($obj->rowid) ? $obj->rowid : '');
|
||||
$box->id = (! empty($obj->box_id) ? $obj->box_id : '');
|
||||
$box->position = (! empty($obj->position) ? $obj->position : '');
|
||||
$box->box_order = (! empty($obj->box_order) ? $obj->box_order : '');
|
||||
$box->fk_user = (! empty($obj->fk_user) ? $obj->fk_user : '');
|
||||
$box->sourcefile=$relsourcefile;
|
||||
if ($mode == 'activated' && (! $user->id || ! $user->conf->$confuserzone))
|
||||
{
|
||||
@@ -108,11 +108,11 @@ class InfoBox
|
||||
}
|
||||
}
|
||||
// box_def properties
|
||||
$box->box_id=$obj->box_id;
|
||||
$box->note=$obj->note;
|
||||
$box->box_id = (! empty($obj->box_id) ? $obj->box_id : '');
|
||||
$box->note = (! empty($obj->note) ? $obj->note : '');
|
||||
|
||||
$enabled=true;
|
||||
if ($box->depends && count($box->depends) > 0)
|
||||
if (isset($box->depends) && count($box->depends) > 0)
|
||||
{
|
||||
foreach($box->depends as $module)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
|
||||
/* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010-2012 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
@@ -159,7 +159,11 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
|
||||
{
|
||||
global $conf,$langs,$bc;
|
||||
|
||||
$dirthemes=array_merge(array($conf->global->MAIN_FORCETHEMEDIR.'/theme'),(array) $conf->modules_parts['themes']);
|
||||
$forcethemedir=(! empty($conf->global->MAIN_FORCETHEMEDIR) ? $conf->global->MAIN_FORCETHEMEDIR : '');
|
||||
$dirthemes=array($forcethemedir.'/theme');
|
||||
if (! empty($conf->modules_parts['themes'])) {
|
||||
$dirthemes=array_merge(array($forcethemedir.'/theme'),(array) $conf->modules_parts['themes']);
|
||||
}
|
||||
|
||||
$selected_theme=$conf->global->MAIN_THEME;
|
||||
if (! empty($fuser)) $selected_theme=$fuser->conf->MAIN_THEME;
|
||||
@@ -206,7 +210,12 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
|
||||
{
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$langs->trans("ThemeDir").'</td>';
|
||||
print '<td'.($foruserprofile?' colspan="3"':'').'>'.$dirtheme.'</td>';
|
||||
print '<td>';
|
||||
foreach($dirthemes as $dirtheme)
|
||||
{
|
||||
echo '"'.$dirtheme.'" ';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@@ -214,14 +223,14 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
|
||||
print '<tr '.$bc[$var].'><td colspan="'.$colspan.'">';
|
||||
|
||||
print '<table class="nobordernopadding" width="100%">';
|
||||
|
||||
|
||||
$i=0;
|
||||
|
||||
|
||||
foreach($dirthemes as $dir)
|
||||
{
|
||||
$dirtheme=dol_buildpath($dir,0);
|
||||
$urltheme=dol_buildpath($dir,1);
|
||||
|
||||
|
||||
if (is_dir($dirtheme))
|
||||
{
|
||||
$handle=opendir($dirtheme);
|
||||
@@ -234,12 +243,12 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
|
||||
{
|
||||
// Disable not stable themes
|
||||
//if ($conf->global->MAIN_FEATURES_LEVEL < 1 && preg_match('/bureau2crea/i',$subdir)) continue;
|
||||
|
||||
|
||||
if ($i % $thumbsbyrow == 0)
|
||||
{
|
||||
print '<tr '.$bc[$var].'>';
|
||||
}
|
||||
|
||||
|
||||
print '<td align="center">';
|
||||
$file=$dirtheme."/".$subdir."/thumb.png";
|
||||
$url=$urltheme."/".$subdir."/thumb.png";
|
||||
@@ -260,16 +269,16 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
|
||||
print '<input '.($edit?'':'disabled').' type="radio" '.$bc[$var].' style="border: 0px;" name="main_theme" value="'.$subdir.'"> '.$subdir;
|
||||
}
|
||||
print '</td></tr></table></td>';
|
||||
|
||||
|
||||
$i++;
|
||||
|
||||
|
||||
if ($i % $thumbsbyrow == 0) print '</tr>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($i % $thumbsbyrow != 0)
|
||||
{
|
||||
while ($i % $thumbsbyrow != 0)
|
||||
|
||||
Reference in New Issue
Block a user