Main Page | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

user_action_gl.php

Go to the documentation of this file.
00001 <?
00002 /*
00003  *   This file is part of PhpCompta.
00004  *
00005  *   PhpCompta is free software; you can redistribute it and/or modify
00006  *   it under the terms of the GNU General Public License as published by
00007  *   the Free Software Foundation; either version 2 of the License, or
00008  *   (at your option) any later version.
00009  *
00010  *   PhpCompta is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU General Public License
00016  *   along with PhpCompta; if not, write to the Free Software
00017  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 */
00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
00020 /* $Revision: 1.9 $ */
00021 echo_debug('user_action_gl.php',__LINE__,"include user_action_gl.php");
00026 include_once ("preference.php");
00027 include_once ("user_common.php");
00028 include_once ("class_widget.php");
00029 include_once("class_user.php");
00030 require_once("jrn.php");
00031 
00032 $cn=DbConnect($_SESSION['g_dossier']);
00033 if (CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],0)  < 1 )
00034   {NoAccess();exit -1;}
00035 
00036 ?>
00037 <div class="u_redcontent">
00038 <form method="GET" action="user_jrn.php">
00039 <?
00040 
00041 $hid=new widget("hidden");
00042 
00043 $hid->name="jrn_type";
00044 $hid->value="NONE";
00045 echo $hid->IOValue();
00046 
00047 $hid->name="action";
00048 $hid->value="voir_jrn";
00049 echo $hid->IOValue();
00050 
00051 $w=new widget("select");
00052 
00053 $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode order by p_id");
00054 $User=new cl_user($cn);
00055 $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$User->GetPeriode();
00056 $w->selected=$current;
00057 echo 'Période  '.$w->IOValue("p_periode",$periode_start).$w->Submit('gl_submit','Valider');
00058 ?>
00059 </form>
00060 <?
00061 
00062 $sql=SQL_LIST_ALL_INVOICE." and jr_tech_per=".$current;
00063 // Nav. bar 
00064 $step=$_SESSION['g_pagesize'];
00065 $page=(isset($_GET['offset']))?$_GET['page']:1;
00066 $offset=(isset($_GET['offset']))?$_GET['offset']:0;
00067 
00068 list ($max_line,$list)=ListJrn($cn,0,$sql,null,$offset);
00069 
00070 $bar=jrn_navigation_bar($offset,$max_line,$step,$page);
00071 
00072 echo $bar;
00073 echo $list;
00074 echo $bar;
00075 
00076 ?>
00077 </div>