diff --git a/htdocs/admin/adherent.php b/htdocs/admin/adherent.php
index 85619cdc990..d195f65837e 100644
--- a/htdocs/admin/adherent.php
+++ b/htdocs/admin/adherent.php
@@ -28,8 +28,6 @@ if (!$user->admin)
exit;
}
-$db = new Db();
-
// positionne la variable pour le test d'affichage de l'icone
$main_use_mailman = MAIN_USE_MAILMAN;
diff --git a/htdocs/admin/boutique-special-all.php b/htdocs/admin/boutique-special-all.php
index 42fb613fda8..8d7becb13dc 100644
--- a/htdocs/admin/boutique-special-all.php
+++ b/htdocs/admin/boutique-special-all.php
@@ -26,8 +26,6 @@ require("../boutique/editeur/editeur.class.php");
require("../boutique/auteur/auteur.class.php");
require("../product/promotion/promotion.class.php");
-$db = new Db();
-
llxHeader();
print_barre_liste("Mise a jour de tous les livres", $page, $PHP_SELF);
diff --git a/htdocs/admin/boutique-update-all.php b/htdocs/admin/boutique-update-all.php
index 8b16d4123b5..cc4edad91b6 100644
--- a/htdocs/admin/boutique-update-all.php
+++ b/htdocs/admin/boutique-update-all.php
@@ -25,8 +25,6 @@ require("../boutique/livre/livre.class.php");
require("../boutique/editeur/editeur.class.php");
require("../boutique/auteur/auteur.class.php");
-$db = new Db();
-
llxHeader();
print_barre_liste("Mise a jour de tous les livres", $page, $PHP_SELF);
diff --git a/htdocs/admin/boutique.php b/htdocs/admin/boutique.php
index 7833207c53c..cd1a486ba2b 100644
--- a/htdocs/admin/boutique.php
+++ b/htdocs/admin/boutique.php
@@ -20,8 +20,6 @@
*/
require("./pre.inc.php");
-$db = new Db();
-
llxHeader();
$dir = "../includes/modules/facture/";
diff --git a/htdocs/admin/constall.php b/htdocs/admin/constall.php
index 42db698cf03..ebe5a8b255d 100644
--- a/htdocs/admin/constall.php
+++ b/htdocs/admin/constall.php
@@ -30,8 +30,6 @@ print '
Nom | ';
print 'Valeur | ';
print "\n";
-$db = new Db();
-
$sql = "SELECT rowid, name, value, type, note FROM llx_const ORDER BY name ASC";
$result = $db->query($sql);
if ($result)
diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php
index 19f4f3e4105..b192f010c8e 100644
--- a/htdocs/admin/facture.php
+++ b/htdocs/admin/facture.php
@@ -29,8 +29,6 @@ if (!$user->admin)
exit;
}
-$db = new Db();
-
// positionne la variable pour le test d'affichage de l'icone
$facture_addon_var = FACTURE_ADDON;
diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php
index 74e50fa5b64..c7aec3faa24 100644
--- a/htdocs/admin/modules.php
+++ b/htdocs/admin/modules.php
@@ -20,8 +20,6 @@
*/
require("./pre.inc.php");
-$db = new Db();
-
llxHeader();
$dir = "../includes/modules/facture/";
diff --git a/htdocs/admin/mysql.php b/htdocs/admin/mysql.php
index 46867cc649a..3d14734de85 100644
--- a/htdocs/admin/mysql.php
+++ b/htdocs/admin/mysql.php
@@ -24,8 +24,6 @@ llxHeader();
print_titre("Configuration Mysql");
-$db = new Db();
-
print '';
$sql = "SHOW VARIABLES";
diff --git a/htdocs/admin/osc-languages.php b/htdocs/admin/osc-languages.php
index 49179979c56..0770aeebb2a 100644
--- a/htdocs/admin/osc-languages.php
+++ b/htdocs/admin/osc-languages.php
@@ -29,7 +29,6 @@ if (! strlen(DB_NAME_OSC))
print "Non dispo";
llxFooter();
}
-$db = new Db();
if ($sortfield == "") {
$sortfield="lower(p.label),p.price";
diff --git a/htdocs/admin/propale.php b/htdocs/admin/propale.php
index c8995c85802..a3c43e9b0ac 100644
--- a/htdocs/admin/propale.php
+++ b/htdocs/admin/propale.php
@@ -29,8 +29,6 @@ if (!$user->admin)
exit;
}
-$db = new Db();
-
if ($action == 'set')
{
$sql = "INSERT INTO llx_propal_model_pdf (nom) VALUES ('".$value."')";
diff --git a/htdocs/admin/sqltables.php b/htdocs/admin/sqltables.php
index 0dac1794de9..62647c1103d 100644
--- a/htdocs/admin/sqltables.php
+++ b/htdocs/admin/sqltables.php
@@ -24,8 +24,6 @@ require("./pre.inc.php");
llxHeader();
-$db = new Db();
-
print_barre_liste("Liste des tables", $page, $PHP_SELF);
$sql = "SELECT name, loaded FROM llx_sqltables";
diff --git a/htdocs/admin/webcalendar.php b/htdocs/admin/webcalendar.php
index 22191d0bc44..ba5f1d55c7a 100644
--- a/htdocs/admin/webcalendar.php
+++ b/htdocs/admin/webcalendar.php
@@ -30,8 +30,6 @@ if (!$user->admin)
exit;
}
-$db = new Db();
-
$def = array();
// positionne la variable pour le test d'affichage de l'icone
diff --git a/htdocs/product/categorie/fiche.php b/htdocs/product/categorie/fiche.php
index b9740b79e5d..8246f9ffe19 100644
--- a/htdocs/product/categorie/fiche.php
+++ b/htdocs/product/categorie/fiche.php
@@ -24,8 +24,6 @@ require("./pre.inc.php");
llxHeader();
-$db = new Db();
-
if ($action == 'add') {
$album = new Album($db);
diff --git a/htdocs/product/categorie/index.php b/htdocs/product/categorie/index.php
index 4fcbb9bede1..ab74047dab4 100644
--- a/htdocs/product/categorie/index.php
+++ b/htdocs/product/categorie/index.php
@@ -25,8 +25,6 @@ require("./pre.inc.php");
llxHeader();
-$db = new Db();
-
if ($id)
{
$title = title_url($id, $db);
diff --git a/htdocs/product/concert/fichelieu.php b/htdocs/product/concert/fichelieu.php
index 1918e3e4388..cef9f12e115 100644
--- a/htdocs/product/concert/fichelieu.php
+++ b/htdocs/product/concert/fichelieu.php
@@ -24,8 +24,6 @@ require("./pre.inc.php");
llxHeader();
-$db = new Db();
-
if ($action == 'add') {
$lieuconcert = new LieuConcert($db);
diff --git a/htdocs/product/concert/salles.php b/htdocs/product/concert/salles.php
index 63a523fc5ee..ae47bb47ed7 100644
--- a/htdocs/product/concert/salles.php
+++ b/htdocs/product/concert/salles.php
@@ -24,7 +24,6 @@ require("./pre.inc.php");
llxHeader();
-$db = new Db();
if ($sortfield == "") {
$sortfield="lower(lc.nom)";
}
diff --git a/htdocs/product/critiques/bestproduct.php b/htdocs/product/critiques/bestproduct.php
index aaf3d956a8a..bfd3912e8e2 100644
--- a/htdocs/product/critiques/bestproduct.php
+++ b/htdocs/product/critiques/bestproduct.php
@@ -25,8 +25,6 @@ require("./pre.inc.php");
llxHeader();
-$db = new Db();
-
if ($sortfield == "") {
$sortfield="rat";
}
diff --git a/htdocs/product/critiques/fiche.php b/htdocs/product/critiques/fiche.php
index 55319938d5a..845022d9c31 100644
--- a/htdocs/product/critiques/fiche.php
+++ b/htdocs/product/critiques/fiche.php
@@ -24,8 +24,6 @@ require("./pre.inc.php");
llxHeader();
-$db = new Db();
-
if ($id)
{
diff --git a/htdocs/product/critiques/index.php b/htdocs/product/critiques/index.php
index ecaf8149ef0..c4dd60b5e6f 100644
--- a/htdocs/product/critiques/index.php
+++ b/htdocs/product/critiques/index.php
@@ -24,8 +24,6 @@ require("./pre.inc.php");
llxHeader();
-$db = new Db();
-
if ($sortfield == "") {
$sortfield="date_added";
}
diff --git a/htdocs/product/osc-liste.php b/htdocs/product/osc-liste.php
index 7d6e47c846f..46d66941644 100644
--- a/htdocs/product/osc-liste.php
+++ b/htdocs/product/osc-liste.php
@@ -24,8 +24,6 @@ require("./pre.inc.php3");
llxHeader();
-$db = new Db();
-
if ($sortfield == "") {
$sortfield="lower(p.label),p.price";
}
diff --git a/htdocs/product/osc-productsbyreviews.php b/htdocs/product/osc-productsbyreviews.php
index 7571c1ed806..797b8cc352f 100644
--- a/htdocs/product/osc-productsbyreviews.php
+++ b/htdocs/product/osc-productsbyreviews.php
@@ -24,8 +24,6 @@ require("./pre.inc.php3");
llxHeader();
-$db = new Db();
-
if ($sortfield == "") {
$sortfield="rat";
}
diff --git a/htdocs/product/osc-reviews.php b/htdocs/product/osc-reviews.php
index 0847fa367c5..27ae0003ed8 100644
--- a/htdocs/product/osc-reviews.php
+++ b/htdocs/product/osc-reviews.php
@@ -24,8 +24,6 @@ require("./pre.inc.php3");
llxHeader();
-$db = new Db();
-
if ($sortfield == "") {
$sortfield="lower(p.label),p.price";
}
diff --git a/htdocs/product/popuprop.php b/htdocs/product/popuprop.php
index 315b4327648..1961dab411f 100644
--- a/htdocs/product/popuprop.php
+++ b/htdocs/product/popuprop.php
@@ -22,8 +22,6 @@
require("./pre.inc.php3");
-$db = new Db();
-
if ($sortfield == "")
{
$sortfield="c";
diff --git a/htdocs/product/promotion/index.php b/htdocs/product/promotion/index.php
index 1ca99cd3df6..7f0f1446bd0 100644
--- a/htdocs/product/promotion/index.php
+++ b/htdocs/product/promotion/index.php
@@ -24,8 +24,6 @@ require("./pre.inc.php");
llxHeader();
-$db = new Db();
-
if ($action == "inactive")
{
$promotion = new Promotion($db);
diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php
index 5f74c095240..90b2d3eb998 100644
--- a/htdocs/product/stats/facture.php
+++ b/htdocs/product/stats/facture.php
@@ -24,7 +24,6 @@ require("./pre.inc.php");
llxHeader();
-$db = new Db();
$mesg = '';
/*
diff --git a/htdocs/product/stats/fiche.php b/htdocs/product/stats/fiche.php
index 1ac6afbc0cf..024ddb3d291 100644
--- a/htdocs/product/stats/fiche.php
+++ b/htdocs/product/stats/fiche.php
@@ -19,14 +19,12 @@
* $Source$
*
*/
-
require("./pre.inc.php");
require("../../propal.class.php3");
require("../../graph.class.php");
llxHeader();
-$db = new Db();
$mesg = '';
/*
diff --git a/htdocs/product/stats/index.php b/htdocs/product/stats/index.php
index e74b02687e2..a7c445327b2 100644
--- a/htdocs/product/stats/index.php
+++ b/htdocs/product/stats/index.php
@@ -26,7 +26,6 @@ require("../../graph.class.php");
llxHeader();
-$db = new Db();
$mesg = '';
/*