start to use $cn as global database connx
This commit is contained in:
parent
5e40badf8b
commit
dcd1095130
7 changed files with 8 additions and 7 deletions
|
|
@ -15,7 +15,7 @@ if ( !isset ($_REQUEST['gDossier'])) exit();
|
|||
mb_internal_encoding("UTF-8");
|
||||
|
||||
$cn=new Database(dossier::id());
|
||||
global $g_user;
|
||||
global $g_user,$cn,$g_parameter;
|
||||
$g_user=new User($cn);
|
||||
$g_user->check(true);
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ mb_internal_encoding("UTF-8");
|
|||
*if $_SESSION['g_user'] is not set : echo a warning
|
||||
*/
|
||||
ajax_disconnected($div);
|
||||
global $g_user;
|
||||
global $g_user,$cn;
|
||||
$cn=new Database(dossier::id());
|
||||
$g_user=new User($cn);
|
||||
/* security */
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ if ( ! isset ($_REQUEST['act'])|| ! isset ($_REQUEST['jr_id'])
|
|||
{
|
||||
exit();
|
||||
}
|
||||
global $g_parameter;
|
||||
global $g_user,$cn,$g_parameter;
|
||||
mb_internal_encoding("UTF-8");
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ if ($cont != 0)
|
|||
exit();
|
||||
extract($_REQUEST);
|
||||
set_language();
|
||||
global $g_user,$cn;
|
||||
global $g_user,$cn,$g_parameter;
|
||||
$cn = new Database($gDossier);
|
||||
$g_user = new User($cn);
|
||||
$g_user->check(true);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
global $g_user;
|
||||
global $g_user,$cn,$g_parameter;
|
||||
require_once('class_database.php');
|
||||
require_once('class_user.php');
|
||||
$gDossier=dossier::id();
|
||||
|
|
|
|||
|
|
@ -35,8 +35,9 @@ require_once('class_iselect.php');
|
|||
require_once ('constant.security.php');
|
||||
require_once ('class_user.php');
|
||||
|
||||
global $g_user,$cn,$g_parameter;
|
||||
|
||||
$cn=new Database(dossier::id());
|
||||
global $g_user;
|
||||
$g_user=new User($cn);
|
||||
$g_user->check();
|
||||
$only_plugin=$g_user->check_dossier(dossier::id());
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ require_once ("user_menu.php");
|
|||
require_once 'class_acc_ledger.php';
|
||||
|
||||
$gDossier=dossier::id();
|
||||
$cn=new Database($gDossier);
|
||||
global $cn;
|
||||
|
||||
$ledger=new Acc_Ledger($cn,-1);
|
||||
$sa=HtmlInput::default_value("sa","",$_REQUEST);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue