27 |
|
|
28 |
include_once ("postgres.php"); |
include_once ("postgres.php"); |
29 |
|
|
30 |
$jrn=$_GET['jrn'] ; |
|
31 |
$jr_grpt_id=$_GET['jr_grpt_id']; |
$jr_grpt_id=$_GET['jr_grpt_id']; |
32 |
|
|
33 |
$cn=DbConnect($_SESSION['g_dossier']); |
$cn=DbConnect($_SESSION['g_dossier']); |
36 |
include ('class_user.php'); |
include ('class_user.php'); |
37 |
$User=new cl_user($cn); |
$User=new cl_user($cn); |
38 |
$User->Check(); |
$User->Check(); |
39 |
|
// retrieve the jrn |
40 |
if ( $User->admin == 0 ) { |
$r=ExecSql($cn,"select jr_def_id from jrn where jr_grpt_id=$jr_grpt_id"); |
41 |
if (CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$jrn) == 0 ){ |
if ( pg_num_rows($r) == 0 ) { |
42 |
/* Cannot Access */ |
echo_error("Invalid operation id jr_grpt_id=$jr_grpt_id"); |
43 |
NoAccess(); |
exit; |
44 |
exit -1; |
} |
45 |
} |
$a=pg_fetch_array($r,0); |
46 |
} |
$jrn=$a['jr_def_id']; |
47 |
|
|
48 |
|
if ($User->AccessJrn($jrn) == false ){ |
49 |
|
/* Cannot Access */ |
50 |
|
NoAccess(); |
51 |
|
exit -1; |
52 |
|
} |
53 |
|
|
54 |
StartSql($cn); |
StartSql($cn); |
55 |
$ret=ExecSql($cn,"select jr_pj,jr_pj_name,jr_pj_type from jrn where jr_grpt_id=$jr_grpt_id"); |
$ret=ExecSql($cn,"select jr_pj,jr_pj_name,jr_pj_type from jrn where jr_grpt_id=$jr_grpt_id"); |