1 |
<?php |
<?php |
2 |
//$Id$ |
//$Id: om_sig_point.class.php 1232 2012-05-15 16:09:34Z fraynaud $ |
3 |
//gen openMairie le 06/04/2011 08:33 |
//gen openMairie le 06/04/2011 08:33 |
4 |
require_once ("../gen/obj/om_sig_point.class.php"); |
require_once ("../gen/obj/om_sig_point.class.php"); |
5 |
|
|
7 |
|
|
8 |
var $maj; // pour verification actif |
var $maj; // pour verification actif |
9 |
|
|
10 |
function om_sig_point($id,&$db,$debug) { |
function om_sig_point($id,&$db,$debug) { |
11 |
$this->constructeur($id,$db,$debug); |
$this->constructeur($id,$db,$debug); |
12 |
}// fin constructeur |
}// fin constructeur |
13 |
|
|
14 |
function setType(&$form,$maj) { |
function setType(&$form,$maj) { |
15 |
parent::setType($form,$maj); |
parent::setType($form,$maj); |
16 |
if($maj<2){ |
if($maj<2){ |
17 |
$form->setType('etendue','select'); |
$form->setType('etendue','select'); |
18 |
$form->setType('projection_externe','select'); |
$form->setType('projection_externe','select'); |
19 |
$form->setType('layer_info', 'checkbox'); |
$form->setType('layer_info', 'checkbox'); |
20 |
$form->setType('fond_osm','checkbox'); |
$form->setType('fond_osm','checkbox'); |
21 |
$form->setType('fond_bing','checkbox'); |
$form->setType('fond_bing','checkbox'); |
22 |
$form->setType('fond_sat','checkbox'); |
$form->setType('fond_sat','checkbox'); |
23 |
$form->setType('maj','checkbox'); |
$form->setType('maj','checkbox'); |
24 |
$form->setType('actif', 'checkbox'); |
// AB-DEB 2012-05-14 - gestion champs géométrie |
25 |
} |
$form->setType('type_geometrie','select'); |
26 |
} |
// AB-FIN 2012-05-14 - gestion champs géométrie |
27 |
|
$form->setType('actif', 'checkbox'); |
28 |
function verifier($val, &$db, $DEBUG) { |
} |
29 |
parent::verifier($val, $db, $DEBUG); |
} |
30 |
$f=" ! "; |
|
31 |
$imgv="<img src='../app/img/punaise.png' style='vertical-align:middle' hspace='2' border='0'>"; |
/** |
32 |
if ($this->valF['id']==""){ |
* Methode verifier |
33 |
$this->msg= $this->msg.$imgv._('identifiant')." "._('obligatoire').$f; |
*/ |
34 |
$this->correct=False; |
function verifier($val = array(), &$db = NULL, $DEBUG = false) { |
35 |
}else |
// On appelle la methode de la classe parent |
36 |
// verification si il y a un autre id "actif" pour la collectivite |
parent::verifier($val, $db, $DEBUG); |
37 |
if($this->valF['actif']=="Oui") |
// On verifie si le champ n'est pas vide |
38 |
if($this->maj==0) |
if ($this->valF['id'] == "") { |
39 |
$this->verifieractif($db, $val, $DEBUG,']'); |
$this->correct = false; |
40 |
else |
$this->addToMessage(_("Le champ")." "._("id")." "._("est obligatoire")); |
41 |
$this->verifieractif($db, $val, $DEBUG,$val['om_sig_point']); |
} else { |
42 |
} |
// On verifie si il y a un autre id 'actif' pour la collectivite |
43 |
|
if ($this->valF['actif'] == "Oui") { |
44 |
|
if ($this->maj == 0) { |
45 |
function setTaille(&$form,$maj) { |
// |
46 |
parent::setTaille($form,$maj); |
$this->verifieractif($db, $val, $DEBUG, ']'); |
47 |
//taille des champs affiches (text) |
} else { |
48 |
$form->setTaille('om_sig_point',4); |
// |
49 |
$form->setTaille('om_collectivite',4); |
$this->verifieractif($db, $val, $DEBUG, $val['om_sig_point']); |
50 |
$form->setTaille('id',20); |
} |
51 |
$form->setTaille('libelle',50); |
} |
52 |
$form->setTaille('zoom',3); |
} |
53 |
$form->setTaille('fond_osm',1); |
} |
54 |
$form->setTaille('fond_bing',1); |
|
55 |
$form->setTaille('fond_sat',1); |
function setTaille(&$form,$maj) { |
56 |
$form->setTaille('etendue',60); |
parent::setTaille($form,$maj); |
57 |
$form->setTaille('projection_externe',20); |
//taille des champs affiches (text) |
58 |
$form->setTaille('maj',1); |
$form->setTaille('om_sig_point',4); |
59 |
$form->setTaille('table_update',30); |
$form->setTaille('om_collectivite',4); |
60 |
$form->setTaille('champ',30); |
$form->setTaille('id',20); |
61 |
$form->setTaille('retour',50); |
$form->setTaille('libelle',50); |
62 |
} |
$form->setTaille('zoom',3); |
63 |
|
$form->setTaille('fond_osm',1); |
64 |
function setMax(&$form,$maj) { |
$form->setTaille('fond_bing',1); |
65 |
parent::setMax($form,$maj); |
$form->setTaille('fond_sat',1); |
66 |
$form->setMax('om_sig_point',4); |
$form->setTaille('etendue',60); |
67 |
$form->setMax('om_collectivite',4); |
$form->setTaille('projection_externe',20); |
68 |
$form->setMax('id',50); |
$form->setTaille('maj',1); |
69 |
$form->setMax('libelle',50); |
// AB-DEB 2012-05-14 - gestion champs géométrie |
70 |
$form->setMax('zoom',3); |
$form->setTaille('lib_geometrie',50); |
71 |
$form->setMax('fond_osm',1); |
$form->setTaille('type_geometrie',30); |
72 |
$form->setMax('fond_bing',1); |
// AB-FIN 2012-05-14 - gestion champs géométrie |
73 |
$form->setMax('fond_sat',1); |
$form->setTaille('table_update',30); |
74 |
$form->setMax('etendue',60); |
$form->setTaille('champ',30); |
75 |
$form->setMax('projection_externe',60); |
$form->setTaille('retour',50); |
76 |
$form->setMax('url',2); |
} |
77 |
$form->setMax('maj',1); |
|
78 |
|
function setMax(&$form,$maj) { |
79 |
|
parent::setMax($form,$maj); |
80 |
|
$form->setMax('om_sig_point',4); |
81 |
|
$form->setMax('om_collectivite',4); |
82 |
|
$form->setMax('id',50); |
83 |
|
$form->setMax('libelle',50); |
84 |
|
$form->setMax('zoom',3); |
85 |
|
$form->setMax('fond_osm',1); |
86 |
|
$form->setMax('fond_bing',1); |
87 |
|
$form->setMax('fond_sat',1); |
88 |
|
$form->setMax('etendue',60); |
89 |
|
$form->setMax('projection_externe',60); |
90 |
|
$form->setMax('url',2); |
91 |
|
$form->setMax('maj',1); |
92 |
|
// AB-DEB 2012-05-14 - gestion champs géométrie |
93 |
|
$form->setMax('lib_geometrie',50); |
94 |
$form->setMax('table_update',30); |
$form->setMax('table_update',30); |
95 |
$form->setMax('champ',30); |
// AB-FIN 2012-05-14 - gestion champs géométrie |
96 |
$form->setMax('retour',50); |
$form->setMax('table_update',30); |
97 |
} |
$form->setMax('champ',30); |
98 |
|
$form->setMax('retour',50); |
99 |
function setOnchange(&$form,$maj) { |
} |
100 |
parent::setOnchange($form,$maj); |
|
101 |
$form->setOnchange('zoom','VerifNum(this)'); |
function setOnchange(&$form,$maj) { |
102 |
} |
parent::setOnchange($form,$maj); |
103 |
|
$form->setOnchange('zoom','VerifNum(this)'); |
104 |
function setSelect(&$form, $maj,&$db,$debug) { |
} |
105 |
parent::setSelect($form, $maj,$db,$debug); |
|
106 |
if($maj<2){ |
function setSelect(&$form, $maj,&$db,$debug) { |
107 |
if(file_exists ("../dyn/var_sig.inc")) |
parent::setSelect($form, $maj,$db,$debug); |
108 |
include ("../dyn/var_sig.inc"); |
if($maj<2){ |
109 |
$form->setSelect("etendue",$contenu_etendue); |
if(file_exists ("../dyn/var_sig.inc")) |
110 |
$form->setSelect("projection_externe",$contenu_epsg); |
include ("../dyn/var_sig.inc"); |
111 |
}// fin maj |
$form->setSelect("etendue",$contenu_etendue); |
112 |
} |
$form->setSelect("projection_externe",$contenu_epsg); |
113 |
|
// AB-DEB 2012-05-14 - gestion champs géométrie |
114 |
function setGroupe (&$form, $maj) { |
$form->setSelect("type_geometrie",$type_geometrie); |
115 |
|
// AB-FIN 2012-05-14 - gestion champs géométrie |
116 |
$form->setGroupe('id','D'); |
}// fin maj |
117 |
$form->setGroupe('libelle','G'); |
} |
118 |
$form->setGroupe('actif','F'); |
|
119 |
|
function setGroupe (&$form, $maj) { |
120 |
$form->setGroupe('zoom','D'); |
|
121 |
$form->setGroupe('fond_osm','G'); |
$form->setGroupe('id','D'); |
122 |
$form->setGroupe('fond_bing','G'); |
$form->setGroupe('libelle','G'); |
123 |
$form->setGroupe('fond_sat','G'); |
$form->setGroupe('actif','F'); |
124 |
$form->setGroupe('layer_info','F'); |
|
125 |
|
$form->setGroupe('zoom','D'); |
126 |
$form->setGroupe('etendue','D'); |
$form->setGroupe('fond_osm','G'); |
127 |
$form->setGroupe('projection_externe','F'); |
$form->setGroupe('fond_bing','G'); |
128 |
|
$form->setGroupe('fond_sat','G'); |
129 |
$form->setGroupe('maj','D'); |
$form->setGroupe('layer_info','F'); |
130 |
|
|
131 |
|
$form->setGroupe('etendue','D'); |
132 |
|
$form->setGroupe('projection_externe','F'); |
133 |
|
|
134 |
|
$form->setGroupe('maj','D'); |
135 |
|
// AB-DEB 2012-05-14 - gestion champs géométrie |
136 |
|
$form->setGroupe('lib_geometrie','G'); |
137 |
|
$form->setGroupe('type_geometrie','G'); |
138 |
|
// AB-FIN 2012-05-14 - gestion champs géométrie |
139 |
$form->setGroupe('table_update','G'); |
$form->setGroupe('table_update','G'); |
140 |
$form->setGroupe('champ','F'); |
$form->setGroupe('champ','F'); |
141 |
} |
} |
142 |
|
|
143 |
function setRegroupe (&$form, $maj) { |
function setRegroupe (&$form, $maj) { |
144 |
|
|
145 |
$form->setRegroupe('zoom','D',' '._('fond').' ', "collapsible"); |
$form->setRegroupe('zoom','D',' '._('fond').' ', "collapsible"); |
146 |
$form->setRegroupe('fond_osm','G',''); |
$form->setRegroupe('fond_osm','G',''); |
147 |
$form->setRegroupe('fond_bing','G',''); |
$form->setRegroupe('fond_bing','G',''); |
148 |
$form->setRegroupe('fond_sat','G',''); |
$form->setRegroupe('fond_sat','G',''); |
149 |
$form->setRegroupe('layer_info','F',''); |
$form->setRegroupe('layer_info','F',''); |
150 |
|
|
151 |
$form->setRegroupe('id','D',' '._('titre').' ', "collapsible"); |
$form->setRegroupe('id','D',' '._('titre').' ', "collapsible"); |
152 |
$form->setRegroupe('libelle','G',''); |
$form->setRegroupe('libelle','G',''); |
153 |
$form->setRegroupe('actif','F',''); |
$form->setRegroupe('actif','F',''); |
154 |
|
|
155 |
$form->setRegroupe('etendue','D',' '._('etendue').' ', "collapsible"); |
$form->setRegroupe('etendue','D',' '._('etendue').' ', "collapsible"); |
156 |
$form->setRegroupe('projection_externe','F',''); |
$form->setRegroupe('projection_externe','F',''); |
157 |
|
|
158 |
$form->setRegroupe('maj','D',' '._('Mise a jour').' ', "startClosed"); |
$form->setRegroupe('maj','D',' '._('Mise a jour').' ', "startClosed"); |
159 |
$form->setRegroupe('table_update','G',''); |
// AB-DEB 2012-05-14 - gestion champs géométrie |
160 |
$form->setRegroupe('champ','F',''); |
$form->setRegroupe('lib_geometrie','G',''); |
161 |
|
$form->setRegroupe('type_geometrie','G',''); |
162 |
} |
// AB-FIN 2012-05-14 - gestion champs géométrie |
163 |
|
$form->setRegroupe('table_update','G',''); |
164 |
function setLib(&$form,$maj) { |
$form->setRegroupe('champ','F',''); |
165 |
parent::setLib($form,$maj); |
|
166 |
//libelle des champs |
} |
167 |
$form->setLib('fond_osm',_('osm : ')); |
|
168 |
$form->setLib('fond_bing',_('bing : ')); |
function setLib(&$form,$maj) { |
169 |
$form->setLib('fond_sat',_('sat : ')); |
parent::setLib($form,$maj); |
170 |
$form->setLib('etendue',_('etendue')); |
//libelle des champs |
171 |
$form->setLib('projection_externe',_('projection')); |
$form->setLib('fond_osm',_('osm : ')); |
172 |
$form->setLib('url',_('url')); |
$form->setLib('fond_bing',_('bing : ')); |
173 |
$form->setLib('om_sql',_('requete sql')); |
$form->setLib('fond_sat',_('sat : ')); |
174 |
$form->setLib('maj',_('maj')); |
$form->setLib('etendue',_('etendue')); |
175 |
$form->setLib('table_update',_(' table :')); |
$form->setLib('projection_externe',_('projection')); |
176 |
} |
$form->setLib('url',_('url')); |
177 |
|
$form->setLib('om_sql',_('requete sql')); |
178 |
|
$form->setLib('maj',_('maj')); |
179 |
|
// AB-DEB 2012-05-14 - gestion champs géométrie |
180 |
|
$form->setLib('lib_geometrie',_('nom géométrie')); |
181 |
|
$form->setLib('type_geometrie',_('type de géométrie')); |
182 |
|
// AB-FIN 2012-05-14 - gestion champs géométrie |
183 |
|
$form->setLib('table_update',_(' table :')); |
184 |
|
} |
185 |
|
|
186 |
function setVal(&$form, $maj, $validation, &$db, $DEBUG=null) { |
function setVal(&$form, $maj, $validation, &$db, $DEBUG=null) { |
187 |
parent::setVal($form, $maj, $validation, $db, $DEBUG=null); |
parent::setVal($form, $maj, $validation, $db, $DEBUG=null); |
209 |
else{ |
else{ |
210 |
$nbligne=$res->numrows(); |
$nbligne=$res->numrows(); |
211 |
if ($nbligne>0){ |
if ($nbligne>0){ |
212 |
$this->msg= $this->msg." ".$nbligne." "._("sig_point")." "._("existant"). |
$this->addToMessage($nbligne." "._("sig_point")." "._("existant"). |
213 |
" "._("actif")." ! "._("vous ne pouvez avoir qu un sig_point")." '". |
" "._("actif")." ! "._("vous ne pouvez avoir qu un sig_point")." '". |
214 |
$val['id']."' "._("actif")." "._("par collectivite"); |
$val['id']."' "._("actif")." "._("par collectivite")); |
215 |
$this->correct=False; |
$this->correct=False; |
216 |
} |
} |
217 |
} |
} |
218 |
} |
} |
219 |
|
|
220 |
}// fin classe |
}// fin classe |
|
?> |
|
221 |
|
?> |