noalyss  Version-6.7.2
Public Member Functions
Exercice Class Reference

Public Member Functions

 __construct (&$cn)
 count ()
 return the number of different exercices into a folder
 select ($name, $selected='', $js='')
 Show a ISelect with the different exercices.
 select_date ($name, $selected='', $js='')
 Show a ISelect with the different exercices, display start and end date.

Detailed Description

Definition at line 27 of file class_exercice.php.


Constructor & Destructor Documentation

Definition at line 29 of file class_exercice.php.

References $cn, and cn.

  {
    $this->cn=$cn;
  }

Member Function Documentation

return the number of different exercices into a folder

Parameters:
$cnis the database connexion object database
Returns:
the count of exercice

Definition at line 38 of file class_exercice.php.

References $count, and cn.

  {
    $count=$this->cn->get_value('select count(distinct p_exercice) from parm_periode');
    return $count;
  }
Exercice::select ( name,
selected = '',
js = '' 
)

Show a ISelect with the different exercices.

Parameters:
$nameof the iselect
$selectedthe selected year (default = '')
$jsjavascript (default = '')
Returns:
ISelect object

Definition at line 50 of file class_exercice.php.

References $iselect, $js, $name, $selected, and cn.

   {
     $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;
   }
Exercice::select_date ( name,
selected = '',
js = '' 
)

Show a ISelect with the different exercices, display start and end date.

Parameters:
$nameof the iselect
$selectedthe selected year (default = '')
$jsjavascript (default = '')
Returns:
ISelect object

Definition at line 65 of file class_exercice.php.

References $iselect, $js, $name, $selected, and cn.

   {
     $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;
   }

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations