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

Own Class Reference

Class to manage the company parameter (address, name...). More...


Public Member Functions

 Own ($p_cn)
 UpdateRow ($p_attr)
 Update a row.
 Save ()
 save data

Data Fields

 $db


Detailed Description

Class to manage the company parameter (address, name...).

Definition at line 28 of file class_own.php.


Constructor & Destructor Documentation

Own::Own p_cn  ) 
 

Definition at line 31 of file class_own.php.

References $Res, $row, and ExecSql().

00031                       {
00032     $this->db=$p_cn;
00033     $Res=ExecSql($p_cn,"select * from parameter where pr_id like 'MY_%'");
00034     for ($i = 0;$i < pg_NumRows($Res);$i++) {
00035       $row=pg_fetch_array($Res,$i);
00036       $key=$row['pr_id'];
00037       $elt=$row['pr_value'];
00038       // store value here
00039       $this->{"$key"}=$elt;
00040     }
00041 
00042   }


Member Function Documentation

Own::Save  ) 
 

save data

Definition at line 62 of file class_own.php.

References MY_COMMUNE, MY_CP, MY_FAX, MY_NAME, MY_NUMBER, MY_PAYS, MY_STREET, MY_TEL, and MY_TVA.

00062                   {
00063     $this->UpdateRow('MY_NAME');
00064     $this->UpdateRow('MY_TVA');
00065     $this->UpdateRow('MY_STREET');
00066     $this->UpdateRow('MY_NUMBER');
00067     $this->UpdateRow('MY_CP');
00068     $this->UpdateRow('MY_TEL');
00069     $this->UpdateRow('MY_PAYS');
00070     $this->UpdateRow('MY_COMMUNE');
00071     $this->UpdateRow('MY_FAX');
00072 
00073   }

Own::UpdateRow p_attr  ) 
 

Update a row.

Parameters:
give the attribut name

Definition at line 51 of file class_own.php.

References FormatString().

00051                               {
00052     $value=FormatString($this->{"$p_attr"});
00053     $Res=ExecSql($this->db,"update parameter set pr_value='$value' where pr_id='$p_attr'");
00054   }


Field Documentation

Own::$db
 

Definition at line 29 of file class_own.php.


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