diff --git a/html/annulation.php b/html/annulation.php
index 31f807db5..cc11778ab 100644
--- a/html/annulation.php
+++ b/html/annulation.php
@@ -53,8 +53,7 @@ if ( isset( $p_jrn )) {
}
-$l_Db=sprintf("dossier%d",$g_dossier);
-$cn=DbConnect($l_Db);
+$cn=DbConnect($g_dossier);
list ($l_array,$max_deb,$max_cred)=GetData($cn,$jrn_op);
foreach ($l_array as $key=>$element) {
diff --git a/html/bal_csv.php b/html/bal_csv.php
index 499a2c2de..f4442c9e7 100644
--- a/html/bal_csv.php
+++ b/html/bal_csv.php
@@ -25,8 +25,7 @@ include_once("class_balance.php");
include_once ("postgres.php");
include("class_jrn.php");
-$l_Db=sprintf("dossier%d",$g_dossier);
-$cn=DbConnect($l_Db);
+$cn=DbConnect($g_dossier);
include ('class_user.php');
diff --git a/html/central.php b/html/central.php
index 486fcf2a5..d7cd5d69e 100644
--- a/html/central.php
+++ b/html/central.php
@@ -49,8 +49,7 @@ if ( $g_UserProperty['use_admin']==0 ) {
}
include_once("central_inc.php");
-$l_Db=sprintf("dossier%d",$g_dossier);
-$cn=DbConnect($l_Db);
+$cn=DbConnect($g_dossier);
echo '
';
echo '
Centralise
';
diff --git a/html/dossier_prefs.php b/html/dossier_prefs.php
index 653339550..7f574f41f 100644
--- a/html/dossier_prefs.php
+++ b/html/dossier_prefs.php
@@ -51,9 +51,8 @@ if ( $g_UserProperty['use_admin'] == 0 ) {
}
}
echo ShowMenuParam();
-$l_Db=sprintf("dossier%d",$g_dossier);
$p_action="";
-$cn=DbConnect($l_Db);
+$cn=DbConnect($g_dossier);
if ( isset($_GET["p_action"]) ) {
$p_action=$_GET["p_action"];
}
diff --git a/html/enc_jrn.php b/html/enc_jrn.php
index 6477ca1e6..92aa774cd 100644
--- a/html/enc_jrn.php
+++ b/html/enc_jrn.php
@@ -42,8 +42,7 @@ if ( isset( $p_jrn )) {
session_register("g_jrn");
$g_jrn=$p_jrn;
}
- $l_Db=sprintf("dossier%d",$g_dossier);
- $cn=DbConnect($l_Db);
+ $cn=DbConnect($g_dossier);
echo '';
echo JS_CONCERNED_OP;
@@ -283,8 +282,6 @@ if ( isset($_POST['update_record']) ) {
} // if update_record
-$l_Db=sprintf("dossier%d",$g_dossier);
-$cn=DbConnect($l_Db);
?>
diff --git a/html/facturation.php b/html/facturation.php
index 3d1aaf41e..60e02349b 100644
--- a/html/facturation.php
+++ b/html/facturation.php
@@ -30,10 +30,6 @@ $rep=DbConnect();
include_once ("class_user.php");
$User=new cl_user($rep);
$User->Check();
-$rep=DbConnect();
-include_once ("class_user.php");
-$User=new cl_user($rep);
-$User->Check();
include ("top_menu_compta.php");
ShowMenuCompta($g_dossier,$g_UserProperty);
@@ -46,8 +42,7 @@ if ( $g_UserProperty['use_admin']==0 ) {
}
include_once("facture_inc.php");
-$l_dossier=sprintf("dossier%d",$g_dossier);
-$cn=DbConnect($l_dossier);
+$cn=DbConnect($g_dossier);
ShowMenuComptaLeft($g_dossier,MENU_FACT);
ShowMenuComptaRight($g_dossier,$g_UserProperty);
if ( $_GET["action"] ) {
diff --git a/html/fiche_new.php b/html/fiche_new.php
index 97b6adcc1..4f005e965 100644
--- a/html/fiche_new.php
+++ b/html/fiche_new.php
@@ -46,8 +46,7 @@ if ( $g_UserProperty['use_admin'] == 0 ) {
}
}
include_once("fiche_inc.php");
-$l_Db=sprintf("dossier%d",$g_dossier);
-$cn=DbConnect($l_Db);
+$cn=DbConnect($g_dossier);
foreach ($HTTP_GET_VARS as $key=>$element) {
// The value are e_name e_type e_PHPSESSID
${"e_$key"}=$element;