00001 <?
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00026
00027
00028
00029
00031 if ( isset( $_POST['bt_html'] ) ) {
00032 include("jrn.php");
00033 $p_cent=( isset ( $_POST['cent']) )?'on':'off';
00034
00035 echo_debug('class_operation.php',__LINE__," jrn sql = $sql");
00036 $Jrn=new jrn($cn,$_POST['jrn_id']);
00037 $Jrn->GetName();
00038 $Jrn->GetRow( $_POST['from_periode'],
00039 $_POST['to_periode'],
00040 $p_cent);
00041 foreach ($Jrn->row as $op) {
00042 $a=new operation ($cn,$op);
00043 $a->cent=$p_cent;
00044
00045
00046 }
00047
00048 }
00049
00051
00053 include_once('form_input.php');
00054 include_once("postgres.php");
00055 include_once("class_widget.php");
00056 if ( $User->Admin() ==0) {
00057 $ret=make_array($cn,"select jrn_def_id,jrn_def_name
00058 from jrn_def join jrn_type on jrn_def_type=jrn_type_id
00059 join user_sec_jrn on uj_jrn_id=jrn_def_id
00060 where
00061 uj_login='$User->id'
00062 and uj_priv !='X'
00063 ");
00064 } else {
00065 $ret=make_array("select jrn_def_id,jrn_def_name
00066 from jrn_def join jrn_type on jrn_def_type=jrn_type_id");
00067
00068 }
00069
00070
00071
00072
00073
00074
00075 $NoPriv=CountSql($cn,"select jrn_def_id,jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv,
00076 jrn_deb_max_line,jrn_cred_max_line
00077 from jrn_def join jrn_type on jrn_def_type=jrn_type_id
00078 join user_sec_jrn on uj_jrn_id=jrn_def_id
00079 where
00080 uj_login='$User->id'
00081 and uj_priv ='X'
00082 ");
00083
00084 if ( $NoPriv == 0 ) {
00085 $a=count($ret);
00086 $all=array('value'=>0,'label'=>'All');
00087 $ret[$a]=$all;
00088 }
00089 if ( count($ret) < 1 )
00090 NoAccess();
00092
00094 echo '<div class="u_redcontent">';
00095 echo '<FORM ACTION="?type=jrn" METHOD="POST">';
00096 echo '<TABLE><TR>';
00097 $w=new widget("select");
00098 $w->table=1;
00099 $w->label="Choississez le journal";
00100 print $w->IOValue("jrn_id",$ret);
00101 print '</TR>';
00102 print '<TR>';
00103 $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode order by p_id");
00104 $w->label="Depuis";
00105 print $w->IOValue('from_periode',$periode_start);
00106 $w->label=" jusqu'à ";
00107 $periode_end=make_array($cn,"select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode order by p_id");
00108 print $w->IOValue('to_periode',$periode_end);
00109 print "</TR><TR>";
00110 $centralise=new widget("checkbox");
00111 $centralise->label="Depuis les journaux centralisés";
00112 $centralise->table=1;
00113 print $centralise->IOValue('cent');
00114
00115 print "</TR>";
00116 echo '</TABLE>';
00117 print $w->Submit('bt_html','Impression');
00118
00119 echo '</FORM>';
00120 echo '</div>';
00121 ?>