1 |
fraynaud |
11 |
<?php |
2 |
|
|
/* $Id: PC.class.php,v 1.19 2010-08-22 21:40:11 fraynaud Exp $ |
3 |
|
|
*/ |
4 |
|
|
require_once ("dossier.class.php"); |
5 |
|
|
|
6 |
|
|
class PC extends dossier{ |
7 |
fraynaud |
20 |
|
8 |
|
|
var $nature="PC"; |
9 |
|
|
// variables affichages de regroupe |
10 |
|
|
var $aff_depot = "collapsible"; |
11 |
|
|
var $aff_travaux = "collapsible"; |
12 |
|
|
var $aff_instruction = "collapsible"; |
13 |
|
|
var $aff_demandeur = "startClosed"; |
14 |
|
|
var $aff_delegataire = "startClosed"; |
15 |
|
|
var $aff_terrain = "startClosed"; |
16 |
|
|
var $aff_localisation = "collapsible"; |
17 |
|
|
var $aff_description = "startClosed"; |
18 |
fraynaud |
142 |
var $aff_amenagement = "collapsible"; |
19 |
fraynaud |
20 |
|
20 |
|
|
// specific objet_dossier |
21 |
|
|
|
22 |
|
|
|
23 |
fraynaud |
12 |
function PC($id,&$db,$DEBUG) { |
24 |
|
|
$this->constructeur($id,$db,$DEBUG); |
25 |
|
|
} // fin constructeur |
26 |
fraynaud |
11 |
|
27 |
fraynaud |
12 |
function setvalF($val){ |
28 |
|
|
parent::setvalF($val); |
29 |
|
|
// compatibilite pgsql |
30 |
|
|
} |
31 |
fraynaud |
11 |
|
32 |
fraynaud |
12 |
function setType(&$form,$maj) { |
33 |
|
|
parent::setType($form,$maj); |
34 |
|
|
if($maj<2){ |
35 |
|
|
$form->setType('objet_dossier','select'); |
36 |
|
|
$form->setType('amenagement','select'); |
37 |
fraynaud |
142 |
//$form->setType('parcelle_lot_lotissement','comboD'); |
38 |
fraynaud |
144 |
$form->setType('parcelle_lot','text'); |
39 |
fraynaud |
142 |
$form->setType('parcelle_lot_lotissement','comboG'); |
40 |
fraynaud |
12 |
} |
41 |
|
|
} |
42 |
fraynaud |
11 |
|
43 |
|
|
|
44 |
fraynaud |
12 |
function setSelect(&$form, $maj,$db,$debug) { |
45 |
|
|
parent::setSelect($form, $maj,$db,$debug); |
46 |
|
|
if($maj<2){ |
47 |
|
|
$contenu=array(); |
48 |
|
|
$contenu[0]=array('A','B'); |
49 |
|
|
$contenu[1]=array(_('maison_individuelle'), |
50 |
|
|
_('autre_construction')); |
51 |
|
|
$form->setSelect("objet_dossier",$contenu); |
52 |
|
|
// amenagement |
53 |
fraynaud |
20 |
if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc")) |
54 |
|
|
include ("../sql/".$db->phptype."/".$this->table.".form.inc"); |
55 |
fraynaud |
12 |
$contenu=array(); |
56 |
|
|
$res = $db->query($sql_amenagement); |
57 |
fraynaud |
20 |
if (database::isError($res)) |
58 |
|
|
die($res->getMessage()); |
59 |
|
|
if ($debug == 1) |
60 |
|
|
echo " la requete ".$sql_amenagement." est executee<br>"; |
61 |
|
|
$contenu[0][0]=""; |
62 |
|
|
$contenu[1][0]=_('choisir')." "._('amenagement'); |
63 |
|
|
$k=1; |
64 |
|
|
while ($row=& $res->fetchRow()){ |
65 |
|
|
$contenu[0][$k]=$row[0]; |
66 |
|
|
$contenu[1][$k]=$row[1]; |
67 |
|
|
$k++; |
68 |
|
|
} |
69 |
fraynaud |
12 |
$form->setSelect("amenagement",$contenu); |
70 |
|
|
} |
71 |
|
|
} |
72 |
fraynaud |
11 |
|
73 |
fraynaud |
20 |
|
74 |
fraynaud |
12 |
function setGroupe(&$form,$maj){ |
75 |
fraynaud |
20 |
parent::setGroupe($form,$maj); |
76 |
fraynaud |
12 |
$form->setGroupe('objet_dossier','D'); |
77 |
|
|
$form->setGroupe('architecte','G'); |
78 |
|
|
$form->setGroupe('architecte_nom','G'); |
79 |
|
|
$form->setGroupe('travaux','F'); |
80 |
|
|
} |
81 |
fraynaud |
11 |
|
82 |
fraynaud |
12 |
function setRegroupe(&$form,$maj){ |
83 |
|
|
parent::setRegroupe($form,$maj); |
84 |
fraynaud |
196 |
$form->setRegroupe('objet_dossier','D',_('Architecte')." / "._("Travaux"), "collapsible"); |
85 |
fraynaud |
12 |
$form->setRegroupe('architecte','G',''); |
86 |
|
|
$form->setRegroupe('architecte_nom','G',''); |
87 |
|
|
$form->setRegroupe('travaux','F',''); |
88 |
|
|
} |
89 |
fraynaud |
11 |
|
90 |
|
|
}// fin de classe |
91 |
|
|
?> |