/[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 1246 by nhaye, Wed Feb 13 10:19:51 2013 UTC revision 1268 by nhaye, Tue Feb 19 15:39:55 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    
9        var $postedValues = array();
10        var $donnees_techniques;
11        var $idDT;
12    
13      function lot($id,&$db,$debug) {      function lot($id,&$db,$debug) {
14          $this->constructeur($id,$db,$debug);          $this->constructeur($id,$db,$debug);
15    
16            $this->donnees_techniques = $this->getDonneesTechniques();
17      }// fin constructeur      }// fin constructeur
18    
19        /**
20         * Instantiation de la classe donnees techniques
21         */
22        function getDonneesTechniques() {
23            $sql = "SELECT donnees_techniques FROM ".DB_PREFIXE."donnees_techniques WHERE lot = ".$this->getVal('lot');
24            $idDT = $this->db->getOne($sql);
25            $this->f->addToLog("db->getone(\"".$sql."\");", VERBOSE_MODE);
26            $this->f->isDatabaseError($idDT);
27            if($idDT == "") {
28                $idDT = "]";
29            }
30            $this->idDT = $idDT;
31            require_once ("../obj/donnees_techniques.class.php");
32            return new donnees_techniques($idDT, $this->db, DEBUG);
33        }
34    
35        function setValF($val) {
36            parent::setValF($val);
37            // Récupération des id demandeurs postés
38            foreach ($_POST as $key => $value) {
39                if(!in_array($key,$this->champs)) {
40                    $this->postedValues[$key]=$value;
41                }
42            }
43        }
44    
45      function triggerAjouterApres($id, &$db, $val, $DEBUG) {      function triggerAjouterApres($id, &$db, $val, $DEBUG) {
46          parent::triggerAjouterApres($id, $db, $val, $DEBUG);          parent::triggerAjouterApres($id, $db, $val, $DEBUG);
47            $this->postedValues['lot'] = $this->valF['lot'];
48            $this->donnees_techniques->ajouter($this->postedValues, $db, $DEBUG);
49    
50          if($this->getParameter("idxformulaire") != "") {          if($this->getParameter("idxformulaire") != "") {
51              // Insertion du lien dossier/lot              // Insertion du lien dossier/lot
# Line 48  class lot extends lot_gen { Line 82  class lot extends lot_gen {
82                    
83          $form->setType('dossier_autorisation', 'hidden');          $form->setType('dossier_autorisation', 'hidden');
84      }      }
85    
86    
87            
88      /**      /**
89       * Ajout de la liste des demandeurs       * Ajout de la liste des demandeurs
90       */       */
91      function sousformSpecificContent($maj) {      function sousformSpecificContent($maj) {
92                  
93    
94            $this->donnees_techniques->afficherFormulaire($maj, $this->getParameter('validation'),
95                $this->db, $this->postedValues, DEBUG, $this->idDT, $this->getParameter("idxformulaire"),
96                "lot", $this->getParameter('typeformulaire'),$extra_parameters = array());
97          //En consultation          //En consultation
98          if ( $maj == 3 ){          if ( $maj == 3 ){
99                            

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26