1 |
fraynaud |
88 |
<?php |
2 |
|
|
/* |
3 |
|
|
$Id: dossier.php,v 1.14 2009-12-10 15:24:23 fraynaud Exp $ |
4 |
|
|
*/ |
5 |
|
|
// INITIALISATION DES VARIABLES |
6 |
|
|
include ("../dyn/var.inc"); |
7 |
|
|
$DEBUG = 0; |
8 |
|
|
$existe=0; |
9 |
|
|
if(isset($_GET['id'])) |
10 |
|
|
$id=$_GET['id']; |
11 |
|
|
else |
12 |
|
|
$id=""; |
13 |
|
|
if(isset($_GET['menu'])) |
14 |
|
|
$menu=$_GET['menu']; |
15 |
|
|
else |
16 |
|
|
$menu=0; |
17 |
|
|
// utils |
18 |
|
|
require_once "../obj/utils.class.php"; |
19 |
|
|
if($menu==1) |
20 |
|
|
$f = new utils(NULL, "dossier", _("dossier"), "ico_dossier.png", "dossier"); |
21 |
|
|
else{ // sans menu |
22 |
|
|
$f = new utils('nohtml', "dossier", _("dossier"), "ico_dossier.png", "dossier"); |
23 |
|
|
$f->setFlag("htmlonly"); |
24 |
|
|
} |
25 |
|
|
$f->display(); |
26 |
fraynaud |
104 |
if($menu==0) // html only |
27 |
|
|
$f->displayStartContent(); |
28 |
fraynaud |
88 |
// db |
29 |
|
|
if(file_exists ("../sql/".$f->db->phptype."/dossier.scr.inc")) |
30 |
|
|
include ("../sql/".$f->db->phptype."/dossier.scr.inc"); |
31 |
|
|
$res=$f->db->query($sql_dossier); |
32 |
|
|
$f->isDatabaseError($res); |
33 |
fraynaud |
104 |
|
34 |
fraynaud |
88 |
while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)){ |
35 |
|
|
$existe=1; |
36 |
|
|
// dossier |
37 |
|
|
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content collapsible\">\n"; |
38 |
|
|
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
39 |
|
|
echo _("Dossier ")."</legend>"; |
40 |
fraynaud |
104 |
echo "<b>"._("tableau_bord")." "._("dossier")." ".$row['nature']."</b><br>"; |
41 |
|
|
echo " No ".$departement." ".$commune." ". |
42 |
|
|
$row['dossier']." "._("date_depot")." ".$row['date_depot']."<br>"; |
43 |
|
|
echo " "._("demandeur_nom")." : ".$row['demandeur_civilite']." ". |
44 |
|
|
$row['demandeur_nom']."<br>"; |
45 |
|
|
echo ""._("demandeur_adresse")." : ".$row['demandeur_adresse']." ". |
46 |
|
|
$row['demandeur_cp']." - ".$row['demandeur_ville']."<br>"; |
47 |
|
|
echo " "._("demandeur_societe")." : ".$row['demandeur_societe']."<br>"; |
48 |
|
|
echo "<br>"; |
49 |
|
|
echo "<a class='liendossier' href='".$lien_sig1.$row['rivoli'].$row['terrain_numero']. |
50 |
|
|
"' target=_blank><img src='img/sig.png'> adresse du terrain : ". |
51 |
|
|
$row['terrain_numero']." ". |
52 |
|
|
$row['terrain_adresse']." ".$row['terrain_cp']." - ". |
53 |
|
|
$row['terrain_ville']."</a><br>"; |
54 |
|
|
echo "<a class='liendossier' href='".$lien_sig.$row['parcelle']."' target=_blank><img src='img/sig.png'> parcelle : ". |
55 |
|
|
$row['parcelle']."</a><br>"; |
56 |
|
|
echo "<a class='liendossier' href='".$lien_sig2.$row['dossier']."' target=_blank><img src='img/sig.png'> dossier : ". |
57 |
|
|
$row['dossier']."</a><br>"; |
58 |
|
|
// dossier caracteristique |
59 |
fraynaud |
88 |
echo "<table width='95%'>"; |
60 |
|
|
echo "<tr ><td colspan='5'><b>"._("caracteristique")." : </b></td><tr>"; |
61 |
|
|
echo "<tr><td>"._("shob")." : ".$row['shob']. |
62 |
|
|
" m2 </td><td>"._("shon")." : ".$row['shon']." m2 "; |
63 |
|
|
echo "</td><td> "._("hauteur")." :".$row['hauteur']." m </td><td> "._("logement_nombre")." :". |
64 |
|
|
$row['logement_nombre']."</td><td> "._("batiment_nombre")." : ".$row['batiment_nombre']."</td><tr>"; |
65 |
|
|
echo "<tr><td colspan='5'>"._("travaux")." : ".$row['travaux']."</td><tr>"; |
66 |
|
|
echo "<tr><td>"._("date_depot")." : ".$row['date_depot']." "; |
67 |
|
|
echo "</td><td>"._("date_notification_delai")." : ". |
68 |
|
|
$row['date_notification_delai']." - "; |
69 |
|
|
echo "</td><td>"._("date_limite").": ".$row['date_limite']. |
70 |
|
|
"</td><td></td><td></td></tr>"; |
71 |
|
|
echo "<tr><td>"._("date_validite")." : ".$row['date_validite']." "; |
72 |
|
|
echo "</td><td>"._("date_chantier")." : ". |
73 |
|
|
$row['date_chantier']." - "; |
74 |
|
|
echo "</td><td>"._("date_achevement").": ".$row['date_achevement']. |
75 |
|
|
"</td><td>"._("date_conformite").": ".$row['date_conformite']."</td><td></td></tr>"; |
76 |
|
|
echo "\t\t\t</table>\n"; |
77 |
|
|
echo "</fieldset>"; |
78 |
|
|
// instruction |
79 |
|
|
$res1=$f->db->query($sql_instruction); |
80 |
|
|
$f->isDatabaseError($res1); |
81 |
|
|
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content startClosed\">\n"; |
82 |
|
|
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
83 |
|
|
echo _("Instruction ")."</legend>"; |
84 |
|
|
echo "<table width='95%'>"; |
85 |
|
|
echo "<tr ><td colspan='4'><b>"._("instruction")."</b></td><tr>"; |
86 |
|
|
echo "<tr><td></td><td>"._("evenement")."</td><td>"._("lettretype")."</td><td>"._("datecourrier")."</td><tr>"; |
87 |
|
|
while ($row1=& $res1->fetchRow(DB_FETCHMODE_ASSOC)){ |
88 |
fraynaud |
104 |
echo "<tr><td><img src='img/tb_fleche.png' alt='' title='' style='vertical-align:middle'/><a class='liendossier' href='../app/pdflettretype_instruction.php?idx=". |
89 |
|
|
$row1['instruction']."' ><img src='img/ico_pdf.png' border=0 ></a></td>"; |
90 |
fraynaud |
88 |
echo "<td>".$row1['evenement']."</td><td>". |
91 |
|
|
$row1['lettretype']."</td><td>".$row1['datecourrier']."</td><tr>"; |
92 |
|
|
} |
93 |
|
|
echo "</table>"; |
94 |
|
|
echo "</fieldset>"; |
95 |
|
|
|
96 |
|
|
// consultation |
97 |
|
|
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content startClosed\">\n"; |
98 |
|
|
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
99 |
|
|
echo _("Consultation ")."</legend>"; |
100 |
|
|
$res2=$f->db->query($sql_consultation); |
101 |
|
|
$f->isDatabaseError($res2); |
102 |
|
|
echo "<table width='95%'>"; |
103 |
|
|
echo "<tr ><td colspan='4'><b>"._("consultation")." : </b></td><tr>"; |
104 |
|
|
echo "<tr><td></td><td>"._("date_envoi")."</td><td>"._("avis"). |
105 |
|
|
"</td><td>"._("date_limite")."</td><tr>"; |
106 |
|
|
while ($row2=& $res2->fetchRow(DB_FETCHMODE_ASSOC)){ |
107 |
fraynaud |
104 |
echo "<tr><td><img src='img/tb_fleche.png' alt='' title='' style='vertical-align:middle'/><a class='liendossier' href='../pdf/pdfetat.php?obj=consultation&idx=". |
108 |
|
|
$row2['consultation']."' ><img src='img/ico_pdf.png' border=0 ></a></td>"; |
109 |
fraynaud |
88 |
echo "<td>".$row2['envoi']."</td><td>". |
110 |
|
|
$row2['retour']."</td><td>".$row2['limite']."</td><tr>"; |
111 |
|
|
} |
112 |
|
|
echo "</table>"; |
113 |
|
|
echo "</fieldset>"; |
114 |
|
|
|
115 |
|
|
// terrain |
116 |
|
|
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content startClosed\">\n"; |
117 |
|
|
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
118 |
|
|
echo _("Terrain ")."</legend>"; |
119 |
|
|
$res3=$f->db->query($sql_terrain); |
120 |
|
|
$f->isDatabaseError($res3); |
121 |
|
|
echo "<table width='95%'>"; |
122 |
|
|
echo "<tr ><td colspan='3'><b>"._("terrain")." : </b></td><tr>"; |
123 |
|
|
echo "<tr><td>"._("parcelle")."</td><td>"._("proprietaire"). |
124 |
|
|
"</td><td>"._("surface")."</td><tr>"; |
125 |
|
|
while ($row3=& $res3->fetchRow(DB_FETCHMODE_ASSOC)){ |
126 |
fraynaud |
104 |
echo "<tr><td><img src='img/tb_fleche.png' alt='' title='' style='vertical-align:middle'/><a class='liendossier' href='".$lien_sig.$row3['parcelle']. |
127 |
|
|
"' target=_blank><img src='img/sig.png'> ".$row3['parcelle']."</td><td>". |
128 |
fraynaud |
88 |
$row3['proprietaire']."</td><td>".$row3['surface']." m2</td><tr>"; |
129 |
|
|
} |
130 |
|
|
echo "</table>"; |
131 |
|
|
echo "</fieldset>"; |
132 |
|
|
|
133 |
|
|
// destination_shon |
134 |
|
|
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content startClosed\">\n"; |
135 |
|
|
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
136 |
|
|
echo _("Destination")."</legend>"; |
137 |
|
|
$res4=$f->db->query($sql_destination_shon); |
138 |
|
|
$f->isDatabaseError($res4); |
139 |
|
|
echo "<table width='95%'>"; |
140 |
|
|
echo "<tr ><td colspan='3'><b>"._("destination_shon")." : </b></td><tr>"; |
141 |
|
|
echo "<tr><td>No</td><td>"._("destination")."</td><td>". |
142 |
|
|
_("shon")."</td><tr>"; |
143 |
|
|
while ($row4=& $res4->fetchRow(DB_FETCHMODE_ASSOC)){ |
144 |
|
|
echo "<tr><td>".$row4['no']."</td><td>". |
145 |
|
|
$row4['libelle']."</td><td>".$row4['shon']." m2</td><tr>"; |
146 |
|
|
} |
147 |
|
|
echo "</table>"; |
148 |
|
|
echo "</fieldset>"; |
149 |
|
|
|
150 |
|
|
// modificatif |
151 |
|
|
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content startClosed\">\n"; |
152 |
|
|
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
153 |
|
|
echo _("Modificatif")."</legend>"; |
154 |
|
|
$res5=$f->db->query($sql_modificatif); |
155 |
|
|
$f->isDatabaseError($res5); |
156 |
|
|
echo "<table width='95%'>"; |
157 |
|
|
echo "<tr ><td colspan='3'><b>"._("modificatif")." / ". |
158 |
|
|
_("transfert")." : </b></td><tr>"; |
159 |
|
|
echo "<tr><td>"._("date_demande")."</td><td>"._("demandeur_nom")."</td><td>Etat</td><tr>"; |
160 |
|
|
while ($row5=& $res5->fetchRow(DB_FETCHMODE_ASSOC)){ |
161 |
fraynaud |
104 |
echo "<tr><td>"; |
162 |
|
|
echo "<img src='img/ico_exemplaire.png'><a class='liendossier' href='dossier.php?id=". |
163 |
|
|
$row5['dossier']."&menu=".$menu."' > ".$row5['demande']."</a></td>"; |
164 |
fraynaud |
88 |
echo "<td>".$row5['demandeur_nom']."</td><td>".$row5['etat']."</td><tr>"; |
165 |
|
|
} |
166 |
|
|
echo "</table>"; |
167 |
|
|
echo "</fieldset>"; |
168 |
|
|
} // while dossier |
169 |
fraynaud |
104 |
if($menu==0){ |
170 |
|
|
echo "<center>"; |
171 |
|
|
$f->displayLinkJsCloseWindow(); // **** |
172 |
|
|
echo "</center>"; |
173 |
|
|
$f->displayEndContent(); |
174 |
|
|
} |
175 |
fraynaud |
88 |
if($existe==0){ |
176 |
fraynaud |
104 |
$msg=$idx._(" inexistant en base openFoncier"); |
177 |
fraynaud |
88 |
$f->displayMessage($class, $message); |
178 |
|
|
} |
179 |
|
|
?> |