/[phpcompta]/phpcompta/include/user_common.php
ViewVC logotype

Diff of /phpcompta/include/user_common.php

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

revision 1.36 by sparkyx, Sun Mar 6 19:52:59 2005 UTC revision 1.37 by sparkyx, Mon Mar 7 19:50:22 2005 UTC
# Line 222  comment = $p_comment"); Line 222  comment = $p_comment");
222  function ListJrn($p_cn,$p_jrn,$p_where="",$p_array=null)  function ListJrn($p_cn,$p_jrn,$p_where="",$p_array=null)
223  {  {
224    
   //TODO add a print button but only if type of jrn is VEN !!  
225    include_once("central_inc.php");    include_once("central_inc.php");
226    if ( $p_array == null ) {    if ( $p_array == null ) {
227     $sql="select jr_id   ,     $sql="select jr_id   ,
# Line 309  function ListJrn($p_cn,$p_jrn,$p_where=" Line 308  function ListJrn($p_cn,$p_jrn,$p_where="
308      if ( $l_poste != null ) {      if ( $l_poste != null ) {
309        $sql.=$l_and."  jr_grpt_id in (select j_grpt        $sql.=$l_and."  jr_grpt_id in (select j_grpt
310               from jrnx where j_poste = $l_poste)  ";               from jrnx where j_poste = $l_poste)  ";
311          $l_and=" and ";
312        }
313        // if not admin check filter
314        $User=new cl_user(DbConnect());
315        $User->Check();
316        if ( $User->admin == 0 ) {
317          $sql.=$l_and." jr_def_id in ( select uj_jrn_id ".
318            " from user_sec_jrn where ".
319            " uj_login='".$_SESSION['g_user']."'".
320            " and uj_priv in ('R','W'))";
321      }      }
322      $sql.=" order by jr_date_order asc";      $sql.=" order by jr_date_order asc";
323    }// p_array != null    }// p_array != null

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

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