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 |
// 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 |
// db |
27 |
if(file_exists ("../sql/".$f->db->phptype."/dossier.scr.inc")) |
28 |
include ("../sql/".$f->db->phptype."/dossier.scr.inc"); |
29 |
$res=$f->db->query($sql_dossier); |
30 |
$f->isDatabaseError($res); |
31 |
while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)){ |
32 |
$existe=1; |
33 |
// dossier |
34 |
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content collapsible\">\n"; |
35 |
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
36 |
echo _("Dossier ")."</legend>"; |
37 |
echo "<table width='95%'>"; |
38 |
echo "<tr><td><b>"._("tableau_bord")." "._("dossier")." ".$row['nature']."</b></td>"; |
39 |
if($menu==1){ |
40 |
echo "<td align='right'>"; |
41 |
echo "</center></a></span></td><tr></table>"; |
42 |
}else{ |
43 |
echo "<td align='right'><a href='#' onclick='window.close();'><img src='../img/fermer_fenetre.gif' align='middle' alt='"._("fermer")."' title='"._("fermer")."' hspace='5' border='0'>"; |
44 |
echo "</center></a></span></td><tr></table>"; |
45 |
} |
46 |
echo "<table width='95%'><tr><td> No ".$departement." ".$commune." ". |
47 |
$row['dossier']." "._("date_depot")." ".$row['date_depot']."</td><tr>"; |
48 |
echo "<tr ><td> "._("demandeur_nom")." : ".$row['demandeur_civilite']." ". |
49 |
$row['demandeur_nom']."</td><tr>"; |
50 |
echo "<tr><td>"._("demandeur_adresse")." : ".$row['demandeur_adresse']." ". |
51 |
$row['demandeur_cp']." - ".$row['demandeur_ville']."</td><tr>"; |
52 |
echo "<tr><td> "._("demandeur_societe")." : ".$row['demandeur_societe']."</td><tr>"; |
53 |
echo "<tr><td><img src='../img/tb_fleche.png' alt='' title='' style='vertical-align:middle'/><a class='liendossier' href='". |
54 |
$lien_sig1.$row['rivoli'].$row['terrain_numero']. |
55 |
"' target=_blank><img src='../trs/".$image_sig."'> adresse du terrain : ". |
56 |
$row['terrain_numero']." ". |
57 |
$row['terrain_adresse']." ".$row['terrain_cp']." - ". |
58 |
$row['terrain_ville']. |
59 |
"<br></td><tr>"; |
60 |
echo "<tr><td><img src='../img/tb_fleche.png' alt='' title='' style='vertical-align:middle'/><a class='liendossier' href='". |
61 |
$lien_sig.$row['parcelle']."' target=_blank><img src='../trs/".$image_sig."'> parcelle : ". |
62 |
$row['parcelle']."<br></td>"; |
63 |
echo "<tr><td><img src='../img/tb_fleche.png' alt='' title='' style='vertical-align:middle'/><a class='liendossier' href='". |
64 |
$lien_sig2.$row['dossier']."' target=_blank><img src='../trs/".$image_sig."'> dossier : ". |
65 |
$row['dossier']."<br></td><tr>"; |
66 |
echo "</table>"; |
67 |
echo "<table width='95%'>"; |
68 |
echo "<tr ><td colspan='5'><b>"._("caracteristique")." : </b></td><tr>"; |
69 |
echo "<tr><td>"._("shob")." : ".$row['shob']. |
70 |
" m2 </td><td>"._("shon")." : ".$row['shon']." m2 "; |
71 |
echo "</td><td> "._("hauteur")." :".$row['hauteur']." m </td><td> "._("logement_nombre")." :". |
72 |
$row['logement_nombre']."</td><td> "._("batiment_nombre")." : ".$row['batiment_nombre']."</td><tr>"; |
73 |
echo "<tr><td colspan='5'>"._("travaux")." : ".$row['travaux']."</td><tr>"; |
74 |
echo "<tr><td>"._("date_depot")." : ".$row['date_depot']." "; |
75 |
echo "</td><td>"._("date_notification_delai")." : ". |
76 |
$row['date_notification_delai']." - "; |
77 |
echo "</td><td>"._("date_limite").": ".$row['date_limite']. |
78 |
"</td><td></td><td></td></tr>"; |
79 |
echo "<tr><td>"._("date_validite")." : ".$row['date_validite']." "; |
80 |
echo "</td><td>"._("date_chantier")." : ". |
81 |
$row['date_chantier']." - "; |
82 |
echo "</td><td>"._("date_achevement").": ".$row['date_achevement']. |
83 |
"</td><td>"._("date_conformite").": ".$row['date_conformite']."</td><td></td></tr>"; |
84 |
echo "\t\t\t</table>\n"; |
85 |
echo "</fieldset>"; |
86 |
|
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 |
echo "<tr ><td colspan='4'><b>"._("instruction")."</b></td><tr>"; |
95 |
echo "<tr><td></td><td>"._("evenement")."</td><td>"._("lettretype")."</td><td>"._("datecourrier")."</td><tr>"; |
96 |
while ($row1=& $res1->fetchRow(DB_FETCHMODE_ASSOC)){ |
97 |
echo "<tr><td><img src='../img/tb_fleche.png' alt='' title='' style='vertical-align:middle'/><a class='liendossier' href='../spc/pdflettretype_instruction.php?idx=". |
98 |
$row1['instruction']."' ><img src='../img/ico_pdf.png' border=0 ></a></td>"; |
99 |
echo "<td>".$row1['evenement']."</td><td>". |
100 |
$row1['lettretype']."</td><td>".$row1['datecourrier']."</td><tr>"; |
101 |
} |
102 |
echo "</table>"; |
103 |
echo "</fieldset>"; |
104 |
|
105 |
// consultation |
106 |
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content startClosed\">\n"; |
107 |
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
108 |
echo _("Consultation ")."</legend>"; |
109 |
$res2=$f->db->query($sql_consultation); |
110 |
$f->isDatabaseError($res2); |
111 |
echo "<table width='95%'>"; |
112 |
echo "<tr ><td colspan='4'><b>"._("consultation")." : </b></td><tr>"; |
113 |
echo "<tr><td></td><td>"._("date_envoi")."</td><td>"._("avis"). |
114 |
"</td><td>"._("date_limite")."</td><tr>"; |
115 |
while ($row2=& $res2->fetchRow(DB_FETCHMODE_ASSOC)){ |
116 |
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=". |
117 |
$row2['consultation']."' ><img src='../img/ico_pdf.png' border=0 ></a></td>"; |
118 |
echo "<td>".$row2['envoi']."</td><td>". |
119 |
$row2['retour']."</td><td>".$row2['limite']."</td><tr>"; |
120 |
} |
121 |
echo "</table>"; |
122 |
echo "</fieldset>"; |
123 |
|
124 |
// terrain |
125 |
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content startClosed\">\n"; |
126 |
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
127 |
echo _("Terrain ")."</legend>"; |
128 |
$res3=$f->db->query($sql_terrain); |
129 |
$f->isDatabaseError($res3); |
130 |
echo "<table width='95%'>"; |
131 |
echo "<tr ><td colspan='3'><b>"._("terrain")." : </b></td><tr>"; |
132 |
echo "<tr><td>"._("parcelle")."</td><td>"._("proprietaire"). |
133 |
"</td><td>"._("surface")."</td><tr>"; |
134 |
while ($row3=& $res3->fetchRow(DB_FETCHMODE_ASSOC)){ |
135 |
echo "<tr><td><img src='../img/tb_fleche.png' alt='' title='' style='vertical-align:middle'/><a class='liendossier' href='".$lien_sig.$row3['parcelle']. |
136 |
"' target=_blank><img src='../trs/".$image_sig."'> ".$row3['parcelle']."</td><td>". |
137 |
$row3['proprietaire']."</td><td>".$row3['surface']." m2</td><tr>"; |
138 |
} |
139 |
echo "</table>"; |
140 |
echo "</fieldset>"; |
141 |
|
142 |
// destination_shon |
143 |
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content startClosed\">\n"; |
144 |
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
145 |
echo _("Destination")."</legend>"; |
146 |
$res4=$f->db->query($sql_destination_shon); |
147 |
$f->isDatabaseError($res4); |
148 |
echo "<table width='95%'>"; |
149 |
echo "<tr ><td colspan='3'><b>"._("destination_shon")." : </b></td><tr>"; |
150 |
echo "<tr><td>No</td><td>"._("destination")."</td><td>". |
151 |
_("shon")."</td><tr>"; |
152 |
while ($row4=& $res4->fetchRow(DB_FETCHMODE_ASSOC)){ |
153 |
echo "<tr><td>".$row4['no']."</td><td>". |
154 |
$row4['libelle']."</td><td>".$row4['shon']." m2</td><tr>"; |
155 |
} |
156 |
echo "</table>"; |
157 |
echo "</fieldset>"; |
158 |
|
159 |
// modificatif |
160 |
echo "<fieldset class=\"cadre ui-corner-all ui-widget-content startClosed\">\n"; |
161 |
echo "\t<legend class=\"ui-corner-all ui-widget-content ui-state-active\">"; |
162 |
echo _("Modificatif")."</legend>"; |
163 |
$res5=$f->db->query($sql_modificatif); |
164 |
$f->isDatabaseError($res5); |
165 |
echo "<table width='95%'>"; |
166 |
echo "<tr ><td colspan='3'><b>"._("modificatif")." / ". |
167 |
_("transfert")." : </b></td><tr>"; |
168 |
echo "<tr><td>"._("date_demande")."</td><td>"._("demandeur_nom")."</td><td>Etat</td><tr>"; |
169 |
while ($row5=& $res5->fetchRow(DB_FETCHMODE_ASSOC)){ |
170 |
echo "<tr><td><img src='../img/tb_fleche.png' alt='' title='' style='vertical-align:middle'/><a class='liendossier' href='dossier.php?id=". |
171 |
$row5['dossier']."&menu=".$menu."' ><img src='../img/ico_exemplaire.png' border=0 > ".$row5['demande']."</a></td>"; |
172 |
echo "<td>".$row5['demandeur_nom']."</td><td>".$row5['etat']."</td><tr>"; |
173 |
} |
174 |
echo "</table>"; |
175 |
echo "</fieldset>"; |
176 |
} // while dossier |
177 |
if($existe==0){ |
178 |
$msg=$idx." inexistant en base odp"; |
179 |
$f->displayMessage($class, $message); |
180 |
} |
181 |
?> |