1 |
fraynaud |
3 |
<?php |
2 |
atreal |
312 |
//$Id$ |
3 |
|
|
//gen openMairie le 10/02/2011 20:33 |
4 |
fraynaud |
3 |
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 |
nhaye |
403 |
$form->setType('pour_consultation', 'checkbox'); |
21 |
fraynaud |
7 |
} |
22 |
|
|
} |
23 |
atreal |
312 |
|
24 |
fraynaud |
7 |
function setSelect(&$form, $maj,$db,$debug) { |
25 |
|
|
parent::setSelect($form, $maj,$db,$debug); |
26 |
|
|
|
27 |
atreal |
312 |
if($maj<2){ |
28 |
|
|
// lettretype |
29 |
|
|
if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc.php")) |
30 |
|
|
include ("../sql/".$db->phptype."/".$this->table.".form.inc.php"); |
31 |
|
|
$contenu=array(); |
32 |
|
|
$res = $db->query($sql_om_lettretype); |
33 |
|
|
if (database::isError($res)) |
34 |
|
|
die($res->getMessage().$sql_om_lettretype); |
35 |
|
|
else{ |
36 |
|
|
if ($debug == 1) |
37 |
|
|
echo " la requete ".$sql_om_lettretype." est executee<br>"; |
38 |
|
|
$contenu[0][0]=''; |
39 |
|
|
$contenu[1][0]=_('choisir')." "._('lettretype'); |
40 |
|
|
$k=1; |
41 |
|
|
while ($row=& $res->fetchRow()){ |
42 |
|
|
$contenu[0][$k]=$row[0]; |
43 |
|
|
$contenu[1][$k]=$row[1]; |
44 |
|
|
$k++; |
45 |
|
|
} |
46 |
|
|
$form->setSelect('lettretype',$contenu); |
47 |
|
|
}// fin error db |
48 |
fraynaud |
7 |
} |
49 |
|
|
// accord_tacite |
50 |
|
|
$contenu=array(); |
51 |
|
|
$contenu[0]=array('Non','Oui'); |
52 |
|
|
$contenu[1]=array($this->lang('Non'),$this->lang('Oui')); |
53 |
|
|
$form->setSelect("accord_tacite",$contenu); |
54 |
|
|
// delai_notification |
55 |
|
|
$contenu=array(); |
56 |
|
|
$contenu[0]=array('0','1'); |
57 |
|
|
$contenu[1]=array('sans','1 '.$this->lang("mois")); |
58 |
|
|
$form->setSelect("delai_notification",$contenu); |
59 |
|
|
// delai |
60 |
|
|
$contenu=array(); |
61 |
|
|
$contenu[0]=array('0','1','2','3','4','5','6','7','8','9','10','11','12','18','24'); |
62 |
|
|
$contenu[1]=array('sans', |
63 |
|
|
'1 '._("mois"), |
64 |
|
|
'2 '._("mois"), |
65 |
|
|
'3 '._("mois"), |
66 |
|
|
'4 '._("mois"), |
67 |
|
|
'5 '._("mois"), |
68 |
|
|
'6 '._("mois"), |
69 |
|
|
'7 '._("mois"), |
70 |
|
|
'8 '._("mois"), |
71 |
|
|
'9 '._("mois"), |
72 |
|
|
'10 '._("mois"), |
73 |
|
|
'11 '._("mois"), |
74 |
|
|
'12 '._("mois"), |
75 |
|
|
'18 '._("mois"), |
76 |
|
|
'24 '._("mois") |
77 |
atreal |
312 |
); |
78 |
fraynaud |
7 |
$form->setSelect("delai",$contenu); |
79 |
|
|
} |
80 |
|
|
|
81 |
|
|
|
82 |
atreal |
312 |
|
83 |
fraynaud |
3 |
}// fin classe |
84 |
|
|
?> |