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 |
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 |
|
|