Line 17... |
Line 17... |
17 |
// | |
|
17 |
// | |
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
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 |
|
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 |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
22 |
// CVS : $Id: inscription.class.php,v 1.9 2006-03-15 11:01:58 alexandre_tb Exp $
|
22 |
// CVS : $Id: inscription.class.php,v 1.10 2006-04-04 12:23:05 florian Exp $
|
23 |
/**
|
23 |
/**
|
24 |
* Inscription
|
24 |
* Inscription
|
25 |
*
|
25 |
*
|
26 |
* Un module d'inscription, en général ce code est spécifique à
|
26 |
* Un module d'inscription, en général ce code est spécifique à
|
27 |
* un site web
|
27 |
* un site web
|
Line 29... |
Line 29... |
29 |
*@package inscription
|
29 |
*@package inscription
|
30 |
//Auteur original :
|
30 |
//Auteur original :
|
31 |
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
|
31 |
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
|
32 |
//Autres auteurs :
|
32 |
//Autres auteurs :
|
33 |
*@copyright Tela-Botanica 2000-2004
|
33 |
*@copyright Tela-Botanica 2000-2004
|
34 |
*@version $Revision: 1.9 $ $Date: 2006-03-15 11:01:58 $
|
34 |
*@version $Revision: 1.10 $ $Date: 2006-04-04 12:23:05 $
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
36 |
*/
|
36 |
*/
|
Line 37... |
Line 37... |
37 |
|
37 |
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
39 |
// | ENTETE du PROGRAMME |
|
39 |
// | ENTETE du PROGRAMME |
|
Line 40... |
Line 40... |
40 |
// +------------------------------------------------------------------------------------------------------+
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
Line 41... |
Line 41... |
41 |
|
41 |
|
Line 42... |
Line 42... |
42 |
require_once PAP_CHEMIN_RACINE.'api/pear/HTML/QuickForm.php' ;
|
42 |
require_once 'HTML/QuickForm.php' ;
|
43 |
|
43 |
|
Line 102... |
Line 102... |
102 |
$i18n = strtolower($i18n)."-".strtoupper($i18n) ;
|
102 |
$i18n = strtolower($i18n)."-".strtoupper($i18n) ;
|
103 |
}
|
103 |
}
|
104 |
$requete = 'select '.INS_CHAMPS_LABEL_PAYS.' from '.INS_TABLE_PAYS.
|
104 |
$requete = 'select '.INS_CHAMPS_LABEL_PAYS.' from '.INS_TABLE_PAYS.
|
105 |
' where '.INS_CHAMPS_I18N_PAYS.'="'.$i18n.'" and '.
|
105 |
' where '.INS_CHAMPS_I18N_PAYS.'="'.$i18n.'" and '.
|
106 |
INS_CHAMPS_ID_PAYS.'="'.$codeIso.'"';
|
106 |
INS_CHAMPS_ID_PAYS.'="'.$codeIso.'"';
|
107 |
$resultat = $this->_db->query($requete) ;
|
107 |
$resultat = $this->_db->query($requete) ;
|
108 |
|
- |
|
109 |
if (DB::isError($resultat)) {
|
108 |
if (DB::isError($resultat)) {
|
110 |
die ("Echec de la requete : $requete<br />".$resultat->getMessage()) ;
|
109 |
die ("Echec de la requete : $requete<br />".$resultat->getMessage()) ;
|
111 |
}
|
110 |
}
|
112 |
if ($resultat->numRows() == 0) {
|
111 |
if ($resultat->numRows() == 0) {
|
113 |
return $this->raiseError('Le code fourni ne correspond à aucun pays ou n\'est pas dans la table!') ;
|
112 |
return $this->raiseError('Le code fourni ne correspond à aucun pays ou n\'est pas dans la table!') ;
|
Line 188... |
Line 187... |
188 |
$this->addElement('text', 'fax', INS_FAX, array('size' => '12')) ;
|
187 |
$this->addElement('text', 'fax', INS_FAX, array('size' => '12')) ;
|
189 |
$this->addElement('text', 'site', INS_SITE_INTERNET) ;
|
188 |
$this->addElement('text', 'site', INS_SITE_INTERNET) ;
|
190 |
if (INS_CHAMPS_LETTRE != '') $this->addElement('checkbox', 'lettre',INS_LETTRE, '<br />') ;
|
189 |
if (INS_CHAMPS_LETTRE != '') $this->addElement('checkbox', 'lettre',INS_LETTRE, '<br />') ;
|
191 |
$this->addElement('checkbox', 'visible',INS_VISIBLE, '<br />') ;
|
190 |
$this->addElement('checkbox', 'visible',INS_VISIBLE, '<br />') ;
|
192 |
$this->addElement('hidden', 'est_structure', 0) ;
|
191 |
$this->addElement('hidden', 'est_structure', 0) ;
|
193 |
$defauts=array ('lettre'=>1,'pays'=>'FR');
|
- |
|
194 |
$this->setDefaults($defauts);
|
- |
|
195 |
// on fait un groupe avec les boutons pour les mettres sur la même ligne
|
192 |
// on fait un groupe avec les boutons pour les mettres sur la même ligne
|
196 |
$this->addElement('button', 'annuler', INS_ANNULER, array ("onclick" => "javascript:document.location.href='".$url."'"));
|
193 |
$this->addElement('button', 'annuler', INS_ANNULER, array ("onclick" => "javascript:document.location.href='".$url."'"));
|
197 |
$this->addElement('submit', 'valider', INS_VALIDER);
|
194 |
$this->addElement('submit', 'valider', INS_VALIDER);
|
198 |
} // end of member function construitFormulaire
|
195 |
} // end of member function construitFormulaire
|
Line 199... |
Line 196... |
199 |
|
196 |
|
200 |
/** Modifie le formulaire pour l'adapter au cas des structures
|
197 |
/** Modifie le formulaire pour l'adapter au cas des structures
|
201 |
*
|
198 |
*
|