/[openfoncier]/trunk/obj/PA.class.php
ViewVC logotype

Contents of /trunk/obj/PA.class.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11 - (show annotations)
Mon Feb 28 20:15:19 2011 UTC (13 years, 11 months ago) by fraynaud
File size: 3434 byte(s)
trs om 4.00



1 <?php
2 /* $Id: PA.class.php,v 1.6 2008-08-18 14:39:32 jbastide Exp $
3 */
4 require_once ("dossier.class.php");
5 require_once ($path_om."formulairedyn.class.php");
6
7 class PA extends dossier{
8
9 var $nature="PA";
10
11 function PA($id,&$db,$DEBUG) {
12 $this->constructeur($id,$db,$DEBUG);
13 } // fin constructeur
14
15 function setvalF($val){
16 parent::setvalF($val);
17 $this->valF['travaux'] = $val['travaux'];
18 $this->valF['batiment_nombre'] = $val['batiment_nombre'];
19 $this->valF['logement_nombre'] = $val['logement_nombre'];
20 $this->valF['hauteur'] = $val['hauteur'];
21 $this->valF['piece_nombre'] = $val['piece_nombre'];
22
23 $this->valF['shon'] = $val['shon'];
24 $this->valF['shon_calcul'] = $val['shon_calcul'];
25 $this->valF['shoB'] = $val['shob'];
26 }
27
28 function setType(&$form,$maj) {
29 parent::setType($form,$maj);
30 // terrain
31 if($maj<2){
32 $form->setType('travaux','select');
33 $form->setType('batiment_nombre','text');
34 $form->setType('logement_nombre','text');
35 $form->setType('shon','text');
36 $form->setType('shon_calcul','hiddenstatic');
37 $form->setType('shob','text');
38 $form->setType('hauteur','text');
39 $form->setType('piece_nombre','text');
40 }
41 }
42
43 function setLib(&$form,$maj) {
44 parent::setLib($form,$maj);
45 $form->setLib('batiment_nombre',' '.$this->lang('batiment_nombre').' : ');
46 $form->setLib('logement_nombre',' '.$this->lang('logement_nombre').' : ');
47 $form->setLib('hauteur',' '.$this->lang('hauteur').' : ');
48 $form->setLib('piece_nombre',' '.$this->lang('piece_nombre').' : ');
49 $form->setLib('shon',' '.$this->lang('shon').' : ');
50 $form->setLib('shon_calcul',' '.$this->lang('shon_calcul').' : ');
51 $form->setLib('shob',' '.$this->lang('shob').' : ');
52 }
53 function setTaille(&$form,$maj){
54 parent::setTaille($form,$maj);
55 $form->setTaille('hauteur','3');
56 }
57 function setVal(&$form,$maj,$validation){
58 parent::setVal($form,$maj,$validation);
59 if ($validation==0) {
60 if ($maj == 0){
61
62
63 }}}
64 function setSelect(&$form, $maj,$db,$debug) {
65 include ("../dyn/connexion.php");
66 include ("../sql/".$dsn['phptype']."/".$this->table.".form.inc");
67 parent::setSelect($form, $maj,$db,$debug);
68 if($maj<2){
69 // travaux
70 $contenu=array();
71 $res = $db->query($sql_travaux);
72 if (DB :: isError($res))
73 die($res->getMessage().$sql_travaux);
74 else{
75 if ($debug == 1)
76 echo " la requete ".$sql_travaux." est exécutée<br>";
77 $contenu[0][0]="";
78 $contenu[1][0]=$this->lang('choisir')." ".$this->lang('travaux');
79 $k=1;
80 while ($row=& $res->fetchRow()){
81 $contenu[0][$k]=$row[0];
82 $contenu[1][$k]=$row[1];
83 $k++;
84 }
85 $form->setSelect("travaux_nature",$contenu);
86 }}}
87 function setGroupe(&$form,$maj){
88 parent::setGroupe($form,$maj);
89 $form->setGroupe('batiment_nombre','D');
90 $form->setGroupe('logement_nombre','G');
91 $form->setGroupe('hauteur','G');
92 $form->setGroupe('piece_nombre','F');
93
94 $form->setGroupe('shon','D');
95 $form->setGroupe('shon_calcul','G');
96 $form->setGroupe('shob','F');
97
98 $form->setGroupe('architecte','D');
99 $form->setGroupe('architecte_nom','G');
100 $form->setGroupe('saisie_architecte','G');
101 $form->setGroupe('travaux','F');
102 }
103 function setRegroupe(&$form,$maj){
104 parent::setRegroupe($form,$maj);
105
106 $form->setRegroupe('batiment_nombre','D',$this->lang('description'));
107 $form->setRegroupe('logement_nombre','G','');
108 $form->setRegroupe('hauteur','G','');
109 $form->setRegroupe('piece_nombre','G','');
110 $form->setRegroupe('shon','G',' SHON ');
111 $form->setRegroupe('shon_calcul','G','');
112 $form->setRegroupe('shob','F','');
113
114
115 }
116
117
118 }// fin de classe
119 ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26