1 |
<?php |
2 |
//$Id$ |
3 |
//gen openMairie le 21/11/2012 16:25 |
4 |
|
5 |
require_once ("../obj/om_dbform.class.php"); |
6 |
|
7 |
class demandeur_gen extends om_dbform { |
8 |
var $table="demandeur"; |
9 |
var $clePrimaire="demandeur"; |
10 |
var $typeCle="N"; |
11 |
var $required_field=array( |
12 |
"demandeur" |
13 |
); |
14 |
var $retourformulaire; |
15 |
|
16 |
function setvalF($val) { |
17 |
//affectation valeur formulaire |
18 |
if (!is_numeric($val['demandeur'])) { |
19 |
$this->valF['demandeur'] = ""; // -> requis |
20 |
} else { |
21 |
$this->valF['demandeur'] = $val['demandeur']; |
22 |
} |
23 |
if ($val['type_demandeur'] == "") { |
24 |
$this->valF['type_demandeur'] = NULL; |
25 |
} else { |
26 |
$this->valF['type_demandeur'] = $val['type_demandeur']; |
27 |
} |
28 |
if ($val['qualification'] == "") { |
29 |
$this->valF['qualification'] = NULL; |
30 |
} else { |
31 |
$this->valF['qualification'] = $val['qualification']; |
32 |
} |
33 |
if ($val['role'] == "") { |
34 |
$this->valF['role'] = NULL; |
35 |
} else { |
36 |
$this->valF['role'] = $val['role']; |
37 |
} |
38 |
if ($val['particulier_nom'] == "") { |
39 |
$this->valF['particulier_nom'] = NULL; |
40 |
} else { |
41 |
$this->valF['particulier_nom'] = $val['particulier_nom']; |
42 |
} |
43 |
if ($val['particulier_prenom'] == "") { |
44 |
$this->valF['particulier_prenom'] = NULL; |
45 |
} else { |
46 |
$this->valF['particulier_prenom'] = $val['particulier_prenom']; |
47 |
} |
48 |
if ($val['particulier_date_naissance'] != "") { |
49 |
$this->valF['particulier_date_naissance'] = $this->dateDB($val['particulier_date_naissance']); |
50 |
} else { |
51 |
$this->valF['particulier_date_naissance'] = NULL; |
52 |
} |
53 |
if ($val['particulier_commune_naissance'] == "") { |
54 |
$this->valF['particulier_commune_naissance'] = NULL; |
55 |
} else { |
56 |
$this->valF['particulier_commune_naissance'] = $val['particulier_commune_naissance']; |
57 |
} |
58 |
if ($val['particulier_departement_naissance'] == "") { |
59 |
$this->valF['particulier_departement_naissance'] = NULL; |
60 |
} else { |
61 |
$this->valF['particulier_departement_naissance'] = $val['particulier_departement_naissance']; |
62 |
} |
63 |
if ($val['personne_morale_denomination'] == "") { |
64 |
$this->valF['personne_morale_denomination'] = NULL; |
65 |
} else { |
66 |
$this->valF['personne_morale_denomination'] = $val['personne_morale_denomination']; |
67 |
} |
68 |
if ($val['personne_morale_raison_sociale'] == "") { |
69 |
$this->valF['personne_morale_raison_sociale'] = NULL; |
70 |
} else { |
71 |
$this->valF['personne_morale_raison_sociale'] = $val['personne_morale_raison_sociale']; |
72 |
} |
73 |
if ($val['personne_morale_siret'] == "") { |
74 |
$this->valF['personne_morale_siret'] = NULL; |
75 |
} else { |
76 |
$this->valF['personne_morale_siret'] = $val['personne_morale_siret']; |
77 |
} |
78 |
if ($val['personne_morale_categorie_juridique'] == "") { |
79 |
$this->valF['personne_morale_categorie_juridique'] = NULL; |
80 |
} else { |
81 |
$this->valF['personne_morale_categorie_juridique'] = $val['personne_morale_categorie_juridique']; |
82 |
} |
83 |
if ($val['personne_morale_nom'] == "") { |
84 |
$this->valF['personne_morale_nom'] = NULL; |
85 |
} else { |
86 |
$this->valF['personne_morale_nom'] = $val['personne_morale_nom']; |
87 |
} |
88 |
if ($val['personne_morale_prenom'] == "") { |
89 |
$this->valF['personne_morale_prenom'] = NULL; |
90 |
} else { |
91 |
$this->valF['personne_morale_prenom'] = $val['personne_morale_prenom']; |
92 |
} |
93 |
if ($val['numero'] == "") { |
94 |
$this->valF['numero'] = NULL; |
95 |
} else { |
96 |
$this->valF['numero'] = $val['numero']; |
97 |
} |
98 |
if ($val['voie'] == "") { |
99 |
$this->valF['voie'] = NULL; |
100 |
} else { |
101 |
$this->valF['voie'] = $val['voie']; |
102 |
} |
103 |
if ($val['complement'] == "") { |
104 |
$this->valF['complement'] = NULL; |
105 |
} else { |
106 |
$this->valF['complement'] = $val['complement']; |
107 |
} |
108 |
if ($val['lieu_dit'] == "") { |
109 |
$this->valF['lieu_dit'] = NULL; |
110 |
} else { |
111 |
$this->valF['lieu_dit'] = $val['lieu_dit']; |
112 |
} |
113 |
if ($val['localite'] == "") { |
114 |
$this->valF['localite'] = NULL; |
115 |
} else { |
116 |
$this->valF['localite'] = $val['localite']; |
117 |
} |
118 |
if ($val['code_postal'] == "") { |
119 |
$this->valF['code_postal'] = NULL; |
120 |
} else { |
121 |
$this->valF['code_postal'] = $val['code_postal']; |
122 |
} |
123 |
if ($val['bp'] == "") { |
124 |
$this->valF['bp'] = NULL; |
125 |
} else { |
126 |
$this->valF['bp'] = $val['bp']; |
127 |
} |
128 |
if ($val['cedex'] == "") { |
129 |
$this->valF['cedex'] = NULL; |
130 |
} else { |
131 |
$this->valF['cedex'] = $val['cedex']; |
132 |
} |
133 |
if ($val['pays'] == "") { |
134 |
$this->valF['pays'] = NULL; |
135 |
} else { |
136 |
$this->valF['pays'] = $val['pays']; |
137 |
} |
138 |
if ($val['division_territoriale'] == "") { |
139 |
$this->valF['division_territoriale'] = NULL; |
140 |
} else { |
141 |
$this->valF['division_territoriale'] = $val['division_territoriale']; |
142 |
} |
143 |
if ($val['telephone_fixe'] == "") { |
144 |
$this->valF['telephone_fixe'] = NULL; |
145 |
} else { |
146 |
$this->valF['telephone_fixe'] = $val['telephone_fixe']; |
147 |
} |
148 |
if ($val['telephone_mobile'] == "") { |
149 |
$this->valF['telephone_mobile'] = NULL; |
150 |
} else { |
151 |
$this->valF['telephone_mobile'] = $val['telephone_mobile']; |
152 |
} |
153 |
if ($val['indicatif'] == "") { |
154 |
$this->valF['indicatif'] = NULL; |
155 |
} else { |
156 |
$this->valF['indicatif'] = $val['indicatif']; |
157 |
} |
158 |
if ($val['courriel'] == "") { |
159 |
$this->valF['courriel'] = NULL; |
160 |
} else { |
161 |
$this->valF['courriel'] = $val['courriel']; |
162 |
} |
163 |
if ($val['notification'] == 1 || $val['notification'] == "t" || $val['notification'] == "Oui") { |
164 |
$this->valF['notification'] = true; |
165 |
} else { |
166 |
$this->valF['notification'] = false; |
167 |
} |
168 |
if ($val['frequent'] == 1 || $val['frequent'] == "t" || $val['frequent'] == "Oui") { |
169 |
$this->valF['frequent'] = true; |
170 |
} else { |
171 |
$this->valF['frequent'] = false; |
172 |
} |
173 |
if (!is_numeric($val['particulier_civilite'])) { |
174 |
$this->valF['particulier_civilite'] = NULL; |
175 |
} else { |
176 |
$this->valF['particulier_civilite'] = $val['particulier_civilite']; |
177 |
} |
178 |
if (!is_numeric($val['personne_morale_civilite'])) { |
179 |
$this->valF['personne_morale_civilite'] = NULL; |
180 |
} else { |
181 |
$this->valF['personne_morale_civilite'] = $val['personne_morale_civilite']; |
182 |
} |
183 |
} |
184 |
|
185 |
//================================================= |
186 |
//cle primaire automatique [automatic primary key] |
187 |
//================================================== |
188 |
|
189 |
function setId(&$db) { |
190 |
//numero automatique |
191 |
$this->valF[$this->clePrimaire] = $db->nextId(DB_PREFIXE.$this->table); |
192 |
} |
193 |
|
194 |
function setValFAjout($val) { |
195 |
//numero automatique -> pas de controle ajout cle primaire |
196 |
} |
197 |
|
198 |
function verifierAjout() { |
199 |
//numero automatique -> pas de verfication de cle primaire |
200 |
} |
201 |
|
202 |
//========================== |
203 |
// Formulaire [form] |
204 |
//========================== |
205 |
|
206 |
function setType(&$form,$maj) { |
207 |
//type |
208 |
if ($maj==0){ //ajout |
209 |
$form->setType('demandeur','hidden');// cle automatique |
210 |
$form->setType('type_demandeur','text'); |
211 |
$form->setType('qualification','text'); |
212 |
$form->setType('role','text'); |
213 |
$form->setType('particulier_nom','text'); |
214 |
$form->setType('particulier_prenom','text'); |
215 |
if($this->retourformulaire=='') |
216 |
$form->setType('particulier_date_naissance','date'); |
217 |
else |
218 |
$form->setType('particulier_date_naissance','date2'); |
219 |
$form->setType('particulier_commune_naissance','text'); |
220 |
$form->setType('particulier_departement_naissance','text'); |
221 |
$form->setType('personne_morale_denomination','text'); |
222 |
$form->setType('personne_morale_raison_sociale','text'); |
223 |
$form->setType('personne_morale_siret','text'); |
224 |
$form->setType('personne_morale_categorie_juridique','text'); |
225 |
$form->setType('personne_morale_nom','text'); |
226 |
$form->setType('personne_morale_prenom','text'); |
227 |
$form->setType('numero','text'); |
228 |
$form->setType('voie','text'); |
229 |
$form->setType('complement','text'); |
230 |
$form->setType('lieu_dit','text'); |
231 |
$form->setType('localite','text'); |
232 |
$form->setType('code_postal','text'); |
233 |
$form->setType('bp','text'); |
234 |
$form->setType('cedex','text'); |
235 |
$form->setType('pays','text'); |
236 |
$form->setType('division_territoriale','text'); |
237 |
$form->setType('telephone_fixe','text'); |
238 |
$form->setType('telephone_mobile','text'); |
239 |
$form->setType('indicatif','text'); |
240 |
$form->setType('courriel','text'); |
241 |
$form->setType('notification','checkbox'); |
242 |
$form->setType('frequent','checkbox'); |
243 |
|
244 |
if($this->retourformulaire=='civilite' |
245 |
and $form->val['particulier_civilite'] == $this->getParameter('idxformulaire')) { |
246 |
$form->setType('particulier_civilite','selecthiddenstatic'); |
247 |
} else { |
248 |
$form->setType('particulier_civilite','select'); |
249 |
} |
250 |
|
251 |
if($this->retourformulaire=='civilite' |
252 |
and $form->val['personne_morale_civilite'] == $this->getParameter('idxformulaire')) { |
253 |
$form->setType('personne_morale_civilite','selecthiddenstatic'); |
254 |
} else { |
255 |
$form->setType('personne_morale_civilite','select'); |
256 |
} |
257 |
}// fin ajout |
258 |
if ($maj==1){ //modifier |
259 |
$form->setType('demandeur','hiddenstatic'); |
260 |
$form->setType('type_demandeur','text'); |
261 |
$form->setType('qualification','text'); |
262 |
$form->setType('role','text'); |
263 |
$form->setType('particulier_nom','text'); |
264 |
$form->setType('particulier_prenom','text'); |
265 |
if($this->retourformulaire=='') |
266 |
$form->setType('particulier_date_naissance','date'); |
267 |
else |
268 |
$form->setType('particulier_date_naissance','date2'); |
269 |
$form->setType('particulier_commune_naissance','text'); |
270 |
$form->setType('particulier_departement_naissance','text'); |
271 |
$form->setType('personne_morale_denomination','text'); |
272 |
$form->setType('personne_morale_raison_sociale','text'); |
273 |
$form->setType('personne_morale_siret','text'); |
274 |
$form->setType('personne_morale_categorie_juridique','text'); |
275 |
$form->setType('personne_morale_nom','text'); |
276 |
$form->setType('personne_morale_prenom','text'); |
277 |
$form->setType('numero','text'); |
278 |
$form->setType('voie','text'); |
279 |
$form->setType('complement','text'); |
280 |
$form->setType('lieu_dit','text'); |
281 |
$form->setType('localite','text'); |
282 |
$form->setType('code_postal','text'); |
283 |
$form->setType('bp','text'); |
284 |
$form->setType('cedex','text'); |
285 |
$form->setType('pays','text'); |
286 |
$form->setType('division_territoriale','text'); |
287 |
$form->setType('telephone_fixe','text'); |
288 |
$form->setType('telephone_mobile','text'); |
289 |
$form->setType('indicatif','text'); |
290 |
$form->setType('courriel','text'); |
291 |
$form->setType('notification','checkbox'); |
292 |
$form->setType('frequent','checkbox'); |
293 |
|
294 |
if($this->retourformulaire=='civilite' |
295 |
and $form->val['particulier_civilite'] == $this->getParameter('idxformulaire')) { |
296 |
$form->setType('particulier_civilite','selecthiddenstatic'); |
297 |
} else { |
298 |
$form->setType('particulier_civilite','select'); |
299 |
} |
300 |
|
301 |
if($this->retourformulaire=='civilite' |
302 |
and $form->val['personne_morale_civilite'] == $this->getParameter('idxformulaire')) { |
303 |
$form->setType('personne_morale_civilite','selecthiddenstatic'); |
304 |
} else { |
305 |
$form->setType('personne_morale_civilite','select'); |
306 |
} |
307 |
}// fin modifier |
308 |
if ($maj==2){ //supprimer |
309 |
$form->setType('demandeur','hiddenstatic'); |
310 |
$form->setType('type_demandeur','hiddenstatic'); |
311 |
$form->setType('qualification','hiddenstatic'); |
312 |
$form->setType('role','hiddenstatic'); |
313 |
$form->setType('particulier_nom','hiddenstatic'); |
314 |
$form->setType('particulier_prenom','hiddenstatic'); |
315 |
$form->setType('particulier_date_naissance','hiddenstatic'); |
316 |
$form->setType('particulier_commune_naissance','hiddenstatic'); |
317 |
$form->setType('particulier_departement_naissance','hiddenstatic'); |
318 |
$form->setType('personne_morale_denomination','hiddenstatic'); |
319 |
$form->setType('personne_morale_raison_sociale','hiddenstatic'); |
320 |
$form->setType('personne_morale_siret','hiddenstatic'); |
321 |
$form->setType('personne_morale_categorie_juridique','hiddenstatic'); |
322 |
$form->setType('personne_morale_nom','hiddenstatic'); |
323 |
$form->setType('personne_morale_prenom','hiddenstatic'); |
324 |
$form->setType('numero','hiddenstatic'); |
325 |
$form->setType('voie','hiddenstatic'); |
326 |
$form->setType('complement','hiddenstatic'); |
327 |
$form->setType('lieu_dit','hiddenstatic'); |
328 |
$form->setType('localite','hiddenstatic'); |
329 |
$form->setType('code_postal','hiddenstatic'); |
330 |
$form->setType('bp','hiddenstatic'); |
331 |
$form->setType('cedex','hiddenstatic'); |
332 |
$form->setType('pays','hiddenstatic'); |
333 |
$form->setType('division_territoriale','hiddenstatic'); |
334 |
$form->setType('telephone_fixe','hiddenstatic'); |
335 |
$form->setType('telephone_mobile','hiddenstatic'); |
336 |
$form->setType('indicatif','hiddenstatic'); |
337 |
$form->setType('courriel','hiddenstatic'); |
338 |
$form->setType('notification','hiddenstatic'); |
339 |
$form->setType('frequent','hiddenstatic'); |
340 |
$form->setType('particulier_civilite','selectstatic'); |
341 |
$form->setType('personne_morale_civilite','selectstatic'); |
342 |
}//fin supprimer |
343 |
if ($maj==3){ //consulter |
344 |
$form->setType('demandeur','static'); |
345 |
$form->setType('type_demandeur','static'); |
346 |
$form->setType('qualification','static'); |
347 |
$form->setType('role','static'); |
348 |
$form->setType('particulier_nom','static'); |
349 |
$form->setType('particulier_prenom','static'); |
350 |
$form->setType('particulier_date_naissance','datestatic'); |
351 |
$form->setType('particulier_commune_naissance','static'); |
352 |
$form->setType('particulier_departement_naissance','static'); |
353 |
$form->setType('personne_morale_denomination','static'); |
354 |
$form->setType('personne_morale_raison_sociale','static'); |
355 |
$form->setType('personne_morale_siret','static'); |
356 |
$form->setType('personne_morale_categorie_juridique','static'); |
357 |
$form->setType('personne_morale_nom','static'); |
358 |
$form->setType('personne_morale_prenom','static'); |
359 |
$form->setType('numero','static'); |
360 |
$form->setType('voie','static'); |
361 |
$form->setType('complement','static'); |
362 |
$form->setType('lieu_dit','static'); |
363 |
$form->setType('localite','static'); |
364 |
$form->setType('code_postal','static'); |
365 |
$form->setType('bp','static'); |
366 |
$form->setType('cedex','static'); |
367 |
$form->setType('pays','static'); |
368 |
$form->setType('division_territoriale','static'); |
369 |
$form->setType('telephone_fixe','static'); |
370 |
$form->setType('telephone_mobile','static'); |
371 |
$form->setType('indicatif','static'); |
372 |
$form->setType('courriel','static'); |
373 |
$form->setType('notification','checkboxstatic'); |
374 |
$form->setType('frequent','checkboxstatic'); |
375 |
$form->setType('particulier_civilite','selectstatic'); |
376 |
$form->setType('personne_morale_civilite','selectstatic'); |
377 |
}//fin consulter |
378 |
} |
379 |
|
380 |
function setOnchange(&$form,$maj) { |
381 |
//javascript controle client |
382 |
$form->setOnchange('demandeur','VerifNum(this)'); |
383 |
$form->setOnchange('particulier_date_naissance','fdate(this)'); |
384 |
$form->setOnchange('particulier_civilite','VerifNum(this)'); |
385 |
$form->setOnchange('personne_morale_civilite','VerifNum(this)'); |
386 |
} |
387 |
/** |
388 |
* Methode setTaille |
389 |
*/ |
390 |
function setTaille(&$form, $maj) { |
391 |
$form->setTaille("demandeur", 11); |
392 |
$form->setTaille("type_demandeur", 30); |
393 |
$form->setTaille("qualification", 30); |
394 |
$form->setTaille("role", 30); |
395 |
$form->setTaille("particulier_nom", 30); |
396 |
$form->setTaille("particulier_prenom", 30); |
397 |
$form->setTaille("particulier_date_naissance", 12); |
398 |
$form->setTaille("particulier_commune_naissance", 30); |
399 |
$form->setTaille("particulier_departement_naissance", 30); |
400 |
$form->setTaille("personne_morale_denomination", 15); |
401 |
$form->setTaille("personne_morale_raison_sociale", 15); |
402 |
$form->setTaille("personne_morale_siret", 15); |
403 |
$form->setTaille("personne_morale_categorie_juridique", 15); |
404 |
$form->setTaille("personne_morale_nom", 30); |
405 |
$form->setTaille("personne_morale_prenom", 30); |
406 |
$form->setTaille("numero", 10); |
407 |
$form->setTaille("voie", 30); |
408 |
$form->setTaille("complement", 30); |
409 |
$form->setTaille("lieu_dit", 30); |
410 |
$form->setTaille("localite", 30); |
411 |
$form->setTaille("code_postal", 10); |
412 |
$form->setTaille("bp", 10); |
413 |
$form->setTaille("cedex", 10); |
414 |
$form->setTaille("pays", 30); |
415 |
$form->setTaille("division_territoriale", 30); |
416 |
$form->setTaille("telephone_fixe", 14); |
417 |
$form->setTaille("telephone_mobile", 14); |
418 |
$form->setTaille("indicatif", 10); |
419 |
$form->setTaille("courriel", 30); |
420 |
$form->setTaille("notification", 1); |
421 |
$form->setTaille("frequent", 1); |
422 |
$form->setTaille("particulier_civilite", 11); |
423 |
$form->setTaille("personne_morale_civilite", 11); |
424 |
} |
425 |
|
426 |
/** |
427 |
* Methode setMax |
428 |
*/ |
429 |
function setMax(&$form, $maj) { |
430 |
$form->setMax("demandeur", 11); |
431 |
$form->setMax("type_demandeur", 40); |
432 |
$form->setMax("qualification", 40); |
433 |
$form->setMax("role", 40); |
434 |
$form->setMax("particulier_nom", 40); |
435 |
$form->setMax("particulier_prenom", 40); |
436 |
$form->setMax("particulier_date_naissance", 12); |
437 |
$form->setMax("particulier_commune_naissance", 30); |
438 |
$form->setMax("particulier_departement_naissance", 80); |
439 |
$form->setMax("personne_morale_denomination", 15); |
440 |
$form->setMax("personne_morale_raison_sociale", 15); |
441 |
$form->setMax("personne_morale_siret", 15); |
442 |
$form->setMax("personne_morale_categorie_juridique", 15); |
443 |
$form->setMax("personne_morale_nom", 40); |
444 |
$form->setMax("personne_morale_prenom", 40); |
445 |
$form->setMax("numero", 5); |
446 |
$form->setMax("voie", 40); |
447 |
$form->setMax("complement", 39); |
448 |
$form->setMax("lieu_dit", 39); |
449 |
$form->setMax("localite", 30); |
450 |
$form->setMax("code_postal", 5); |
451 |
$form->setMax("bp", 5); |
452 |
$form->setMax("cedex", 5); |
453 |
$form->setMax("pays", 40); |
454 |
$form->setMax("division_territoriale", 40); |
455 |
$form->setMax("telephone_fixe", 14); |
456 |
$form->setMax("telephone_mobile", 14); |
457 |
$form->setMax("indicatif", 5); |
458 |
$form->setMax("courriel", 40); |
459 |
$form->setMax("notification", 1); |
460 |
$form->setMax("frequent", 1); |
461 |
$form->setMax("particulier_civilite", 11); |
462 |
$form->setMax("personne_morale_civilite", 11); |
463 |
} |
464 |
|
465 |
|
466 |
function setLib(&$form,$maj) { |
467 |
//libelle des champs |
468 |
$form->setLib('demandeur',_('demandeur')); |
469 |
$form->setLib('type_demandeur',_('type_demandeur')); |
470 |
$form->setLib('qualification',_('qualification')); |
471 |
$form->setLib('role',_('role')); |
472 |
$form->setLib('particulier_nom',_('particulier_nom')); |
473 |
$form->setLib('particulier_prenom',_('particulier_prenom')); |
474 |
$form->setLib('particulier_date_naissance',_('particulier_date_naissance')); |
475 |
$form->setLib('particulier_commune_naissance',_('particulier_commune_naissance')); |
476 |
$form->setLib('particulier_departement_naissance',_('particulier_departement_naissance')); |
477 |
$form->setLib('personne_morale_denomination',_('personne_morale_denomination')); |
478 |
$form->setLib('personne_morale_raison_sociale',_('personne_morale_raison_sociale')); |
479 |
$form->setLib('personne_morale_siret',_('personne_morale_siret')); |
480 |
$form->setLib('personne_morale_categorie_juridique',_('personne_morale_categorie_juridique')); |
481 |
$form->setLib('personne_morale_nom',_('personne_morale_nom')); |
482 |
$form->setLib('personne_morale_prenom',_('personne_morale_prenom')); |
483 |
$form->setLib('numero',_('numero')); |
484 |
$form->setLib('voie',_('voie')); |
485 |
$form->setLib('complement',_('complement')); |
486 |
$form->setLib('lieu_dit',_('lieu_dit')); |
487 |
$form->setLib('localite',_('localite')); |
488 |
$form->setLib('code_postal',_('code_postal')); |
489 |
$form->setLib('bp',_('bp')); |
490 |
$form->setLib('cedex',_('cedex')); |
491 |
$form->setLib('pays',_('pays')); |
492 |
$form->setLib('division_territoriale',_('division_territoriale')); |
493 |
$form->setLib('telephone_fixe',_('telephone_fixe')); |
494 |
$form->setLib('telephone_mobile',_('telephone_mobile')); |
495 |
$form->setLib('indicatif',_('indicatif')); |
496 |
$form->setLib('courriel',_('courriel')); |
497 |
$form->setLib('notification',_('notification')); |
498 |
$form->setLib('frequent',_('frequent')); |
499 |
$form->setLib('particulier_civilite',_('particulier_civilite')); |
500 |
$form->setLib('personne_morale_civilite',_('personne_morale_civilite')); |
501 |
} |
502 |
|
503 |
function setSelect(&$form, $maj,&$db,$debug) { |
504 |
if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc.php")) |
505 |
include ("../sql/".$db->phptype."/".$this->table.".form.inc.php"); |
506 |
elseif(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc")) |
507 |
include ("../sql/".$db->phptype."/".$this->table.".form.inc"); |
508 |
|
509 |
// particulier_civilite |
510 |
$this->init_select($form, $db, $maj, $debug, "particulier_civilite", |
511 |
$sql_particulier_civilite, $sql_particulier_civilite_by_id, true); |
512 |
|
513 |
// personne_morale_civilite |
514 |
$this->init_select($form, $db, $maj, $debug, "personne_morale_civilite", |
515 |
$sql_personne_morale_civilite, $sql_personne_morale_civilite_by_id, true); |
516 |
}// fin select |
517 |
|
518 |
//================================== |
519 |
// sous Formulaire [subform] |
520 |
//================================== |
521 |
|
522 |
function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){ |
523 |
$this->retourformulaire = $retourformulaire; |
524 |
if ($validation == 0 and $maj == 0) { |
525 |
if($retourformulaire =='civilite') |
526 |
$form->setVal('particulier_civilite', $idxformulaire); |
527 |
if($retourformulaire =='civilite') |
528 |
$form->setVal('personne_morale_civilite', $idxformulaire); |
529 |
}// fin validation |
530 |
}// fin setValsousformulaire |
531 |
|
532 |
//================================== |
533 |
// cle secondaire [secondary key] |
534 |
//================================== |
535 |
/** |
536 |
* Methode clesecondaire |
537 |
*/ |
538 |
function cleSecondaire($id, &$db = NULL, $val = array(), $DEBUG = false) { |
539 |
// On appelle la methode de la classe parent |
540 |
parent::cleSecondaire($id, $db, $val, $DEBUG); |
541 |
// Verification de la cle secondaire : lien_demande_demandeur |
542 |
$this->rechercheTable($db, "lien_demande_demandeur", "demandeur", $id); |
543 |
// Verification de la cle secondaire : lien_dossier_autorisation_demandeur |
544 |
$this->rechercheTable($db, "lien_dossier_autorisation_demandeur", "demandeur", $id); |
545 |
// Verification de la cle secondaire : lien_lot_demandeur |
546 |
$this->rechercheTable($db, "lien_lot_demandeur", "demandeur", $id); |
547 |
} |
548 |
|
549 |
|
550 |
}// fin classe |
551 |
?> |