1 |
<?php |
2 |
/** |
3 |
* Visualisation du dossier d'autorisation |
4 |
* |
5 |
* @package openfoncier |
6 |
* @version SVN : $Id$ |
7 |
*/ |
8 |
|
9 |
/** |
10 |
* Fichiers requis |
11 |
*/ |
12 |
require_once "../obj/utils.class.php"; |
13 |
|
14 |
$idx = (isset($_GET['idx'])) ? $_GET['idx'] : ""; |
15 |
$idz = (isset($_GET['idz'])) ? $_GET['idz'] : ""; |
16 |
$retour = (isset($_GET['retour'])) ? $_GET['retour'] : ""; |
17 |
$premier = (isset($_GET['premier'])) ? $_GET['premier'] : ""; |
18 |
$advs_id = (isset($_GET['advs_id'])) ? $_GET['advs_id'] : ""; |
19 |
$recherche = (isset($_GET['recherche'])) ? $_GET['recherche'] : ""; |
20 |
$tricol = (isset($_GET['tricol'])) ? $_GET['tricol'] : ""; |
21 |
$selectioncol = (isset($_GET['selectioncol'])) ? $_GET['selectioncol'] : ""; |
22 |
$valide = (isset($_GET['valide'])) ? $_GET['valide'] : ""; |
23 |
//Si l'identifiant du dossier d'autorisation a été fourni |
24 |
if ( !is_null($idx)){ |
25 |
$f = new utils("nohtml", "dossier_autorisation_consulter"); |
26 |
|
27 |
|
28 |
|
29 |
$f->setTitle(_("Autorisation")." -> "._("Dossier d'autorisation")." -> ".$idx." ".$idz); |
30 |
$f->setFlag(NULL); |
31 |
$f->display(); |
32 |
|
33 |
// Configuration du bouton retour |
34 |
if($retour != "" AND $retour != "tab") { |
35 |
$bouton_retour = "<a class=\"retour\" href=\"../scr/form.php?obj=dossier_instruction&idx=".$retour."&action=3&premier=30&tricol=&recherche=&selectioncol=&advs_id=&valide=#ui-tabs-6\">Retour</a>"; |
36 |
} else { |
37 |
$bouton_retour = "<a class=\"retour\" href=\"../scr/tab.php?obj=dossier_autorisation&premier=".$premier."&tricol=".$tricol."&recherche=".$recherche."&selectioncol=".$selectioncol."&advs_id=".$advs_id."\">Retour</a>"; |
38 |
} |
39 |
|
40 |
//Récupération des données |
41 |
//Données du dossier d'autorisation |
42 |
$sqlDonneesDA = "SELECT |
43 |
terrain_references_cadastrales, terrain_adresse_voie_numero, |
44 |
complement, terrain_adresse_lieu_dit, terrain_adresse_localite, |
45 |
terrain_adresse_code_postal, terrain_adresse_bp, |
46 |
terrain_adresse_cedex, terrain_superficie, eda.libelle as etat, |
47 |
eddia.libelle as etat_dernier_dossier_instruction_accepte, |
48 |
avis_decision.libelle as avis_decision |
49 |
FROM |
50 |
".DB_PREFIXE."dossier_autorisation |
51 |
LEFT JOIN |
52 |
".DB_PREFIXE."etat_dossier_autorisation as eda |
53 |
ON |
54 |
dossier_autorisation.etat_dossier_autorisation = eda.etat_dossier_autorisation |
55 |
LEFT JOIN |
56 |
".DB_PREFIXE."etat_dossier_autorisation as eddia |
57 |
ON |
58 |
dossier_autorisation.etat_dernier_dossier_instruction_accepte = eddia.etat_dossier_autorisation |
59 |
LEFT JOIN |
60 |
".DB_PREFIXE."avis_decision |
61 |
ON |
62 |
dossier_autorisation.avis_decision = avis_decision.avis_decision |
63 |
WHERE |
64 |
dossier_autorisation = '".$idx."'"; |
65 |
$f->addToLog("dossier_autorisation.php : ".$sqlDonneesDA." execute <br>", EXTRA_VERBOSE_MODE); |
66 |
|
67 |
$resDonneesDA = $f->db->query($sqlDonneesDA); |
68 |
$f->isDatabaseError($resDonneesDA); |
69 |
|
70 |
$rowDonneesDA = &$resDonneesDA->fetchRow(DB_FETCHMODE_ASSOC); |
71 |
|
72 |
//Données des demandeurs du dossier d'autorisation |
73 |
$sqlDonneesDemandeursDA = "SELECT |
74 |
civilite.code as \"code\", |
75 |
CASE WHEN demandeur.qualite='particulier' THEN |
76 |
TRIM(CONCAT(demandeur.particulier_nom, ' ', demandeur.particulier_prenom)) |
77 |
ELSE |
78 |
TRIM(CONCAT(demandeur.personne_morale_raison_sociale, ' ', demandeur.personne_morale_denomination)) |
79 |
END as \"demandeur\" |
80 |
FROM |
81 |
".DB_PREFIXE."demandeur |
82 |
LEFT JOIN |
83 |
".DB_PREFIXE."lien_dossier_autorisation_demandeur |
84 |
ON |
85 |
demandeur.demandeur = lien_dossier_autorisation_demandeur.demandeur |
86 |
LEFT JOIN |
87 |
".DB_PREFIXE."civilite |
88 |
ON |
89 |
civilite.civilite = demandeur.particulier_civilite OR civilite.civilite = demandeur.personne_morale_civilite |
90 |
WHERE |
91 |
lien_dossier_autorisation_demandeur.dossier_autorisation = '".$idx."' AND |
92 |
lien_dossier_autorisation_demandeur.petitionnaire_principal IS TRUE"; |
93 |
$f->addToLog("dossier_autorisation.php : ".$sqlDonneesDemandeursDA." execute <br>", EXTRA_VERBOSE_MODE); |
94 |
|
95 |
$resDonneesDemandeursDA = $f->db->query($sqlDonneesDemandeursDA); |
96 |
$f->isDatabaseError($resDonneesDemandeursDA); |
97 |
|
98 |
$rowDonneesDemandeursDA = &$resDonneesDemandeursDA->fetchRow(DB_FETCHMODE_ASSOC); |
99 |
|
100 |
//Données des dates importantes du dossier d'autorisation |
101 |
$sqlDonneesDateDA = "SELECT |
102 |
to_char(dossier_autorisation.depot_initial ,'DD/MM/YYYY') as \"depot_initial\" |
103 |
FROM |
104 |
".DB_PREFIXE."dossier_autorisation |
105 |
WHERE |
106 |
dossier_autorisation.dossier_autorisation='".$idx."'"; |
107 |
$f->addToLog("dossier_autorisation.php : ".$sqlDonneesDateDA." execute <br>", EXTRA_VERBOSE_MODE); |
108 |
|
109 |
$resDonneesDateDA = $f->db->query($sqlDonneesDateDA); |
110 |
$f->isDatabaseError($resDonneesDateDA); |
111 |
|
112 |
$rowDonneesDateDA = &$resDonneesDateDA->fetchRow(DB_FETCHMODE_ASSOC); |
113 |
|
114 |
//Date de décision |
115 |
$sqlDonneesDateDecisionDA = "SELECT |
116 |
to_char(dossier.date_decision ,'DD/MM/YYYY') as \"date_decision\" |
117 |
FROM |
118 |
".DB_PREFIXE."dossier |
119 |
WHERE |
120 |
dossier.dossier_autorisation='".$idx."' |
121 |
GROUP BY |
122 |
dossier.date_decision |
123 |
ORDER BY |
124 |
MIN(dossier.date_decision)"; |
125 |
$f->addToLog("dossier_autorisation.php : ".$sqlDonneesDateDecisionDA." execute <br>", EXTRA_VERBOSE_MODE); |
126 |
|
127 |
$resDonneesDateDecisionDA = $f->db->query($sqlDonneesDateDecisionDA); |
128 |
$f->isDatabaseError($resDonneesDateDecisionDA); |
129 |
|
130 |
$rowDonneesDateDecisionDA = &$resDonneesDateDecisionDA->fetchRow(DB_FETCHMODE_ASSOC); |
131 |
|
132 |
//Date de fin de validité |
133 |
$sqlDonneesDateLimiteDA = "SELECT |
134 |
to_char(dossier.date_limite ,'DD/MM/YYYY') as \"date_limite\" |
135 |
FROM |
136 |
".DB_PREFIXE."dossier |
137 |
WHERE |
138 |
dossier.dossier_autorisation='".$idx."' |
139 |
GROUP BY |
140 |
dossier.date_limite |
141 |
ORDER BY |
142 |
MIN(dossier.date_limite)"; |
143 |
$f->addToLog("dossier_autorisation.php : ".$sqlDonneesDateLimiteDA." execute <br>", EXTRA_VERBOSE_MODE); |
144 |
|
145 |
$resDonneesDateLimiteDA = $f->db->query($sqlDonneesDateLimiteDA); |
146 |
$f->isDatabaseError($resDonneesDateLimiteDA); |
147 |
|
148 |
$rowDonneesDateLimiteDA = &$resDonneesDateLimiteDA->fetchRow(DB_FETCHMODE_ASSOC); |
149 |
|
150 |
// Date du DACT et DOC |
151 |
$sqlDonneesDateDossiersDA = "SELECT |
152 |
dossier_instruction_type.code as \"code\", |
153 |
to_char(dossier.date_depot ,'DD/MM/YYYY') as \"date_depot\" |
154 |
FROM ".DB_PREFIXE."dossier |
155 |
LEFT JOIN |
156 |
".DB_PREFIXE."dossier_instruction_type |
157 |
ON |
158 |
dossier.dossier_instruction_type = dossier_instruction_type.dossier_instruction_type |
159 |
WHERE |
160 |
dossier.dossier_autorisation='".$idx."' AND |
161 |
( |
162 |
dossier_instruction_type.code='DACT' OR |
163 |
dossier_instruction_type.code='DOC' |
164 |
) |
165 |
ORDER BY code desc;"; |
166 |
$f->addToLog("dossier_autorisation.php : ".$sqlDonneesDateDossiersDA." execute <br>", EXTRA_VERBOSE_MODE); |
167 |
|
168 |
$resDonneesDateDossiersDA = $f->db->query($sqlDonneesDateDossiersDA); |
169 |
$f->isDatabaseError($resDonneesDateDossiersDA); |
170 |
|
171 |
//Historique des décisions du dossier d'autorisation |
172 |
$sqlDonneesDecisionsDA = "SELECT |
173 |
avis_decision.libelle as \"avis_libelle\", |
174 |
dossier_instruction_type.libelle as \"di_libelle\", |
175 |
civilite.code as \"code\", |
176 |
CASE WHEN demandeur.qualite='particulier' THEN |
177 |
TRIM(CONCAT(demandeur.particulier_nom, ' ', demandeur.particulier_prenom)) |
178 |
ELSE |
179 |
TRIM(CONCAT(demandeur.personne_morale_raison_sociale, ' ', demandeur.personne_morale_denomination)) |
180 |
END as \"demandeur\", |
181 |
to_char(dossier.date_decision ,'DD/MM/YYYY') as \"date_decision\" |
182 |
FROM |
183 |
".DB_PREFIXE."dossier |
184 |
LEFT JOIN |
185 |
".DB_PREFIXE."dossier_instruction_type |
186 |
ON |
187 |
dossier.dossier_instruction_type = dossier_instruction_type.dossier_instruction_type |
188 |
LEFT JOIN |
189 |
".DB_PREFIXE."lien_dossier_demandeur |
190 |
ON |
191 |
dossier.dossier = lien_dossier_demandeur.dossier |
192 |
LEFT JOIN |
193 |
".DB_PREFIXE."demandeur |
194 |
ON |
195 |
lien_dossier_demandeur.demandeur = demandeur.demandeur |
196 |
LEFT JOIN |
197 |
".DB_PREFIXE."avis_decision |
198 |
ON |
199 |
dossier.avis_decision = avis_decision.avis_decision |
200 |
LEFT JOIN |
201 |
".DB_PREFIXE."civilite |
202 |
ON |
203 |
civilite.civilite = demandeur.particulier_civilite OR civilite.civilite = demandeur.personne_morale_civilite |
204 |
WHERE |
205 |
dossier.dossier_autorisation = '".$idx."' AND |
206 |
dossier.avis_decision IS NOT NULL"; |
207 |
$f->addToLog("dossier_autorisation.php : ".$sqlDonneesDecisionsDA." execute <br>", EXTRA_VERBOSE_MODE); |
208 |
|
209 |
$resDonneesDecisionsDA = $f->db->query($sqlDonneesDecisionsDA); |
210 |
$f->isDatabaseError($resDonneesDecisionsDA); |
211 |
|
212 |
//Les données des lots des dossiers d'autorisation |
213 |
$sqlDonneesLotsDA = "SELECT |
214 |
lot.libelle as \"libelle\", civilite.code as \"code\", |
215 |
CASE WHEN demandeur.qualite='particulier' THEN |
216 |
TRIM(CONCAT(demandeur.particulier_nom, ' ', demandeur.particulier_prenom)) |
217 |
ELSE |
218 |
TRIM(CONCAT(demandeur.personne_morale_raison_sociale, ' ', demandeur.personne_morale_denomination)) |
219 |
END as \"demandeur\" |
220 |
FROM ".DB_PREFIXE."lot |
221 |
LEFT JOIN |
222 |
".DB_PREFIXE."lien_lot_demandeur |
223 |
ON |
224 |
lot.lot = lien_lot_demandeur.lot |
225 |
LEFT JOIN |
226 |
".DB_PREFIXE."demandeur |
227 |
ON |
228 |
demandeur.demandeur = lien_lot_demandeur.demandeur |
229 |
LEFT JOIN |
230 |
".DB_PREFIXE."civilite |
231 |
ON |
232 |
civilite.civilite = demandeur.particulier_civilite OR civilite.civilite = demandeur.personne_morale_civilite |
233 |
WHERE lot.dossier_autorisation = '".$idx."' AND lien_lot_demandeur.petitionnaire_principal IS TRUE"; |
234 |
$f->addToLog("dossier_autorisation.php : ".$sqlDonneesLotsDA." execute <br>", EXTRA_VERBOSE_MODE); |
235 |
|
236 |
$resDonneesLotsDA = $f->db->query($sqlDonneesLotsDA); |
237 |
$f->isDatabaseError($resDonneesLotsDA); |
238 |
|
239 |
//Données du dossier d'instruction en cours d'instruction |
240 |
// Informations générales du dossier d'instruction |
241 |
$sqlDonneesDI = "SELECT |
242 |
dossier, terrain_references_cadastrales, terrain_adresse_voie_numero, |
243 |
complement, terrain_adresse_lieu_dit, terrain_adresse_localite, |
244 |
terrain_adresse_code_postal, terrain_adresse_bp, |
245 |
terrain_adresse_cedex, terrain_superficie |
246 |
FROM |
247 |
".DB_PREFIXE."dossier |
248 |
LEFT JOIN |
249 |
".DB_PREFIXE."etat |
250 |
ON |
251 |
dossier.etat = etat.etat |
252 |
WHERE |
253 |
dossier.dossier_autorisation = '".$idx."' AND etat.statut = 'encours'"; |
254 |
$f->addToLog("dossier_autorisation.php : ".$sqlDonneesDI." execute <br>", EXTRA_VERBOSE_MODE); |
255 |
|
256 |
$resDonneesDI = $f->db->query($sqlDonneesDI); |
257 |
$f->isDatabaseError($resDonneesDI); |
258 |
|
259 |
$rowDonneesDI = &$resDonneesDI->fetchRow(DB_FETCHMODE_ASSOC); |
260 |
|
261 |
//Données techniques du dossier d'instruction en cours d'instruction |
262 |
if ( $rowDonneesDI != NULL ){ |
263 |
|
264 |
//Les données à afficher |
265 |
$sqlDonneesTechniquesDI = "SELECT |
266 |
donnees_techniques |
267 |
FROM |
268 |
".DB_PREFIXE."donnees_techniques |
269 |
WHERE |
270 |
donnees_techniques.dossier_instruction = '".$rowDonneesDI['dossier']."'"; |
271 |
$f->addToLog("dossier_autorisation.php : ".$sqlDonneesTechniquesDI." execute <br>", EXTRA_VERBOSE_MODE); |
272 |
|
273 |
$resDonneesTechniquesDI = $f->db->query($sqlDonneesTechniquesDI); |
274 |
$f->isDatabaseError($resDonneesTechniquesDI); |
275 |
|
276 |
//La liste des lots |
277 |
$sqlDonneesLotsDI = "SELECT |
278 |
lot.libelle as \"libelle\", civilite.code as \"code\", |
279 |
CASE WHEN demandeur.qualite='particulier' THEN |
280 |
TRIM(CONCAT(demandeur.particulier_nom, ' ', demandeur.particulier_prenom)) |
281 |
ELSE |
282 |
TRIM(CONCAT(demandeur.personne_morale_raison_sociale, ' ', demandeur.personne_morale_denomination)) |
283 |
END as \"demandeur\" |
284 |
FROM ".DB_PREFIXE."lot |
285 |
LEFT JOIN |
286 |
".DB_PREFIXE."lien_lot_demandeur |
287 |
ON |
288 |
lot.lot = lien_lot_demandeur.lot |
289 |
LEFT JOIN |
290 |
".DB_PREFIXE."lien_dossier_lot |
291 |
ON |
292 |
lot.lot = lien_dossier_lot.lot |
293 |
LEFT JOIN |
294 |
".DB_PREFIXE."dossier |
295 |
ON |
296 |
lien_dossier_lot.dossier = dossier.dossier |
297 |
LEFT JOIN |
298 |
".DB_PREFIXE."demandeur |
299 |
ON |
300 |
demandeur.demandeur = lien_lot_demandeur.demandeur |
301 |
LEFT JOIN |
302 |
".DB_PREFIXE."civilite |
303 |
ON |
304 |
civilite.civilite = demandeur.particulier_civilite OR civilite.civilite = demandeur.personne_morale_civilite |
305 |
WHERE dossier.dossier = '".$rowDonneesDI['dossier']."' AND lien_lot_demandeur.petitionnaire_principal IS TRUE"; |
306 |
$f->addToLog("dossier_autorisation.php : ".$sqlDonneesLotsDI." execute <br>", EXTRA_VERBOSE_MODE); |
307 |
|
308 |
$resDonneesLotsDI = $f->db->query($sqlDonneesLotsDI); |
309 |
$f->isDatabaseError($resDonneesLotsDI); |
310 |
} |
311 |
|
312 |
//Affichage du formulaire |
313 |
require_once '../obj/om_formulaire.class.php'; |
314 |
echo "<div id=\"formulaire\" class=\"ui-tabs ui-widget ui-widget-content ui-corner-all\">"; |
315 |
echo "<ul class=\"ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all\">"; |
316 |
echo "<li class=\"ui-state-default ui-corner-top ui-tabs-selected ui-state-active\"> |
317 |
<a href=\"#tabs-1\" id=\"main\">"._("Dossier d'autorisation")."</a> |
318 |
</li>"; |
319 |
// Vérification du droit de lister les DI pour l'utilisateur connecté |
320 |
if ($f->isAccredited("dossier_instruction_tab")) { |
321 |
echo "<li class=\"ui-state-default ui-corner-top\">"; |
322 |
echo "<a onclick=\"$('#ui-tabs-1').html('<div id=\'sousform-dossier_instruction\'></div>');messageIt('dossier_instruction', '../scr/soustab.php?obj=dossier_instruction&idxformulaire=".$idx."&retourformulaire=dossier_autorisation&recherche=&_=1362131505006',false);\" id=\"dossier_instruction\" href=\"#ui-tabs-1\">"._("Dossiers d'instruction")."</a>"; |
323 |
echo "</li>"; |
324 |
} |
325 |
echo "</ul>"; |
326 |
|
327 |
echo "<div id=\"tabs-1\" class=\"ui-tabs-panel ui-widget-content ui-corner-bottom\">"; |
328 |
echo $bouton_retour; |
329 |
echo '<div class="formulaire">'; |
330 |
echo "\t<form method=\"post\" id=\"dossier_autorisation\" action=\"#\" class=\"formEntete ui-corner-all\">\n"; |
331 |
$msg = ""; |
332 |
$erreur = ""; |
333 |
//Affichage du lien de téléchargement |
334 |
if( $msg != "" ) { |
335 |
|
336 |
$class = "valid"; |
337 |
$f->displayMessage($class, $msg); |
338 |
} |
339 |
|
340 |
//Affichage de l'erreur |
341 |
if($erreur != "") { |
342 |
$class = "error"; |
343 |
$f->displayMessage($class, $erreur); |
344 |
} |
345 |
|
346 |
//Le formualaire n'a pas été validé |
347 |
$validation = 1; |
348 |
//Le formualaire est en mode ajout |
349 |
$maj = 3; |
350 |
//Le formualaire a un seul champ : dossier |
351 |
$champs = array("dossier_autorisation","terrain_references_cadastrales", |
352 |
"terrain_adresse_voie_numero", "complement", |
353 |
"terrain_adresse_lieu_dit", "terrain_adresse_localite", |
354 |
"terrain_adresse_code_postal", "terrain_adresse_bp", |
355 |
"terrain_adresse_cedex", "terrain_superficie", "etat", |
356 |
"etat_dernier_dossier_instruction_accepte", "avis_decision", |
357 |
"demandeur", "depot_initial", "date_decision", "date_limite", |
358 |
"date_depot_DACT", "date_depot_DOC",); |
359 |
|
360 |
//Création d'un nouvel objet de type formulaire |
361 |
$form = new formulaire(NULL, $validation, $maj, $champs); |
362 |
|
363 |
$champBlocDonneesGen = array(); |
364 |
$form->setType("dossier_autorisation", "static"); |
365 |
$form->setVal("dossier_autorisation", $idx); |
366 |
array_push($champBlocDonneesGen, "dossier_autorisation"); |
367 |
|
368 |
//Formatage des champs |
369 |
foreach ($champs as $key ) { |
370 |
|
371 |
if ( strcmp($key, "dossier_autorisation") != 0 |
372 |
&& strcmp($key, "depot_initial") != 0 && strcmp($key, "demandeur") != 0 |
373 |
&& strcmp($key, "date_decision") != 0 && strcmp($key, "date_limite") != 0 |
374 |
&& strcmp($key, "date_depot_DACT") != 0 && strcmp($key, "date_depot_DOC") != 0 ){ |
375 |
$form->setType($key, "static"); |
376 |
$form->setVal($key, $rowDonneesDA[$key]); |
377 |
array_push($champBlocDonneesGen, $key); |
378 |
} |
379 |
} |
380 |
|
381 |
array_push($champBlocDonneesGen, "demandeur"); |
382 |
$form->setType("demandeur", "static"); |
383 |
$form->setVal("demandeur", $rowDonneesDemandeursDA["code"]." ".$rowDonneesDemandeursDA["demandeur"]); |
384 |
|
385 |
$champBlocDatesImps = array( "depot_initial", "date_decision", "date_limite", |
386 |
"date_depot_DACT", "date_depot_DOC"); |
387 |
$form->setType("depot_initial", "static"); |
388 |
$form->setVal("depot_initial", $rowDonneesDateDA["depot_initial"]); |
389 |
$form->setType("date_decision", "static"); |
390 |
$form->setVal("date_decision", $rowDonneesDateDecisionDA["date_decision"]); |
391 |
$form->setType("date_limite", "static"); |
392 |
$form->setVal("date_limite", $rowDonneesDateLimiteDA["date_limite"]); |
393 |
$rowDonneesDateDossiersDA = &$resDonneesDateDossiersDA->fetchRow(DB_FETCHMODE_ASSOC); |
394 |
$form->setType("date_depot_DACT", "static"); |
395 |
$form->setVal("date_depot_DACT", $rowDonneesDateDossiersDA["date_depot"]); |
396 |
$rowDonneesDateDossiersDA = &$resDonneesDateDossiersDA->fetchRow(DB_FETCHMODE_ASSOC); |
397 |
$form->setType("date_depot_DOC", "static"); |
398 |
$form->setVal("date_depot_DOC", $rowDonneesDateDossiersDA["date_depot"]); |
399 |
|
400 |
// Fieldset des dossiers en cours de validité |
401 |
$form->debutFieldset(array("1"=>"En cours de validite","2"=>"col_6"), $validation); |
402 |
|
403 |
//Données générales |
404 |
$form->setBloc("dossier_autorisation", "D", _("Donnees generales")); |
405 |
$form->afficher($champBlocDonneesGen, $validation, false, false); |
406 |
$form->setBloc("demandeur", "F"); |
407 |
echo "<br/>"; |
408 |
//Dates importantes |
409 |
$form->setBloc("depot_initial", "D", _("Dates importantes")); |
410 |
$form->afficher($champBlocDatesImps, $validation, false, false); |
411 |
$form->setBloc("date_depot_DOC", "F"); |
412 |
|
413 |
echo "<br/>"; |
414 |
//Liste des lots |
415 |
if ($resDonneesLotsDA->numrows() > 0 ){ |
416 |
$message = _("Liste des lots : "); |
417 |
$f->displayMessage("transparent", $message); |
418 |
|
419 |
echo '<table class="tab-tab">'; |
420 |
|
421 |
// Entête de tableau |
422 |
echo '<thead>'; |
423 |
echo '<tr class="ui-tabs-nav ui-accordion ui-state-default tab-title">'; |
424 |
echo '<th class="title col-0 firstcol">'; |
425 |
echo '<span class="name">'; |
426 |
echo _('libelle'); |
427 |
echo '</span>'; |
428 |
echo '</th>'; |
429 |
echo '<th class="title col-0 firstcol">'; |
430 |
echo '<span class="name">'; |
431 |
echo _('demandeur'); |
432 |
echo '</span>'; |
433 |
echo '</th>'; |
434 |
echo '</tr>'; |
435 |
echo '</thead>'; |
436 |
|
437 |
echo '<tbody>'; |
438 |
|
439 |
while($rowDonneesLotsDA = &$resDonneesLotsDA->fetchRow(DB_FETCHMODE_ASSOC)){ |
440 |
echo '<tr class="tab-data odd">'; |
441 |
|
442 |
// Libelle du lot |
443 |
echo '<td class="col-1 firstcol">'; |
444 |
echo $rowDonneesLotsDA["libelle"]; |
445 |
echo '</td>'; |
446 |
|
447 |
// Nom du pétitionnaire |
448 |
echo '<td class="col-1">'; |
449 |
echo $rowDonneesLotsDA["code"]." ".$rowDonneesLotsDA["demandeur"]; |
450 |
echo '</td>'; |
451 |
|
452 |
echo "</tr>"; |
453 |
} |
454 |
|
455 |
echo '</tbody>'; |
456 |
echo '</table>'; |
457 |
echo "<br/>"; |
458 |
|
459 |
} |
460 |
|
461 |
//Historique des décisions |
462 |
if ($resDonneesDecisionsDA->numrows() > 0 ){ |
463 |
$message = _("Historique des decisions : "); |
464 |
$f->displayMessage("transparent", $message); |
465 |
|
466 |
echo '<table class="tab-tab">'; |
467 |
|
468 |
// Entête de tableau |
469 |
echo '<thead>'; |
470 |
echo '<tr class="ui-tabs-nav ui-accordion ui-state-default tab-title">'; |
471 |
echo '<th class="title col-0 firstcol">'; |
472 |
echo '<span class="name">'; |
473 |
echo _('Decision'); |
474 |
echo '</span>'; |
475 |
echo '</th>'; |
476 |
echo '<th class="title col-0 firstcol">'; |
477 |
echo '<span class="name">'; |
478 |
echo _('type de dossier'); |
479 |
echo '</span>'; |
480 |
echo '</th>'; |
481 |
echo '<th class="title col-0 firstcol">'; |
482 |
echo '<span class="name">'; |
483 |
echo _('demandeur'); |
484 |
echo '</span>'; |
485 |
echo '</th>'; |
486 |
echo '<th class="title col-0 firstcol">'; |
487 |
echo '<span class="name">'; |
488 |
echo _('date_decision'); |
489 |
echo '</span>'; |
490 |
echo '</th>'; |
491 |
echo '</tr>'; |
492 |
echo '</thead>'; |
493 |
|
494 |
echo '<tbody>'; |
495 |
|
496 |
while($rowDonneesDecisionsDA = &$resDonneesDecisionsDA->fetchRow(DB_FETCHMODE_ASSOC)){ |
497 |
echo '<tr class="tab-data odd">'; |
498 |
|
499 |
// Libelle de la décision |
500 |
echo '<td class="col-1 firstcol">'; |
501 |
echo $rowDonneesDecisionsDA["avis_libelle"]; |
502 |
echo '</td>'; |
503 |
|
504 |
//Libelle du type de dossier d'instruction |
505 |
echo '<td class="col-1 firstcol">'; |
506 |
echo $rowDonneesDecisionsDA["di_libelle"]; |
507 |
echo '</td>'; |
508 |
|
509 |
// Nom du pétitionnaire |
510 |
echo '<td class="col-1">'; |
511 |
echo $rowDonneesDecisionsDA["code"]." ".$rowDonneesDecisionsDA["demandeur"]; |
512 |
echo '</td>'; |
513 |
|
514 |
// Date de la decision |
515 |
echo '<td class="col-1">'; |
516 |
echo $rowDonneesDecisionsDA["date_decision"]; |
517 |
echo '</td>'; |
518 |
|
519 |
echo "</tr>"; |
520 |
} |
521 |
|
522 |
echo '</tbody>'; |
523 |
echo '</table>'; |
524 |
} |
525 |
$form->finFieldset(array("1"=>"En cours d'instruction","2"=>"col_6"), $validation); |
526 |
|
527 |
|
528 |
|
529 |
//Fieldset des données du dossier d'instruction en cours d'instruction |
530 |
if ( $resDonneesDI->numrows() > 0 ){ |
531 |
$champs = array("dossier", "terrain_references_cadastrales", |
532 |
"terrain_adresse_voie_numero", "complement", |
533 |
"terrain_adresse_lieu_dit", "terrain_adresse_localite", |
534 |
"terrain_adresse_code_postal", "terrain_adresse_bp", |
535 |
"terrain_adresse_cedex", "terrain_superficie"); |
536 |
|
537 |
$champsDonneesGen = $champs; |
538 |
|
539 |
//Création d'un nouvel objet de type formulaire |
540 |
$form = new formulaire(NULL, $validation, $maj, $champs); |
541 |
|
542 |
foreach ( $champsDonneesGen as $key ) { |
543 |
|
544 |
$form->setType($key, "static"); |
545 |
$form->setVal($key, $rowDonneesDI[$key] ); |
546 |
} |
547 |
|
548 |
$form->debutFieldset(array("1"=>"En cours d'instruction","2"=>"dossier_autorisation_visualisation"), $validation); |
549 |
|
550 |
//Données générales |
551 |
$form->setBloc("dossier", "D", _("Donnees generales")); |
552 |
$form->afficher($champsDonneesGen, $validation, false, false); |
553 |
$form->setBloc("terrain_superficie", "F"); |
554 |
|
555 |
//Données techniques |
556 |
if ($f->isAccredited("donnees_techniques")) { |
557 |
if ( $resDonneesTechniquesDI->numrows() > 0 ){ |
558 |
|
559 |
echo "<div id=\"sousform-donnees_techniques\">"; |
560 |
echo "<input type=\"text\" name=\"recherchedyn\" id=\"recherchedyn\" value=\"\" class=\"champFormulaire\" style=\"display:none\" />"; |
561 |
echo "</div>"; |
562 |
|
563 |
|
564 |
echo "<script>"; |
565 |
echo "ajaxIt('donnees_techniques', '../app/redirection_onglet.php?idx=".$rowDonneesDI['dossier']."&obj=donnees_techniques&sousformulaire=dossier_autorisation');"; |
566 |
echo "</script>"; |
567 |
|
568 |
echo "<br/>"; |
569 |
} |
570 |
} |
571 |
|
572 |
//Liste des lots |
573 |
if ($resDonneesLotsDI->numrows() > 0 ){ |
574 |
$message = _("Liste des lots : "); |
575 |
$f->displayMessage("transparent", $message); |
576 |
|
577 |
echo '<table class="tab-tab">'; |
578 |
|
579 |
// Entête de tableau |
580 |
echo '<thead>'; |
581 |
echo '<tr class="ui-tabs-nav ui-accordion ui-state-default tab-title">'; |
582 |
echo '<th class="title col-0 firstcol">'; |
583 |
echo '<span class="name">'; |
584 |
echo _('libelle'); |
585 |
echo '</span>'; |
586 |
echo '</th>'; |
587 |
echo '<th class="title col-0 firstcol">'; |
588 |
echo '<span class="name">'; |
589 |
echo _('demandeur'); |
590 |
echo '</span>'; |
591 |
echo '</th>'; |
592 |
echo '</tr>'; |
593 |
echo '</thead>'; |
594 |
|
595 |
echo '<tbody>'; |
596 |
|
597 |
while($rowDonneesLotsDI = &$resDonneesLotsDI->fetchRow(DB_FETCHMODE_ASSOC)){ |
598 |
echo '<tr class="tab-data odd">'; |
599 |
|
600 |
// Libelle du lot |
601 |
echo '<td class="col-1 firstcol">'; |
602 |
echo $rowDonneesLotsDI["libelle"]; |
603 |
echo '</td>'; |
604 |
|
605 |
// Nom du pétitionnaire |
606 |
echo '<td class="col-1">'; |
607 |
echo $rowDonneesLotsDI["code"]." ".$rowDonneesLotsDI["demandeur"]; |
608 |
echo '</td>'; |
609 |
|
610 |
echo "</tr>"; |
611 |
} |
612 |
|
613 |
echo '</tbody>'; |
614 |
echo '</table>'; |
615 |
echo "<br/>"; |
616 |
|
617 |
} |
618 |
$form->finFieldset(array("1"=>"En cours d'instruction","2"=>"dossier_autorisation_visualisation"), $validation); |
619 |
} |
620 |
echo "\t</form>\n"; |
621 |
echo $bouton_retour; |
622 |
echo "</div>"; |
623 |
echo "</div>"; |
624 |
echo "<div id=\"ui-tabs-1\" class=\"i-tabs-panel ui-widget-content ui-corner-bottom\">"; |
625 |
echo "</div>"; |
626 |
echo "</div>"; |
627 |
} |
628 |
?> |