1 |
fraynaud |
88 |
<?php |
2 |
|
|
/* |
3 |
fmichon |
1184 |
$Id$ |
4 |
fraynaud |
88 |
*/ |
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 |
fraynaud |
122 |
if(isset($_GET['modificatif'])) |
18 |
|
|
$modificatif=$_GET['modificatif']; |
19 |
|
|
else |
20 |
|
|
$modificatif=0; |
21 |
fraynaud |
88 |
// utils |
22 |
|
|
require_once "../obj/utils.class.php"; |
23 |
jbastide |
158 |
if($menu==1 or $menu==2) |
24 |
fraynaud |
88 |
$f = new utils(NULL, "dossier", _("dossier"), "ico_dossier.png", "dossier"); |
25 |
|
|
else{ // sans menu |
26 |
jbastide |
158 |
if($menu==0){ |
27 |
fraynaud |
88 |
$f = new utils('nohtml', "dossier", _("dossier"), "ico_dossier.png", "dossier"); |
28 |
jbastide |
158 |
$f->setFlag("htmlonly"); |
29 |
|
|
} |
30 |
fraynaud |
88 |
} |
31 |
|
|
$f->display(); |
32 |
jbastide |
156 |
if($menu==1) // html only |
33 |
fraynaud |
104 |
$f->displayStartContent(); |
34 |
jbastide |
158 |
|
35 |
fraynaud |
88 |
// db |
36 |
atreal |
313 |
if(file_exists ("../sql/".$f->db->phptype."/dossier.scr.inc.php")) |
37 |
|
|
include ("../sql/".$f->db->phptype."/dossier.scr.inc.php"); |
38 |
fraynaud |
88 |
$res=$f->db->query($sql_dossier); |
39 |
|
|
$f->isDatabaseError($res); |
40 |
fraynaud |
126 |
if(isset($f->collectivite["departement"])) |
41 |
|
|
$departement =$f->collectivite["departement"]; |
42 |
|
|
else |
43 |
|
|
$departement=""; |
44 |
|
|
|
45 |
|
|
if(isset($f->collectivite["commune"])) |
46 |
|
|
$commune = $f->collectivite["commune"]; |
47 |
|
|
else |
48 |
|
|
$commune=""; |
49 |
fraynaud |
104 |
|
50 |
fraynaud |
88 |
while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)){ |
51 |
|
|
$existe=1; |
52 |
|
|
// dossier |
53 |
|
|
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content collapsible\">\n"; |
54 |
|
|
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
55 |
|
|
echo _("Dossier ")."</legend>"; |
56 |
fraynaud |
152 |
echo "<table width='95%'>"; |
57 |
|
|
echo "<tr><td colspan='5'><b>"._("tableau_bord")." "._("dossier")." ".$row['nature']."</b></td></tr>"; |
58 |
fraynaud |
197 |
echo "<tr><td colspan='5'><i> No </i> ".$departement." ".$commune." ".$row['dossier']." <i>"._("date_depot")." :</i>".$row['date_depot']."</td></tr>"; |
59 |
nhaye |
1373 |
echo "<tr><td colspan='5'>"; |
60 |
fraynaud |
197 |
echo "<a class='liendossier' href='".$lien_sig.$row['parcelle']."' target=_blank><span class=\"om-icon om-icon-16 om-icon-fix sig-16\" title=\""._("Sig")."\">"._("Sig")."</span><i> parcelle : </i>". |
61 |
fraynaud |
104 |
$row['parcelle']."</a><br>"; |
62 |
fraynaud |
197 |
echo "<a class='liendossier' href='".$lien_sig2.$row['dossier']."' target=_blank><span class=\"om-icon om-icon-16 om-icon-fix sig-16\" title=\""._("Sig")."\">"._("Sig")."</span><i> dossier : </i>". |
63 |
fraynaud |
152 |
$row['dossier']."</a></td></tr>"; |
64 |
fraynaud |
197 |
echo "<tr><td colspan='5'><b><i>Amenagement : </i></b><a class='liendossier' href='dossier.php?id=".$row['amenagement']."&menu=1'>". |
65 |
fraynaud |
152 |
$row['amenagement']."</a> - ".$row['parcelle_lot_lotissement']."</td></tr>"; |
66 |
fraynaud |
104 |
// dossier caracteristique |
67 |
fraynaud |
197 |
echo "<tr><td colspan='5'><b><i>"._("servitude")." : </i></b>".$row['servitude']."<br>"; |
68 |
fraynaud |
152 |
echo ""; |
69 |
fraynaud |
197 |
echo "<tr ><td colspan='5'><b><i>"._("caracteristique")." : </i></b></td><tr>"; |
70 |
|
|
echo "<tr><td><i>"._("shob")." : </i>".$row['shob']. |
71 |
|
|
" m2 </td><td><i>"._("shon")." : </i>".$row['shon']." m2 "; |
72 |
|
|
echo "</td><td><i>"._("hauteur")." :</i>".$row['hauteur']." m </td><td><i>"._("logement_nombre")." :</i>". |
73 |
|
|
$row['logement_nombre']."</td><td><i>"._("batiment_nombre")." : </i>".$row['batiment_nombre']."</td><tr>"; |
74 |
|
|
echo "<tr ><td colspan='5'><b><i>"._("Etat")." "._("instruction")." : </i></b></td><tr>"; |
75 |
|
|
echo "<tr><td><i>"._("date_depot")." : </i>".$row['date_depot']." "; |
76 |
|
|
echo "</td><td><i>"._("date_notification_delai")." : </i>". |
77 |
fraynaud |
88 |
$row['date_notification_delai']." - "; |
78 |
fraynaud |
197 |
echo "</td><td><i>"._("date_limite").": </i>".$row['date_limite']. |
79 |
fraynaud |
88 |
"</td><td></td><td></td></tr>"; |
80 |
fraynaud |
197 |
echo "<tr><td><i>"._("date_validite")." : </i>".$row['date_validite']." "; |
81 |
|
|
echo "</td><td><i>"._("date_chantier")." : </i>". |
82 |
|
|
$row['date_chantier'].""; |
83 |
|
|
echo "</td><td><i>"._("date_achevement").": </i>".$row['date_achevement']. |
84 |
|
|
"</td><td><i>"._("date_conformite").": </i>".$row['date_conformite']."</td><td></td></tr>"; |
85 |
fraynaud |
88 |
echo "\t\t\t</table>\n"; |
86 |
|
|
echo "</fieldset>"; |
87 |
|
|
// instruction |
88 |
|
|
$res1=$f->db->query($sql_instruction); |
89 |
|
|
$f->isDatabaseError($res1); |
90 |
|
|
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content startClosed\">\n"; |
91 |
|
|
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
92 |
|
|
echo _("Instruction ")."</legend>"; |
93 |
|
|
echo "<table width='95%'>"; |
94 |
vpihour |
1127 |
echo "<tr><td></td><td><i>"._("evenement")."</i></td><td><i>"._("lettretype")."</i></td><td><i>"._("date_evenement")."</i></td><tr>"; |
95 |
fraynaud |
88 |
while ($row1=& $res1->fetchRow(DB_FETCHMODE_ASSOC)){ |
96 |
fmichon |
1363 |
echo "<tr><td><a class='liendossier' target='_blank' href='../app/pdf_instruction.php?idx=". |
97 |
jbastide |
162 |
$row1['instruction']."' ><span class=\"om-icon om-icon-16 om-icon-fix pdf-16\" title=\""._("Edition")."\">"._("Edition")."</span></a></td>"; |
98 |
fraynaud |
88 |
echo "<td>".$row1['evenement']."</td><td>". |
99 |
vpihour |
1127 |
$row1['lettretype']."</td><td>".$row1['date_evenement']."</td><tr>"; |
100 |
fraynaud |
88 |
} |
101 |
|
|
echo "</table>"; |
102 |
|
|
echo "</fieldset>"; |
103 |
|
|
|
104 |
|
|
// consultation |
105 |
|
|
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content startClosed\">\n"; |
106 |
|
|
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
107 |
|
|
echo _("Consultation ")."</legend>"; |
108 |
|
|
$res2=$f->db->query($sql_consultation); |
109 |
|
|
$f->isDatabaseError($res2); |
110 |
|
|
echo "<table width='95%'>"; |
111 |
vpihour |
510 |
echo "<tr><td></td><td><i>"._("date_envoi")."</i></td><td><i>"._("avis_consultation"). |
112 |
fraynaud |
197 |
"</i></td><td><i>"._("date_envoi")."</i></td><td><i>"._("date_limite")."</i></td><tr>"; |
113 |
fraynaud |
88 |
while ($row2=& $res2->fetchRow(DB_FETCHMODE_ASSOC)){ |
114 |
fmichon |
1341 |
echo "<tr><td><a class='liendossier' href='../app/pdf_consultation.php?obj=consultation&idx=". |
115 |
jbastide |
162 |
$row2['consultation']."' ><span class=\"om-icon om-icon-16 om-icon-fix pdf-16\" title=\""._("Edition")."\">"._("Edition")."</span></a></td>"; |
116 |
vpihour |
510 |
echo "<td>".$row2['envoi']."</td><td>".$row2['avis_consultation']."</td><td>". |
117 |
fraynaud |
88 |
$row2['retour']."</td><td>".$row2['limite']."</td><tr>"; |
118 |
|
|
} |
119 |
|
|
echo "</table>"; |
120 |
|
|
echo "</fieldset>"; |
121 |
|
|
|
122 |
|
|
// terrain |
123 |
|
|
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content startClosed\">\n"; |
124 |
|
|
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
125 |
|
|
echo _("Terrain ")."</legend>"; |
126 |
|
|
$res3=$f->db->query($sql_terrain); |
127 |
|
|
$f->isDatabaseError($res3); |
128 |
|
|
echo "<table width='95%'>"; |
129 |
fraynaud |
197 |
echo "<tr><td><i>"._("parcelle")."</i></td><td><i>"._("proprietaire"). |
130 |
|
|
"</i></td><td><i>"._("surface")."</i></td><tr>"; |
131 |
fraynaud |
88 |
while ($row3=& $res3->fetchRow(DB_FETCHMODE_ASSOC)){ |
132 |
jbastide |
162 |
echo "<tr><td><a class='liendossier' href='".$lien_sig.$row3['parcelle']. |
133 |
|
|
"' target=_blank><span class=\"om-icon om-icon-16 om-icon-fix sig-16\" title=\""._("Sig")."\">"._("Sig")."</span> ".$row3['parcelle']."</td><td>". |
134 |
fraynaud |
88 |
$row3['proprietaire']."</td><td>".$row3['surface']." m2</td><tr>"; |
135 |
|
|
} |
136 |
|
|
echo "</table>"; |
137 |
|
|
echo "</fieldset>"; |
138 |
|
|
|
139 |
fraynaud |
196 |
|
140 |
fraynaud |
88 |
// modificatif |
141 |
|
|
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content startClosed\">\n"; |
142 |
|
|
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
143 |
fraynaud |
152 |
echo _("Modificatif")." "._("transfert")."</legend>"; |
144 |
fraynaud |
88 |
$res5=$f->db->query($sql_modificatif); |
145 |
|
|
$f->isDatabaseError($res5); |
146 |
|
|
echo "<table width='95%'>"; |
147 |
nhaye |
1373 |
echo "<tr><td><i>"._("date_demande")."</i></td><td></td><td><i>"._("Etat")."</i></td><tr>"; |
148 |
fraynaud |
88 |
while ($row5=& $res5->fetchRow(DB_FETCHMODE_ASSOC)){ |
149 |
fraynaud |
104 |
echo "<tr><td>"; |
150 |
fraynaud |
196 |
if($modificatif==0){ |
151 |
|
|
echo "<a class='liendossier' href='dossier.php?id=". |
152 |
|
|
$row5['dossier']."&menu=".$menu."' ><img src='img/ico_exemplaire.png'> ".$row5['demande']."</a></td>"; |
153 |
nhaye |
1373 |
echo "<td></td><td>".$row5['etat']."</td><tr>"; |
154 |
fraynaud |
196 |
}else{ |
155 |
|
|
echo "".$row5['demande']."</td>"; |
156 |
nhaye |
1373 |
echo "<td></td><td>".$row5['etat']."</td><tr>"; |
157 |
fraynaud |
196 |
} |
158 |
fraynaud |
88 |
} |
159 |
|
|
echo "</table>"; |
160 |
|
|
echo "</fieldset>"; |
161 |
|
|
} // while dossier |
162 |
fraynaud |
104 |
if($menu==0){ |
163 |
fraynaud |
122 |
if($modificatif==0){ |
164 |
fraynaud |
104 |
echo "<center>"; |
165 |
|
|
$f->displayLinkJsCloseWindow(); // **** |
166 |
|
|
echo "</center>"; |
167 |
|
|
$f->displayEndContent(); |
168 |
fraynaud |
122 |
} |
169 |
fraynaud |
104 |
} |
170 |
jbastide |
158 |
|
171 |
fraynaud |
88 |
if($existe==0){ |
172 |
fraynaud |
104 |
$msg=$idx._(" inexistant en base openFoncier"); |
173 |
fraynaud |
88 |
$f->displayMessage($class, $message); |
174 |
|
|
} |
175 |
|
|
?> |