31 require_once NOALYSS_INCLUDE.
'/constant.php';
32 require_once NOALYSS_INCLUDE.
'/lib/user_common.php';
33 require_once NOALYSS_INCLUDE.
'/class/class_dossier.php';
34 require_once NOALYSS_INCLUDE.
'/lib/ac_common.php';
56 if (!isset($_SESSION[
'g_user']))
58 echo
'<h2 class="error">' . _(
'Session expirée<br>Utilisateur déconnecté') .
'</h2>';
63 $this->login =strtolower($_SESSION[
'g_user']);
64 $this->pass = $_SESSION[
'g_pass'];
65 $this->lang = (isset($_SESSION[
'g_lang'])) ? $_SESSION[
'g_lang'] :
'fr_FR.utf8';
66 $this->valid = (isset($_SESSION[
'isValid'])) ? 1 : 0;
69 if (isset($_SESSION[
'g_theme']))
70 $this->theme = $_SESSION[
'g_theme'];
72 $this->admin = ( isset($_SESSION[
'use_admin']) ) ? $_SESSION[
'use_admin'] : 0;
74 if (isset($_SESSION[
'use_name']))
75 $this->
name = $_SESSION[
'use_name'];
76 if (isset($_SESSION[
'use_first_name']))
77 $this->first_name = $_SESSION[
'use_first_name'];
100 $sql_cond =
" where lower(use_login)=lower($1)";
105 $sql_cond =
" where use_id=$1";
108 $sql =
"select use_id,
122 $this->
id =
$row[
'use_id'];
123 $this->first_name =
$row[
'use_first_name'];
124 $this->last_name =
$row[
'use_name'];
126 $this->active =
$row[
'use_active'];
127 $this->login =
$row[
'use_login'];
128 $this->admin =
$row[
'use_admin'];
129 $this->password =
$row[
'use_pass'];
130 $this->email=
$row[
'use_email'];
136 $Sql =
"update ac_users set use_first_name=$1, use_name=$2
137 ,use_active=$3,use_admin=$4,use_pass=$5 ,use_email = $7 where use_id=$6";
139 $Res =
$cn->exec_sql($Sql, array($this->first_name, $this->last_name, $this->active, $this->admin, $this->pass, $this->
id,$this->email));
144 $Sql =
"INSERT INTO ac_users(
145 use_first_name, use_name, use_login, use_active,
146 use_admin, use_pass, use_email)
147 VALUES ($1, $2, $3, $4, $5, $6, $7) returning use_id";
150 $this->
id=
$cn->get_value($Sql, array($this->first_name, $this->last_name, $this->login,1,0, $this->pass,$this->email));
165 $pass5 = md5($this->pass);
168 $sql =
"select ac_users.use_login,ac_users.use_active, ac_users.use_pass,
169 use_admin,use_first_name,use_name
171 where ac_users.use_id='$this->id'
172 and ac_users.use_active=1
173 and ac_users.use_pass='$pass5'";
179 $_SESSION[
'use_admin'] =
$r[
'use_admin'];
180 $_SESSION[
'use_name'] =
$r[
'use_name'];
181 $_SESSION[
'use_first_name'] =
$r[
'use_first_name'];
182 $_SESSION[
'isValid'] = 1;
184 $this->admin = $_SESSION[
'use_admin'];
185 $this->
name = $_SESSION[
'use_name'];
186 $this->first_name = $_SESSION[
'use_first_name'];
189 $sql =
"insert into audit_connect (ac_user,ac_ip,ac_module,ac_url,ac_state) values ($1,$2,$3,$4,$5)";
193 $cn->exec_sql(
$sql, array($_SESSION[
'g_user'], $_SERVER[
"REMOTE_ADDR"],
$from, $_SERVER[
'REQUEST_URI'],
'FAIL'));
196 echo
'<script> alert(\''._(
'Utilisateur ou mot de passe incorrect').
'\')</script>
';
197 redirect('index.html
');
205 if ($from == 'LOGIN
')
206 $cn->exec_sql($sql, array($_SESSION['g_user
'], $_SERVER["REMOTE_ADDR"], $from, $_SERVER['REQUEST_URI
'], 'SUCCESS
'));
223 function get_folder_access($p_dossier = 0)
227 $p_dossier = dossier::id();
228 if ($this->admin == 1) return 'R
';
229 $cn = new Database();
231 $sql = "select 'R
' from jnt_use_dos where use_id=$1 and dos_id=$2";
233 $res = $cn->get_value($sql, array($this->id, $p_dossier));
235 if ($cn->get_affected()== 0) return 'X
';
245 function set_folder_access($db_id, $priv)
251 // the access is granted
252 $jnt=$cn->get_value("select jnt_id from jnt_use_dos where dos_id=$1 and use_id=$2", array($db_id, $this->id));
257 $Res=$cn->exec_sql("insert into jnt_use_dos(dos_id,use_id) values($1,$2)", array($db_id, $this->id));
263 $cn->exec_sql('
delete from jnt_use_dos where use_id = $1 and dos_id = $2
', array($this->id, $db_id));
280 function get_ledger_access($p_ledger)
282 if ($this->admin == 1 ||
283 $this->is_local_admin(dossier::id()) == 1)
286 $sql = "select uj_priv from user_sec_jrn where uj_login=$1 and uj_jrn_id=$2";
287 $res = $this->db->get_value($sql, array($this->login, $p_ledger));
311 function get_ledger($p_type = '
ALL', $p_access = 3)
313 if ($this->admin != 1 && $this->is_local_admin() != 1)
315 $sql_type = ($p_type == 'ALL') ? '' : "and jrn_def_type=upper('" . sql_string($p_type) . "')";
319 $sql_access = " and uj_priv!= 'X
'";
322 $sql_access = " and uj_priv = 'W
'";
326 $sql_access = " and ( uj_priv = 'R
' or uj_priv='W
') ";
330 $sql = "select jrn_def_id,jrn_def_type,
331 jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv,
332 jrn_deb_max_line,jrn_cred_max_line,jrn_def_description
333 from jrn_def join jrn_type on jrn_def_type=jrn_type_id
334 join user_sec_jrn on uj_jrn_id=jrn_def_id
336 uj_login='" . $this->login . "'" .
337 $sql_type . $sql_access .
338 " order by jrn_Def_name";
342 $sql_type = ($p_type == 'ALL') ? '' : "where jrn_def_type=upper('" . sql_string($p_type) . "')";
343 $sql = "select jrn_def_id,jrn_def_type,jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_deb_max_line,jrn_cred_max_line,
344 jrn_type_id,jrn_desc,'W
' as uj_priv,jrn_def_description
345 from jrn_def join jrn_type on jrn_def_type=jrn_type_id
347 order by jrn_Def_name";
349 $res = $this->db->exec_sql($sql);
350 if (Database::num_row($res) == 0)
352 $array = Database::fetch_all($res);
364 function get_ledger_sql($p_type = '
ALL', $p_access = 3)
366 $aLedger = $this->get_ledger($p_type, $p_access);
368 return ' jrn_def_id < 0
';
369 $sql = " jrn_def_id in (";
370 foreach ($aLedger as $row)
372 $sql.=$row['jrn_def_id
'] . ',
';
387 if ($this->login != NOALYSS_ADMINISTRATOR )
389 $pass5 = md5($this->pass);
390 $sql = "select use_admin from ac_users where use_login=$1
393 $cn = new Database();
394 $res = $cn->exec_sql($sql, array($this->login));
395 if (Database::num_row($res) == 0)
396 throw new Exception(__FILE__ . " " . __LINE__ . " aucun resultat");
397 $this->admin = Database::fetch_result($res, 0);
413 function set_periode($p_periode)
415 $sql = "update user_local_pref set parameter_value='$p_periode
' where user_id='$this->
id' and parameter_type='PERIODE
'";
416 $Res = $this->db->exec_sql($sql);
419 private function set_default_periode()
422 /* get the first periode */
423 $sql = 'select min(
p_id) as pid
from parm_periode where p_closed =
false and p_start = (select min(p_start)
from parm_periode)';
430 $sql =
'select min(p_id) as pid from parm_periode where p_start = (select max(p_start) from parm_periode)';
431 $Res2 = $this->
db->exec_sql($sql);
435 throw new Exception( _(
"Aucune période trouvéee !!!"));
441 $sql = sprintf(
"insert into user_local_pref (user_id,parameter_value,parameter_type)
442 values ('%s','%d','PERIODE')", $this->
id, $pid);
458 if (!isset(
$array[
'PERIODE']))
475 $fr_id = (isset(
$array[
'MINIREPORT'])) ?
$array[
'MINIREPORT'] : 0;
484 $count = $this->
db->get_value(
"select count(*) from user_local_pref where user_id=$1 and parameter_type=$2", array($this->
id,
'MINIREPORT'));
487 $sql =
"update user_local_pref set parameter_value=$1 where user_id=$2 and parameter_type='MINIREPORT'";
492 $sql =
"insert into user_local_pref (user_id,parameter_type,parameter_value)" .
493 "values($1,'MINIREPORT',$2)";
511 parameter_type=$1 and user_id=$2", array(
$key, $this->login));
514 $repo->exec_sql(
"update user_global_pref set parameter_value=$1
515 where parameter_type=$2 and user_id=$3", array(
$value,
$key, $this->login));
519 $repo->exec_sql(
"insert into user_global_pref(user_id,parameter_type,parameter_value)
520 values($1,$2,$3)", array($this->login,
$key,
$value));
531 $sql =
"select parameter_type,parameter_value from user_local_pref where user_id=$1";
532 $Res = $this->
db->exec_sql(
$sql, array($this->
id));
538 $l_array[
$type] =
$row[
'parameter_value'];
553 $acc = $this->
db->get_value(
"select count(*) from v_all_menu where p_id = $1
554 and me_code=$2", array($this->
get_profile(), $p_module));
557 $this->
audit(
"FAIL", $p_module);
560 $this->
audit(
"SUCCESS", $p_module);
577 if ($this->
Admin() == 1)
582 $Res = $this->
db->exec_sql(
583 "select * from user_sec_act where ua_login=$1 and ua_act_id=$2", array($this->login, $p_action_id));
587 if (isset($audit) && $audit ==
true)
590 $sql =
"insert into audit_connect (ac_user,ac_ip,ac_module,ac_url,ac_state) values ($1,$2,$3,$4,$5)";
591 $cn->exec_sql(
$sql, array($_SESSION[
'g_user'], $_SERVER[
"REMOTE_ADDR"], $p_action_id, $_SERVER[
'REQUEST_URI'],
'FAIL'));
597 echo
"<H2 class=\"error\"> Action Invalide !!! $Count select * from user_sec_act where ua_login='$p_login' and ua_act_id=$p_action_id </H2>";
612 $Res =
$cn->exec_sql(
"select parameter_type,parameter_value from
614 where user_id='" . $this->login .
"'");
624 for ($i = 0; $i <
$Max; $i++)
632 $array_pref = array(
'g_theme' =>
'THEME',
'g_pagesize' =>
'PAGESIZE',
'g_topmenu' =>
'TOPMENU',
'g_lang' =>
'LANG');
633 foreach ($array_pref as
$name => $parameter)
635 if (!isset(
$line[$parameter]))
657 $default_parameter = array(
"THEME" =>
"classic",
660 'LANG' =>
'fr_FR.utf8');
662 $Sql =
"insert into user_global_pref(user_id,parameter_type,parameter_value)
663 values ('%s','%s','%s')";
668 $Insert = sprintf($Sql, $this->login,
$name,
$value);
669 $cn->exec_sql($Insert);
674 $value = ($p_value ==
"") ? $default_parameter[
$p_type] : $p_value;
676 $cn->exec_sql($Insert);
690 $default_parameter = array(
"THEME" =>
"classic",
692 "LANG" =>
'fr_FR.utf8',
693 'TOPMENU' =>
'SELECT');
695 $Sql =
"update user_global_pref set parameter_value=$1
696 where parameter_type=$2 and
698 $value = ($p_value ==
"") ? $default_parameter[
$p_type] : $p_value;
710 $sql =
"select p_exercice from parm_periode where p_id=" . $this->
get_periode();
715 return $r[
'p_exercice'];
732 $this->
audit(
'FAIL');
736 echo
"alert ('Cette action ne vous est pas autorisée. Contactez votre responsable');";
741 echo
'<div class="redcontent">';
742 echo
'<h2 class="error"> Cette action ne vous est pas autorisée Contactez votre responsable</h2>';
759 if ($this->
Admin() == 1)
762 $res = $cn->get_value(
"select count(*) from profile_menu
763 join profile_user using (p_id)
764 where user_name=$1 and me_code=$2 ", array($this->login,
$p_action));
778 $this->
audit(
'FAIL');
782 echo
"alert ('Cette action ne vous est pas autorisée. Contactez votre responsable');";
787 echo
'<div class="redcontent">';
788 echo
'<h2 class="error"> Cette action ne vous est pas autorisée Contactez votre responsable</h2>';
824 $r=$this->
db->get_array(
"select distinct u.r_id,r_name
826 profile_sec_repository as u
827 join stock_repository as s on(u.r_id=s.r_id)
834 if ($p_access ==
'W')
836 $r=$this->
db->get_array(
"select distinct u.r_id,r_name
838 profile_sec_repository as u
839 join stock_repository as s on(u.r_id=s.r_id)
864 $sql =
"select distinct use_id,use_login,use_first_name,use_name from ac_users
865 left outer join jnt_use_dos using (use_id)
867 (dos_id=$1 and use_active=1) or (use_active=1 and use_admin=1)
868 order by use_login,use_name";
873 if (
$repo->size() == 0)
874 throw new Exception(
'Error inaccessible folder');
910 if ($this->admin == 1 || $this->
is_local_admin($p_dossier_id) == 1)
914 $dossier =
$cn->get_value(
"select 'R' from jnt_use_dos where dos_id=$1 and use_id=$2", array($p_dossier_id, $this->
id));
918 $this->
audit(
'FAIL',
"Access folder ");
921 alert(_(
'Dossier non accessible'));
937 $start = $per_start->first_day();
938 $end = $per_end->last_day();
958 $result.=
"<TABLE id=\"folder\" class=\"result\">";
972 $result.=
'<td style="width:auto" colspan=3>';
973 $result.=_(
"Aucun dossier disponible");
979 for ($i = 0; $i <
sizeof(
$p_array); $i++)
989 $target =
"do.php?gDossier=$id";
995 $result.=
"<A class=\"dossier\" HREF=\"$target\">";
1000 $desc =
"<A class=\"dossier\" HREF=\"$target\">$desc</A>";
1025 if ($this->admin == 0)
1029 $Res =
$cn->exec_sql(
"select distinct dos_id,dos_name,dos_description
1031 natural join jnt_use_dos
1032 natural join ac_dossier
1036 and ( dos_name ~* $2 or dos_description ~* $2 )
1037 order by dos_name", array($this->login, $p_filter));
1041 $Res =
$cn->exec_sql(
"select distinct dos_id,dos_name,dos_description from ac_dossier
1042 where dos_name ~* $1 or dos_description ~* $1 order by dos_name", array($p_filter));
1044 require_once NOALYSS_INCLUDE.
'/lib/class_database.php';
1050 for ($i = 0; $i <
$max; $i++)
1062 if ($p_module ==
"" && isset(
$_REQUEST[
'ac']))
1068 $p_module.=
" dossier : " .
$_REQUEST[
'gDossier'];
1069 $sql =
"insert into audit_connect (ac_user,ac_ip,ac_module,ac_url,ac_state) values ($1,$2,$3,$4,$5)";
1072 $_SESSION[
'g_user'],
1073 $_SERVER[
"REMOTE_ADDR"],
1075 $_SERVER[
'REQUEST_URI'],
1082 $count = $this->
db->get_value(
"select count(*) from profile_user where user_name=$1", array($this->login));
1085 $this->
db->exec_sql(
"insert into profile_user(p_id,user_name)
1086 values ($1,$2)", array(
$p_id, $this->login));
1090 $this->
db->exec_sql(
"update profile_user set p_id=$1 where user_name=$2", array(
$p_id, $this->login));
1099 $profile = $this->
db->get_value(
"select p_id from profile_user where
1100 lower(user_name)=lower($1)", array($this->login));
1112 if ( $this->admin != 1)
1114 $sql =
" (select p_granted "
1115 .
" from user_sec_action_profile "
1116 .
" where ua_right='W' and p_id=".$this->get_profile().
") ";
1118 $sql =
"(select p_id from profile)";
1131 if ( $this->admin != 1)
1133 $sql =
" (select p_granted "
1134 .
" from user_sec_action_profile "
1135 .
" where ua_right in ('W','R') and p_id=".$this->get_profile().
") ";
1137 $sql =
"(select p_id from profile)";
1149 $r=$this->
db->get_value (
' select count(*)
1150 from user_sec_action_profile
1167 if ( $this->
Admin() == 1 )
return true;
1169 $r = $this->
db->get_value(
" select count(*) from action_gestion where ag_id=$1 and ag_dest in
1170 (select p_granted from user_sec_action_profile where ua_right='W' and p_id=$2) ", array($dtoc,
$profile));
1183 if ( $this->
Admin() == 1 )
return true;
1185 $r = $this->
db->get_value(
" select count(*) from action_gestion where ag_id=$1 and (ag_dest in
1186 (select p_granted from user_sec_action_profile where p_id=$2) or ag_owner=$3)", array($dtoc,
$profile, $this->login));
1198 if ( $this->
Admin() == 1 )
return true;
1200 $r=$this->
db->get_value(
"select count(*)
1201 from profile_sec_repository
1205 and ur_right='W'",array($p_repo,
$profile));
1217 if ( $this->
Admin() == 1 )
return true;
1219 $r=$this->
db->get_value(
"select count(*)
1220 from profile_sec_repository
1230 if ($p_pass1 == $p_pass2) {
1232 $l_pass = md5(
$_POST[
'pass_1']);
1233 $repo->exec_sql(
"update ac_users set use_pass=$1 where use_login=$2", array($l_pass, $_SESSION[
'g_user']));
1234 $_SESSION[
'g_pass'] =
$_POST[
'pass_1'];
1236 alert(_(
"Les mots de passe ne correspondent pas. Mot de passe inchangé"));
1246 $repo->exec_sql(
"update ac_users set use_email=$1 where use_login=$2", array($p_email, $_SESSION[
'g_user']));
1259 $user=$repo_cnx->get_array(
'select use_id,use_login from ac_users where use_login=$1',
1261 if ( ! $user )
return false;
1264 $repo_cnx->exec_sql(
"delete from jnt_use_dos WHERE use_id=$1 and dos_id=$2",
1265 array($user[0][
'use_id'],$p_dossier));
1268 $cn_dossier=
new Database($p_dossier);
1269 $cn_dossier->exec_sql(
"delete from profile_user where user_name=$1",array($p_login));
1270 $cn_dossier->exec_sql(
"delete from user_sec_act where ua_login=$1",array($p_login));
1281 $user=$repo_cnx->get_array(
"select use_id,use_login
1283 where use_login=$1", array($p_login));
1285 if ( ! $user )
return false;
1286 $cn_dossier=
new Database($p_dossier);
1289 $repo_cnx->get_value(
"select count(*) from jnt_use_dos where use_id=$1 and dos_id=$2",
1290 array($user[0][
'use_id'],$p_dossier)) == 0
1293 $repo_cnx->exec_sql(
"insert into jnt_use_dos(use_id,dos_id) values ($1,$2)",
1294 array($user[0][
'use_id'], $p_dossier));
1297 if ( $cn_dossier->get_value(
"select count(*) from profile_user where user_name=$1",
1298 array($user[0][
'use_login'])) == 0)
1300 $cn_dossier->exec_sql(
'insert into profile_user(user_name,p_id) values($1,1)',
1301 array($user[0][
'use_login']));
1304 $cn_dossier->exec_sql(
"delete from user_sec_act where ua_login=$1",array($p_login));
1306 $cn_dossier->exec_sql(
"insert into user_sec_act (ua_login,ua_act_id)"
1307 .
" select $1 ,ac_id from action ",array($p_login));
1309 $cn_dossier->exec_sql(
"delete from user_sec_jrn where uj_login=$1",array($p_login));
1310 $cn_dossier->exec_sql(
"insert into user_sec_jrn(uj_login,uj_jrn_id,uj_priv)"
1311 .
" select $1,jrn_def_id,'W' from jrn_def",
1319 $cnx_dossier=
new Database($p_dossier);
1321 $a_user=$cnx_dossier->get_array(
'select user_name from profile_user');
1322 if ( ! $a_user )
return;
1324 for ($i=0;$i <
$nb;$i++) {
1325 if ( $cnx_repo->get_value(
'select count(*) from ac_users where use_login=$1',
1326 array($a_user[$i][
'user_name'])) == 0) {
1327 $cnx_dossier->exec_sql(
"delete from user_sec_jrn where uj_login=$1",array($a_user[$i][
'user_name']));
1328 $cnx_dossier->exec_sql(
"delete from profile_user where user_name=$1",array($a_user[$i][
'user_name']));
1329 $cnx_dossier->exec_sql(
"delete from user_sec_act where ua_login=$1",array($a_user[$i][
'user_name']));
1330 $cnx_dossier->exec_sql(
"delete from user_sec_jrn where uj_login=$1",array($a_user[$i][
'user_name']));
static get_list($p_dossier)
return an array with all the active users who can access $p_dossier including the global admin...
alert($p_msg, $buffer=false)
alert in javascript
static grant_admin_access($p_login, $p_dossier)
Grant access to folder, grant administrator profile , all the ledgers and all the action...
audit($action= 'AUDIT', $p_module="")
save_email($p_email)
Save the password from PREFERENCE MODULE.
set_mini_report($p_id)
set the mini rapport to display on the welcome page
check_module($p_module)
Check if an user can access a module, return 1 if yes, otherwise 0 record in audit log This function ...
td($p_string='', $p_extra='')
surround the string with td
get_available_folder($p_filter="")
Get all the available folders for the users, checked with the security.
load_global_pref()
Get the global preferences from user_global_pref in the account_repository db.
get_limit_current_exercice()
return the first date and the last date of the current exercice for the current user ...
get_ledger_access($p_ledger)
check that a user is valid and the access to the folder
static num_row($ret)
wrapper for the function pg_NumRows
can_read_repo($p_repo)
Check if the profile of the user can read for this repository.
check_print($p_action)
Check if the user can print (in menu_ref p_type_display=p) otherwise warn and exit.
Data & function about connected users.
can_request($p_action, $p_js=0)
Check if the user can access otherwise warn and exit.
get_mini_report()
return the mini rapport to display on the welcome page
redirect($p_string, $p_time=0)
show_dossier($p_filtre="")
Show all the available folder for the users at the login page.
can_write_action($dtoc)
Check if the profile of the user can write for this profile.
is_local_admin($p_dossier=-1)
Check if an user is an local administrator.
__construct(&$p_cn, $p_id=-1)
Admin()
Check if an user is an admin.
Check($silent=false, $from= '')
Check if user is active and exists in therepository Automatically redirect, it doesn't check if a use...
get_exercice()
Return the year of current Periode it is the parm_periode.p_exercice col if an error occurs return 0...
can_add_action($p_profile)
Check if the current user can add an action in the profile given in parameter.
check_action($p_action_id)
Check if an user is allowed to do an action.
get_readable_profile()
Compute the SQL string for the readable profile, the subselect for p_id , example p_id in $g_user->ge...
static fetch_array($ret, $p_indice=0)
wrapper for the function pg_fetch_array
For the periode tables parm_periode and jrn_periode.
get_available_repository($p_access='R')
return array of available repository
static revoke_access($p_login, $p_dossier)
Remove a user and all his privileges So it cannot connect anymore and all his privileges are removed ...
insert_default_global_pref($p_type="", $p_value="")
insert default pref if no parameter are given insert all the existing parameter otherwise only the re...
static remove_inexistant_user($p_dossier)
load()
load data from database.
if(!isset($_REQUEST['p_jrn'])) else $Ledger id
save_global_preference($key, $value)
Save the preference , the scope is global, the settings are saved into account_repository.
h($p_string)
to protect again bad characters which can lead to a cross scripting attack the string to be diplayed ...
update_global_pref($p_type, $p_value="")
update default pref if value is not given then use the default value
This class allow you to connect to the postgresql database, execute sql, retrieve data...
static fetch_result($ret, $p_row=0, $p_col=0)
wrapper for the function pg_fetch_all
can_read_action($dtoc)
Check if the profile of the user can write for this profile.
can_print($p_action, $p_js=0)
Check if the user can print (in menu_ref p_type_display=p) otherwise warn and exit.
get_profile()
return the profile (p_id)
can_write_repo($p_repo)
Check if the profile of the user can write for this repository.
if(!isset($_GET['submit_query'])) $p_action
get_preference()
Get the default user's preferences.
save_password($p_pass1, $p_pass2)
get_writable_profile()
Compute the SQL string for the writable profile, the subselect for p_id , example p_id in $g_user->ge...
if(isset($_REQUEST['gDossier'])&&$_REQUEST['gDossier']<>0) $repo
check_jrn($p_jrn)
check the access of an user on a ledger
get_periode()
Get the default periode from the user's preferences.
for($e=0;$e< count($afiche);$e++) exit
check_dossier($p_dossier_id, $silent=false)
check if an user can access a folder, if he cannot display a dialog box and exit