1 |
<?php |
<?php |
2 |
//$Id$ |
//$Id$ |
3 |
//gen openMairie le 26/09/2012 11:38 |
//gen openMairie le 10/10/2012 16:35 |
4 |
|
|
5 |
require_once ("../obj/om_dbform.class.php"); |
require_once ("../obj/om_dbform.class.php"); |
6 |
|
|
9 |
var $clePrimaire="dossier"; |
var $clePrimaire="dossier"; |
10 |
var $typeCle="A"; |
var $typeCle="A"; |
11 |
var $required_field=array( |
var $required_field=array( |
12 |
|
"date_depot", |
13 |
"dossier", |
"dossier", |
14 |
"date_depot" |
"nature" |
15 |
); |
); |
16 |
var $retourformulaire; |
var $retourformulaire; |
17 |
|
|
18 |
function setvalF($val) { |
function setvalF($val) { |
19 |
//affectation valeur formulaire |
//affectation valeur formulaire |
20 |
$this->valF['dossier'] = $val['dossier']; |
$this->valF['dossier'] = $val['dossier']; |
21 |
if($val['nature'] == "") { |
$this->valF['nature'] = $val['nature']; |
22 |
$this->valF['nature'] = NULL; |
if ($val['annee'] == "") { |
23 |
|
$this->valF['annee'] = ""; // -> default |
24 |
} else { |
} else { |
25 |
$this->valF['nature'] = $val['nature']; |
$this->valF['annee'] = $val['annee']; |
26 |
} |
} |
27 |
$this->valF['annee'] = $val['annee']; |
if ($val['etat'] == "") { |
|
if($val['etat'] == "") { |
|
28 |
$this->valF['etat'] = NULL; |
$this->valF['etat'] = NULL; |
29 |
} else { |
} else { |
30 |
$this->valF['etat'] = $val['etat']; |
$this->valF['etat'] = $val['etat']; |
31 |
} |
} |
32 |
$this->valF['types'] = $val['types']; |
if ($val['types'] == "") { |
33 |
$this->valF['objet_dossier'] = $val['objet_dossier']; |
$this->valF['types'] = ""; // -> default |
34 |
if(!is_numeric($val['instructeur'])) { |
} else { |
35 |
$this->valF['instructeur']= null; |
$this->valF['types'] = $val['types']; |
36 |
|
} |
37 |
|
if ($val['objet_dossier'] == "") { |
38 |
|
$this->valF['objet_dossier'] = ""; // -> default |
39 |
|
} else { |
40 |
|
$this->valF['objet_dossier'] = $val['objet_dossier']; |
41 |
|
} |
42 |
|
if (!is_numeric($val['instructeur'])) { |
43 |
|
$this->valF['instructeur'] = NULL; |
44 |
} else { |
} else { |
45 |
$this->valF['instructeur'] = $val['instructeur']; |
$this->valF['instructeur'] = $val['instructeur']; |
46 |
} |
} |
67 |
} else { |
} else { |
68 |
$this->valF['date_notification_delai'] = NULL; |
$this->valF['date_notification_delai'] = NULL; |
69 |
} |
} |
70 |
if(!is_numeric($val['delai'])) { |
if (!is_numeric($val['delai'])) { |
71 |
$this->valF['delai'] = ""; |
$this->valF['delai'] = 0; // -> default |
72 |
} else { |
} else { |
73 |
$this->valF['delai'] = $val['delai']; |
$this->valF['delai'] = $val['delai']; |
74 |
} |
} |
77 |
} else { |
} else { |
78 |
$this->valF['date_limite'] = NULL; |
$this->valF['date_limite'] = NULL; |
79 |
} |
} |
80 |
$this->valF['accord_tacite'] = $val['accord_tacite']; |
if ($val['accord_tacite'] == "") { |
81 |
|
$this->valF['accord_tacite'] = ""; // -> default |
82 |
|
} else { |
83 |
|
$this->valF['accord_tacite'] = $val['accord_tacite']; |
84 |
|
} |
85 |
if ($val['date_decision'] != "") { |
if ($val['date_decision'] != "") { |
86 |
$this->valF['date_decision'] = $this->dateDB($val['date_decision']); |
$this->valF['date_decision'] = $this->dateDB($val['date_decision']); |
87 |
} else { |
} else { |
88 |
$this->valF['date_decision'] = NULL; |
$this->valF['date_decision'] = NULL; |
89 |
} |
} |
|
if($val['avis'] == "") { |
|
|
$this->valF['avis'] = NULL; |
|
|
} else { |
|
|
$this->valF['avis'] = $val['avis']; |
|
|
} |
|
90 |
if ($val['date_validite'] != "") { |
if ($val['date_validite'] != "") { |
91 |
$this->valF['date_validite'] = $this->dateDB($val['date_validite']); |
$this->valF['date_validite'] = $this->dateDB($val['date_validite']); |
92 |
} else { |
} else { |
107 |
} else { |
} else { |
108 |
$this->valF['date_conformite'] = NULL; |
$this->valF['date_conformite'] = NULL; |
109 |
} |
} |
110 |
if($val['demandeur_civilite'] == "") { |
if ($val['demandeur_civilite'] == "") { |
111 |
$this->valF['demandeur_civilite'] = NULL; |
$this->valF['demandeur_civilite'] = NULL; |
112 |
} else { |
} else { |
113 |
$this->valF['demandeur_civilite'] = $val['demandeur_civilite']; |
$this->valF['demandeur_civilite'] = $val['demandeur_civilite']; |
114 |
} |
} |
115 |
$this->valF['demandeur_nom'] = $val['demandeur_nom']; |
if ($val['demandeur_nom'] == "") { |
116 |
$this->valF['demandeur_societe'] = $val['demandeur_societe']; |
$this->valF['demandeur_nom'] = ""; // -> default |
117 |
$this->valF['demandeur_adresse'] = $val['demandeur_adresse']; |
} else { |
118 |
$this->valF['demandeur_adresse_complement'] = $val['demandeur_adresse_complement']; |
$this->valF['demandeur_nom'] = $val['demandeur_nom']; |
119 |
$this->valF['demandeur_cp'] = $val['demandeur_cp']; |
} |
120 |
$this->valF['demandeur_ville'] = $val['demandeur_ville']; |
if ($val['demandeur_societe'] == "") { |
121 |
$this->valF['demandeur_pays'] = $val['demandeur_pays']; |
$this->valF['demandeur_societe'] = ""; // -> default |
122 |
$this->valF['demandeur_telephone'] = $val['demandeur_telephone']; |
} else { |
123 |
$this->valF['demandeur_email'] = $val['demandeur_email']; |
$this->valF['demandeur_societe'] = $val['demandeur_societe']; |
124 |
if(!is_numeric($val['demandeur_categorie'])) { |
} |
125 |
$this->valF['demandeur_categorie']= null; |
if ($val['demandeur_adresse'] == "") { |
126 |
|
$this->valF['demandeur_adresse'] = ""; // -> default |
127 |
|
} else { |
128 |
|
$this->valF['demandeur_adresse'] = $val['demandeur_adresse']; |
129 |
|
} |
130 |
|
if ($val['demandeur_adresse_complement'] == "") { |
131 |
|
$this->valF['demandeur_adresse_complement'] = ""; // -> default |
132 |
|
} else { |
133 |
|
$this->valF['demandeur_adresse_complement'] = $val['demandeur_adresse_complement']; |
134 |
|
} |
135 |
|
if ($val['demandeur_cp'] == "") { |
136 |
|
$this->valF['demandeur_cp'] = ""; // -> default |
137 |
|
} else { |
138 |
|
$this->valF['demandeur_cp'] = $val['demandeur_cp']; |
139 |
|
} |
140 |
|
if ($val['demandeur_ville'] == "") { |
141 |
|
$this->valF['demandeur_ville'] = ""; // -> default |
142 |
|
} else { |
143 |
|
$this->valF['demandeur_ville'] = $val['demandeur_ville']; |
144 |
|
} |
145 |
|
if ($val['demandeur_pays'] == "") { |
146 |
|
$this->valF['demandeur_pays'] = ""; // -> default |
147 |
|
} else { |
148 |
|
$this->valF['demandeur_pays'] = $val['demandeur_pays']; |
149 |
|
} |
150 |
|
if ($val['demandeur_telephone'] == "") { |
151 |
|
$this->valF['demandeur_telephone'] = ""; // -> default |
152 |
|
} else { |
153 |
|
$this->valF['demandeur_telephone'] = $val['demandeur_telephone']; |
154 |
|
} |
155 |
|
if ($val['demandeur_email'] == "") { |
156 |
|
$this->valF['demandeur_email'] = ""; // -> default |
157 |
|
} else { |
158 |
|
$this->valF['demandeur_email'] = $val['demandeur_email']; |
159 |
|
} |
160 |
|
if (!is_numeric($val['demandeur_categorie'])) { |
161 |
|
$this->valF['demandeur_categorie'] = NULL; |
162 |
} else { |
} else { |
163 |
$this->valF['demandeur_categorie'] = $val['demandeur_categorie']; |
$this->valF['demandeur_categorie'] = $val['demandeur_categorie']; |
164 |
} |
} |
165 |
$this->valF['delegataire'] = $val['delegataire']; |
if ($val['delegataire'] == "") { |
166 |
if($val['delegataire_civilite'] == "") { |
$this->valF['delegataire'] = ""; // -> default |
167 |
|
} else { |
168 |
|
$this->valF['delegataire'] = $val['delegataire']; |
169 |
|
} |
170 |
|
if ($val['delegataire_civilite'] == "") { |
171 |
$this->valF['delegataire_civilite'] = NULL; |
$this->valF['delegataire_civilite'] = NULL; |
172 |
} else { |
} else { |
173 |
$this->valF['delegataire_civilite'] = $val['delegataire_civilite']; |
$this->valF['delegataire_civilite'] = $val['delegataire_civilite']; |
174 |
} |
} |
175 |
$this->valF['delegataire_nom'] = $val['delegataire_nom']; |
if ($val['delegataire_nom'] == "") { |
176 |
$this->valF['delegataire_societe'] = $val['delegataire_societe']; |
$this->valF['delegataire_nom'] = ""; // -> default |
177 |
$this->valF['delegataire_adresse'] = $val['delegataire_adresse']; |
} else { |
178 |
$this->valF['delegataire_adresse_complement'] = $val['delegataire_adresse_complement']; |
$this->valF['delegataire_nom'] = $val['delegataire_nom']; |
179 |
$this->valF['delegataire_cp'] = $val['delegataire_cp']; |
} |
180 |
$this->valF['delegataire_ville'] = $val['delegataire_ville']; |
if ($val['delegataire_societe'] == "") { |
181 |
$this->valF['delegataire_pays'] = $val['delegataire_pays']; |
$this->valF['delegataire_societe'] = ""; // -> default |
182 |
$this->valF['delegataire_telephone'] = $val['delegataire_telephone']; |
} else { |
183 |
$this->valF['delegataire_email'] = $val['delegataire_email']; |
$this->valF['delegataire_societe'] = $val['delegataire_societe']; |
184 |
$this->valF['terrain_numero'] = $val['terrain_numero']; |
} |
185 |
$this->valF['terrain_numero_complement'] = $val['terrain_numero_complement']; |
if ($val['delegataire_adresse'] == "") { |
186 |
$this->valF['terrain_adresse'] = $val['terrain_adresse']; |
$this->valF['delegataire_adresse'] = ""; // -> default |
187 |
$this->valF['terrain_adresse_complement'] = $val['terrain_adresse_complement']; |
} else { |
188 |
$this->valF['terrain_cp'] = $val['terrain_cp']; |
$this->valF['delegataire_adresse'] = $val['delegataire_adresse']; |
189 |
$this->valF['terrain_ville'] = $val['terrain_ville']; |
} |
190 |
if(!is_numeric($val['architecte'])) { |
if ($val['delegataire_adresse_complement'] == "") { |
191 |
$this->valF['architecte']= null; |
$this->valF['delegataire_adresse_complement'] = ""; // -> default |
192 |
|
} else { |
193 |
|
$this->valF['delegataire_adresse_complement'] = $val['delegataire_adresse_complement']; |
194 |
|
} |
195 |
|
if ($val['delegataire_cp'] == "") { |
196 |
|
$this->valF['delegataire_cp'] = ""; // -> default |
197 |
|
} else { |
198 |
|
$this->valF['delegataire_cp'] = $val['delegataire_cp']; |
199 |
|
} |
200 |
|
if ($val['delegataire_ville'] == "") { |
201 |
|
$this->valF['delegataire_ville'] = ""; // -> default |
202 |
|
} else { |
203 |
|
$this->valF['delegataire_ville'] = $val['delegataire_ville']; |
204 |
|
} |
205 |
|
if ($val['delegataire_pays'] == "") { |
206 |
|
$this->valF['delegataire_pays'] = ""; // -> default |
207 |
|
} else { |
208 |
|
$this->valF['delegataire_pays'] = $val['delegataire_pays']; |
209 |
|
} |
210 |
|
if ($val['delegataire_telephone'] == "") { |
211 |
|
$this->valF['delegataire_telephone'] = ""; // -> default |
212 |
|
} else { |
213 |
|
$this->valF['delegataire_telephone'] = $val['delegataire_telephone']; |
214 |
|
} |
215 |
|
if ($val['delegataire_email'] == "") { |
216 |
|
$this->valF['delegataire_email'] = ""; // -> default |
217 |
|
} else { |
218 |
|
$this->valF['delegataire_email'] = $val['delegataire_email']; |
219 |
|
} |
220 |
|
if ($val['terrain_numero'] == "") { |
221 |
|
$this->valF['terrain_numero'] = ""; // -> default |
222 |
|
} else { |
223 |
|
$this->valF['terrain_numero'] = $val['terrain_numero']; |
224 |
|
} |
225 |
|
if ($val['terrain_numero_complement'] == "") { |
226 |
|
$this->valF['terrain_numero_complement'] = ""; // -> default |
227 |
|
} else { |
228 |
|
$this->valF['terrain_numero_complement'] = $val['terrain_numero_complement']; |
229 |
|
} |
230 |
|
if ($val['terrain_adresse'] == "") { |
231 |
|
$this->valF['terrain_adresse'] = ""; // -> default |
232 |
|
} else { |
233 |
|
$this->valF['terrain_adresse'] = $val['terrain_adresse']; |
234 |
|
} |
235 |
|
if ($val['terrain_adresse_complement'] == "") { |
236 |
|
$this->valF['terrain_adresse_complement'] = ""; // -> default |
237 |
|
} else { |
238 |
|
$this->valF['terrain_adresse_complement'] = $val['terrain_adresse_complement']; |
239 |
|
} |
240 |
|
if ($val['terrain_cp'] == "") { |
241 |
|
$this->valF['terrain_cp'] = ""; // -> default |
242 |
|
} else { |
243 |
|
$this->valF['terrain_cp'] = $val['terrain_cp']; |
244 |
|
} |
245 |
|
if ($val['terrain_ville'] == "") { |
246 |
|
$this->valF['terrain_ville'] = ""; // -> default |
247 |
|
} else { |
248 |
|
$this->valF['terrain_ville'] = $val['terrain_ville']; |
249 |
|
} |
250 |
|
if (!is_numeric($val['architecte'])) { |
251 |
|
$this->valF['architecte'] = NULL; |
252 |
} else { |
} else { |
253 |
$this->valF['architecte'] = $val['architecte']; |
$this->valF['architecte'] = $val['architecte']; |
254 |
} |
} |
255 |
if(!is_numeric($val['terrain_surface'])) { |
if (!is_numeric($val['terrain_surface'])) { |
256 |
$this->valF['terrain_surface']= null; |
$this->valF['terrain_surface'] = NULL; |
257 |
} else { |
} else { |
258 |
$this->valF['terrain_surface'] = $val['terrain_surface']; |
$this->valF['terrain_surface'] = $val['terrain_surface']; |
259 |
} |
} |
260 |
if(!is_numeric($val['terrain_surface_calcul'])) { |
if (!is_numeric($val['terrain_surface_calcul'])) { |
261 |
$this->valF['terrain_surface_calcul']= null; |
$this->valF['terrain_surface_calcul'] = NULL; |
262 |
} else { |
} else { |
263 |
$this->valF['terrain_surface_calcul'] = $val['terrain_surface_calcul']; |
$this->valF['terrain_surface_calcul'] = $val['terrain_surface_calcul']; |
264 |
} |
} |
265 |
if($val['rivoli'] == "") { |
if ($val['rivoli'] == "") { |
266 |
$this->valF['rivoli'] = NULL; |
$this->valF['rivoli'] = NULL; |
267 |
} else { |
} else { |
268 |
$this->valF['rivoli'] = $val['rivoli']; |
$this->valF['rivoli'] = $val['rivoli']; |
269 |
} |
} |
270 |
if(!is_numeric($val['travaux'])) { |
if (!is_numeric($val['travaux'])) { |
271 |
$this->valF['travaux']= null; |
$this->valF['travaux'] = NULL; |
272 |
} else { |
} else { |
273 |
$this->valF['travaux'] = $val['travaux']; |
$this->valF['travaux'] = $val['travaux']; |
274 |
} |
} |
275 |
$this->valF['travaux_complement'] = $val['travaux_complement']; |
if ($val['travaux_complement'] == "") { |
276 |
if($val['parcelle'] == "") { |
$this->valF['travaux_complement'] = NULL; |
277 |
|
} else { |
278 |
|
$this->valF['travaux_complement'] = $val['travaux_complement']; |
279 |
|
} |
280 |
|
if ($val['parcelle'] == "") { |
281 |
$this->valF['parcelle'] = NULL; |
$this->valF['parcelle'] = NULL; |
282 |
} else { |
} else { |
283 |
$this->valF['parcelle'] = $val['parcelle']; |
$this->valF['parcelle'] = $val['parcelle']; |
284 |
} |
} |
285 |
if($val['pos'] == "") { |
if ($val['pos'] == "") { |
286 |
$this->valF['pos'] = NULL; |
$this->valF['pos'] = NULL; |
287 |
} else { |
} else { |
288 |
$this->valF['pos'] = $val['pos']; |
$this->valF['pos'] = $val['pos']; |
289 |
} |
} |
290 |
$this->valF['sig'] = $val['sig']; |
if ($val['sig'] == "") { |
291 |
if(!is_numeric($val['batiment_nombre'])) { |
$this->valF['sig'] = ""; // -> default |
292 |
$this->valF['batiment_nombre']= null; |
} else { |
293 |
|
$this->valF['sig'] = $val['sig']; |
294 |
|
} |
295 |
|
if (!is_numeric($val['batiment_nombre'])) { |
296 |
|
$this->valF['batiment_nombre'] = NULL; |
297 |
} else { |
} else { |
298 |
$this->valF['batiment_nombre'] = $val['batiment_nombre']; |
$this->valF['batiment_nombre'] = $val['batiment_nombre']; |
299 |
} |
} |
300 |
if(!is_numeric($val['logement_nombre'])) { |
if (!is_numeric($val['logement_nombre'])) { |
301 |
$this->valF['logement_nombre']= null; |
$this->valF['logement_nombre'] = NULL; |
302 |
} else { |
} else { |
303 |
$this->valF['logement_nombre'] = $val['logement_nombre']; |
$this->valF['logement_nombre'] = $val['logement_nombre']; |
304 |
} |
} |
305 |
if(!is_numeric($val['shon'])) { |
if (!is_numeric($val['shon'])) { |
306 |
$this->valF['shon']= null; |
$this->valF['shon'] = NULL; |
307 |
} else { |
} else { |
308 |
$this->valF['shon'] = $val['shon']; |
$this->valF['shon'] = $val['shon']; |
309 |
} |
} |
310 |
if(!is_numeric($val['shon_calcul'])) { |
if (!is_numeric($val['shon_calcul'])) { |
311 |
$this->valF['shon_calcul']= null; |
$this->valF['shon_calcul'] = NULL; |
312 |
} else { |
} else { |
313 |
$this->valF['shon_calcul'] = $val['shon_calcul']; |
$this->valF['shon_calcul'] = $val['shon_calcul']; |
314 |
} |
} |
315 |
if(!is_numeric($val['shob'])) { |
if (!is_numeric($val['shob'])) { |
316 |
$this->valF['shob']= null; |
$this->valF['shob'] = NULL; |
317 |
} else { |
} else { |
318 |
$this->valF['shob'] = $val['shob']; |
$this->valF['shob'] = $val['shob']; |
319 |
} |
} |
320 |
if(!is_numeric($val['lot'])) { |
if (!is_numeric($val['lot'])) { |
321 |
$this->valF['lot']= null; |
$this->valF['lot'] = NULL; |
322 |
} else { |
} else { |
323 |
$this->valF['lot'] = $val['lot']; |
$this->valF['lot'] = $val['lot']; |
324 |
} |
} |
325 |
if(!is_numeric($val['hauteur'])) { |
if (!is_numeric($val['hauteur'])) { |
326 |
$this->valF['hauteur']= null; |
$this->valF['hauteur'] = NULL; |
327 |
} else { |
} else { |
328 |
$this->valF['hauteur'] = $val['hauteur']; |
$this->valF['hauteur'] = $val['hauteur']; |
329 |
} |
} |
330 |
if(!is_numeric($val['piece_nombre'])) { |
if (!is_numeric($val['piece_nombre'])) { |
331 |
$this->valF['piece_nombre']= null; |
$this->valF['piece_nombre'] = NULL; |
332 |
} else { |
} else { |
333 |
$this->valF['piece_nombre'] = $val['piece_nombre']; |
$this->valF['piece_nombre'] = $val['piece_nombre']; |
334 |
} |
} |
335 |
$this->valF['amenagement'] = $val['amenagement']; |
if ($val['amenagement'] == "") { |
336 |
if(!is_numeric($val['parcelle_lot'])) { |
$this->valF['amenagement'] = ""; // -> default |
337 |
$this->valF['parcelle_lot']= null; |
} else { |
338 |
|
$this->valF['amenagement'] = $val['amenagement']; |
339 |
|
} |
340 |
|
if (!is_numeric($val['parcelle_lot'])) { |
341 |
|
$this->valF['parcelle_lot'] = NULL; |
342 |
} else { |
} else { |
343 |
$this->valF['parcelle_lot'] = $val['parcelle_lot']; |
$this->valF['parcelle_lot'] = $val['parcelle_lot']; |
344 |
} |
} |
345 |
$this->valF['parcelle_lot_lotissement'] = $val['parcelle_lot_lotissement']; |
if ($val['parcelle_lot_lotissement'] == "") { |
346 |
$this->valF['description'] = $val['description']; |
$this->valF['parcelle_lot_lotissement'] = ""; // -> default |
347 |
$this->valF['temp1'] = $val['temp1']; |
} else { |
348 |
$this->valF['temp2'] = $val['temp2']; |
$this->valF['parcelle_lot_lotissement'] = $val['parcelle_lot_lotissement']; |
349 |
$this->valF['temp3'] = $val['temp3']; |
} |
350 |
$this->valF['temp4'] = $val['temp4']; |
$this->valF['description'] = $val['description']; |
351 |
$this->valF['temp5'] = $val['temp5']; |
if ($val['temp1'] == "") { |
352 |
$this->valF['servitude'] = $val['servitude']; |
$this->valF['temp1'] = ""; // -> default |
353 |
$this->valF['geom'] = $val['geom']; |
} else { |
354 |
$this->valF['geom1'] = $val['geom1']; |
$this->valF['temp1'] = $val['temp1']; |
355 |
|
} |
356 |
|
if ($val['temp2'] == "") { |
357 |
|
$this->valF['temp2'] = ""; // -> default |
358 |
|
} else { |
359 |
|
$this->valF['temp2'] = $val['temp2']; |
360 |
|
} |
361 |
|
if ($val['temp3'] == "") { |
362 |
|
$this->valF['temp3'] = ""; // -> default |
363 |
|
} else { |
364 |
|
$this->valF['temp3'] = $val['temp3']; |
365 |
|
} |
366 |
|
if ($val['temp4'] == "") { |
367 |
|
$this->valF['temp4'] = ""; // -> default |
368 |
|
} else { |
369 |
|
$this->valF['temp4'] = $val['temp4']; |
370 |
|
} |
371 |
|
if ($val['temp5'] == "") { |
372 |
|
$this->valF['temp5'] = ""; // -> default |
373 |
|
} else { |
374 |
|
$this->valF['temp5'] = $val['temp5']; |
375 |
|
} |
376 |
|
$this->valF['servitude'] = $val['servitude']; |
377 |
|
if ($val['geom'] == "") { |
378 |
|
unset($this->valF['geom']); |
379 |
|
} else { |
380 |
|
$this->valF['geom'] = $val['geom']; |
381 |
|
} |
382 |
|
if ($val['geom1'] == "") { |
383 |
|
unset($this->valF['geom1']); |
384 |
|
} else { |
385 |
|
$this->valF['geom1'] = $val['geom1']; |
386 |
|
} |
387 |
|
if (!is_numeric($val['avis_decision'])) { |
388 |
|
$this->valF['avis_decision'] = NULL; |
389 |
|
} else { |
390 |
|
$this->valF['avis_decision'] = $val['avis_decision']; |
391 |
|
} |
392 |
} |
} |
393 |
|
|
394 |
//========================== |
//========================== |
453 |
$form->setType('date_decision','date'); |
$form->setType('date_decision','date'); |
454 |
else |
else |
455 |
$form->setType('date_decision','date2'); |
$form->setType('date_decision','date2'); |
|
|
|
|
if($this->retourformulaire=='avis' |
|
|
and $form->val['avis'] == $this->getParameter('idxformulaire')) { |
|
|
$form->setType('avis','selecthiddenstatic'); |
|
|
} else { |
|
|
$form->setType('avis','select'); |
|
|
} |
|
456 |
if($this->retourformulaire=='') |
if($this->retourformulaire=='') |
457 |
$form->setType('date_validite','date'); |
$form->setType('date_validite','date'); |
458 |
else |
else |
580 |
$form->setType('servitude','textarea'); |
$form->setType('servitude','textarea'); |
581 |
$form->setType('geom','geom'); |
$form->setType('geom','geom'); |
582 |
$form->setType('geom1','geom'); |
$form->setType('geom1','geom'); |
583 |
|
|
584 |
|
if($this->retourformulaire=='avis_decision' |
585 |
|
and $form->val['avis_decision'] == $this->getParameter('idxformulaire')) { |
586 |
|
$form->setType('avis_decision','selecthiddenstatic'); |
587 |
|
} else { |
588 |
|
$form->setType('avis_decision','select'); |
589 |
|
} |
590 |
}// fin ajout |
}// fin ajout |
591 |
if ($maj==1){ //modifier |
if ($maj==1){ //modifier |
592 |
$form->setType('dossier','hiddenstatic'); |
$form->setType('dossier','hiddenstatic'); |
644 |
$form->setType('date_decision','date'); |
$form->setType('date_decision','date'); |
645 |
else |
else |
646 |
$form->setType('date_decision','date2'); |
$form->setType('date_decision','date2'); |
|
|
|
|
if($this->retourformulaire=='avis' |
|
|
and $form->val['avis'] == $this->getParameter('idxformulaire')) { |
|
|
$form->setType('avis','selecthiddenstatic'); |
|
|
} else { |
|
|
$form->setType('avis','select'); |
|
|
} |
|
647 |
if($this->retourformulaire=='') |
if($this->retourformulaire=='') |
648 |
$form->setType('date_validite','date'); |
$form->setType('date_validite','date'); |
649 |
else |
else |
771 |
$form->setType('servitude','textarea'); |
$form->setType('servitude','textarea'); |
772 |
$form->setType('geom','geom'); |
$form->setType('geom','geom'); |
773 |
$form->setType('geom1','geom'); |
$form->setType('geom1','geom'); |
774 |
|
|
775 |
|
if($this->retourformulaire=='avis_decision' |
776 |
|
and $form->val['avis_decision'] == $this->getParameter('idxformulaire')) { |
777 |
|
$form->setType('avis_decision','selecthiddenstatic'); |
778 |
|
} else { |
779 |
|
$form->setType('avis_decision','select'); |
780 |
|
} |
781 |
}// fin modifier |
}// fin modifier |
782 |
if ($maj==2){ //supprimer |
if ($maj==2){ //supprimer |
783 |
$form->setType('dossier','hiddenstatic'); |
$form->setType('dossier','hiddenstatic'); |
796 |
$form->setType('date_limite','hiddenstatic'); |
$form->setType('date_limite','hiddenstatic'); |
797 |
$form->setType('accord_tacite','hiddenstatic'); |
$form->setType('accord_tacite','hiddenstatic'); |
798 |
$form->setType('date_decision','hiddenstatic'); |
$form->setType('date_decision','hiddenstatic'); |
|
$form->setType('avis','selectstatic'); |
|
799 |
$form->setType('date_validite','hiddenstatic'); |
$form->setType('date_validite','hiddenstatic'); |
800 |
$form->setType('date_chantier','hiddenstatic'); |
$form->setType('date_chantier','hiddenstatic'); |
801 |
$form->setType('date_achevement','hiddenstatic'); |
$form->setType('date_achevement','hiddenstatic'); |
857 |
$form->setType('servitude','hiddenstatic'); |
$form->setType('servitude','hiddenstatic'); |
858 |
$form->setType('geom','hiddenstatic'); |
$form->setType('geom','hiddenstatic'); |
859 |
$form->setType('geom1','hiddenstatic'); |
$form->setType('geom1','hiddenstatic'); |
860 |
|
$form->setType('avis_decision','selectstatic'); |
861 |
}//fin supprimer |
}//fin supprimer |
862 |
if ($maj==3){ //consulter |
if ($maj==3){ //consulter |
863 |
$form->setType('dossier','static'); |
$form->setType('dossier','static'); |
876 |
$form->setType('date_limite','datestatic'); |
$form->setType('date_limite','datestatic'); |
877 |
$form->setType('accord_tacite','static'); |
$form->setType('accord_tacite','static'); |
878 |
$form->setType('date_decision','datestatic'); |
$form->setType('date_decision','datestatic'); |
|
$form->setType('avis','selectstatic'); |
|
879 |
$form->setType('date_validite','datestatic'); |
$form->setType('date_validite','datestatic'); |
880 |
$form->setType('date_chantier','datestatic'); |
$form->setType('date_chantier','datestatic'); |
881 |
$form->setType('date_achevement','datestatic'); |
$form->setType('date_achevement','datestatic'); |
937 |
$form->setType('servitude','textareastatic'); |
$form->setType('servitude','textareastatic'); |
938 |
$form->setType('geom','geom'); |
$form->setType('geom','geom'); |
939 |
$form->setType('geom1','geom'); |
$form->setType('geom1','geom'); |
940 |
|
$form->setType('avis_decision','selectstatic'); |
941 |
}//fin consulter |
}//fin consulter |
942 |
} |
} |
943 |
|
|
970 |
$form->setOnchange('hauteur','VerifNum(this)'); |
$form->setOnchange('hauteur','VerifNum(this)'); |
971 |
$form->setOnchange('piece_nombre','VerifNum(this)'); |
$form->setOnchange('piece_nombre','VerifNum(this)'); |
972 |
$form->setOnchange('parcelle_lot','VerifNum(this)'); |
$form->setOnchange('parcelle_lot','VerifNum(this)'); |
973 |
|
$form->setOnchange('avis_decision','VerifNum(this)'); |
974 |
} |
} |
975 |
/** |
/** |
976 |
* Methode setTaille |
* Methode setTaille |
992 |
$form->setTaille("date_limite", 12); |
$form->setTaille("date_limite", 12); |
993 |
$form->setTaille("accord_tacite", 10); |
$form->setTaille("accord_tacite", 10); |
994 |
$form->setTaille("date_decision", 12); |
$form->setTaille("date_decision", 12); |
|
$form->setTaille("avis", 10); |
|
995 |
$form->setTaille("date_validite", 12); |
$form->setTaille("date_validite", 12); |
996 |
$form->setTaille("date_chantier", 12); |
$form->setTaille("date_chantier", 12); |
997 |
$form->setTaille("date_achevement", 12); |
$form->setTaille("date_achevement", 12); |
1053 |
$form->setTaille("servitude", 80); |
$form->setTaille("servitude", 80); |
1054 |
$form->setTaille("geom", 10); |
$form->setTaille("geom", 10); |
1055 |
$form->setTaille("geom1", 10); |
$form->setTaille("geom1", 10); |
1056 |
|
$form->setTaille("avis_decision", 11); |
1057 |
} |
} |
1058 |
|
|
1059 |
/** |
/** |
1076 |
$form->setMax("date_limite", 12); |
$form->setMax("date_limite", 12); |
1077 |
$form->setMax("accord_tacite", 3); |
$form->setMax("accord_tacite", 3); |
1078 |
$form->setMax("date_decision", 12); |
$form->setMax("date_decision", 12); |
|
$form->setMax("avis", 2); |
|
1079 |
$form->setMax("date_validite", 12); |
$form->setMax("date_validite", 12); |
1080 |
$form->setMax("date_chantier", 12); |
$form->setMax("date_chantier", 12); |
1081 |
$form->setMax("date_achevement", 12); |
$form->setMax("date_achevement", 12); |
1137 |
$form->setMax("servitude", 6); |
$form->setMax("servitude", 6); |
1138 |
$form->setMax("geom", -5); |
$form->setMax("geom", -5); |
1139 |
$form->setMax("geom1", -5); |
$form->setMax("geom1", -5); |
1140 |
|
$form->setMax("avis_decision", 11); |
1141 |
} |
} |
1142 |
|
|
1143 |
|
|
1159 |
$form->setLib('date_limite',_('date_limite')); |
$form->setLib('date_limite',_('date_limite')); |
1160 |
$form->setLib('accord_tacite',_('accord_tacite')); |
$form->setLib('accord_tacite',_('accord_tacite')); |
1161 |
$form->setLib('date_decision',_('date_decision')); |
$form->setLib('date_decision',_('date_decision')); |
|
$form->setLib('avis',_('avis')); |
|
1162 |
$form->setLib('date_validite',_('date_validite')); |
$form->setLib('date_validite',_('date_validite')); |
1163 |
$form->setLib('date_chantier',_('date_chantier')); |
$form->setLib('date_chantier',_('date_chantier')); |
1164 |
$form->setLib('date_achevement',_('date_achevement')); |
$form->setLib('date_achevement',_('date_achevement')); |
1220 |
$form->setLib('servitude',_('servitude')); |
$form->setLib('servitude',_('servitude')); |
1221 |
$form->setLib('geom',_('geom')); |
$form->setLib('geom',_('geom')); |
1222 |
$form->setLib('geom1',_('geom1')); |
$form->setLib('geom1',_('geom1')); |
1223 |
|
$form->setLib('avis_decision',_('avis_decision')); |
1224 |
} |
} |
1225 |
|
|
1226 |
function setSelect(&$form, $maj,&$db,$debug) { |
function setSelect(&$form, $maj,&$db,$debug) { |
1229 |
elseif(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc")) |
elseif(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc")) |
1230 |
include ("../sql/".$db->phptype."/".$this->table.".form.inc"); |
include ("../sql/".$db->phptype."/".$this->table.".form.inc"); |
1231 |
|
|
1232 |
// instructeur |
// architecte |
1233 |
$this->init_select($form, $db, $maj, $debug, "instructeur", |
$this->init_select($form, $db, $maj, $debug, "architecte", |
1234 |
$sql_instructeur, $sql_instructeur_by_id, false); |
$sql_architecte, $sql_architecte_by_id, false); |
1235 |
|
|
1236 |
// travaux |
// avis_decision |
1237 |
$this->init_select($form, $db, $maj, $debug, "travaux", |
$this->init_select($form, $db, $maj, $debug, "avis_decision", |
1238 |
$sql_travaux, $sql_travaux_by_id, false); |
$sql_avis_decision, $sql_avis_decision_by_id, false); |
1239 |
|
|
1240 |
|
// delegataire_civilite |
1241 |
|
$this->init_select($form, $db, $maj, $debug, "delegataire_civilite", |
1242 |
|
$sql_delegataire_civilite, $sql_delegataire_civilite_by_id, false); |
1243 |
|
|
1244 |
// demandeur_categorie |
// demandeur_categorie |
1245 |
$this->init_select($form, $db, $maj, $debug, "demandeur_categorie", |
$this->init_select($form, $db, $maj, $debug, "demandeur_categorie", |
1249 |
$this->init_select($form, $db, $maj, $debug, "demandeur_civilite", |
$this->init_select($form, $db, $maj, $debug, "demandeur_civilite", |
1250 |
$sql_demandeur_civilite, $sql_demandeur_civilite_by_id, false); |
$sql_demandeur_civilite, $sql_demandeur_civilite_by_id, false); |
1251 |
|
|
|
// delegataire_civilite |
|
|
$this->init_select($form, $db, $maj, $debug, "delegataire_civilite", |
|
|
$sql_delegataire_civilite, $sql_delegataire_civilite_by_id, false); |
|
|
|
|
|
// architecte |
|
|
$this->init_select($form, $db, $maj, $debug, "architecte", |
|
|
$sql_architecte, $sql_architecte_by_id, false); |
|
|
|
|
1252 |
// etat |
// etat |
1253 |
$this->init_select($form, $db, $maj, $debug, "etat", |
$this->init_select($form, $db, $maj, $debug, "etat", |
1254 |
$sql_etat, $sql_etat_by_id, false); |
$sql_etat, $sql_etat_by_id, false); |
1255 |
|
|
1256 |
|
// instructeur |
1257 |
|
$this->init_select($form, $db, $maj, $debug, "instructeur", |
1258 |
|
$sql_instructeur, $sql_instructeur_by_id, false); |
1259 |
|
|
1260 |
// nature |
// nature |
1261 |
$this->init_select($form, $db, $maj, $debug, "nature", |
$this->init_select($form, $db, $maj, $debug, "nature", |
1262 |
$sql_nature, $sql_nature_by_id, false); |
$sql_nature, $sql_nature_by_id, false); |
1263 |
|
|
1264 |
// avis |
// parcelle |
1265 |
$this->init_select($form, $db, $maj, $debug, "avis", |
$this->init_select($form, $db, $maj, $debug, "parcelle", |
1266 |
$sql_avis, $sql_avis_by_id, false); |
$sql_parcelle, $sql_parcelle_by_id, false); |
1267 |
|
|
1268 |
// rivoli |
// parcelle_lot |
1269 |
$this->init_select($form, $db, $maj, $debug, "rivoli", |
$this->init_select($form, $db, $maj, $debug, "parcelle_lot", |
1270 |
$sql_rivoli, $sql_rivoli_by_id, false); |
$sql_parcelle_lot, $sql_parcelle_lot_by_id, false); |
1271 |
|
|
1272 |
// pos |
// pos |
1273 |
$this->init_select($form, $db, $maj, $debug, "pos", |
$this->init_select($form, $db, $maj, $debug, "pos", |
1274 |
$sql_pos, $sql_pos_by_id, false); |
$sql_pos, $sql_pos_by_id, false); |
1275 |
|
|
1276 |
// parcelle_lot |
// rivoli |
1277 |
$this->init_select($form, $db, $maj, $debug, "parcelle_lot", |
$this->init_select($form, $db, $maj, $debug, "rivoli", |
1278 |
$sql_parcelle_lot, $sql_parcelle_lot_by_id, false); |
$sql_rivoli, $sql_rivoli_by_id, false); |
1279 |
|
|
1280 |
// parcelle |
// travaux |
1281 |
$this->init_select($form, $db, $maj, $debug, "parcelle", |
$this->init_select($form, $db, $maj, $debug, "travaux", |
1282 |
$sql_parcelle, $sql_parcelle_by_id, false); |
$sql_travaux, $sql_travaux_by_id, false); |
1283 |
// geom |
// geom |
1284 |
if($maj==1){ //modification |
if($maj==1 || $maj==3){ //modification ou visualisation |
1285 |
$contenu=array(); |
$contenu=array(); |
1286 |
$contenu[0]=array($this->getParameter("aff"),$this->getParameter("idx")); |
$contenu[0]=array("dossier",$this->getParameter("idx"),"0"); |
1287 |
$form->setSelect('geom',$contenu); |
$form->setSelect('geom',$contenu); |
1288 |
} |
} |
1289 |
// geom1 |
// geom1 |
1290 |
if($maj==1){ //modification |
if($maj==1 || $maj==3){ //modification ou visualisation |
1291 |
$contenu=array(); |
$contenu=array(); |
1292 |
$contenu[0]=array($this->getParameter("aff"),$this->getParameter("idx")); |
$contenu[0]=array("dossier",$this->getParameter("idx"),"1"); |
1293 |
$form->setSelect('geom1',$contenu); |
$form->setSelect('geom1',$contenu); |
1294 |
} |
} |
1295 |
}// fin select |
}// fin select |
1301 |
function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){ |
function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){ |
1302 |
$this->retourformulaire = $retourformulaire; |
$this->retourformulaire = $retourformulaire; |
1303 |
if($validation == 0) { |
if($validation == 0) { |
|
if($retourformulaire =='om_utilisateur') |
|
|
$form->setVal('instructeur', $idxformulaire); |
|
|
if($retourformulaire =='travaux') |
|
|
$form->setVal('travaux', $idxformulaire); |
|
|
if($retourformulaire =='categorie_demandeur') |
|
|
$form->setVal('demandeur_categorie', $idxformulaire); |
|
1304 |
if($retourformulaire =='architecte') |
if($retourformulaire =='architecte') |
1305 |
$form->setVal('architecte', $idxformulaire); |
$form->setVal('architecte', $idxformulaire); |
1306 |
|
if($retourformulaire =='avis_decision') |
1307 |
|
$form->setVal('avis_decision', $idxformulaire); |
1308 |
|
if($retourformulaire =='categorie_demandeur') |
1309 |
|
$form->setVal('demandeur_categorie', $idxformulaire); |
1310 |
if($retourformulaire =='etat') |
if($retourformulaire =='etat') |
1311 |
$form->setVal('etat', $idxformulaire); |
$form->setVal('etat', $idxformulaire); |
1312 |
|
if($retourformulaire =='om_utilisateur') |
1313 |
|
$form->setVal('instructeur', $idxformulaire); |
1314 |
if($retourformulaire =='nature') |
if($retourformulaire =='nature') |
1315 |
$form->setVal('nature', $idxformulaire); |
$form->setVal('nature', $idxformulaire); |
|
if($retourformulaire =='avis') |
|
|
$form->setVal('avis', $idxformulaire); |
|
|
if($retourformulaire =='rivoli') |
|
|
$form->setVal('rivoli', $idxformulaire); |
|
|
if($retourformulaire =='pos') |
|
|
$form->setVal('pos', $idxformulaire); |
|
|
if($retourformulaire =='parcelle_lot') |
|
|
$form->setVal('parcelle_lot', $idxformulaire); |
|
1316 |
if($retourformulaire =='parcelle') |
if($retourformulaire =='parcelle') |
1317 |
$form->setVal('parcelle', $idxformulaire); |
$form->setVal('parcelle', $idxformulaire); |
1318 |
|
if($retourformulaire =='parcelle_lot') |
1319 |
|
$form->setVal('parcelle_lot', $idxformulaire); |
1320 |
|
if($retourformulaire =='pos') |
1321 |
|
$form->setVal('pos', $idxformulaire); |
1322 |
|
if($retourformulaire =='rivoli') |
1323 |
|
$form->setVal('rivoli', $idxformulaire); |
1324 |
|
if($retourformulaire =='travaux') |
1325 |
|
$form->setVal('travaux', $idxformulaire); |
1326 |
}// fin validation |
}// fin validation |
1327 |
if ($validation == 0 and $maj == 0) { |
if ($validation == 0 and $maj == 0) { |
1328 |
if($retourformulaire =='civilite') |
if($retourformulaire =='civilite') |
|
$form->setVal('demandeur_civilite', $idxformulaire); |
|
|
if($retourformulaire =='civilite') |
|
1329 |
$form->setVal('delegataire_civilite', $idxformulaire); |
$form->setVal('delegataire_civilite', $idxformulaire); |
1330 |
|
if($retourformulaire =='civilite') |
1331 |
|
$form->setVal('demandeur_civilite', $idxformulaire); |
1332 |
}// fin validation |
}// fin validation |
1333 |
}// fin setValsousformulaire |
}// fin setValsousformulaire |
1334 |
|
|
1343 |
parent::cleSecondaire($id, $db, $val, $DEBUG); |
parent::cleSecondaire($id, $db, $val, $DEBUG); |
1344 |
// Verification de la cle secondaire : blocnote |
// Verification de la cle secondaire : blocnote |
1345 |
$this->rechercheTable($db, "blocnote", "dossier", $id); |
$this->rechercheTable($db, "blocnote", "dossier", $id); |
|
// Verification de la cle secondaire : instruction |
|
|
$this->rechercheTable($db, "instruction", "dossier", $id); |
|
|
// Verification de la cle secondaire : terrain |
|
|
$this->rechercheTable($db, "terrain", "dossier", $id); |
|
1346 |
// Verification de la cle secondaire : consultation |
// Verification de la cle secondaire : consultation |
1347 |
$this->rechercheTable($db, "consultation", "dossier", $id); |
$this->rechercheTable($db, "consultation", "dossier", $id); |
1348 |
// Verification de la cle secondaire : destination_shon |
// Verification de la cle secondaire : destination_shon |
1349 |
$this->rechercheTable($db, "destination_shon", "dossier", $id); |
$this->rechercheTable($db, "destination_shon", "dossier", $id); |
1350 |
|
// Verification de la cle secondaire : instruction |
1351 |
|
$this->rechercheTable($db, "instruction", "dossier", $id); |
1352 |
// Verification de la cle secondaire : statistique |
// Verification de la cle secondaire : statistique |
1353 |
$this->rechercheTable($db, "statistique", "dossier", $id); |
$this->rechercheTable($db, "statistique", "dossier", $id); |
1354 |
|
// Verification de la cle secondaire : terrain |
1355 |
|
$this->rechercheTable($db, "terrain", "dossier", $id); |
1356 |
} |
} |
1357 |
|
|
1358 |
|
|