Subversion Repositories Applications.papyrus

Rev

Rev 1430 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
448 ddelon 1
<?php
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */
3
// +------------------------------------------------------------------------------------------------------+
4
// | PHP version 4.1                                                                                      |
5
// +------------------------------------------------------------------------------------------------------+
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
7
// +------------------------------------------------------------------------------------------------------+
8
// | This library is free software; you can redistribute it and/or                                        |
9
// | modify it under the terms of the GNU Lesser General Public                                           |
10
// | License as published by the Free Software Foundation; either                                         |
11
// | version 2.1 of the License, or (at your option) any later version.                                   |
12
// |                                                                                                      |
13
// | This library is distributed in the hope that it will be useful,                                      |
14
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
15
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                                    |
16
// | Lesser General Public License for more details.                                                      |
17
// |                                                                                                      |
18
// | You should have received a copy of the GNU Lesser General Public                                     |
19
// | License along with this library; if not, write to the Free Software                                  |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
1467 alexandre_ 22
// CVS : $Id: inscription.class.php,v 1.22 2007-06-25 09:59:03 alexandre_tb Exp $
448 ddelon 23
/**
24
* Inscription
25
*
1430 alexandre_ 26
* Un module d'inscription, en general ce code est specifique a
448 ddelon 27
* un site web
28
*
29
*@package inscription
30
//Auteur original :
31
*@author        Alexandre GRANIER <alexandre@tela-botanica.org>
32
//Autres auteurs :
33
*@copyright     Tela-Botanica 2000-2004
1467 alexandre_ 34
*@version       $Revision: 1.22 $ $Date: 2007-06-25 09:59:03 $
448 ddelon 35
// +------------------------------------------------------------------------------------------------------+
36
*/
37
 
38
// +------------------------------------------------------------------------------------------------------+
39
// |                                            ENTETE du PROGRAMME                                       |
40
// +------------------------------------------------------------------------------------------------------+
41
 
1344 alexandre_ 42
require_once PAP_CHEMIN_API_PEAR.'HTML/QuickForm.php' ;
448 ddelon 43
 
1344 alexandre_ 44
class ListeDePays extends PEAR{
448 ddelon 45
 
46
    var $_db ;
47
    /** Constructeur
1430 alexandre_ 48
     *  Verifie l'existance de la table gen_pays_traduction
448 ddelon 49
     *
50
     *  @param  DB  Un objet PEAR::DB
51
     * @return
52
     */
53
 
54
    function ListeDePays(&$objetDB) {
55
        $this->_db = $objetDB ;
603 florian 56
        $requete = 'SHOW TABLES';
448 ddelon 57
        $resultat = $objetDB->query ($requete) ;
58
        if (DB::isError ($resultat)) {
59
            die ("Echec de la requete : $requete<br />".$resultat->getMessage()) ;
60
        }
61
        while ($ligne = $resultat->fetchRow()) {
62
            if ($ligne[0] == INS_TABLE_PAYS) {
63
                return ;
64
            }
65
        }
1430 alexandre_ 66
        return $this->raiseError('La table gen_i18n_pays n\'est pas presente dans la base de donnee !') ;
448 ddelon 67
    }
68
 
69
    /** Renvoie la liste des pays traduite
70
     *
71
     *  @param  string  une chaine de type i18n ou une chaine code iso langue (fr_FR ou fr ou FR)
1430 alexandre_ 72
     * @return  un tableau contenant en cle, le code iso du pays, en majuscule et en valeur le nom du pays traduit
448 ddelon 73
     */
74
    function getListePays($i18n) {
75
	    if (strlen($i18n) == 2) {
76
		    $i18n = strtolower($i18n)."-".strtoupper($i18n) ;
77
	    }
1298 neiluj 78
	    $requete = 'select '.INS_CHAMPS_ID_PAYS.', '.INS_CHAMPS_LABEL_PAYS.' from '.INS_TABLE_PAYS
79
							.' where '.INS_CHAMPS_I18N_PAYS.'="'.$i18n.'"';
448 ddelon 80
	    $resultat = $this->_db->query($requete) ;
81
 
82
	    if (DB::isError($resultat)) {
83
		    die ("Echec de la requete : $requete<br />".$resultat->getMessage()) ;
84
	    }
85
	    if ($resultat->numRows() == 0) {
1430 alexandre_ 86
		    return $this->raiseError('Le code fourni ne correspond a aucun pays ou n\'est pas dans la table!') ;
448 ddelon 87
	    }
88
	    $retour = array() ;
89
	    while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
90
		    $retour[$ligne[INS_CHAMPS_ID_PAYS]] = $ligne[INS_CHAMPS_LABEL_PAYS] ;
91
	    }
92
	    return $retour ;
93
    }
673 alexandre_ 94
 
95
    /** Renvoie le nom d'un pays traduit dans la langue passé en paramètre
96
     *
97
     *  @param  string  une chaine de type i18n ou une chaine code iso langue (fr_FR ou fr ou FR)
1430 alexandre_ 98
     * @return  un tableau contenant en cle, le code iso du pays, en majuscule et en valeur le nom du pays traduit
673 alexandre_ 99
     */
100
    function getNomPays($codeIso, $i18n = INS_LANGUE_DEFAUT) {
101
	    if (strlen($i18n) == 2) {
102
		    $i18n = strtolower($i18n)."-".strtoupper($i18n) ;
103
	    }
104
	    $requete = 'select '.INS_CHAMPS_LABEL_PAYS.' from '.INS_TABLE_PAYS.
1298 neiluj 105
							' where '.INS_CHAMPS_I18N_PAYS.'="'.$i18n.'" and '.
106
							INS_CHAMPS_ID_PAYS.'="'.$codeIso.'"';
895 alexandre_ 107
	    $resultat = $this->_db->query($requete) ;
108
 
673 alexandre_ 109
	    if (DB::isError($resultat)) {
110
		    die ("Echec de la requete : $requete<br />".$resultat->getMessage()) ;
111
	    }
112
	    if ($resultat->numRows() == 0) {
1430 alexandre_ 113
		    return $this->raiseError('Le code fourni ne correspond a aucun pays ou n\'est pas dans la table!') ;
673 alexandre_ 114
	    }
115
	    $ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC) ;
116
	    return $ligne[INS_CHAMPS_LABEL_PAYS] ;
117
    }
448 ddelon 118
}
119
 
120
class HTML_formulaireInscription extends HTML_Quickform {
121
 
122
 
123
    /**
124
     *  Constructeur
125
     *
126
     * @param string formName Le nom du formulaire
1430 alexandre_ 127
     * @param string method Methode post ou get
448 ddelon 128
     * @param string action L'action du formulaire.
129
     * @param int target La cible.
130
     * @param Array attributes Les attributs HTML en plus.
131
     * @param bool trackSubmit ??
132
     * @return void
133
     * @access public
134
     */
135
 
136
    function HTML_formulaireInscription( $formName,  $method = "post",  $action,  $target = "_self",  $attributes,  $trackSubmit = false ) {
137
        HTML_Quickform::HTML_Quickform($formName, $method, $action, $target, $attributes, $trackSubmit) ;
138
    }
139
 
140
    /**
141
     *
142
     *
143
     * @return void
144
     * @access public
145
     */
146
    function construitFormulaire($url)
147
    {
1298 neiluj 148
		$squelette =& $this->defaultRenderer();
149
   		$squelette->setFormTemplate("\n".'<form {attributes}>'."\n".'<table style="border:0;width:100%;">'."\n".'{content}'."\n".'</table>'."\n".'</form>'."\n");
150
    	$squelette->setElementTemplate( '<tr>'."\n".
151
										'<td style="font-size:12px;width:140px;text-align:right;">'."\n".'{label}'.
152
										'<!-- BEGIN required --><span class="symbole_obligatoire">&nbsp;*</span><!-- END required -->'."\n".
153
										' :</td>'."\n".
154
										'<td style="text-align:left;padding:5px;"> '."\n".'{element}'."\n".
155
										'<!-- BEGIN error --><span class="erreur">{error}</span><!-- END error -->'."\n".
156
										'</td>'."\n".
157
										'</tr>'."\n");
158
  	  	$squelette->setElementTemplate( '<tr><td colspan="2" style="font-size:12px;text-align:left;">{label}{element}</td></tr>'."\n", 'lettre');
159
        $squelette->setElementTemplate( '<tr><td colspan="2" style="font-size:12px;text-align:left;">{label}{element}</td></tr>'."\n", 'visible');
160
        $squelette->setElementTemplate( '<tr><td colspan="2" class="bouton" id="bouton_annuler">{label}{element}</td></tr>'."\n", 'groupe_bouton');
161
        $squelette->setGroupTemplate('<tr><td colspan="2">{content}</td></tr>'."\n", 'groupe_bouton');
162
        $squelette->setRequiredNoteTemplate("\n".'<tr>'."\n".'<td colspan="2" class="symbole_obligatoire">* {requiredNote}</td></tr>'."\n");
163
		//Traduction de champs requis
164
		$this->setRequiredNote(INS_CHAMPS_REQUIS) ;
165
		$this->setJsWarnings(INS_ERREUR_SAISIE,INS_VEUILLEZ_CORRIGER);
1467 alexandre_ 166
 
167
		$script = '
1420 alexandre_ 168
	        // Variables globales
169
	        var map = null;
170
	    	var geocoder = null;
171
			var lat = document.getElementById("latitude");
172
	        var lon = document.getElementById("longitude");
173
 
174
	        function load() {
175
	        if (GBrowserIsCompatible()) {
176
	          map = new GMap2(document.getElementById("map"));
177
	          map.addControl(new GSmallMapControl());
178
			  map.addControl(new GMapTypeControl());
179
			  map.addControl(new GScaleControl());
180
			  map.enableContinuousZoom();
181
 
182
			  // On centre la carte sur le languedoc roussillon
183
			  center = new GLatLng(43.84245116699036, 3.768310546875);
184
	          map.setCenter(center, 7);
185
			  //marker = new GMarker(center, {draggable: true}) ;
186
	          GEvent.addListener(map, "click", function(marker, point) {
187
	  		    if (marker) {
188
	    	      map.removeOverlay(marker);
189
	    	      var lat = document.getElementById("latitude");
190
	              var lon = document.getElementById("longitude");
191
	    	      lat.value = "";
192
	              lon.value = "";
193
			    } else {
194
			      // On ajoute un marqueur a l endroit du clic et on place les coordonnees dans les champs latitude et longitude
195
			      marker = new GMarker(point, {draggable: true}) ;
196
			      GEvent.addListener(marker, "dragend", function () {
197
	                coordMarker = marker.getPoint() ;
198
	                var lat = document.getElementById("latitude");
199
	                var lon = document.getElementById("longitude");
200
		            lat.value = coordMarker.lat();
201
	                lon.value = coordMarker.lng();
202
	              });
203
		          map.addOverlay(marker);
204
		          setLatLonForm(marker);
205
	  		    }
206
	        });' ;
207
			if ($this->getElementValue ('latitude') != '' && $this->getElementValue('longitude') != '') {
208
				$script .= '
209
						point = new GLatLng('.$this->getElementValue('latitude').', '.$this->getElementValue('longitude').');
210
						marker = new GMarker(point, {draggable: true});
211
						map.addOverlay(marker);' ;
212
			}
213
	        $script .= 'geocoder = new GClientGeocoder();
214
	      }
215
	    };
216
	    function showAddress() {
1467 alexandre_ 217
	      var adress_1 = document.getElementById("a_adresse1").value ;
218
	      var adress_2 = document.getElementById("a_adresse2").value ;
219
	      var ville = document.getElementById("a_ville").value ;
220
	      var cp = document.getElementById("a_code_postal").value ;
221
	      var selectIndex = document.getElementById("a_ce_pays").selectedIndex;
222
	      var pays = document.getElementById("a_ce_pays").options[selectIndex].text ;
1420 alexandre_ 223
 
224
	      var address = adress_1 + \' \' + adress_2 + \' \' + \' \' + cp + \' \' + ville + \' \' +pays ;
225
	      if (geocoder) {
226
	        geocoder.getLatLng(
227
	          address,
228
	          function(point) {
229
	            if (!point) {
230
	              alert(address + " not found");
231
	            } else {
232
	              map.setCenter(point, 13);
233
	              var marker = new GMarker(point, {draggable: true});
234
	              GEvent.addListener(marker, "dragend", function () {
235
	      coordMarker = marker.getPoint() ;
236
	      var lat = document.getElementById("latitude");
237
	      var lon = document.getElementById("longitude");
238
		  lat.value = coordMarker.lat();
239
	      lon.value = coordMarker.lng();
240
	    });
241
 
242
	              map.addOverlay(marker);
243
	              setLatLonForm(marker)
244
	              marker.openInfoWindowHtml(address+ "'.INS_GOOGLE_MSG.'");
245
	            }
246
	          }
247
	        );
248
	      }
249
	    }
250
	    function setLatLonForm(marker) {
251
	      coordMarker = marker.getPoint() ;
252
	      var lat = document.getElementById("latitude");
253
	      var lon = document.getElementById("longitude");
254
		  lat.value = coordMarker.lat();
255
	      lon.value = coordMarker.lng();
256
	    }
257
	    ';
1467 alexandre_ 258
 
259
		// Mise en place du systeme de template du bazar
260
		include_once GEN_CHEMIN_API.'/formulaire/formulaire.fonct.inc.php';
261
		$tableau= formulaire_valeurs_template_champs($GLOBALS['ins_config']['ic_inscription_template']);
262
 
263
		if (isset ($_REQUEST['action']) && $_REQUEST['action']=='modifier') {
264
			//Ajout des valeurs par defaut
265
			$requete_defaut = 'select * from annuaire where a_id='.$GLOBALS['AUTH']->getAuthData(INS_CHAMPS_ID);
266
			$resultat_defaut = $GLOBALS['ins_db']->query($requete_defaut);
267
			$valeurs_par_defaut = $resultat_defaut->fetchRow(DB_FETCHMODE_ASSOC);
268
 
269
			for ($i=0; $i<count($tableau); $i++) {
270
				if ( $tableau[$i]['type']=='liste' || $tableau[$i]['type']=='checkbox' ) {
271
					if (is_int ($tableau[$i]['nom_bdd'])) $def=$tableau[$i]['type'].$tableau[$i]['nom_bdd'];
272
							else $def = $tableau[$i]['nom_bdd'];
273
				}
274
				elseif ( $tableau[$i]['type']=='texte' || $tableau[$i]['type']=='textelong' ||
275
							$tableau[$i]['type']=='listedatedeb' || $tableau[$i]['type']=='listedatefin' ||
276
							 $tableau[$i]['type']=='champs_mail') {
277
					$def=$tableau[$i]['nom_bdd'];
278
				} elseif ($tableau[$i]['type']=='carte_google') {
279
					$def = 'carte_google';
280
					$valeurs_par_defaut[$def] = array ('latitude' => $valeurs_par_defaut[$tableau[$i]['limite1']],
281
												'longitude' => $valeurs_par_defaut[$tableau[$i]['limite2']]);
282
					GEN_stockerCodeScript($script);
283
				}
284
				$tableau[$i]['type']($this, $tableau[$i]['nom_bdd'], $tableau[$i]['label'], $tableau[$i]['limite1'],
285
			                         $tableau[$i]['limite2'], $valeurs_par_defaut[$def], $tableau[$i]['table_source'],
286
			                         $tableau[$i]['obligatoire']) ;
287
			}
288
		}
289
		else {
290
			for ($i=0; $i<count($tableau); $i++) {
291
				if ($tableau[$i]['type'] == 'carte_google') {
292
					GEN_stockerCodeScript($script);
293
				}
294
				$tableau[$i]['type']($this, $tableau[$i]['nom_bdd'], $tableau[$i]['label'], $tableau[$i]['limite1'],
295
			                         $tableau[$i]['limite2'], $tableau[$i]['defaut'], $tableau[$i]['table_source'], $tableau[$i]['obligatoire']) ;
296
			 }
297
		}
298
 
299
        $debut = inscription::getTemplate(INS_TEMPLATE_TITRE_FORMULAIRE, $GLOBALS['ins_config']['ic_id_inscription'])."\n";
300
        $this->addElement('html', $debut);
301
        /*
302
        $this->addElement('text', 'email', INS_EMAIL) ;
303
        $this->addRule('email', INS_EMAIL_REQUIS, 'required','', 'client') ;
304
        $this->addRule('email', INS_MAIL_INCORRECT, 'email', '', 'client') ;
305
        /*
306
        $this->addElement('password', 'mot_de_passe', INS_MOT_DE_PASSE, array('size' => '10')) ;
307
        $this->addElement('password', 'mot_de_passe_repete', INS_REPETE_MOT_DE_PASSE, array('size' => '10')) ;
308
        $this->addRule('mot_de_passe', INS_MOT_DE_PASSE_REQUIS, 'required', '', 'client') ;
309
        $this->addRule('mot_de_passe_repete', INS_MOT_DE_PASSE_REQUIS, 'required', '', 'client') ;
310
        $this->addRule(array ('mot_de_passe', 'mot_de_passe_repete'), INS_MOTS_DE_PASSE_DIFFERENTS, 'compare', '', 'client') ;
311
 
312
        $this->addElement('text', 'nom', INS_NOM) ;
313
        $this->addRule('nom', INS_NOM_REQUIS, 'required', '', 'client') ;
314
        $this->addElement('text', 'prenom', INS_PRENOM) ;
315
        $this->addRule('prenom', INS_PRENOM_REQUIS, 'required', '', 'client') ;
316
        if ($GLOBALS['ins_config']['ic_utilise_nom_wiki'] && ! $GLOBALS['ins_config']['ic_genere_nom_wiki']) {
317
        		$this->addElement('text', 'nomwiki', INS_NOM_WIKI, array('id' => 'nom_wiki')) ;
1420 alexandre_ 318
        }
1467 alexandre_ 319
        $this->addElement('text', 'adresse_1', INS_ADRESSE_1, array('id' => 'adresse_1')) ;
320
        $this->addElement('text', 'adresse_2', INS_ADRESSE_2, array('id' => 'adresse_2')) ;
321
        $this->addElement('text', 'cp', INS_CODE_POSTAL, array('id' => 'cp')) ;
322
        $this->addRule('cp', INS_CODE_POSTAL_REQUIS, 'required', '', 'client') ;
323
        $this->addElement('text', 'ville', INS_VILLE, array('id' => 'ville')) ;
324
        // L'element pays est construit a partir du tableau liste_pays
325
        $liste_pays = new ListeDePays($GLOBALS['ins_db']) ;
326
        $this->addElement('select', 'pays', INS_PAYS, $liste_pays->getListePays(INS_LANGUE_DEFAUT), array('id' => 'pays')) ;
327
        */
328
        //$this->addElement('text', 'telephone', INS_TELEPHONE, array('size' => '12')) ;
329
        //$this->addElement('text', 'fax', INS_FAX, array('size' => '12')) ;
330
        //$this->addElement('text', 'site', INS_SITE_INTERNET) ;
331
        /*
332
        $this->addElement('file', 'image', INS_LOGO_OU_IMAGE) ;
333
		$this->setMaxFileSize(150000); //logo de 15ko maximum
334
		*/
335
        //if (INS_CHAMPS_LETTRE != '') $this->addElement('checkbox', 'lettre',INS_LETTRE, '<br />') ;
336
        //$this->addElement('checkbox', 'visible',INS_VISIBLE, '<br />') ;
337
        /*
338
        $this->addElement('hidden', 'est_structure', 0) ;
339
        $defauts=array ('lettre'=>1,'pays'=>'FR');
340
        if (isset ($GLOBALS['ins_config']['ic_google_key']) && $GLOBALS['ins_config']['ic_google_key'] != '') {
341
	        $this->addElement('button', 'chercher_sur_carte', 'Vérifier mon adresse avec la carte', array("onclick" => "showAddress();"));
342
	        $this->addElement('html', '<tr><td colspan="2"	><div id="map" style="width: 600px; height: 450px"></div></td></tr>');
343
	        $this->addElement('text', 'latitude', 'Latitude', array('id' => 'latitude', 'size' => 6, 'readonly' => 'readonly'));
344
	        $this->addElement('text', 'longitude', 'longitude', array('id' => 'longitude', 'size' => 6, 'readonly' => 'readonly'));
345
 
346
        }
347
        */
348
        //$this->setDefaults($defauts);
349
        // on fait un groupe avec les boutons pour les mettres sur la meme ligne
350
        $boutons[] = &HTML_QuickForm::createElement('button', 'annuler', INS_ANNULER, array ("onclick" => "javascript:document.location.href='".$url."'",
351
        												'id' => 'annuler', 'class' => 'bouton'));
352
        $boutons[] = &HTML_QuickForm::createElement('submit', 'valider', INS_VALIDER, array ('id' => 'valider', 'class' =>'bouton'));
353
        $this->addGroup($boutons, 'groupe_bouton', '', "\n");
354
 
355
        if (isset ($GLOBALS['ins_config']['ic_google_key']) && $GLOBALS['ins_config']['ic_google_key'] != '') {
356
        	GEN_stockerFichierScript('googleMapScript', $GLOBALS['ins_config']['ic_google_key']);
357
 
358
 
359
 
360
 
361
        }
448 ddelon 362
    } // end of member function construitFormulaire
363
 
364
    /** Modifie le formulaire pour l'adapter au cas des structures
365
     *
366
     *
367
     * @return void
368
     * @access public
369
     */
370
    function formulaireStructure()
371
    {
1467 alexandre_ 372
        /*
448 ddelon 373
        $this->removeElement('nom', false) ;
603 florian 374
        $this->removeElement('prenom') ;
448 ddelon 375
        $this->removeElement('email', false) ;
1467 alexandre_ 376
        $this->removeElement('telephone', false) ;
377
        $nom_structure = & HTML_QuickForm::createElement('text', 'nom', INS_NOM_STRUCTURE) ;
378
        $this->insertElementBefore($nom_structure, 'mot_de_passe') ;
379
 
448 ddelon 380
        $mail = & HTML_QuickForm::createElement('text', 'email', INS_MAIL_STRUCTURE) ;
381
        $this->insertElementBefore($mail, 'mot_de_passe') ;
1467 alexandre_ 382
 
603 florian 383
        $this->addRule('nom', INS_NOM_REQUIS, 'required', '', 'client') ;
1467 alexandre_ 384
        /*
603 florian 385
        $sigle_structure = & HTML_QuickForm::createElement('text', 'sigle_structure', INS_SIGLE_DE_LA_STRUCTURE) ;
386
        $this->insertElementBefore($sigle_structure, 'email') ;
1467 alexandre_ 387
        */
388
        // not required
389
        //$this->addRule('sigle_structure', INS_SIGLE_REQUIS, 'required', '', 'client') ;
390
 
391
        // what's this ?
392
        //$num_agrement = & HTML_QuickForm::createElement('text', 'num_agrement', INS_NUM_AGREMENT) ;
393
        //$this->insertElementBefore($num_agrement, 'email') ;
394
        /*
395
        $telephone = & HTML_QuickForm::createElement('text', 'telephone', INS_TELEPHONE_STRUCTURE) ;
396
        $this->insertElementBefore($telephone, 'lettre') ;
397
        $fax = & HTML_QuickForm::createElement('text', 'fax', INS_FAX_STRUCTURE) ;
398
        $this->insertElementBefore($fax, 'lettre') ;
399
 
603 florian 400
        $this->removeElement('site', false) ;
448 ddelon 401
        $site_structure = & HTML_QuickForm::createElement('text', 'site', INS_SITE_STRUCTURE) ;
402
        $this->insertElementBefore($site_structure, 'lettre') ;
1467 alexandre_ 403
 
404
        // bloc contact
405
        $coord = & HTML_QuickForm::createElement('html', '<tr><td colspan="2"><strong>'.INS_COORD_CONTACT.'</strong></td></tr>') ;
406
        $nom = & HTML_QuickForm::createElement('text', 'nom_contact', INS_NOM_CONTACT) ;
407
        $prenom = & HTML_QuickForm::createElement('text', 'prenom_contact', INS_PRENOM_CONTACT) ;
408
        $poste = & HTML_QuickForm::createElement('text', 'poste_contact', INS_POSTE_CONTACT) ;
409
        $tel = & HTML_QuickForm::createElement('text', 'tel_contact', INS_TEL_CONTACT) ;
410
		$this->insertElementBefore($coord, 'lettre') ;
411
		$this->insertElementBefore($nom, 'lettre') ;
412
		$this->insertElementBefore($prenom, 'lettre') ;
413
		$this->insertElementBefore($poste, 'lettre') ;
414
		$this->insertElementBefore($tel, 'lettre') ;
415
        */
416
        $separateur = & HTML_QuickForm::createElement('html', '<tr><td colspan="2"><hr /></td></tr>') ;
417
        $this->insertElementBefore($separateur, 'lettre') ;
418
 
419
        //$fax = & HTML_QuickForm::createElement('text', 'fax', INS_FAX) ;
420
        //$image = & HTML_QuickForm::createElement('file', 'image', INS_LOGO_OU_IMAGE) ;
421
 
422
		//$this->insertElementBefore($image, 'lettre') ;
423
		//$this->setMaxFileSize(150000); //logo de 150 ko maximum
424
 
448 ddelon 425
        $this->removeElement('est_structure', false) ;
603 florian 426
        $this->addElement('hidden', 'est_structure', 1) ;
427
        $this->addElement('hidden', 'form_structure', 1) ;
1430 alexandre_ 428
 
448 ddelon 429
    }
430
    /**
431
     *
432
     *
433
     * @return string
434
     * @access public
435
     */
436
    function toHTML( )
437
    {
438
        $res = HTML_QuickForm::toHTML() ;
439
        return $res ;
440
    } // end of member function toHTML
441
}
442
 
1298 neiluj 443
?>