Code cleaning : DbConnect function
This commit is contained in:
parent
5bb0a43fd9
commit
d2b99b862b
7 changed files with 7 additions and 20 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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 '<DIV CLASS="ccontent">';
|
||||
echo '<H2 CLASS="info"> Centralise </H2><BR>';
|
||||
|
|
|
|||
|
|
@ -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"];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 '<SCRIPT LANGUAGE="javascript" SRC="compute.js"></SCRIPT>';
|
||||
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);
|
||||
?>
|
||||
</DIV>
|
||||
<?
|
||||
|
|
|
|||
|
|
@ -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"] ) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue