1 |
fraynaud |
3 |
<?php |
2 |
|
|
//$Id$ |
3 |
|
|
//gen openMairie le 10/02/2011 20:30 |
4 |
|
|
require_once ("../gen/obj/bible.class.php"); |
5 |
|
|
|
6 |
|
|
class bible extends bible_gen { |
7 |
|
|
|
8 |
fraynaud |
4 |
function bible($id,&$db,$debug) { |
9 |
|
|
$this->constructeur($id,$db,$debug); |
10 |
|
|
}// fin constructeur |
11 |
|
|
|
12 |
|
|
function verifier($val,&$db,$DEBUG) { |
13 |
|
|
parent::verifier($val,$db,$DEBUG); |
14 |
|
|
$f=" ! "; |
15 |
|
|
$imgv="<img src='../img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>"; |
16 |
|
|
if ($this->valF['contenu']==""){ |
17 |
|
|
$this->correct=false; |
18 |
|
|
$this->msg= $this->msg.$imgv. |
19 |
|
|
$this->lang("contenu")." ". |
20 |
|
|
$this->lang("obligatoire").$f; |
21 |
|
|
} |
22 |
|
|
} |
23 |
fraynaud |
3 |
|
24 |
fraynaud |
4 |
function setType(&$form,$maj) { |
25 |
|
|
parent::setType($form,$maj); |
26 |
|
|
if ($maj < 2) { |
27 |
|
|
$form->setType('evenement', 'hiddenstatic'); |
28 |
|
|
$form->setType('complement', 'select'); |
29 |
|
|
$form->setType('automatique', 'select'); |
30 |
|
|
if ($maj==1){ |
31 |
|
|
$form->setType('bible', 'hiddenstatic'); |
32 |
|
|
}else |
33 |
|
|
$form->setType('bible', 'hidden'); |
34 |
|
|
} |
35 |
|
|
} |
36 |
|
|
|
37 |
|
|
function setSelect(&$form, $maj,&$db,$debug) { |
38 |
|
|
parent::setSelect($form, $maj,$db,$debug); |
39 |
|
|
// complement |
40 |
|
|
$contenu=array(); |
41 |
|
|
$contenu[0]=array('1','2','3','4','5','6','7','8','9','10','11'); |
42 |
|
|
$contenu[1]=array($this->lang('complement').' 1', |
43 |
|
|
$this->lang('complement').' 2', |
44 |
|
|
$this->lang('complement').' 3', |
45 |
|
|
$this->lang('complement').' 4', |
46 |
|
|
$this->lang('complement').' 5', |
47 |
|
|
$this->lang('complement').' 6', |
48 |
|
|
$this->lang('complement').' 7', |
49 |
|
|
$this->lang('complement').' 8', |
50 |
|
|
$this->lang('complement').' 9', |
51 |
|
|
$this->lang('complement').' 10', |
52 |
|
|
$this->lang('complement').' 11', |
53 |
|
|
); |
54 |
|
|
$form->setSelect("complement",$contenu); |
55 |
|
|
// automatique |
56 |
|
|
$contenu=array(); |
57 |
|
|
$contenu[0]=array('Non','Oui'); |
58 |
|
|
$contenu[1]=array($this->lang('Non'),$this->lang('Oui')); |
59 |
|
|
$form->setSelect("automatique",$contenu); |
60 |
|
|
} |
61 |
|
|
|
62 |
|
|
|
63 |
fraynaud |
3 |
}// fin classe |
64 |
|
|
?> |