Main Page | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

fiche_def_ref Class Reference

fiche_def_ref, a fiche is owned by fiche_def which is owned by fiche_def_ref More...


Public Member Functions

 fiche_def_ref ($p_cn, $p_frd_id=-1)
 LoadAll ()
 Load all the fiche_def_ref data and return an array of fiche_def_ref objects.
 Display ()
 Display data between

tag.

 Input ()
 Input Data between

tag.

 Save ()
 Store data into the database: update the record.
 Get ()
 Get the data with the p_code and complete the current object.

Data Fields

 $frd_id
 $frd_text
 $frd_class_base
 $attribut


Detailed Description

fiche_def_ref, a fiche is owned by fiche_def which is owned by fiche_def_ref

Definition at line 30 of file class_fiche_def.php.


Constructor & Destructor Documentation

fiche_def_ref::fiche_def_ref p_cn,
p_frd_id = -1
 

.frd_class_base

Definition at line 38 of file class_fiche_def.php.

References frd_class_base, frd_id, and frd_text.

Referenced by LoadAll().

00039     {
00040       $this->db=$p_cn;
00041       $this->frd_id=$p_frd_id;
00042       $this->attribut=array('frd_id','frd_text','frd_class_base');
00043     }


Member Function Documentation

fiche_def_ref::Display  ) 
 

Display data between

tag.

Returns:
string

Definition at line 78 of file class_fiche_def.php.

References $r, and value.

00079     {
00080       $r="";
00081       foreach ( $this->attribut as $value) 
00082         {
00083           $r.="<TD>".$this->$value.'</TD>';
00084         }
00085       return $r;
00086     }

fiche_def_ref::Get  ) 
 

Get the data with the p_code and complete the current object.

Returns:
none

Definition at line 131 of file class_fiche_def.php.

References $r, $Res, $sql, ExecSql(), frd_class_base, and frd_text.

00132     {
00133       $sql="select * from  fiche_def_ref ".
00134         " where frd_id=".$this->frd_id;
00135       $Res=ExecSql($this->db,$sql);
00136       if ( pg_NumRows($Res) == 0 ) return null;
00137       $r=pg_fetch_array($Res,0);
00138       $this->frd_text=$r['frd_text'];
00139       $this->frd_class_base=$r['frd_class_base'];
00140     }

fiche_def_ref::Input  ) 
 

Input Data between

tag.

parm :

  • none gen :
  • Returns:
    string

Definition at line 97 of file class_fiche_def.php.

References $h, $r, $t, $w, frd_class_base, frd_id, and frd_text.

00098     {
00099       $r="";
00100       $h=new widget('hidden');
00101       $r.='<li>Id          :'.$h->IOValue('frd_id',$this->frd_id).$this->frd_id."</li>";
00102       $w=new widget("text");
00103       $r.='<li>Commentaire  :'.$w->IOValue('frd_text',$this->frd_text)."</li>";
00104       $t=new widget('text');
00105       $r.='<li>Poste de base:'.$t->IOValue('frd_class_base',$this->frd_class_base)."</li>";
00106 
00107       return $r;
00108     }

fiche_def_ref::LoadAll  ) 
 

Load all the fiche_def_ref data and return an array of fiche_def_ref objects.

Returns:
array

Definition at line 51 of file class_fiche_def.php.

References $all, $array, $idx, $o, $Res, $row, $sql, ExecSql(), fiche_def_ref(), and value.

00052     {
00053       $sql="select * from fiche_def_ref order by frd_id";
00054       $Res=ExecSql($this->db,$sql);
00055       $all=pg_fetch_all($Res);
00056       if ( $Res == false ) return array();
00057       $idx=0;
00058       $array=array();
00059       foreach ($all as $row) 
00060         {
00061           $o=new fiche_def_ref($this->db);
00062 
00063           foreach (  $this->attribut as  $value)
00064             {
00065               $o->$value=$row[$value];
00066             }
00067           $array[$idx]=$o;
00068           $idx++;
00069         }
00070       return $array;
00071     }

fiche_def_ref::Save  ) 
 

Store data into the database: update the record.

  • Returns:
    none

Definition at line 117 of file class_fiche_def.php.

References $Res, $sql, ExecSql(), frd_class_base, and frd_text.

00118     {
00119       $sql="update fiche_def_ref set frd_text='".
00120         $this->frd_text."' ,  frd_class_base='".$this->frd_class_base."'".
00121         " where frd_id=".$this->frd_id;
00122       $Res=ExecSql($this->db,$sql);
00123     }


Field Documentation

fiche_def_ref::$attribut
 

Definition at line 35 of file class_fiche_def.php.

fiche_def_ref::$frd_class_base
 

Definition at line 34 of file class_fiche_def.php.

fiche_def_ref::$frd_id
 

fiche_def_ref.frd_id

Definition at line 32 of file class_fiche_def.php.

fiche_def_ref::$frd_text
 

fiche_def_ref.frd_tex

Definition at line 33 of file class_fiche_def.php.


The documentation for this class was generated from the following file: