cn=$cn; } /** *return the number of different exercices into a folder *@param $cn is the database connexion object database *@return the count of exercice */ function count() { $count=$this->cn->get_value('select count(distinct p_exercice) from parm_periode'); return $count; } /** *Show a ISelect with the different exercices *@param $name of the iselect *@param $selected the selected year (default = '') *@param $js javascript (default = '') *@return ISelect object */ function select($name,$selected='',$js='') { $iselect=new ISelect($name); $iselect->value=$this->cn->make_array('select distinct p_exercice,p_exercice from parm_periode order by 1'); $iselect->selected=$selected; $iselect->javascript=$js; return $iselect; } /** *Show a ISelect with the different exercices, display start and end date *@param $name of the iselect *@param $selected the selected year (default = '') *@param $js javascript (default = '') *@return ISelect object */ function select_date($name,$selected='',$js='') { $iselect=new ISelect($name); $iselect->value=$this->cn->make_array("select distinct p_exercice,to_char (min(p_start),'DD.MM.YY') ||' - ' ||to_char (max(p_end),'DD.MM.YY') from parm_periode group by p_exercice order by 1"); $iselect->selected=$selected; $iselect->javascript=$js; return $iselect; } }