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

Diff of /phpcompta/html/user_jrn.php

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

revision 1.20 by stanpinte, Fri Jul 1 08:13:42 2005 UTC revision 1.21 by stanpinte, Mon Jul 4 17:58:50 2005 UTC
# Line 37  if ( ! isset ( $_SESSION['g_dossier'] ) Line 37  if ( ! isset ( $_SESSION['g_dossier'] )
37  }  }
38  /* Admin. Dossier */  /* Admin. Dossier */
39    
40    if ( isset( $_GET['p_jrn'] ))
41  if ( isset( $_GET['p_jrn'] )) {  {
42    $g_jrn=$_GET['p_jrn'];    $p_jrn=$_GET['p_jrn'];
43  } else {  } else
44    if ( ! isset ($_SESSION['g_jrn']) )  {
45      $g_jrn=-1;    $p_jrn=-1;
   else  
     $g_jrn=$_SESSION['g_jrn'];  
46  }  }
47    
48  if ( isset ($_GET['JRN_TYPE'] ) ) {  if ( isset ($_GET['JRN_TYPE'] ) ) {
49    $g_jrn=-1;    $p_jrn=-1;
50  }  }
51  $_SESSION["g_jrn"]=$g_jrn;  //$_SESSION["p_jrn"]=$p_jrn;
52    
53    
54  ShowMenuCompta($_SESSION['g_dossier']);  ShowMenuCompta($_SESSION['g_dossier']);
# Line 60  if ( $User->admin == 0 ) { Line 59  if ( $User->admin == 0 ) {
59      /* Cannot Access */      /* Cannot Access */
60      NoAccess();      NoAccess();
61    }    }
62    if ( isset ($g_jrn)) {    if ( isset ($p_jrn)) {
63            if (CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$_SESSION['g_jrn']) == 0 ){            if (CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$p_jrn) == 0 ){
64              /* Cannot Access */              /* Cannot Access */
65              NoAccess();              NoAccess();
66              exit -1;              exit -1;
67            }            }
68      } // if isset g_jrn      } // if isset p_jrn
69    
70  }  }
71  // if show  // if show
# Line 84  if ( isset ($_GET['JRN_TYPE'] ) ) { Line 83  if ( isset ($_GET['JRN_TYPE'] ) ) {
83    $result=ShowJrn("user_jrn.php?JRN_TYPE=".$jrn_type);    $result=ShowJrn("user_jrn.php?JRN_TYPE=".$jrn_type);
84     echo "<DIV class=\"u_subtmenu\">";     echo "<DIV class=\"u_subtmenu\">";
85     echo $result;     echo $result;
86    ShowMenuJrnUser($_SESSION['g_dossier'],$_GET['JRN_TYPE'],$_SESSION['g_jrn']);    ShowMenuJrnUser($_SESSION['g_dossier'],$_GET['JRN_TYPE'],$p_jrn);
87     echo "</DIV>";     echo "</DIV>";
88   if ( $jrn_type=='NONE' )     include('user_action_gl.php');   if ( $jrn_type=='NONE' )     include('user_action_gl.php');
89   if ( $jrn_type=='SALDO_FIN') include ('user_action_fin.php');   if ( $jrn_type=='SALDO_FIN') include ('user_action_fin.php');
90    
91  } else {  } else {
92    
93    echo_debug("Selected is ".$_SESSION['g_jrn']);    echo_debug("Selected is ".$p_jrn);
94    // Get the jrn_type_id    // Get the jrn_type_id
95    include_once('jrn.php');    include_once('jrn.php');
96    $JrnProp=GetJrnProp($_SESSION['g_dossier'],$_SESSION['g_jrn']);    $JrnProp=GetJrnProp($_SESSION['g_dossier'],$p_jrn);
97    $jrn_type=$JrnProp['jrn_def_type'];    $jrn_type=$JrnProp['jrn_def_type'];
98    echo_debug("Type is $jrn_type");    echo_debug("Type is $jrn_type");
99    echo_debug("Jrn_def_type = $jrn_type");    echo_debug("Jrn_def_type = $jrn_type");
100    
101   echo '<div class="u_subtmenu">';   echo '<div class="u_subtmenu">';
102   echo ShowJrn("user_jrn.php?JRN_TYPE=".$jrn_type);   echo ShowJrn("user_jrn.php?JRN_TYPE=".$jrn_type);
103   ShowMenuJrnUser($_SESSION['g_dossier'],$jrn_type,$_SESSION['g_jrn']);   ShowMenuJrnUser($_SESSION['g_dossier'],$jrn_type,$p_jrn);
104   echo '</div>';   echo '</div>';
105  }  }
106    
# Line 112  if ( $jrn_type=='FIN' ) Line 111  if ( $jrn_type=='FIN' )
111  }  }
112    
113    // if a journal is selected show the journal's menu    // if a journal is selected show the journal's menu
114  if ( $_SESSION['g_jrn'] != -1 ) {  if ( $p_jrn != -1 ) {
115   $result=ShowJrn( "user_jrn.php?JRN_TYPE=".$jrn_type);   $result=ShowJrn( "user_jrn.php?JRN_TYPE=".$jrn_type);
116    // Get the jrn_type_id    // Get the jrn_type_id
117    include_once('jrn.php');    include_once('jrn.php');
118    $JrnProp=GetJrnProp($_SESSION['g_dossier'],$_SESSION['g_jrn']);    $JrnProp=GetJrnProp($_SESSION['g_dossier'],$p_jrn);
119    $jrn_type=$JrnProp['jrn_def_type'];    $jrn_type=$JrnProp['jrn_def_type'];
120    // display jrn's menu    // display jrn's menu
121    
122     $menu_jrn=ShowMenuJrn($cn,$jrn_type);     $menu_jrn=ShowMenuJrn($cn,$jrn_type, $p_jrn);
123     //      echo '<div class="searchmenu">';     //      echo '<div class="searchmenu">';
124     //   echo $result;     //   echo $result;
125     echo $menu_jrn;     echo $menu_jrn;
126     //   echo '</DIV>';     //   echo '</DIV>';
127     $g_dossier=$_SESSION['g_dossier'];     $g_dossier=$_SESSION['g_dossier'];
128     $g_user=$_SESSION['g_user'];     $g_user=$_SESSION['g_user'];
129    // Execute Action for g_jrn    // Execute Action for p_jrn
130    
131    if ( $jrn_type=='VEN' )     include('user_action_ven.php');    if ( $jrn_type=='VEN' )     include('user_action_ven.php');
132    if ( $jrn_type=='ACH' )     include('user_action_ach.php');    if ( $jrn_type=='ACH' )     include('user_action_ach.php');
133    if ( $jrn_type=='FIN' )     include('user_action_fin.php');    if ( $jrn_type=='FIN' )     include('user_action_fin.php');
134    if ( $jrn_type=='OD ' )     include('user_action_ods.php');    if ( $jrn_type=='OD ' )     include('user_action_ods.php');
135    } // if isset g_jrn    } // if isset p_jrn
136    
137  html_page_stop();  html_page_stop();
138  ?>  ?>

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

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