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

Diff of /trunk/app/dossier_modificatif.php

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

revision 187 by fraynaud, Tue Oct 11 15:01:43 2011 UTC revision 196 by fraynaud, Sat Oct 15 21:07:29 2011 UTC
# Line 119  if($validation==0){ Line 119  if($validation==0){
119          //          //
120          $valF['objet_dossier']=$row['objet_dossier'];          $valF['objet_dossier']=$row['objet_dossier'];
121          $valF['amenagement']=$row['amenagement'];          $valF['amenagement']=$row['amenagement'];
122            $valF['parcelle_lot']=$row['parcelle_lot']; //*** 3.0.0
123            $valF['parcelle_lot_lotissement']=$row['parcelle_lot_lotissement'];
124            $valF['servitude']=$row['servitude'];
125          // TEMP          // TEMP
126          $valF['temp1']=$row['temp1'];          $valF['temp1']=$row['temp1'];
127          $valF['temp2']=$row['temp2'];          $valF['temp2']=$row['temp2'];
# Line 181  if($validation==0){ Line 184  if($validation==0){
184        if(!is_numeric($val['architecte'])) $valF['architecte']= null;        if(!is_numeric($val['architecte'])) $valF['architecte']= null;
185        if(!is_numeric($val['travaux'])) $valF['travaux']= null;        if(!is_numeric($val['travaux'])) $valF['travaux']= null;
186        if(!is_numeric($val['demandeur_categorie'])) $valF['demandeur_categorie']= null;        if(!is_numeric($val['demandeur_categorie'])) $valF['demandeur_categorie']= null;
187          if(!is_numeric($val['parcelle_lot'])) $valF['parcelle_lot']= null;
188    
189          // cle secondaire alpha vide (contrainte integrite pgsql)
190          if($val['demandeur_civilite']=='') $valF['demandeur_civilite']= null;
191          if($val['delegataire_civilite']=='') $valF['delegataire_civilite']= null;
192    
193      // protection des numeriques      // protection des numeriques
194        if(!is_numeric($val['delai'])) unset ($valF['delai']);        if(!is_numeric($val['delai'])) unset ($valF['delai']);
195        if(!is_numeric($val['terrain_surface'])) unset ($valF['terrain_surface']);        if(!is_numeric($val['terrain_surface'])) unset ($valF['terrain_surface']);
# Line 193  if($validation==0){ Line 202  if($validation==0){
202        if(!is_numeric($val['piece_nombre'])) unset ($valF['piece_nombre']);        if(!is_numeric($val['piece_nombre'])) unset ($valF['piece_nombre']);
203        if(!is_numeric($val['shon_calcul'])) unset ($valF['shon_calcul']);        if(!is_numeric($val['shon_calcul'])) unset ($valF['shon_calcul']);
204        if(!is_numeric($val['terrain_surface_calcul'])) unset ($valF['terrain_surface_calcul']);        if(!is_numeric($val['terrain_surface_calcul'])) unset ($valF['terrain_surface_calcul']);
       // cle secondaire alpha vide (contrainte integrite pgsql)  
       if($val['demandeur_civilite']=='') $valF['demandeur_civilite']= null;  
       if($val['delegataire_civilite']=='') $valF['delegataire_civilite']= null;  
205      $res4= $f -> db->autoExecute("dossier",$valF,DB_AUTOQUERY_INSERT);      $res4= $f -> db->autoExecute("dossier",$valF,DB_AUTOQUERY_INSERT);
206      $f->isDatabaseError($res4);      $f->isDatabaseError($res4);
207      echo  _("dossier")." ".$valF['dossier']." ".$row['demandeur_nom']." "._("ajoute").      echo  _("dossier")." ".$valF['dossier']." ".$row['demandeur_nom']." "._("ajoute").
# Line 211  if($validation==0){ Line 217  if($validation==0){
217            $valG['terrain']=$f -> db->nextId('terrain');            $valG['terrain']=$f -> db->nextId('terrain');
218            // insertion des terrains concernes            // insertion des terrains concernes
219            $res10= $f -> db->autoExecute("terrain",$valG,DB_AUTOQUERY_INSERT);            $res10= $f -> db->autoExecute("terrain",$valG,DB_AUTOQUERY_INSERT);
220            if (DB :: isError($res10))            $f->isDatabaseError($res10);
              echo $res10->getDebugInfo()." ".$res10->getMessage()."<br>";  
221            echo  _("terrain")." ".$valG['terrain']." "._("ajoute")." ".            echo  _("terrain")." ".$valG['terrain']." "._("ajoute")." ".
222            $f -> db->affectedRows()." "._("table")." terrain <br>" ;            $f -> db->affectedRows()." "._("table")." terrain <br>" ;
223      }      }
# Line 224  if($validation==0){ Line 229  if($validation==0){
229      $valH['dossier']=$valF['dossier'];      $valH['dossier']=$valF['dossier'];
230      while ($row11=& $res11->fetchRow(DB_FETCHMODE_ASSOC)){      while ($row11=& $res11->fetchRow(DB_FETCHMODE_ASSOC)){
231            $valH['destination_shon']=$f -> db->nextId('destination_shon');            $valH['destination_shon']=$f -> db->nextId('destination_shon');
232            $valH['destination']=$row11['destination'];            $valH['destination']=$row11['destination']; //*** 3.0.0
233            $valH['shon']=$row11['shon'];            $valH['shon_anterieure']=$row11['shon_anterieure'];
234              $valH['shon_demolie']=$row11['shon_demolie'];
235              $valH['shon_anterieure_supprimee']=$row11['shon_anterieure_supprimee'];
236              $valH['shon_nouvelle_transformee']=$row11['shon_nouvelle_transformee'];
237              $valH['shon_nouvelle']=$row11['shon_nouvelle'];
238              $valH['shon_shob_transformee']=$row11['shon_shob_transformee'];
239            $res12= $f -> db->autoExecute("destination_shon",$valH,DB_AUTOQUERY_INSERT);            $res12= $f -> db->autoExecute("destination_shon",$valH,DB_AUTOQUERY_INSERT);
240            if (DB :: isError($res12))            $f->isDatabaseError($res12);
              echo $res12->getDebugInfo()." ".$res12->getMessage()."<br>";  
241            echo  _("destination")." ".$valH['destination_shon']." "._("ajoute").            echo  _("destination")." ".$valH['destination_shon']." "._("ajoute").
242            " ".$f -> db->affectedRows()." "._("table")." destination_shon <br>" ;            " ".$f -> db->affectedRows()." "._("table")." destination_shon <br>" ;
243      }      }
# Line 243  if($validation==0){ Line 252  if($validation==0){
252            $valH['note']=$row13['note'];            $valH['note']=$row13['note'];
253            $valH['categorie']=$row13['categorie'];            $valH['categorie']=$row13['categorie'];
254            $res14= $f -> db->autoExecute("blocnote",$valH,DB_AUTOQUERY_INSERT);            $res14= $f -> db->autoExecute("blocnote",$valH,DB_AUTOQUERY_INSERT);
255            if (DB :: isError($res14))            $f->isDatabaseError($res14);
              echo $res14->getDebugInfo()." ".$res14->getMessage()."<br>";  
256            echo  _("blocnote")." ".$valH['blocnote']." "._("ajoute")." ".            echo  _("blocnote")." ".$valH['blocnote']." "._("ajoute")." ".
257            $f -> db->affectedRows()." "._("table")." blocnote <br>" ;            $f -> db->affectedRows()." "._("table")." blocnote <br>" ;
258      }      }
259        // statistiques
260            // bloc note
261        $valH=array();
262        $sql= "select * from statistique  where dossier ='".$idx."'";
263        $res15 =$f -> db->query($sql);
264        $f->isDatabaseError($res15);
265        $valH['dossier']=$valF['dossier'];
266        while ($row15=& $res15->fetchRow(DB_FETCHMODE_ASSOC)){
267              $valH['statistique']=$f -> db->nextId('statistique');
268              $valH['parametre']=$row15['parametre'];
269              $valH['valeur']=$row15['valeur'];
270              $res16= $f -> db->autoExecute("statistique",$valH,DB_AUTOQUERY_INSERT);
271              $f->isDatabaseError($res16);
272              echo  _("statistique")." ".$valH['statistique']." "._("ajoute")." ".
273              $f -> db->affectedRows()." "._("table")." statistique <br>" ;
274        }
275      // pas dinstruction et de consultation en transfert      // pas dinstruction et de consultation en transfert
276  // enregistrement $msg en /tmp  **********************  // enregistrement $msg en /tmp  **********************
277  /*  /*

Legend:
Removed from v.187  
changed lines
  Added in v.196

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26