From 6f64fd83f2a62f571c7a23e007fb7a2de87a5e4d Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@users.sourceforge.net>
Date: Sat, 12 Aug 2006 15:32:57 +0000
Subject: [PATCH] Look: Ajout picto "setup" sur toutes les pages de
 configuration Qual: Suppression de fichiers obsoletes Ajout d'une page
 introduction a la configuration Dolibarr.

---
 ...pdate-all.php => boutique-special-all.php} |  12 +-
 htdocs/admin/boutique.php                     |   2 +-
 htdocs/admin/boxes.php                        |   2 +-
 htdocs/admin/clicktodial.php                  |   2 +-
 htdocs/admin/commande.php                     |   2 +-
 htdocs/admin/company.php                      | 583 ++++++++++++++++++
 htdocs/admin/compta.php                       |   2 +-
 htdocs/admin/comptaexpert.php                 |   2 +-
 htdocs/admin/const.php                        |   2 +-
 htdocs/admin/delais.php                       |   6 +-
 htdocs/admin/dict.php                         |   6 +-
 htdocs/admin/dons.php                         |   4 +-
 htdocs/admin/energie.php                      |   2 +-
 htdocs/admin/expedition.php                   |   2 +-
 htdocs/admin/external_rss.php                 |   2 +-
 htdocs/admin/facture.php                      |   2 +-
 htdocs/admin/fichinter.php                    |   2 +-
 htdocs/admin/fournisseur.php                  |   2 +-
 htdocs/admin/ihm.php                          |   2 +-
 htdocs/admin/index.php                        | 542 +---------------
 htdocs/admin/ldap.php                         |   2 +-
 htdocs/admin/livraison.php                    |   2 +-
 htdocs/admin/mailing.php                      |   2 +-
 htdocs/admin/modules.php                      |   3 +
 htdocs/admin/notification.php                 |   2 +-
 htdocs/admin/perms.php                        |   2 +
 htdocs/admin/pre.inc.php                      |   6 +-
 htdocs/admin/produit.php                      |   2 +-
 htdocs/admin/propale.php                      |   2 +-
 htdocs/admin/security.php                     |   2 +
 htdocs/admin/societe.php                      |   2 +-
 htdocs/admin/sqltables.php                    |  81 ---
 htdocs/admin/syslog.php                       |   2 +-
 htdocs/admin/system/constall.php              |   5 +-
 .../system/database-tables-contraintes.php    |   3 +-
 htdocs/admin/system/database-tables.php       |   2 +-
 htdocs/admin/system/database.php              |   2 +-
 htdocs/admin/system/dbtable.php               |   2 +-
 htdocs/admin/system/dolibarr.php              |   3 +-
 htdocs/admin/system/index.php                 |   8 +-
 htdocs/admin/system/os.php                    |   2 +-
 htdocs/admin/system/phpinfo.php               |  36 +-
 htdocs/admin/system/pre.inc.php               |  33 +-
 htdocs/admin/system/web.php                   |   4 +-
 htdocs/admin/triggers.php                     |   4 +-
 htdocs/admin/webcalendar.php                  |   2 +-
 htdocs/conf/conf.class.php                    |   2 +
 .../menus/barre_left/eldy_backoffice.php      |   4 +-
 .../menus/barre_left/eldy_frontoffice.php     |   4 +-
 htdocs/langs/en_US/admin.lang                 |   9 +
 htdocs/langs/en_US/main.lang                  |   1 +
 htdocs/langs/fr_FR/admin.lang                 |  11 +-
 htdocs/langs/fr_FR/main.lang                  |   1 +
 htdocs/lib/functions.inc.php                  |  10 +-
 htdocs/oscommerce_ws/includes/configure.php   |   4 +-
 htdocs/theme/dev/img/puce.png                 | Bin 0 -> 1187 bytes
 htdocs/theme/dolibarr/img/puce.png            | Bin 0 -> 1187 bytes
 htdocs/theme/eldy/img/puce.png                | Bin 0 -> 1187 bytes
 htdocs/theme/freelug/img/puce.png             | Bin 0 -> 1187 bytes
 htdocs/theme/yellow/img/puce.png              | Bin 0 -> 1187 bytes
 mysql/data/data.sql                           |   2 -
 mysql/migration/2.0.0-2.1.0.sql               |   3 +
 mysql/tables/llx_sqltables.sql                |  29 -
 63 files changed, 750 insertions(+), 727 deletions(-)
 rename htdocs/admin/{boutique-update-all.php => boutique-special-all.php} (89%)
 create mode 100644 htdocs/admin/company.php
 delete mode 100644 htdocs/admin/sqltables.php
 create mode 100644 htdocs/theme/dev/img/puce.png
 create mode 100644 htdocs/theme/dolibarr/img/puce.png
 create mode 100644 htdocs/theme/eldy/img/puce.png
 create mode 100644 htdocs/theme/freelug/img/puce.png
 create mode 100644 htdocs/theme/yellow/img/puce.png
 delete mode 100644 mysql/tables/llx_sqltables.sql

diff --git a/htdocs/admin/boutique-update-all.php b/htdocs/admin/boutique-special-all.php
similarity index 89%
rename from htdocs/admin/boutique-update-all.php
rename to htdocs/admin/boutique-special-all.php
index 47696ce027f..04eb78a8ea4 100644
--- a/htdocs/admin/boutique-update-all.php
+++ b/htdocs/admin/boutique-special-all.php
@@ -17,11 +17,10 @@
  *
  * $Id$
  * $Source$
- *
  */
 
 /**
-		\file 		htdocs/admin/boutique-update-all.php
+		\file 		htdocs/admin/boutique-special-all.php
 		\ingroup    boutique
 		\brief      Page d'administration/configuration du module Boutique
 		\version    $Revision$
@@ -31,6 +30,7 @@ require("./pre.inc.php");
 require("../boutique/livre/livre.class.php");
 require("../boutique/editeur/editeur.class.php");
 require("../boutique/auteur/auteur.class.php");
+require("../product/promotion/promotion.class.php");
 
 $langs->load("admin");
 
@@ -41,7 +41,7 @@ if (!$user->admin)
 llxHeader();
 
 
-print_barre_liste("Mise a jour de tous les livres", $page, "boutique-update-all.php");
+print_barre_liste("Mise a jour de tous les livres", $page, "boutique-special-all.php");
 
 $sql = "SELECT l.rowid FROM ".MAIN_DB_PREFIX."livre as l";
   
@@ -56,8 +56,10 @@ if ( $db->query($sql) )
     $livre = new Livre($db);
     if ($livre->fetch($objp->rowid))
       {
-	$livre->updateosc();
-	print "livre ".$objp->rowid." up to date<br>";
+	
+	$prom = new Promotion($db);
+	$prom->create($user,$livre->oscid, 5);
+
       }
     else 
       {
diff --git a/htdocs/admin/boutique.php b/htdocs/admin/boutique.php
index cc8757fb2b7..cd70ab48849 100644
--- a/htdocs/admin/boutique.php
+++ b/htdocs/admin/boutique.php
@@ -125,7 +125,7 @@ elseif ($_POST["test"])
 
 llxHeader();
 
-print_titre($langs->trans("OSCommerceSetup"));
+print_fiche_titre($langs->trans("OSCommerceSetup"),'','setup');
 
 
 
diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php
index 1cdc5fd0b09..a90a89e32a7 100644
--- a/htdocs/admin/boxes.php
+++ b/htdocs/admin/boxes.php
@@ -115,7 +115,7 @@ if ($_GET["action"] == 'switch')
 
 llxHeader();
 
-print_fiche_titre($langs->trans("Boxes"));
+print_fiche_titre($langs->trans("Boxes"),'','setup');
 
 print $langs->trans("BoxesDesc")."<br>\n";
 
diff --git a/htdocs/admin/clicktodial.php b/htdocs/admin/clicktodial.php
index ea1e2896497..2df63a33a51 100644
--- a/htdocs/admin/clicktodial.php
+++ b/htdocs/admin/clicktodial.php
@@ -55,7 +55,7 @@ if ($_POST["action"] == 'setvalue' && $user->admin)
 
 llxHeader();
 
-print_titre($langs->trans("ClickToDialSetup"));
+print_fiche_titre($langs->trans("ClickToDialSetup"),'','setup');
 
 if ($mesg) print '<br>'.$mesg;
 
diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php
index f12d5a1a77d..080f3aa0e03 100644
--- a/htdocs/admin/commande.php
+++ b/htdocs/admin/commande.php
@@ -143,7 +143,7 @@ llxHeader();
 $dir = "../includes/modules/commande/";
 $html=new Form($db);
 
-print_titre($langs->trans("OrdersSetup"));
+print_fiche_titre($langs->trans("OrdersSetup"),'','setup');
 
 print "<br>";
 
diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php
new file mode 100644
index 00000000000..a7bd7bd7eb5
--- /dev/null
+++ b/htdocs/admin/company.php
@@ -0,0 +1,583 @@
+<?php
+/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
+ * Copyright (C) 2004-2006 Laurent Destailleur  <eldy@users.sourceforge.net>
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id$
+ * $Source$
+ */
+
+/**
+    	\file       htdocs/admin/company.php
+		\brief      Page d'accueil de l'espace administration/configuration
+		\version    $Revision$
+*/
+
+require("./pre.inc.php");
+
+$langs->load("admin");
+$langs->load("companies");
+
+if (!$user->admin)
+  accessforbidden();
+
+if ( (isset($_POST["action"]) && $_POST["action"] == 'update')
+  || (isset($_POST["action"]) && $_POST["action"] == 'updateedit') )
+{
+    dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOM",$_POST["nom"]);
+    dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADRESSE",$_POST["address"]);
+    dolibarr_set_const($db, "MAIN_INFO_SOCIETE_VILLE",$_POST["ville"]);
+    dolibarr_set_const($db, "MAIN_INFO_SOCIETE_CP",$_POST["cp"]);
+    dolibarr_set_const($db, "MAIN_INFO_SOCIETE_PAYS",$_POST["pays_id"]);
+    dolibarr_set_const($db, "MAIN_MONNAIE",$_POST["currency"]);
+    dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TEL",$_POST["tel"]);
+    dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FAX",$_POST["fax"]);
+    dolibarr_set_const($db, "MAIN_INFO_SOCIETE_MAIL",$_POST["mail"]);
+    dolibarr_set_const($db, "MAIN_INFO_SOCIETE_WEB",$_POST["web"]);
+    dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOTE",$_POST["note"]);
+    if ($_FILES["logo"]["tmp_name"])
+    {
+        if (eregi('([^\\\/:]+)$',$_FILES["logo"]["name"],$reg))
+        {
+            $original_file=$reg[1];
+
+            dolibarr_syslog("Move file ".$_FILES["logo"]["tmp_name"]." to ".$conf->societe->dir_logos.'/'.$original_file);
+	        if (! is_dir($conf->societe->dir_logos))
+	        {
+	            create_exdir($conf->societe->dir_logos);
+    		}        
+            if (doliMoveFileUpload($_FILES["logo"]["tmp_name"],$conf->societe->dir_logos.'/'.$original_file))
+            {
+                dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO",$original_file);
+            }
+			else
+            {
+                $message .= '<div class="error">'.$langs->trans("ErrorFailedToSaveFile").'</div>';
+            }
+				
+        }
+    }
+
+    dolibarr_set_const($db, "MAIN_INFO_CAPITAL",$_POST["capital"]);
+    dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FORME_JURIDIQUE",$_POST["forme_juridique_code"]);
+    dolibarr_set_const($db, "MAIN_INFO_SIREN",$_POST["siren"]);
+    dolibarr_set_const($db, "MAIN_INFO_SIRET",$_POST["siret"]);
+    dolibarr_set_const($db, "MAIN_INFO_APE",$_POST["ape"]);
+    dolibarr_set_const($db, "MAIN_INFO_RCS",$_POST["rcs"]);
+    dolibarr_set_const($db, "MAIN_INFO_TVAINTRA",$_POST["tva"]);
+
+    dolibarr_set_const($db, "FACTURE_TVAOPTION",$_POST["optiontva"]);
+
+    if ($_POST['action'] != 'updateedit')
+    {
+        Header("Location: ".$_SERVER["PHP_SELF"]);
+        exit;
+    }
+}
+
+if ($_GET["action"] == 'removelogo')
+{
+	$logofile=$conf->societe->dir_logos.'/'.$mysoc->logo;
+	@unlink($logofile);
+    dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO");
+}
+
+
+
+/*
+ * Affichage page
+ */
+
+llxHeader();
+
+$form = new Form($db);
+$countrynotdefined='<font class="error">'.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')</font>';
+
+
+print_fiche_titre($langs->trans("CompanyFundation"),'','setup');
+
+
+if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
+ || (isset($_POST["action"]) && $_POST["action"] == 'updateedit') )
+{
+    /**
+     * Edition des param�tres
+     */
+    if ($conf->use_javascript)
+    {
+        print '
+        <script language="javascript" type="text/javascript">
+        <!--
+        function save_refresh()
+        {
+        	document.form_index.action.value="updateedit";
+        	document.form_index.submit();
+        }
+        -->
+        </script>
+        ';
+    }
+    
+    print '<form enctype="multipart/form-data" method="post" action="'.$_SERVER["PHP_SELF"].'" name="form_index">';
+    print '<input type="hidden" name="action" value="update">';
+    $var=true;
+
+    print '<table class="noborder" width="100%">';
+    print '<tr class="liste_titre"><td width="35%">'.$langs->trans("CompanyInfo").'</td><td>'.$langs->trans("Value").'</td></tr>';
+
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyName").'</td><td>';
+    print '<input name="nom" value="'. $conf->global->MAIN_INFO_SOCIETE_NOM . '"></td></tr>';
+
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyAddress").'</td><td>';
+    print '<textarea name="address" cols="50" rows="'.ROWS_2.'">'. $conf->global->MAIN_INFO_SOCIETE_ADRESSE . '</textarea></td></tr>';
+
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyZip").'</td><td>';
+    print '<input name="cp" value="'. $conf->global->MAIN_INFO_SOCIETE_CP . '"></td></tr>';
+
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyTown").'</td><td>';
+    print '<input name="ville" value="'. $conf->global->MAIN_INFO_SOCIETE_VILLE . '"></td></tr>';
+
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td>'.$langs->trans("Country").'</td><td>';
+    $form->select_pays($conf->global->MAIN_INFO_SOCIETE_PAYS,'pays_id',($conf->use_javascript?' onChange="save_refresh()"':''));
+    print '</td></tr>';
+
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyCurrency").'</td><td>';
+    $form->select_currency($conf->global->MAIN_MONNAIE,"currency");
+    print '</td></tr>';
+
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td>'.$langs->trans("Tel").'</td><td>';
+    print '<input name="tel" value="'. $conf->global->MAIN_INFO_SOCIETE_TEL . '"></td></tr>';
+    print '</td></tr>';
+
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td>'.$langs->trans("Fax").'</td><td>';
+    print '<input name="fax" value="'. $conf->global->MAIN_INFO_SOCIETE_FAX . '"></td></tr>';
+    print '</td></tr>';
+
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td>'.$langs->trans("Mail").'</td><td>';
+    print '<input name="mail" value="'. $conf->global->MAIN_INFO_SOCIETE_MAIL . '"></td></tr>';
+    print '</td></tr>';
+
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td>'.$langs->trans("Web").'</td><td>';
+    print '<input name="web" value="'. $conf->global->MAIN_INFO_SOCIETE_WEB . '"></td></tr>';
+    print '</td></tr>';
+
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td>'.$langs->trans("Logo").' (png,jpg)</td><td>';
+    print '<table width="100%" class="notopnoleftnoright"><tr><td valign="center">';
+    print '<input type="file" class="flat" name="logo" size="30">';
+    print '</td><td valign="middle" align="right">';
+    if ($mysoc->logo && file_exists($conf->societe->dir_logos.'/'.$mysoc->logo))
+    {
+        print '<a href="'.$_SERVER["PHP_SELF"].'?action=removelogo">'.img_delete($langs->trans("Delete")).'</a>';
+        print ' &nbsp; ';
+        print '<img height="30" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.$mysoc->logo.'">';
+    }
+    else
+    {
+        print '<img height="30" src="'.DOL_URL_ROOT.'/theme/nophoto.jpg">';
+    }
+	print '</td></tr></table>';
+    print '</td></tr>';
+
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td valign="top">'.$langs->trans("Note").'</td><td>';
+    print '<textarea class="flat" name="note" cols="60" rows="'.ROWS_4.'">'.$conf->global->MAIN_INFO_SOCIETE_NOTE.'</textarea></td></tr>';
+    print '</td></tr>';
+
+    print '</table>';
+
+    print '<br>';
+
+    // Identifiants de la soci�t� (propre au pays)
+    print '<table class="noborder" width="100%">';
+    print '<tr class="liste_titre"><td>'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
+    $var=true;
+
+    $langs->load("companies");
+
+    // Recupere code pays
+    $code_pays=substr($langs->defaultlang,-2);    // Par defaut, pays de la localisation
+    if ($conf->global->MAIN_INFO_SOCIETE_PAYS)
+    {
+        $sql  = "SELECT code from ".MAIN_DB_PREFIX."c_pays";
+        $sql .= " WHERE rowid = ".$conf->global->MAIN_INFO_SOCIETE_PAYS;
+        $resql=$db->query($sql);
+        if ($resql) {
+            $obj = $db->fetch_object($resql);
+            if ($obj->code) $code_pays=$obj->code;
+        }
+        else {
+            dolibarr_print_error($db);
+        }
+    }
+
+    // Capital
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Capital").'</td><td>';
+    print '<input name="capital" size="20" value="' . $conf->global->MAIN_INFO_CAPITAL . '"></td></tr>';
+
+    // Forme juridique
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td>'.$langs->trans("JuridicalStatus").'</td><td>';
+    if ($conf->global->MAIN_INFO_SOCIETE_PAYS)
+    {
+        $form->select_forme_juridique($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE,$code_pays);
+    }
+    else
+    {
+        print $countrynotdefined;
+    }
+    print '</td></tr>';
+
+    // ProfID1
+    if ($langs->transcountry("ProfId1",$code_pays) != '-')
+    {
+        $var=!$var;
+        print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId1",$code_pays).'</td><td>';
+        if ($conf->global->MAIN_INFO_SOCIETE_PAYS)
+        {
+            print '<input name="siren" size="20" value="' . $conf->global->MAIN_INFO_SIREN . '">';
+        }
+        else
+        {
+            print $countrynotdefined;
+        }
+        print '</td></tr>';
+    }
+
+    // ProfId2
+    if ($langs->transcountry("ProfId2",$code_pays) != '-')
+    {
+        $var=!$var;
+        print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId2",$code_pays).'</td><td>';
+        if ($conf->global->MAIN_INFO_SOCIETE_PAYS)
+        {
+            print '<input name="siret" size="20" value="' . $conf->global->MAIN_INFO_SIRET . '">';
+        }
+        else
+        {
+            print $countrynotdefined;
+        }
+        print '</td></tr>';
+    }
+
+    // ProfId3
+    if ($langs->transcountry("ProfId3",$code_pays) != '-')
+    {
+        $var=!$var;
+        print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId3",$code_pays).'</td><td>';
+        if ($conf->global->MAIN_INFO_SOCIETE_PAYS)
+        {
+            print '<input name="ape" size="20" value="' . $conf->global->MAIN_INFO_APE . '">';
+        }
+        else
+        {
+            print $countrynotdefined;
+        }
+        print '</td></tr>';
+    }
+
+    // ProfId4
+    if ($langs->transcountry("ProfId4",$code_pays) != '-')
+    {
+        $var=!$var;
+        print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId4",$code_pays).'</td><td>';
+        if ($conf->global->MAIN_INFO_SOCIETE_PAYS)
+        {
+            print '<input name="rcs" size="20" value="' . $conf->global->MAIN_INFO_RCS . '">';
+        }
+        else
+        {
+            print $countrynotdefined;
+        }
+        print '</td></tr>';
+    }
+
+    // TVA Intra
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("TVAIntra").'</td><td>';
+    print '<input name="tva" size="20" value="' . $conf->global->MAIN_INFO_TVAINTRA . '"></td></tr>';
+
+    print '</table>';
+
+    
+    
+    /*
+     *  Options fiscale
+     */
+    print '<br>';
+    print '<table class="noborder" width="100%">';
+    print '<tr class="liste_titre">';
+    print '<td>'.$langs->trans("VATManagement").'</td><td>'.$langs->trans("Description").'</td>';
+    print '<td align="right">&nbsp;</td>';
+    print "</tr>\n";
+    $var=true;
+    
+    $var=!$var;
+    print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" value=\"reel\"".($conf->global->FACTURE_TVAOPTION != "franchise"?" checked":"")."> ".$langs->trans("VATIsUsed")."</label></td>";
+    print '<td colspan="2">';
+    print "<table>";
+    print "<tr><td>".$langs->trans("VATIsUsedDesc")."</td></tr>";
+    print "<tr><td><i>".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."</i></td></tr>\n";
+    print "</table>";
+    print "</td></tr>\n";
+    
+    /* Je d�sactive cette option "facturation" car ce statut fiscal n'existe pas. Seul le r�el et franchise existe.
+    Cette option ne doit donc pas etre en "exclusif" avec l'option fiscale de gestion de tva. Peut etre faut-il
+    une option a part qui n'entre pas en conflit avec les choix "assuj�ti TVA" ou "non".
+    $var=!$var;
+    print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" value=\"facturation\"".($conf->global->FACTURE_TVAOPTION == "facturation"?" checked":"")."> Option facturation</label></td>";
+    print "<td colspan=\"2\">L'option 'facturation' est utilis�e par les entreprises qui payent la TVA � facturation (vente de mat�riel).</td></tr>\n";
+     */
+    
+    $var=!$var;
+    print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" value=\"franchise\"".($conf->global->FACTURE_TVAOPTION == "franchise"?" checked":"")."> ".$langs->trans("VATIsNotUsed")."</label></td>";
+    print '<td colspan="2">';
+    print "<table>";
+    print "<tr><td>".$langs->trans("VATIsNotUsedDesc")."</td></tr>";
+    print "<tr><td><i>".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."</i></td></tr>\n";
+    print "</table>";
+    print "</td></tr>\n";
+    
+    print "</table>";
+    
+
+
+    print '<br><center><input type="submit" class="button" value="'.$langs->trans("Save").'"></center>';
+    print '<br>';
+    
+    print '</form>';
+}
+else
+{
+    /*
+     * Affichage des param�tres
+     */
+	if ($message) print $message.'<br>';
+	
+    print '<table class="noborder" width="100%">';
+    print '<tr class="liste_titre"><td>'.$langs->trans("CompanyInfo").'</td><td>'.$langs->trans("Value").'</td></tr>';
+    $var=true;
+
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyName").'</td><td>' . $conf->global->MAIN_INFO_SOCIETE_NOM . '</td></tr>';
+
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyAddress").'</td><td>' . nl2br($conf->global->MAIN_INFO_SOCIETE_ADRESSE) . '</td></tr>';
+
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyZip").'</td><td>' . $conf->global->MAIN_INFO_SOCIETE_CP . '</td></tr>';
+
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyTown").'</td><td>' . $conf->global->MAIN_INFO_SOCIETE_VILLE . '</td></tr>';
+
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyCountry").'</td><td>';
+    print $form->pays_name($conf->global->MAIN_INFO_SOCIETE_PAYS,1);
+    print '</td></tr>';
+
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyCurrency").'</td><td>';
+    print $form->currency_name($conf->global->MAIN_MONNAIE,1);
+    print '</td></tr>';
+
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Tel").'</td><td>' . $conf->global->MAIN_INFO_SOCIETE_TEL . '</td></tr>';
+
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Fax").'</td><td>' . $conf->global->MAIN_INFO_SOCIETE_FAX . '</td></tr>';
+
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Mail").'</td><td>' . $conf->global->MAIN_INFO_SOCIETE_MAIL . '</td></tr>';
+
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Web").'</td><td>' . $conf->global->MAIN_INFO_SOCIETE_WEB . '</td></tr>';
+
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Logo").'</td><td>';
+    
+    print '<table width="100%" class="notopnoleftnoright"><tr><td valign="center">';
+    print $mysoc->logo;
+    print '</td><td valign="center" align="right">';
+    if ($mysoc->logo && file_exists($conf->societe->dir_logos.'/'.$mysoc->logo))
+    {
+        print '<img height="30" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.$mysoc->logo.'">';
+    }
+    else
+    {
+        print '<img height="30" src="'.DOL_URL_ROOT.'/theme/nophoto.jpg">';
+    }
+	print '</td></tr></table>';
+
+    print '</td></tr>';
+
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td width="35%" valign="top">'.$langs->trans("Note").'</td><td>' . nl2br($conf->global->MAIN_INFO_SOCIETE_NOTE) . '</td></tr>';
+
+    print '</table>';
+
+    print '<br>';
+
+    // Identifiants de la soci�t� (propre au pays)
+    print '<table class="noborder" width="100%">';
+    print '<tr class="liste_titre"><td>'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
+    $var=true;
+
+    // Recupere code pays
+    $code_pays=substr($langs->defaultlang,-2);    // Par defaut, pays de la localisation
+    if ($conf->global->MAIN_INFO_SOCIETE_PAYS)
+    {
+        $sql  = "SELECT code from ".MAIN_DB_PREFIX."c_pays";
+        $sql .= " WHERE rowid = ".$conf->global->MAIN_INFO_SOCIETE_PAYS;
+        $result=$db->query($sql);
+        if ($result)
+        {
+            $obj = $db->fetch_object();
+            if ($obj->code) $code_pays=$obj->code;
+        }
+        else {
+            dolibarr_print_error($db);
+        }
+    }
+
+    // Capital
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Capital").'</td><td>';
+    print $conf->global->MAIN_INFO_CAPITAL . '</td></tr>';
+
+    // Forme juridique
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("JuridicalStatus").'</td><td>';
+    print $form->forme_juridique_name($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE,1);
+    print '</td></tr>';
+
+    // ProfId1
+    if ($langs->transcountry("ProfId1",$code_pays) != '-')
+    {
+        $var=!$var;
+        print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId1",$code_pays).'</td><td>';
+        if ($langs->transcountry("ProfId1",$code_pays) != '-')
+        {
+            print $conf->global->MAIN_INFO_SIREN;
+        }
+        print '</td></tr>';
+    }
+    
+    // ProfId2
+    if ($langs->transcountry("ProfId2",$code_pays) != '-')
+    {
+        $var=!$var;
+        print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId2",$code_pays).'</td><td>';
+        if ($langs->transcountry("ProfId2",$code_pays) != '-')
+        {
+            print $conf->global->MAIN_INFO_SIRET;
+        }
+        print '</td></tr>';
+    }
+    
+    // ProfId3
+    if ($langs->transcountry("ProfId3",$code_pays) != '-')
+    {
+        $var=!$var;
+        print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId3",$code_pays).'</td><td>';
+        if ($langs->transcountry("ProfId3",$code_pays) != '-')
+        {
+            print $conf->global->MAIN_INFO_APE;
+        }
+        print '</td></tr>';
+    }
+    
+    // ProfId4
+    if ($langs->transcountry("ProfId4",$code_pays) != '-')
+    {
+        $var=!$var;
+        print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId4",$code_pays).'</td><td>';
+        if ($langs->transcountry("ProfId4",$code_pays) != '-')
+        {
+            print $conf->global->MAIN_INFO_RCS;
+        }
+        print '</td></tr>';
+    }
+    
+    // TVA Intracommunautaire
+    $var=!$var;
+    print '<tr '.$bc[$var].'><td>'.$langs->trans("TVAIntra").'</td><td>' . $conf->global->MAIN_INFO_TVAINTRA . '</td></tr>';
+
+    print '</table>';
+
+
+    /*
+     *  Options fiscale
+     */
+    print '<br>';
+    print '<table class="noborder" width="100%">';
+    print '<tr class="liste_titre">';
+    print '<td>'.$langs->trans("VATManagement").'</td><td>'.$langs->trans("Description").'</td>';
+    print '<td align="right">&nbsp;</td>';
+    print "</tr>\n";
+    $var=true;
+    
+    $var=!$var;
+    print "<tr ".$bc[$var]."><td width=\"140\"><label><input ".$bc[$var]." type=\"radio\" name=\"optiontva\" disabled value=\"reel\"".($conf->global->FACTURE_TVAOPTION != "franchise"?" checked":"")."> ".$langs->trans("VATIsUsed")."</label></td>";
+    print '<td colspan="2">';
+    print "<table>";
+    print "<tr><td>".$langs->trans("VATIsUsedDesc")."</td></tr>";
+    print "<tr><td><i>".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."</i></td></tr>\n";
+    print "</table>";
+    print "</td></tr>\n";
+    
+    /* Je d�sactive cette option "facturation" car ce statut fiscal n'existe pas. Seul le r�el et franchise existe.
+    Cette option ne doit donc pas etre en "exclusif" avec l'option fiscale de gestion de tva. Peut etre faut-il
+    une option a part qui n'entre pas en conflit avec les choix "assuj�ti TVA" ou "non".
+    $var=!$var;
+    print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" value=\"facturation\"".($conf->global->FACTURE_TVAOPTION == "facturation"?" checked":"")."> Option facturation</label></td>";
+    print "<td colspan=\"2\">L'option 'facturation' est utilis�e par les entreprises qui payent la TVA � facturation (vente de mat�riel).</td></tr>\n";
+     */
+    
+    $var=!$var;
+    print "<tr ".$bc[$var]."><td width=\"140\"><label><input ".$bc[$var]." type=\"radio\" name=\"optiontva\" disabled value=\"franchise\"".($conf->global->FACTURE_TVAOPTION == "franchise"?" checked":"")."> ".$langs->trans("VATIsNotUsed")."</label></td>";
+    print '<td colspan="2">';
+    print "<table>";
+    print "<tr><td>".$langs->trans("VATIsNotUsedDesc")."</td></tr>";
+    print "<tr><td><i>".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."</i></td></tr>\n";
+    print "</table>";
+    print "</td></tr>\n";
+    
+    print "</table>";
+    
+    
+    // Boutons d'action
+    print '<div class="tabsAction">';
+    print '<a class="tabAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Edit").'</a>';
+    print '</div>';
+    
+    print '<br>';
+}
+
+
+llxFooter('$Date$ - $Revision$');
+
+?>
diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php
index 529bea3fa6d..9d3bb889ffd 100644
--- a/htdocs/admin/compta.php
+++ b/htdocs/admin/compta.php
@@ -74,7 +74,7 @@ if ($_GET['action'] == 'delete')
  */
 
 $html=new Form($db);
-print_titre($langs->trans('ComptaSetup'));
+print_fiche_titre($langs->trans('ComptaSetup'),'','setup');
 
 
 print '<br>';
diff --git a/htdocs/admin/comptaexpert.php b/htdocs/admin/comptaexpert.php
index 78ab29da4cd..ff1bdde0896 100644
--- a/htdocs/admin/comptaexpert.php
+++ b/htdocs/admin/comptaexpert.php
@@ -74,7 +74,7 @@ if ($_GET['action'] == 'delete')
  */
 
 $html=new Form($db);
-print_titre($langs->trans('ComptaSetup'));
+print_fiche_titre($langs->trans('ComptaSetup'),'','setup');
 
 
 print '<br>';
diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php
index 0f13d391e80..ac12cdd658f 100644
--- a/htdocs/admin/const.php
+++ b/htdocs/admin/const.php
@@ -57,7 +57,7 @@ if ($_GET["action"] == 'delete')
 
 llxHeader();
 
-print_fiche_titre($langs->trans("OtherSetup"));
+print_fiche_titre($langs->trans("OtherSetup"),'','setup');
 
 print '<table class="noborder" width="100%">';
 print '<tr class="liste_titre">';
diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php
index e961e859083..3ff2075d18e 100644
--- a/htdocs/admin/delais.php
+++ b/htdocs/admin/delais.php
@@ -62,11 +62,11 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update')
 
 llxHeader();
 
-$form = new Form($db);
-$countrynotdefined='<font class="error">'.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')</font>';
+print_fiche_titre($langs->trans("DelaysOfToleranceBeforeWarning"),'','setup');
 
 
-print_fiche_titre($langs->trans("DelaysOfToleranceBeforeWarning"));
+$form = new Form($db);
+$countrynotdefined='<font class="error">'.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')</font>';
 
 print $langs->transnoentities("DelaysOfToleranceDesc",img_warning())."<br>\n";
 
diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php
index 794fb83571c..01b84620721 100644
--- a/htdocs/admin/dict.php
+++ b/htdocs/admin/dict.php
@@ -309,7 +309,7 @@ llxHeader();
  */
 if ($_GET["id"])
 {
-    print_fiche_titre($langs->trans("DictionnarySetup").' - '.$tablib[$_GET["id"]]);
+    print_fiche_titre($langs->trans("DictionnarySetup").' - '.$tablib[$_GET["id"]],'','setup');
 
     if ($msg) {
         print $msg.'<br>';
@@ -541,7 +541,7 @@ else
     /*
      * Affichage de la liste des dictionnaires
      */
-    print_fiche_titre($langs->trans("DictionnarySetup"));
+    print_fiche_titre($langs->trans("DictionnarySetup"),'','setup');
 
     $var=true;
     print '<table class="noborder" width="100%">';
@@ -569,6 +569,4 @@ print '<br>';
 $db->close();
 
 llxFooter('$Date$ - $Revision$');
-
-
 ?>
diff --git a/htdocs/admin/dons.php b/htdocs/admin/dons.php
index eca64731d95..4d98682e2bc 100644
--- a/htdocs/admin/dons.php
+++ b/htdocs/admin/dons.php
@@ -54,14 +54,14 @@ $dir = "../includes/modules/dons/";
 
 llxHeader('',$langs->trans("DonationsSetup"),'DonConfiguration');
 
-print_titre($langs->trans("DonationsSetup"));
+print_fiche_titre($langs->trans("DonationsSetup"),'','setup');
 
 
 /*
  *  PDF
  */
 print '<br>';
-print_titre("Mod�les de bon de dons");
+print_titre($langs->trans("DonationsModels"));
 
 print '<table class="noborder" width=\"100%\">';
 print '<tr class="liste_titre">';
diff --git a/htdocs/admin/energie.php b/htdocs/admin/energie.php
index ed2edbc0c3a..95ba7a832d2 100644
--- a/htdocs/admin/energie.php
+++ b/htdocs/admin/energie.php
@@ -59,7 +59,7 @@ llxHeader();
  *
  */
 
-print_titre($langs->trans("Energy"));
+print_fiche_titre($langs->trans("Energy"),'','setup');
 
 print '<br>';
 print '<form method="post" action="energie.php">';
diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php
index 938469c3d13..03404001492 100644
--- a/htdocs/admin/expedition.php
+++ b/htdocs/admin/expedition.php
@@ -167,7 +167,7 @@ if ($resql)
     }
 }
 
-print_titre($langs->trans("SendingMethod"));
+print_fiche_titre($langs->trans("SendingMethod"),'','setup');
 
 print '<table class="noborder" width="100%">';
 print '<tr class="liste_titre">';
diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php
index f9cda29dbae..578b3edb682 100644
--- a/htdocs/admin/external_rss.php
+++ b/htdocs/admin/external_rss.php
@@ -122,7 +122,7 @@ if ($_POST["delete"])
   
 llxHeader();
 
-print_fiche_titre($langs->trans("ExternalRSSSetup"), $mesg);
+print_fiche_titre($langs->trans("ExternalRSSSetup"), $mesg, 'setup');
 
 print '<form name="externalrssconfig" action="external_rss.php" method="post">';
 
diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php
index bae77fbf4b8..4aaf7bc928b 100644
--- a/htdocs/admin/facture.php
+++ b/htdocs/admin/facture.php
@@ -190,7 +190,7 @@ dolibarr_fiche_head($head, $hselected, $langs->trans("ModuleSetup"));
  *  Module num�rotation
  */
 
-print_titre($langs->trans("BillsNumberingModule"));
+print_fiche_titre($langs->trans("BillsNumberingModule"),'','setup');
 
 print '<table class="noborder" width="100%">';
 print '<tr class="liste_titre">';
diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php
index 08490d2b839..1c8ceaf4994 100644
--- a/htdocs/admin/fichinter.php
+++ b/htdocs/admin/fichinter.php
@@ -112,7 +112,7 @@ llxHeader();
 $dir=DOL_DOCUMENT_ROOT."/includes/modules/fichinter/";
 $html=new Form($db);
 
-print_titre($langs->trans("InterventionsSetup"));
+print_fiche_titre($langs->trans("InterventionsSetup"),'','setup');
 
 print "<br>";
 
diff --git a/htdocs/admin/fournisseur.php b/htdocs/admin/fournisseur.php
index 8ff3e967eb8..d527eab4b71 100644
--- a/htdocs/admin/fournisseur.php
+++ b/htdocs/admin/fournisseur.php
@@ -111,7 +111,7 @@ llxHeader();
 $dir = "../fourn/commande/modules/pdf/";
 $html=new Form($db);
 
-print_titre($langs->trans("OrdersSetup"));
+print_fiche_titre($langs->trans("OrdersSetup"),'','setup');
 
 print "<br>";
 
diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php
index e17f2a4f910..189190cf255 100644
--- a/htdocs/admin/ihm.php
+++ b/htdocs/admin/ihm.php
@@ -82,7 +82,7 @@ if (isset($_POST["action"]) && $_POST["action"] == 'update')
 
 llxHeader();
 
-print_fiche_titre($langs->trans("GUISetup"));
+print_fiche_titre($langs->trans("GUISetup"),'','setup');
 
 
 if (isset($_GET["action"]) && $_GET["action"] == 'edit')
diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php
index 89dfa00dc80..ed305cef4a8 100644
--- a/htdocs/admin/index.php
+++ b/htdocs/admin/index.php
@@ -34,67 +34,6 @@ $langs->load("companies");
 if (!$user->admin)
   accessforbidden();
 
-if ( (isset($_POST["action"]) && $_POST["action"] == 'update')
-  || (isset($_POST["action"]) && $_POST["action"] == 'updateedit') )
-{
-    dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOM",$_POST["nom"]);
-    dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADRESSE",$_POST["address"]);
-    dolibarr_set_const($db, "MAIN_INFO_SOCIETE_VILLE",$_POST["ville"]);
-    dolibarr_set_const($db, "MAIN_INFO_SOCIETE_CP",$_POST["cp"]);
-    dolibarr_set_const($db, "MAIN_INFO_SOCIETE_PAYS",$_POST["pays_id"]);
-    dolibarr_set_const($db, "MAIN_MONNAIE",$_POST["currency"]);
-    dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TEL",$_POST["tel"]);
-    dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FAX",$_POST["fax"]);
-    dolibarr_set_const($db, "MAIN_INFO_SOCIETE_MAIL",$_POST["mail"]);
-    dolibarr_set_const($db, "MAIN_INFO_SOCIETE_WEB",$_POST["web"]);
-    dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOTE",$_POST["note"]);
-    if ($_FILES["logo"]["tmp_name"])
-    {
-        if (eregi('([^\\\/:]+)$',$_FILES["logo"]["name"],$reg))
-        {
-            $original_file=$reg[1];
-
-            dolibarr_syslog("Move file ".$_FILES["logo"]["tmp_name"]." to ".$conf->societe->dir_logos.'/'.$original_file);
-	        if (! is_dir($conf->societe->dir_logos))
-	        {
-	            create_exdir($conf->societe->dir_logos);
-    		}        
-            if (doliMoveFileUpload($_FILES["logo"]["tmp_name"],$conf->societe->dir_logos.'/'.$original_file))
-            {
-                dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO",$original_file);
-            }
-			else
-            {
-                $message .= '<div class="error">'.$langs->trans("ErrorFailedToSaveFile").'</div>';
-            }
-				
-        }
-    }
-
-    dolibarr_set_const($db, "MAIN_INFO_CAPITAL",$_POST["capital"]);
-    dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FORME_JURIDIQUE",$_POST["forme_juridique_code"]);
-    dolibarr_set_const($db, "MAIN_INFO_SIREN",$_POST["siren"]);
-    dolibarr_set_const($db, "MAIN_INFO_SIRET",$_POST["siret"]);
-    dolibarr_set_const($db, "MAIN_INFO_APE",$_POST["ape"]);
-    dolibarr_set_const($db, "MAIN_INFO_RCS",$_POST["rcs"]);
-    dolibarr_set_const($db, "MAIN_INFO_TVAINTRA",$_POST["tva"]);
-
-    dolibarr_set_const($db, "FACTURE_TVAOPTION",$_POST["optiontva"]);
-
-    if ($_POST['action'] != 'updateedit')
-    {
-        Header("Location: index.php");
-        exit;
-    }
-}
-
-if ($_GET["action"] == 'removelogo')
-{
-	$logofile=$conf->societe->dir_logos.'/'.$mysoc->logo;
-	@unlink($logofile);
-    dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO");
-}
-
 
 
 /*
@@ -104,481 +43,26 @@ if ($_GET["action"] == 'removelogo')
 llxHeader();
 
 $form = new Form($db);
-$countrynotdefined='<font class="error">'.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')</font>';
-
-
-print_fiche_titre($langs->trans("CompanySetup"));
-
-
-if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
- || (isset($_POST["action"]) && $_POST["action"] == 'updateedit') )
-{
-    /**
-     * Edition des param�tres
-     */
-    if ($conf->use_javascript)
-    {
-        print '
-        <script language="javascript" type="text/javascript">
-        <!--
-        function save_refresh()
-        {
-        	document.form_index.action.value="updateedit";
-        	document.form_index.submit();
-        //	location.href = "index.php?action=updateedit";
-        }
-        -->
-        </script>
-        ';
-    }
-    
-    print '<form enctype="multipart/form-data" method="post" action="index.php" name="form_index">';
-    print '<input type="hidden" name="action" value="update">';
-    $var=true;
-
-    print '<table class="noborder" width="100%">';
-    print '<tr class="liste_titre"><td width="35%">'.$langs->trans("CompanyInfo").'</td><td>'.$langs->trans("Value").'</td></tr>';
-
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyName").'</td><td>';
-    print '<input name="nom" value="'. $conf->global->MAIN_INFO_SOCIETE_NOM . '"></td></tr>';
-
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyAddress").'</td><td>';
-    print '<textarea name="address" cols="50" rows="'.ROWS_2.'">'. $conf->global->MAIN_INFO_SOCIETE_ADRESSE . '</textarea></td></tr>';
-
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyZip").'</td><td>';
-    print '<input name="cp" value="'. $conf->global->MAIN_INFO_SOCIETE_CP . '"></td></tr>';
-
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyTown").'</td><td>';
-    print '<input name="ville" value="'. $conf->global->MAIN_INFO_SOCIETE_VILLE . '"></td></tr>';
-
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td>'.$langs->trans("Country").'</td><td>';
-    $form->select_pays($conf->global->MAIN_INFO_SOCIETE_PAYS,'pays_id',($conf->use_javascript?' onChange="save_refresh()"':''));
-    print '</td></tr>';
-
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyCurrency").'</td><td>';
-    $form->select_currency($conf->global->MAIN_MONNAIE,"currency");
-    print '</td></tr>';
-
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td>'.$langs->trans("Tel").'</td><td>';
-    print '<input name="tel" value="'. $conf->global->MAIN_INFO_SOCIETE_TEL . '"></td></tr>';
-    print '</td></tr>';
-
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td>'.$langs->trans("Fax").'</td><td>';
-    print '<input name="fax" value="'. $conf->global->MAIN_INFO_SOCIETE_FAX . '"></td></tr>';
-    print '</td></tr>';
-
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td>'.$langs->trans("Mail").'</td><td>';
-    print '<input name="mail" value="'. $conf->global->MAIN_INFO_SOCIETE_MAIL . '"></td></tr>';
-    print '</td></tr>';
-
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td>'.$langs->trans("Web").'</td><td>';
-    print '<input name="web" value="'. $conf->global->MAIN_INFO_SOCIETE_WEB . '"></td></tr>';
-    print '</td></tr>';
-
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td>'.$langs->trans("Logo").' (png,jpg)</td><td>';
-    print '<table width="100%" class="notopnoleftnoright"><tr><td valign="center">';
-    print '<input type="file" class="flat" name="logo" size="30">';
-    print '</td><td valign="middle" align="right">';
-    if ($mysoc->logo && file_exists($conf->societe->dir_logos.'/'.$mysoc->logo))
-    {
-        print '<a href="'.$_SERVER["PHP_SELF"].'?action=removelogo">'.img_delete($langs->trans("Delete")).'</a>';
-        print ' &nbsp; ';
-        print '<img height="30" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.$mysoc->logo.'">';
-    }
-    else
-    {
-        print '<img height="30" src="'.DOL_URL_ROOT.'/theme/nophoto.jpg">';
-    }
-	print '</td></tr></table>';
-    print '</td></tr>';
-
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td valign="top">'.$langs->trans("Note").'</td><td>';
-    print '<textarea class="flat" name="note" cols="60" rows="'.ROWS_4.'">'.$conf->global->MAIN_INFO_SOCIETE_NOTE.'</textarea></td></tr>';
-    print '</td></tr>';
-
-    print '</table>';
-
-    print '<br>';
-
-    // Identifiants de la soci�t� (propre au pays)
-    print '<table class="noborder" width="100%">';
-    print '<tr class="liste_titre"><td>'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
-    $var=true;
-
-    $langs->load("companies");
-
-    // Recupere code pays
-    $code_pays=substr($langs->defaultlang,-2);    // Par defaut, pays de la localisation
-    if ($conf->global->MAIN_INFO_SOCIETE_PAYS)
-    {
-        $sql  = "SELECT code from ".MAIN_DB_PREFIX."c_pays";
-        $sql .= " WHERE rowid = ".$conf->global->MAIN_INFO_SOCIETE_PAYS;
-        $resql=$db->query($sql);
-        if ($resql) {
-            $obj = $db->fetch_object($resql);
-            if ($obj->code) $code_pays=$obj->code;
-        }
-        else {
-            dolibarr_print_error($db);
-        }
-    }
-
-    // Capital
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Capital").'</td><td>';
-    print '<input name="capital" size="20" value="' . $conf->global->MAIN_INFO_CAPITAL . '"></td></tr>';
-
-    // Forme juridique
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td>'.$langs->trans("JuridicalStatus").'</td><td>';
-    if ($conf->global->MAIN_INFO_SOCIETE_PAYS)
-    {
-        $form->select_forme_juridique($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE,$code_pays);
-    }
-    else
-    {
-        print $countrynotdefined;
-    }
-    print '</td></tr>';
-
-    // ProfID1
-    if ($langs->transcountry("ProfId1",$code_pays) != '-')
-    {
-        $var=!$var;
-        print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId1",$code_pays).'</td><td>';
-        if ($conf->global->MAIN_INFO_SOCIETE_PAYS)
-        {
-            print '<input name="siren" size="20" value="' . $conf->global->MAIN_INFO_SIREN . '">';
-        }
-        else
-        {
-            print $countrynotdefined;
-        }
-        print '</td></tr>';
-    }
-
-    // ProfId2
-    if ($langs->transcountry("ProfId2",$code_pays) != '-')
-    {
-        $var=!$var;
-        print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId2",$code_pays).'</td><td>';
-        if ($conf->global->MAIN_INFO_SOCIETE_PAYS)
-        {
-            print '<input name="siret" size="20" value="' . $conf->global->MAIN_INFO_SIRET . '">';
-        }
-        else
-        {
-            print $countrynotdefined;
-        }
-        print '</td></tr>';
-    }
-
-    // ProfId3
-    if ($langs->transcountry("ProfId3",$code_pays) != '-')
-    {
-        $var=!$var;
-        print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId3",$code_pays).'</td><td>';
-        if ($conf->global->MAIN_INFO_SOCIETE_PAYS)
-        {
-            print '<input name="ape" size="20" value="' . $conf->global->MAIN_INFO_APE . '">';
-        }
-        else
-        {
-            print $countrynotdefined;
-        }
-        print '</td></tr>';
-    }
-
-    // ProfId4
-    if ($langs->transcountry("ProfId4",$code_pays) != '-')
-    {
-        $var=!$var;
-        print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId4",$code_pays).'</td><td>';
-        if ($conf->global->MAIN_INFO_SOCIETE_PAYS)
-        {
-            print '<input name="rcs" size="20" value="' . $conf->global->MAIN_INFO_RCS . '">';
-        }
-        else
-        {
-            print $countrynotdefined;
-        }
-        print '</td></tr>';
-    }
-
-    // TVA Intra
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("TVAIntra").'</td><td>';
-    print '<input name="tva" size="20" value="' . $conf->global->MAIN_INFO_TVAINTRA . '"></td></tr>';
-
-    print '</table>';
-
-    
-    
-    /*
-     *  Options fiscale
-     */
-    print '<br>';
-    print '<table class="noborder" width="100%">';
-    print '<tr class="liste_titre">';
-    print '<td>'.$langs->trans("VATManagement").'</td><td>'.$langs->trans("Description").'</td>';
-    print '<td align="right">&nbsp;</td>';
-    print "</tr>\n";
-    $var=true;
-    
-    $var=!$var;
-    print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" value=\"reel\"".($conf->global->FACTURE_TVAOPTION != "franchise"?" checked":"")."> ".$langs->trans("VATIsUsed")."</label></td>";
-    print '<td colspan="2">';
-    print "<table>";
-    print "<tr><td>".$langs->trans("VATIsUsedDesc")."</td></tr>";
-    print "<tr><td><i>".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."</i></td></tr>\n";
-    print "</table>";
-    print "</td></tr>\n";
-    
-    /* Je d�sactive cette option "facturation" car ce statut fiscal n'existe pas. Seul le r�el et franchise existe.
-    Cette option ne doit donc pas etre en "exclusif" avec l'option fiscale de gestion de tva. Peut etre faut-il
-    une option a part qui n'entre pas en conflit avec les choix "assuj�ti TVA" ou "non".
-    $var=!$var;
-    print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" value=\"facturation\"".($conf->global->FACTURE_TVAOPTION == "facturation"?" checked":"")."> Option facturation</label></td>";
-    print "<td colspan=\"2\">L'option 'facturation' est utilis�e par les entreprises qui payent la TVA � facturation (vente de mat�riel).</td></tr>\n";
-     */
-    
-    $var=!$var;
-    print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" value=\"franchise\"".($conf->global->FACTURE_TVAOPTION == "franchise"?" checked":"")."> ".$langs->trans("VATIsNotUsed")."</label></td>";
-    print '<td colspan="2">';
-    print "<table>";
-    print "<tr><td>".$langs->trans("VATIsNotUsedDesc")."</td></tr>";
-    print "<tr><td><i>".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."</i></td></tr>\n";
-    print "</table>";
-    print "</td></tr>\n";
-    
-    print "</table>";
-    
-
-
-    print '<br><center><input type="submit" class="button" value="'.$langs->trans("Save").'"></center>';
-    print '<br>';
-    
-    print '</form>';
-}
-else
-{
-    /*
-     * Affichage des param�tres
-     */
-	if ($message) print $message.'<br>';
-	
-    print '<table class="noborder" width="100%">';
-    print '<tr class="liste_titre"><td>'.$langs->trans("CompanyInfo").'</td><td>'.$langs->trans("Value").'</td></tr>';
-    $var=true;
-
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyName").'</td><td>' . $conf->global->MAIN_INFO_SOCIETE_NOM . '</td></tr>';
 
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyAddress").'</td><td>' . nl2br($conf->global->MAIN_INFO_SOCIETE_ADRESSE) . '</td></tr>';
 
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyZip").'</td><td>' . $conf->global->MAIN_INFO_SOCIETE_CP . '</td></tr>';
+print_fiche_titre($langs->trans("SetupArea"),'','setup');
 
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyTown").'</td><td>' . $conf->global->MAIN_INFO_SOCIETE_VILLE . '</td></tr>';
+if ($message) print $message.'<br>';
 
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyCountry").'</td><td>';
-    print $form->pays_name($conf->global->MAIN_INFO_SOCIETE_PAYS,1);
-    print '</td></tr>';
+print "<br>";
+print $langs->trans("SetupDescription1")."<br>";
+print $langs->trans("AreaForAdminOnly").' '.img_picto($langs->trans("Administrator"),'star').'<br>';
 
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("CompanyCurrency").'</td><td>';
-    print $form->currency_name($conf->global->MAIN_MONNAIE,1);
-    print '</td></tr>';
+print "<br>";
+print $langs->trans("SetupDescription2")."<br>";
+print "<br>";
+print img_picto('','puce').' '.$langs->trans("SetupDescription3")."<br>";
+print "<br>";
+print img_picto('','puce').' '.$langs->trans("SetupDescription4")."<br>";
+print "<br>";
 
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Tel").'</td><td>' . $conf->global->MAIN_INFO_SOCIETE_TEL . '</td></tr>';
-
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Fax").'</td><td>' . $conf->global->MAIN_INFO_SOCIETE_FAX . '</td></tr>';
-
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Mail").'</td><td>' . $conf->global->MAIN_INFO_SOCIETE_MAIL . '</td></tr>';
-
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Web").'</td><td>' . $conf->global->MAIN_INFO_SOCIETE_WEB . '</td></tr>';
-
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Logo").'</td><td>';
     
-    print '<table width="100%" class="notopnoleftnoright"><tr><td valign="center">';
-    print $mysoc->logo;
-    print '</td><td valign="center" align="right">';
-    if ($mysoc->logo && file_exists($conf->societe->dir_logos.'/'.$mysoc->logo))
-    {
-        print '<img height="30" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.$mysoc->logo.'">';
-    }
-    else
-    {
-        print '<img height="30" src="'.DOL_URL_ROOT.'/theme/nophoto.jpg">';
-    }
-	print '</td></tr></table>';
-
-    print '</td></tr>';
-
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td width="35%" valign="top">'.$langs->trans("Note").'</td><td>' . nl2br($conf->global->MAIN_INFO_SOCIETE_NOTE) . '</td></tr>';
-
-    print '</table>';
-
-    print '<br>';
-
-    // Identifiants de la soci�t� (propre au pays)
-    print '<table class="noborder" width="100%">';
-    print '<tr class="liste_titre"><td>'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
-    $var=true;
-
-    // Recupere code pays
-    $code_pays=substr($langs->defaultlang,-2);    // Par defaut, pays de la localisation
-    if ($conf->global->MAIN_INFO_SOCIETE_PAYS)
-    {
-        $sql  = "SELECT code from ".MAIN_DB_PREFIX."c_pays";
-        $sql .= " WHERE rowid = ".$conf->global->MAIN_INFO_SOCIETE_PAYS;
-        $result=$db->query($sql);
-        if ($result)
-        {
-            $obj = $db->fetch_object();
-            if ($obj->code) $code_pays=$obj->code;
-        }
-        else {
-            dolibarr_print_error($db);
-        }
-    }
-
-    // Capital
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("Capital").'</td><td>';
-    print $conf->global->MAIN_INFO_CAPITAL . '</td></tr>';
-
-    // Forme juridique
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("JuridicalStatus").'</td><td>';
-    print $form->forme_juridique_name($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE,1);
-    print '</td></tr>';
-
-    // ProfId1
-    if ($langs->transcountry("ProfId1",$code_pays) != '-')
-    {
-        $var=!$var;
-        print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId1",$code_pays).'</td><td>';
-        if ($langs->transcountry("ProfId1",$code_pays) != '-')
-        {
-            print $conf->global->MAIN_INFO_SIREN;
-        }
-        print '</td></tr>';
-    }
-    
-    // ProfId2
-    if ($langs->transcountry("ProfId2",$code_pays) != '-')
-    {
-        $var=!$var;
-        print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId2",$code_pays).'</td><td>';
-        if ($langs->transcountry("ProfId2",$code_pays) != '-')
-        {
-            print $conf->global->MAIN_INFO_SIRET;
-        }
-        print '</td></tr>';
-    }
-    
-    // ProfId3
-    if ($langs->transcountry("ProfId3",$code_pays) != '-')
-    {
-        $var=!$var;
-        print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId3",$code_pays).'</td><td>';
-        if ($langs->transcountry("ProfId3",$code_pays) != '-')
-        {
-            print $conf->global->MAIN_INFO_APE;
-        }
-        print '</td></tr>';
-    }
-    
-    // ProfId4
-    if ($langs->transcountry("ProfId4",$code_pays) != '-')
-    {
-        $var=!$var;
-        print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId4",$code_pays).'</td><td>';
-        if ($langs->transcountry("ProfId4",$code_pays) != '-')
-        {
-            print $conf->global->MAIN_INFO_RCS;
-        }
-        print '</td></tr>';
-    }
-    
-    // TVA Intracommunautaire
-    $var=!$var;
-    print '<tr '.$bc[$var].'><td>'.$langs->trans("TVAIntra").'</td><td>' . $conf->global->MAIN_INFO_TVAINTRA . '</td></tr>';
-
-    print '</table>';
-
-
-    /*
-     *  Options fiscale
-     */
-    print '<br>';
-    print '<table class="noborder" width="100%">';
-    print '<tr class="liste_titre">';
-    print '<td>'.$langs->trans("VATManagement").'</td><td>'.$langs->trans("Description").'</td>';
-    print '<td align="right">&nbsp;</td>';
-    print "</tr>\n";
-    $var=true;
-    
-    $var=!$var;
-    print "<tr ".$bc[$var]."><td width=\"140\"><label><input ".$bc[$var]." type=\"radio\" name=\"optiontva\" disabled value=\"reel\"".($conf->global->FACTURE_TVAOPTION != "franchise"?" checked":"")."> ".$langs->trans("VATIsUsed")."</label></td>";
-    print '<td colspan="2">';
-    print "<table>";
-    print "<tr><td>".$langs->trans("VATIsUsedDesc")."</td></tr>";
-    print "<tr><td><i>".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."</i></td></tr>\n";
-    print "</table>";
-    print "</td></tr>\n";
-    
-    /* Je d�sactive cette option "facturation" car ce statut fiscal n'existe pas. Seul le r�el et franchise existe.
-    Cette option ne doit donc pas etre en "exclusif" avec l'option fiscale de gestion de tva. Peut etre faut-il
-    une option a part qui n'entre pas en conflit avec les choix "assuj�ti TVA" ou "non".
-    $var=!$var;
-    print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" value=\"facturation\"".($conf->global->FACTURE_TVAOPTION == "facturation"?" checked":"")."> Option facturation</label></td>";
-    print "<td colspan=\"2\">L'option 'facturation' est utilis�e par les entreprises qui payent la TVA � facturation (vente de mat�riel).</td></tr>\n";
-     */
-    
-    $var=!$var;
-    print "<tr ".$bc[$var]."><td width=\"140\"><label><input ".$bc[$var]." type=\"radio\" name=\"optiontva\" disabled value=\"franchise\"".($conf->global->FACTURE_TVAOPTION == "franchise"?" checked":"")."> ".$langs->trans("VATIsNotUsed")."</label></td>";
-    print '<td colspan="2">';
-    print "<table>";
-    print "<tr><td>".$langs->trans("VATIsNotUsedDesc")."</td></tr>";
-    print "<tr><td><i>".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."</i></td></tr>\n";
-    print "</table>";
-    print "</td></tr>\n";
-    
-    print "</table>";
-    
-    
-    // Boutons d'action
-    print '<div class="tabsAction">';
-    print '<a class="tabAction" href="index.php?action=edit">'.$langs->trans("Edit").'</a>';
-    print '</div>';
-    
-    print '<br>';
-}
-
+print '<br>';
 
 llxFooter('$Date$ - $Revision$');
-
 ?>
diff --git a/htdocs/admin/ldap.php b/htdocs/admin/ldap.php
index 38cb796b4fb..7c9981d5fa0 100644
--- a/htdocs/admin/ldap.php
+++ b/htdocs/admin/ldap.php
@@ -161,7 +161,7 @@ if ($_GET["action"] == 'setvalue' && $user->admin)
 
 llxHeader();
 
-print_titre($langs->trans("LDAPSetup"));
+print_fiche_titre($langs->trans("LDAPSetup"),'','setup');
 
 // Test si fonction LDAP actives
 if (! function_exists("ldap_connect"))
diff --git a/htdocs/admin/livraison.php b/htdocs/admin/livraison.php
index 79e5f45ab58..9572d213c64 100644
--- a/htdocs/admin/livraison.php
+++ b/htdocs/admin/livraison.php
@@ -137,7 +137,7 @@ dolibarr_fiche_head($head, $hselected, $langs->trans("ModuleSetup"));
  *  Module num�rotation
  */
 
-print_titre($langs->trans("DeliveryOrderNumberingModules"));
+print_fiche_titre($langs->trans("DeliveryOrderNumberingModules"),'','setup');
 
 print '<table class="noborder" width="100%">';
 print '<tr class="liste_titre">';
diff --git a/htdocs/admin/mailing.php b/htdocs/admin/mailing.php
index 652b248289f..a61c21d0c18 100644
--- a/htdocs/admin/mailing.php
+++ b/htdocs/admin/mailing.php
@@ -57,7 +57,7 @@ if ($_POST["action"] == 'setvalue' && $user->admin)
 
 llxHeader();
 
-print_titre($langs->trans("MailingSetup"));
+print_fiche_titre($langs->trans("MailingSetup"),'','setup');
 
 if ($mesg) print '<br>'.$mesg;
 
diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php
index 76deaaee672..b487243cf14 100644
--- a/htdocs/admin/modules.php
+++ b/htdocs/admin/modules.php
@@ -145,6 +145,9 @@ function UnActivate($value,$requiredby=1)
  
 llxHeader("","");
 
+print_fiche_titre($langs->trans("ModulesSetup"),'','setup');
+
+
 $h = 0;
 
 $head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=0";
diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php
index 9ae8b473ee6..73f5d5716af 100644
--- a/htdocs/admin/notification.php
+++ b/htdocs/admin/notification.php
@@ -57,7 +57,7 @@ if ($_POST["action"] == 'setvalue' && $user->admin)
 
 llxHeader();
 
-print_titre($langs->trans("NotificationSetup"));
+print_fiche_titre($langs->trans("NotificationSetup"),'','setup');
 
 if ($mesg) print '<br>'.$mesg;
 
diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php
index 10f78f95136..0281716fec0 100644
--- a/htdocs/admin/perms.php
+++ b/htdocs/admin/perms.php
@@ -51,6 +51,8 @@ if ($_GET["action"] == 'remove')
 
 llxHeader();
 
+print_fiche_titre($langs->trans("SecuritySetup"),'','setup');
+
 
 $h = 0;
 
diff --git a/htdocs/admin/pre.inc.php b/htdocs/admin/pre.inc.php
index 7b36afa0ee7..a215fe56ca7 100644
--- a/htdocs/admin/pre.inc.php
+++ b/htdocs/admin/pre.inc.php
@@ -42,12 +42,12 @@ function llxHeader($head = "", $title="", $help_url='')
   $langs->load("admin");
   $langs->load("users");
   
-  $menu->add(DOL_URL_ROOT."/admin/index.php", $langs->trans("MenuCompanySetup"));
-
-  $menu->add(DOL_URL_ROOT."/admin/ihm.php", $langs->trans("GUISetup"));
+  $menu->add(DOL_URL_ROOT."/admin/company.php", $langs->trans("MenuCompanySetup"));
 
   $menu->add(DOL_URL_ROOT."/admin/modules.php", $langs->trans("Modules"));
 
+  $menu->add(DOL_URL_ROOT."/admin/ihm.php", $langs->trans("GUISetup"));
+
   $menu->add(DOL_URL_ROOT."/admin/boxes.php", $langs->trans("Boxes"));
   
   $menu->add(DOL_URL_ROOT."/admin/delais.php",$langs->trans("Alerts"));
diff --git a/htdocs/admin/produit.php b/htdocs/admin/produit.php
index 48f5ab69328..0efc145292e 100644
--- a/htdocs/admin/produit.php
+++ b/htdocs/admin/produit.php
@@ -156,7 +156,7 @@ else if ($_POST["action"] == 'viewProdDescInForm')
 llxHeader('',$langs->trans("ProductSetup"));
 
 
-print_titre($langs->trans("ProductSetup"));
+print_fiche_titre($langs->trans("ProductSetup"),'','setup');
 
 $html=new Form($db);
 $var=true;
diff --git a/htdocs/admin/propale.php b/htdocs/admin/propale.php
index a4f57bae890..fc621a447a7 100644
--- a/htdocs/admin/propale.php
+++ b/htdocs/admin/propale.php
@@ -164,7 +164,7 @@ $dir = "../includes/modules/propale/";
 $html=new Form($db);
 
 
-print_titre($langs->trans("PropalSetup"));
+print_fiche_titre($langs->trans("PropalSetup"),'','setup');
 
 /*
  *  Module num�rotation
diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php
index 40b7781bedf..056b233efa8 100644
--- a/htdocs/admin/security.php
+++ b/htdocs/admin/security.php
@@ -57,6 +57,8 @@ if ($_GET["action"] == 'setgeneraterule')
 
 llxHeader();
 
+print_fiche_titre($langs->trans("SecuritySetup"),'','setup');
+
 
 $h = 0;
 
diff --git a/htdocs/admin/societe.php b/htdocs/admin/societe.php
index 5d1367b1fb7..58e5fd5298c 100644
--- a/htdocs/admin/societe.php
+++ b/htdocs/admin/societe.php
@@ -76,7 +76,7 @@ $form=new Form($db);
 
 llxHeader();
 
-print_titre($langs->trans("CompanySetup"));
+print_fiche_titre($langs->trans("CompanySetup"),'','setup');
 
 print "<br>";
 
diff --git a/htdocs/admin/sqltables.php b/htdocs/admin/sqltables.php
deleted file mode 100644
index b7a680ce5bd..00000000000
--- a/htdocs/admin/sqltables.php
+++ /dev/null
@@ -1,81 +0,0 @@
-<?php
-/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
- *
- * 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id$
- * $Source$
- *
- */
-
-/*!	\file htdocs/admin/sqltables.php
-		\brief      Page d'administration/configuration des tables sql
-		\version    $Revision$
-*/
-
-require("./pre.inc.php");
-
-$langs->load("admin");
-
-if (!$user->admin)
-  accessforbidden();
-
-
-llxHeader();
-
-print_barre_liste("Liste des tables", $page, "sqltables.php");
-
-$sql = "SELECT name, loaded FROM ".MAIN_DB_PREFIX."sqltables";
-
-print "<table class=\"noborder\" width=\"100%\">";
-print '<tr class="liste_titre">';
-print '<td>'.$langs->trans("Name").'</td>';
-print '<td align="center">Charg�e</td>';
-print '<td align="center">'.$langs->trans("Action").'</td>';
-  print "</tr>\n";
- 
-if ( $db->query($sql) ) {
-  $num = $db->num_rows();
-  $i = 0;
-
-  $var=True;
-  while ($i < $num) {
-    $objp = $db->fetch_object();
-    $var=!$var;
-    print "<tr $bc[$var]>";
-    print "<td>$objp->name</td>\n";
-    print '<td align="center">'.$objp->loaded."</td>\n";
-
-    if ($objp->loaded) 
-      {
-	print '<td align="center"><a href="'.$PHPSELF.'?action=drop">Supprimer</td>';
-      }
-    else 
-      {
-	print '<td align="center"><a href="'.$PHPSELF.'?action=create">Cr�er</td>';
-      }
-    print "</tr>\n";
-    $i++;
-  }
-  $db->free();
-}
-
-print "</table>";
-
-
-$db->close();
-
-llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>");
-?>
diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php
index 5401bdce19f..b862cada5a9 100644
--- a/htdocs/admin/syslog.php
+++ b/htdocs/admin/syslog.php
@@ -36,7 +36,7 @@ $langs->load("other");
 
 llxHeader();
 
-print_titre($langs->trans("SyslogSetup"));
+print_fiche_titre($langs->trans("SyslogSetup"),'','setup');
 print '<br>';
 
 $def = array();
diff --git a/htdocs/admin/system/constall.php b/htdocs/admin/system/constall.php
index a35b41ca13f..9bbbc2ad8e8 100644
--- a/htdocs/admin/system/constall.php
+++ b/htdocs/admin/system/constall.php
@@ -20,7 +20,8 @@
  * $Source$
  */
 
-/*!	\file htdocs/admin/system/constall.php
+/**
+		\file 		htdocs/admin/system/constall.php
 		\brief      Page d'info de toutes les constantes
 		\version    $Revision$
 */
@@ -36,7 +37,7 @@ if (!$user->admin)
 
 llxHeader();
 
-print_titre($langs->trans("SummaryConst"));
+print_fiche_titre($langs->trans("SummaryConst"),'','setup');
 
 print '<br>';
 print '<table class="noborder">';
diff --git a/htdocs/admin/system/database-tables-contraintes.php b/htdocs/admin/system/database-tables-contraintes.php
index a9cf331c37f..10e3c716c2d 100644
--- a/htdocs/admin/system/database-tables-contraintes.php
+++ b/htdocs/admin/system/database-tables-contraintes.php
@@ -40,8 +40,7 @@ accessforbidden();
 
 llxHeader();
 
-
-print_titre($langs->trans("Constraints"));
+print_fiche_titre($langs->trans("Constraints"),'','setup');
 
 $base=0;
 if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli')
diff --git a/htdocs/admin/system/database-tables.php b/htdocs/admin/system/database-tables.php
index 85ca4d575bc..44f28a6839b 100644
--- a/htdocs/admin/system/database-tables.php
+++ b/htdocs/admin/system/database-tables.php
@@ -46,7 +46,7 @@ if ($_GET["action"] == 'convert')
 llxHeader();
 
 
-print_titre($langs->trans("Tables")." ".ucfirst($conf->db->type));
+print_fiche_titre($langs->trans("Tables")." ".ucfirst($conf->db->type),'','setup');
 
 $base=0;
 if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli')
diff --git a/htdocs/admin/system/database.php b/htdocs/admin/system/database.php
index 78900f78ce5..6030cec3349 100644
--- a/htdocs/admin/system/database.php
+++ b/htdocs/admin/system/database.php
@@ -40,7 +40,7 @@ if (!$user->admin)
 
 llxHeader();
 
-print_titre($langs->trans("DatabaseConfiguration"));
+print_fiche_titre($langs->trans("DatabaseConfiguration"),'','setup');
 
 $base=0;
 if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli')
diff --git a/htdocs/admin/system/dbtable.php b/htdocs/admin/system/dbtable.php
index e486309fb76..f4812de22b4 100644
--- a/htdocs/admin/system/dbtable.php
+++ b/htdocs/admin/system/dbtable.php
@@ -41,7 +41,7 @@ if (!$user->admin)
 llxHeader();
 
 
-print_titre($langs->trans("Table") . " ".$_GET["table"]);
+print_fiche_titre($langs->trans("Table") . " ".$_GET["table"],'','setup');
 
 if ($conf->db->type == 'mysql')
 {
diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php
index b3299409cd3..07f8fe49aa0 100644
--- a/htdocs/admin/system/dolibarr.php
+++ b/htdocs/admin/system/dolibarr.php
@@ -33,8 +33,7 @@ if (!$user->admin)
 
 llxHeader();
 
-
-print_titre("Dolibarr");
+print_fiche_titre("Dolibarr",'','setup');
 
 print "<br>\n";
 
diff --git a/htdocs/admin/system/index.php b/htdocs/admin/system/index.php
index ac40339d117..ac0dfbd1a4e 100644
--- a/htdocs/admin/system/index.php
+++ b/htdocs/admin/system/index.php
@@ -1,6 +1,6 @@
 <?php
 /* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
- * Copyright (C) 2004-2005 Laurent Destailleur  <eldy@users.sourceforge.net>
+ * Copyright (C) 2004-2006 Laurent Destailleur  <eldy@users.sourceforge.net>
  *
  * 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,16 +32,18 @@ include_once $dolibarr_main_document_root."/lib/databases/".$conf->db->type.".li
 $langs->load("admin");
 $langs->load("user");
 
-
 if (!$user->admin)
   accessforbidden();
 
+
 llxHeader();
 
-print_titre($langs->trans("SummarySystem"));
+print_fiche_titre($langs->trans("SummarySystem"),'','setup');
 
 print "<br>\n";
 
+print info_admin($langs->trans("SystemInfoDesc")).'<br>';
+
 print '<table class="noborder" width="100%">';
 print "<tr class=\"liste_titre\"><td colspan=\"2\">Dolibarr</td></tr>\n";
 print "<tr $bc[0]><td width=\"240\">".$langs->trans("Version")."</td><td>" . DOL_VERSION . "</td></tr>\n";
diff --git a/htdocs/admin/system/os.php b/htdocs/admin/system/os.php
index cf7e2e32db6..9af662ae1dc 100644
--- a/htdocs/admin/system/os.php
+++ b/htdocs/admin/system/os.php
@@ -35,7 +35,7 @@ if (!$user->admin)
 
 llxHeader();
 
-print_titre("OS");
+print_fiche_titre("OS",'','setup');
 
 print "<br>\n";
 
diff --git a/htdocs/admin/system/phpinfo.php b/htdocs/admin/system/phpinfo.php
index 4431d86aef5..9a89c5b2846 100644
--- a/htdocs/admin/system/phpinfo.php
+++ b/htdocs/admin/system/phpinfo.php
@@ -36,10 +36,35 @@ if (!$user->admin)
 
 llxHeader();
 
+/* Style phpinfo
+body {background-color: #ffffff; color: #000000;}
+body, td, th, h1, h2 {font-family: sans-serif;}
+pre {margin: 0px; font-family: monospace;}
+
+a:link {color: #000099; text-decoration: none; background-color: #ffffff;}
+a:hover {text-decoration: underline;}
+table {border-collapse: collapse;}
+.center {text-align: center;}
+.center table { margin-left: auto; margin-right: auto; text-align: left;}
+.center th { text-align: center !important; }
+
+td, th { border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}
+h1 {font-size: 150%;}
+h2 {font-size: 125%;}
+.p {text-align: left;}
+.e {background-color: #ccccff; font-weight: bold; color: #000000;}
+.h {background-color: #9999cc; font-weight: bold; color: #000000;}
+.v {background-color: #cccccc; color: #000000;}
+.vr {background-color: #cccccc; text-align: right; color: #000000;}
+img {float: right; border: 0px;}
+hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000000;}
+*/
+
 ob_start(); 
 
 if ($_GET["what"] == 'conf')
 {
+  $title=$langs->trans("Setup");
   phpinfo(INFO_CONFIGURATION);
 }
 elseif ($_GET["what"] == 'env')
@@ -65,12 +90,15 @@ $chaine = eregi_replace('background-color: #ffffff;','',$chaine);
 $chaine = eregi_replace('.*<style','<style',$chaine);
 $chaine = eregi_replace('<title>.*<body>','',$chaine);
 $chaine = eregi_replace('<title>.*<body>','',$chaine);
-$chaine = eregi_replace('a:link.*underline','',$chaine);
+$chaine = eregi_replace('a:link {[^}]*}','',$chaine);
+$chaine = eregi_replace('a:hover {[^}]*}','',$chaine);
+$chaine = eregi_replace('td, th {[^}]*}','',$chaine);
+$chaine = eregi_replace('img {[^}]*}','',$chaine);
 $chaine = eregi_replace('table.*important; }','',$chaine);
 $chaine = eregi_replace('<hr />','',$chaine);
 $chaine = eregi_replace('</body></html>','',$chaine);
 $chaine = eregi_replace('body, td, th, h1, h2 {font-family: sans-serif;}','',$chaine);
-$chaine = eregi_replace('cellpadding="3" ','cellpadding="1" cellspacing="1"',$chaine);
+$chaine = eregi_replace('cellpadding="3" ','cellpadding="1" cellspacing="1" ',$chaine);
 $chaine = eregi_replace('class="h"','class="liste_titre"',$chaine);
 $chaine = eregi_replace('<th colspan="2">','<td>',$chaine);
 $chaine = eregi_replace('th>','td>',$chaine);
@@ -83,9 +111,11 @@ $chaine = eregi_replace('</h2>','</div>',$chaine);
 $chaine = eregi_replace('<td class="e">','<td class="impair">',$chaine);
 $chaine = eregi_replace('<td class="v">','<td class="pair">',$chaine);
  
+$chaine = eregi_replace('<div class="titre">Configuration</div><br>','',$chaine);
+ 
 if (isset($title))
 {
-    print_titre($title);
+    print_fiche_titre($title,'','setup');
     print '<br>';
 }
 
diff --git a/htdocs/admin/system/pre.inc.php b/htdocs/admin/system/pre.inc.php
index ed5f8e6c4b9..9801db63567 100644
--- a/htdocs/admin/system/pre.inc.php
+++ b/htdocs/admin/system/pre.inc.php
@@ -1,8 +1,8 @@
 <?php
 /* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
- * Copyright (C) 2004 Laurent Destailleur  <eldy@users.sourceforge.net>
- * Copyright (C) 2004 Sebastien Di Cintio  <sdicintio@ressource-toi.org>
- * Copyright (C) 2004 Benoit Mortier			 <benoit.mortier@opensides.be>
+ * Copyright (C) 2004-2006 Laurent Destailleur  <eldy@users.sourceforge.net>
+ * Copyright (C) 2004      Sebastien Di Cintio  <sdicintio@ressource-toi.org>
+ * Copyright (C) 2004      Benoit Mortier       <benoit.mortier@opensides.be>
  *
  * 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
@@ -22,44 +22,45 @@
  * $Source$
  */
 
-/*!	\file htdocs/admin/system/pre.inc.php
-		\brief      Gestionnaire menu page infos syst�me
+/**
+		\file 		htdocs/admin/system/pre.inc.php
+		\brief      Fichier gestionnaire menu page infos syst�me
 		\version    $Revision$
 */
 
 require("../../main.inc.php");
 
-function llxHeader($head = "", $urlp = "") {
+function llxHeader($head = "", $urlp = "")
+{
     global $langs;
 
     $langs->load("admin");
-    
-    /*
-    *
-    *
-    */
-    top_menu($head);
-    
+
+	
+	top_menu($head);
+       
     $menu = new Menu();
     
     $menu->add(DOL_URL_ROOT."/admin/system/index.php", $langs->trans("Summary"));
     
+    // Dolibarr
     $menu->add(DOL_URL_ROOT."/admin/system/dolibarr.php", "Dolibarr");
     $menu->add_submenu(DOL_URL_ROOT."/admin/system/constall.php", $langs->trans("AllParameters"));
     $menu->add_submenu(DOL_URL_ROOT."/about.php", $langs->trans("About"));
     
+    // OS
     $menu->add(DOL_URL_ROOT."/admin/system/os.php", $langs->trans("OS"));
     
+    // Web server
     $menu->add(DOL_URL_ROOT."/admin/system/web.php", $langs->trans("WebServer"));
     
+    // PHP
     $menu->add(DOL_URL_ROOT."/admin/system/phpinfo.php", $langs->trans("Php"));
-    
     $menu->add_submenu(DOL_URL_ROOT."/admin/system/phpinfo.php?what=conf", $langs->trans("PhpConf"));
-    
     $menu->add_submenu(DOL_URL_ROOT."/admin/system/phpinfo.php?what=env", $langs->trans("PhpEnv"));
-    
     $menu->add_submenu(DOL_URL_ROOT."/admin/system/phpinfo.php?what=modules", $langs->trans("PhpModules"));
     
+	// Database
     $menu->add(DOL_URL_ROOT."/admin/system/database.php", $langs->trans("Database"));
     $menu->add_submenu(DOL_URL_ROOT."/admin/system/database-tables.php", $langs->trans("Tables"));
     $menu->add_submenu(DOL_URL_ROOT."/admin/system/database-tables-contraintes.php", $langs->trans("Constraints"));
diff --git a/htdocs/admin/system/web.php b/htdocs/admin/system/web.php
index e3aabf4e939..7435d798500 100644
--- a/htdocs/admin/system/web.php
+++ b/htdocs/admin/system/web.php
@@ -1,5 +1,5 @@
 <?php
-/* Copyright (C) 2004-2005 Laurent Destailleur  <eldy@users.sourceforge.net>
+/* Copyright (C) 2004-2006 Laurent Destailleur  <eldy@users.sourceforge.net>
  *
  * 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
@@ -35,7 +35,7 @@ if (!$user->admin)
 
 llxHeader();
 
-print_titre($langs->trans("WebServer"));
+print_fiche_titre($langs->trans("WebServer"),'','setup');
 
 print "<br>\n";
 
diff --git a/htdocs/admin/triggers.php b/htdocs/admin/triggers.php
index 3fbc74ebfcb..45244026f1c 100644
--- a/htdocs/admin/triggers.php
+++ b/htdocs/admin/triggers.php
@@ -1,5 +1,5 @@
 <?php
-/* Copyright (C) 2005 Laurent Destailleur  <eldy@users.sourceforge.net>
+/* Copyright (C) 2005-2006 Laurent Destailleur  <eldy@users.sourceforge.net>
  *
  * 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
@@ -106,7 +106,7 @@ function UnActivate($value)
 llxHeader("","");
 
 
-print_fiche_titre($langs->trans("TriggersAvailable"));
+print_fiche_titre($langs->trans("TriggersAvailable"),'','setup');
 
 print $langs->trans("TriggersDesc")."<br>";
 print "<br>\n";
diff --git a/htdocs/admin/webcalendar.php b/htdocs/admin/webcalendar.php
index 7e50d5791c1..fe2b812ea13 100644
--- a/htdocs/admin/webcalendar.php
+++ b/htdocs/admin/webcalendar.php
@@ -139,7 +139,7 @@ elseif ($actiontest)
 
 llxHeader();
 
-print_titre($langs->trans("WebCalSetup"));
+print_fiche_titre($langs->trans("WebCalSetup"),'','setup');
 print '<br>';
 
 
diff --git a/htdocs/conf/conf.class.php b/htdocs/conf/conf.class.php
index 11142b2b0ae..91653e75915 100644
--- a/htdocs/conf/conf.class.php
+++ b/htdocs/conf/conf.class.php
@@ -2,6 +2,7 @@
 /* Copyright (C) 2003      Rodolphe Quiedeville <rodolphe@quiedeville.org>
  * Copyright (C) 2003      Xavier Dutoit        <doli@sydesy.com>
  * Copyright (C) 2004-2006 Laurent Destailleur  <eldy@users.sourceforge.net>
+ * Copyright (C) 2006 	   Jean Heimburger   	<jean@tiaris.info>
  *
  * 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
@@ -62,6 +63,7 @@ class Conf
     var $webcal;
     var $propal;
     var $categorie;
+	var $oscommerce2;
 
 
 	/**
diff --git a/htdocs/includes/menus/barre_left/eldy_backoffice.php b/htdocs/includes/menus/barre_left/eldy_backoffice.php
index e5cb8029c98..b652a1f2053 100644
--- a/htdocs/includes/menus/barre_left/eldy_backoffice.php
+++ b/htdocs/includes/menus/barre_left/eldy_backoffice.php
@@ -119,9 +119,9 @@ class MenuLeft {
                   $langs->load("admin");
 
                   $newmenu->add(DOL_URL_ROOT."/admin/index.php?leftmenu=setup", $langs->trans("Setup"));
-                  if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/index.php", $langs->trans("MenuCompanySetup"));
-                  if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/ihm.php", $langs->trans("GUISetup"));
+                  if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/company.php", $langs->trans("MenuCompanySetup"));
                   if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/modules.php", $langs->trans("Modules"));
+                  if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/ihm.php", $langs->trans("GUISetup"));
                   if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/boxes.php", $langs->trans("Boxes"));
                   if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/delais.php",$langs->trans("Alerts"));
 
diff --git a/htdocs/includes/menus/barre_left/eldy_frontoffice.php b/htdocs/includes/menus/barre_left/eldy_frontoffice.php
index 24610e06050..45133eddc41 100644
--- a/htdocs/includes/menus/barre_left/eldy_frontoffice.php
+++ b/htdocs/includes/menus/barre_left/eldy_frontoffice.php
@@ -121,9 +121,9 @@ class MenuLeft {
                   $langs->load("admin");
 
                   $newmenu->add(DOL_URL_ROOT."/admin/index.php?leftmenu=setup", $langs->trans("Setup"));
-                  if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/index.php", $langs->trans("MenuCompanySetup"));
-                  if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/ihm.php", $langs->trans("GUISetup"));
+                  if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/company.php", $langs->trans("MenuCompanySetup"));
                   if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/modules.php", $langs->trans("Modules"));
+                  if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/ihm.php", $langs->trans("GUISetup"));
                   if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/boxes.php", $langs->trans("Boxes"));
                   if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/delais.php",$langs->trans("Alerts"));
 
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index fd858aa7472..1f4d4e7f4bc 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -11,6 +11,8 @@ InternalUsers=Internal users
 ExternalUsers=External users
 GlobalSetup=Global setup
 GUISetup=Display
+SetupArea=Setup area
+SecuritySetup=Security setup
 ErrorModuleRequirePHPVersion=Error, this module require PHP version %s or higher
 DictionnarySetup=Dictionnary setup
 DisableJavascript=Disable javascript functions
@@ -65,6 +67,7 @@ OtherDeveloppers=Other developers/contributors
 OfficialWebSite=Internationnal official web site
 OfficialWebSiteFr=French official web site
 ModuleSetup=Module setup
+ModulesSetup=Modules setup
 ModuleFamilyBase=System
 ModuleFamilyCrm=Customer Ressource Management (CRM)
 ModuleFamilyProducts=Products Management
@@ -368,6 +371,12 @@ DelaysOfToleranceSupplierBillsToPay=Tol
 DelaysOfToleranceCustomerBillsUnpayed=Tol�rance de retard avant alerte (en jours) sur services expir�s
 DelaysOfToleranceTransactionsToConciliate=Tol�rance de retard avant alerte (en jours) sur rapprochements bancaires � faire
 DelaysOfToleranceMembers=Tol�rance de retard avant alerte (en jours) sur cotisations adh�rents en retard
+SetupDescription1=All parameters available in setup area allows you to setup Dolibarr before starting using it.
+SetupDescription2=The 2 most important setup steps are 2 first ones in left setup menu, this means Company/fundation setup page and Modules setup page:
+SetupDescription3=<b>Company/fundation</b> setup is required because input informations are used on dolibarr displays and to modify dolibarr behaviour (for example for features according to your country).
+SetupDescription4=<b>Modules</b> setup is required because Dolibarr is not a simple ERP/CRM but a sum of several modules, all more or less independant. It's only after activating modules you're interesting in that you will see features appeared in Dolibarr menu.
+AreaForAdminOnly=This features can be used by administrator users only. Administrator features and help are identified in Dolibarr by the following picto:
+SystemInfoDesc=System informations are miscellanous technical informations you get in read only mode and visible for administrators only.
 ##### Users setup #####
 UserGroupSetup=Users and groups module setup
 GeneratePassword=Suggest a generated password
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index f2a79aaa6bd..fb3adc51820 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -195,6 +195,7 @@ ActionsToDo=Actions to do
 ActionsDone=Actions done
 ActionsToDoShort=To do
 ActionsDoneShort=Done
+CompanyFundation=Company/Fundation
 ContactsForCompany=Contacts for company
 ActionsOnCompany=Actions about company
 NActions=%s actions
diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang
index 5a1b55e0778..c42647cb6a6 100644
--- a/htdocs/langs/fr_FR/admin.lang
+++ b/htdocs/langs/fr_FR/admin.lang
@@ -11,6 +11,8 @@ InternalUsers=Utilisateurs internes
 ExternalUsers=Utilisateurs externes
 GlobalSetup=G�n�ral
 GUISetup=Affichage
+SetupArea=Espace configuration
+SecuritySetup=Configuration de la s�curit�
 ErrorModuleRequirePHPVersion=Erreur, ce module requiert une version %s ou sup�rieure de PHP
 DictionnarySetup=Dictionnaires
 DisableJavascript=D�sactiver les fonctions javascript
@@ -65,6 +67,7 @@ OtherDeveloppers=Autres d
 OfficialWebSite=Site web officiel internationnal
 OfficialWebSiteFr=Site web officiel francophone
 ModuleSetup=Configuration du module
+ModulesSetup=Configuration des modules
 ModuleFamilyBase=Syst�me
 ModuleFamilyCrm=Gestion client (CRM)
 ModuleFamilyProducts=Gestion produits
@@ -337,7 +340,7 @@ DefaultLanguage=Langue par d
 EnableMultilangInterface=Activer l'interface multi-langage
 PermanentLeftSearchForm=Zone de recherche permanente du menu de gauche
 SystemSuccessfulyUpdated=Votre syst�me a �t� correctement mis � jour
-CompanyInfo=Informations sur la soci�t�/association
+CompanyInfo=Informations sur la soci�t�/institution
 CompanyIds=Identifiants r�glementaires
 CompanyName=Nom/Enseigne/Raison sociale
 CompanyAddress=Adresse
@@ -368,6 +371,12 @@ DelaysOfToleranceSupplierBillsToPay=Tol
 DelaysOfToleranceCustomerBillsUnpayed=Tol�rance de retard avant alerte (en jours) sur services expir�s
 DelaysOfToleranceTransactionsToConciliate=Tol�rance de retard avant alerte (en jours) sur rapprochements bancaires � faire
 DelaysOfToleranceMembers=Tol�rance de retard avant alerte (en jours) sur cotisations adh�rents en retard
+SetupDescription1=Toute les options de l'espace configuration sont des options permettant de configurer Dolibarr avant de commencer sont utilisation.
+SetupDescription2=Les 2 �tapes indispensables de configuration sont les 2 premi�res dans le menu gauche, � savoir, la configuration de la soci�t�/institution et la configuration des modules:
+SetupDescription3=La configuration <b>Soci�t�/institution</b> � g�rer est requise car les informations saisies sont utilis�s en affichage ou pour modifier le comportement de Dolibarr (comme par exemple des fonctions qui d�pendent de votre pays).
+SetupDescription4=La configuration <b>Modules</b> est indispensable car Dolibarr n'est pas un ERP/CRM monolithique mais un ensemble de modules tous plus ou moins ind�pendant. C'est apr�s avoir activ� les modules qui vous int�ressent que vous verez apparaitre les fonctionnalit�s dans les menus de Dolibarr.
+AreaForAdminOnly=Ces fonctions ne sont accessibles qu'� un utilisateur administrateur. La fonction d'administrateur et les aides pour les administrateurs sont identifi�es dans Dolibarr par le picto suivant:
+SystemInfoDesc=Les informations syst�mes sont des informations techniques diverses accessibles en lecture seule aux administrateurs uniquement.
 ##### Users setup #####
 UserGroupSetup=Configuration module utilisateurs et groupes
 GeneratePassword=Proposer un mot de passe g�n�r�
diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang
index 3c21b30de0c..61b883027a1 100644
--- a/htdocs/langs/fr_FR/main.lang
+++ b/htdocs/langs/fr_FR/main.lang
@@ -195,6 +195,7 @@ ActionsToDo=Actions 
 ActionsDone=Actions effectu�es
 ActionsToDoShort=� faire
 ActionsDoneShort=Effectu�es
+CompanyFundation=Soci�t� ou institution
 ContactsForCompany=Contacts de cette soci�t�
 ActionsOnCompany=Actions vis � vis de cette soci�t�
 NActions=%s actions
diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php
index a320ed4635e..0b7cf6bfba5 100644
--- a/htdocs/lib/functions.inc.php
+++ b/htdocs/lib/functions.inc.php
@@ -1531,12 +1531,16 @@ function print_titre($titre)
 		\brief  Affichage d'un titre d'une fiche, align� a gauche
 		\param	titre			Le titre a afficher
 		\param	mesg			Message supl�mentaire � afficher � droite
+		\param	picto			Picto pour ligne de titre
 */
-function print_fiche_titre($titre, $mesg='')
+function print_fiche_titre($titre, $mesg='', $picto='')
 {
     print "\n";
-    print '<table width="100%" border="0" class="notopnoleftnoright">';
-    print '<tr><td class="notopnoleftnoright"><div class="titre">'.$titre.'</div></td>';
+    print '<table width="100%" border="0" class="notopnoleftnoright"><tr>';
+	if ($picto) print '<td width="24" align="left" valign="middle">'.img_picto('',$picto).'</td>';
+    print '<td class="notopnoleftnoright" valign="middle">';
+    print '<div class="titre">'.$titre.'</div>';
+    print '</td>';
     if (strlen($mesg))
     {
         print '<td align="right" valign="middle"><b>'.$mesg.'</b></td>';
diff --git a/htdocs/oscommerce_ws/includes/configure.php b/htdocs/oscommerce_ws/includes/configure.php
index 1e957d53185..7d19b7c8c8e 100644
--- a/htdocs/oscommerce_ws/includes/configure.php
+++ b/htdocs/oscommerce_ws/includes/configure.php
@@ -7,8 +7,8 @@
 ----------------------------------------------*/
 
 //base url des webservices
-define(OSCWS_DIR,'http://osc-tiaris/ws_OSC/');
-//define(OSCWS_DIR,'http://osc.tiaris.info/ws_OSC/');
+//define(OSCWS_DIR,'http://osc-tiaris/ws_OSC/');
+define(OSCWS_DIR,'http://osc.tiaris.info/ws_OSC/');
 //affichages dans la page d'accueil
 define(OSC_MAXNBCOM, 5);
 define(OSC_ORDWAIT,'4'); // code du statut de commande en attente
diff --git a/htdocs/theme/dev/img/puce.png b/htdocs/theme/dev/img/puce.png
new file mode 100644
index 0000000000000000000000000000000000000000..dfa83acd50d7f973b4db1a8251c956644ec2cf5a
GIT binary patch
literal 1187
zcmeAS@N?(olHy`uVBq!ia0vp^0zk~e!3-p0EYEHRQo1Fs5hcz=sfi_-`FRQ<nYpP9
z#fiCk3dRa4FO&5Yj0_A+6%356jLfY}O%=2a3=Is*Z&aoNHL{m@`ns}T<zZ&h)X)}f
zTLTp0EbxddW?<m@0K$w;YfNSU1zFM^eH|GXHuiJ>Nn~YUU}gyL32`;_iZTpJwhW50
z49d2Q%C<}{b_z;%0+PwqPT4@z;sr#-JzmvQg0hQ)s^<i?0MXK@?CK~W*|Rok%GTtb
zrO8wFCeHz)W7#b|**#0MmmVu_=_y`%uDYkEx@S)HoUPSs&sA@|*3#3{(le)J?Xi}v
z=X$2h=~=q9XYaKsTaV3|vvkhdt#kICTe|n!(qs459y_;nF9;mFcJCYzT)TGe-t%+!
z-k*E^{@U~B*Pg$>2L#VS;5`t0hk*az|Br&v5Fj}O7{A@G0_F|Zk|4iek~L$|z_97v
zMhl>Ub39!fLn>~Wp3CJvq#(dva9t^Pwy$@PSG7d;6x*IG)t-ASzyHl&8T^u;z1+U<
z@dbvTyS8PXo14$h@^sBLFRpF-+zV!(3X9_O`<&h27M;y3@Q1Cy>%X~26+_0-OCQ-(
zPs%({TM}gO+34^I=j{S^b3|1fkICOPK4+=TZR9q&yS>g+QS!{<x7s$>=6}*Wm}#|o
k{>R`2b0cRye$4!qKix>`o0yrJG|-(4p00i_>zopr0AiJDQvd(}

literal 0
HcmV?d00001

diff --git a/htdocs/theme/dolibarr/img/puce.png b/htdocs/theme/dolibarr/img/puce.png
new file mode 100644
index 0000000000000000000000000000000000000000..dfa83acd50d7f973b4db1a8251c956644ec2cf5a
GIT binary patch
literal 1187
zcmeAS@N?(olHy`uVBq!ia0vp^0zk~e!3-p0EYEHRQo1Fs5hcz=sfi_-`FRQ<nYpP9
z#fiCk3dRa4FO&5Yj0_A+6%356jLfY}O%=2a3=Is*Z&aoNHL{m@`ns}T<zZ&h)X)}f
zTLTp0EbxddW?<m@0K$w;YfNSU1zFM^eH|GXHuiJ>Nn~YUU}gyL32`;_iZTpJwhW50
z49d2Q%C<}{b_z;%0+PwqPT4@z;sr#-JzmvQg0hQ)s^<i?0MXK@?CK~W*|Rok%GTtb
zrO8wFCeHz)W7#b|**#0MmmVu_=_y`%uDYkEx@S)HoUPSs&sA@|*3#3{(le)J?Xi}v
z=X$2h=~=q9XYaKsTaV3|vvkhdt#kICTe|n!(qs459y_;nF9;mFcJCYzT)TGe-t%+!
z-k*E^{@U~B*Pg$>2L#VS;5`t0hk*az|Br&v5Fj}O7{A@G0_F|Zk|4iek~L$|z_97v
zMhl>Ub39!fLn>~Wp3CJvq#(dva9t^Pwy$@PSG7d;6x*IG)t-ASzyHl&8T^u;z1+U<
z@dbvTyS8PXo14$h@^sBLFRpF-+zV!(3X9_O`<&h27M;y3@Q1Cy>%X~26+_0-OCQ-(
zPs%({TM}gO+34^I=j{S^b3|1fkICOPK4+=TZR9q&yS>g+QS!{<x7s$>=6}*Wm}#|o
k{>R`2b0cRye$4!qKix>`o0yrJG|-(4p00i_>zopr0AiJDQvd(}

literal 0
HcmV?d00001

diff --git a/htdocs/theme/eldy/img/puce.png b/htdocs/theme/eldy/img/puce.png
new file mode 100644
index 0000000000000000000000000000000000000000..dfa83acd50d7f973b4db1a8251c956644ec2cf5a
GIT binary patch
literal 1187
zcmeAS@N?(olHy`uVBq!ia0vp^0zk~e!3-p0EYEHRQo1Fs5hcz=sfi_-`FRQ<nYpP9
z#fiCk3dRa4FO&5Yj0_A+6%356jLfY}O%=2a3=Is*Z&aoNHL{m@`ns}T<zZ&h)X)}f
zTLTp0EbxddW?<m@0K$w;YfNSU1zFM^eH|GXHuiJ>Nn~YUU}gyL32`;_iZTpJwhW50
z49d2Q%C<}{b_z;%0+PwqPT4@z;sr#-JzmvQg0hQ)s^<i?0MXK@?CK~W*|Rok%GTtb
zrO8wFCeHz)W7#b|**#0MmmVu_=_y`%uDYkEx@S)HoUPSs&sA@|*3#3{(le)J?Xi}v
z=X$2h=~=q9XYaKsTaV3|vvkhdt#kICTe|n!(qs459y_;nF9;mFcJCYzT)TGe-t%+!
z-k*E^{@U~B*Pg$>2L#VS;5`t0hk*az|Br&v5Fj}O7{A@G0_F|Zk|4iek~L$|z_97v
zMhl>Ub39!fLn>~Wp3CJvq#(dva9t^Pwy$@PSG7d;6x*IG)t-ASzyHl&8T^u;z1+U<
z@dbvTyS8PXo14$h@^sBLFRpF-+zV!(3X9_O`<&h27M;y3@Q1Cy>%X~26+_0-OCQ-(
zPs%({TM}gO+34^I=j{S^b3|1fkICOPK4+=TZR9q&yS>g+QS!{<x7s$>=6}*Wm}#|o
k{>R`2b0cRye$4!qKix>`o0yrJG|-(4p00i_>zopr0AiJDQvd(}

literal 0
HcmV?d00001

diff --git a/htdocs/theme/freelug/img/puce.png b/htdocs/theme/freelug/img/puce.png
new file mode 100644
index 0000000000000000000000000000000000000000..dfa83acd50d7f973b4db1a8251c956644ec2cf5a
GIT binary patch
literal 1187
zcmeAS@N?(olHy`uVBq!ia0vp^0zk~e!3-p0EYEHRQo1Fs5hcz=sfi_-`FRQ<nYpP9
z#fiCk3dRa4FO&5Yj0_A+6%356jLfY}O%=2a3=Is*Z&aoNHL{m@`ns}T<zZ&h)X)}f
zTLTp0EbxddW?<m@0K$w;YfNSU1zFM^eH|GXHuiJ>Nn~YUU}gyL32`;_iZTpJwhW50
z49d2Q%C<}{b_z;%0+PwqPT4@z;sr#-JzmvQg0hQ)s^<i?0MXK@?CK~W*|Rok%GTtb
zrO8wFCeHz)W7#b|**#0MmmVu_=_y`%uDYkEx@S)HoUPSs&sA@|*3#3{(le)J?Xi}v
z=X$2h=~=q9XYaKsTaV3|vvkhdt#kICTe|n!(qs459y_;nF9;mFcJCYzT)TGe-t%+!
z-k*E^{@U~B*Pg$>2L#VS;5`t0hk*az|Br&v5Fj}O7{A@G0_F|Zk|4iek~L$|z_97v
zMhl>Ub39!fLn>~Wp3CJvq#(dva9t^Pwy$@PSG7d;6x*IG)t-ASzyHl&8T^u;z1+U<
z@dbvTyS8PXo14$h@^sBLFRpF-+zV!(3X9_O`<&h27M;y3@Q1Cy>%X~26+_0-OCQ-(
zPs%({TM}gO+34^I=j{S^b3|1fkICOPK4+=TZR9q&yS>g+QS!{<x7s$>=6}*Wm}#|o
k{>R`2b0cRye$4!qKix>`o0yrJG|-(4p00i_>zopr0AiJDQvd(}

literal 0
HcmV?d00001

diff --git a/htdocs/theme/yellow/img/puce.png b/htdocs/theme/yellow/img/puce.png
new file mode 100644
index 0000000000000000000000000000000000000000..dfa83acd50d7f973b4db1a8251c956644ec2cf5a
GIT binary patch
literal 1187
zcmeAS@N?(olHy`uVBq!ia0vp^0zk~e!3-p0EYEHRQo1Fs5hcz=sfi_-`FRQ<nYpP9
z#fiCk3dRa4FO&5Yj0_A+6%356jLfY}O%=2a3=Is*Z&aoNHL{m@`ns}T<zZ&h)X)}f
zTLTp0EbxddW?<m@0K$w;YfNSU1zFM^eH|GXHuiJ>Nn~YUU}gyL32`;_iZTpJwhW50
z49d2Q%C<}{b_z;%0+PwqPT4@z;sr#-JzmvQg0hQ)s^<i?0MXK@?CK~W*|Rok%GTtb
zrO8wFCeHz)W7#b|**#0MmmVu_=_y`%uDYkEx@S)HoUPSs&sA@|*3#3{(le)J?Xi}v
z=X$2h=~=q9XYaKsTaV3|vvkhdt#kICTe|n!(qs459y_;nF9;mFcJCYzT)TGe-t%+!
z-k*E^{@U~B*Pg$>2L#VS;5`t0hk*az|Br&v5Fj}O7{A@G0_F|Zk|4iek~L$|z_97v
zMhl>Ub39!fLn>~Wp3CJvq#(dva9t^Pwy$@PSG7d;6x*IG)t-ASzyHl&8T^u;z1+U<
z@dbvTyS8PXo14$h@^sBLFRpF-+zV!(3X9_O`<&h27M;y3@Q1Cy>%X~26+_0-OCQ-(
zPs%({TM}gO+34^I=j{S^b3|1fkICOPK4+=TZR9q&yS>g+QS!{<x7s$>=6}*Wm}#|o
k{>R`2b0cRye$4!qKix>`o0yrJG|-(4p00i_>zopr0AiJDQvd(}

literal 0
HcmV?d00001

diff --git a/mysql/data/data.sql b/mysql/data/data.sql
index d256233fbc9..4f21ae98bd9 100644
--- a/mysql/data/data.sql
+++ b/mysql/data/data.sql
@@ -44,8 +44,6 @@ insert into llx_cond_reglement(rowid, code, sortorder, active, libelle, libelle_
 insert into llx_cond_reglement(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (6,'PROFORMA',    6,1, 'Proforma','R�glement avant livraison',0,0);
 
 
-insert into llx_sqltables (name, loaded) values ('llx_album',0);
-
 --
 -- D�finition des actions de workflow notifications
 --
diff --git a/mysql/migration/2.0.0-2.1.0.sql b/mysql/migration/2.0.0-2.1.0.sql
index 93aa282f462..3157077fe33 100644
--- a/mysql/migration/2.0.0-2.1.0.sql
+++ b/mysql/migration/2.0.0-2.1.0.sql
@@ -341,3 +341,6 @@ alter table llx_propal drop column fk_soc_contact;
 alter table llx_c_pays modify libelle varchar(50) NOT NULL;
 
 insert into llx_action_def (rowid,code,titre,description,objet_type) values (3,'NOTIFY_VAL_ORDER_SUUPLIER','Validation commande fournisseur','D�clench� lors de la validation d\'une commande fournisseur','order_supplier');
+
+
+drop table if exists sqltables;
diff --git a/mysql/tables/llx_sqltables.sql b/mysql/tables/llx_sqltables.sql
deleted file mode 100644
index 66cb0d3b83d..00000000000
--- a/mysql/tables/llx_sqltables.sql
+++ /dev/null
@@ -1,29 +0,0 @@
--- ============================================================================
--- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
---
--- 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
--- the Free Software Foundation; either version 2 of the License, or
--- (at your option) any later version.
---
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--- GNU General Public License for more details.
---
--- You should have received a copy of the GNU General Public License
--- along with this program; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
---
--- $Id$
--- $Source$
---
--- ============================================================================
-
-create table llx_sqltables
-(
-  rowid    integer AUTO_INCREMENT PRIMARY KEY,
-  name     varchar(255),
-  loaded   tinyint(1)
-)type=innodb;
-
-- 
GitLab