/[openfoncier]/trunk/obj/lot.class.php
ViewVC logotype

Diff of /trunk/obj/lot.class.php

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

revision 1268 by nhaye, Tue Feb 19 15:39:55 2013 UTC revision 1270 by nhaye, Wed Feb 20 16:22:45 2013 UTC
# Line 6  require_once ("../gen/obj/lot.class.php" Line 6  require_once ("../gen/obj/lot.class.php"
6    
7  class lot extends lot_gen {  class lot extends lot_gen {
8    
     var $postedValues = array();  
9      var $donnees_techniques;      var $donnees_techniques;
10      var $idDT;      var $idDT;
11    
12      function lot($id,&$db,$debug) {      function lot($id,&$db,$debug) {
13          $this->constructeur($id,$db,$debug);          $this->constructeur($id,$db,$debug);
14    
         $this->donnees_techniques = $this->getDonneesTechniques();  
15      }// fin constructeur      }// fin constructeur
16    
     /**  
      * Instantiation de la classe donnees techniques  
      */  
     function getDonneesTechniques() {  
         $sql = "SELECT donnees_techniques FROM ".DB_PREFIXE."donnees_techniques WHERE lot = ".$this->getVal('lot');  
         $idDT = $this->db->getOne($sql);  
         $this->f->addToLog("db->getone(\"".$sql."\");", VERBOSE_MODE);  
         $this->f->isDatabaseError($idDT);  
         if($idDT == "") {  
             $idDT = "]";  
         }  
         $this->idDT = $idDT;  
         require_once ("../obj/donnees_techniques.class.php");  
         return new donnees_techniques($idDT, $this->db, DEBUG);  
     }  
   
     function setValF($val) {  
         parent::setValF($val);  
         // Récupération des id demandeurs postés  
         foreach ($_POST as $key => $value) {  
             if(!in_array($key,$this->champs)) {  
                 $this->postedValues[$key]=$value;  
             }  
         }  
     }  
17    
18      function triggerAjouterApres($id, &$db, $val, $DEBUG) {      function triggerAjouterApres($id, &$db, $val, $DEBUG) {
19          parent::triggerAjouterApres($id, $db, $val, $DEBUG);          parent::triggerAjouterApres($id, $db, $val, $DEBUG);
         $this->postedValues['lot'] = $this->valF['lot'];  
         $this->donnees_techniques->ajouter($this->postedValues, $db, $DEBUG);  
20    
21          if($this->getParameter("idxformulaire") != "") {          if($this->getParameter("idxformulaire") != "") {
22              // Insertion du lien dossier/lot              // Insertion du lien dossier/lot
# Line 89  class lot extends lot_gen { Line 60  class lot extends lot_gen {
60       * Ajout de la liste des demandeurs       * Ajout de la liste des demandeurs
61       */       */
62      function sousformSpecificContent($maj) {      function sousformSpecificContent($maj) {
         
63    
         $this->donnees_techniques->afficherFormulaire($maj, $this->getParameter('validation'),  
             $this->db, $this->postedValues, DEBUG, $this->idDT, $this->getParameter("idxformulaire"),  
             "lot", $this->getParameter('typeformulaire'),$extra_parameters = array());  
64          //En consultation          //En consultation
65          if ( $maj == 3 ){          if ( $maj == 3 ){
66                            

Legend:
Removed from v.1268  
changed lines
  Added in v.1270

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26