25 |
$f->displayDescription($description); |
$f->displayDescription($description); |
26 |
//controle |
//controle |
27 |
$DEBUG=1; |
$DEBUG=1; |
|
//$pf_departement="0"; |
|
28 |
$t10 = "||||||||||"; // 10 | |
$t10 = "||||||||||"; // 10 | |
29 |
|
|
30 |
// parametres collectivite |
// parametres collectivite |
|
|
|
31 |
// ============================================================================= |
// ============================================================================= |
32 |
// validation = 0 |
// validation = 0 |
33 |
// ============================================================================= |
// ============================================================================= |
65 |
$datefin = substr($_POST["datefin"],6,4). |
$datefin = substr($_POST["datefin"],6,4). |
66 |
"-".substr($_POST["datefin"],3,2)."-". |
"-".substr($_POST["datefin"],3,2)."-". |
67 |
substr($_POST["datefin"],0,2); |
substr($_POST["datefin"],0,2); |
|
//$correct=true; // a enlever apres test |
|
68 |
if ($correct==true){ // *** |
if ($correct==true){ // *** |
69 |
// dossiers concern�s |
// dossiers concern�s |
70 |
$sql= "select * from dossier"; |
$sql= "select * from dossier"; |
148 |
//decision |
//decision |
149 |
// type different de modificatif |
// type different de modificatif |
150 |
$decision=""; |
$decision=""; |
151 |
if($row['types']!='Modificatif' and $row['types']!='Transfert'){ |
if($row['types']!='Modificatif' |
152 |
|
and $row['types']!='Transfert' |
153 |
|
and (($row['date_depot'] >= $datedebut and $row['date_depot']<=$datefin) |
154 |
|
or ($row['date_decision'] >= $datedebut and $row['date_decision']<=$datefin))){ |
155 |
$avis_sitadel=""; |
$avis_sitadel=""; |
156 |
$avis_sitadel_motif=""; |
$avis_sitadel_motif=""; |
157 |
// enregistrement decision dans tous les cas |
// enregistrement decision dans tous les cas |
171 |
$avis_sitadel = $row1['sitadel']; |
$avis_sitadel = $row1['sitadel']; |
172 |
$avis_sitadel_motif = $row1['sitadel_motif']; |
$avis_sitadel_motif = $row1['sitadel_motif']; |
173 |
} |
} |
174 |
$decision.= $g->decision_groupe1($avis_sitadel,$avis_sitadel_motif); |
$decision.= $g->decision_groupe1($avis_sitadel,$avis_sitadel_motif,$structure); |
175 |
}else{ |
}else{ |
176 |
$decision.= $g->decision_groupe1("0",""); // pas d avis |
$decision.= $g->decision_groupe1("0","",$structure); // pas d avis |
177 |
$decision.= $t10.$t10.$t10.$t10.$t10.$t10.$t10.$t10.$t10.$t10."|||"; //83 |
//$decision.= "***".$t10.$t10.$t10.$t10.$t10.$t10.$t10.$t10."|||"; //83 |
178 |
} |
} |
179 |
// si la decision est favorable, envoi des informations statistiques |
// si la decision est favorable, envoi des informations statistiques |
180 |
if($avis_sitadel==2 or $avis_sitadel==4 |
if($avis_sitadel==2 or $avis_sitadel==4 |
214 |
$decision.= $g->destination($shoncr2); |
$decision.= $g->destination($shoncr2); |
215 |
|
|
216 |
$decision.= $g->descriptif($row['types']); |
$decision.= $g->descriptif($row['types']); |
217 |
}else // decision defavorable |
}else // decision defavorable ou pas de decision |
218 |
$decision.= $t10.$t10.$t10.$t10.$t10.$t10.$t10.$t10.$t10.$t10."|||"; //83 |
$decision.= $t10.$t10.$t10.$t10.$t10.$t10.$t10.$t10."|||"; //83 | + 12 | = 95 | pour 96 zones |
219 |
$decision.="\n"; |
$decision.="\n"; |
220 |
} |
} |
221 |
|
|
238 |
$avis_sitadel = $row1['sitadel']; |
$avis_sitadel = $row1['sitadel']; |
239 |
$avis_sitadel_motif = $row1['sitadel_motif']; |
$avis_sitadel_motif = $row1['sitadel_motif']; |
240 |
} |
} |
241 |
$modificatif.= $g->decision_groupe1($avis_sitadel,$avis_sitadel_motif); |
$modificatif.= $g->decision_groupe1($avis_sitadel,$avis_sitadel_motif,$structure); |
242 |
} |
} |
243 |
// si la decision est favorable, envoi des informations statistiques |
// si la decision est favorable, envoi des informations statistiques |
244 |
if($avis_sitadel==2 or $avis_sitadel==4 |
if($avis_sitadel==2 or $avis_sitadel==4 |
284 |
} |
} |
285 |
} |
} |
286 |
|
|
287 |
// suivi DOC |
// suivi DOC |
288 |
$suivi1=""; |
$suivi1=""; |
289 |
if($row['date_chantier'] >= $datedebut and $row['date_chantier']<=$datefin){ |
if($row['date_chantier'] >= $datedebut and $row['date_chantier']<=$datefin){ |
290 |
$suivi1.=$g->entete("SUIVI",$departement,$commune,$pf_departement); |
$suivi1.=$g->entete("SUIVI",$departement,$commune,$pf_departement); |
332 |
$datemodification = date('y').str_pad (DATE('m'), 2, "0", STR_PAD_LEFT).str_pad (DATE('j'), 2, "0", STR_PAD_LEFT); |
$datemodification = date('y').str_pad (DATE('m'), 2, "0", STR_PAD_LEFT).str_pad (DATE('j'), 2, "0", STR_PAD_LEFT); |
333 |
// export |
// export |
334 |
$version = substr($version,0,8); |
$version = substr($version,0,8); |
335 |
$entete.= $longueurenregistrement."|".$datemodification."|".$nombreenregistrement."|openFoncier|".$version."\n"; |
$entete.= $longueurenregistrement."|".$datemodification."|". |
336 |
|
$nombreenregistrement."|openFoncier|".$version."\n"; |
337 |
$export=$entete.$export; |
$export=$entete.$export; |
338 |
// $str = htmlentities($str, ENT_QUOTES); |
// $str = htmlentities($str, ENT_QUOTES); |
339 |
// ecriture des fichiers en tmp |
// ecriture des fichiers en tmp |
340 |
$fichier = "../tmp/SITADEL".substr($_POST["datedebut"],3,2). |
$fichier = "../tmp/SITADEL".substr($_POST["datedebut"],3,2). |
341 |
"".substr($_POST["datedebut"],8,4)."_test"; |
"".substr($_POST["datedebut"],8,4)."_test"; |
342 |
$inf = fopen($fichier,"w"); |
$inf = fopen($fichier,"w"); |
|
//$export=substr($export,0,strlen($export)-1); // un \n en trop |
|
343 |
fwrite($inf,$export); |
fwrite($inf,$export); |
344 |
fclose($inf); |
fclose($inf); |
345 |
echo "<br>Fichier ".$fichier." sauvegarde<br><br><br>"; |
echo "<br>"._("Fichier")." ".$fichier." "._("sauvegarde")."<br /><br /><br />"; |
|
|
|
346 |
// affichage |
// affichage |
347 |
echo "<br /><br />Pour telecharger le fichier, cliquer ici : <a href=\"".$fichier."\" target=\"_blank\">"; |
echo "<br /><br />Pour telecharger le fichier, cliquer ici : <a href=\"".$fichier."\" target=\"_blank\">"; |
348 |
echo "<img src=\"../app/img/ico_trace.png\" alt=\"Telecharger le fichier CNEN\" title=\"Telecharger le fichier CNEN\" />"; |
echo "<img src=\"../app/img/ico_trace.png\" alt=\"Telecharger le fichier CNEN\" title=\"Telecharger le fichier CNEN\" />"; |
349 |
echo "</a> avec le bouton droit et enregistrer la cible du lien sous. <br /><br />"; |
echo "</a>"._("avec le bouton droit et enregistrer la cible du lien sous.")."<br /><br />"; |
|
|
|
350 |
if($DEBUG==1){ |
if($DEBUG==1){ |
351 |
$affiche=""; |
$affiche=""; |
352 |
$affiche= str_replace("\n","<br>",$export); |
$affiche= str_replace("\n","<br>",$export); |
353 |
echo $affiche; |
echo $affiche; |
354 |
} |
} |
|
|
|
|
|
|
355 |
}else // correct = false |
}else // correct = false |
356 |
echo "remplissez les 2 dates"; |
echo _("remplissez les 2 dates"); |
357 |
}//validation |
}//validation |
|
?> |
|
358 |
|
?> |