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