diff --git a/html/annulation.php b/html/annulation.php index 2fd5883f0..54219e0bf 100644 --- a/html/annulation.php +++ b/html/annulation.php @@ -32,12 +32,10 @@ include_once("jrn.php"); require_once("class_widget.php"); /* Admin. Dossier */ include_once ("class_user.php"); +require_once('class_dossier.php'); +$gDossier=dossier::id(); -if ( ! isset ( $_SESSION['g_dossier'] ) ) { - echo "You must choose a Dossier "; - exit -2; -} -$cn=DbConnect($_SESSION['g_dossier']); +$cn=DbConnect($gDossier); $User=new cl_user($cn); $User->Check(); @@ -50,7 +48,7 @@ if ( isset( $_GET['p_jrn'] )) { // Check privilege // CheckJrn verify that the user is not an admin // an admin has all right - if ( CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_GET['p_jrn']) != 2 ) { + if ( CheckJrn($gDossier,$_SESSION['g_user'],$_GET['p_jrn']) != 2 ) { NoAccess(); exit -1; } @@ -81,6 +79,7 @@ soit par son écriture inverse ?
'; diff --git a/html/commercial.php b/html/commercial.php index 9682b8f89..9e714b665 100644 --- a/html/commercial.php +++ b/html/commercial.php @@ -30,18 +30,15 @@ include_once ("ac_common.php"); require_once("constant.php"); include_once ("postgres.php"); echo JS_AJAX_FICHE; +require_once('class_dossier.php'); +$gDossier=dossier::id(); -if ( isset ($_REQUEST['dos'] ) ) { - $_SESSION['g_dossier']=$_REQUEST['dos']; - $g_name=GetDossierName($_SESSION['g_dossier']); - $_SESSION["g_name"]=$g_name; - -} +$g_name=dossier::name(); include_once ("postgres.php"); /* Admin. Dossier */ -$rep=DbConnect($_SESSION['g_dossier']); +$rep=DbConnect($gDossier); require_once ("class_user.php"); $User=new cl_user($rep); $User->Check(); @@ -64,22 +61,23 @@ if ( isset ( $_POST['p_size']) ) { /// html_page_start($_SESSION['g_theme'],"","richtext.js"); -if ( ! isset ( $_SESSION['g_dossier'] ) ) { +if ( ! isset ( $gDossier ) ) { echo "Vous devez choisir un dossier "; exit -2; } include_once("preference.php"); include_once("user_menu.php"); +$str_dossier=dossier::get(); echo '