/[openfoncier]/trunk/app/sitadel.php
ViewVC logotype

Diff of /trunk/app/sitadel.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 267 by fraynaud, Wed Dec 7 11:44:34 2011 UTC revision 323 by fmichon, Fri May 11 10:44:40 2012 UTC
# Line 202  if($validation==0){ Line 202  if($validation==0){
202                                  $row['dossier']."' order by destination";                                  $row['dossier']."' order by destination";
203                          $res3 = $f->db -> query ($sql3);                          $res3 = $f->db -> query ($sql3);
204                          $f->isDatabaseError($res3);                          $f->isDatabaseError($res3);
205                          $temp = array();                 // ***
206                          while ($row3=& $res3->fetchRow(DB_FETCHMODE_ASSOC)){                 $temp = array();
207                              $shonant[$row3['destination']]=$row3["shon_anterieure"];                 $shonant = array();
208                              $shondem[$row3['destination']]=$row3["shon_demolie"];                 $shondem = array();
209                              $shonanttr[$row3['destination']]=$row3["shon_anterieure_supprimee"];                 $shonanttr = array();
210                              $shonprojtr[$row3['destination']]=$row3["shon_nouvelle_transformee"];                 $shonprojtr = array();
211                              $shoncr1[$row3['destination']]=$row3["shon_nouvelle"];                 $shoncr1 = array();
212                              $shoncr2[$row3['destination']]=$row3["shon_shob_transformee"];                 $shoncr2 = array();
213                          }                 while ($row3=& $res3->fetchRow(DB_FETCHMODE_ASSOC)){
214                          $decision.= $g->destination($shonant);                       // round(8.5, 0, PHP_ROUND_HALF_DOWN);    
215                          $decision.= $g->destination($shondem);                      if(isset($row3["shon_anterieure"]))
216                          $decision.= $g->destination($shonanttr);                                       $shonant[$row3['destination']]=round($row3["shon_anterieure"], 0);
217                          $decision.= $g->destination($shonprojtr);                      else
218                          $decision.= $g->destination($shoncr1);                         $shonant[$row3['destination']]=0;
219                          $decision.= $g->destination($shoncr2);                      if(isset($row3["shon_demolie"]))    
220                           $shondem[$row3['destination']]=round($row3["shon_demolie"], 0);
221                        else
222                           $shondem[$row3['destination']]=0;
223                        if(isset($row3["shon_anterieure_supprimee"]))              
224                           $shonanttr[$row3['destination']]=round($row3["shon_anterieure_supprimee"], 0);
225                        else
226                           $shonanttr[$row3['destination']]=0;
227                        if(isset($row3["shon_nouvelle_transformee"]))      
228                           $shonprojtr[$row3['destination']]=round($row3["shon_nouvelle_transformee"], 0);
229                        else
230                           $shonprojtr[$row3['destination']]=0;
231                        if(isset($row3["shon_nouvelle"]))          
232                           $shoncr1[$row3['destination']]=round($row3["shon_nouvelle"], 0);
233                        else
234                           $shoncr1[$row3['destination']]=0;
235                        if(isset($row3["shon_shob_transformee"]))          
236                           $shoncr2[$row3['destination']]=round($row3["shon_shob_transformee"], 0);
237                        else
238                           $shoncr2[$row3['destination']]=0;
239          
240                        //$shonant[$row3['destination']]=$row3["shon_anterieure"];
241                        //$shondem[$row3['destination']]=$row3["shon_demolie"];
242                        //$shonanttr[$row3['destination']]=$row3["shon_anterieure_supprimee"];
243                        //$shonprojtr[$row3['destination']]=$row3["shon_nouvelle_transformee"];
244                        //$shoncr1[$row3['destination']]=$row3["shon_nouvelle"];
245                        //$shoncr2[$row3['destination']]=$row3["shon_shob_transformee"];
246    
247                   }
248                         $decision.= $g->destination($shonant);
249                         $decision.= $g->destination($shondem);
250                         $decision.= $g->destination($shonanttr);
251                         $decision.= $g->destination($shonprojtr);
252                         $decision.= $g->destination($shoncr1);
253                         $decision.= $g->destination($shoncr2);
254                                                    
255                          $decision.= $g->descriptif($row['types']);                         $decision.= $g->descriptif($row['types']);  
256                      }else // decision defavorable ou pas de decision                      }else // decision defavorable ou pas de decision
257                          $decision.= $t10.$t10.$t10.$t10.$t10.$t10.$t10.$t10."|||"; //83 | + 12 | = 95 | pour 96 zones                          $decision.= $t10.$t10.$t10.$t10.$t10.$t10.$t10.$t10."|||"; //83 | + 12 | = 95 | pour 96 zones
258              $decision.="\n";              $decision.="\n";
# Line 321  if($validation==0){ Line 355  if($validation==0){
355          $longueurenregistrement= 0 ; // a calculer ***  enregistrement le plus long          $longueurenregistrement= 0 ; // a calculer ***  enregistrement le plus long
356          $entete = "SITADEL|".$pf_departement.$departement."|".$commune."|".$region."|".$fichiertransmis."|".$numero."|";          $entete = "SITADEL|".$pf_departement.$departement."|".$commune."|".$region."|".$fichiertransmis."|".$numero."|";
357          // calcul enregistrement le plus long                // calcul enregistrement le plus long      
358          if(CHARSET=='UTF8'){          if(DBCHARSET=='UTF8'){
359              $export=utf8_decode($export);              $export=utf8_decode($export);
360          }          }
361          // nombreenrgistremment et longueurenregistrement          // nombreenrgistremment et longueurenregistrement
# Line 348  if($validation==0){ Line 382  if($validation==0){
382          // $str = htmlentities($str, ENT_QUOTES);          // $str = htmlentities($str, ENT_QUOTES);
383          // ecriture des fichiers en tmp          // ecriture des fichiers en tmp
384          $fichier = "../tmp/SITADEL".substr($_POST["datedebut"],3,2).          $fichier = "../tmp/SITADEL".substr($_POST["datedebut"],3,2).
385                 "".substr($_POST["datedebut"],8,4)."_test";                 "".substr($_POST["datedebut"],8,4)."";
386          $inf = fopen($fichier,"w");          $inf = fopen($fichier,"w");
387          fwrite($inf,$export);          fwrite($inf,$export);
388          fclose($inf);          fclose($inf);
389          echo "<br>"._("Fichier")." ".$fichier." "._("sauvegarde")."<br /><br /><br />";          echo "<br>"._("Fichier")." ".$fichier." "._("sauvegarde")."<br /><br /><br />";
390          // affichage          // affichage
391          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\">";
392          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 Sitadel\" />";
393          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 />";
394          if($DEBUG==1){          if($DEBUG==1){
395              $affiche="";              $affiche="";

Legend:
Removed from v.267  
changed lines
  Added in v.323

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26