1 |
<?php |
<?php |
2 |
// $Id: export_pc.php,v 1.10 2010-03-16 19:45:04 fraynaud Exp $ |
// $Id: export_pc.php,v 1.10 2010-03-16 19:45:04 fraynaud Exp $ |
3 |
/* |
/* |
4 |
transfert de dossier � la DGI Cadstre |
transfert de dossier � la DGI Cadstre |
5 |
*/ |
*/ |
6 |
require_once "../obj/utils.class.php"; |
require_once "../obj/utils.class.php"; |
7 |
$f = new utils(NULL, "export_pc", _("export PC"), "ico_export.png", "export"); |
$f = new utils(NULL, "export_pc", _("export PC"), "ico_export.png", "export"); |
35 |
echo "<input type='text' name='datefin' id=\"datefin\" value=\""; |
echo "<input type='text' name='datefin' id=\"datefin\" value=\""; |
36 |
echo "\" size=\"15\" class=\"champFormulaire datepicker\" onchange='fdate(this)' onkeyup=\"\" onclick=\"\" />"; |
echo "\" size=\"15\" class=\"champFormulaire datepicker\" onchange='fdate(this)' onkeyup=\"\" onclick=\"\" />"; |
37 |
echo " avis "; |
echo " avis "; |
38 |
echo "<select name='avis' class='champFormulaire' >"; |
echo "<select name='avis_decision' class='champFormulaire' >"; |
39 |
$sql = "SELECT distinct(typeavis) from avis where typeavis <> ''"; |
$sql = "SELECT distinct(typeavis) from avis_decision where typeavis <> ''"; |
40 |
$res = $f->db->query($sql); |
$res = $f->db->query($sql); |
41 |
$f->isDatabaseError($res); |
$f->isDatabaseError($res); |
42 |
echo "<option value='S'>Sans</option>"; |
echo "<option value='S'>Sans</option>"; |
66 |
shon,logement_nombre,codelascot |
shon,logement_nombre,codelascot |
67 |
from dossier left join travaux on dossier.travaux=travaux.travaux"; |
from dossier left join travaux on dossier.travaux=travaux.travaux"; |
68 |
if($typeavis!="" or $typeavis=='T'){ // *** |
if($typeavis!="" or $typeavis=='T'){ // *** |
69 |
$sql.=" left join avis on avis.avis = dossier.avis"; |
$sql.=" left join avis_decision on avis_decision.avis_decision = dossier.avis_decision"; |
70 |
} //* |
} //* |
71 |
$sql.= " where dossier.nature = 'PC'"; |
$sql.= " where dossier.nature = 'PC'"; |
72 |
if($typeavis!="" or $typeavis=='T'){ // *** |
if($typeavis!="" or $typeavis=='T'){ // *** |
120 |
$export.= str_pad ($row['codelascot'], 1, " ", STR_PAD_RIGHT); |
$export.= str_pad ($row['codelascot'], 1, " ", STR_PAD_RIGHT); |
121 |
//type annexe habitation |
//type annexe habitation |
122 |
$export.= str_pad ($bl, 1, " ", STR_PAD_RIGHT); |
$export.= str_pad ($bl, 1, " ", STR_PAD_RIGHT); |
123 |
// shon total autoris�e ? |
// shon total autoris�e ? |
124 |
$export.= str_pad (substr($row['shon'],0,6), 6, " ", STR_PAD_LEFT); |
$export.= str_pad (substr($row['shon'],0,6), 6, " ", STR_PAD_LEFT); |
125 |
// shon habitation autoris� ? |
// shon habitation autoris� ? |
126 |
$export.= str_pad (substr($row['shon'],0,6), 6, " ", STR_PAD_LEFT); |
$export.= str_pad (substr($row['shon'],0,6), 6, " ", STR_PAD_LEFT); |
127 |
// mode utilisation principal locaux hab |
// mode utilisation principal locaux hab |
128 |
$export.= str_pad ($bl, 1, " ", STR_PAD_RIGHT); |
$export.= str_pad ($bl, 1, " ", STR_PAD_RIGHT); |
137 |
$export.= str_pad ($bl, 3, " ", STR_PAD_LEFT); |
$export.= str_pad ($bl, 3, " ", STR_PAD_LEFT); |
138 |
// nb batiment collectif ? |
// nb batiment collectif ? |
139 |
$export.= str_pad ($bl, 3, " ", STR_PAD_LEFT); |
$export.= str_pad ($bl, 3, " ", STR_PAD_LEFT); |
140 |
// nb batiments autoris�s |
// nb batiments autoris�s |
141 |
$export.= str_pad (substr($row['batiment_nombre'],0,3), 3, " ", STR_PAD_LEFT); |
$export.= str_pad (substr($row['batiment_nombre'],0,3), 3, " ", STR_PAD_LEFT); |
142 |
// nb log 1 piece |
// nb log 1 piece |
143 |
$export.= str_pad ($bl, 3, " ", STR_PAD_LEFT); |
$export.= str_pad ($bl, 3, " ", STR_PAD_LEFT); |