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 |
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 |
|
|
if(file_exists ("../sql/".$f->db->phptype."/dossier.scr.inc")) |
37 |
|
|
include ("../sql/".$f->db->phptype."/dossier.scr.inc"); |
38 |
|
|
$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 |
|
|
echo "<tr><td colspan='5'> No ".$departement." ".$commune." ".$row['dossier']." "._("date_depot")." ".$row['date_depot']."</td></tr>"; |
59 |
|
|
echo "<tr><td colspan='5'> "._("demandeur_nom")." : ".$row['demandeur_civilite']." ". $row['demandeur_nom']."<br>"; |
60 |
fraynaud |
104 |
echo ""._("demandeur_adresse")." : ".$row['demandeur_adresse']." ". |
61 |
fraynaud |
152 |
$row['demandeur_cp']." - ".$row['demandeur_ville']."</td></tr>"; |
62 |
|
|
echo "<tr><td colspan='5'> "._("demandeur_societe")." : ".$row['demandeur_societe']."</td></tr>"; |
63 |
|
|
//echo "<br>"; |
64 |
|
|
echo "<tr><td colspan='5'><a class='liendossier' href='".$lien_sig1.$row['rivoli'].$row['terrain_numero']. |
65 |
fraynaud |
104 |
"' target=_blank><img src='img/sig.png'> adresse du terrain : ". |
66 |
|
|
$row['terrain_numero']." ". |
67 |
|
|
$row['terrain_adresse']." ".$row['terrain_cp']." - ". |
68 |
|
|
$row['terrain_ville']."</a><br>"; |
69 |
|
|
echo "<a class='liendossier' href='".$lien_sig.$row['parcelle']."' target=_blank><img src='img/sig.png'> parcelle : ". |
70 |
|
|
$row['parcelle']."</a><br>"; |
71 |
|
|
echo "<a class='liendossier' href='".$lien_sig2.$row['dossier']."' target=_blank><img src='img/sig.png'> dossier : ". |
72 |
fraynaud |
152 |
$row['dossier']."</a></td></tr>"; |
73 |
|
|
echo "<tr><td colspan='5'><b>Amenagement : </b><a class='liendossier' href='dossier.php?id=".$row['amenagement']."&menu=1'>". |
74 |
|
|
$row['amenagement']."</a> - ".$row['parcelle_lot_lotissement']."</td></tr>"; |
75 |
fraynaud |
104 |
// dossier caracteristique |
76 |
fraynaud |
152 |
echo "<tr><td colspan='5'><b>"._("servitude")." : </b>".$row['servitude']."<br>"; |
77 |
|
|
echo ""; |
78 |
fraynaud |
88 |
echo "<tr ><td colspan='5'><b>"._("caracteristique")." : </b></td><tr>"; |
79 |
|
|
echo "<tr><td>"._("shob")." : ".$row['shob']. |
80 |
|
|
" m2 </td><td>"._("shon")." : ".$row['shon']." m2 "; |
81 |
|
|
echo "</td><td> "._("hauteur")." :".$row['hauteur']." m </td><td> "._("logement_nombre")." :". |
82 |
|
|
$row['logement_nombre']."</td><td> "._("batiment_nombre")." : ".$row['batiment_nombre']."</td><tr>"; |
83 |
|
|
echo "<tr><td colspan='5'>"._("travaux")." : ".$row['travaux']."</td><tr>"; |
84 |
fraynaud |
152 |
echo "<tr ><td colspan='5'><b>"._("Etat")." "._("instruction")." : </b></td><tr>"; |
85 |
fraynaud |
88 |
echo "<tr><td>"._("date_depot")." : ".$row['date_depot']." "; |
86 |
|
|
echo "</td><td>"._("date_notification_delai")." : ". |
87 |
|
|
$row['date_notification_delai']." - "; |
88 |
|
|
echo "</td><td>"._("date_limite").": ".$row['date_limite']. |
89 |
|
|
"</td><td></td><td></td></tr>"; |
90 |
|
|
echo "<tr><td>"._("date_validite")." : ".$row['date_validite']." "; |
91 |
|
|
echo "</td><td>"._("date_chantier")." : ". |
92 |
|
|
$row['date_chantier']." - "; |
93 |
|
|
echo "</td><td>"._("date_achevement").": ".$row['date_achevement']. |
94 |
|
|
"</td><td>"._("date_conformite").": ".$row['date_conformite']."</td><td></td></tr>"; |
95 |
|
|
echo "\t\t\t</table>\n"; |
96 |
|
|
echo "</fieldset>"; |
97 |
|
|
// instruction |
98 |
|
|
$res1=$f->db->query($sql_instruction); |
99 |
|
|
$f->isDatabaseError($res1); |
100 |
|
|
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content startClosed\">\n"; |
101 |
|
|
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
102 |
|
|
echo _("Instruction ")."</legend>"; |
103 |
|
|
echo "<table width='95%'>"; |
104 |
|
|
echo "<tr><td></td><td>"._("evenement")."</td><td>"._("lettretype")."</td><td>"._("datecourrier")."</td><tr>"; |
105 |
|
|
while ($row1=& $res1->fetchRow(DB_FETCHMODE_ASSOC)){ |
106 |
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=". |
107 |
fraynaud |
126 |
$row1['instruction']."' ><img src='../app/img/ico_pdf.png' border=0 ></a></td>"; |
108 |
fraynaud |
88 |
echo "<td>".$row1['evenement']."</td><td>". |
109 |
|
|
$row1['lettretype']."</td><td>".$row1['datecourrier']."</td><tr>"; |
110 |
|
|
} |
111 |
|
|
echo "</table>"; |
112 |
|
|
echo "</fieldset>"; |
113 |
|
|
|
114 |
|
|
// consultation |
115 |
|
|
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content startClosed\">\n"; |
116 |
|
|
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
117 |
|
|
echo _("Consultation ")."</legend>"; |
118 |
|
|
$res2=$f->db->query($sql_consultation); |
119 |
|
|
$f->isDatabaseError($res2); |
120 |
|
|
echo "<table width='95%'>"; |
121 |
|
|
echo "<tr><td></td><td>"._("date_envoi")."</td><td>"._("avis"). |
122 |
|
|
"</td><td>"._("date_limite")."</td><tr>"; |
123 |
|
|
while ($row2=& $res2->fetchRow(DB_FETCHMODE_ASSOC)){ |
124 |
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=". |
125 |
fraynaud |
126 |
$row2['consultation']."' ><img src='../app/img/ico_pdf.png' border=0 ></a></td>"; |
126 |
fraynaud |
88 |
echo "<td>".$row2['envoi']."</td><td>". |
127 |
|
|
$row2['retour']."</td><td>".$row2['limite']."</td><tr>"; |
128 |
|
|
} |
129 |
|
|
echo "</table>"; |
130 |
|
|
echo "</fieldset>"; |
131 |
|
|
|
132 |
|
|
// terrain |
133 |
|
|
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content startClosed\">\n"; |
134 |
|
|
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
135 |
|
|
echo _("Terrain ")."</legend>"; |
136 |
|
|
$res3=$f->db->query($sql_terrain); |
137 |
|
|
$f->isDatabaseError($res3); |
138 |
|
|
echo "<table width='95%'>"; |
139 |
|
|
echo "<tr><td>"._("parcelle")."</td><td>"._("proprietaire"). |
140 |
|
|
"</td><td>"._("surface")."</td><tr>"; |
141 |
|
|
while ($row3=& $res3->fetchRow(DB_FETCHMODE_ASSOC)){ |
142 |
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']. |
143 |
|
|
"' target=_blank><img src='img/sig.png'> ".$row3['parcelle']."</td><td>". |
144 |
fraynaud |
88 |
$row3['proprietaire']."</td><td>".$row3['surface']." m2</td><tr>"; |
145 |
|
|
} |
146 |
|
|
echo "</table>"; |
147 |
|
|
echo "</fieldset>"; |
148 |
|
|
|
149 |
|
|
// destination_shon |
150 |
|
|
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content startClosed\">\n"; |
151 |
|
|
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
152 |
|
|
echo _("Destination")."</legend>"; |
153 |
|
|
$res4=$f->db->query($sql_destination_shon); |
154 |
|
|
$f->isDatabaseError($res4); |
155 |
|
|
echo "<table width='95%'>"; |
156 |
|
|
echo "<tr><td>No</td><td>"._("destination")."</td><td>". |
157 |
|
|
_("shon")."</td><tr>"; |
158 |
|
|
while ($row4=& $res4->fetchRow(DB_FETCHMODE_ASSOC)){ |
159 |
|
|
echo "<tr><td>".$row4['no']."</td><td>". |
160 |
|
|
$row4['libelle']."</td><td>".$row4['shon']." m2</td><tr>"; |
161 |
|
|
} |
162 |
|
|
echo "</table>"; |
163 |
|
|
echo "</fieldset>"; |
164 |
|
|
|
165 |
|
|
// modificatif |
166 |
|
|
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content startClosed\">\n"; |
167 |
|
|
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
168 |
fraynaud |
152 |
echo _("Modificatif")." "._("transfert")."</legend>"; |
169 |
fraynaud |
88 |
$res5=$f->db->query($sql_modificatif); |
170 |
|
|
$f->isDatabaseError($res5); |
171 |
|
|
echo "<table width='95%'>"; |
172 |
|
|
echo "<tr><td>"._("date_demande")."</td><td>"._("demandeur_nom")."</td><td>Etat</td><tr>"; |
173 |
|
|
while ($row5=& $res5->fetchRow(DB_FETCHMODE_ASSOC)){ |
174 |
fraynaud |
104 |
echo "<tr><td>"; |
175 |
|
|
echo "<img src='img/ico_exemplaire.png'><a class='liendossier' href='dossier.php?id=". |
176 |
|
|
$row5['dossier']."&menu=".$menu."' > ".$row5['demande']."</a></td>"; |
177 |
fraynaud |
88 |
echo "<td>".$row5['demandeur_nom']."</td><td>".$row5['etat']."</td><tr>"; |
178 |
|
|
} |
179 |
|
|
echo "</table>"; |
180 |
|
|
echo "</fieldset>"; |
181 |
|
|
} // while dossier |
182 |
fraynaud |
104 |
if($menu==0){ |
183 |
fraynaud |
122 |
if($modificatif==0){ |
184 |
fraynaud |
104 |
echo "<center>"; |
185 |
|
|
$f->displayLinkJsCloseWindow(); // **** |
186 |
|
|
echo "</center>"; |
187 |
|
|
$f->displayEndContent(); |
188 |
fraynaud |
122 |
}else{ |
189 |
|
|
echo "\n<a class=\"retour\" "; |
190 |
fraynaud |
152 |
echo "href='../soustab.php?obj=modificatif&idxformulaire=".$id; |
191 |
|
|
echo ">"; |
192 |
|
|
// |
193 |
|
|
echo _("Retour"); |
194 |
|
|
// |
195 |
|
|
echo "</a>\n"; |
196 |
fraynaud |
122 |
} |
197 |
fraynaud |
104 |
} |
198 |
jbastide |
158 |
|
199 |
fraynaud |
88 |
if($existe==0){ |
200 |
fraynaud |
104 |
$msg=$idx._(" inexistant en base openFoncier"); |
201 |
fraynaud |
88 |
$f->displayMessage($class, $message); |
202 |
|
|
} |
203 |
|
|
?> |