1 |
vpihour |
1249 |
<?php |
2 |
|
|
//$Id$ |
3 |
|
|
//gen openMairie le 13/02/2013 14:41 |
4 |
|
|
|
5 |
|
|
require_once ("../gen/obj/cerfa.class.php"); |
6 |
|
|
|
7 |
|
|
class cerfa extends cerfa_gen { |
8 |
|
|
|
9 |
|
|
function cerfa($id,&$db,$debug) { |
10 |
|
|
$this->constructeur($id,$db,$debug); |
11 |
|
|
}// fin constructeur |
12 |
|
|
|
13 |
nhaye |
1258 |
|
14 |
|
|
function setType(&$form,$maj) { |
15 |
|
|
parent::setType($form,$maj); |
16 |
|
|
|
17 |
|
|
// Sais pas quoi faire de ce champ |
18 |
|
|
$form->setType('code_cnil', 'hidden'); |
19 |
|
|
|
20 |
vpihour |
1329 |
//Ajout des select sur les tableaux |
21 |
nhaye |
1258 |
if($maj == 0) { |
22 |
vpihour |
1329 |
|
23 |
nhaye |
1258 |
$form->setType('tab_surface', 'select'); |
24 |
vpihour |
1329 |
$form->setType('tab_tax_su_princ', 'select'); |
25 |
|
|
$form->setType('tab_tax_su_heber', 'select'); |
26 |
|
|
$form->setType('tab_tax_su_secon', 'select'); |
27 |
|
|
$form->setType('tab_tax_su_tot', 'select'); |
28 |
|
|
$form->setType('tab_tax_su_non_habit_surf', 'select'); |
29 |
|
|
$form->setType('tab_tax_am', 'select'); |
30 |
nhaye |
1258 |
}elseif($maj == 1) { |
31 |
vpihour |
1329 |
|
32 |
nhaye |
1258 |
$form->setType('tab_surface', 'select'); |
33 |
vpihour |
1329 |
$form->setType('tab_tax_su_princ', 'select'); |
34 |
|
|
$form->setType('tab_tax_su_heber', 'select'); |
35 |
|
|
$form->setType('tab_tax_su_secon', 'select'); |
36 |
|
|
$form->setType('tab_tax_su_tot', 'select'); |
37 |
|
|
$form->setType('tab_tax_su_non_habit_surf', 'select'); |
38 |
|
|
$form->setType('tab_tax_am', 'select'); |
39 |
nhaye |
1258 |
}elseif($maj == 2) { |
40 |
vpihour |
1329 |
|
41 |
nhaye |
1258 |
$form->setType('tab_surface', 'selecthiddenstatic'); |
42 |
vpihour |
1329 |
$form->setType('tab_tax_su_princ', 'selecthiddenstatic'); |
43 |
|
|
$form->setType('tab_tax_su_heber', 'selecthiddenstatic'); |
44 |
|
|
$form->setType('tab_tax_su_secon', 'selecthiddenstatic'); |
45 |
|
|
$form->setType('tab_tax_su_tot', 'selecthiddenstatic'); |
46 |
|
|
$form->setType('tab_tax_su_non_habit_surf', 'selecthiddenstatic'); |
47 |
|
|
$form->setType('tab_tax_am', 'selecthiddenstatic'); |
48 |
nhaye |
1258 |
}elseif($maj == 3) { |
49 |
vpihour |
1329 |
|
50 |
nhaye |
1258 |
$form->setType('tab_surface', 'selecthiddenstatic'); |
51 |
vpihour |
1329 |
$form->setType('tab_tax_su_princ', 'selecthiddenstatic'); |
52 |
|
|
$form->setType('tab_tax_su_heber', 'selecthiddenstatic'); |
53 |
|
|
$form->setType('tab_tax_su_secon', 'selecthiddenstatic'); |
54 |
|
|
$form->setType('tab_tax_su_tot', 'selecthiddenstatic'); |
55 |
|
|
$form->setType('tab_tax_su_non_habit_surf', 'selecthiddenstatic'); |
56 |
|
|
$form->setType('tab_tax_am', 'selecthiddenstatic'); |
57 |
nhaye |
1258 |
} |
58 |
|
|
} |
59 |
|
|
|
60 |
|
|
function setSelect(&$form, $maj,&$db,$debug) { |
61 |
|
|
parent::setSelect($form, $maj,$db,$debug); |
62 |
|
|
|
63 |
|
|
if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc.php")) |
64 |
|
|
include ("../sql/".$db->phptype."/".$this->table.".form.inc.php"); |
65 |
|
|
elseif(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc")) |
66 |
|
|
include ("../sql/".$db->phptype."/".$this->table.".form.inc"); |
67 |
|
|
|
68 |
|
|
// parametrage du tableau de surface |
69 |
|
|
$contenu=array(); |
70 |
|
|
$contenu[0]=array_keys($tab_surface); |
71 |
|
|
$contenu[1]=array_values($tab_surface); |
72 |
|
|
$form->setSelect("tab_surface",$contenu); |
73 |
|
|
|
74 |
nhaye |
1268 |
$contenu[0]=array_keys($tab_tax_su_princ); |
75 |
|
|
$contenu[1]=array_values($tab_tax_su_princ); |
76 |
|
|
$form->setSelect("tab_tax_su_princ",$contenu); |
77 |
|
|
|
78 |
|
|
$contenu[0]=array_keys($tab_tax_su_heber); |
79 |
|
|
$contenu[1]=array_values($tab_tax_su_heber); |
80 |
|
|
$form->setSelect("tab_tax_su_heber",$contenu); |
81 |
|
|
|
82 |
|
|
$contenu[0]=array_keys($tab_tax_su_secon); |
83 |
|
|
$contenu[1]=array_values($tab_tax_su_secon); |
84 |
|
|
$form->setSelect("tab_tax_su_secon",$contenu); |
85 |
|
|
|
86 |
|
|
$contenu[0]=array_keys($tab_tax_su_tot); |
87 |
|
|
$contenu[1]=array_values($tab_tax_su_tot); |
88 |
|
|
$form->setSelect("tab_tax_su_tot",$contenu); |
89 |
|
|
|
90 |
|
|
$contenu[0]=array_keys($tab_tax_su_non_habit_surf); |
91 |
|
|
$contenu[1]=array_values($tab_tax_su_non_habit_surf); |
92 |
|
|
$form->setSelect("tab_tax_su_non_habit_surf",$contenu); |
93 |
|
|
|
94 |
|
|
$contenu[0]=array_keys($tab_tax_am); |
95 |
|
|
$contenu[1]=array_values($tab_tax_am); |
96 |
|
|
$form->setSelect("tab_tax_am",$contenu); |
97 |
|
|
|
98 |
|
|
|
99 |
|
|
|
100 |
nhaye |
1258 |
} |
101 |
|
|
|
102 |
|
|
function setLayout(&$form, $maj) { |
103 |
|
|
|
104 |
|
|
/*Fieldset Parametrage du cerfa */ |
105 |
nhaye |
1268 |
$form->setBloc('cerfa','D',"","col_12"); |
106 |
|
|
$form->setFieldset('cerfa','D' |
107 |
nhaye |
1258 |
,_("Parametrage du cerfa")); |
108 |
|
|
|
109 |
|
|
|
110 |
nhaye |
1263 |
$form->setFieldset('om_validite_fin','F',''); |
111 |
|
|
$form->setBloc('om_validite_fin','F'); |
112 |
nhaye |
1258 |
|
113 |
nhaye |
1268 |
$form->setBloc('avap_co_elt_pro','D',"","col_12"); |
114 |
|
|
$form->setFieldset('avap_co_elt_pro','D' |
115 |
|
|
,_("Projet")); |
116 |
|
|
|
117 |
|
|
|
118 |
|
|
$form->setFieldset('avap_aut_auv_elec','F',''); |
119 |
|
|
$form->setBloc('avap_aut_auv_elec','F'); |
120 |
|
|
|
121 |
|
|
|
122 |
|
|
$form->setBloc('tr_total','D',"","col_12"); |
123 |
|
|
$form->setFieldset('tr_total','D' |
124 |
|
|
,_("Projet")); |
125 |
|
|
|
126 |
|
|
|
127 |
|
|
$form->setFieldset('tr_desc','F',''); |
128 |
|
|
$form->setBloc('tr_desc','F'); |
129 |
|
|
|
130 |
|
|
|
131 |
|
|
|
132 |
fmichon |
1316 |
/*Fieldset n°4 Projet d'amenagement */ |
133 |
nhaye |
1258 |
$form->setBloc('am_lotiss','D',"","col_12"); |
134 |
|
|
$form->setFieldset('am_lotiss','D' |
135 |
|
|
,_("Projet d'amenagement")); |
136 |
|
|
// bloc 4.1 |
137 |
|
|
$form->setBloc('am_lotiss','D',_("Nature des travaux, instalations |
138 |
fmichon |
1316 |
ou amenagements envisages"),"col_12"); |
139 |
nhaye |
1258 |
|
140 |
|
|
$form->setBloc('am_tranche_desc','F'); |
141 |
|
|
|
142 |
|
|
// bloc 4.2 |
143 |
|
|
$form->setBloc('am_lot_max_nb','D',_("Demande concernant un lotissement"),"col_12"); |
144 |
|
|
|
145 |
|
|
$form->setBloc('am_lot_vente_ant','F'); |
146 |
|
|
|
147 |
|
|
// bloc 4.3 |
148 |
|
|
$form->setBloc('am_empl_nb','D',_("Amenagement d'un camping ou |
149 |
fmichon |
1316 |
d'un terrain amenage en vue de l'hebergement |
150 |
nhaye |
1258 |
touristique"),"col_12"); |
151 |
|
|
|
152 |
|
|
$form->setBloc('am_exist_agrand','F'); |
153 |
|
|
|
154 |
|
|
$form->setFieldset('am_coupe_autr','F',''); |
155 |
|
|
|
156 |
|
|
$form->setBloc('am_coupe_autr','F'); |
157 |
|
|
|
158 |
|
|
/*Fieldset n°5 Projet de construction */ |
159 |
|
|
$form->setBloc('co_archi_recours','D',"","col_12"); |
160 |
|
|
$form->setFieldset('co_archi_recours','D' |
161 |
|
|
,_("Projet de construction")); |
162 |
|
|
// bloc 5.1 |
163 |
|
|
$form->setBloc('co_archi_recours','D',_("Architecte"),"col_12"); |
164 |
|
|
|
165 |
|
|
$form->setBloc('co_archi_recours','F'); |
166 |
|
|
|
167 |
|
|
// bloc 5.2 |
168 |
|
|
$form->setBloc('co_cstr_nouv','D',_("Nature du projet"),"col_12"); |
169 |
|
|
|
170 |
|
|
$form->setBloc('co_elec_tension','F'); |
171 |
|
|
|
172 |
|
|
// bloc 5.3 |
173 |
|
|
$form->setBloc('co_tot_log_nb','D',_("Informations complementaires"),"col_12"); |
174 |
|
|
|
175 |
|
|
$form->setBloc('co_trx_nivsup','F'); |
176 |
|
|
|
177 |
|
|
// bloc 5.4 |
178 |
|
|
$form->setBloc('co_demont_period','D',_("Construction periodiquement |
179 |
fmichon |
1316 |
demontee et re-installee"),"col_12"); |
180 |
nhaye |
1258 |
|
181 |
|
|
$form->setBloc('co_demont_period','F'); |
182 |
|
|
|
183 |
|
|
// bloc 5.5 |
184 |
|
|
$form->setBloc('tab_surface','D',_("Destination des constructions |
185 |
|
|
et tableau des surfaces"),"col_12"); |
186 |
|
|
|
187 |
|
|
$form->setBloc('tab_surface','F'); |
188 |
|
|
|
189 |
|
|
// bloc 5.6 |
190 |
|
|
$form->setBloc('co_sp_transport','D',_("Destination des constructions |
191 |
|
|
futures en cas de realisation au benefice d'un |
192 |
|
|
service public ou d'interet collectif"),"col_12"); |
193 |
|
|
|
194 |
|
|
$form->setBloc('co_sp_culture','F'); |
195 |
|
|
|
196 |
|
|
// bloc 5.7 |
197 |
|
|
$form->setBloc('co_statio_avt_nb','D',_("Stationnement"),"col_12"); |
198 |
|
|
|
199 |
|
|
$form->setBloc('co_statio_comm_cin_surf','F'); |
200 |
|
|
|
201 |
|
|
$form->setFieldset('co_statio_apr_surf','F',''); |
202 |
|
|
|
203 |
|
|
$form->setBloc('co_statio_apr_surf','F'); |
204 |
|
|
|
205 |
|
|
|
206 |
|
|
/*Fieldset n°6 Projet necessitant demolitions */ |
207 |
|
|
$form->setBloc('dm_constr_dates','D',"","col_12"); |
208 |
|
|
$form->setFieldset('dm_constr_dates','D' |
209 |
|
|
,_("Projet necessitant demolitions")); |
210 |
|
|
|
211 |
|
|
$form->setBloc('dm_constr_dates','D',"","col_12"); |
212 |
|
|
|
213 |
|
|
$form->setBloc('dm_tot_log_nb','F'); |
214 |
|
|
|
215 |
|
|
$form->setFieldset('dm_tot_log_nb','F',''); |
216 |
|
|
|
217 |
|
|
$form->setBloc('dm_tot_log_nb','F'); |
218 |
nhaye |
1268 |
|
219 |
|
|
$form->setBloc('tax_surf_tot','D',_("Declaration des elements necessaires au calcul des impositions"),"col_12"); |
220 |
|
|
$form->setBloc('tax_surf_tot','D',"","col_12"); |
221 |
|
|
$form->setFieldset('tax_surf_tot','D' |
222 |
|
|
,_("Renseignement")); |
223 |
|
|
|
224 |
|
|
$form->setBloc('tax_surf_tot','D',"","col_12"); |
225 |
|
|
|
226 |
|
|
$form->setBloc('tax_dest_loc_tr','F'); |
227 |
|
|
|
228 |
|
|
$form->setBloc('tab_tax_su_princ','D',_("Locaux a usage d'habitation principale"),"col_12"); |
229 |
|
|
$form->setBloc('tab_tax_su_princ','F'); |
230 |
|
|
|
231 |
|
|
$form->setBloc('tab_tax_su_heber','D',_("Locaux a usage d'hebergement"),"col_12"); |
232 |
|
|
$form->setBloc('tab_tax_su_heber','F'); |
233 |
|
|
|
234 |
|
|
$form->setBloc('tab_tax_su_secon','D',_("Locaux a usage d'habitation secondaire"),"col_12"); |
235 |
|
|
$form->setBloc('tab_tax_su_secon','F'); |
236 |
|
|
|
237 |
|
|
$form->setBloc('tab_tax_su_tot','D',_("Total de logement"),"col_12"); |
238 |
|
|
$form->setBloc('tab_tax_su_tot','F'); |
239 |
|
|
|
240 |
|
|
$form->setBloc('tax_ext_pret','D',"","col_12"); |
241 |
|
|
$form->setBloc('tax_log_exist_nb','F'); |
242 |
|
|
|
243 |
|
|
$form->setBloc('tax_comm_nb','D',_("Creation ou extension de locaux non destines a l'habitation"),"col_12"); |
244 |
|
|
$form->setBloc('tab_tax_su_non_habit_surf','F'); |
245 |
|
|
|
246 |
|
|
$form->setBloc('tab_tax_am','D',_("Autres elements soumis a la taxe d'amenagement"),"col_12"); |
247 |
|
|
$form->setBloc('tab_tax_am','F'); |
248 |
|
|
|
249 |
|
|
$form->setBloc('tax_trx_presc_ppr','D',_("Cas particuliers"),"col_12"); |
250 |
|
|
$form->setBloc('tax_monu_hist','F'); |
251 |
|
|
|
252 |
|
|
$form->setFieldset('tax_monu_hist','F',''); |
253 |
|
|
|
254 |
|
|
$form->setBloc('tax_monu_hist','F'); |
255 |
|
|
|
256 |
|
|
$form->setBloc('vsd_surf_planch_smd','D',"","col_12"); |
257 |
|
|
$form->setFieldset('vsd_surf_planch_smd','D' |
258 |
|
|
,_("Autres renseignements")); |
259 |
|
|
|
260 |
|
|
$form->setBloc('vsd_surf_planch_smd','D',_("Versement pour sous-densite (VSD)"),"col_12"); |
261 |
|
|
$form->setBloc('vsd_rescr_fisc','F'); |
262 |
|
|
|
263 |
|
|
$form->setBloc('pld_val_terr','D',_("Plafond legal de densite (PLD)"),"col_12"); |
264 |
|
|
$form->setBloc('pld_const_exist_dem_surf','F'); |
265 |
|
|
|
266 |
|
|
$form->setFieldset('pld_const_exist_dem_surf','F',''); |
267 |
|
|
|
268 |
|
|
$form->setBloc('pld_const_exist_dem_surf','F'); |
269 |
|
|
|
270 |
|
|
$form->setBloc('pld_const_exist_dem_surf','F'); |
271 |
nhaye |
1258 |
} |
272 |
|
|
|
273 |
vpihour |
1249 |
}// fin classe |
274 |
|
|
?> |