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 |
|
|
if($menu==1) |
24 |
|
|
$f = new utils(NULL, "dossier", _("dossier"), "ico_dossier.png", "dossier"); |
25 |
|
|
else{ // sans menu |
26 |
|
|
$f = new utils('nohtml', "dossier", _("dossier"), "ico_dossier.png", "dossier"); |
27 |
|
|
$f->setFlag("htmlonly"); |
28 |
|
|
} |
29 |
|
|
$f->display(); |
30 |
fraynaud |
104 |
if($menu==0) // html only |
31 |
|
|
$f->displayStartContent(); |
32 |
fraynaud |
88 |
// db |
33 |
|
|
if(file_exists ("../sql/".$f->db->phptype."/dossier.scr.inc")) |
34 |
|
|
include ("../sql/".$f->db->phptype."/dossier.scr.inc"); |
35 |
|
|
$res=$f->db->query($sql_dossier); |
36 |
|
|
$f->isDatabaseError($res); |
37 |
fraynaud |
126 |
if(isset($f->collectivite["departement"])) |
38 |
|
|
$departement =$f->collectivite["departement"]; |
39 |
|
|
else |
40 |
|
|
$departement=""; |
41 |
|
|
|
42 |
|
|
if(isset($f->collectivite["commune"])) |
43 |
|
|
$commune = $f->collectivite["commune"]; |
44 |
|
|
else |
45 |
|
|
$commune=""; |
46 |
fraynaud |
104 |
|
47 |
fraynaud |
88 |
while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)){ |
48 |
|
|
$existe=1; |
49 |
|
|
// dossier |
50 |
|
|
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content collapsible\">\n"; |
51 |
|
|
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
52 |
|
|
echo _("Dossier ")."</legend>"; |
53 |
fraynaud |
104 |
echo "<b>"._("tableau_bord")." "._("dossier")." ".$row['nature']."</b><br>"; |
54 |
|
|
echo " No ".$departement." ".$commune." ". |
55 |
|
|
$row['dossier']." "._("date_depot")." ".$row['date_depot']."<br>"; |
56 |
|
|
echo " "._("demandeur_nom")." : ".$row['demandeur_civilite']." ". |
57 |
|
|
$row['demandeur_nom']."<br>"; |
58 |
|
|
echo ""._("demandeur_adresse")." : ".$row['demandeur_adresse']." ". |
59 |
|
|
$row['demandeur_cp']." - ".$row['demandeur_ville']."<br>"; |
60 |
|
|
echo " "._("demandeur_societe")." : ".$row['demandeur_societe']."<br>"; |
61 |
|
|
echo "<br>"; |
62 |
|
|
echo "<a class='liendossier' href='".$lien_sig1.$row['rivoli'].$row['terrain_numero']. |
63 |
|
|
"' target=_blank><img src='img/sig.png'> adresse du terrain : ". |
64 |
|
|
$row['terrain_numero']." ". |
65 |
|
|
$row['terrain_adresse']." ".$row['terrain_cp']." - ". |
66 |
|
|
$row['terrain_ville']."</a><br>"; |
67 |
|
|
echo "<a class='liendossier' href='".$lien_sig.$row['parcelle']."' target=_blank><img src='img/sig.png'> parcelle : ". |
68 |
|
|
$row['parcelle']."</a><br>"; |
69 |
|
|
echo "<a class='liendossier' href='".$lien_sig2.$row['dossier']."' target=_blank><img src='img/sig.png'> dossier : ". |
70 |
|
|
$row['dossier']."</a><br>"; |
71 |
|
|
// dossier caracteristique |
72 |
fraynaud |
126 |
echo _("servitude")." : ".$row['servitude']."<br>"; |
73 |
fraynaud |
88 |
echo "<table width='95%'>"; |
74 |
|
|
echo "<tr ><td colspan='5'><b>"._("caracteristique")." : </b></td><tr>"; |
75 |
|
|
echo "<tr><td>"._("shob")." : ".$row['shob']. |
76 |
|
|
" m2 </td><td>"._("shon")." : ".$row['shon']." m2 "; |
77 |
|
|
echo "</td><td> "._("hauteur")." :".$row['hauteur']." m </td><td> "._("logement_nombre")." :". |
78 |
|
|
$row['logement_nombre']."</td><td> "._("batiment_nombre")." : ".$row['batiment_nombre']."</td><tr>"; |
79 |
|
|
echo "<tr><td colspan='5'>"._("travaux")." : ".$row['travaux']."</td><tr>"; |
80 |
fraynaud |
126 |
echo "<tr ><td colspan='5'><b>"._("instruction")." : </b></td><tr>"; |
81 |
fraynaud |
88 |
echo "<tr><td>"._("date_depot")." : ".$row['date_depot']." "; |
82 |
|
|
echo "</td><td>"._("date_notification_delai")." : ". |
83 |
|
|
$row['date_notification_delai']." - "; |
84 |
|
|
echo "</td><td>"._("date_limite").": ".$row['date_limite']. |
85 |
|
|
"</td><td></td><td></td></tr>"; |
86 |
|
|
echo "<tr><td>"._("date_validite")." : ".$row['date_validite']." "; |
87 |
|
|
echo "</td><td>"._("date_chantier")." : ". |
88 |
|
|
$row['date_chantier']." - "; |
89 |
|
|
echo "</td><td>"._("date_achevement").": ".$row['date_achevement']. |
90 |
|
|
"</td><td>"._("date_conformite").": ".$row['date_conformite']."</td><td></td></tr>"; |
91 |
|
|
echo "\t\t\t</table>\n"; |
92 |
|
|
echo "</fieldset>"; |
93 |
|
|
// instruction |
94 |
|
|
$res1=$f->db->query($sql_instruction); |
95 |
|
|
$f->isDatabaseError($res1); |
96 |
|
|
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content startClosed\">\n"; |
97 |
|
|
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
98 |
|
|
echo _("Instruction ")."</legend>"; |
99 |
|
|
echo "<table width='95%'>"; |
100 |
|
|
echo "<tr ><td colspan='4'><b>"._("instruction")."</b></td><tr>"; |
101 |
|
|
echo "<tr><td></td><td>"._("evenement")."</td><td>"._("lettretype")."</td><td>"._("datecourrier")."</td><tr>"; |
102 |
|
|
while ($row1=& $res1->fetchRow(DB_FETCHMODE_ASSOC)){ |
103 |
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=". |
104 |
fraynaud |
126 |
$row1['instruction']."' ><img src='../app/img/ico_pdf.png' border=0 ></a></td>"; |
105 |
fraynaud |
88 |
echo "<td>".$row1['evenement']."</td><td>". |
106 |
|
|
$row1['lettretype']."</td><td>".$row1['datecourrier']."</td><tr>"; |
107 |
|
|
} |
108 |
|
|
echo "</table>"; |
109 |
|
|
echo "</fieldset>"; |
110 |
|
|
|
111 |
|
|
// consultation |
112 |
|
|
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content startClosed\">\n"; |
113 |
|
|
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
114 |
|
|
echo _("Consultation ")."</legend>"; |
115 |
|
|
$res2=$f->db->query($sql_consultation); |
116 |
|
|
$f->isDatabaseError($res2); |
117 |
|
|
echo "<table width='95%'>"; |
118 |
|
|
echo "<tr ><td colspan='4'><b>"._("consultation")." : </b></td><tr>"; |
119 |
|
|
echo "<tr><td></td><td>"._("date_envoi")."</td><td>"._("avis"). |
120 |
|
|
"</td><td>"._("date_limite")."</td><tr>"; |
121 |
|
|
while ($row2=& $res2->fetchRow(DB_FETCHMODE_ASSOC)){ |
122 |
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=". |
123 |
fraynaud |
126 |
$row2['consultation']."' ><img src='../app/img/ico_pdf.png' border=0 ></a></td>"; |
124 |
fraynaud |
88 |
echo "<td>".$row2['envoi']."</td><td>". |
125 |
|
|
$row2['retour']."</td><td>".$row2['limite']."</td><tr>"; |
126 |
|
|
} |
127 |
|
|
echo "</table>"; |
128 |
|
|
echo "</fieldset>"; |
129 |
|
|
|
130 |
|
|
// terrain |
131 |
|
|
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content startClosed\">\n"; |
132 |
|
|
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
133 |
|
|
echo _("Terrain ")."</legend>"; |
134 |
|
|
$res3=$f->db->query($sql_terrain); |
135 |
|
|
$f->isDatabaseError($res3); |
136 |
|
|
echo "<table width='95%'>"; |
137 |
|
|
echo "<tr ><td colspan='3'><b>"._("terrain")." : </b></td><tr>"; |
138 |
|
|
echo "<tr><td>"._("parcelle")."</td><td>"._("proprietaire"). |
139 |
|
|
"</td><td>"._("surface")."</td><tr>"; |
140 |
|
|
while ($row3=& $res3->fetchRow(DB_FETCHMODE_ASSOC)){ |
141 |
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']. |
142 |
|
|
"' target=_blank><img src='img/sig.png'> ".$row3['parcelle']."</td><td>". |
143 |
fraynaud |
88 |
$row3['proprietaire']."</td><td>".$row3['surface']." m2</td><tr>"; |
144 |
|
|
} |
145 |
|
|
echo "</table>"; |
146 |
|
|
echo "</fieldset>"; |
147 |
|
|
|
148 |
|
|
// destination_shon |
149 |
|
|
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content startClosed\">\n"; |
150 |
|
|
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
151 |
|
|
echo _("Destination")."</legend>"; |
152 |
|
|
$res4=$f->db->query($sql_destination_shon); |
153 |
|
|
$f->isDatabaseError($res4); |
154 |
|
|
echo "<table width='95%'>"; |
155 |
|
|
echo "<tr ><td colspan='3'><b>"._("destination_shon")." : </b></td><tr>"; |
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 |
|
|
echo _("Modificatif")."</legend>"; |
169 |
|
|
$res5=$f->db->query($sql_modificatif); |
170 |
|
|
$f->isDatabaseError($res5); |
171 |
|
|
echo "<table width='95%'>"; |
172 |
|
|
echo "<tr ><td colspan='3'><b>"._("modificatif")." / ". |
173 |
|
|
_("transfert")." : </b></td><tr>"; |
174 |
|
|
echo "<tr><td>"._("date_demande")."</td><td>"._("demandeur_nom")."</td><td>Etat</td><tr>"; |
175 |
|
|
while ($row5=& $res5->fetchRow(DB_FETCHMODE_ASSOC)){ |
176 |
fraynaud |
104 |
echo "<tr><td>"; |
177 |
|
|
echo "<img src='img/ico_exemplaire.png'><a class='liendossier' href='dossier.php?id=". |
178 |
|
|
$row5['dossier']."&menu=".$menu."' > ".$row5['demande']."</a></td>"; |
179 |
fraynaud |
88 |
echo "<td>".$row5['demandeur_nom']."</td><td>".$row5['etat']."</td><tr>"; |
180 |
|
|
} |
181 |
|
|
echo "</table>"; |
182 |
|
|
echo "</fieldset>"; |
183 |
|
|
} // while dossier |
184 |
fraynaud |
104 |
if($menu==0){ |
185 |
fraynaud |
122 |
if($modificatif==0){ |
186 |
fraynaud |
104 |
echo "<center>"; |
187 |
|
|
$f->displayLinkJsCloseWindow(); // **** |
188 |
|
|
echo "</center>"; |
189 |
|
|
$f->displayEndContent(); |
190 |
fraynaud |
122 |
}else{ |
191 |
|
|
echo "\n<a class=\"retour\" "; |
192 |
|
|
//echo "href=\""; |
193 |
|
|
//echo "#"; |
194 |
|
|
//echo "\" "; |
195 |
|
|
//echo $objsf; |
196 |
|
|
//echo "onclick=\"ajaxIt('modificatif', '"; |
197 |
|
|
//// |
198 |
|
|
//echo "soustab.php"; |
199 |
|
|
//echo "?"; |
200 |
|
|
//echo "obj=modificatif"; |
201 |
|
|
////echo "&retourformulaire=".$retourformulaire; |
202 |
|
|
//echo "&idxformulaire=".$id; |
203 |
|
|
////echo "&premier=".$premiersf; |
204 |
|
|
////echo "&tricol=".$tricolsf; |
205 |
|
|
//// |
206 |
|
|
//echo "');"; |
207 |
|
|
//echo "\""; |
208 |
|
|
echo "href='../soustab.php?obj=modificatif&idxformulaire=".$id; |
209 |
|
|
echo ">"; |
210 |
|
|
// |
211 |
|
|
echo _("Retour"); |
212 |
|
|
// |
213 |
|
|
echo "</a>\n"; |
214 |
|
|
} |
215 |
fraynaud |
104 |
} |
216 |
fraynaud |
88 |
if($existe==0){ |
217 |
fraynaud |
104 |
$msg=$idx._(" inexistant en base openFoncier"); |
218 |
fraynaud |
88 |
$f->displayMessage($class, $message); |
219 |
|
|
} |
220 |
|
|
?> |