Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
00026 require_once('class_exercice.php');
00027 global $g_user;
00028 echo '<div class="content" style="width:90%;margin-left:5%">';
00029 $exercice=new Exercice($cn);
00030 $old='';
00031 $fiche=new Fiche($cn,$_GET['f_id']);
00032 $year=$g_user->get_exercice();
00033 if ( $year == 0 )
00034 {
00035 $html=_("erreur aucune période par défaut, allez dans préférence pour en choisir une");
00036 }
00037 else
00038 {
00039 $per=new Periode($cn);
00040 $limit_periode=$per->get_limit($year);
00041 $array['from_periode']=$limit_periode[0]->first_day();
00042 $array['to_periode']=$limit_periode[1]->last_day();
00043 if (isset($_GET['ex']))
00044 {
00045 $limit_periode=$per->get_limit($_GET['ex']);
00046 $array['from_periode']=$limit_periode[0]->first_day();
00047 }
00048
00049
00050
00051
00052 if ($exercice->count() > 1 )
00053 {
00054 $default=(isset($_GET['ex']))?$_GET['ex']:$year;
00055 $dossier=dossier::id();
00056
00057 $old='<form method="get" action="do.php">';
00058 $is=$exercice->select('ex',$default,'onchange = "submit(this)"');
00059 $old.="Autre exercice ".$is->input();
00060 $old.=HtmlInput::hidden('f_id',$_GET['f_id']);
00061 $old.=HtmlInput::hidden('ac',$_GET['ac']);
00062 $old.=HtmlInput::hidden('sb',$_GET['sb']);
00063 $old.=HtmlInput::hidden('sc',$_GET['sc']);
00064 $old.=dossier::hidden();
00065 $old.='</form>';
00066 }
00067
00068 if ( $fiche->HtmlTable($array,0,0)==-1){
00069 echo h2(_("Aucune opération pour l'exercice courant"),'class="error"');
00070 }
00071 echo $old;
00072
00073 }
00074
00075 echo '</div>';