Subversion Repositories Applications.papyrus

Compare Revisions

Ignore whitespace Rev 672 → Rev 673

/trunk/client/bottin/bibliotheque/inscription.class.php
19,7 → 19,7
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: inscription.class.php,v 1.7 2005-12-02 13:47:47 florian Exp $
// CVS : $Id: inscription.class.php,v 1.8 2005-12-19 13:17:53 alexandre_tb Exp $
/**
* Inscription
*
31,7 → 31,7
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
//Autres auteurs :
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.7 $ $Date: 2005-12-02 13:47:47 $
*@version $Revision: 1.8 $ $Date: 2005-12-19 13:17:53 $
// +------------------------------------------------------------------------------------------------------+
*/
 
91,6 → 91,30
}
return $retour ;
}
/** Renvoie le nom d'un pays traduit dans la langue passé en paramètre
*
* @param string une chaine de type i18n ou une chaine code iso langue (fr_FR ou fr ou FR)
* @return un tableau contenant en clé, le code iso du pays, en majuscule et en valeur le nom du pays traduit
*/
function getNomPays($codeIso, $i18n = INS_LANGUE_DEFAUT) {
if (strlen($i18n) == 2) {
$i18n = strtolower($i18n)."-".strtoupper($i18n) ;
}
$requete = 'select '.INS_CHAMPS_LABEL_PAYS.' from '.INS_TABLE_PAYS.
' where '.INS_CHAMPS_I18N_PAYS.'="'.$i18n.'" and '.
INS_CHAMPS_ID_PAYS.'="'.$codeIso.'"';
$resultat = $this->_db->query($requete) ;
if (DB::isError($resultat)) {
die ("Echec de la requete : $requete<br />".$resultat->getMessage()) ;
}
if ($resultat->numRows() == 0) {
return $this->raiseError('Le code fourni ne correspond à aucun pays ou n\'est pas dans la table!') ;
}
$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC) ;
return $ligne[INS_CHAMPS_LABEL_PAYS] ;
}
}
 
class HTML_formulaireInscription extends HTML_Quickform {