1 |
<?php |
2 |
//$Id$ |
3 |
//gen openMairie le 11/04/2013 15:49 |
4 |
|
5 |
require_once ("../obj/om_dbform.class.php"); |
6 |
|
7 |
class destination_gen extends om_dbform { |
8 |
var $table="destination"; |
9 |
var $clePrimaire="destination"; |
10 |
var $typeCle="A"; |
11 |
var $required_field=array( |
12 |
"destination", |
13 |
"libelle" |
14 |
); |
15 |
var $retourformulaire; |
16 |
|
17 |
function setvalF($val) { |
18 |
//affectation valeur formulaire |
19 |
$this->valF['destination'] = $val['destination']; |
20 |
$this->valF['libelle'] = $val['libelle']; |
21 |
} |
22 |
|
23 |
//========================== |
24 |
// Formulaire [form] |
25 |
//========================== |
26 |
|
27 |
function setType(&$form,$maj) { |
28 |
//type |
29 |
if ($maj==0){ //ajout |
30 |
$form->setType('destination','text'); |
31 |
$form->setType('libelle','text'); |
32 |
}// fin ajout |
33 |
if ($maj==1){ //modifier |
34 |
$form->setType('destination','hiddenstatic'); |
35 |
$form->setType('libelle','text'); |
36 |
}// fin modifier |
37 |
if ($maj==2){ //supprimer |
38 |
$form->setType('destination','hiddenstatic'); |
39 |
$form->setType('libelle','hiddenstatic'); |
40 |
}//fin supprimer |
41 |
if ($maj==3){ //consulter |
42 |
$form->setType('destination','static'); |
43 |
$form->setType('libelle','static'); |
44 |
}//fin consulter |
45 |
} |
46 |
/** |
47 |
* Methode setTaille |
48 |
*/ |
49 |
function setTaille(&$form, $maj) { |
50 |
$form->setTaille("destination", 10); |
51 |
$form->setTaille("libelle", 30); |
52 |
} |
53 |
|
54 |
/** |
55 |
* Methode setMax |
56 |
*/ |
57 |
function setMax(&$form, $maj) { |
58 |
$form->setMax("destination", 2); |
59 |
$form->setMax("libelle", 80); |
60 |
} |
61 |
|
62 |
|
63 |
function setLib(&$form,$maj) { |
64 |
//libelle des champs |
65 |
$form->setLib('destination',_('destination')); |
66 |
$form->setLib('libelle',_('libelle')); |
67 |
} |
68 |
|
69 |
function setSelect(&$form, $maj,&$db,$debug) { |
70 |
if(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc.php")) |
71 |
include ("../sql/".$db->phptype."/".$this->table.".form.inc.php"); |
72 |
elseif(file_exists ("../sql/".$db->phptype."/".$this->table.".form.inc")) |
73 |
include ("../sql/".$db->phptype."/".$this->table.".form.inc"); |
74 |
}// fin select |
75 |
|
76 |
//================================== |
77 |
// sous Formulaire [subform] |
78 |
//================================== |
79 |
|
80 |
function setValsousformulaire(&$form,$maj,$validation,$idxformulaire,$retourformulaire,$typeformulaire,&$db,$DEBUG=null){ |
81 |
$this->retourformulaire = $retourformulaire; |
82 |
}// fin setValsousformulaire |
83 |
|
84 |
//================================== |
85 |
// cle secondaire [secondary key] |
86 |
//================================== |
87 |
|
88 |
}// fin classe |
89 |
?> |