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