00001 <?
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00028 class Own {
00029 var $db;
00030
00031 function Own($p_cn) {
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
00039 $this->{"$key"}=$elt;
00040 }
00041
00042 }
00051 function UpdateRow($p_attr) {
00052 $value=FormatString($this->{"$p_attr"});
00053 $Res=ExecSql($this->db,"update parameter set pr_value='$value' where pr_id='$p_attr'");
00054 }
00055
00062 function Save() {
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 }
00074
00075 }