2 |
/* $Id: PA.class.php,v 1.6 2008-08-18 14:39:32 jbastide Exp $ |
/* $Id: PA.class.php,v 1.6 2008-08-18 14:39:32 jbastide Exp $ |
3 |
*/ |
*/ |
4 |
require_once ("dossier.class.php"); |
require_once ("dossier.class.php"); |
|
require_once ($path_om."formulairedyn.class.php"); |
|
5 |
|
|
6 |
class PA extends dossier{ |
class PA extends dossier{ |
7 |
|
|
8 |
var $nature="PA"; |
var $nature="PA"; |
9 |
|
var $aff_depot = "collapsible"; |
10 |
function PA($id,&$db,$DEBUG) { |
var $aff_travaux = "collapsible"; |
11 |
$this->constructeur($id,$db,$DEBUG); |
var $aff_instruction = "collapsible"; |
12 |
} // fin constructeur |
var $aff_demandeur = "startClosed"; |
13 |
|
var $aff_delegataire = "startClosed"; |
14 |
function setvalF($val){ |
var $aff_terrain = "startClosed"; |
15 |
parent::setvalF($val); |
var $aff_localisation = "collapsible"; |
16 |
$this->valF['travaux'] = $val['travaux']; |
var $aff_description = "startClosed"; |
17 |
$this->valF['batiment_nombre'] = $val['batiment_nombre']; |
|
18 |
$this->valF['logement_nombre'] = $val['logement_nombre']; |
function PA($id,&$db,$DEBUG) { |
19 |
$this->valF['hauteur'] = $val['hauteur']; |
$this->constructeur($id,$db,$DEBUG); |
20 |
$this->valF['piece_nombre'] = $val['piece_nombre']; |
} // fin constructeur |
|
|
|
|
$this->valF['shon'] = $val['shon']; |
|
|
$this->valF['shon_calcul'] = $val['shon_calcul']; |
|
|
$this->valF['shoB'] = $val['shob']; |
|
|
} |
|
|
|
|
|
function setType(&$form,$maj) { |
|
|
parent::setType($form,$maj); |
|
|
// terrain |
|
|
if($maj<2){ |
|
|
$form->setType('travaux','select'); |
|
|
$form->setType('batiment_nombre','text'); |
|
|
$form->setType('logement_nombre','text'); |
|
|
$form->setType('shon','text'); |
|
|
$form->setType('shon_calcul','hiddenstatic'); |
|
|
$form->setType('shob','text'); |
|
|
$form->setType('hauteur','text'); |
|
|
$form->setType('piece_nombre','text'); |
|
|
} |
|
|
} |
|
|
|
|
|
function setLib(&$form,$maj) { |
|
|
parent::setLib($form,$maj); |
|
|
$form->setLib('batiment_nombre',' '.$this->lang('batiment_nombre').' : '); |
|
|
$form->setLib('logement_nombre',' '.$this->lang('logement_nombre').' : '); |
|
|
$form->setLib('hauteur',' '.$this->lang('hauteur').' : '); |
|
|
$form->setLib('piece_nombre',' '.$this->lang('piece_nombre').' : '); |
|
|
$form->setLib('shon',' '.$this->lang('shon').' : '); |
|
|
$form->setLib('shon_calcul',' '.$this->lang('shon_calcul').' : '); |
|
|
$form->setLib('shob',' '.$this->lang('shob').' : '); |
|
|
} |
|
|
function setTaille(&$form,$maj){ |
|
|
parent::setTaille($form,$maj); |
|
|
$form->setTaille('hauteur','3'); |
|
|
} |
|
|
function setVal(&$form,$maj,$validation){ |
|
|
parent::setVal($form,$maj,$validation); |
|
|
if ($validation==0) { |
|
|
if ($maj == 0){ |
|
|
|
|
|
|
|
|
}}} |
|
|
function setSelect(&$form, $maj,$db,$debug) { |
|
|
include ("../dyn/connexion.php"); |
|
|
include ("../sql/".$dsn['phptype']."/".$this->table.".form.inc"); |
|
|
parent::setSelect($form, $maj,$db,$debug); |
|
|
if($maj<2){ |
|
|
// travaux |
|
|
$contenu=array(); |
|
|
$res = $db->query($sql_travaux); |
|
|
if (DB :: isError($res)) |
|
|
die($res->getMessage().$sql_travaux); |
|
|
else{ |
|
|
if ($debug == 1) |
|
|
echo " la requete ".$sql_travaux." est ex�cut�e<br>"; |
|
|
$contenu[0][0]=""; |
|
|
$contenu[1][0]=$this->lang('choisir')." ".$this->lang('travaux'); |
|
|
$k=1; |
|
|
while ($row=& $res->fetchRow()){ |
|
|
$contenu[0][$k]=$row[0]; |
|
|
$contenu[1][$k]=$row[1]; |
|
|
$k++; |
|
|
} |
|
|
$form->setSelect("travaux_nature",$contenu); |
|
|
}}} |
|
|
function setGroupe(&$form,$maj){ |
|
|
parent::setGroupe($form,$maj); |
|
|
$form->setGroupe('batiment_nombre','D'); |
|
|
$form->setGroupe('logement_nombre','G'); |
|
|
$form->setGroupe('hauteur','G'); |
|
|
$form->setGroupe('piece_nombre','F'); |
|
|
|
|
|
$form->setGroupe('shon','D'); |
|
|
$form->setGroupe('shon_calcul','G'); |
|
|
$form->setGroupe('shob','F'); |
|
|
|
|
|
$form->setGroupe('architecte','D'); |
|
|
$form->setGroupe('architecte_nom','G'); |
|
|
$form->setGroupe('saisie_architecte','G'); |
|
|
$form->setGroupe('travaux','F'); |
|
|
} |
|
|
function setRegroupe(&$form,$maj){ |
|
|
parent::setRegroupe($form,$maj); |
|
|
|
|
|
$form->setRegroupe('batiment_nombre','D',$this->lang('description')); |
|
|
$form->setRegroupe('logement_nombre','G',''); |
|
|
$form->setRegroupe('hauteur','G',''); |
|
|
$form->setRegroupe('piece_nombre','G',''); |
|
|
$form->setRegroupe('shon','G',' SHON '); |
|
|
$form->setRegroupe('shon_calcul','G',''); |
|
|
$form->setRegroupe('shob','F',''); |
|
|
|
|
|
|
|
|
} |
|
21 |
|
|
22 |
|
|
23 |
}// fin de classe |
}// fin de classe |