1 |
fraynaud |
3 |
<?php |
2 |
|
|
//$Id$ |
3 |
|
|
//gen openMairie le 10/02/2011 20:36 |
4 |
|
|
require_once ("../gen/obj/service.class.php"); |
5 |
|
|
|
6 |
|
|
class service extends service_gen { |
7 |
|
|
|
8 |
fraynaud |
10 |
function service($id,&$db,$debug) { |
9 |
|
|
$this->constructeur($id,$db,$debug); |
10 |
|
|
}// fin constructeur |
11 |
|
|
|
12 |
|
|
function setType(&$form,$maj) { |
13 |
|
|
parent::setType($form,$maj); |
14 |
|
|
if ($maj < 2) { |
15 |
|
|
$form->setType('delai', 'select'); |
16 |
vpihour |
502 |
$form->setType('type_consultation', 'select'); |
17 |
fraynaud |
10 |
} |
18 |
|
|
} |
19 |
fraynaud |
3 |
|
20 |
fraynaud |
10 |
function setSelect(&$form, $maj,$db,$debug) { |
21 |
|
|
parent::setSelect($form, $maj,$db,$debug) ; |
22 |
|
|
$contenu=array(); |
23 |
|
|
$contenu[0]=array('0','1','2','3', |
24 |
|
|
'4','5','6', |
25 |
|
|
'7','8','9',' |
26 |
|
|
10','11','12', |
27 |
|
|
'18','24'); |
28 |
|
|
$contenu[1]=array('sans', |
29 |
|
|
'1 '._('mois'), |
30 |
|
|
'2 '._('mois'), |
31 |
|
|
'3 '._('mois'), |
32 |
|
|
'4 '._('mois'), |
33 |
|
|
'5 '._('mois'), |
34 |
|
|
'6 '._('mois'), |
35 |
|
|
'7 '._('mois'), |
36 |
|
|
'8 '._('mois'), |
37 |
|
|
'9 '._('mois'), |
38 |
|
|
'10 '._('mois'), |
39 |
|
|
'11'._('mois'), |
40 |
|
|
'12 '._('mois'), |
41 |
|
|
'18 '._('mois'), |
42 |
|
|
'24 '._('mois') |
43 |
|
|
); |
44 |
|
|
$form->setSelect("delai",$contenu); |
45 |
vpihour |
502 |
|
46 |
|
|
$contenu=array(); |
47 |
|
|
$contenu[0]=array('pour_information', |
48 |
|
|
'avec_avis_attendu', |
49 |
|
|
'pour_conformite'); |
50 |
|
|
$contenu[1]=array(_('Pour information'), |
51 |
|
|
_('Avec avis attendu'), |
52 |
|
|
_('Pour conformite')); |
53 |
|
|
$form->setSelect("type_consultation",$contenu); |
54 |
fraynaud |
10 |
} |
55 |
vpihour |
502 |
|
56 |
|
|
function setVal(&$form,$maj,$validation){ |
57 |
fraynaud |
10 |
|
58 |
vpihour |
502 |
if ($maj > 1){ |
59 |
|
|
//Traitement des données pour l'affichage |
60 |
|
|
$temp = $this->val[array_search('type_consultation', array_keys($form->val))]; |
61 |
|
|
|
62 |
|
|
if ( strcmp($temp, 'pour_information') == 0 ){ |
63 |
|
|
|
64 |
|
|
$temp = _('Pour information'); |
65 |
|
|
|
66 |
|
|
}elseif( strcmp($temp, 'avec_avis_attendu') == 0 ) { |
67 |
|
|
|
68 |
|
|
$temp = _('Avec avis attendu'); |
69 |
|
|
|
70 |
|
|
}elseif( strcmp($temp, 'pour_conformite') == 0 ) { |
71 |
|
|
|
72 |
|
|
$temp = _('Pour conformité'); |
73 |
|
|
|
74 |
|
|
} |
75 |
|
|
|
76 |
|
|
$form->setVal('type_consultation', $temp); |
77 |
|
|
} |
78 |
|
|
} |
79 |
|
|
|
80 |
|
|
//Formatage des intitulés des champs. |
81 |
|
|
function setLib(&$form,$maj) { |
82 |
|
|
parent::setLib($form,$maj); |
83 |
|
|
$form->setLib('abrege','Abrégé'); |
84 |
|
|
$form->setLib('libelle','Libellé'); |
85 |
|
|
$form->setLib('adresse','Adresse'); |
86 |
|
|
$form->setLib('adresse2','Complément d\'adresse'); |
87 |
|
|
$form->setLib('cp','Code postal'); |
88 |
|
|
$form->setLib('ville','Ville'); |
89 |
|
|
$form->setLib('email','Email'); |
90 |
|
|
$form->setLib('type_consultation','Type de consultation'); |
91 |
|
|
$form->setLib('type_consultation','Type de consultation'); |
92 |
|
|
$form->setLib('consultation_papier','Consultation papier'); |
93 |
|
|
$form->setLib('om_validite_debut','Debut de validité'); |
94 |
|
|
$form->setLib('om_validite_fin','Fin de validité'); |
95 |
|
|
} |
96 |
fraynaud |
3 |
}// fin classe |
97 |
|
|
?> |