From f837f6da8b81b8280f670173e68a1aa31d209de7 Mon Sep 17 00:00:00 2001
From: sparkyx
Date: Fri, 17 Aug 2007 23:29:02 +0000
Subject: [PATCH] Replace $_SESSION[g_dossier] by a variable gDossier, this
parameter is passed thanks the class dossier
---
html/annulation.php | 20 +--
html/bal_csv.php | 4 +-
html/bilan.php | 5 +-
html/central.php | 14 +-
html/commercial.php | 53 ++++---
html/compta.php | 17 +--
html/comptanalytic.php | 31 ++--
html/ecrit_ouv.php | 19 ++-
html/export_ouv.php | 11 +-
html/fiche_csv.php | 5 +-
html/fiche_new.php | 13 +-
html/fiche_search.php | 10 +-
html/fid.php | 4 +-
html/form.php | 21 +--
html/form_csv.php | 4 +-
html/form_pdf.php | 5 +-
html/import.php | 16 +-
html/jrn_add.php | 14 +-
html/jrn_csv.php | 5 +-
html/jrn_detail.php | 14 +-
html/jrn_pdf.php | 9 +-
html/jrn_search.php | 11 +-
html/jrn_update.php | 16 +-
html/js/ajax_fiche.js | 3 +-
html/js/ajax_op.js | 4 +-
html/js/cancel_op.js | 4 +-
html/js/jrn_concerned.js | 4 +-
html/js/modify_op.js | 13 +-
html/js/scripts.js | 2 +-
html/js/search_card.js | 13 +-
html/js/search_poste.js | 8 +-
html/line_update.php | 10 +-
html/listing_client.php | 5 +-
html/modify_op.php | 14 +-
html/parametre.php | 19 +--
html/pcmn_update.php | 18 ++-
html/poste_csv.php | 4 +-
html/poste_pdf.php | 4 +-
html/poste_search.php | 11 +-
html/print_balance.php | 4 +-
html/quick_code_csv.php | 4 +-
html/quick_code_pdf.php | 4 +-
html/recherche.php | 8 +-
html/remove_op.php | 4 +-
html/sec_pdf.php | 12 +-
html/send_jrn_pdf.php | 11 +-
html/show_document.php | 5 +-
html/show_document_modele.php | 5 +-
html/show_fiche.php | 4 +-
html/show_pj.php | 5 +-
html/show_tva.php | 10 +-
html/style-color.css | 2 -
html/style.css | 2 -
html/user_advanced.php | 18 ++-
html/user_compta.php | 20 +--
html/user_impress.php | 13 +-
html/user_jrn.php | 26 ++--
html/user_login.php | 3 -
html/user_pref.php | 11 +-
html/user_sec.php | 56 +++----
include/action.inc.php | 17 ++-
include/admin.inc.php | 11 +-
include/balance.php | 3 +
include/bank.inc.php | 26 ++--
include/ca_od.inc.php | 7 +-
include/ca_pa.inc.php | 25 ++--
include/class_action.php | 33 +++--
include/class_admin.php | 17 ++-
include/class_customer.php | 20 +--
include/class_document_modele.php | 5 +-
include/class_dossier.php | 58 ++++++--
include/class_fiche.php | 61 ++++----
include/class_fiche_def.php | 16 +-
include/class_operation.php | 10 +-
include/class_poste.php | 5 +-
include/class_supplier.php | 7 +-
include/class_widget.php | 15 +-
include/client.inc.php | 12 +-
include/constant.php | 6 +-
include/contact.inc.php | 13 +-
include/depense.inc.php | 23 +--
include/facture.inc.php | 17 ++-
include/fiche.inc.php | 124 ++++++++--------
include/fiche_inc.php | 2 +-
include/form_inc.php | 1 +
include/header_print.php | 7 +-
include/import_inc.php | 6 +-
include/impress.inc.php | 20 +--
include/impress_bilan.php | 1 +
include/impress_fiche.php | 14 +-
include/impress_inc.php | 12 +-
include/impress_jrn.php | 11 +-
include/impress_listing_client.php | 4 +-
include/impress_poste.php | 1 +
include/impress_rapport.php | 5 +
include/jrn.php | 44 +++---
include/periode.inc.php | 5 +-
include/pref.inc.php | 6 +-
include/preference.php | 8 +-
include/stock.inc.php | 32 ++--
include/supplier.inc.php | 4 +-
include/user_action_ach.php | 13 +-
include/user_action_fin.php | 9 +-
include/user_action_gl.php | 4 +-
include/user_action_ods.php | 15 +-
include/user_action_ven.php | 34 +++--
include/user_common.php | 16 +-
include/user_form_ach.php | 2 +
include/user_form_fin.php | 9 +-
include/user_form_ods.php | 3 +-
include/user_form_ven.php | 8 +-
include/user_menu.php | 226 +++++++++++++++--------------
include/user_update.php | 6 +-
sql/upgrade.sql | 2 +
114 files changed, 954 insertions(+), 791 deletions(-)
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 '