1 |
fraynaud |
25 |
<?php |
2 |
|
|
//$Id: dossier.scr.inc,v 1.3 2010-08-22 21:40:12 fraynaud Exp $ |
3 |
|
|
$sql_dossier="select |
4 |
|
|
dossier,nature.libelle as nature, |
5 |
|
|
demandeur_civilite,demandeur_nom,demandeur_societe, |
6 |
|
|
demandeur_adresse,demandeur_cp,demandeur_ville, |
7 |
|
|
terrain_numero, terrain_adresse, terrain_cp, terrain_ville, rivoli,parcelle, |
8 |
|
|
terrain_surface, hauteur, shon, shob, batiment_nombre, logement_nombre, delai, |
9 |
|
|
to_char(date_depot,'DD/MM/YYYY') as date_depot, |
10 |
|
|
to_char(date_validite,'DD/MM/YYYY') as date_validite, |
11 |
|
|
to_char(date_chantier,'DD/MM/YYYY') as date_chantier, |
12 |
|
|
to_char(date_achevement,'DD/MM/YYYY') as date_achevement, |
13 |
|
|
to_char(date_conformite,'DD/MM/YYYY') as date_conformite, |
14 |
|
|
to_char(date_complet,'DD/MM/YYYY') as date_complet, |
15 |
|
|
to_char(date_notification_delai,'DD/MM/YYYY') as date_notification_delai, |
16 |
|
|
to_char(date_limite,'DD/MM/YYYY') as date_limite, |
17 |
fraynaud |
152 |
travaux.libelle as travaux, servitude, |
18 |
|
|
amenagement,parcelle_lot_lotissement |
19 |
fraynaud |
25 |
from dossier inner join nature on nature.nature = dossier.nature |
20 |
|
|
left join travaux on dossier.travaux=travaux.travaux |
21 |
|
|
where dossier = '".$id."'"; |
22 |
|
|
|
23 |
|
|
$sql_instruction="SELECT instruction,evenement.libelle as evenement, instruction.lettretype, |
24 |
|
|
to_char(datecourrier,'DD/MM/YYYY') as datecourrier from instruction inner join evenement on evenement.evenement = instruction.evenement |
25 |
|
|
where dossier = '".$id."'"; |
26 |
|
|
|
27 |
|
|
$sql_consultation="select consultation,(service.libelle||' '||to_char(date_envoi,'DD/MM/YYYY')) as envoi, |
28 |
|
|
to_char(date_retour,'DD/MM/YYYY') as retour, |
29 |
|
|
to_char(date_limite,'DD/MM/YYYY') as limite |
30 |
|
|
from consultation inner join service on service.service = consultation.service |
31 |
|
|
left join avis on avis.avis=consultation.avis |
32 |
|
|
where consultation.dossier = '".$id."'"; |
33 |
|
|
|
34 |
|
|
$sql_terrain ="SELECT terrain.parcelle, (proprietaire.nom|| ' '|| proprietaire.prenom) as proprietaire, |
35 |
|
|
parcelle.surface from terrain inner join parcelle on terrain.parcelle = parcelle.parcelle left join proprietaire on proprietaire.proprietaire = parcelle.proprietaire |
36 |
|
|
where dossier = '".$id."'"; |
37 |
|
|
|
38 |
|
|
$sql_destination_shon="SELECT destination_shon as no,destination.libelle, shon from destination_shon inner join destination on destination_shon.destination=destination.destination |
39 |
|
|
where dossier = '".$id."'"; |
40 |
|
|
|
41 |
|
|
$sql_modificatif="select dossier, |
42 |
|
|
(dossier||' '||types||' du '||to_char(date_demande,'DD/MM/YYYY')) as demande, |
43 |
|
|
demandeur_nom,etat from dossier |
44 |
|
|
where substring(dossier,1,9) like substring('".$id."',1,9)"; |
45 |
|
|
?> |