rename user.class.php and User by noalyss_user.class.php and Noalyss_User
This commit is contained in:
parent
b525024728
commit
ae868936af
47 changed files with 97 additions and 103 deletions
|
|
@ -16,7 +16,7 @@ if ( ! defined ('ALLOWED') ) define ('ALLOWED',1);
|
||||||
require_once '../include/constant.php';
|
require_once '../include/constant.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/database.class.php';
|
require_once NOALYSS_INCLUDE.'/class/database.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/icon_action.class.php';
|
require_once NOALYSS_INCLUDE.'/lib/icon_action.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/user.class.php';
|
require_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/extension.class.php';
|
require_once NOALYSS_INCLUDE.'/class/extension.class.php';
|
||||||
if ( !isset ($_REQUEST['gDossier'])) exit();
|
if ( !isset ($_REQUEST['gDossier'])) exit();
|
||||||
|
|
||||||
|
|
@ -32,7 +32,7 @@ if ( ! isset($_SESSION[SESSION_KEY."g_user"])) {
|
||||||
global $g_user,$cn,$g_parameter;
|
global $g_user,$cn,$g_parameter;
|
||||||
$cn=Dossier::connect();
|
$cn=Dossier::connect();
|
||||||
$g_parameter=new Noalyss_Parameter_Folder($cn);
|
$g_parameter=new Noalyss_Parameter_Folder($cn);
|
||||||
$g_user=new User($cn);
|
$g_user=new Noalyss_user($cn);
|
||||||
$g_user->check(true);
|
$g_user->check(true);
|
||||||
IDate::set_firstDate($g_user->get_first_week_day());
|
IDate::set_firstDate($g_user->get_first_week_day());
|
||||||
set_language();
|
set_language();
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ require_once NOALYSS_INCLUDE.'/class/fiche.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/iradio.class.php';
|
require_once NOALYSS_INCLUDE.'/lib/iradio.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/function_javascript.php';
|
require_once NOALYSS_INCLUDE.'/lib/function_javascript.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
|
require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/user.class.php';
|
require_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
|
require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/icon_action.class.php';
|
require_once NOALYSS_INCLUDE.'/lib/icon_action.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/progress_bar.class.php';
|
require_once NOALYSS_INCLUDE.'/lib/progress_bar.class.php';
|
||||||
|
|
@ -94,7 +94,7 @@ global $g_user, $cn, $g_parameter;
|
||||||
if ($gDossier<>0) {
|
if ($gDossier<>0) {
|
||||||
$cn =Dossier::connect();
|
$cn =Dossier::connect();
|
||||||
$g_parameter=new Noalyss_Parameter_Folder($cn);
|
$g_parameter=new Noalyss_Parameter_Folder($cn);
|
||||||
$g_user = new User($cn);
|
$g_user = new Noalyss_user($cn);
|
||||||
$g_user->check(true);
|
$g_user->check(true);
|
||||||
if ( $g_user->check_dossier($gDossier, true) == 'X' ) {
|
if ( $g_user->check_dossier($gDossier, true) == 'X' ) {
|
||||||
die(_('Non autorisé'));
|
die(_('Non autorisé'));
|
||||||
|
|
@ -104,7 +104,7 @@ else
|
||||||
{
|
{
|
||||||
// connect to repository
|
// connect to repository
|
||||||
$cn=new Database();
|
$cn=new Database();
|
||||||
$g_user = new User($cn);
|
$g_user = new Noalyss_user($cn);
|
||||||
$g_user->check(true);
|
$g_user->check(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ require_once NOALYSS_INCLUDE."/class/dossier.class.php";
|
||||||
require_once NOALYSS_INCLUDE."/lib/html_input.class.php";
|
require_once NOALYSS_INCLUDE."/lib/html_input.class.php";
|
||||||
require_once NOALYSS_INCLUDE."/lib/http_input.class.php";
|
require_once NOALYSS_INCLUDE."/lib/http_input.class.php";
|
||||||
require_once NOALYSS_INCLUDE."/lib/function_javascript.php";
|
require_once NOALYSS_INCLUDE."/lib/function_javascript.php";
|
||||||
require_once NOALYSS_INCLUDE."/class/user.class.php";
|
require_once NOALYSS_INCLUDE . "/class/noalyss_user.class.php";
|
||||||
$http=new HttpInput();
|
$http=new HttpInput();
|
||||||
$gDossier=$http->request('gDossier', "number",-1);
|
$gDossier=$http->request('gDossier', "number",-1);
|
||||||
if ($gDossier==-1)
|
if ($gDossier==-1)
|
||||||
|
|
@ -49,7 +49,7 @@ global $cn, $g_user, $g_succeed, $g_failed;
|
||||||
$cn=Dossier::connect();
|
$cn=Dossier::connect();
|
||||||
|
|
||||||
$g_parameter=new Noalyss_Parameter_Folder($cn);
|
$g_parameter=new Noalyss_Parameter_Folder($cn);
|
||||||
$g_user=new User($cn);
|
$g_user=new Noalyss_user($cn);
|
||||||
|
|
||||||
if (!file_exists('authorized_debug'))
|
if (!file_exists('authorized_debug'))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ require_once NOALYSS_INCLUDE.'/class/database.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/acc_compute.class.php';
|
require_once NOALYSS_INCLUDE.'/class/acc_compute.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/dossier.class.php';
|
require_once NOALYSS_INCLUDE.'/class/dossier.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/acc_tva.class.php';
|
require_once NOALYSS_INCLUDE.'/class/acc_tva.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/user.class.php';
|
require_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
|
||||||
|
|
||||||
// Check if the needed field does exist
|
// Check if the needed field does exist
|
||||||
extract ($_GET, EXTR_SKIP );
|
extract ($_GET, EXTR_SKIP );
|
||||||
|
|
@ -55,7 +55,7 @@ $p=str_replace(",",".",$p);
|
||||||
$q=str_replace(",",".",$q);
|
$q=str_replace(",",".",$q);
|
||||||
|
|
||||||
$cn=Dossier::connect();
|
$cn=Dossier::connect();
|
||||||
$User=new User($cn);
|
$User=new Noalyss_user($cn);
|
||||||
$User->Check();
|
$User->Check();
|
||||||
$User->check_dossier(Dossier::id());
|
$User->check_dossier(Dossier::id());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,11 +23,11 @@
|
||||||
*/
|
*/
|
||||||
require_once '../include/constant.php';
|
require_once '../include/constant.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/database.class.php';
|
require_once NOALYSS_INCLUDE.'/class/database.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/user.class.php';
|
require_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
|
||||||
|
|
||||||
$cn=Dossier::connect();
|
$cn=Dossier::connect();
|
||||||
global $g_user;
|
global $g_user;
|
||||||
$g_user=new User($cn);
|
$g_user=new Noalyss_user($cn);
|
||||||
$g_user->Check();
|
$g_user->Check();
|
||||||
$g_user->check_dossier($_GET['gDossier']);
|
$g_user->check_dossier($_GET['gDossier']);
|
||||||
$res=$cn->exec_sql("select distinct code,description from get_profile_menu($1) where code ~* $2 or description ~* $3 order by code limit 5 ",array($g_user->get_profile(),$_POST['acs'],$_POST['acs']));
|
$res=$cn->exec_sql("select distinct code,description from get_profile_menu($1) where code ~* $2 or description ~* $3 order by code limit 5 ",array($g_user->get_profile(),$_POST['acs'],$_POST['acs']));
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ if ( ! isset ($_SESSION[SESSION_KEY.'g_user']))
|
||||||
$cn = Dossier::connect();
|
$cn = Dossier::connect();
|
||||||
|
|
||||||
global $g_user, $cn,$g_parameter,$http;
|
global $g_user, $cn,$g_parameter,$http;
|
||||||
$g_user = new User($cn);
|
$g_user = new Noalyss_user($cn);
|
||||||
$http=new HttpInput();
|
$http=new HttpInput();
|
||||||
IDate::set_firstDate($g_user->get_first_week_day());
|
IDate::set_firstDate($g_user->get_first_week_day());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,12 +28,12 @@ define ('ALLOWED',1);
|
||||||
require_once '../include/constant.php';
|
require_once '../include/constant.php';
|
||||||
global $g_user,$cn,$g_parameter;
|
global $g_user,$cn,$g_parameter;
|
||||||
require_once NOALYSS_INCLUDE.'/class/database.class.php';
|
require_once NOALYSS_INCLUDE.'/class/database.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/user.class.php';
|
require_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
|
require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
|
||||||
$gDossier=dossier::id();
|
$gDossier=dossier::id();
|
||||||
$cn=Dossier::connect();
|
$cn=Dossier::connect();
|
||||||
mb_internal_encoding("UTF-8");
|
mb_internal_encoding("UTF-8");
|
||||||
$g_user=new User($cn);
|
$g_user=new Noalyss_user($cn);
|
||||||
$g_user->Check();
|
$g_user->Check();
|
||||||
$action=$g_user->check_dossier($gDossier);
|
$action=$g_user->check_dossier($gDossier);
|
||||||
set_language();
|
set_language();
|
||||||
|
|
|
||||||
|
|
@ -31,12 +31,12 @@ require_once NOALYSS_INCLUDE.'/lib/function_javascript.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/extension.class.php';
|
require_once NOALYSS_INCLUDE.'/class/extension.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/html_input.class.php';
|
require_once NOALYSS_INCLUDE.'/lib/html_input.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/iselect.class.php';
|
require_once NOALYSS_INCLUDE.'/lib/iselect.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/user.class.php';
|
require_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
|
||||||
|
|
||||||
global $g_user,$cn,$g_parameter;
|
global $g_user,$cn,$g_parameter;
|
||||||
$http=new HttpInput();
|
$http=new HttpInput();
|
||||||
$cn=Dossier::connect();
|
$cn=Dossier::connect();
|
||||||
$g_user=new User($cn);
|
$g_user=new Noalyss_user($cn);
|
||||||
$g_user->check();
|
$g_user->check();
|
||||||
$only_plugin=$g_user->check_dossier(dossier::id());
|
$only_plugin=$g_user->check_dossier(dossier::id());
|
||||||
set_language();
|
set_language();
|
||||||
|
|
|
||||||
10
html/fid.php
10
html/fid.php
|
|
@ -33,11 +33,7 @@
|
||||||
*\note if the j is -1 then all the card are shown
|
*\note if the j is -1 then all the card are shown
|
||||||
*/
|
*/
|
||||||
require_once '../include/constant.php';
|
require_once '../include/constant.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/noalyss_parameter_folder.class.php';
|
|
||||||
require_once NOALYSS_INCLUDE.'/class/database.class.php';
|
|
||||||
require_once NOALYSS_INCLUDE.'/lib/user_common.php';
|
|
||||||
require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
|
|
||||||
require_once NOALYSS_INCLUDE.'/class/dossier.class.php';
|
|
||||||
/**
|
/**
|
||||||
* if not connected, session is expired then exit with a message NOCONX
|
* if not connected, session is expired then exit with a message NOCONX
|
||||||
*/
|
*/
|
||||||
|
|
@ -48,11 +44,9 @@ if ( ! isset($_SESSION[SESSION_KEY."g_user"])) {
|
||||||
|
|
||||||
$gDossier=dossier::id();
|
$gDossier=dossier::id();
|
||||||
|
|
||||||
require_once('class/user.class.php');
|
|
||||||
|
|
||||||
$cn=Dossier::connect();
|
$cn=Dossier::connect();
|
||||||
global $g_user;
|
global $g_user;
|
||||||
$g_user=new User($cn);
|
$g_user=new Noalyss_User($cn);
|
||||||
$g_user->check();
|
$g_user->check();
|
||||||
$g_user->check_dossier(dossier::id());
|
$g_user->check_dossier(dossier::id());
|
||||||
set_language();
|
set_language();
|
||||||
|
|
|
||||||
|
|
@ -59,9 +59,9 @@ $cn=Dossier::connect();
|
||||||
$typecard=$http->request('e');
|
$typecard=$http->request('e');
|
||||||
$filter_card='';
|
$filter_card='';
|
||||||
|
|
||||||
require_once('class/user.class.php');
|
require_once('class/noalyss_user.class.php');
|
||||||
global $g_user;
|
global $g_user;
|
||||||
$g_user=new User($cn);
|
$g_user=new Noalyss_user($cn);
|
||||||
$g_user->check();
|
$g_user->check();
|
||||||
$g_user->check_dossier(dossier::id());
|
$g_user->check_dossier(dossier::id());
|
||||||
set_language();
|
set_language();
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,8 @@ if ( isset ($_POST["p_user"] ) )
|
||||||
$http=new HttpInput();
|
$http=new HttpInput();
|
||||||
|
|
||||||
// clean OLD session
|
// clean OLD session
|
||||||
User::clean_session($http->post("p_user"));
|
Noalyss_user::clean_session($http->post("p_user"));
|
||||||
$User=new User($rep);
|
$User=new Noalyss_user($rep);
|
||||||
$User->Check(false,'LOGIN');
|
$User->Check(false,'LOGIN');
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -103,7 +103,7 @@ else
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$User=new User($rep);
|
$User=new Noalyss_user($rep);
|
||||||
$User->Check();
|
$User->Check();
|
||||||
|
|
||||||
echo "<META HTTP-EQUIV=\"REFRESH\" content=\"0;url=user_login.php?v=".microtime(true)."\">";
|
echo "<META HTTP-EQUIV=\"REFRESH\" content=\"0;url=user_login.php?v=".microtime(true)."\">";
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ if(DEBUGNOALYSS>1) {
|
||||||
echo h1(_("try to clean session"));
|
echo h1(_("try to clean session"));
|
||||||
var_dump($_SESSION);
|
var_dump($_SESSION);
|
||||||
}
|
}
|
||||||
User::clean_session();
|
Noalyss_user::clean_session();
|
||||||
//
|
//
|
||||||
// Clean the possible cookies
|
// Clean the possible cookies
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ require_once NOALYSS_INCLUDE.'/lib/icon_action.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/dossier.class.php';
|
require_once NOALYSS_INCLUDE.'/class/dossier.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/database.class.php';
|
require_once NOALYSS_INCLUDE.'/class/database.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
|
require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/user.class.php';
|
require_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/class/periode.class.php';
|
require_once NOALYSS_INCLUDE.'/class/periode.class.php';
|
||||||
|
|
||||||
$http=new HttpInput();
|
$http=new HttpInput();
|
||||||
|
|
@ -60,7 +60,7 @@ window.onload=function ()
|
||||||
<?php
|
<?php
|
||||||
global $g_user;
|
global $g_user;
|
||||||
$cn=Dossier::connect();
|
$cn=Dossier::connect();
|
||||||
$g_user=new User($cn);
|
$g_user=new Noalyss_user($cn);
|
||||||
$g_user->Check();
|
$g_user->Check();
|
||||||
$g_user->check_dossier(Dossier::id());
|
$g_user->check_dossier(Dossier::id());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,10 +46,10 @@ require_once NOALYSS_INCLUDE.'/class/database.class.php';
|
||||||
/* Admin. Dossier */
|
/* Admin. Dossier */
|
||||||
|
|
||||||
$cn=Dossier::connect();
|
$cn=Dossier::connect();
|
||||||
include_once NOALYSS_INCLUDE.'/class/user.class.php';
|
include_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
|
||||||
|
|
||||||
global $g_user;
|
global $g_user;
|
||||||
$g_user=new User($cn);
|
$g_user=new Noalyss_user($cn);
|
||||||
$g_user->Check();
|
$g_user->Check();
|
||||||
$act=$g_user->check_dossier($gDossier);
|
$act=$g_user->check_dossier($gDossier);
|
||||||
// AC CODE = SEARCH
|
// AC CODE = SEARCH
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ require_once ('class/dossier.class.php');
|
||||||
require_once('lib/html_input.class.php');
|
require_once('lib/html_input.class.php');
|
||||||
require_once('lib/icon_action.class.php');
|
require_once('lib/icon_action.class.php');
|
||||||
require_once ('lib/function_javascript.php');
|
require_once ('lib/function_javascript.php');
|
||||||
require_once 'class/user.class.php';
|
require_once 'class/noalyss_user.class.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
|
require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
|
||||||
html_page_start();
|
html_page_start();
|
||||||
global $http;
|
global $http;
|
||||||
|
|
@ -55,7 +55,7 @@ global $cn, $g_user, $g_succeed, $g_failed;
|
||||||
$cn=Dossier::connect();
|
$cn=Dossier::connect();
|
||||||
|
|
||||||
$g_parameter=new Noalyss_Parameter_Folder($cn);
|
$g_parameter=new Noalyss_Parameter_Folder($cn);
|
||||||
$g_user=new User($cn);
|
$g_user=new Noalyss_user($cn);
|
||||||
|
|
||||||
if (!file_exists('authorized_debug'))
|
if (!file_exists('authorized_debug'))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,8 @@ require_once NOALYSS_INCLUDE.'/lib/icon_action.class.php';
|
||||||
|
|
||||||
@html_page_start($_SESSION[SESSION_KEY.'g_theme']);
|
@html_page_start($_SESSION[SESSION_KEY.'g_theme']);
|
||||||
$rep=new Database();
|
$rep=new Database();
|
||||||
require_once NOALYSS_INCLUDE.'/class/user.class.php';
|
require_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
|
||||||
$User=new User($rep);
|
$User=new Noalyss_user($rep);
|
||||||
|
|
||||||
$User->Check();
|
$User->Check();
|
||||||
/* Check Browser version if < IE6 then unsupported */
|
/* Check Browser version if < IE6 then unsupported */
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
if ( ! defined ('ALLOWED')) { die (_('Non autorisé'));}
|
if ( ! defined ('ALLOWED')) { die (_('Non autorisé'));}
|
||||||
if ( ! defined ('ALLOWED_ADMIN')) { die (_('Non autorisé'));}
|
if ( ! defined ('ALLOWED_ADMIN')) { die (_('Non autorisé'));}
|
||||||
\Noalyss\Dbg::echo_file(__FILE__);
|
\Noalyss\Dbg::echo_file(__FILE__);
|
||||||
include_once NOALYSS_INCLUDE."/class/user.class.php";
|
include_once NOALYSS_INCLUDE . "/class/noalyss_user.class.php";
|
||||||
require_once NOALYSS_INCLUDE."/lib/user_common.php";
|
require_once NOALYSS_INCLUDE."/lib/user_common.php";
|
||||||
include_once NOALYSS_INCLUDE."/lib/ac_common.php";
|
include_once NOALYSS_INCLUDE."/lib/ac_common.php";
|
||||||
require_once NOALYSS_INCLUDE."/lib/user_menu.php";
|
require_once NOALYSS_INCLUDE."/lib/user_menu.php";
|
||||||
|
|
@ -32,7 +32,7 @@ $http=new HttpInput();
|
||||||
$action = $http->request("action","string", "");
|
$action = $http->request("action","string", "");
|
||||||
|
|
||||||
$rep=new Database();
|
$rep=new Database();
|
||||||
$User=new User($rep);
|
$User=new Noalyss_user($rep);
|
||||||
$User->Check();
|
$User->Check();
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,12 +45,12 @@ if ($op=='folder_add') // operation
|
||||||
{
|
{
|
||||||
$user_id=$http->get("p_user", "number"); // get variable
|
$user_id=$http->get("p_user", "number"); // get variable
|
||||||
$dossier_id=$http->get("p_dossier", "number"); // get variable
|
$dossier_id=$http->get("p_dossier", "number"); // get variable
|
||||||
$user=new User($cn, $user_id);
|
$user=new Noalyss_User($cn, $user_id);
|
||||||
$user->set_folder_access($dossier_id, true);
|
$user->set_folder_access($dossier_id, true);
|
||||||
$dossiercn=new Database($dossier_id);
|
$dossiercn=new Database($dossier_id);
|
||||||
// By default new user has the profile 1 (admin) and ledger's security
|
// By default new Noalyss_User has the profile 1 (admin) and ledger's security
|
||||||
// + action's security are disabled
|
// + action's security are disabled
|
||||||
$user=new User($dossiercn, $user_id);
|
$user=new Noalyss_User($dossiercn, $user_id);
|
||||||
$user->set_status_security_action(0);
|
$user->set_status_security_action(0);
|
||||||
$user->set_status_security_ledger(0);
|
$user->set_status_security_ledger(0);
|
||||||
$user->save_profile(1);
|
$user->save_profile(1);
|
||||||
|
|
@ -93,7 +93,7 @@ if ($op=='folder_remove') // operation
|
||||||
$cn=new Database();
|
$cn=new Database();
|
||||||
$user_id=$http->get("p_user", "number"); // get variable
|
$user_id=$http->get("p_user", "number"); // get variable
|
||||||
$dossier_id=$http->get("p_dossier", "number"); // get variable
|
$dossier_id=$http->get("p_dossier", "number"); // get variable
|
||||||
$user=new User($cn, $user_id);
|
$user=new Noalyss_User($cn, $user_id);
|
||||||
$user->set_folder_access($dossier_id, false);
|
$user->set_folder_access($dossier_id, false);
|
||||||
$content="";
|
$content="";
|
||||||
$status='OK';
|
$status='OK';
|
||||||
|
|
@ -133,7 +133,7 @@ if ($op=='folder_display') // operation
|
||||||
$user_id=$http->get("p_user", "number"); // get variable
|
$user_id=$http->get("p_user", "number"); // get variable
|
||||||
$p_filter=$http->get('p_filter', "string", '');
|
$p_filter=$http->get('p_filter', "string", '');
|
||||||
ob_start();
|
ob_start();
|
||||||
$user=new User($cn, $user_id);
|
$user=new Noalyss_User($cn, $user_id);
|
||||||
$a_dossier=Dossier::show_dossier('X', $user->id, $p_filter, MAX_FOLDER_TO_SHOW);
|
$a_dossier=Dossier::show_dossier('X', $user->id, $p_filter, MAX_FOLDER_TO_SHOW);
|
||||||
echo HtmlInput::title_box(_("Liste dossier"), 'folder_list_div');
|
echo HtmlInput::title_box(_("Liste dossier"), 'folder_list_div');
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ set_language();
|
||||||
$http=new HttpInput();
|
$http=new HttpInput();
|
||||||
$cn=Dossier::connect();
|
$cn=Dossier::connect();
|
||||||
global $g_user;
|
global $g_user;
|
||||||
$g_user=new User($cn);
|
$g_user=new Noalyss_User($cn);
|
||||||
$g_user->check(true);
|
$g_user->check(true);
|
||||||
$g_user->check_dossier($gDossier,true);
|
$g_user->check_dossier($gDossier,true);
|
||||||
$html=var_export($_REQUEST,true);
|
$html=var_export($_REQUEST,true);
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
|
||||||
|
|
||||||
global $g_user;
|
global $g_user;
|
||||||
|
|
||||||
$g_user=new User($cn);
|
$g_user=new Noalyss_User($cn);
|
||||||
$inside_dossier = false;
|
$inside_dossier = false;
|
||||||
$http=new HttpInput();
|
$http=new HttpInput();
|
||||||
$action=$http->post("action","string","display_form");
|
$action=$http->post("action","string","display_form");
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ if ($op=='save_filter')
|
||||||
$answer['message']="";
|
$answer['message']="";
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$new=new User_filter_SQL($cn, -1);
|
$new=new Noalyss_User_filter_SQL($cn, -1);
|
||||||
$new->setp("login", $g_user->login);
|
$new->setp("login", $g_user->login);
|
||||||
$new->setp("nb_jrn", $http->post("nb_jrn", 'number'));
|
$new->setp("nb_jrn", $http->post("nb_jrn", 'number'));
|
||||||
$new->setp("date_start", $http->post("date_start", 'string', NULL));
|
$new->setp("date_start", $http->post("date_start", 'string', NULL));
|
||||||
|
|
@ -109,7 +109,7 @@ if ($op=="load_filter")
|
||||||
$answer['status']='OK';
|
$answer['status']='OK';
|
||||||
$answer['filter_id']=0;
|
$answer['filter_id']=0;
|
||||||
$answer['message']="";
|
$answer['message']="";
|
||||||
$filter=new User_filter_SQL($cn, $filter_id);
|
$filter=new Noalyss_User_filter_SQL($cn, $filter_id);
|
||||||
$record=$filter->to_array();
|
$record=$filter->to_array();
|
||||||
|
|
||||||
$record['desc']=$record['description'];
|
$record['desc']=$record['description'];
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ $http=new HttpInput();
|
||||||
|
|
||||||
$cn= Dossier::connect();
|
$cn= Dossier::connect();
|
||||||
global $g_user;
|
global $g_user;
|
||||||
$g_user=new User($cn);
|
$g_user=new Noalyss_User($cn);
|
||||||
$g_user->check(true);
|
$g_user->check(true);
|
||||||
$g_user->check_dossier(Dossier::id(),true);
|
$g_user->check_dossier(Dossier::id(),true);
|
||||||
set_language();
|
set_language();
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ if ($op=="ledger_access")
|
||||||
$ie_input->add_json_param("gDossier", $n_dossier_id);
|
$ie_input->add_json_param("gDossier", $n_dossier_id);
|
||||||
$ie_input->add_json_param("user_id", $user_id);
|
$ie_input->add_json_param("user_id", $user_id);
|
||||||
$ie_input->set_value($value);
|
$ie_input->set_value($value);
|
||||||
$sec_User=new User($cn, $user_id);
|
$sec_User=new Noalyss_User($cn, $user_id);
|
||||||
$count=$cn->get_value('select count(*) from user_sec_jrn where uj_login=$1 '.
|
$count=$cn->get_value('select count(*) from user_sec_jrn where uj_login=$1 '.
|
||||||
' and uj_jrn_id=$2', array($sec_User->login, $jrn_def_id));
|
' and uj_jrn_id=$2', array($sec_User->login, $jrn_def_id));
|
||||||
if ($count==0)
|
if ($count==0)
|
||||||
|
|
@ -117,7 +117,7 @@ if ($op=="profile")
|
||||||
{
|
{
|
||||||
$value=$http->post("value");
|
$value=$http->post("value");
|
||||||
// save profile
|
// save profile
|
||||||
$sec_User=new User($cn, $user_id);
|
$sec_User=new Noalyss_User($cn, $user_id);
|
||||||
if ( $value > 0) {
|
if ( $value > 0) {
|
||||||
$sec_User->save_profile($value);
|
$sec_User->save_profile($value);
|
||||||
}
|
}
|
||||||
|
|
@ -154,7 +154,7 @@ if ($op=='ledger_access_all')
|
||||||
$access=$http->post("access");
|
$access=$http->post("access");
|
||||||
if ($access!="W"&&$access!="X"&&$access!="R")
|
if ($access!="W"&&$access!="X"&&$access!="R")
|
||||||
die("Invalid access");
|
die("Invalid access");
|
||||||
$sec_User=new User($cn, $user_id);
|
$sec_User=new Noalyss_User($cn, $user_id);
|
||||||
// Insert all the existing ledgers to user_sec_jrn
|
// Insert all the existing ledgers to user_sec_jrn
|
||||||
$sql="insert into user_sec_jrn(
|
$sql="insert into user_sec_jrn(
|
||||||
uj_jrn_id,
|
uj_jrn_id,
|
||||||
|
|
@ -183,7 +183,7 @@ if ($op=="action_access")
|
||||||
{
|
{
|
||||||
$action_id=$http->get("ac_id", "number");
|
$action_id=$http->get("ac_id", "number");
|
||||||
$user_id=$http->get("user_id","number");
|
$user_id=$http->get("user_id","number");
|
||||||
$sec_User=new User($cn, $user_id);
|
$sec_User=new Noalyss_User($cn, $user_id);
|
||||||
|
|
||||||
$right=$sec_User->check_action($action_id);
|
$right=$sec_User->check_action($action_id);
|
||||||
$is_switch=new Inplace_Switch("action".$action_id,0);
|
$is_switch=new Inplace_Switch("action".$action_id,0);
|
||||||
|
|
@ -209,7 +209,7 @@ if ($op=="action_access_all")
|
||||||
{
|
{
|
||||||
$user_id=$http->get("user_id","number");
|
$user_id=$http->get("user_id","number");
|
||||||
$access=$http->get("access","number");
|
$access=$http->get("access","number");
|
||||||
$sec_User=new User($cn, $user_id);
|
$sec_User=new Noalyss_User($cn, $user_id);
|
||||||
if ( $access==0) {
|
if ( $access==0) {
|
||||||
$cn->exec_sql("delete from user_sec_act where ua_login=$1",array($sec_User->login));
|
$cn->exec_sql("delete from user_sec_act where ua_login=$1",array($sec_User->login));
|
||||||
}
|
}
|
||||||
|
|
@ -227,7 +227,7 @@ if ($op=="user_sec_ledger")
|
||||||
{
|
{
|
||||||
$user_id=$http->get("user_id", "number");
|
$user_id=$http->get("user_id", "number");
|
||||||
$value=$http->get("value", "number");
|
$value=$http->get("value", "number");
|
||||||
$sec_user=new User($cn, $user_id);
|
$sec_user=new Noalyss_User($cn, $user_id);
|
||||||
$status_sec_ledger=$sec_user->get_status_security_ledger();
|
$status_sec_ledger=$sec_user->get_status_security_ledger();
|
||||||
$sec_ledger=new Inplace_Switch("sec_ledger", $status_sec_ledger);
|
$sec_ledger=new Inplace_Switch("sec_ledger", $status_sec_ledger);
|
||||||
$sec_ledger->set_callback("ajax_misc.php");
|
$sec_ledger->set_callback("ajax_misc.php");
|
||||||
|
|
@ -251,7 +251,7 @@ if ($op=="user_sec_action")
|
||||||
{
|
{
|
||||||
$user_id=$http->get("user_id", "number");
|
$user_id=$http->get("user_id", "number");
|
||||||
$value=$http->get("value", "number");
|
$value=$http->get("value", "number");
|
||||||
$sec_user=new User($cn, $user_id);
|
$sec_user=new Noalyss_User($cn, $user_id);
|
||||||
$status_sec_action=$sec_user->get_status_security_action();
|
$status_sec_action=$sec_user->get_status_security_action();
|
||||||
$sec_action=new Inplace_Switch("sec_action", $status_sec_action);
|
$sec_action=new Inplace_Switch("sec_action", $status_sec_action);
|
||||||
$sec_action->set_callback("ajax_misc.php");
|
$sec_action->set_callback("ajax_misc.php");
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ if ( isset($_GET['see']))
|
||||||
|
|
||||||
$periode_start=$cn->make_array("select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode
|
$periode_start=$cn->make_array("select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode
|
||||||
where p_exercice=$1 order by p_start,p_end",1,[$exercice]);
|
where p_exercice=$1 order by p_start,p_end",1,[$exercice]);
|
||||||
$g_user=new User($cn);
|
$g_user=new Noalyss_user($cn);
|
||||||
$current=$http->get("p_periode","number",$g_user->get_periode());
|
$current=$http->get("p_periode","number",$g_user->get_periode());
|
||||||
$w->value=$periode_start;
|
$w->value=$periode_start;
|
||||||
$w->selected=$current;
|
$w->selected=$current;
|
||||||
|
|
|
||||||
|
|
@ -461,7 +461,7 @@ class Acc_Ledger_Search
|
||||||
$qcode=(isset($p_array[$this->div."qcode"]))?$p_array[$this->div."qcode"]:"";
|
$qcode=(isset($p_array[$this->div."qcode"]))?$p_array[$this->div."qcode"]:"";
|
||||||
$accounting=(isset($accounting))?$accounting:"";
|
$accounting=(isset($accounting))?$accounting:"";
|
||||||
$periode=new Periode($this->cn);
|
$periode=new Periode($this->cn);
|
||||||
$g_user=new User($this->cn);
|
$g_user=new Noalyss_user($this->cn);
|
||||||
$p_id=$g_user->get_periode();
|
$p_id=$g_user->get_periode();
|
||||||
if ($p_id!=null)
|
if ($p_id!=null)
|
||||||
{
|
{
|
||||||
|
|
@ -485,7 +485,7 @@ class Acc_Ledger_Search
|
||||||
$fil_currency="";
|
$fil_currency="";
|
||||||
|
|
||||||
$and='';
|
$and='';
|
||||||
$g_user=new User($this->cn);
|
$g_user=new Noalyss_user($this->cn);
|
||||||
$p_action=(isset ($ledger_type)) ? $ledger_type:$this->type;
|
$p_action=(isset ($ledger_type)) ? $ledger_type:$this->type;
|
||||||
if ($p_action=='')
|
if ($p_action=='')
|
||||||
$p_action='ALL';
|
$p_action='ALL';
|
||||||
|
|
|
||||||
|
|
@ -813,7 +813,7 @@ class Acc_Operation
|
||||||
$_SESSION[SESSION_KEY.'g_pass']='dany';
|
$_SESSION[SESSION_KEY.'g_pass']='dany';
|
||||||
global $g_user;
|
global $g_user;
|
||||||
$cn=Dossier::connect();
|
$cn=Dossier::connect();
|
||||||
$g_user=new User($cn);
|
$g_user=new Noalyss_user($cn);
|
||||||
$a=new Acc_Operation($cn);
|
$a=new Acc_Operation($cn);
|
||||||
$a->jr_id=1444;
|
$a->jr_id=1444;
|
||||||
$b=$a->get_quant();
|
$b=$a->get_quant();
|
||||||
|
|
|
||||||
|
|
@ -318,7 +318,7 @@ class Dossier
|
||||||
$cn->start();
|
$cn->start();
|
||||||
for ($i=0; $i<count($a_admin); $i++)
|
for ($i=0; $i<count($a_admin); $i++)
|
||||||
{
|
{
|
||||||
User::grant_admin_access($a_admin[$i]['use_login'], $p_id);
|
Noalyss_user::grant_admin_access($a_admin[$i]['use_login'], $p_id);
|
||||||
}
|
}
|
||||||
$cn->commit();
|
$cn->commit();
|
||||||
}
|
}
|
||||||
|
|
@ -377,7 +377,7 @@ class Dossier
|
||||||
$db=new Database($db_row['dos_id'], 'dos');
|
$db=new Database($db_row['dos_id'], 'dos');
|
||||||
$db->apply_patch($db_row['dos_name']);
|
$db->apply_patch($db_row['dos_name']);
|
||||||
Dossier::synchro_admin($db_row['dos_id']);
|
Dossier::synchro_admin($db_row['dos_id']);
|
||||||
User::remove_inexistant_user($db_row['dos_id']);
|
Noalyss_user::remove_inexistant_user($db_row['dos_id']);
|
||||||
$db->clean_orphan_lob();
|
$db->clean_orphan_lob();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ class Lettering
|
||||||
function __construct($p_init)
|
function __construct($p_init)
|
||||||
{
|
{
|
||||||
$this->db=$p_init;
|
$this->db=$p_init;
|
||||||
$a=new User($p_init);
|
$a=new Noalyss_user($p_init);
|
||||||
$exercice=$a->get_exercice();
|
$exercice=$a->get_exercice();
|
||||||
if ($exercice>0)
|
if ($exercice>0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,7 @@ class Mobile
|
||||||
echo __CLASS__."→".__FUNCTION__;
|
echo __CLASS__."→".__FUNCTION__;
|
||||||
}
|
}
|
||||||
$cn=Dossier::connect();
|
$cn=Dossier::connect();
|
||||||
$user=new User($cn);
|
$user=new Noalyss_user($cn);
|
||||||
|
|
||||||
$aModule=$cn->get_array("select *
|
$aModule=$cn->get_array("select *
|
||||||
from profile_mobile pm
|
from profile_mobile pm
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ require_once NOALYSS_INCLUDE.'/constant.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/user_common.php';
|
require_once NOALYSS_INCLUDE.'/lib/user_common.php';
|
||||||
require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
|
require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
|
||||||
|
|
||||||
class User
|
class Noalyss_User
|
||||||
{
|
{
|
||||||
|
|
||||||
var $id; //!< in account_repository , ac_users.use_id
|
var $id; //!< in account_repository , ac_users.use_id
|
||||||
|
|
@ -384,7 +384,7 @@ class Todo_List
|
||||||
{
|
{
|
||||||
global $g_user;
|
global $g_user;
|
||||||
// Get array of user
|
// Get array of user
|
||||||
$p_array=User::get_list(Dossier::id());
|
$p_array=Noalyss_user::get_list(Dossier::id());
|
||||||
$dossier=Dossier::id();
|
$dossier=Dossier::id();
|
||||||
include NOALYSS_TEMPLATE.'/todo_list_list_user.php';
|
include NOALYSS_TEMPLATE.'/todo_list_list_user.php';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -178,8 +178,8 @@ if ( isset ($_POST["DATABASE"]) )
|
||||||
$Res=$cn->exec_sql($sql);
|
$Res=$cn->exec_sql($sql);
|
||||||
|
|
||||||
Dossier::synchro_admin($l_id);
|
Dossier::synchro_admin($l_id);
|
||||||
User::remove_inexistant_user($l_id);
|
Noalyss_user::remove_inexistant_user($l_id);
|
||||||
User::audit_admin(sprintf('CREATE DATABASE %s %s',$l_id,$dos));
|
Noalyss_user::audit_admin(sprintf('CREATE DATABASE %s %s',$l_id,$dos));
|
||||||
|
|
||||||
// -- patch it if need
|
// -- patch it if need
|
||||||
$db=new Database($l_id, 'dos');
|
$db=new Database($l_id, 'dos');
|
||||||
|
|
@ -211,7 +211,7 @@ if ( isset ($_POST["DATABASE"]) )
|
||||||
echo _("Echec création ");
|
echo _("Echec création ");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
User::audit_admin(sprintf('CREATE DATABASE %s %s',$l_id,$dos));
|
Noalyss_user::audit_admin(sprintf('CREATE DATABASE %s %s',$l_id,$dos));
|
||||||
ob_flush();
|
ob_flush();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -431,7 +431,7 @@ if ( $sa == 'remove' && isNumber($dossier_id) == 1 && $dossier_id != -1 )
|
||||||
$cn->exec_sql($sql,array($dossier_id));
|
$cn->exec_sql($sql,array($dossier_id));
|
||||||
print '<h2 class="error">';
|
print '<h2 class="error">';
|
||||||
printf (_("Le dossier %s est effacé").'</h2>',h($name));
|
printf (_("Le dossier %s est effacé").'</h2>',h($name));
|
||||||
User::audit_admin(sprintf('DROP DATABASE %s %s',$dossier_id,$name));
|
Noalyss_user::audit_admin(sprintf('DROP DATABASE %s %s',$dossier_id,$name));
|
||||||
echo HtmlInput::button_anchor(_('Retour'),'?action=dossier_mgt');
|
echo HtmlInput::button_anchor(_('Retour'),'?action=dossier_mgt');
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -42,12 +42,12 @@ catch (Exception $exc)
|
||||||
|
|
||||||
// Check User
|
// Check User
|
||||||
$rep=new Database();
|
$rep=new Database();
|
||||||
$User=new User($rep);
|
$User=new Noalyss_user($rep);
|
||||||
|
|
||||||
//-----------------------------------------------------
|
//-----------------------------------------------------
|
||||||
// Get User's info
|
// Get User's info
|
||||||
|
|
||||||
$SecUser=new User($rep,$user_id);
|
$SecUser=new Noalyss_user($rep,$user_id);
|
||||||
$admin=0;
|
$admin=0;
|
||||||
$access=$SecUser->get_folder_access($gDossier);
|
$access=$SecUser->get_folder_access($gDossier);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ echo '<div class="topmenu">';
|
||||||
|
|
||||||
$cn=Dossier::connect();
|
$cn=Dossier::connect();
|
||||||
global $g_user;
|
global $g_user;
|
||||||
$g_user=new User($cn);
|
$g_user=new Noalyss_user($cn);
|
||||||
$g_user->check();
|
$g_user->check();
|
||||||
$only_plugin=$g_user->check_dossier(dossier::id());
|
$only_plugin=$g_user->check_dossier(dossier::id());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@ if ($sa=='step3')
|
||||||
echo HtmlInput::hidden('f', $_REQUEST['f']);
|
echo HtmlInput::hidden('f', $_REQUEST['f']);
|
||||||
echo HtmlInput::hidden('p_periode', $_REQUEST['p_periode']);
|
echo HtmlInput::hidden('p_periode', $_REQUEST['p_periode']);
|
||||||
$wLedger=new ISelect();
|
$wLedger=new ISelect();
|
||||||
$g_user=new User($cn);
|
$g_user=new Noalyss_user($cn);
|
||||||
$avail=$g_user->get_ledger('ODS');
|
$avail=$g_user->get_ledger('ODS');
|
||||||
/* compute select list */
|
/* compute select list */
|
||||||
$array=array();
|
$array=array();
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ if ( $action == "view" )
|
||||||
|
|
||||||
$repo=new Database();
|
$repo=new Database();
|
||||||
$user_id=$http->get('user_id',"number");
|
$user_id=$http->get('user_id',"number");
|
||||||
$User=new User($repo,$user_id);
|
$User=new Noalyss_user($repo,$user_id);
|
||||||
$admin=0;
|
$admin=0;
|
||||||
$access=$User->get_folder_access($gDossier);
|
$access=$User->get_folder_access($gDossier);
|
||||||
|
|
||||||
|
|
@ -195,7 +195,7 @@ if ( $action == "view" )
|
||||||
|
|
||||||
$Res=$cn->exec_sql("select jrn_def_id,jrn_def_name from jrn_def ".
|
$Res=$cn->exec_sql("select jrn_def_id,jrn_def_name from jrn_def ".
|
||||||
" order by jrn_def_name");
|
" order by jrn_def_name");
|
||||||
$sec_User=new User($cn,$user_id);
|
$sec_User=new Noalyss_user($cn,$user_id);
|
||||||
$n_dossier_id=Dossier::id();
|
$n_dossier_id=Dossier::id();
|
||||||
$sHref=http_build_query(["act"=>"PDF:sec","user_id"=>$user_id,"gDossier"=>$n_dossier_id]);
|
$sHref=http_build_query(["act"=>"PDF:sec","user_id"=>$user_id,"gDossier"=>$n_dossier_id]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@ if ( isset ($_REQUEST['sa'] ))
|
||||||
$new_cn->apply_patch($name);
|
$new_cn->apply_patch($name);
|
||||||
echo '<span class="error">'._('Ne pas recharger la page, sinon votre base de données sera restaurée une fois de plus').'</span>';
|
echo '<span class="error">'._('Ne pas recharger la page, sinon votre base de données sera restaurée une fois de plus').'</span>';
|
||||||
Dossier::synchro_admin($id);
|
Dossier::synchro_admin($id);
|
||||||
User::remove_inexistant_user($id);
|
Noalyss_user::remove_inexistant_user($id);
|
||||||
$new_cn->clean_orphan_lob();
|
$new_cn->clean_orphan_lob();
|
||||||
echo $retour;
|
echo $retour;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ if ( isset ($_POST["ADD"]) )
|
||||||
{
|
{
|
||||||
$cn=new Database();
|
$cn=new Database();
|
||||||
$pass5=md5($_POST['PASS']);
|
$pass5=md5($_POST['PASS']);
|
||||||
$new_user=new User($cn,0);
|
$new_user=new Noalyss_user($cn,0);
|
||||||
$new_user->first_name=$http->post('FNAME');
|
$new_user->first_name=$http->post('FNAME');
|
||||||
$new_user->last_name=$http->post('LNAME');
|
$new_user->last_name=$http->post('LNAME');
|
||||||
$login=$http->post('LOGIN');
|
$login=$http->post('LOGIN');
|
||||||
|
|
@ -58,7 +58,7 @@ if ( isset ($_POST["ADD"]) )
|
||||||
$new_user->insert();
|
$new_user->insert();
|
||||||
$new_user->load();
|
$new_user->load();
|
||||||
put_global(array(['key'=>'use_id',"value"=>$new_user->id]));
|
put_global(array(['key'=>'use_id',"value"=>$new_user->id]));
|
||||||
User::audit_admin(sprintf('ADD USER %s %s',$new_user->id,$login));
|
Noalyss_user::audit_admin(sprintf('ADD USER %s %s',$new_user->id,$login));
|
||||||
} else {
|
} else {
|
||||||
echo_warning(_("Utilisateur existant"));
|
echo_warning(_("Utilisateur existant"));
|
||||||
$uid=$cn->get_value("select use_id from ac_users where use_login=lower($1)",[$login]);
|
$uid=$cn->get_value("select use_id from ac_users where use_login=lower($1)",[$login]);
|
||||||
|
|
@ -82,7 +82,7 @@ if ($sbaction == "save")
|
||||||
|
|
||||||
// Update User
|
// Update User
|
||||||
$cn = new Database();
|
$cn = new Database();
|
||||||
$UserChange = new User($cn, $uid);
|
$UserChange = new Noalyss_user($cn, $uid);
|
||||||
|
|
||||||
if ($UserChange->load() == -1)
|
if ($UserChange->load() == -1)
|
||||||
{
|
{
|
||||||
|
|
@ -144,9 +144,9 @@ else if ($sbaction == "delete")
|
||||||
if ( is_array($a_dossier) ) {
|
if ( is_array($a_dossier) ) {
|
||||||
$nb=count($a_dossier);
|
$nb=count($a_dossier);
|
||||||
for ( $i=0;$i<$nb;$i++)
|
for ( $i=0;$i<$nb;$i++)
|
||||||
User::remove_inexistant_user($a_dossier[$i]['dos_id']);
|
Noalyss_user::remove_inexistant_user($a_dossier[$i]['dos_id']);
|
||||||
}
|
}
|
||||||
User::audit_admin(sprintf('DELETE USER %s %s',$uid,$auser['use_login']));
|
Noalyss_user::audit_admin(sprintf('DELETE USER %s %s',$uid,$auser['use_login']));
|
||||||
echo "<H2 class=\"notice\">";
|
echo "<H2 class=\"notice\">";
|
||||||
printf (_("Utilisateur %s %s est effacé"),$http->post('fname'),$http->post('lname')) ;
|
printf (_("Utilisateur %s %s est effacé"),$http->post('fname'),$http->post('lname')) ;
|
||||||
echo " </H2>";
|
echo " </H2>";
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ $uid = $http->request('use_id');
|
||||||
echo_error($ex->getMessage());
|
echo_error($ex->getMessage());
|
||||||
throw $ex;
|
throw $ex;
|
||||||
}
|
}
|
||||||
$UserChange = new User($rep, $uid);
|
$UserChange = new Noalyss_user($rep, $uid);
|
||||||
|
|
||||||
if ($UserChange->id == false)
|
if ($UserChange->id == false)
|
||||||
{
|
{
|
||||||
|
|
@ -176,7 +176,7 @@ if ( $repo->count() == 0)
|
||||||
|
|
||||||
$Dossier = $repo->show_dossier('R',$UserChange->login);
|
$Dossier = $repo->show_dossier('R',$UserChange->login);
|
||||||
|
|
||||||
$mod_user = new User(new Database(), $uid);
|
$mod_user = new Noalyss_user(new Database(), $uid);
|
||||||
?>
|
?>
|
||||||
<TABLE id="database_list" class="result">
|
<TABLE id="database_list" class="result">
|
||||||
<?php
|
<?php
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ $_SESSION[SESSION_KEY.'csv_fieldsep']='0';
|
||||||
$_SESSION[SESSION_KEY.'csv_decimal']='1';
|
$_SESSION[SESSION_KEY.'csv_decimal']='1';
|
||||||
$_SESSION[SESSION_KEY.'csv_encoding']='utf8';
|
$_SESSION[SESSION_KEY.'csv_encoding']='utf8';
|
||||||
$_SESSION[SESSION_KEY.'access_mode']='PC';
|
$_SESSION[SESSION_KEY.'access_mode']='PC';
|
||||||
$g_user=new User($g_connection);
|
$g_user=new Noalyss_user($g_connection);
|
||||||
$_ENV['TMP']="/tmp/";
|
$_ENV['TMP']="/tmp/";
|
||||||
|
|
||||||
require_once __DIR__.'/facility.class.php';
|
require_once __DIR__.'/facility.class.php';
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,6 @@ $_SESSION[SESSION_KEY.'csv_fieldsep']='0';
|
||||||
$_SESSION[SESSION_KEY.'csv_decimal']='1';
|
$_SESSION[SESSION_KEY.'csv_decimal']='1';
|
||||||
$_SESSION[SESSION_KEY.'csv_encoding']='utf8';
|
$_SESSION[SESSION_KEY.'csv_encoding']='utf8';
|
||||||
$_SESSION[SESSION_KEY.'access_mode']='PC';
|
$_SESSION[SESSION_KEY.'access_mode']='PC';
|
||||||
$g_user=new User($g_connection);
|
$g_user=new Noalyss_User($g_connection);
|
||||||
$_ENV['TMP']="/tmp/";
|
$_ENV['TMP']="/tmp/";
|
||||||
require_once __DIR__.'/facility.class.php';
|
require_once __DIR__.'/facility.class.php';
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ define('USE_EMAIL', 'none@dev.null.eu');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @backupGlobals enabled
|
* @backupGlobals enabled
|
||||||
* @coversDefaultClass \User
|
* @coversDefaultClass \Noalyss_User
|
||||||
*/
|
*/
|
||||||
require DIRTEST.'/global.php';
|
require DIRTEST.'/global.php';
|
||||||
|
|
||||||
|
|
@ -41,7 +41,7 @@ class UserTest extends TestCase
|
||||||
array(USE_ID, USE_FIRST_NAME, USE_NAME, USE_LOGIN, USE_ACTIVE, USE_PASS,
|
array(USE_ID, USE_FIRST_NAME, USE_NAME, USE_LOGIN, USE_ACTIVE, USE_PASS,
|
||||||
USE_ADMIN, USE_EMAIL));
|
USE_ADMIN, USE_EMAIL));
|
||||||
|
|
||||||
$this->object=new User($this->cn, USE_ID);
|
$this->object=new Noalyss_user($this->cn, USE_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -58,7 +58,7 @@ class UserTest extends TestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers User::load
|
* @covers Noalyss_user::load
|
||||||
*/
|
*/
|
||||||
public function testLoad()
|
public function testLoad()
|
||||||
{
|
{
|
||||||
|
|
@ -75,31 +75,31 @@ class UserTest extends TestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers User::revoke_access
|
* @covers Noalyss_user::revoke_access
|
||||||
* @todo Implement testRevoke_access().
|
* @todo Implement testRevoke_access().
|
||||||
*/
|
*/
|
||||||
public function testRevoke_access()
|
public function testRevoke_access()
|
||||||
{
|
{
|
||||||
$cn_dossier=new Database(DOSSIER);
|
$cn_dossier=new Database(DOSSIER);
|
||||||
User::revoke_access(USE_LOGIN, DOSSIER);
|
Noalyss_user::revoke_access(USE_LOGIN, DOSSIER);
|
||||||
$this->assertEquals($cn_dossier->get_value('select count(*) from profile_user where user_name =$1 ',
|
$this->assertEquals($cn_dossier->get_value('select count(*) from profile_user where user_name =$1 ',
|
||||||
array(USE_LOGIN)), 0);
|
array(USE_LOGIN)), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers User::grant_admin_access
|
* @covers Noalyss_user::grant_admin_access
|
||||||
* @todo Implement testGrant_admin_access()
|
* @todo Implement testGrant_admin_access()
|
||||||
*/
|
*/
|
||||||
public function testGrant_admin_access()
|
public function testGrant_admin_access()
|
||||||
{
|
{
|
||||||
$cn_dossier=new Database(DOSSIER);
|
$cn_dossier=new Database(DOSSIER);
|
||||||
User::grant_admin_access(USE_LOGIN, DOSSIER);
|
Noalyss_user::grant_admin_access(USE_LOGIN, DOSSIER);
|
||||||
|
|
||||||
$this->assertEquals($cn_dossier->get_value('select count(*) from profile_user where user_name =$1 ',
|
$this->assertEquals($cn_dossier->get_value('select count(*) from profile_user where user_name =$1 ',
|
||||||
array(USE_LOGIN)), 1);
|
array(USE_LOGIN)), 1);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @covers User::remove_inexistant_user
|
* @covers Noalyss_user::remove_inexistant_user
|
||||||
*/
|
*/
|
||||||
public function testRemove_inexistant_user() {
|
public function testRemove_inexistant_user() {
|
||||||
// insert inexisting user
|
// insert inexisting user
|
||||||
|
|
@ -111,7 +111,7 @@ class UserTest extends TestCase
|
||||||
$this->assertEquals($cn->get_value('select count(*) from profile_user where user_name=$1',array('unknown/user')),1);
|
$this->assertEquals($cn->get_value('select count(*) from profile_user where user_name=$1',array('unknown/user')),1);
|
||||||
|
|
||||||
//remove him
|
//remove him
|
||||||
User::remove_inexistant_user(DOSSIER);
|
Noalyss_user::remove_inexistant_user(DOSSIER);
|
||||||
|
|
||||||
// check his removal
|
// check his removal
|
||||||
$this->assertEquals($cn->get_value('select count(*) from profile_user where user_name=$1',array('unknown/user')),0);
|
$this->assertEquals($cn->get_value('select count(*) from profile_user where user_name=$1',array('unknown/user')),0);
|
||||||
|
|
@ -135,7 +135,7 @@ class UserTest extends TestCase
|
||||||
*/
|
*/
|
||||||
public function testPeriode($p_id)
|
public function testPeriode($p_id)
|
||||||
{
|
{
|
||||||
$this->object=new User(Dossier::connect(), USE_ID);
|
$this->object=new Noalyss_user(Dossier::connect(), USE_ID);
|
||||||
|
|
||||||
$restore=$this->object->get_periode();
|
$restore=$this->object->get_periode();
|
||||||
$this->assertTrue(is_numeric($restore),"Old periode id is not an integer");
|
$this->assertTrue(is_numeric($restore),"Old periode id is not an integer");
|
||||||
|
|
@ -167,7 +167,7 @@ class UserTest extends TestCase
|
||||||
public function testsql_writable_profile()
|
public function testsql_writable_profile()
|
||||||
{
|
{
|
||||||
$cn=Dossier::connect();
|
$cn=Dossier::connect();
|
||||||
$user=new User($cn);
|
$user=new Noalyss_user($cn);
|
||||||
$_SESSION[SESSION_KEY.'use_admin']=0;
|
$_SESSION[SESSION_KEY.'use_admin']=0;
|
||||||
$user->admin=0;
|
$user->admin=0;
|
||||||
$this->assertEquals(0 , $user->getAdmin()," Error user is admin");
|
$this->assertEquals(0 , $user->getAdmin()," Error user is admin");
|
||||||
|
|
@ -22,7 +22,7 @@ class Acc_AccountTest extends TestCase
|
||||||
$_REQUEST['gDossier']=DOSSIER;
|
$_REQUEST['gDossier']=DOSSIER;
|
||||||
$g_connection=new Database(DOSSIER);
|
$g_connection=new Database(DOSSIER);
|
||||||
$g_parameter=new Noalyss_Parameter_Folder($g_connection);
|
$g_parameter=new Noalyss_Parameter_Folder($g_connection);
|
||||||
$g_user=new User($g_connection);
|
$g_user=new Noalyss_user($g_connection);
|
||||||
$cn=Dossier::connect();
|
$cn=Dossier::connect();
|
||||||
$this->object=new Acc_Account($cn, '400');
|
$this->object=new Acc_Account($cn, '400');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ class Acc_Account_LedgerTest extends TestCase
|
||||||
$_REQUEST['gDossier']=DOSSIER;
|
$_REQUEST['gDossier']=DOSSIER;
|
||||||
$g_connection=new Database(DOSSIER);
|
$g_connection=new Database(DOSSIER);
|
||||||
$g_parameter=new Noalyss_Parameter_Folder($g_connection);
|
$g_parameter=new Noalyss_Parameter_Folder($g_connection);
|
||||||
$g_user=new User($g_connection);
|
$g_user=new Noalyss_user($g_connection);
|
||||||
$this->object=new Acc_Account_Ledger($g_connection, 400);
|
$this->object=new Acc_Account_Ledger($g_connection, 400);
|
||||||
$g_connection->exec_sql("update jrn_def set jrn_def_class_deb='4* 2*' where jrn_def_type='ODS'");
|
$g_connection->exec_sql("update jrn_def set jrn_def_class_deb='4* 2*' where jrn_def_type='ODS'");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ class Acc_BalanceTest extends TestCase
|
||||||
public function testGet_row()
|
public function testGet_row()
|
||||||
{
|
{
|
||||||
global $g_connection,$g_user;
|
global $g_connection,$g_user;
|
||||||
$g_user=new User($g_connection,1);
|
$g_user=new Noalyss_user($g_connection,1);
|
||||||
|
|
||||||
$max=$g_connection->get_value("select max(p_id) from parm_periode");
|
$max=$g_connection->get_value("select max(p_id) from parm_periode");
|
||||||
$min=$g_connection->get_value("select min(p_id) from parm_periode");
|
$min=$g_connection->get_value("select min(p_id) from parm_periode");
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,7 @@ class Acc_Letter extends TestCase
|
||||||
public function testDateLimitComputed($p_periode_id,$p_first_day,$p_last_day)
|
public function testDateLimitComputed($p_periode_id,$p_first_day,$p_last_day)
|
||||||
{
|
{
|
||||||
global $g_connection;
|
global $g_connection;
|
||||||
$user=new User($g_connection);
|
$user=new Noalyss_user($g_connection);
|
||||||
$restore=$user->get_periode();
|
$restore=$user->get_periode();
|
||||||
$user->set_periode($p_periode_id);
|
$user->set_periode($p_periode_id);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ class Noalyss_Parameter_FolderTest extends TestCase
|
||||||
global $g_connection, $g_user;
|
global $g_connection, $g_user;
|
||||||
$_REQUEST['gDossier']=DOSSIER;
|
$_REQUEST['gDossier']=DOSSIER;
|
||||||
$g_connection=new Database(DOSSIER);
|
$g_connection=new Database(DOSSIER);
|
||||||
$g_user=new User($g_connection);
|
$g_user=new Noalyss_user($g_connection);
|
||||||
$this->object=new Noalyss_Parameter_Folder($g_connection);
|
$this->object=new Noalyss_Parameter_Folder($g_connection);
|
||||||
$this->a_param=explode(",","MY_COUNTRY,".
|
$this->a_param=explode(",","MY_COUNTRY,".
|
||||||
"MY_DEFAULT_ROUND_ERROR_DEB,".
|
"MY_DEFAULT_ROUND_ERROR_DEB,".
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue