From ee8556ccfab1a39732663190ca41e66dae24729c Mon Sep 17 00:00:00 2001 From: sparkyx Date: Fri, 11 Jan 2008 23:34:28 +0000 Subject: [PATCH] Change cl_user to User --- html/admin_repo.php | 2 +- html/ajax_import.php | 2 +- html/annulation.php | 2 +- html/bal_csv.php | 2 +- html/bilan.php | 2 +- html/bud_search_poste.php | 2 +- html/budget.php | 2 +- html/commercial.php | 2 +- html/compta.php | 2 +- html/comptanalytic.php | 2 +- html/confirm_remove.php | 2 +- html/ecrit_ouv.php | 2 +- html/export_ouv.php | 2 +- html/fiche.php | 3 +-- html/fiche_csv.php | 2 +- html/fiche_new.php | 2 +- html/fiche_search.php | 2 +- html/form.php | 2 +- html/form_csv.php | 2 +- html/import.php | 2 +- html/jrn_csv.php | 2 +- html/jrn_pdf.php | 2 +- html/jrn_search.php | 2 +- html/line_update.php | 2 +- html/listing_client.php | 2 +- html/login.php | 4 ++-- html/modify_op.php | 2 +- html/parametre.php | 2 +- html/poste_csv.php | 2 +- html/poste_search.php | 2 +- html/print_balance.php | 2 +- html/priv_user.php | 2 +- html/quick_code_csv.php | 2 +- html/recherche.php | 2 +- html/sec_pdf.php | 4 ++-- html/show_document.php | 2 +- html/show_document_modele.php | 2 +- html/show_fiche.php | 2 +- html/show_pj.php | 2 +- html/show_tva.php | 2 +- html/user_advanced.php | 2 +- html/user_compta.php | 2 +- html/user_jrn.php | 2 +- html/user_login.php | 2 +- html/user_pref.php | 2 +- html/user_sec.php | 2 +- include/bank.inc.php | 2 +- include/ca_od.inc.php | 2 +- include/ca_pa.inc.php | 1 + include/check_priv.php | 4 ++-- include/class_acc_ledger.php | 4 ++-- include/class_acc_operation.php | 2 +- include/class_anc_account.php | 2 +- include/class_bud_synthese_group.php | 4 ++-- include/class_customer.php | 2 +- include/class_supplier.php | 2 +- include/class_user.php | 4 ++-- include/depense.inc.php | 2 +- include/facture.inc.php | 2 +- include/import_inc.php | 2 +- include/impress_inc.php | 2 +- include/param_jrn.inc.php | 2 +- include/param_jrn_add.inc.php | 2 +- include/param_jrn_detail.inc.php | 2 +- include/param_pcmn.inc.php | 2 +- include/param_sec.inc.php | 2 +- include/param_user.inc.php | 2 +- include/stock.inc.php | 2 +- include/user_action_ach.php | 2 +- include/user_action_fin.php | 2 +- include/user_action_ods.php | 2 +- include/user_action_ven.php | 2 +- include/user_common.php | 2 +- include/user_menu.php | 2 +- 74 files changed, 80 insertions(+), 80 deletions(-) diff --git a/html/admin_repo.php b/html/admin_repo.php index 19676ff76..c4cf9249c 100644 --- a/html/admin_repo.php +++ b/html/admin_repo.php @@ -30,7 +30,7 @@ include_once("debug.php"); include_once("user_menu.php"); $rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); diff --git a/html/ajax_import.php b/html/ajax_import.php index b4e3cd6d3..3cb9aff35 100644 --- a/html/ajax_import.php +++ b/html/ajax_import.php @@ -36,7 +36,7 @@ require_once ('class_dossier.php'); $cn=DbConnect(dossier::id()); -$User=new cl_user($cn); +$User=new User($cn); $User->Check(); if ( isset ($_GET['action']) && $_GET['action']=='update' diff --git a/html/annulation.php b/html/annulation.php index 43b7b79af..daf0aa46c 100644 --- a/html/annulation.php +++ b/html/annulation.php @@ -40,7 +40,7 @@ require_once('class_dossier.php'); $gDossier=dossier::id(); $cn=DbConnect($gDossier); -$User=new cl_user($cn); +$User=new User($cn); $User->Check(); html_page_start($User->theme,"onLoad='window.focus();'"); diff --git a/html/bal_csv.php b/html/bal_csv.php index 2948740e3..3d7569ece 100644 --- a/html/bal_csv.php +++ b/html/bal_csv.php @@ -34,7 +34,7 @@ $cn=DbConnect($gDossier); require_once ('class_user.php'); -$User=new cl_user(DbConnect()); +$User=new User(DbConnect()); $User->Check(); if ( $User->check_action($cn,BALANCE) == 0) { diff --git a/html/bilan.php b/html/bilan.php index e9553b3c2..9a1b36c3b 100644 --- a/html/bilan.php +++ b/html/bilan.php @@ -34,7 +34,7 @@ $gDossier=dossier::id(); /* Admin. Dossier */ $cn=DbConnect($gDossier); -$User=new cl_user($cn); +$User=new User($cn); $User->Check(); // TODO a specific level of security for the "bilan" ??? diff --git a/html/bud_search_poste.php b/html/bud_search_poste.php index 34a853cc4..abe9c9162 100644 --- a/html/bud_search_poste.php +++ b/html/bud_search_poste.php @@ -34,7 +34,7 @@ $rep=DbConnect(); html_page_start($_SESSION['g_theme'],'onLoad="window.focus();"'); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); diff --git a/html/budget.php b/html/budget.php index f07ea12bb..b3cace1e4 100644 --- a/html/budget.php +++ b/html/budget.php @@ -42,7 +42,7 @@ include_once ("postgres.php"); /* Admin. Dossier */ $rep=DbConnect($gDossier); require_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); echo '
'; diff --git a/html/commercial.php b/html/commercial.php index ff457fdb3..a01aaa254 100644 --- a/html/commercial.php +++ b/html/commercial.php @@ -40,7 +40,7 @@ include_once ("postgres.php"); /* Admin. Dossier */ $rep=DbConnect($gDossier); require_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); //----------------------------------------------------- diff --git a/html/compta.php b/html/compta.php index 2fc54c548..e9244e620 100644 --- a/html/compta.php +++ b/html/compta.php @@ -35,7 +35,7 @@ $cn=DbConnect($gDossier); require_once ('class_user.php'); -$User=new cl_user($cn); +$User=new User($cn); $User->Check(); require_once ("check_priv.php"); diff --git a/html/comptanalytic.php b/html/comptanalytic.php index b0a9cd035..be7725188 100644 --- a/html/comptanalytic.php +++ b/html/comptanalytic.php @@ -34,7 +34,7 @@ $gDossier=dossier::id(); $str_dossier=dossier::get(); $cn=DbConnect($gDossier); require_once ("class_user.php"); -$User=new cl_user($cn); +$User=new User($cn); $User->Check(); diff --git a/html/confirm_remove.php b/html/confirm_remove.php index 054224076..0781b0e07 100644 --- a/html/confirm_remove.php +++ b/html/confirm_remove.php @@ -32,7 +32,7 @@ include_once("ac_common.php"); $rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); html_page_start($User->theme,'onLoad="window.focus();"'); $User->Check(); if ($User->admin != 1) { diff --git a/html/ecrit_ouv.php b/html/ecrit_ouv.php index f6c393c51..482c0495e 100644 --- a/html/ecrit_ouv.php +++ b/html/ecrit_ouv.php @@ -33,7 +33,7 @@ include_once ("postgres.php"); /* Admin. Dossier */ include_once ("class_user.php"); $cn=DbConnect($gDossier); -$User=new cl_user($cn); +$User=new User($cn); $User->Check(); include_once ("check_priv.php"); diff --git a/html/export_ouv.php b/html/export_ouv.php index 468574b9f..e8c1e78da 100644 --- a/html/export_ouv.php +++ b/html/export_ouv.php @@ -33,7 +33,7 @@ include_once ("postgres.php"); /* Admin. Dossier */ $rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); include_once ("check_priv.php"); diff --git a/html/fiche.php b/html/fiche.php index 900353754..104828342 100644 --- a/html/fiche.php +++ b/html/fiche.php @@ -41,11 +41,10 @@ include_once ("user_menu.php"); $rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); include ("check_priv.php"); echo '
'; -var_dump($_SERVER); echo ShowMenuCompta($_SESSION['g_dossier']); echo '
'; diff --git a/html/fiche_csv.php b/html/fiche_csv.php index cd2ea3f7f..eda0e0d71 100644 --- a/html/fiche_csv.php +++ b/html/fiche_csv.php @@ -36,7 +36,7 @@ $cn=DbConnect($gDossier); $rep=DbConnect(); require_once ('class_user.php'); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); $User->can_request($cn,FICHE_READ); diff --git a/html/fiche_new.php b/html/fiche_new.php index 42e588343..709a60043 100644 --- a/html/fiche_new.php +++ b/html/fiche_new.php @@ -31,7 +31,7 @@ require_once("class_fiche_def.php"); /* Admin. Dossier */ $rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); html_page_start($User->theme,"onLoad='window.focus();'"); diff --git a/html/fiche_search.php b/html/fiche_search.php index aef30680e..d9e907382 100644 --- a/html/fiche_search.php +++ b/html/fiche_search.php @@ -29,7 +29,7 @@ include_once("jrn.php"); /* Admin. Dossier */ $rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); //determine focus: diff --git a/html/form.php b/html/form.php index 7baf0c231..ff537c284 100644 --- a/html/form.php +++ b/html/form.php @@ -33,7 +33,7 @@ include_once ("postgres.php"); /* Admin. Dossier */ $rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); include_once("form_inc.php"); diff --git a/html/form_csv.php b/html/form_csv.php index bcbfcbc9b..1c1c6d725 100644 --- a/html/form_csv.php +++ b/html/form_csv.php @@ -35,7 +35,7 @@ $gDossier=dossier::id(); $cn=DbConnect($gDossier); -$User=new cl_user($cn); +$User=new User($cn); $User->Check(); diff --git a/html/import.php b/html/import.php index 6c6904de0..c915ae8a1 100644 --- a/html/import.php +++ b/html/import.php @@ -36,7 +36,7 @@ $gDossier=dossier::id(); $cn=DbConnect($gDossier); include ('class_user.php'); -$User=new cl_user($cn); +$User=new User($cn); $User->Check(); html_page_start($User->theme); diff --git a/html/jrn_csv.php b/html/jrn_csv.php index 2aca605d0..c3eaa4bb3 100644 --- a/html/jrn_csv.php +++ b/html/jrn_csv.php @@ -36,7 +36,7 @@ $cn=DbConnect($gDossier); $rep=DbConnect(); require_once ('class_user.php'); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); if ( $User->check_action($cn,IMP) == 0 || $User->AccessJrn($cn,$_GET['jrn_id']) == false){ diff --git a/html/jrn_pdf.php b/html/jrn_pdf.php index a75f89a0c..a06f99601 100644 --- a/html/jrn_pdf.php +++ b/html/jrn_pdf.php @@ -51,7 +51,7 @@ if ($_GET['central'] == 'on' ) { $Jrn=new Acc_Ledger($cn,$_GET['jrn_id']); $Jrn->get_name(); -$User=new cl_user(DbConnect()); +$User=new User(DbConnect()); $User->Check(); // Security diff --git a/html/jrn_search.php b/html/jrn_search.php index 86ddfff88..e6b60f234 100644 --- a/html/jrn_search.php +++ b/html/jrn_search.php @@ -28,7 +28,7 @@ require_once("user_common.php"); /* Admin. Dossier */ $rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); diff --git a/html/line_update.php b/html/line_update.php index a413f1136..af3cc0d16 100644 --- a/html/line_update.php +++ b/html/line_update.php @@ -31,7 +31,7 @@ include_once("check_priv.php"); /* Admin. Dossier */ $rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); html_page_start($User->theme,"onLoad='window.focus();'"); diff --git a/html/listing_client.php b/html/listing_client.php index 66298893b..d991e46fe 100644 --- a/html/listing_client.php +++ b/html/listing_client.php @@ -32,7 +32,7 @@ $gDossier=dossier::id(); $cn=DbConnect($gDossier); -$User=new cl_user($cn); +$User=new User($cn); $User->Check(); // TODO a specific level of security for the "bilan" ??? diff --git a/html/login.php b/html/login.php index 0f2f98d72..e4e08784c 100644 --- a/html/login.php +++ b/html/login.php @@ -38,7 +38,7 @@ if ( isset ($_POST["p_user"] ) ) { // if no, then redirect to the login page $rep=DbConnect(); include_once ("class_user.php"); - $User=new cl_user($rep); + $User=new User($rep); $User->Check(); echo ""; @@ -47,7 +47,7 @@ if ( isset ($_POST["p_user"] ) ) { { $rep=DbConnect(); include_once ("class_user.php"); - $User=new cl_user($rep); + $User=new User($rep); $User->Check(); echo ""; diff --git a/html/modify_op.php b/html/modify_op.php index 658832bbe..2ad0436cc 100644 --- a/html/modify_op.php +++ b/html/modify_op.php @@ -37,7 +37,7 @@ require_once ("constant.php"); /* Admin. Dossier */ $rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); html_page_start($User->theme,"onLoad='window.focus();'"); diff --git a/html/parametre.php b/html/parametre.php index b820ca503..11c54cdb2 100644 --- a/html/parametre.php +++ b/html/parametre.php @@ -34,7 +34,7 @@ include_once ("postgres.php"); /* Admin. Dossier */ $rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); include_once("preference.php"); diff --git a/html/poste_csv.php b/html/poste_csv.php index 2b1bc07f2..b2813c602 100644 --- a/html/poste_csv.php +++ b/html/poste_csv.php @@ -34,7 +34,7 @@ $gDossier=dossier::id(); $cn=DbConnect($gDossier); -$User=new cl_user($cn); +$User=new User($cn); $User->Check(); if ( isset ( $_POST['poste_fille']) ) { //choisit de voir tous les postes diff --git a/html/poste_search.php b/html/poste_search.php index f8db1cfb7..c17d49117 100644 --- a/html/poste_search.php +++ b/html/poste_search.php @@ -31,7 +31,7 @@ include_once("jrn.php"); /* Admin. Dossier */ $rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); echo JS_SEARCH_POSTE; diff --git a/html/print_balance.php b/html/print_balance.php index 83d9cccd2..485d6eaf5 100644 --- a/html/print_balance.php +++ b/html/print_balance.php @@ -45,7 +45,7 @@ $gDossier=dossier::id(); $cn=DbConnect($gDossier); $rep=DbConnect(); include ('class_user.php'); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); $bal=new Acc_Balance($cn); diff --git a/html/priv_user.php b/html/priv_user.php index 1d04ab3e6..ca7da70bf 100644 --- a/html/priv_user.php +++ b/html/priv_user.php @@ -30,7 +30,7 @@ echo_debug('priv_user.php',__LINE__,"entering priv_users"); $rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); if ($User->admin != 1) { diff --git a/html/quick_code_csv.php b/html/quick_code_csv.php index 815588db2..304d47fb3 100644 --- a/html/quick_code_csv.php +++ b/html/quick_code_csv.php @@ -34,7 +34,7 @@ $gDossier=dossier::id(); $cn=DbConnect($gDossier); -$User=new cl_user($cn); +$User=new User($cn); $User->Check(); $Fiche=new fiche($cn,$_REQUEST['f_id']); diff --git a/html/recherche.php b/html/recherche.php index 4b833f1c8..6dd4703e9 100644 --- a/html/recherche.php +++ b/html/recherche.php @@ -38,7 +38,7 @@ include_once ("check_priv.php"); $cn=DbConnect($gDossier); include_once ('class_user.php'); -$User=new cl_user($cn); +$User=new User($cn); $User->Check(); // PhpSessid diff --git a/html/sec_pdf.php b/html/sec_pdf.php index 8f2ee4c72..3752f4148 100755 --- a/html/sec_pdf.php +++ b/html/sec_pdf.php @@ -38,7 +38,7 @@ $cn=DbConnect($gDossier); // Check User $rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); // Check Priv $User->can_request($cn,SECU); @@ -48,7 +48,7 @@ $User->can_request($cn,SECU); if ( ! isset($_GET['user_id']) ) return; -$SecUser=new cl_user($rep,$_GET['user_id']); +$SecUser=new User($rep,$_GET['user_id']); //----------------------------------------------------- diff --git a/html/show_document.php b/html/show_document.php index 9506a9ab2..90eb2f3a9 100644 --- a/html/show_document.php +++ b/html/show_document.php @@ -32,7 +32,7 @@ $cn=DbConnect($gDossier); require_once ('class_user.php'); -$User=new cl_user(DbConnect()); +$User=new User(DbConnect()); /*!\todo Add security here */ $User->Check(); diff --git a/html/show_document_modele.php b/html/show_document_modele.php index ecd7bf276..3b40ef0fc 100644 --- a/html/show_document_modele.php +++ b/html/show_document_modele.php @@ -32,7 +32,7 @@ $cn=DbConnect($gDossier); require_once ('class_user.php'); -$User=new cl_user(DbConnect()); +$User=new User(DbConnect()); /*!\todo Add security here */ $User->Check(); diff --git a/html/show_fiche.php b/html/show_fiche.php index 5882e23f1..782f8a888 100644 --- a/html/show_fiche.php +++ b/html/show_fiche.php @@ -36,7 +36,7 @@ require_once('class_widget.php'); require_once('class_dossier.php'); $gDossier=dossier::id(); -$User=new cl_user(DbConnect()); +$User=new User(DbConnect()); $User->Check(); html_page_start($_SESSION['g_theme'],"onLoad='window.focus();'"); diff --git a/html/show_pj.php b/html/show_pj.php index 2b91fcbd6..336df11ac 100644 --- a/html/show_pj.php +++ b/html/show_pj.php @@ -37,7 +37,7 @@ $cn=DbConnect($gDossier); include_once ('class_user.php'); -$User=new cl_user(DbConnect()); +$User=new User(DbConnect()); $User->Check(); // retrieve the jrn $r=ExecSql($cn,"select jr_def_id from jrn where jr_grpt_id=$jr_grpt_id"); diff --git a/html/show_tva.php b/html/show_tva.php index 78d87f7b1..4fa7f4629 100644 --- a/html/show_tva.php +++ b/html/show_tva.php @@ -27,7 +27,7 @@ include_once ("postgres.php"); /* Admin. Dossier */ $rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); require_once('class_dossier.php'); $gDossier=dossier::id(); diff --git a/html/user_advanced.php b/html/user_advanced.php index 854be3a7f..3eceb9b61 100644 --- a/html/user_advanced.php +++ b/html/user_advanced.php @@ -34,7 +34,7 @@ include_once ("postgres.php"); /* Admin. Dossier */ $rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); $cn=DbConnect(dossier::id()); include_once ("postgres.php"); diff --git a/html/user_compta.php b/html/user_compta.php index b2621c105..f727a504b 100644 --- a/html/user_compta.php +++ b/html/user_compta.php @@ -29,7 +29,7 @@ include_once ("postgres.php"); $rep=DbConnect(); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); html_page_start($User->theme); diff --git a/html/user_jrn.php b/html/user_jrn.php index cbedeb6c9..14b5b98b7 100644 --- a/html/user_jrn.php +++ b/html/user_jrn.php @@ -37,7 +37,7 @@ $gDossier=dossier::id(); $cn=DbConnect($gDossier); include_once ('class_user.php'); -$User=new cl_user($cn); +$User=new User($cn); $User->Check(); html_page_start($User->theme, diff --git a/html/user_login.php b/html/user_login.php index 7c1107022..40fbe5f86 100644 --- a/html/user_login.php +++ b/html/user_login.php @@ -26,7 +26,7 @@ include_once ("ac_common.php"); include_once("postgres.php"); $rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); html_page_start($_SESSION['g_theme']); diff --git a/html/user_pref.php b/html/user_pref.php index bb2a68b23..2f66e5f9e 100644 --- a/html/user_pref.php +++ b/html/user_pref.php @@ -46,7 +46,7 @@ else } -$User=new cl_user($cn); +$User=new User($cn); $User->Check(); // Met a jour le theme utilisateur (style) diff --git a/html/user_sec.php b/html/user_sec.php index c6e964f1a..963b33e24 100644 --- a/html/user_sec.php +++ b/html/user_sec.php @@ -35,7 +35,7 @@ include_once ("postgres.php"); /* Admin. Dossier */ $rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); include_once ("user_menu.php"); diff --git a/include/bank.inc.php b/include/bank.inc.php index 9f81a2af7..6f2915554 100644 --- a/include/bank.inc.php +++ b/include/bank.inc.php @@ -152,7 +152,7 @@ if ( $sub_action == "list") $filter_year=" where p_exercice='".$User->get_exercice()."'"; $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end",1); - // User is already set User=new cl_user($cn); + // User is already set User=new User($cn); $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->get_periode(); $w->selected=$current; diff --git a/include/ca_od.inc.php b/include/ca_od.inc.php index c22869a03..f8b399520 100644 --- a/include/ca_od.inc.php +++ b/include/ca_od.inc.php @@ -91,7 +91,7 @@ echo ' $filter_year=" where p_exercice='".$User->get_exercice()."'"; $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end",1); - $User=new cl_user($cn); + $User=new User($cn); $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->get_periode(); $w->selected=$current; diff --git a/include/ca_pa.inc.php b/include/ca_pa.inc.php index ab4f35648..c97a2fb3a 100644 --- a/include/ca_pa.inc.php +++ b/include/ca_pa.inc.php @@ -29,6 +29,7 @@ require_once("class_anc_plan.php"); require_once("class_anc_account.php"); $ret=""; + //--------------------------------------------------------------------------- // action // Compute the u_redcontent div diff --git a/include/check_priv.php b/include/check_priv.php index 45ed5df0b..c201b50af 100644 --- a/include/check_priv.php +++ b/include/check_priv.php @@ -134,8 +134,8 @@ function CheckJrn($p_dossier,$p_user,$p_jrn,$p_detail=False) /*! * \brief Check if an user is allowed to do an action, * this function is only used by the user_sec.php, - * otherwise you have to use cl_user->check_action - * or $cl_user->can_request + * otherwise you have to use User->check_action + * or $User->can_request * * \param p_dossier dossier id * \param p_login user's login diff --git a/include/class_acc_ledger.php b/include/class_acc_ledger.php index 228fd4bec..211802e79 100644 --- a/include/class_acc_ledger.php +++ b/include/class_acc_ledger.php @@ -698,7 +698,7 @@ class Acc_Ledger { * \return object widget select */ function select_ledger() { - $user=new cl_user($this->db); + $user=new User($this->db); $array=$user->get_ledger(); $idx=0; $ret=array(); @@ -992,7 +992,7 @@ class Acc_Ledger { function verify($p_array) { extract ($p_array); - $user=new cl_user($this->db); + $user=new User($this->db); $tot_cred=0;$tot_deb=0; // Check the periode and the date if ( isDate($date) == null ) { diff --git a/include/class_acc_operation.php b/include/class_acc_operation.php index db6a15873..8a35ce6e4 100644 --- a/include/class_acc_operation.php +++ b/include/class_acc_operation.php @@ -50,7 +50,7 @@ var $jr_id; /*!< pk of jrn */ $this->db=$p_cn; $this->qcode=""; $this->user=$_SESSION['g_user']; - $user=new cl_user($this->db); + $user=new User($this->db); $this->periode=$user->get_periode(); } /* ************************************************** diff --git a/include/class_anc_account.php b/include/class_anc_account.php index cb605ef86..c8db6ebff 100644 --- a/include/class_anc_account.php +++ b/include/class_anc_account.php @@ -151,6 +151,7 @@ class Anc_Account } private function format_data() { + $this->name=FormatString($this->name); $this->pa_id=FormatString($this->pa_id); $this->amount=FormatString($this->amount); @@ -272,7 +273,6 @@ class Anc_Account } function get_from_array($p_array) { - print_r($p_array); $this->name=(isset ($p_array['po_name']))?$p_array['po_name']:""; $this->description=(isset ($p_array['po_description']))?$p_array['po_description']:""; $this->pa_id=(isset ($p_array['pa_id']))?$p_array['pa_id']:""; diff --git a/include/class_bud_synthese_group.php b/include/class_bud_synthese_group.php index 6b0bf1754..03e79f74c 100644 --- a/include/class_bud_synthese_group.php +++ b/include/class_bud_synthese_group.php @@ -409,13 +409,13 @@ Array $ix_acc='AC_'.$c['p_id']; $ix_bud='BD_'.$c['p_id']; $color=""; - if ( strpos($key,'6') === 0 || strpo($key,'5')===0) { + if ( strpos($key,'6') === 0 ) { if ( $value[$ix_acc] > $value[$ix_bud] ) $color="red"; else $color="lightgreen"; } - if ( strpos($key,'7') === 0 ) { + if ( strpos($key,'7') === 0 || strpos($key,'5')===0 ) { if ( $value[$ix_acc] < $value[$ix_bud] ) $color="red"; else diff --git a/include/class_customer.php b/include/class_customer.php index 2746ae5b0..9fc3d9f9c 100644 --- a/include/class_customer.php +++ b/include/class_customer.php @@ -248,7 +248,7 @@ where $post=new Acc_Account($this->cn,$client->strAttribut(ATTR_DEF_ACCOUNT)); /* Filter on the default year */ - $User=new cl_user($this->cn); + $User=new User($this->cn); $filter_year=" j_tech_per in (select p_id from parm_periode ". "where p_exercice='".$User->get_exercice()."')"; $a=$post->get_solde_detail($filter_year); diff --git a/include/class_supplier.php b/include/class_supplier.php index 23eaaf240..a36d5c91b 100644 --- a/include/class_supplier.php +++ b/include/class_supplier.php @@ -131,7 +131,7 @@ class Supplier extends fiche{ $post=new Acc_Account($this->cn,$supplier->strAttribut(ATTR_DEF_ACCOUNT)); /* Filter on the default year */ - $User=new cl_user($this->cn); + $User=new User($this->cn); $filter_year=" j_tech_per in (select p_id from parm_periode ". "where p_exercice='".$User->get_exercice()."')"; $a=$post->get_solde_detail($filter_year); diff --git a/include/class_user.php b/include/class_user.php index aa432bb11..eb16ef5a2 100644 --- a/include/class_user.php +++ b/include/class_user.php @@ -30,14 +30,14 @@ include_once("constant.php"); -class cl_user { +class User { var $id; var $pass; var $db; var $admin; var $valid; - function cl_user ($p_cn,$p_id=-1){ + function User ($p_cn,$p_id=-1){ // if p_id is not set then check the connected user if ( $p_id == -1 ) { echo_debug('class_user.php',__LINE__," g_user = ".$_SESSION['g_user']); diff --git a/include/depense.inc.php b/include/depense.inc.php index 59ca52ad7..1519fab8d 100644 --- a/include/depense.inc.php +++ b/include/depense.inc.php @@ -165,7 +165,7 @@ if ( $sub_action == "list") $filter_year=" where p_exercice='".$User->get_exercice()."'"; $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end",1); - // User is already set User=new cl_user($cn); + // User is already set User=new User($cn); $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->get_periode(); $w->selected=$current; diff --git a/include/facture.inc.php b/include/facture.inc.php index 14916ab0c..9bf8d77c3 100644 --- a/include/facture.inc.php +++ b/include/facture.inc.php @@ -125,7 +125,7 @@ if ( $sub_action == "list") $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') ". " from parm_periode $filter_year order by p_start,p_end",1); - // User is already set User=new cl_user($cn); + // User is already set User=new User($cn); $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->get_periode(); $w->selected=$current; diff --git a/include/import_inc.php b/include/import_inc.php index a11a4a0ea..b70533e2b 100644 --- a/include/import_inc.php +++ b/include/import_inc.php @@ -243,7 +243,7 @@ function ConfirmTransfert($p_cn,$periode){ function TransferCSV($p_cn, $periode){ //on obtient la période courante - $User=new cl_user($p_cn); + $User=new User($p_cn); $periode = $User->get_periode(); // on trouve les dates frontières de cette période diff --git a/include/impress_inc.php b/include/impress_inc.php index 08a31e7ec..bdc50faa5 100644 --- a/include/impress_inc.php +++ b/include/impress_inc.php @@ -578,7 +578,7 @@ function ParseFormula($p_cn,$p_label,$p_formula,$p_start,$p_end,$p_eval=true,$p_ */ if ( $from == '00.0000' ) { // retrieve the first month of this periode - $User=new cl_user($p_cn); + $User=new User($p_cn); $user_periode=$User->getPeriode(); $periode=getDbValue($p_cn, "select p_exercice from parm_periode where p_id=$user_periode"); diff --git a/include/param_jrn.inc.php b/include/param_jrn.inc.php index 7d1447a84..33bfbad6f 100644 --- a/include/param_jrn.inc.php +++ b/include/param_jrn.inc.php @@ -30,7 +30,7 @@ include_once ("postgres.php"); /* Admin. Dossier */ $rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); include_once ("check_priv.php"); diff --git a/include/param_jrn_add.inc.php b/include/param_jrn_add.inc.php index ad5167cff..705e8d36d 100644 --- a/include/param_jrn_add.inc.php +++ b/include/param_jrn_add.inc.php @@ -35,7 +35,7 @@ include_once ("postgres.php"); /* Admin. Dossier */ $rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); include_once("check_priv.php"); include_once ("user_menu.php"); diff --git a/include/param_jrn_detail.inc.php b/include/param_jrn_detail.inc.php index c02cb84ff..8853926d1 100644 --- a/include/param_jrn_detail.inc.php +++ b/include/param_jrn_detail.inc.php @@ -30,7 +30,7 @@ include_once ("postgres.php"); /* Admin. Dossier */ $rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); include_once("check_priv.php"); diff --git a/include/param_pcmn.inc.php b/include/param_pcmn.inc.php index d38e07bd7..f33d1a6bd 100644 --- a/include/param_pcmn.inc.php +++ b/include/param_pcmn.inc.php @@ -31,7 +31,7 @@ include_once ("postgres.php"); /* Admin. Dossier */ $rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); diff --git a/include/param_sec.inc.php b/include/param_sec.inc.php index 9253f9b3c..84176f92a 100644 --- a/include/param_sec.inc.php +++ b/include/param_sec.inc.php @@ -34,7 +34,7 @@ include_once ("postgres.php"); /* Admin. Dossier */ $rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); include_once ("user_menu.php"); diff --git a/include/param_user.inc.php b/include/param_user.inc.php index b411d35fc..9c64445f3 100644 --- a/include/param_user.inc.php +++ b/include/param_user.inc.php @@ -34,7 +34,7 @@ include_once ("postgres.php"); /* Admin. Dossier */ $rep=DbConnect(); include_once ("class_user.php"); -$User=new cl_user($rep); +$User=new User($rep); $User->Check(); include_once ("user_menu.php"); diff --git a/include/stock.inc.php b/include/stock.inc.php index ff956afab..1346a4854 100644 --- a/include/stock.inc.php +++ b/include/stock.inc.php @@ -41,7 +41,7 @@ $gDossier=dossier::id(); $cn=DbConnect($gDossier); include_once ("class_user.php"); -$User=new cl_user($cn); +$User=new User($cn); $User->Check(); // Synchronize rights diff --git a/include/user_action_ach.php b/include/user_action_ach.php index 5b970f4cf..ff11c80c3 100644 --- a/include/user_action_ach.php +++ b/include/user_action_ach.php @@ -259,7 +259,7 @@ $w->name="p_periode"; $filter_year=" where p_exercice='".$User->get_exercice()."'"; $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end",1); -$User=new cl_user($cn); +$User=new User($cn); $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->get_periode(); $w->selected=$current; diff --git a/include/user_action_fin.php b/include/user_action_fin.php index b6f6ae18f..46d205d43 100644 --- a/include/user_action_fin.php +++ b/include/user_action_fin.php @@ -226,7 +226,7 @@ $w=new widget("select"); $filter_year=" where p_exercice='".$User->get_exercice()."'"; $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end",1); -$User=new cl_user($cn); +$User=new User($cn); $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->get_periode(); $w->selected=$current; diff --git a/include/user_action_ods.php b/include/user_action_ods.php index 61ab2445e..0a90224ed 100644 --- a/include/user_action_ods.php +++ b/include/user_action_ods.php @@ -259,7 +259,7 @@ $w=new widget("select"); $filter_year=" where p_exercice='".$User->get_exercice()."'"; $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end",1); -$User=new cl_user($cn); +$User=new User($cn); $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->get_periode(); $w->selected=$current; diff --git a/include/user_action_ven.php b/include/user_action_ven.php index 449526da6..d23cd76dd 100644 --- a/include/user_action_ven.php +++ b/include/user_action_ven.php @@ -234,7 +234,7 @@ $w=new widget("select"); $filter_year=" where p_exercice='".$User->get_exercice()."'"; $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end",1); -// User is already set User=new cl_user($cn); +// User is already set User=new User($cn); $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->get_periode(); $w->selected=$current; diff --git a/include/user_common.php b/include/user_common.php index 1af9b7060..58eda977b 100644 --- a/include/user_common.php +++ b/include/user_common.php @@ -557,7 +557,7 @@ $sort_echeance=" $image_ascEch $l_and=" and "; } // if not admin check filter - $User=new cl_user(DbConnect()); + $User=new User(DbConnect()); $User->Check(); if ( $User->admin == 0 ) { diff --git a/include/user_menu.php b/include/user_menu.php index 0fd38a01a..2f0addcde 100644 --- a/include/user_menu.php +++ b/include/user_menu.php @@ -267,7 +267,7 @@ function ShowMenuJrnUser($p_dossier,$p_type,$p_jrn,$p_extra="") $Cn=DbConnect($p_dossier); - $User=new cl_user($Cn); + $User=new User($Cn); $User->Check(); if ( $User->Admin() ==0) { $Ret=ExecSql($Cn,"select jrn_def_id,jrn_def_type,jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv,