1 |
fraynaud |
3 |
<?php |
2 |
|
|
//$Id$ |
3 |
|
|
//gen openMairie le 10/02/2011 20:33 |
4 |
|
|
require_once ("../gen/obj/evenement.class.php"); |
5 |
|
|
|
6 |
|
|
class evenement extends evenement_gen { |
7 |
|
|
|
8 |
fraynaud |
7 |
function evenement($id,&$db,$debug) { |
9 |
|
|
$this->constructeur($id,$db,$debug); |
10 |
|
|
}// fin constructeur |
11 |
fraynaud |
3 |
|
12 |
fraynaud |
7 |
function setType(&$form,$maj) { |
13 |
|
|
parent::setType($form,$maj); |
14 |
|
|
if ($maj < 2) { |
15 |
|
|
//$form->setType('fin_instruction', 'select'); |
16 |
|
|
$form->setType('accord_tacite', 'select'); |
17 |
|
|
$form->setType('delai_notification', 'select'); |
18 |
|
|
$form->setType('delai', 'select'); |
19 |
|
|
$form->setType('lettretype', 'select'); |
20 |
|
|
$form->setType('consultation', 'checkbox'); |
21 |
|
|
} |
22 |
|
|
} |
23 |
|
|
|
24 |
|
|
function setSelect(&$form, $maj,$db,$debug) { |
25 |
|
|
parent::setSelect($form, $maj,$db,$debug); |
26 |
|
|
|
27 |
|
|
|
28 |
|
|
if($maj<2){ |
29 |
|
|
// lettretype |
30 |
|
|
if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc")) |
31 |
|
|
include ("../sql/".$db->phptype."/".$this->table.".form.inc"); |
32 |
|
|
$contenu=array(); |
33 |
|
|
$res = $db->query($sql_om_lettretype); |
34 |
|
|
if (database::isError($res)) |
35 |
|
|
die($res->getMessage().$sql_om_lettretype); |
36 |
|
|
else{ |
37 |
|
|
if ($debug == 1) |
38 |
|
|
echo " la requete ".$sql_om_lettretype." est executee<br>"; |
39 |
|
|
$contenu[0][0]=''; |
40 |
|
|
$contenu[1][0]=_('choisir')." "._('lettretype'); |
41 |
|
|
$k=1; |
42 |
fraynaud |
268 |
while ($row=& $res->fetchRow()){ |
43 |
|
|
$contenu[0][$k]=$row[0]; |
44 |
|
|
$contenu[1][$k]=$row[1]; |
45 |
|
|
$k++; |
46 |
fraynaud |
7 |
} |
47 |
|
|
$form->setSelect('lettretype',$contenu); |
48 |
fraynaud |
268 |
}// fin error db |
49 |
fraynaud |
7 |
} |
50 |
|
|
// accord_tacite |
51 |
|
|
$contenu=array(); |
52 |
|
|
$contenu[0]=array('Non','Oui'); |
53 |
|
|
$contenu[1]=array($this->lang('Non'),$this->lang('Oui')); |
54 |
|
|
$form->setSelect("accord_tacite",$contenu); |
55 |
|
|
// delai_notification |
56 |
|
|
$contenu=array(); |
57 |
|
|
$contenu[0]=array('0','1'); |
58 |
|
|
$contenu[1]=array('sans','1 '.$this->lang("mois")); |
59 |
|
|
$form->setSelect("delai_notification",$contenu); |
60 |
|
|
// delai |
61 |
|
|
$contenu=array(); |
62 |
|
|
$contenu[0]=array('0','1','2','3','4','5','6','7','8','9','10','11','12','18','24'); |
63 |
|
|
$contenu[1]=array('sans', |
64 |
|
|
'1 '._("mois"), |
65 |
|
|
'2 '._("mois"), |
66 |
|
|
'3 '._("mois"), |
67 |
|
|
'4 '._("mois"), |
68 |
|
|
'5 '._("mois"), |
69 |
|
|
'6 '._("mois"), |
70 |
|
|
'7 '._("mois"), |
71 |
|
|
'8 '._("mois"), |
72 |
|
|
'9 '._("mois"), |
73 |
|
|
'10 '._("mois"), |
74 |
|
|
'11 '._("mois"), |
75 |
|
|
'12 '._("mois"), |
76 |
|
|
'18 '._("mois"), |
77 |
|
|
'24 '._("mois") |
78 |
|
|
); |
79 |
|
|
$form->setSelect("delai",$contenu); |
80 |
|
|
} |
81 |
|
|
|
82 |
|
|
function setTaille(&$form,$maj){ |
83 |
|
|
$form->setTaille('evenement', 8); |
84 |
|
|
$form->setTaille('libelle', 70); |
85 |
|
|
$form->setTaille('nature', 2); |
86 |
|
|
$form->setTaille('action', 30); |
87 |
|
|
$form->setTaille('etat', 20); |
88 |
|
|
$form->setTaille('accord_tacite', 3); |
89 |
|
|
$form->setTaille('delai_notification', 8); |
90 |
|
|
$form->setTaille('avis', 20); |
91 |
|
|
$form->setTaille('lettretype', 60); |
92 |
|
|
$form->setTaille('consultation', 3); |
93 |
|
|
} |
94 |
|
|
|
95 |
|
|
function setMax(&$form,$maj){ |
96 |
|
|
$form->setMax('evenement', 8); |
97 |
|
|
$form->setMax('libelle', 70); |
98 |
|
|
$form->setMax('nature', 2); |
99 |
|
|
$form->setMax('action', 30); |
100 |
|
|
$form->setMax('etat', 20); |
101 |
|
|
$form->setMax('accord_tacite', 3); |
102 |
|
|
$form->setMax('delai_notification', 8); |
103 |
|
|
$form->setMax('avis', 20); |
104 |
|
|
$form->setMax('lettretype', 60); |
105 |
|
|
$form->setMax('consultation', 3); |
106 |
|
|
} |
107 |
|
|
|
108 |
|
|
|
109 |
fraynaud |
3 |
}// fin classe |
110 |
|
|
?> |