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 require_once('class_database.php');
00026 require_once('class_iselect.php');
00027 class Exercice
00028 {
00029 function __construct(&$cn)
00030 {
00031 $this->cn=$cn;
00032 }
00033
00034
00035
00036
00037
00038 function count()
00039 {
00040 $count=$this->cn->get_value('select count(distinct p_exercice) from parm_periode');
00041 return $count;
00042 }
00043
00044
00045
00046
00047
00048
00049
00050 function select($name,$selected='',$js='')
00051 {
00052 $iselect=new ISelect($name);
00053 $iselect->value=$this->cn->make_array('select distinct p_exercice,p_exercice from parm_periode order by 1');
00054 $iselect->selected=$selected;
00055 $iselect->javascript=$js;
00056 return $iselect;
00057 }
00058
00059
00060
00061
00062
00063
00064
00065 function select_date($name,$selected='',$js='')
00066 {
00067 $iselect=new ISelect($name);
00068 $iselect->value=$this->cn->make_array("select distinct p_exercice,to_char (min(p_start),'DD.MM.YY')
00069 ||' - '
00070 ||to_char (max(p_end),'DD.MM.YY')
00071 from parm_periode
00072 group by p_exercice order by 1");
00073 $iselect->selected=$selected;
00074 $iselect->javascript=$js;
00075 return $iselect;
00076 }
00077 }