1 |
<?php |
<?php |
2 |
//$Id$ |
//$Id$ |
3 |
//gen openMairie le 11/02/2013 16:36 |
//gen openMairie le 08/08/2013 15:24 |
4 |
|
|
5 |
require_once ("../obj/om_dbform.class.php"); |
require_once ("../obj/om_dbform.class.php"); |
6 |
|
|
27 |
} else { |
} else { |
28 |
$this->valF['dossier_autorisation'] = $val['dossier_autorisation']; |
$this->valF['dossier_autorisation'] = $val['dossier_autorisation']; |
29 |
} |
} |
30 |
|
if ($val['dossier'] == "") { |
31 |
|
$this->valF['dossier'] = NULL; |
32 |
|
} else { |
33 |
|
$this->valF['dossier'] = $val['dossier']; |
34 |
|
} |
35 |
} |
} |
36 |
|
|
37 |
//================================================= |
//================================================= |
67 |
} else { |
} else { |
68 |
$form->setType('dossier_autorisation','select'); |
$form->setType('dossier_autorisation','select'); |
69 |
} |
} |
70 |
|
|
71 |
|
if($this->retourformulaire=='dossier' |
72 |
|
and $form->val['dossier'] == $this->getParameter('idxformulaire')) { |
73 |
|
$form->setType('dossier','selecthiddenstatic'); |
74 |
|
} else { |
75 |
|
$form->setType('dossier','select'); |
76 |
|
} |
77 |
}// fin ajout |
}// fin ajout |
78 |
if ($maj==1){ //modifier |
if ($maj==1){ //modifier |
79 |
$form->setType('lot','hiddenstatic'); |
$form->setType('lot','hiddenstatic'); |
85 |
} else { |
} else { |
86 |
$form->setType('dossier_autorisation','select'); |
$form->setType('dossier_autorisation','select'); |
87 |
} |
} |
88 |
|
|
89 |
|
if($this->retourformulaire=='dossier' |
90 |
|
and $form->val['dossier'] == $this->getParameter('idxformulaire')) { |
91 |
|
$form->setType('dossier','selecthiddenstatic'); |
92 |
|
} else { |
93 |
|
$form->setType('dossier','select'); |
94 |
|
} |
95 |
}// fin modifier |
}// fin modifier |
96 |
if ($maj==2){ //supprimer |
if ($maj==2){ //supprimer |
97 |
$form->setType('lot','hiddenstatic'); |
$form->setType('lot','hiddenstatic'); |
98 |
$form->setType('libelle','hiddenstatic'); |
$form->setType('libelle','hiddenstatic'); |
99 |
$form->setType('dossier_autorisation','selectstatic'); |
$form->setType('dossier_autorisation','selectstatic'); |
100 |
|
$form->setType('dossier','selectstatic'); |
101 |
}//fin supprimer |
}//fin supprimer |
102 |
if ($maj==3){ //consulter |
if ($maj==3){ //consulter |
103 |
$form->setType('lot','static'); |
$form->setType('lot','static'); |
104 |
$form->setType('libelle','static'); |
$form->setType('libelle','static'); |
105 |
$form->setType('dossier_autorisation','selectstatic'); |
$form->setType('dossier_autorisation','selectstatic'); |
106 |
|
$form->setType('dossier','selectstatic'); |
107 |
}//fin consulter |
}//fin consulter |
108 |
} |
} |
109 |
|
|
118 |
$form->setTaille("lot", 11); |
$form->setTaille("lot", 11); |
119 |
$form->setTaille("libelle", 30); |
$form->setTaille("libelle", 30); |
120 |
$form->setTaille("dossier_autorisation", 20); |
$form->setTaille("dossier_autorisation", 20); |
121 |
|
$form->setTaille("dossier", 30); |
122 |
} |
} |
123 |
|
|
124 |
/** |
/** |
128 |
$form->setMax("lot", 11); |
$form->setMax("lot", 11); |
129 |
$form->setMax("libelle", 80); |
$form->setMax("libelle", 80); |
130 |
$form->setMax("dossier_autorisation", 20); |
$form->setMax("dossier_autorisation", 20); |
131 |
|
$form->setMax("dossier", 30); |
132 |
} |
} |
133 |
|
|
134 |
|
|
137 |
$form->setLib('lot',_('lot')); |
$form->setLib('lot',_('lot')); |
138 |
$form->setLib('libelle',_('libelle')); |
$form->setLib('libelle',_('libelle')); |
139 |
$form->setLib('dossier_autorisation',_('dossier_autorisation')); |
$form->setLib('dossier_autorisation',_('dossier_autorisation')); |
140 |
|
$form->setLib('dossier',_('dossier')); |
141 |
} |
} |
142 |
|
|
143 |
function setSelect(&$form, $maj,&$db,$debug) { |
function setSelect(&$form, $maj,&$db,$debug) { |
146 |
elseif(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc")) |
elseif(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc")) |
147 |
include ("../sql/".$db->phptype."/".$this->table.".form.inc"); |
include ("../sql/".$db->phptype."/".$this->table.".form.inc"); |
148 |
|
|
149 |
|
// dossier |
150 |
|
$this->init_select($form, $db, $maj, $debug, "dossier", |
151 |
|
$sql_dossier, $sql_dossier_by_id, false); |
152 |
|
|
153 |
// dossier_autorisation |
// dossier_autorisation |
154 |
$this->init_select($form, $db, $maj, $debug, "dossier_autorisation", |
$this->init_select($form, $db, $maj, $debug, "dossier_autorisation", |
155 |
$sql_dossier_autorisation, $sql_dossier_autorisation_by_id, false); |
$sql_dossier_autorisation, $sql_dossier_autorisation_by_id, false); |
162 |
function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){ |
function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){ |
163 |
$this->retourformulaire = $retourformulaire; |
$this->retourformulaire = $retourformulaire; |
164 |
if($validation == 0) { |
if($validation == 0) { |
165 |
|
if($retourformulaire =='dossier') |
166 |
|
$form->setVal('dossier', $idxformulaire); |
167 |
if($retourformulaire =='dossier_autorisation') |
if($retourformulaire =='dossier_autorisation') |
168 |
$form->setVal('dossier_autorisation', $idxformulaire); |
$form->setVal('dossier_autorisation', $idxformulaire); |
169 |
}// fin validation |
}// fin validation |
178 |
function cleSecondaire($id, &$db = NULL, $val = array(), $DEBUG = false) { |
function cleSecondaire($id, &$db = NULL, $val = array(), $DEBUG = false) { |
179 |
// On appelle la methode de la classe parent |
// On appelle la methode de la classe parent |
180 |
parent::cleSecondaire($id, $db, $val, $DEBUG); |
parent::cleSecondaire($id, $db, $val, $DEBUG); |
181 |
// Verification de la cle secondaire : lien_dossier_lot |
// Verification de la cle secondaire : donnees_techniques |
182 |
$this->rechercheTable($db, "lien_dossier_lot", "lot", $id); |
$this->rechercheTable($db, "donnees_techniques", "lot", $id); |
183 |
// Verification de la cle secondaire : lien_lot_demandeur |
// Verification de la cle secondaire : lien_lot_demandeur |
184 |
$this->rechercheTable($db, "lien_lot_demandeur", "lot", $id); |
$this->rechercheTable($db, "lien_lot_demandeur", "lot", $id); |
185 |
} |
} |