/[phpcompta]/phpcompta/html/show_document.php
ViewVC logotype

Diff of /phpcompta/html/show_document.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by sparkyx, Sun Mar 6 19:56:58 2005 UTC revision 1.3 by sparkyx, Mon Mar 7 19:50:22 2005 UTC
# Line 27  if ( !isset ($_GET['jrn'] ) || Line 27  if ( !isset ($_GET['jrn'] ) ||
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']);
# Line 36  $cn=DbConnect($_SESSION['g_dossier']); Line 36  $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");

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26