diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php
index 7dd98aae349ae9720ab49ef67f9764fe2d1fe8c5..389d49f7312b61b46a635da77416b913049e9ea7 100755
--- a/htdocs/comm/action/document.php
+++ b/htdocs/comm/action/document.php
@@ -27,7 +27,7 @@
  *       \version    $Id$
  */
 
-require_once("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/agenda.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php");
 require_once(DOL_DOCUMENT_ROOT."/cactioncomm.class.php");
diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php
index cb9657eb7c8bf93e844062a7b7fbf252aa99b00f..40a9e7cdbb620b8d8d2cfec1810961156d1a173b 100644
--- a/htdocs/comm/action/fiche.php
+++ b/htdocs/comm/action/fiche.php
@@ -26,7 +26,7 @@
  *       \version    $Id$
  */
 
-require_once("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/agenda.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php");
 require_once(DOL_DOCUMENT_ROOT."/user/user.class.php");
diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php
index 574f88c0730628518064b030eed82f69a89eb22c..5f32cce8721322a46ef9b5be1a03ce21a1b3b239 100644
--- a/htdocs/comm/action/index.php
+++ b/htdocs/comm/action/index.php
@@ -26,7 +26,7 @@
  *	\version    $Id$
  */
 
-require_once("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php");
 require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/date.lib.php");
diff --git a/htdocs/comm/action/info.php b/htdocs/comm/action/info.php
index 07d9f29ffc50c1bcb7e789f075639b84b69bc240..cf87274a33857c7329f28ee7f0d514a832ba7e98 100644
--- a/htdocs/comm/action/info.php
+++ b/htdocs/comm/action/info.php
@@ -24,7 +24,7 @@
  *		\version    $Id$
  */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/agenda.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php");
diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php
index 8448e99af9da73d4eb8e9bab0c1a9010e5802974..c496bb644351dcef31453fe4b4162a1b833e192e 100644
--- a/htdocs/comm/action/listactions.php
+++ b/htdocs/comm/action/listactions.php
@@ -26,7 +26,7 @@
  *		\version    $Id$
  */
 
-require_once("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php");
 require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/date.lib.php");
diff --git a/htdocs/comm/action/pre.inc.php b/htdocs/comm/action/pre.inc.php
deleted file mode 100644
index be1a501ae3feea6c300e69c8a2be29693d0d5140..0000000000000000000000000000000000000000
--- a/htdocs/comm/action/pre.inc.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
- * Copyright (C) 2005-2008 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.
- */
-
-/**
-	    \file       htdocs/comm/action/pre.inc.php
-		\ingroup	agenda
-		\brief      Left menu handler for acions area
-		\version    $Id$
-*/
-
-require("../../main.inc.php");
-
-
-function llxHeader($head = '', $title='', $help_url='')
-{
-    global $conf,$user,$langs;
-
-    top_menu($head, $title);
-
-    $menu = new Menu();
-
-	// Actions
-	if ($conf->agenda->enabled)
-	{
-		$langs->load("agenda");
-
-		// Actions
-		$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&amp;leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
-		$menu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?mainmenu=agenda&amp;leftmenu=agenda&amp;action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
-		// Calendar
-		$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&amp;leftmenu=agenda", $langs->trans("Calendar"), 1, $user->rights->agenda->myactions->read);
-		$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&amp;leftmenu=agenda&amp;status=todo&amp;filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
-		$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&amp;leftmenu=agenda&amp;status=done&amp;filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
-		if ($user->rights->agenda->allactions->read)
-		{
-			$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&amp;leftmenu=agenda&amp;status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->allactions->read);
-			$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&amp;leftmenu=agenda&amp;status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->allactions->read);
-		}
-		// List
-		$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&amp;leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
-		$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&amp;leftmenu=agenda&amp;status=todo&amp;filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
-		$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&amp;leftmenu=agenda&amp;status=done&amp;filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
-		if ($user->rights->agenda->allactions->read)
-		{
-			$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&amp;leftmenu=agenda&amp;status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->allactions->read);
-			$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&amp;leftmenu=agenda&amp;status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->allactions->read);
-		}
-		// Reports
-		$menu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?mainmenu=agenda&amp;leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read);
-	}
-
-    left_menu($menu->liste, $help_url);
-}
-
-?>
diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php
index 34d1aa6b19cde89b3dc376dd93ad62fab88a5051..cf49db0fb9b0e7b4e44cb74db462d9c97cbbd73d 100644
--- a/htdocs/comm/action/rapport/index.php
+++ b/htdocs/comm/action/rapport/index.php
@@ -26,7 +26,7 @@
  *		\version    $Id$
  */
 
-require_once("./pre.inc.php");
+require("../../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php");
 require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php");
diff --git a/htdocs/comm/action/rapport/pre.inc.php b/htdocs/comm/action/rapport/pre.inc.php
deleted file mode 100644
index d5a0a3b6652667f79813e496267d71dce2403eb9..0000000000000000000000000000000000000000
--- a/htdocs/comm/action/rapport/pre.inc.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
- * Copyright (C) 2005-2008 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.
- */
-
-/**
-	    \file       htdocs/comm/action/rapport/pre.inc.php
-		\brief      Fichier gestionnaire du menu de gauche de la zone rapport des actions
-		\version    $Id$
-*/
-
-require("../../../main.inc.php");
-
-
-function llxHeader($head = "", $urlp = "")
-{
-    global $conf,$user,$langs;
-    
-    top_menu($head);
-    
-    $menu = new Menu();
-    
-    
-	// Actions
-	if ($conf->agenda->enabled)
-	{
-		$langs->load("agenda");
-		
-		// Actions
-		$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&amp;leftmenu=agenda", $langs->trans("Actions"), 0, $user->rights->agenda->myactions->read);
-		$menu->add_submenu(DOL_URL_ROOT."/comm/action/fiche.php?mainmenu=agenda&amp;leftmenu=agenda&amp;action=create", $langs->trans("NewAction"), 1, $user->rights->agenda->myactions->read);
-		// Calendar
-		$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&amp;leftmenu=agenda", $langs->trans("Calendar"), 1, $user->rights->agenda->myactions->read);
-		$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&amp;leftmenu=agenda&amp;status=todo&amp;filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
-		$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&amp;leftmenu=agenda&amp;status=done&amp;filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
-		if ($user->rights->agenda->allactions->read)
-		{
-			$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&amp;leftmenu=agenda&amp;status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->allactions->read);
-			$menu->add_submenu(DOL_URL_ROOT."/comm/action/index.php?mainmenu=agenda&amp;leftmenu=agenda&amp;status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->allactions->read);
-		}
-		// List
-		$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&amp;leftmenu=agenda", $langs->trans("List"), 1, $user->rights->agenda->myactions->read);
-		$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&amp;leftmenu=agenda&amp;status=todo&amp;filter=mine", $langs->trans("MenuToDoMyActions"),2, $user->rights->agenda->myactions->read);
-		$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&amp;leftmenu=agenda&amp;status=done&amp;filter=mine", $langs->trans("MenuDoneMyActions"),2, $user->rights->agenda->myactions->read);
-		if ($user->rights->agenda->allactions->read)
-		{
-			$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&amp;leftmenu=agenda&amp;status=todo", $langs->trans("MenuToDoActions"),2, $user->rights->agenda->allactions->read);
-			$menu->add_submenu(DOL_URL_ROOT."/comm/action/listactions.php?mainmenu=agenda&amp;leftmenu=agenda&amp;status=done", $langs->trans("MenuDoneActions"),2, $user->rights->agenda->allactions->read);
-		}
-		// Reports
-		$menu->add_submenu(DOL_URL_ROOT."/comm/action/rapport/index.php?mainmenu=agenda&amp;leftmenu=agenda", $langs->trans("Reportings"), 1, $user->rights->agenda->myactions->read);
-	}
-    
-    left_menu($menu->liste);
-}
-
-?>
diff --git a/htdocs/comm/addpropal.php b/htdocs/comm/addpropal.php
index ab3be489781d45187bd28fe4e56ef6b3afb91430..4f3af1fb5397857eadbd28581e08909708dc7897 100644
--- a/htdocs/comm/addpropal.php
+++ b/htdocs/comm/addpropal.php
@@ -26,7 +26,7 @@
  *	\version    $Id$
  */
 
-require("./pre.inc.php");
+require("../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT.'/comm/propal/propal.class.php');
 require_once(DOL_DOCUMENT_ROOT.'/includes/modules/propale/modules_propale.php');
 if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT.'/lib/project.lib.php');
@@ -99,7 +99,7 @@ if ($_GET["action"] == 'create')
 	print '<form name="addprop" action="propal.php?socid='.$soc->id.'" method="POST">';
 	print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
 	print '<input type="hidden" name="action" value="add">';
-	
+
 	if (isset($_GET["origin"]) && $_GET["origin"] != 'project' && isset($_GET["originid"]))
 	{
 		print '<input type="hidden" name="origin" value="'.$_GET["origin"].'">';
@@ -202,7 +202,7 @@ if ($_GET["action"] == 'create')
 	{
 		$projectid = 0;
 		if (isset($_GET["origin"]) && $_GET["origin"] == 'project') $projectid = ($_GET["originid"]?$_GET["originid"]:0);
-		
+
 		print '<tr>';
 		print '<td valign="top">'.$langs->trans("Project").'</td><td colspan="2">';
 
diff --git a/htdocs/comm/adresse_livraison.php b/htdocs/comm/adresse_livraison.php
index d20d78bead76f5225154a8e0f2e77be9b39d0580..fa5a7ae67e37f6551269f91d1f291c8366c5ffef 100644
--- a/htdocs/comm/adresse_livraison.php
+++ b/htdocs/comm/adresse_livraison.php
@@ -25,7 +25,7 @@
         \version    $Id$
 */
 
-require("pre.inc.php");
+require("../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/comm/adresse_livraison.class.php");
 
diff --git a/htdocs/comm/bookmark.php b/htdocs/comm/bookmark.php
index c09d1a4eb223139b40dec93e4cb331d2cb69a5e9..97ef07178e3c0b2d21a2a2789476ba4d97a7545c 100644
--- a/htdocs/comm/bookmark.php
+++ b/htdocs/comm/bookmark.php
@@ -23,7 +23,8 @@
 */
 
 
-require("./pre.inc.php");
+require("../main.inc.php");
+
 
 
 llxHeader();
diff --git a/htdocs/comm/clients.php b/htdocs/comm/clients.php
index 0ea19674eb71391ee1b7d66280489fc0f93d0c2e..3a84a233a197d14403798f25e9dba17c672a7943 100644
--- a/htdocs/comm/clients.php
+++ b/htdocs/comm/clients.php
@@ -25,7 +25,7 @@
  *	\version    $Id$
  */
 
-require("./pre.inc.php");
+require("../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/html.formother.class.php");
 
 // Security check
diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php
index 4bcc433416ff2ea5eac644aa0f9e6c4e6e37dfbb..31f13302c5541712adb3057393c038852be4959b 100644
--- a/htdocs/comm/contact.php
+++ b/htdocs/comm/contact.php
@@ -25,7 +25,7 @@
         \version    $Id$
 */
 
-require("./pre.inc.php");
+require("../main.inc.php");
 
 $langs->load("companies");
 
diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php
index 8bd346d6c21febd82df343a5b736c9b2d475f1e7..ca2762467053f708b6b6228374834bcf7b2a4c35 100644
--- a/htdocs/comm/fiche.php
+++ b/htdocs/comm/fiche.php
@@ -29,7 +29,7 @@
  *       \version    $Id$
  */
 
-require_once("./pre.inc.php");
+require("../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php");
 if ($conf->facture->enabled) require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php");
@@ -594,35 +594,35 @@ if ($socid > 0)
 			if ($num > 0)
 			{
 				require_once(DOL_DOCUMENT_ROOT."/projet/project.class.php");
-				
+
 				$projectstatic = new Project($db);
-				
+
 				print '<tr class="liste_titre">';
 				print '<td colspan="3"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastProjects",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a href="'.DOL_URL_ROOT.'/projet/liste.php?socid='.$objsoc->id.'">'.$langs->trans("AllProjects").' ('.$num.')</td></tr></table></td>';
 				print '</tr>';
-				
+
 				$var=true;
 				$i = 0 ;
 				while ($i < $num && $i < $MAXLIST)
 				{
 					$obj = $db->fetch_object($result);
 					$projectstatic->fetch($obj->rowid);
-					
+
 					// To verify role of users
 					$userAccess = $projectstatic->restrictedProjectArea($user,1);
-				
+
 					if ($user->rights->projet->lire && $userAccess > 0)
 					{
 						$var = !$var;
 						print "<tr $bc[$var]>";
-						
+
 						// Ref
 						print '<td><a href="'.DOL_URL_ROOT.'/projet/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowProject"),($obj->public?'projectpub':'project'))." ".$obj->ref.'</a></td>';
 						// Label
 						print '<td>'.$obj->title.'</td>';
 						// Date
 						print '<td align="right">'.dol_print_date($obj->do,"day").'</td>';
-						
+
 						print '</tr>';
 					}
 					$i++;
diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php
index 0913e65e63aa7148b722d3fa94e02d9279788613..9c6b10cab66cd8a268b7915138f3a59a3d4c2ad0 100644
--- a/htdocs/comm/index.php
+++ b/htdocs/comm/index.php
@@ -25,7 +25,7 @@
  *	\version    $Id$
  */
 
-require("./pre.inc.php");
+require("../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
 require_once(DOL_DOCUMENT_ROOT."/client.class.php");
 if ($conf->contrat->enabled) require_once(DOL_DOCUMENT_ROOT."/contrat/contrat.class.php");
diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php
index 64d35c935a44f9e14cd2c8ee22b5c4fa22782851..634cfc61605c9f3bbf80fcc45a5059c548791aa5 100644
--- a/htdocs/comm/mailing/cibles.php
+++ b/htdocs/comm/mailing/cibles.php
@@ -25,7 +25,7 @@
  *       \version    $Id$
  */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/emailing.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php
index e9d1ad7e6bd206a89d643d3ead843bd5f254762e..b36de39b1514ff6ddb569190ef483d5b2beef148 100644
--- a/htdocs/comm/mailing/fiche.php
+++ b/htdocs/comm/mailing/fiche.php
@@ -24,7 +24,7 @@
  *       \version    $Id$
  */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/emailing.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php
index 8bd2220982a52adb9abccb50e694fd17113cfa03..75fd9e8903ef51d79726f5e69df8f52673ea6ece 100644
--- a/htdocs/comm/mailing/index.php
+++ b/htdocs/comm/mailing/index.php
@@ -24,7 +24,7 @@
  *       \version    $Id$
  */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
 
 $langs->load("commercial");
diff --git a/htdocs/comm/mailing/info.php b/htdocs/comm/mailing/info.php
index 5d1dc23f5676545a9a2d0b51103cf04ff4f3e69f..078dad44316ce0ba144f552235cfb69a73214c77 100644
--- a/htdocs/comm/mailing/info.php
+++ b/htdocs/comm/mailing/info.php
@@ -23,7 +23,7 @@
  *		\version    $Id$
  */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/emailing.lib.php");
 
diff --git a/htdocs/comm/mailing/liste.php b/htdocs/comm/mailing/liste.php
index de79ddb42871a593423e04e3fefc36c37c5cf384..2194b058b78ad34a564f1378f8867a94a1155705 100644
--- a/htdocs/comm/mailing/liste.php
+++ b/htdocs/comm/mailing/liste.php
@@ -24,7 +24,7 @@
  *       \version    $Id$
  */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 
 if (!$user->rights->mailing->lire) accessforbidden();
 
diff --git a/htdocs/comm/mailing/pre.inc.php b/htdocs/comm/mailing/pre.inc.php
deleted file mode 100644
index c12fc7289c101a221867ee92be835d5f473f3029..0000000000000000000000000000000000000000
--- a/htdocs/comm/mailing/pre.inc.php
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
- * Copyright (C) 2005 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.
- */
-
-/**
-        \file       htdocs/comm/mailing/pre.inc.php
-        \ingroup    mailing
-        \brief      Fichier de gestion du menu gauche de l'espace mailing
-        \version    $Id$
-*/
-
-require("../../main.inc.php");
-require_once DOL_DOCUMENT_ROOT.'/comm/mailing/mailing.class.php';
-
-$langs->load("companies");
-$langs->load("mails");
-$langs->load("exports");
-
-
-function llxHeader($head = "", $title = "", $help_url="")
-{
-    global $user, $conf, $langs;
-
-    top_menu($head, $title);
-
-    $menu = new Menu();
-
-    if ($user->rights->mailing->lire)
-    {
-        $menu->add(DOL_URL_ROOT."/comm/mailing/index.php", $langs->trans("Mailings"));
-    }
-
-    if ($user->rights->mailing->creer)
-    {
-        $menu->add_submenu(DOL_URL_ROOT."/comm/mailing/fiche.php?action=create", $langs->trans("NewMailing"));
-    }
-
-    if ($user->rights->mailing->lire)
-    {
-        $menu->add_submenu(DOL_URL_ROOT."/comm/mailing/liste.php", $langs->trans("List"));
-    }
-
-    left_menu($menu->liste, $help_url);
-}
-
-?>
diff --git a/htdocs/comm/multiprix.php b/htdocs/comm/multiprix.php
index fadc52b33045dd43eb33ca79accb385b9f6aee4a..f0c8ac77cf300c0b8358b3bb7d5a647028127bdb 100644
--- a/htdocs/comm/multiprix.php
+++ b/htdocs/comm/multiprix.php
@@ -25,7 +25,7 @@
  *	\version    $Id$
  */
 
-require_once("./pre.inc.php");
+require("../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php");
 
diff --git a/htdocs/comm/pre.inc.php b/htdocs/comm/pre.inc.php
deleted file mode 100644
index efca3294bf82dc77cfbd2aa3c9dbbde8c3931a06..0000000000000000000000000000000000000000
--- a/htdocs/comm/pre.inc.php
+++ /dev/null
@@ -1,115 +0,0 @@
-<?php
-/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
- * Copyright (C) 2004-2005 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.
- */
-
-/**
- \file       htdocs/comm/pre.inc.php
- \ingroup    commercial
- \brief      Fichier de gestion du menu gauche de l'espace commercial
- \version    $Id$
- */
-require("../main.inc.php");
-
-
-function llxHeader($head = '', $title='', $help_url='')
-{
-	global $user, $conf, $langs;
-
-	$langs->load("companies");
-	$langs->load("commercial");
-
-	top_menu($head, $langs->trans($title));
-
-	$menu = new Menu();
-
-	// Clients
-	$menu->add(DOL_URL_ROOT."/comm/clients.php", $langs->trans("Customers"));
-	if ($user->rights->societe->creer)
-	{
-		$menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&amp;type=c", $langs->trans("MenuNewCustomer"));
-	}
-
-	$menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=c", $langs->trans("Contacts"));
-
-
-	// Prospects
-	$menu->add(DOL_URL_ROOT."/comm/prospect/index.php", $langs->trans("Prospects"));
-	if ($user->rights->societe->creer)
-	{
-		$menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&amp;type=p", $langs->trans("MenuNewProspect"));
-	}
-
-	$menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=p", $langs->trans("Contacts"));
-
-
-	$menu->add(DOL_URL_ROOT."/comm/action/index.php", $langs->trans("Actions"));
-
-	// Propal
-	if ($conf->propal->enabled && $user->rights->propale->lire)
-	{
-		$langs->load("propal");
-		$menu->add(DOL_URL_ROOT."/comm/propal.php", $langs->trans("Prop"));
-		$menu->add_submenu(DOL_URL_ROOT."/comm/propal.php?viewstatut=0", $langs->trans("PropalsDraft"));
-		$menu->add_submenu(DOL_URL_ROOT."/comm/propal.php?viewstatut=1", $langs->trans("PropalsOpened"));
-		$menu->add_submenu(DOL_URL_ROOT."/comm/propal.php?viewstatut=2,3,4", $langs->trans("PropalStatusClosedShort"));
-		$menu->add_submenu(DOL_URL_ROOT."/comm/propal/stats/", $langs->trans("Statistics"));
-	}
-
-	if ($conf->contrat->enabled && $user->rights->contrat->lire)
-	{
-		$langs->load("contracts");
-		$menu->add(DOL_URL_ROOT."/contrat/index.php", $langs->trans("Contracts"));
-	}
-
-	if ($conf->commande->enabled && $user->rights->commande->lire)
-	{
-		$langs->load("orders");
-		$menu->add(DOL_URL_ROOT."/commande/index.php", $langs->trans("Orders"));
-	}
-
-	if ($user->mailing->enabled && $user->rights->mailing->lire)
-	{
-		$langs->load("mails");
-		$menu->add(DOL_URL_ROOT."/comm/mailing/", $langs->trans("EMailings"));
-	}
-
-	if ($conf->ficheinter->enabled  && $user->rights->ficheinter->lire)
-	{
-		$langs->load("interventions");
-		$menu->add(DOL_URL_ROOT."/fichinter/index.php", $langs->trans("Interventions"));
-	}
-
-	if (($conf->produit->enabled && $user->rights->produit->lire) || ($conf->service->enabled && $user->rights->service->lire))
-	{
-		$langs->load("products");
-		$chaine="";
-		if ($conf->produit->enabled) { $chaine.=$langs->trans("Products"); }
-		if ($conf->produit->enabled && $conf->service->enabled) { $chaine.="/"; }
-		if ($conf->service->enabled) { $chaine.=$langs->trans("Services"); }
-		$menu->add(DOL_URL_ROOT."/product/index.php", "$chaine");
-	}
-
-	if ($conf->projet->enabled && $user->rights->projet->lire)
-	{
-		$langs->load("projects");
-		$menu->add(DOL_URL_ROOT."/projet/index.php", $langs->trans("Projects"));
-	}
-
-	left_menu($menu->liste, $help_url);
-}
-?>
diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php
index cbbf0cc6efbd795bdc0656e9b47f89f761430981..80a30e8b745bce07ccf6c696ab0f40bc82d2498a 100644
--- a/htdocs/comm/propal.php
+++ b/htdocs/comm/propal.php
@@ -28,7 +28,7 @@
  *	\version		$Id$
  */
 
-require("./pre.inc.php");
+require("../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
 require_once(DOL_DOCUMENT_ROOT."/includes/modules/propale/modules_propale.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/propal.lib.php");
diff --git a/htdocs/comm/propal/apercu.php b/htdocs/comm/propal/apercu.php
index bfacc4aae113f70b10cd07de130a69972d5489db..4fa3a93ab56cfe7bb45f1c6bb42002bad2029f87 100644
--- a/htdocs/comm/propal/apercu.php
+++ b/htdocs/comm/propal/apercu.php
@@ -1,6 +1,6 @@
 <?php
 /* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
- * Copyright (C) 2004      �ric Seigne          <eric.seigne@ryxeo.com>
+ * Copyright (C) 2004      Eric Seigne          <eric.seigne@ryxeo.com>
  * Copyright (C) 2004-2007 Laurent Destailleur  <eldy@users.sourceforge.net>
  * Copyright (C) 2005-2009 Regis Houssin        <regis@dolibarr.fr>
  *
@@ -26,7 +26,7 @@
  \version	$Id$
  */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT.'/comm/propal/propal.class.php');
 require_once(DOL_DOCUMENT_ROOT."/lib/propal.lib.php");
 if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/projet/project.class.php");
diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php
index 3303f8073d0fdb47c0af3e0b8f19a8e8ef688057..168ce350f90a06366559a29e7f3139634b9e2de5 100644
--- a/htdocs/comm/propal/contact.php
+++ b/htdocs/comm/propal/contact.php
@@ -24,7 +24,7 @@
  *       \version    $Id$
  */
 
-require ("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/comm/propal/propal.class.php");
 require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/propal.lib.php");
diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php
index a7d2c47affe70468f8104b621fee31d71a4f9de5..80a9a4bab55acb7b73a94e333b31d35593d202ea 100644
--- a/htdocs/comm/propal/document.php
+++ b/htdocs/comm/propal/document.php
@@ -22,11 +22,11 @@
 /**
  *       \file       htdocs/comm/propal/document.php
  *       \ingroup    propale
- *       \brief      Page de gestion des documents attach�es � une proposition commerciale
+ *       \brief      Page de gestion des documents attaches a une proposition commerciale
  *       \version    $Id$
  */
 
-require('./pre.inc.php');
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/comm/propal/propal.class.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/propal.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php");
diff --git a/htdocs/comm/propal/info.php b/htdocs/comm/propal/info.php
index 97eed173c5dc02085b61ba731f293a8083217b7b..6e5ffc0859344751569ea065774aa38f251ebe80 100644
--- a/htdocs/comm/propal/info.php
+++ b/htdocs/comm/propal/info.php
@@ -25,7 +25,7 @@
 		\version    $Id$
 */
 
-require('./pre.inc.php');
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/comm/propal/propal.class.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/propal.lib.php");
diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php
index 6a04938cb3d4bd67be2e5eaa63ae2b8f83f52b83..c5be66a9eb7cf9bcad766c22c5e565c62bb9af7e 100644
--- a/htdocs/comm/propal/note.php
+++ b/htdocs/comm/propal/note.php
@@ -26,7 +26,7 @@
  *	\version    $Id$
  */
 
-require('./pre.inc.php');
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/comm/propal/propal.class.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/propal.lib.php");
 
diff --git a/htdocs/comm/propal/pre.inc.php b/htdocs/comm/propal/pre.inc.php
deleted file mode 100644
index 7aa15fb1331a92e6d7b96671621e306bc514cef5..0000000000000000000000000000000000000000
--- a/htdocs/comm/propal/pre.inc.php
+++ /dev/null
@@ -1,107 +0,0 @@
-<?php
-/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
- * Copyright (C) 2004-2005 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.
- */
-
-/**
- \file       htdocs/comm/propal/pre.inc.php
- \ingroup    propale
- \brief      Fichier de gestion du menu gauche du module propale
- \version    $Id$
- */
-
-require("../../main.inc.php");
-
-function llxHeader($head = "", $urlp = "") {
-	global $user, $conf, $langs;
-
-	$langs->load("companies");
-
-	top_menu($head);
-
-	$menu = new Menu();
-
-	// Clients
-	$menu->add(DOL_URL_ROOT."/comm/clients.php", $langs->trans("Customers"));
-	if ($user->rights->societe->creer)
-	{
-		$menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&amp;type=c", $langs->trans("MenuNewCustomer"));
-	}
-	$menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=c", $langs->trans("Contacts"));
-
-	// Prospects
-	$menu->add(DOL_URL_ROOT."/comm/prospect/prospects.php", $langs->trans("Prospects"));
-	if ($user->rights->societe->creer)
-	{
-		$menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&amp;type=p", $langs->trans("MenuNewProspect"));
-	}
-	$menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=p", $langs->trans("Contacts"));
-
-
-	$menu->add(DOL_URL_ROOT."/comm/action/index.php", $langs->trans("Actions"));
-
-
-	if ($conf->propal->enabled && $user->rights->propale->lire)
-	{
-		$langs->load("propal");
-		$menu->add(DOL_URL_ROOT."/comm/propal.php", $langs->trans("Prop"));
-		$menu->add_submenu(DOL_URL_ROOT."/comm/propal.php?viewstatut=0", $langs->trans("PropalsDraft"));
-		$menu->add_submenu(DOL_URL_ROOT."/comm/propal.php?viewstatut=1", $langs->trans("PropalsOpened"));
-		$menu->add_submenu(DOL_URL_ROOT."/comm/propal.php?viewstatut=2,3,4", $langs->trans("PropalStatusClosedShort"));
-		$menu->add_submenu(DOL_URL_ROOT."/comm/propal/stats/", $langs->trans("Statistics"));
-	}
-
-	if ($conf->contrat->enabled)
-	{
-		$langs->load("contracts");
-		$menu->add(DOL_URL_ROOT."/contrat/index.php", $langs->trans("Contracts"));
-	}
-
-	if ($conf->commande->enabled )
-	{
-		$langs->load("orders");
-		$menu->add(DOL_URL_ROOT."/commande/index.php", $langs->trans("Orders"));
-	}
-
-	if ($conf->ficheinter->enabled)
-	{
-		$langs->load("interventions");
-		$menu->add(DOL_URL_ROOT."/fichinter/index.php", $langs->trans("Interventions"));
-	}
-
-	if ($conf->produit->enabled || $conf->service->enabled)
-	{
-		$langs->load("products");
-		$chaine="";
-		if ($conf->produit->enabled) { $chaine.=$langs->trans("Products"); }
-		if ($conf->produit->enabled && $conf->service->enabled) { $chaine.="/"; }
-		if ($conf->service->enabled) { $chaine.=$langs->trans("Services"); }
-		$menu->add(DOL_URL_ROOT."/product/index.php", "$chaine");
-	}
-
-	if ($conf->projet->enabled )
-	{
-		$langs->load("projects");
-		$menu->add(DOL_URL_ROOT."/projet/index.php", $langs->trans("Projects"));
-	}
-
-	left_menu($menu->liste);
-
-}
-
-
-?>
diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php
index 197ae969bdc74673e1b26937d8f918e4850e4c14..743865c3452b7ce62f72441f02f50585b2cdc5c5 100644
--- a/htdocs/comm/propal/stats/index.php
+++ b/htdocs/comm/propal/stats/index.php
@@ -25,14 +25,14 @@
 		\version    $Id$
 */
 
-require("./pre.inc.php");
+require("../../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/comm/propal/stats/propalestats.class.php");
 require_once(DOL_DOCUMENT_ROOT."/core/dolgraph.class.php");
 
 $WIDTH=500;
 $HEIGHT=200;
 
-// S�curit� acc�s client
+// S�curit� acc�s client
 if ($user->societe_id > 0)
 {
 	$action = '';
@@ -46,7 +46,7 @@ $endyear=$year;
 /*
  * View
  */
- 
+
 llxHeader();
 
 print_fiche_titre($langs->trans("ProposalsStatistics"), $mesg);
@@ -157,7 +157,7 @@ print '<td align="center">'.$langs->trans("NbOfProposals").'</td>';
 print '<td align="center">'.$langs->trans("AmountTotal").'</td>';
 print '<td align="center">'.$langs->trans("AmountAverage").'</td>';
 print '</tr>';
-  
+
 $oldyear=0;
 foreach ($data as $val)
 {
diff --git a/htdocs/comm/propal/stats/month.php b/htdocs/comm/propal/stats/month.php
index 9979267aa766d506be4d42c506440fce7ec9c053..f569024cc7fe73d5f0797633664d525c65f9f0b2 100644
--- a/htdocs/comm/propal/stats/month.php
+++ b/htdocs/comm/propal/stats/month.php
@@ -24,7 +24,7 @@
 		\version    $Id$
 */
 
-require("./pre.inc.php");
+require("../../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/comm/propal/stats/propalestats.class.php");
 require_once(DOL_DOCUMENT_ROOT."/core/dolgraph.class.php");
 
@@ -32,7 +32,7 @@ $GRAPHWIDTH=500;
 $GRAPHHEIGHT=200;
 
 // Check security access
-if ($user->societe_id > 0) 
+if ($user->societe_id > 0)
 {
   $action = '';
   $socid = $user->societe_id;
@@ -44,7 +44,7 @@ $year = isset($_GET["year"])?$_GET["year"]:date("Y",time());
 /*
  * View
  */
- 
+
 llxHeader();
 
 $dir=$conf->propale->dir_temp;
diff --git a/htdocs/comm/propal/stats/pre.inc.php b/htdocs/comm/propal/stats/pre.inc.php
deleted file mode 100644
index e52dd99194b91d161327967af8e0e453ef383baf..0000000000000000000000000000000000000000
--- a/htdocs/comm/propal/stats/pre.inc.php
+++ /dev/null
@@ -1,111 +0,0 @@
-<?php
-/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
- * Copyright (C) 2004-2005 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.
- */
-
-/**
- \file       htdocs/comm/propal/stats/pre.inc.php
- \ingroup    propale
- \brief      Fichier de gestion du menu gauche du module propale stats
- \version    $Id$
- */
-
-require("../../../main.inc.php");
-
-function llxHeader($head = "", $urlp = "")
-{
-	global $user, $conf, $langs;
-
-	$langs->load("companies");
-
-	top_menu($head);
-
-	$menu = new Menu();
-
-	// Clients
-	$menu->add(DOL_URL_ROOT."/comm/clients.php", $langs->trans("Customers"));
-	if ($user->rights->societe->creer)
-	{
-		$menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&amp;type=c", $langs->trans("MenuNewCustomer"));
-	}
-	$menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=c", $langs->trans("Contacts"));
-
-	// Prospects
-	$menu->add(DOL_URL_ROOT."/comm/prospect/prospects.php", $langs->trans("Prospects"));
-	if ($user->rights->societe->creer)
-	{
-		$menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&amp;type=p", $langs->trans("MenuNewProspect"));
-	}
-	$menu->add_submenu(DOL_URL_ROOT."/comm/contact.php?type=p", $langs->trans("Contacts"));
-
-
-	$menu->add(DOL_URL_ROOT."/comm/action/index.php", $langs->trans("Actions"));
-
-
-	if ($conf->propal->enabled && $user->rights->propale->lire)
-	{
-		$langs->load("propal");
-		$menu->add(DOL_URL_ROOT."/comm/propal.php", $langs->trans("Prop"));
-		$menu->add_submenu(DOL_URL_ROOT."/comm/propal.php?viewstatut=0", $langs->trans("PropalsDraft"));
-		$menu->add_submenu(DOL_URL_ROOT."/comm/propal.php?viewstatut=1", $langs->trans("PropalsOpened"));
-		$menu->add_submenu(DOL_URL_ROOT."/comm/propal.php?viewstatut=2,3,4", $langs->trans("PropalStatusClosedShort"));
-		$menu->add_submenu(DOL_URL_ROOT."/comm/propal/stats/", $langs->trans("Statistics"));
-	}
-
-	if ($conf->contrat->enabled)
-	{
-		$langs->load("contracts");
-		$menu->add(DOL_URL_ROOT."/contrat/index.php", $langs->trans("Contracts"));
-	}
-
-	if ($conf->commande->enabled )
-	{
-		$langs->load("orders");
-		$menu->add(DOL_URL_ROOT."/commande/index.php", $langs->trans("Orders"));
-	}
-
-	if ($user->rights->mailing->lire)
-	{
-		$langs->load("mails");
-		$menu->add(DOL_URL_ROOT."/comm/mailing/", $langs->trans("EMailings"));
-	}
-
-	if ($conf->ficheinter->enabled)
-	{
-		$langs->load("interventions");
-		$menu->add(DOL_URL_ROOT."/fichinter/index.php", $langs->trans("Interventions"));
-	}
-
-	if ($conf->produit->enabled || $conf->service->enabled)
-	{
-		$langs->load("products");
-		$chaine="";
-		if ($conf->produit->enabled) { $chaine.=$langs->trans("Products"); }
-		if ($conf->produit->enabled && $conf->service->enabled) { $chaine.="/"; }
-		if ($conf->service->enabled) { $chaine.=$langs->trans("Services"); }
-		$menu->add(DOL_URL_ROOT."/product/index.php", "$chaine");
-	}
-
-	if ($conf->projet->enabled )
-	{
-		$langs->load("projects");
-		$menu->add(DOL_URL_ROOT."/projet/index.php", $langs->trans("Projects"));
-	}
-
-	left_menu($menu->liste);
-}
-?>
diff --git a/htdocs/comm/recap-client.php b/htdocs/comm/recap-client.php
index 2391c21c782909b6e99735b96f5a4a3c36e3515a..d5ca2f0cf4b1472e7a8d9115bbc3670cd316d544 100644
--- a/htdocs/comm/recap-client.php
+++ b/htdocs/comm/recap-client.php
@@ -24,7 +24,7 @@
  *		\version    $Id$
  */
 
-require("./pre.inc.php");
+require("../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php");
 
diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php
index 2a041d4f4c81178761287d817530745e9d02d97e..1beab3676feca84ce15d572358cfa9587b187bf3 100644
--- a/htdocs/comm/remise.php
+++ b/htdocs/comm/remise.php
@@ -24,7 +24,7 @@
  *		\version    $Id$
  */
 
-require_once("./pre.inc.php");
+require("../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php");
 
diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php
index bb41973ed1337f28f0fa33510e9dc6260a7f47f2..c58cc820139bfa7f765cabcbef0e8a898a53da77 100644
--- a/htdocs/comm/remx.php
+++ b/htdocs/comm/remx.php
@@ -25,7 +25,7 @@
  *		\version    $Id$
  */
 
-require_once("./pre.inc.php");
+require("../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php");
 require_once(DOL_DOCUMENT_ROOT."/discount.class.php");
diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php
index 4c6a428829ab83ccb4273b23cc56fad19fe194bc..fbe1781b2f1c32af58cf03f6bf2fdabdb3beed7b 100644
--- a/htdocs/commande/apercu.php
+++ b/htdocs/commande/apercu.php
@@ -1,6 +1,6 @@
 <?php
 /* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
- * Copyright (C) 2004      �ric Seigne          <eric.seigne@ryxeo.com>
+ * Copyright (C) 2004      Eric Seigne          <eric.seigne@ryxeo.com>
  * Copyright (C) 2004-2005 Laurent Destailleur  <eldy@users.sourceforge.net>
  * Copyright (C) 2005-2009 Regis Houssin        <regis@dolibarr.fr>
  *
@@ -22,11 +22,11 @@
 /**
 		\file		htdocs/commande/apercu.php
 		\ingroup	commande
-		\brief		Page de l'onglet aper�u d'une commande
+		\brief		Page de l'onglet apercu d'une commande
 		\version	$Id$
 */
 
-require("./pre.inc.php");
+require("../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/order.lib.php");
 require_once(DOL_DOCUMENT_ROOT.'/commande/commande.class.php');
 if ($conf->propal->enabled) require_once(DOL_DOCUMENT_ROOT.'/comm/propal/propal.class.php');
diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php
index 16247a9e61598ce8fa19a92dbaf363e0b0d8045c..f73c86c045ceb4382a4d3b5c91a6c6e751741aa5 100644
--- a/htdocs/commande/contact.php
+++ b/htdocs/commande/contact.php
@@ -25,7 +25,7 @@
         \version    $Id$
 */
 
-require ("./pre.inc.php");
+require("../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php");
 require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/order.lib.php");
diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php
index 2c331af848cbaf25df8734d088d872f2af5e8edd..4a70db5be14d2e1dfe4b1446bdb7674e87b43037 100644
--- a/htdocs/commande/document.php
+++ b/htdocs/commande/document.php
@@ -26,7 +26,7 @@
  *	\version    $Id$
  */
 
-require('./pre.inc.php');
+require("../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT.'/lib/order.lib.php');
 require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php
index c06fc2fdbabffa8b4d97aa387b59f7595b6a1f72..b4d04cfac9d83d2ad71ffc02e66b90e5b5737681 100644
--- a/htdocs/commande/fiche.php
+++ b/htdocs/commande/fiche.php
@@ -27,7 +27,7 @@
  *	\version    $Id$
  */
 
-require('./pre.inc.php');
+require("../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
 require_once(DOL_DOCUMENT_ROOT."/html.formorder.class.php");
 require_once(DOL_DOCUMENT_ROOT."/includes/modules/commande/modules_commande.php");
diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php
index a1e3b124dded42a197c11c121daa54d75f115cb6..479851b23c4a8ff38b6ba001d86848ecba5ea5d9 100644
--- a/htdocs/commande/index.php
+++ b/htdocs/commande/index.php
@@ -25,7 +25,7 @@
  *	\version    $Id$
  */
 
-require("./pre.inc.php");
+require("../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
 require_once(DOL_DOCUMENT_ROOT ."/notify.class.php");
 
diff --git a/htdocs/commande/info.php b/htdocs/commande/info.php
index 85da189a314ea29a8ed070004ccf94602dc5597f..5d398dcfd7855f9eb45e600b135ade448cb6f81e 100644
--- a/htdocs/commande/info.php
+++ b/htdocs/commande/info.php
@@ -24,7 +24,7 @@
  *		\version    $Id$
  */
 
-require("./pre.inc.php");
+require("../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/order.lib.php");
diff --git a/htdocs/commande/liste.php b/htdocs/commande/liste.php
index 7960d137855dd5b442ee9195f8e5a63a098a3e93..115f0ab01b87fc963968728737033cd1bab6aae1 100644
--- a/htdocs/commande/liste.php
+++ b/htdocs/commande/liste.php
@@ -27,7 +27,7 @@
  */
 
 
-require('./pre.inc.php');
+require("../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
 
 $langs->load('orders');
diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php
index a9fec1ba5adb93c587aca2f907d94c5bad2c4026..1890c17c9017f29125a678797a2a826800ba51c0 100644
--- a/htdocs/commande/note.php
+++ b/htdocs/commande/note.php
@@ -25,7 +25,7 @@
  \version    $Id$
  */
 
-require("./pre.inc.php");
+require("../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT.'/lib/order.lib.php');
 
 $socid=isset($_GET["socid"])?$_GET["socid"]:isset($_POST["socid"])?$_POST["socid"]:"";
@@ -131,7 +131,7 @@ if ($id > 0 || ! empty($ref))
 	}
 	print "</td></tr>";
 
-	// Note priv�e
+	// Note priv�e
 	if (! $user->societe_id)
 	{
 		print '<tr><td valign="top">'.$langs->trans("NotePrivate").' :</td>';
diff --git a/htdocs/commande/pre.inc.php b/htdocs/commande/pre.inc.php
deleted file mode 100644
index 7e7dae2bf41f3acd9b738da58af2098b9bac0870..0000000000000000000000000000000000000000
--- a/htdocs/commande/pre.inc.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
- * Copyright (C) 2004-2005 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.
- */
-
-/**
-        \file       htdocs/commande/pre.inc.php
-        \ingroup    commandes
-        \brief      Gestionnaire du menu commandes
-        \version    $Id$
-*/
-
-require("../main.inc.php");
-require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php");
-
-$langs->load("orders");
-
-
-function llxHeader($head = '', $title='', $help_url='')
-{
-	global $user, $conf, $langs;
-
-	top_menu($head, $title);
-
-	$menu = new Menu();
-
-	$menu->add(DOL_URL_ROOT."/commande/", $langs->trans("Orders"));
-	$menu->add_submenu(DOL_URL_ROOT."/commande/liste.php", $langs->trans("List"));
-	$menu->add_submenu(DOL_URL_ROOT."/commande/stats/", $langs->trans("Statistics"));
-
-	if ($conf->expedition->enabled && $user->rights->expedition->lire)
-	{
-		$menu->add(DOL_URL_ROOT."/expedition/", $langs->trans("Sendings"));
-	}
-
-	left_menu($menu->liste, $help_url);
-}
-?>
diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php
index 0f94564f081767a323251ec663db8611b10f3786..f0ecad65f2e9671657f6936e9e39b4af37051b6f 100644
--- a/htdocs/commande/stats/index.php
+++ b/htdocs/commande/stats/index.php
@@ -24,7 +24,7 @@
  *		\version    $Id$
 */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php");
 require_once(DOL_DOCUMENT_ROOT."/commande/stats/commandestats.class.php");
 require_once(DOL_DOCUMENT_ROOT."/core/dolgraph.class.php");
diff --git a/htdocs/commande/stats/month.php b/htdocs/commande/stats/month.php
index 4f326be916aba82670ddc7fd63eed0e1bca579ca..7e8e730112466eac470cd8890ad129d7ff869400 100644
--- a/htdocs/commande/stats/month.php
+++ b/htdocs/commande/stats/month.php
@@ -24,7 +24,7 @@
  *		\brief      Page des stats commandes par mois
  *		\version    $Id$
  */
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php");
 require_once(DOL_DOCUMENT_ROOT."/commande/stats/commandestats.class.php");
 require_once(DOL_DOCUMENT_ROOT."/core/dolgraph.class.php");
@@ -33,7 +33,7 @@ $GRAPHWIDTH=500;
 $GRAPHHEIGHT=200;
 
 // Check security access
-if ($user->societe_id > 0) 
+if ($user->societe_id > 0)
 {
   $action = '';
   $socid = $user->societe_id;
@@ -52,12 +52,12 @@ if (isset($_GET["mode"])) $mode=$_GET["mode"];
 
 llxHeader();
 
-if ($mode == 'customer') 
+if ($mode == 'customer')
 {
 	$title=$langs->trans("OrdersStatistics");
 	$dir=$conf->commande->dir_temp;
 }
-if ($mode == 'supplier') 
+if ($mode == 'supplier')
 {
 	$title=$langs->trans("OrdersStatisticsSuppliers");
 	$dir=$conf->fournisseur->dir_output.'/commande/temp';
diff --git a/htdocs/commande/stats/pre.inc.php b/htdocs/commande/stats/pre.inc.php
deleted file mode 100644
index 2c6ec58e984d844584c8bf33787044d3576fe766..0000000000000000000000000000000000000000
--- a/htdocs/commande/stats/pre.inc.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
- * Copyright (C) 2004 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.
- */
-
-/**
-		\file       htdocs/commande/stats/pre.inc.php
-		\ingroup    commandes
-		\brief      Gestionnaire du menu commandes
-		\version    $Id$
-*/
-
-require("../../main.inc.php");
-
-$langs->load("orders");
-
-
-function llxHeader($head = "", $title="", $help_url='')
-{
-	global $user, $conf, $langs;
-
-	top_menu($head, $title);
-
-	$menu = new Menu();
-
-	$menu->add(DOL_URL_ROOT."/commande/", $langs->trans("Orders"));
-	$menu->add_submenu(DOL_URL_ROOT."/commande/liste.php", $langs->trans("List"));
-	$menu->add_submenu(DOL_URL_ROOT."/commande/stats/", $langs->trans("Statistics"));
-
-	if ($conf->expedition->enabled)
-	{
-		$menu->add(DOL_URL_ROOT."/expedition/", $langs->trans("Sendings"));
-	}
-
-	left_menu($menu->liste, $help_url);
-}
-?>
diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php
index 9d08b58b32255905dbe8a77ce1f59ac9ec6629eb..20ad773f6e71362ae415dda9b7b1d1e4760850a9 100644
--- a/htdocs/compta/charges/index.php
+++ b/htdocs/compta/charges/index.php
@@ -25,7 +25,7 @@
  *		\version    $Id$
  */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/compta/tva/tva.class.php");
 require_once(DOL_DOCUMENT_ROOT."/compta/chargesociales.class.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/date.lib.php");
diff --git a/htdocs/compta/charges/pre.inc.php b/htdocs/compta/charges/pre.inc.php
index fb9125ddbe97ee22be22acd6324b9a952ec4ba2c..f40f0f900156642067d7c38eb67765916a5c6732 100644
--- a/htdocs/compta/charges/pre.inc.php
+++ b/htdocs/compta/charges/pre.inc.php
@@ -1,5 +1,5 @@
 <?php
-/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> 
+/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  * Copyright (C) 2005      Laurent Destailleur  <eldy@users.sourceforge.net>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -17,10 +17,9 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  *
  * $Id$
- * $Source$
  */
 
-/**   
+/**
       \file   	    htdocs/compta/charges/pre.inc.php
       \ingroup      tax
       \brief  	    Fichier gestionnaire du menu charges
@@ -34,15 +33,15 @@ function llxHeader($head = '', $title='', $help_url='')
     global $user, $conf, $langs;
     $langs->load("compta");
     $langs->load("propal");
-    
+
     top_menu($head, $title, $target);
-    
+
     $menu = new Menu();
-    
+
     $menu->add("index.php",$langs->trans("Contributions"));
-    
+
     $menu->add_submenu(DOL_URL_ROOT."/compta/sociales/index.php",$langs->trans("SocialContributions"));
-    
+
     left_menu($menu->liste);
 }
 
diff --git a/htdocs/compta/commande/fiche.php b/htdocs/compta/commande/fiche.php
index 5c70819f2dcf289ae58843684c4e2771a46a3cd6..5d75106d80d3cc587d0d88b0c7ef6c53d8d646ef 100644
--- a/htdocs/compta/commande/fiche.php
+++ b/htdocs/compta/commande/fiche.php
@@ -25,7 +25,7 @@
  *	\version    $Id$
  */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/order.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/sendings.lib.php");
diff --git a/htdocs/compta/commande/liste.php b/htdocs/compta/commande/liste.php
index b268c84bd73e47b015b2682c8cb04b926a8103cd..d2bca9ff1735c3a79b47198913941084e30b86c9 100644
--- a/htdocs/compta/commande/liste.php
+++ b/htdocs/compta/commande/liste.php
@@ -18,7 +18,6 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  *
  * $Id$
- * $Source$
  */
 
 /**
@@ -28,7 +27,7 @@
  *       \version    $Revision$
  */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
 
 $langs->load('companies');
diff --git a/htdocs/compta/commande/pre.inc.php b/htdocs/compta/commande/pre.inc.php
deleted file mode 100644
index 202e5be1f2bf77c1f3b37130a59ea08baeba5061..0000000000000000000000000000000000000000
--- a/htdocs/compta/commande/pre.inc.php
+++ /dev/null
@@ -1,139 +0,0 @@
-<?php
-/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
- * Copyright (C) 2004-2005 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/compta/commande/pre.inc.php
-      \ingroup      compta,commande
-      \brief  	    Fichier gestionnaire du menu commande de compta
-*/
-
-require("../../main.inc.php");
-require_once(DOL_DOCUMENT_ROOT.'/commande/commande.class.php');
-
-$langs->load("orders");
-
-
-function llxHeader($head = "", $title="", $help_url='')
-{
-    global $user, $conf, $langs;
-
-    top_menu($head, $title);
-
-    $menu = new Menu();
-
-    // Les recettes
-
-    $langs->load("commercial");
-    $menu->add(DOL_URL_ROOT."/compta/clients.php", $langs->trans("Customers"));
-
-    if ($conf->propal->enabled)
-    {
-        $langs->load("propal");
-        $menu->add(DOL_URL_ROOT."/compta/propal.php",$langs->trans("Prop"));
-    }
-
-    if ($conf->contrat->enabled)
-    {
-        $langs->load("contracts");
-        $menu->add(DOL_URL_ROOT."/contrat/",$langs->trans("Contracts"));
-    }
-
-    if ($conf->don->enabled)
-    {
-        $langs->load("donations");
-        $menu->add(DOL_URL_ROOT."/compta/dons/",$langs->trans("Donations"));
-    }
-
-    if ($conf->facture->enabled)
-    {
-        $langs->load("bills");
-        $menu->add(DOL_URL_ROOT."/compta/facture.php",$langs->trans("Bills"));
-        $menu->add_submenu(DOL_URL_ROOT."/compta/facture/impayees.php",$langs->trans("Unpaid"));
-        $menu->add_submenu(DOL_URL_ROOT."/compta/paiement/liste.php",$langs->trans("Payments"));
-        $menu->add_submenu(DOL_URL_ROOT."/compta/facture/fiche-rec.php", $langs->trans("Repeatable"));
-
-        $menu->add_submenu(DOL_URL_ROOT."/compta/facture/stats/", $langs->trans("Statistics"));
-    }
-
-
-    if ($conf->commande->enabled && $conf->facture->enabled)
-    {
-        $langs->load("orders");
-        $menu->add(DOL_URL_ROOT."/compta/commande/liste.php?leftmenu=orders&afacturer=1", $langs->trans("MenuOrdersToBill"));
-    }
-
-
-    // Les d�penses
-    if ($conf->fournisseur->enabled)
-    {
-        $langs->load("suppliers");
-        $menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
-    }
-
-    if ($conf->deplacement->enabled && $user->societe_id == 0)
-    {
-        $menu->add(DOL_URL_ROOT."/compta/deplacement/", "D�placement");
-    }
-
-    if ($conf->tax->enabled && $conf->compta->tva && $user->societe_id == 0)
-    {
-        $menu->add(DOL_URL_ROOT."/compta/tva/index.php",$langs->trans("VAT"));
-    }
-
-    if ($conf->tax->enabled)
-    {
-        $menu->add(DOL_URL_ROOT."/compta/charges/index.php",$langs->trans("Charges"));
-    }
-
-
-    // Vision des recettes-d�penses
-    if ($conf->banque->enabled && $user->rights->banque->lire)
-    {
-        $langs->load("banks");
-        $menu->add(DOL_URL_ROOT."/compta/bank/",$langs->trans("Bank"));
-    }
-
-    $menu->add(DOL_URL_ROOT."/compta/stats/",$langs->trans("Reportings"));
-
-    if ($conf->prelevement->enabled)
-    {
-        $menu->add(DOL_URL_ROOT."/compta/prelevement/",$langs->trans("StandingOrders"));
-    }
-
-    if ($conf->compta->enabled)
-    {
-    	if ($user->rights->compta->ventilation->creer)
-		{
-	    	$menu->add(DOL_URL_ROOT."/compta/ventilation/",$langs->trans("Ventilation"));
-		}
-
-	    if ($user->rights->compta->ventilation->parametrer)
-	    {
-	        $menu->add(DOL_URL_ROOT."/compta/param/",$langs->trans("Param"));
-	    }
-	}
-
-
-    left_menu($menu->liste, $help_url);
-}
-
-?>
diff --git a/htdocs/compta/deplacement/fiche.php b/htdocs/compta/deplacement/fiche.php
index d3731e7acbb6c67cc8d1a69d65eadaafcd2b23e6..8e1f7727deb0da734e2e68891fdb0273c55bda0d 100644
--- a/htdocs/compta/deplacement/fiche.php
+++ b/htdocs/compta/deplacement/fiche.php
@@ -23,7 +23,7 @@
  *  \brief      	Page to show a trip card
  *  \version		$Id$
  */
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
 if ($conf->projet->enabled)
 {
diff --git a/htdocs/compta/deplacement/index.php b/htdocs/compta/deplacement/index.php
index 771ea7dba0b2b0331aac19f1d032e9eadbe3f43e..0c3aa4648356904f0e2062a25ccf28012f3c3729 100644
--- a/htdocs/compta/deplacement/index.php
+++ b/htdocs/compta/deplacement/index.php
@@ -25,7 +25,7 @@
 		\version	$Id$
 */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/compta/tva/tva.class.php");
 
 $langs->load("companies");
@@ -61,7 +61,7 @@ $sql.= " d.rowid, d.type, ".$db->pdate("d.dated")." as dd, d.km, ";		// Comment
 $sql.= " u.name, u.firstname";											// Qui
 $sql.= " FROM ".MAIN_DB_PREFIX."user as u";
 $sql.= ", ".MAIN_DB_PREFIX."deplacement as d";
-$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on d.fk_soc = s.rowid"; 
+$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on d.fk_soc = s.rowid";
 if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc";
 $sql.= " WHERE d.fk_user = u.rowid";
 $sql.= " AND d.entity = ".$conf->entity;
@@ -95,7 +95,7 @@ if ($resql)
 
       $soc = new Societe($db);
       if ($objp->socid) $soc->fetch($objp->socid);
-      
+
       $var=!$var;
       print "<tr $bc[$var]>";
       print '<td><a href="fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowTrip"),"trip").' '.$objp->rowid.'</a></td>';
@@ -106,10 +106,10 @@ if ($resql)
       print '<td align="left"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowUser"),"user").' '.$objp->firstname.' '.$objp->name.'</a></td>';
       print '<td align="right">'.$objp->km.'</td>';
       print "</tr>\n";
-      
+
       $i++;
     }
-  
+
   print "</table>";
   $db->free($resql);
 }
diff --git a/htdocs/compta/deplacement/note.php b/htdocs/compta/deplacement/note.php
index b51adc2442fd72f94584ba7a072e3e93667a0c8f..9eb848e3b06301bd082792ca8bdcab6403e81872 100644
--- a/htdocs/compta/deplacement/note.php
+++ b/htdocs/compta/deplacement/note.php
@@ -24,7 +24,7 @@
  *		\version    $Id$
  */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/compta/deplacement/deplacement.class.php");
 
 $socid=isset($_GET["socid"])?$_GET["socid"]:isset($_POST["socid"])?$_POST["socid"]:"";
diff --git a/htdocs/compta/deplacement/pre.inc.php b/htdocs/compta/deplacement/pre.inc.php
deleted file mode 100644
index 9383069123d5ee92a5387388c4f4d819bd903b1b..0000000000000000000000000000000000000000
--- a/htdocs/compta/deplacement/pre.inc.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
- * Copyright (C) 2004      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/compta/deplacement/pre.inc.php
- *     \ingroup      deplacement
- *     \brief  	    Fichier gestionnaire du menu deplacement
- */
-
-require("../../main.inc.php");
-require("./deplacement.class.php");
-
-$deplacement_type[0] = "voiture";
-//$deplacement_type[1] = "train";
-//$deplacement_type[2] = "avion";
-
-function llxHeader($head = "") {
-  global $user, $conf, $langs;
-
-  top_menu($head);
-
-  $menu = new Menu();
-
-  $menu->add("index.php",$langs->trans("Trips"));
-  $menu->add_submenu("fiche.php?action=create",$langs->trans("NewTrip"));
-
-  left_menu($menu->liste);
-}
-
-?>
diff --git a/htdocs/compta/dons/fiche.php b/htdocs/compta/dons/fiche.php
index a9f91dc045867cb89bc1f27f71d11b37b43b0a5b..cc426e89f653119b218415706b7b1282f8f3ecf4 100644
--- a/htdocs/compta/dons/fiche.php
+++ b/htdocs/compta/dons/fiche.php
@@ -24,7 +24,7 @@
  *		\version    $Id$
  */
 
-require_once("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/includes/modules/dons/modules_don.php");
 require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
 require_once(DOL_DOCUMENT_ROOT."/compta/dons/don.class.php");
diff --git a/htdocs/compta/dons/index.php b/htdocs/compta/dons/index.php
index cdb991aca874b01024d203016858dc12e4493495..b92a01c7931c95876eacb5bc414a02adec23f829 100644
--- a/htdocs/compta/dons/index.php
+++ b/htdocs/compta/dons/index.php
@@ -24,7 +24,7 @@
 		\version    $Id$
 */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/compta/dons/don.class.php");
 
 $langs->load("donations");
diff --git a/htdocs/compta/dons/liste.php b/htdocs/compta/dons/liste.php
index f5107a43e578e8951b78d8fb75835b1e552d36e5..17b14581b99b7c033c974e928cb5a82bc25a6ff3 100644
--- a/htdocs/compta/dons/liste.php
+++ b/htdocs/compta/dons/liste.php
@@ -24,7 +24,7 @@
 		\version    $Id$
 */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/compta/dons/don.class.php");
 
 $langs->load("companies");
diff --git a/htdocs/compta/dons/pre.inc.php b/htdocs/compta/dons/pre.inc.php
deleted file mode 100644
index d5363183868ce4b90a5b22b768bd2f1c97cdbe3b..0000000000000000000000000000000000000000
--- a/htdocs/compta/dons/pre.inc.php
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-/* Copyright (C) 2001-2003 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/compta/dons/pre.inc.php
-        \ingroup    don
-		\brief      Fichier gestionnaire du menu de gauche de l'espace dons
-		\version    $Revision$
-*/
-
-require("../../main.inc.php");
-
-$langs->load("donations");
-$langs->load("propal");
-
-$libelle[0] = $langs->trans("PromisesNotValid");
-$libelle[1] = $langs->trans("PromisesValid");
-$libelle[2] = $langs->trans("DonationsPaid");
-$libelle[3] = $langs->trans("DonationsReceived");
-
-
-function llxHeader($head = "", $title="", $help_url="")
-{
-	global $user, $conf, $langs;
-
-	$langs->load("donations");
-
-	top_menu($head,$title);
-
-	$menu = new Menu();
-
-	$menu->add(DOL_URL_ROOT."/compta/dons/",$langs->trans("Donations"));
-	$menu->add_submenu(DOL_URL_ROOT."/compta/dons/fiche.php?action=create",$langs->trans("NewDonation"));
-	$menu->add_submenu(DOL_URL_ROOT."/compta/dons/liste.php",$langs->trans("List"));
-	$menu->add_submenu(DOL_URL_ROOT."/compta/dons/stats.php",$langs->trans("Statistics"));
-
-	if ($conf->banque->enabled)
-	{
-		$langs->load("banks");
-		$menu->add(DOL_URL_ROOT."/compta/bank/index.php",$langs->trans("Bank"));
-	}
-
-	left_menu($menu->liste, $help_url);
-}
-
-?>
diff --git a/htdocs/compta/dons/stats.php b/htdocs/compta/dons/stats.php
index 1d1981f7d2ee38def3e8dcdc9fcd724216c11358..539ced235185219981bbabe96ed13422b744c6b9 100644
--- a/htdocs/compta/dons/stats.php
+++ b/htdocs/compta/dons/stats.php
@@ -24,7 +24,7 @@
 		\version    $Id$
 */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 
 $langs->load("donations");
 
diff --git a/htdocs/compta/export/index.php b/htdocs/compta/export/index.php
index 96206f993aaa3ae477f9eae8bbe22de3a6d53e8e..2ff7f5956713bd3c292ebaea34a467ed675f02fc 100644
--- a/htdocs/compta/export/index.php
+++ b/htdocs/compta/export/index.php
@@ -27,7 +27,7 @@
 		\version    $Revision$
 */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once("./ComptaJournalPaiement.class.php");
 require_once("./ComptaJournalVente.class.php");
 
diff --git a/htdocs/compta/export/liste.php b/htdocs/compta/export/liste.php
index f25ae417f5e833f2f3d18ef8102f2fd39aa9449c..88566ab2d70e7161248a2068eaf20d0bc8cf938d 100644
--- a/htdocs/compta/export/liste.php
+++ b/htdocs/compta/export/liste.php
@@ -16,9 +16,8 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  *
  * $Id$
- * $Source$
  */
- 
+
 /**
 		\file       htdocs/compta/export/liste.php
 		\ingroup    compta
@@ -26,15 +25,15 @@
 		\version    $Revision$
 */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 
 $langs->load("compta");
 
 $dir = $conf->compta->dir_output."/export/";
 
 
-// S�curit� acc�s client
-if ($user->societe_id > 0) 
+// Security check
+if ($user->societe_id > 0)
 {
   $action = '';
   $socid = $user->societe_id;
diff --git a/htdocs/compta/export/pre.inc.php b/htdocs/compta/export/pre.inc.php
deleted file mode 100644
index a5918c877af15727c81e19c1ff042770565e3a0f..0000000000000000000000000000000000000000
--- a/htdocs/compta/export/pre.inc.php
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> 
- * Copyright (C) 2004-2005 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/compta/export/pre.inc.php
-  \ingroup    compta
-  \brief      Fichier gestionnaire du menu export compta
-*/
-
-require("../../main.inc.php");
-
-function llxHeader($head = "", $title="", $help_url='')
-{
-  global $user, $conf, $langs;
-
-  top_menu($head, $title);
-
-  $menu = new Menu();
-
-  // Les recettes
-
-  $langs->load("bills");
-
-  $menu->add(DOL_URL_ROOT."/compta/clients.php", $langs->trans("Customers"));
-
-  if (!$user->rights->compta->ventilation->creer)
-    {
-      $menu->add(DOL_URL_ROOT."/compta/ventilation/",$langs->trans("Ventilation"));
-    }
-      
-  $menu->add(DOL_URL_ROOT."/compta/facture.php",$langs->trans("Bills"));
-
-  $menu->add(DOL_URL_ROOT."/compta/ventilation/",$langs->trans("Ventilation"));
-
-  $menu->add(DOL_URL_ROOT."/compta/export/",$langs->trans("Export"));
-
-  $menu->add_submenu(DOL_URL_ROOT."/compta/export/index.php?action=export",$langs->trans("New"));
-
-  $menu->add_submenu(DOL_URL_ROOT."/compta/export/liste.php",$langs->trans("List"));
-
-  left_menu($menu->liste, $help_url);
-}
-
-?>
diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php
index 6bffea347591b7d3742d099407c2c0bd90f283a6..dfa4a982ac2fa2daf9e788b8a78245c32ab2e949 100644
--- a/htdocs/compta/facture/apercu.php
+++ b/htdocs/compta/facture/apercu.php
@@ -23,11 +23,11 @@
 /**
 	    \file       htdocs/compta/facture/apercu.php
 		\ingroup    facture
-		\brief      Page de l'onglet aper�u d'une facture
+		\brief      Page de l'onglet apercu d'une facture
 		\version    $Revision$
 */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php");
 require_once(DOL_DOCUMENT_ROOT.'/lib/invoice.lib.php');
 if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/projet/project.class.php");
diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php
index c7a131fd345d0fd4d3a4d1fbcd7ca2e6d0efd066..70921cd42be55e0579a52c36b9311ec4798ad559 100644
--- a/htdocs/compta/facture/contact.php
+++ b/htdocs/compta/facture/contact.php
@@ -24,7 +24,7 @@
  *       \version    $Id$
  */
 
-require ("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php");
 require_once(DOL_DOCUMENT_ROOT."/contact/contact.class.php");
 require_once(DOL_DOCUMENT_ROOT.'/discount.class.php');
diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php
index 93a9de130aa5126a0a2aac33c4ddfd3472911838..13845429261028a477664c187469f61189109c6f 100644
--- a/htdocs/compta/facture/document.php
+++ b/htdocs/compta/facture/document.php
@@ -26,7 +26,7 @@
  *	\version    $Id$
  */
 
-require('./pre.inc.php');
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php");
 require_once(DOL_DOCUMENT_ROOT.'/discount.class.php');
 require_once(DOL_DOCUMENT_ROOT."/lib/invoice.lib.php");
diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php
index 00fb8b6b2fe44b44cdf021a7dfc22dd55b46078c..477544c15eb596f34509042db770f90bc5016c2f 100644
--- a/htdocs/compta/facture/fiche-rec.php
+++ b/htdocs/compta/facture/fiche-rec.php
@@ -25,7 +25,7 @@
  *	\version    $Id$
  */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once("./facture-rec.class.php");
 require_once(DOL_DOCUMENT_ROOT."/projet/project.class.php");
 require_once(DOL_DOCUMENT_ROOT."/product/product.class.php");
diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php
index 9b4c78c00412dfbb98f2b7153a97e66ef9ee7cc3..1d541bfe5327d6b362895e9157329bcdd0739fac 100644
--- a/htdocs/compta/facture/impayees.php
+++ b/htdocs/compta/facture/impayees.php
@@ -26,7 +26,7 @@
  *		\version    $Revision$
  */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
 require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php");
 require_once(DOL_DOCUMENT_ROOT."/paiement.class.php");
diff --git a/htdocs/compta/facture/info.php b/htdocs/compta/facture/info.php
index 2df9b32a2d01f0cc817636096b4e909d41cc62a4..d5a49ce808967cb0dd151f2308eef7588b8cdd2c 100644
--- a/htdocs/compta/facture/info.php
+++ b/htdocs/compta/facture/info.php
@@ -24,7 +24,7 @@
  *		\version    $Id$
 */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php");
 require_once(DOL_DOCUMENT_ROOT.'/discount.class.php');
 require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php
index a807b11c3d9571d6edaee2087b3921d3a6dd7cf4..6bc3110e95f5842ddcca0a33186e54b0020ee412 100644
--- a/htdocs/compta/facture/note.php
+++ b/htdocs/compta/facture/note.php
@@ -24,7 +24,7 @@
  *		\version    $Id$
 */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php");
 require_once(DOL_DOCUMENT_ROOT.'/discount.class.php');
 require_once(DOL_DOCUMENT_ROOT.'/lib/invoice.lib.php');
diff --git a/htdocs/compta/facture/pre.inc.php b/htdocs/compta/facture/pre.inc.php
deleted file mode 100644
index ec6bc09ee31e56f7e3c5374de3c7b484a286b323..0000000000000000000000000000000000000000
--- a/htdocs/compta/facture/pre.inc.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-/* Copyright (C) 2004-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> 
- * Copyright (C) 2005      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/compta/facture/pre.inc.php
-   \ingroup      facture
-   \brief        Fichier de gestion du menu gauche du module facture
-   \version      $Revision$
-*/
-
-require("../../main.inc.php");
-require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php");
-
-$langs->load('bills');
-
-function llxHeader($head = "", $title="", $help_url='') {
-    global $user, $conf, $langs;
-
-    $langs->load("companies");
-    $langs->load("commercial");
-    $langs->load("bills");
-    $langs->load("banks");
-    $langs->load("propal");
-    
-    top_menu($head, $title);
-    
-    $menu = new Menu();
-    
-    $menu->add(DOL_URL_ROOT."/compta/clients.php", $langs->trans("Customers"));
-    
-    $langs->load("bills");
-    $menu->add(DOL_URL_ROOT."/compta/facture.php",$langs->trans("Bills"));
-    $menu->add_submenu(DOL_URL_ROOT."/compta/facture/impayees.php",$langs->trans("Unpaid"));
-    
-    $menu->add(DOL_URL_ROOT."/compta/prelevement/",$langs->trans("StandingOrders"));
-    
-    left_menu($menu->liste, $help_url);
-}
-
-?>
diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php
index 20a5cc0e6f33077ba85415c67afd1b40b91084de..e29bf459e15d89c560e6260845849735d9a03180 100644
--- a/htdocs/compta/facture/prelevement.php
+++ b/htdocs/compta/facture/prelevement.php
@@ -1,6 +1,6 @@
 <?php
 /* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
- * Copyright (C) 2004      �ric Seigne          <eric.seigne@ryxeo.com>
+ * Copyright (C) 2004      Eric Seigne          <eric.seigne@ryxeo.com>
  * Copyright (C) 2004-2008 Laurent Destailleur  <eldy@users.sourceforge.net>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -25,7 +25,7 @@
  *	\version    $Id$
  */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT.'/lib/invoice.lib.php');
 require_once(DOL_DOCUMENT_ROOT."/compta/facture/facture.class.php");
 
@@ -36,7 +36,7 @@ $langs->load("bills");
 $langs->load("banks");
 $langs->load("withdrawals");
 
-// S�curit� acc�s client
+// Security check
 if ($user->societe_id > 0)
 {
 	$action = '';
diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php
index d489dc69d8e3b2e5214c92db834f7fb9603f02c5..1bae2a7a3e423f4835563b19d7995529797f8b30 100644
--- a/htdocs/compta/facture/stats/index.php
+++ b/htdocs/compta/facture/stats/index.php
@@ -24,7 +24,7 @@
  *  \version    $Id$
  */
 
-require("./pre.inc.php");
+require("../../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/core/dolgraph.class.php");
 
 $WIDTH=500;
@@ -51,12 +51,12 @@ if (isset($_GET["mode"])) $mode=$_GET["mode"];
 
 llxHeader();
 
-if ($mode == 'customer') 
+if ($mode == 'customer')
 {
 	$title=$langs->trans("BillsStatistics");
 	$dir=$conf->facture->dir_temp;
 }
-if ($mode == 'supplier') 
+if ($mode == 'supplier')
 {
 	$title=$langs->trans("BillsStatisticsSuppliers");
 	$dir=$conf->fournisseur->dir_output.'/facture/temp';
@@ -177,7 +177,7 @@ foreach ($data as $val)
 	print '</tr>';
 	$oldyear=$year;
 }
-	
+
 print '</table>';
 
 
diff --git a/htdocs/compta/facture/stats/month.php b/htdocs/compta/facture/stats/month.php
index 5cff757c251ab59c57354add04c344957fb5086c..d46324ac3d67e62c477257faf251a89641ad8385 100644
--- a/htdocs/compta/facture/stats/month.php
+++ b/htdocs/compta/facture/stats/month.php
@@ -24,14 +24,14 @@
  *		\version    $Id$
  */
 
-require("./pre.inc.php");
+require("../../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/core/dolgraph.class.php");
 
 $GRAPHWIDTH=500;
 $GRAPHHEIGHT=200;
 
 // Check security access
-if ($user->societe_id > 0) 
+if ($user->societe_id > 0)
 {
   $action = '';
   $socid = $user->societe_id;
@@ -50,12 +50,12 @@ if (isset($_GET["mode"])) $mode=$_GET["mode"];
 
 llxHeader();
 
-if ($mode == 'customer') 
+if ($mode == 'customer')
 {
 	$title=$langs->trans("BillsStatistics");
 	$dir=$conf->facture->dir_temp;
 }
-if ($mode == 'supplier') 
+if ($mode == 'supplier')
 {
 	$title=$langs->trans("BillsStatisticsSuppliers");
 	$dir=$conf->fournisseur->dir_output.'/facture/temp';
diff --git a/htdocs/compta/facture/stats/pre.inc.php b/htdocs/compta/facture/stats/pre.inc.php
deleted file mode 100644
index ef9df39e5839b0e2c14667929e4504139a78cd18..0000000000000000000000000000000000000000
--- a/htdocs/compta/facture/stats/pre.inc.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-/* Copyright (C) 2001-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/compta/facture/stats/pre.inc.php
-        \ingroup      facture
-        \brief        Fichier de gestion du menu gauche des stats facture
-        \version      $Revision$
-*/
-
-require("../../../main.inc.php");
-require_once(DOL_DOCUMENT_ROOT."/compta/facture/stats/facturestats.class.php");
-
-
-function llxHeader($head = "", $urlp = "")
-{
-  global $langs;
-  $langs->load("bills");
-  $langs->load("propal");
-  
-  top_menu($head);
-
-  $menu = new Menu();
-
-  $menu->add(DOL_URL_ROOT."/compta/facture.php", $langs->trans("Bills"));
-
-  $menu->add("index.php", $langs->trans("Statistics"));
-
-  left_menu($menu->liste);
-}
-?>
diff --git a/htdocs/compta/paiement/avalider.php b/htdocs/compta/paiement/avalider.php
index 8fc80493b45c6035287cad9e8410490e6b969332..0c250b26da4afd92c610bf91713917a13fef2758 100644
--- a/htdocs/compta/paiement/avalider.php
+++ b/htdocs/compta/paiement/avalider.php
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
- 
+
 /**
         \file       htdocs/compta/paiement/avalider.php
         \ingroup    compta
@@ -24,16 +24,16 @@
         \version    $Id$
 */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 
 $langs->load("bills");
 
-// S�curit� acc�s client
+// Security check
 if (! $user->rights->facture->lire)
   accessforbidden();
 
 $socid=0;
-if ($user->societe_id > 0) 
+if ($user->societe_id > 0)
 {
     $action = '';
     $socid = $user->societe_id;
@@ -54,7 +54,7 @@ if (! $sortfield) $sortfield="p.rowid";
 if ($page == -1) $page = 0 ;
 $limit = $conf->liste_limit;
 $offset = $limit * $page ;
-  
+
 $sql = "SELECT p.rowid,".$db->pdate("p.datep")." as dp, p.amount, p.statut";
 $sql .=", c.libelle as paiement_type, p.num_paiement";
 $sql .= " FROM ".MAIN_DB_PREFIX."paiement as p, ".MAIN_DB_PREFIX."c_paiement as c";
diff --git a/htdocs/compta/paiement/fiche.php b/htdocs/compta/paiement/fiche.php
index 24e3cd634b87533c9785459c65167bad9b47691d..3e20e73f9218269391af99cfdbf62c3d466c2ae4 100644
--- a/htdocs/compta/paiement/fiche.php
+++ b/htdocs/compta/paiement/fiche.php
@@ -27,7 +27,7 @@
  *		\version    $Id$
  */
 
-require('./pre.inc.php');
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT.'/paiement.class.php');
 require_once(DOL_DOCUMENT_ROOT.'/compta/facture/facture.class.php');
 require_once(DOL_DOCUMENT_ROOT ."/includes/modules/facture/modules_facture.php");
diff --git a/htdocs/compta/paiement/index.php b/htdocs/compta/paiement/index.php
index dfc908f8a5b08831e259e7ec280b4e06f96bde38..cfd46d4b0f11768f47811ff3e44aba89cfefb905 100644
--- a/htdocs/compta/paiement/index.php
+++ b/htdocs/compta/paiement/index.php
@@ -16,10 +16,9 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  *
  * $Id$
- * $Source$
- *
  */
-require("./pre.inc.php");
+
+require("../../main.inc.php");
 
 // Security check
 if (!$user->admin && $user->societe_id > 0)
diff --git a/htdocs/compta/paiement/info.php b/htdocs/compta/paiement/info.php
index 541bcb934c8a7a1c4789aa2a717119ab77e8454b..9d950e0dd939fd4fe4e259dca77e1535cef2bd28 100644
--- a/htdocs/compta/paiement/info.php
+++ b/htdocs/compta/paiement/info.php
@@ -24,7 +24,7 @@
  *		\version    $Id$
  */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
 require_once(DOL_DOCUMENT_ROOT."/paiement.class.php");
 
diff --git a/htdocs/compta/paiement/liste.php b/htdocs/compta/paiement/liste.php
index 3aaa374c59505164bf431515efa5ddc5e46c62fa..04410dbc1fd6f63f3ac0cb623a029e186e6348e7 100644
--- a/htdocs/compta/paiement/liste.php
+++ b/htdocs/compta/paiement/liste.php
@@ -25,7 +25,7 @@
  *  \version    $Id$
  */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT.'/paiement.class.php');
 require_once(DOL_DOCUMENT_ROOT.'/compta/bank/account.class.php');
 
@@ -91,7 +91,7 @@ if ($_GET["search_montant"])
 
 if ($_GET["orphelins"])     // Option for debugging purpose only
 {
-  // Paiements li�s � aucune facture (pour aide au diagnostic)
+  // Paiements li�s � aucune facture (pour aide au diagnostic)
   $sql = "SELECT p.rowid,".$db->pdate("p.datep")." as dp, p.amount,";
   $sql.= " p.statut, p.num_paiement,";
   //$sql.= " c.libelle as paiement_type";
diff --git a/htdocs/compta/paiement/pre.inc.php b/htdocs/compta/paiement/pre.inc.php
deleted file mode 100644
index 3d822d66d2cdbdd8ce578a90a8c4035302f67984..0000000000000000000000000000000000000000
--- a/htdocs/compta/paiement/pre.inc.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
- * Copyright (C) 2005 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.
- */
-
-/**
- *	\file   	    htdocs/compta/paiement/pre.inc.php
- *	\ingroup      	compta
- *	\brief  	    Fichier gestionnaire du menu compta paiement
- *	\version		$Id$ 
- */
-
-require("../../main.inc.php");
-
-$langs->load("bills");
-$langs->load("compta");
-$langs->load("propal");
-
-function llxHeader($head = "", $title="")
-{
-
-	global $conf, $user, $langs;
-
-	$langs->load("bills");
-
-	top_menu($head, $title);
-
-	$menu = new Menu();
-
-	$menu->add("liste.php",$langs->trans("Payments"));
-	$menu->add_submenu("liste.php",$langs->trans("List"));
-
-	$menu->add(DOL_URL_ROOT."/compta/paiement/cheque/index.php",$langs->trans("MenuChequeDeposits"));
-
-	$menu->add("rapport.php",$langs->trans("Reportings"));
-
-	$menu->add(DOL_URL_ROOT."/compta/facture.php",$langs->trans("Bills"));
-	$menu->add_submenu(DOL_URL_ROOT."/compta/facture/impayees.php",$langs->trans("Unpaid"));
-
-	if ($conf->global->BILL_ADD_PAYMENT_VALIDATION)
-	{
-		$menu->add_submenu("avalider.php",$langs->trans("MenuToValid"));
-	}
-	left_menu($menu->liste);
-}
-?>
diff --git a/htdocs/compta/paiement/rapport.php b/htdocs/compta/paiement/rapport.php
index 27efa83b1bf3560d6f0c2f80357ab7384a27a7e0..f575e9caac478f818f62bdfcbe29495ac1c4c1a0 100644
--- a/htdocs/compta/paiement/rapport.php
+++ b/htdocs/compta/paiement/rapport.php
@@ -24,7 +24,7 @@
  *	\version    $Id$
  */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 require_once(DOL_DOCUMENT_ROOT."/includes/modules/rapport/pdf_paiement.class.php");
 require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php");
 
diff --git a/htdocs/compta/param/comptes/fiche.php b/htdocs/compta/param/comptes/fiche.php
index b07a6a83b7f3881219000576e675f1c5fd2b8bc5..43a9c8aa46f65935fa9b25ef7390c45c77b916fb 100644
--- a/htdocs/compta/param/comptes/fiche.php
+++ b/htdocs/compta/param/comptes/fiche.php
@@ -17,7 +17,6 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  *
  * $Id$
- * $Source$
  */
 
 
@@ -28,7 +27,7 @@
         \version    $Revision$
 */
 
-require("./pre.inc.php");
+require("../../../main.inc.php");
 
 $mesg = '';
 
@@ -67,7 +66,7 @@ if ($_POST["action"] == 'add' && $user->rights->compta->ventilation->parametrer)
 llxHeader("","Nouveau compte");
 
 /*
- * Cr�ation d'un compte
+ * Cr�ation d'un compte
  *
  */
 if ($_GET["action"] == 'create' && $user->rights->compta->ventilation->parametrer)
@@ -87,7 +86,7 @@ if ($_GET["action"] == 'create' && $user->rights->compta->ventilation->parametre
     print '<td>'.$langs->trans("AccountNumber").'</td><td><input name="numero" size="20" value="'.$compte->numero.'">';
     if ($_error == 1)
     {
-        print "Ce num�ro de compte existe d�j�";
+        print "Ce num�ro de compte existe d�j�";
     }
     if ($_error == 2)
     {
diff --git a/htdocs/compta/param/comptes/index.php b/htdocs/compta/param/comptes/index.php
index 8ba4c14bbaa11afa5b3eeebfc135dc507b8ab5eb..864df6824b67e919ae321b3a05a2e3ffdbe19ca2 100644
--- a/htdocs/compta/param/comptes/index.php
+++ b/htdocs/compta/param/comptes/index.php
@@ -17,7 +17,6 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  *
  * $Id$
- * $Source$
  */
 
 /**
@@ -27,15 +26,15 @@
 		\version    $Revision$
 */
 
-require("./pre.inc.php");
+require("../../../main.inc.php");
 
 $langs->load("compta");
 $langs->load("bills");
 
 /*
- * S�curit� acc�s client
+ * S�curit� acc�s client
  */
-if ($user->societe_id > 0) 
+if ($user->societe_id > 0)
 {
   $action = '';
   $socid = $user->societe_id;
@@ -77,6 +76,6 @@ print '</td></tr>';
 print '</table>';
 
 $db->close();
- 
+
 llxFooter('$Date$ - $Revision$');
 ?>
diff --git a/htdocs/compta/param/comptes/liste.php b/htdocs/compta/param/comptes/liste.php
index 90507df71c3886b8d3be35ea1c68b8c815461e29..12fdbe8d1179bea7e0be645dd266e6b178d79277 100644
--- a/htdocs/compta/param/comptes/liste.php
+++ b/htdocs/compta/param/comptes/liste.php
@@ -17,7 +17,6 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  *
  * $Id$
- * $Source$
  */
 
 /**
@@ -26,7 +25,8 @@
         \brief      Onglet de gestion de parametrages des ventilations
         \version    $Revision$
 */
-require("./pre.inc.php");
+
+require("../../../main.inc.php");
 
 
 llxHeader('','Compta - Liste des comptes');
@@ -52,14 +52,14 @@ $sql .= " FROM ".MAIN_DB_PREFIX."compta_compte_generaux as cg";
 
 if (strlen(trim($_GET["search_numero"])) )
 {
-  
+
   $sql .= " WHERE cg.numero LIKE '%".$_GET["search_numero"]."%'";
-  
+
   if ( strlen(trim($_GET["search_intitule"])))
-    {     
+    {
       $sql .= " AND cg.intitule LIKE '%".$_GET["search_intitule"]."%'";
     }
-  
+
 }
 else
 {
@@ -77,8 +77,8 @@ if ($resql)
 {
   $num = $db->num_rows($resql);
   $i = 0;
-  
-  print_barre_liste("Comptes g�n�raux", $page, "liste.php", "", $sortfield, $sortorder, '', $num);
+
+  print_barre_liste("Comptes g�n�raux", $page, "liste.php", "", $sortfield, $sortorder, '', $num);
 
   print '<table class="liste">';
   print '<tr class="liste_titre">';
@@ -101,7 +101,7 @@ if ($resql)
 
   while ($i < min($num,$conf->liste_limit))
     {
-      $obj = $db->fetch_object($resql);	
+      $obj = $db->fetch_object($resql);
       $var=!$var;
 
       print "<tr $bc[$var]>";
@@ -118,7 +118,7 @@ if ($resql)
   print "</table>";
   $db->free($resql);
 }
-else 
+else
 {
   dol_print_error($db);
 }
diff --git a/htdocs/compta/param/comptes/pre.inc.php b/htdocs/compta/param/comptes/pre.inc.php
deleted file mode 100644
index 05d5f050934c8220937dfef84681dfbde2d7aa9e..0000000000000000000000000000000000000000
--- a/htdocs/compta/param/comptes/pre.inc.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?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/compta/param/comptes/pre.inc.php
-        \ingroup    compta
-        \brief  	Fichier gestionnaire du menu param�trage de la compta
-*/
-
-require("../../../main.inc.php");
-require_once DOL_DOCUMENT_ROOT.'/compta/comptacompte.class.php';
-
-function llxHeader($head = "", $title="", $help_url='')
-{
-  global $user, $langs;
-    
-  top_menu($head, $title);
-
-  $menu = new Menu();
-
-  $menu->add(DOL_URL_ROOT."/compta/param/",$langs->trans("Param"));
-
-  $menu->add(DOL_URL_ROOT."/compta/param/comptes/",$langs->trans("AccountsGeneral"));
-  $menu->add_submenu(DOL_URL_ROOT."/compta/param/comptes/liste.php",$langs->trans("List"));
-  $menu->add_submenu(DOL_URL_ROOT."/compta/param/comptes/fiche.php?action=create",$langs->trans("New"));
-
-  left_menu($menu->liste, $help_url);
-}
-
-?>
diff --git a/htdocs/compta/param/index.php b/htdocs/compta/param/index.php
index c28b32deda3372f55a433a29fb33f7042591386f..589691efd7363dedf7b13b208c689d74bdfd1d08 100644
--- a/htdocs/compta/param/index.php
+++ b/htdocs/compta/param/index.php
@@ -20,19 +20,19 @@
 /**
         \file       htdocs/compta/param/index.php
         \ingroup    compta
-		\brief      Page acceuil zone param�trage comptabilit�
+		\brief      Page acceuil zone parametrage comptabilite
 		\version    $Id$
 */
 
-require("./pre.inc.php");
+require("../../main.inc.php");
 
 $langs->load("compta");
 $langs->load("bills");
 
 /*
- * S�curit� acc�s client
+ * S�curit� acc�s client
  */
-if ($user->societe_id > 0) 
+if ($user->societe_id > 0)
 {
   $action = '';
   $socid = $user->societe_id;
@@ -72,6 +72,6 @@ print '</td></tr>';
 print '</table>';
 
 $db->close();
- 
+
 llxFooter('$Date$ - $Revision$');
 ?>
diff --git a/htdocs/compta/param/pre.inc.php b/htdocs/compta/param/pre.inc.php
deleted file mode 100644
index 2bc63eea5b6aea267cf31d2794569efeb09775cb..0000000000000000000000000000000000000000
--- a/htdocs/compta/param/pre.inc.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-/* Copyright (C) 2004-2005 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/compta/param/pre.inc.php
-        \ingroup    compta
-        \brief  	Fichier gestionnaire du menu param�trage de la compta
-*/
-
-require("../../main.inc.php");
-
-function llxHeader($head = "", $title="", $help_url='')
-{
-  global $langs;
-   
-  top_menu($head, $title);
-
-  $menu = new Menu();
-
-  $menu->add(DOL_URL_ROOT."/compta/param/",$langs->trans("Param"));
-
-  $menu->add_submenu(DOL_URL_ROOT."/compta/param/comptes/liste.php",$langs->trans("AccountsGeneral"));
-
-  left_menu($menu->liste, $help_url);
-}
-
-?>