/trunk/client/inscription/configuration/ins_config.inc.php |
---|
New file |
0,0 → 1,159 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: ins_config.inc.php,v 1.3 2005/05/13 13:49:15 alex Exp $ |
/** |
* Fichier de configuration de l'inscription |
* |
* A éditer de façon spécifique à chaque déploiement |
* |
*@package inscription |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.3 $ $Date: 2005/05/13 13:49:15 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
/** |
//=========================DEFINITION DE VARIABLES ================================= |
* Définition des variables globales |
//================================================================================== |
*/ |
$GLOBALS['AUTH'] = &$_GEN_commun['pear_auth'] ; |
/** |
//==================================== LES URLS ================================== |
* Constantes liées à l'utilisation des url |
//================================================================================== |
*/ |
$GLOBALS['ins_url'] = & $_GEN_commun['url'] ; |
$GLOBALS['ins_db'] = & $_GEN_commun['pear_db'] ; |
define ("INS_CHEMIN_FICHIER", "client/inscription/") ; |
/** |
//==================================== CONSTANTES ================================== |
* Constantes des noms de tables et de champs dans l'annuaire |
//================================================================================== |
*/ |
define ("INS_ANNUAIRE", "annuaire_tela") ; |
define ("INS_CHAMPS_ID", "U_ID") ; // Nom du champs nom |
define ("INS_CHAMPS_MAIL", "U_MAIL") ; // Nom du champs mail |
define ("INS_CHAMPS_LOGIN", "at_nom_wiki") ; |
define ("INS_CHAMPS_NOM", "U_NAME") ; |
define ("INS_CHAMPS_PRENOM", "U_SURNAME") ; |
define ("INS_CHAMPS_PASSE", "U_PASSWD") ; |
define ("INS_CHAMPS_PAYS", "U_COUNTRY") ; |
define ("PROJET_PRENOM", "U_SURNAME") ; // Nom du champs prénom |
define ("PROJET_DPT", "gen_FRENCH_DPT") ; // Nom de la table département |
define ("INS_TABLE_PAYS", "gen_COUNTRY") ; // Nom de la table pays |
define ("INS_CHAMPS_ID_PAYS", "GC_ID") ; |
define ("INS_CHAMPS_LABEL_PAYS", "GC_NAME") ; |
define ("INS_CHAMPS_CODE_POSTAL", "U_ZIP_CODE") ; |
define ("INS_CHAMPS_VILLE", "U_CITY") ; |
define ("INS_CHAMPS_ADRESSE_1", "U_ADDR1") ; |
define ("INS_CHAMPS_ADRESSE_2", "U_ADDR2") ; |
define ("INS_CHAMPS_REGION", "U_STATE") ; |
define ("INS_CHAMPS_SITE_WEB", "U_WEB") ; |
define ("INS_CHAMPS_TELEPHONE", "U_PHONE") ; |
define ("INS_CHAMPS_FAX", "U_FAX") ; |
define ("INS_CHAMPS_STRUCTURE", "U_TITLE") ; |
define ("INS_CHAMPS_DATE", "U_DATE") ; |
define ("INS_CHAMPS_LETTRE", "U_LETTRE") ; // Le champs qui indique si l'usager est inscrit à la lettre d'inscription |
/** |
//==================================== PARAMETRAGE ================================= |
* Pour régler certaines fonctionnalité de l'application |
//================================================================================== |
*/ |
define ("INS_MAIL_ADMIN_APRES_INSCRIPTION", "Reseau Tela Botanica <accueil@tela-botanica.org>") ; |
define ("INS_MAIL_ADMIN_APRES_INSCRIPTION_SUJET", "[Tela Botanica]Inscription") ; |
define ("INS_MAIL_INSCRIPTION_LISTE", 'actu-subscribe@tela-botanica.org') ; |
define ("INS_MAIL_DESINSCRIPTION_LISTE", 'actu-unsubscribe@tela-botanica.org') ; |
$GLOBALS['mail_admin'] = array ('accueil@tela-botanica.org', 'dmathieu@tela-botanica.org') ; // Liste des personne recevant le mail |
// après inscription |
define ("INS_UTILISE_SPIP", 1) ; |
define ("INS_UTILISE_WIKINI", 1) ; |
if (INS_UTILISE_WIKINI) { |
define ('INS_CHAMPS_WIKINI', 'at_nom_wiki') ; |
define ('INS_DSN_WIKINI', 'mysql://telabotap:@localhost/tela_prod_wikini') ; |
} |
if (INS_UTILISE_SPIP) { |
define ('INS_DSN_SPIP', 'mysql://telabotap:@localhost/tela_prod_spip_actu') ; |
} |
/** |
//==================================== PARAMETRAGE ================================= |
* Pour gérer la réécriture d'url de l'inscription |
* Cela nécessite une ligne dans le fichier .htaccess, par exemple |
* RewriteRule ^ins([0-9a-z]*)$ papyrus.php?menu=22&id=$1 [L] |
* Cela sert à racourcir l'URL de confirmation d'inscription |
//================================================================================== |
*/ |
define ('INS_UTILISE_REECRITURE_URL', 1) ; // mettre à 1 si on souhaite utiliser la réécriture |
if (INS_UTILISE_REECRITURE_URL) { |
define ('INS_URL_PREFIXE', '_ins_') ; // Indique le préfixe de l'url http://www.mondomaine.org/prefix____ |
} |
define ('INS_TABLE_STATISTIQUE', 'ins_STATS') ; |
define ('INS_STATS_CHAMPS_DATE', 'IS_DATE') ; |
define ('INS_STATS_CHAMPS_ACTION', 'IS_ACTION') ; |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: ins_config.inc.php,v $ |
* Revision 1.3 2005/05/13 13:49:15 alex |
* ajout de la réécriture d'url et des statistiques |
* |
* Revision 1.2 2005/03/21 16:50:31 alex |
* mille et une corrction |
* |
* Revision 1.1 2005/03/04 10:39:41 tam |
* installation |
* |
* Revision 1.1 2004/07/06 15:42:17 alex |
* en cours |
* |
* Revision 1.4 2004/07/06 15:31:33 alex |
* en cours |
* |
* Revision 1.3 2004/06/30 10:00:53 alex |
* ajout de champs pour gérer les pays |
* |
* Revision 1.2 2004/06/18 09:20:54 alex |
* version initiale |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/trunk/client/inscription/inscription.php |
---|
New file |
0,0 → 1,262 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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.php,v 1.3 2005/03/21 16:50:21 alex Exp $ |
/** |
* Inscription |
* |
* Un module d'inscription, en général ce code est spécifique à |
* un site web |
* |
*@package inscription |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.3 $ $Date: 2005/03/21 16:50:21 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
if (isset($lang)) { |
include_once "client/inscription/langues/ins_langue_$lang.inc.php" ; |
} else { |
include_once ("client/inscription/langues/ins_langue_fr.inc.php") ; |
} |
include_once ("client/inscription/configuration/ins_config.inc.php"); |
include_once ("client/inscription/bibliotheque/inscription.fonct.php") ; |
include_once INS_CHEMIN_FICHIER."bibliotheque/inscription.class.php" ; |
include_once 'Mail.php' ; |
// Ajout d'une feuille de style externe |
GEN_stockerStyleExterne ('inscription', 'client/inscription/inscription.css') ; |
// +------------------------------------------------------------------------------------------------------+ |
// | LISTE de FONCTIONS | |
// +------------------------------------------------------------------------------------------------------+ |
function afficherContenuTete() { |
$retour = '<h1 class="titre1_inscription">Inscription au Réseau Tela Botanica</h1>'; |
return ; |
} |
// ================ Note ======================= |
// La variable action sert à définir ce qui est demandé (inscription, modification d'inscription, suppression ... |
// Elle est appelé avec $_REQUEST car elle peut aussi bien venir d'un formulaire que d'un lien. |
// ============================================== |
/** |
* |
* @global AUTH Un pointeur vers un objet PEAR::Auth |
* @global ins_url Un pointeur vers un objet PEAR::Net_URL |
* @return string Le contenu de l'application inscription |
*/ |
function afficherContenuCorps() { |
$url = preg_replace ("/&/", "&", $GLOBALS['ins_url']->getURL()) ; |
if (!isset ($_REQUEST['action'])) $_REQUEST['action'] = "" ; |
$res = '' ; |
$est_loggue = true ; |
if (isset ($_GET['logout']) && $_GET['logout'] == 1) { |
$GLOBALS['AUTH']->logout() ; |
$_POST['username'] = "" ; |
$_POST['password'] = "" ; |
return AUTH_formulaire_login() ; |
} |
// L'utilisateur a-t-il cliqué sur Supprimer inscription |
if (isset ($_POST['supprimer'])) { |
$mail_utilisateur = $GLOBALS['AUTH']->getUsername() ; |
$id_utilisateur = $GLOBALS['AUTH']->getAuthData(INS_CHAMPS_ID) ; |
if (INS_UTILISE_WIKINI) { |
desinscription_interwikini_users ($GLOBALS['AUTH']->getAuthData(INS_CHAMPS_WIKINI)) ; |
} |
$resultat = $GLOBALS['AUTH']->removeUser($mail_utilisateur) ; |
if (PEAR::isError($resultat)) { |
die ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ; |
} |
// Suppression dans SPIP |
if (INS_UTILISE_SPIP) { |
desinscription_spip($id_utilisateur) ; |
} |
// désinscription de la lettre d'info |
inscription_lettre (INS_MAIL_DESINSCRIPTION_LISTE) ; |
$GLOBALS['AUTH']->logout() ; |
// Ajout d'une ligne dans les statistiques |
$requete = 'insert into '.INS_TABLE_STATISTIQUE.' set '.INS_STATS_CHAMPS_DATE.'=NOW(), '.INS_STATS_CHAMPS_ACTION.'="del"' ; |
$resultat = $GLOBALS['ins_db']->query ($requete) ; |
if (DB::isError ($resultat)) { |
die ('Echec de la requete : '.$requete.'<br />'.$resultat->getMessage()) ; |
} |
return AUTH_formulaire_login() ; |
} |
if ($_REQUEST['action'] == 'sendpasswd') { |
return AUTH_formulaire_login(envoie_passe()) ; |
} |
// L'utilisateur a cliqué sur Inscription ou Inscription structure ou |
if ($_REQUEST['action'] != '' || isset($_POST['modifier'])) { |
$res .= '<h1 class="titre1_inscription">'.INS_ACCUEIL_INSCRIPTION.'</h1>' ; |
$action = preg_replace ("/&/", "&", $GLOBALS['ins_url']->getURL()) ; |
$formulaire = new HTML_formulaireInscription('formulaire_inscription', 'post', $action) ; |
// Construction de la liste des pays |
$liste_pays = new ListeDePays($GLOBALS['ins_db']) ; |
$formulaire->construitFormulaire($action, $liste_pays->getListePays('fr')) ; |
if (isset($_POST['structure'])) { |
$formulaire->formulaireStructure() ; |
} |
if (isset($_POST['modifier'])) { |
$formulaire->addElement ('hidden', 'action', 'modifier_v') ; |
$formulaire->setDefaults(formulaire_defaults()) ; |
if ($GLOBALS['AUTH']->getAuthData(INS_CHAMPS_LETTRE) == 1) { |
$lettre = & $formulaire->getElement('lettre') ; |
$lettre->setChecked(true) ; |
} |
} |
if ($_REQUEST['action'] == 'inscription') { |
$formulaire->addElement ('hidden', 'action', 'inscription_v') ; |
$formulaire->setDefaults (array ('pays' => 'fr', 'asso' => 3, 'activite' => 3, 'niveau' => 4, 'lettre' => 1)) ; |
$lettre = & $formulaire->getElement('lettre') ; |
$lettre->setChecked(true) ; |
} |
if ($_REQUEST['action'] == 'inscription_v') { |
if ($formulaire->validate()) { |
$formulaire->process('demande_inscription', false) ; |
return message_inscription() ; |
} |
} |
if ($_REQUEST['action'] == 'modifier_v') { |
if ($formulaire->validate()) { |
$valeur_lettre = $GLOBALS['AUTH']->getAuthData(INS_CHAMPS_LETTRE) ; |
$formulaire->process('mise_a_jour', false) ; |
} |
if (isset($_POST['lettre'])) { |
if ($valeur_lettre == '') { |
inscription_lettre (INS_MAIL_INSCRIPTION_LISTE) ; |
} |
} else { |
if ($valeur_lettre == 1) { |
inscription_lettre (INS_MAIL_DESINSCRIPTION_LISTE) ; |
} |
} |
return info ($GLOBALS['AUTH']->getAuthData (INS_CHAMPS_ID)).bouton ($url) ; |
} |
return $res.$formulaire->toHTML() ; |
} |
// L'inscription dans la base si l'utilisateur clique sur le lien du mail |
if (isset($_GET['id'])) { |
$requete = 'select id_donnees from inscription_demande where id_identifiant_session="'.$_GET['id'].'"' ; |
$resultat = $GLOBALS['ins_db']->query ($requete) ; |
if (DB::isError ($resultat)) { |
die ("Echec de la requete : $requete<br />".$resultat->getMessage()) ; |
} |
if ($resultat->numRows() == 0) { |
return INS_MESSAGE_EXPIRATION; |
} |
$ligne = $resultat->fetchRow (DB_FETCHMODE_OBJECT) ; |
$donnees = unserialize (stripslashes($ligne->id_donnees)) ; |
insertion ($donnees) ; |
$GLOBALS['AUTH']->username = $donnees['email'] ; |
$GLOBALS['AUTH']->password = $donnees['mot_de_passe'] ; |
// On loggue l'utilisateur |
$GLOBALS['AUTH']->login() ; |
// inscription à la lettre d'information |
if (isset ($donnees['lettre'])) { |
inscription_lettre (INS_MAIL_INSCRIPTION_LISTE) ; |
} |
// On supprime la demande d'inscription |
$requete = 'delete from inscription_demande where id_identifiant_session="'.$_GET['id'].'"' ; |
$resultat = $GLOBALS['ins_db']->query ($requete) ; |
if (DB::isError ($resultat)) { |
die ("Echec de la requete : $requete<br />".$resultat->getMessage()) ; |
} |
envoie_mail() ; |
} |
if (!$GLOBALS['AUTH']->getAuth() && $_REQUEST['action'] != "inscription" && $_REQUEST['action'] != 'inscription_v') { |
if (isset($_POST['username']) && $_POST['username'] != '') { |
$res .= message_erreur() ; |
} else { |
$res .= AUTH_formulaire_login() ; |
} |
} |
if ($GLOBALS['AUTH']->getAuth () && !isset($_POST['modifier'])) { |
return info () |
.bouton ($url); |
} |
return $res ; |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: inscription.php,v $ |
* Revision 1.3 2005/03/21 16:50:21 alex |
* mille et une corrction |
* |
* Revision 1.2 2005/03/11 16:55:01 alex |
* modification html |
* |
* Revision 1.3 2004/09/14 12:20:28 alex |
* déplacement de la fonction suppression vers inscription.fonct.php |
* et nettoyage du code. |
* |
* Revision 1.2 2004/09/01 16:36:37 alex |
* changement du chemin pour les include |
* |
* Revision 1.1 2004/07/06 15:42:28 alex |
* en cours |
* |
* Revision 1.5 2004/07/06 15:28:56 alex |
* en cours |
* |
* Revision 1.4 2004/06/25 14:26:03 alex |
* modification de la suppression |
* |
* Revision 1.3 2004/06/23 12:41:44 alex |
* amélioration de la gestion de la perte de mot de passe |
* |
* Revision 1.2 2004/06/18 09:18:23 alex |
* version initiale |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/trunk/client/inscription/inscription.css |
---|
New file |
0,0 → 1,54 |
/* Feuille de style inscription*/ |
/************************************ |
Presentation de la fiche des inscrits |
************************************/ |
dt { |
float:left; |
width:10em; |
text-align:right; |
font-weight:bold; |
padding-right : 10px;} |
.inscription_titre2 { |
clear:both; |
color:#996F18;;} |
/*************************************** |
Presentation du formulaire d'inscription |
***************************************/ |
#formulaire_inscription fieldset { |
border: 0; |
margin: 0; |
margin-top:10px; |
padding: 0;} |
#formulaire_inscription legend { |
line-height:1.3em; |
margin:8px 0 4px 0; |
font-size:15px; |
color: #996F18; |
font-weight:bold;} |
#formulaire_inscription ul { |
list-style:none; |
margin:0; |
padding:0;} |
#formulaire_inscription li { |
font-weight:bold; |
margin:5px 0px; |
clear:both;} |
.symbole_obligatoire { |
color:#F00; |
font-size:14pt;} |
.liste_inscription .inscription_label { |
float:left; |
width:10em; |
text-align:right; |
padding-right:10px;} |
.liste_inscription select { |
margin-top:5px;} |
.groupe_formulaire .inscription_label1 { |
float:left; |
width:10em; |
text-align:right; |
padding-right:10px;} |
.inscription_label2 { |
margin-left:10px;} |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/trunk/client/inscription/wikini_cookie.php |
---|
New file |
0,0 → 1,69 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: wikini_cookie.php,v 1.1 2004/07/06 15:42:28 alex Exp $ |
/** |
* Envoie de cookie pour wikini à partir d'une inscription |
* |
* Envoie de cookie pour wikini à partir d'une inscription |
* |
*@package inscription |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.1 $ $Date: 2004/07/06 15:42:28 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// Wikini envoie 3 cookies |
// name avec pour valeur le nom wiki de l'utilisateur |
// password avec pour valeur le mot de passe crypté de l'utilisateur |
// remember la durée du cookie |
// On fait la même chose |
if ($userid != "") { |
// 1. name |
// On recherche le nom |
$nomwikini = $AUTH->getAuthData('ga_login') ; |
setcookie ("name", $nomwikini, time () + 3600 * 24 * 30, "/" ) ; // 1 mois |
//2. password |
// on recherche le mot de passe crypté |
$requete = "select ga_mot_de_passe from gen_annuaire where ga_id_administrateur=$userid" ; |
$resultat = $db->query ($requete) ; |
if (DB::isError($resultat)) { |
die ("Erreur") ; |
} |
$ligne = $resultat->fetchRow (DB_FETCHMODE_OBJECT) ; |
$mot_de_passe = $ligne->ga_mot_de_passe ; |
setcookie ("password", $mot_de_passe, time () + 3600 * 24 * 30, "/") ; |
// 3. remember |
setcookie ("remember", 1, time () + 3600 * 24 * 30, "/") ; |
} |
?> |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/trunk/client/inscription/spip_cookie.php |
---|
New file |
0,0 → 1,86 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: spip_cookie.php,v 1.1 2004/07/06 15:42:28 alex Exp $ |
/** |
* Envoie de cookie pour SPIP à partir d'une inscription |
* |
* Envoie de cookie pour SPIP à partir d'une inscription |
* |
*@package inscription |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.1 $ $Date: 2004/07/06 15:42:28 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// Ce fichier doit être placé à la racine de SPIP |
// Il doit être appellé dans chaque squelette |
// après l'ouverture d'une session, si on ouvre une session |
// Il faut récupérer une valeur userid, c'est à dire |
// loggué l'utilisateur par exemple avec PEAR |
if ($userid != 0) { |
setcookie("spip_admin", "@$login", time()+3600*24*30, "/vecam/") ; |
include ("ecrire/inc_version.php3"); |
include_ecrire ("inc_meta.php3"); |
include_ecrire ("inc_session.php3"); |
$query = "SELECT * FROM spip_auteurs WHERE id_auteur=$userid"; |
$result = mysql_query($query); |
$GLOBALS['auteur_session'] = mysql_fetch_array($result) ; |
$GLOBALS['auteur_session']['statut'] = "1comite" ; |
$GLOBALS['auteur_session']['lang'] = "en" ; |
if (!$HTTP_COOKIE_VARS["spip_session"]) { |
$id_session = $userid."_".(md5 (uniqid (rand ()))); |
setcookie("spip_session", $id_session, time()+3600*24*30, "/vecam/") ; |
} else { |
$id_session = preg_replace("/[0-9]+_/", $userid."_", $HTTP_COOKIE_VARS["spip_session"]) ; |
setcookie("spip_session", $id_session, time()+3600*24*30, "/vecam/") ; |
} |
ajouter_session($GLOBALS['auteur_session'], $id_session) ; |
} |
?> |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/trunk/client/inscription/bibliotheque/ins_wiki.fonct.php |
---|
New file |
0,0 → 1,105 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: ins_wiki.fonct.php,v 1.1 2004/07/06 15:42:17 alex Exp $ |
/** |
* Fonctions wikini |
* |
* Ce fichier propose 3 fonctions pour intervenir sur la table interwikini_users. |
* |
*@package inscription |
*@subpackage fonctions_wikini |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.1 $ $Date: 2004/07/06 15:42:17 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// +------------------------------------------------------------------------------------------------------+ |
// | LISTE de FONCTIONS | |
// +------------------------------------------------------------------------------------------------------+ |
function inscription_interwikini_users($nom, $valeur) { |
$db = &DB::connect(INS_DSN_WIKINI) ; |
$requete = "insert into interwikini_users set name=\"".$nom. |
"\", password=\"".md5($valeur['mot_de_passe'])."\", email=\"".$valeur['email']."\"" ; |
$resultat = $db->query ($requete) ; |
if (DB::isError($resultat)) { |
echo ("Echec de la requete dans interwikini_users<br />".$resultat->getMessage()) ; |
} |
} |
function mod_inscription_interwikini_users($nomwiki, $valeur) { |
$db = &DB::connect(INS_DSN_WIKINI) ; |
$requete = "update interwikini_users set password=\"".md5($valeur['mot_de_passe'])."\", email=\"".$valeur['email']."\"". |
" where name=\"$nomwiki\"" ; |
$resultat = $db->query ($requete) ; |
if (DB::isError($resultat)) { |
echo ("Echec de la requete dans interwikini_users<br />".$resultat->getMessage()) ; |
} |
} |
function desinscription_interwikini_users($nomwiki) { |
$db = &DB::connect(INS_DSN_WIKINI) ; |
$requete = "delete from interwikini_users where name=\"$nomwiki\"" ; |
$resultat = $db->query ($requete) ; |
if (DB::isError($resultat)) { |
echo ("Echec de la requete dans interwikini_users<br />".$resultat->getMessage()) ; |
} |
} |
function verif_doublonNomWiki($nom_wiki) { |
$db = &DB::connect(INS_DSN_WIKINI) ; |
$requete = "select name from interwikini_users where name = \"$nom_wiki\"" ; |
$resultat = $db->query ($requete) ; |
if (DB::isError ($resultat)) { |
echo ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ; |
} |
if ($resultat->numRows() == 0) return true ; |
return false ; |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: ins_wiki.fonct.php,v $ |
* Revision 1.1 2004/07/06 15:42:17 alex |
* en cours |
* |
* Revision 1.1 2004/06/18 09:20:48 alex |
* version initiale |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/trunk/client/inscription/bibliotheque/inscription.class.php |
---|
New file |
0,0 → 1,356 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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.3 2005/05/13 13:48:38 alex Exp $ |
// CVS : $Id: inscription.class.php,v 1.3 2005/05/13 13:48:38 alex Exp $ |
/** |
* Fonctions du module inscription |
* |
* Fonctions du module inscription |
* |
*@package inscription |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.3 $ $Date: 2005/05/13 13:48:38 $ |
*@version $Revision: 1.3 $ $Date: 2005/05/13 13:48:38 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
require_once 'HTML/QuickForm.php' ; |
require_once 'HTML/QuickForm/checkbox.php' ; |
require_once 'HTML/QuickForm/password.php' ; |
// +------------------------------------------------------------------------------------------------------+ |
// | LISTE de FONCTIONS | |
// +------------------------------------------------------------------------------------------------------+ |
class HTML_formulaireInscription extends HTML_Quickform { |
/** |
* Constructeur |
* |
* @param string formName Le nom du formulaire |
* @param string method Méthode post ou get |
* @param string action L'action du formulaire. |
* @param int target La cible. |
* @param Array attributes Les attributs HTML en plus. |
* @param bool trackSubmit ?? |
* @return void |
* @access public |
*/ |
function HTML_forumlaireInscription ( $formName, $method = "post", $action, $target = "_self", $attributes, $trackSubmit = false ) { |
HTML_Quickform::HTML_Quickform($formName, $method, $action, $target, $attributes, $trackSubmit) ; |
} |
/** |
* |
* |
* @return void |
* @access public |
*/ |
function construitFormulaire($url, $liste_pays) |
{ |
$squelette =& $this->defaultRenderer(); |
$squelette->setFormTemplate("\n".'<form{attributes}>'."\n".'{content}'."\n".'</form>'."\n"); |
$modele_element_debut = '<li class="groupe_formulaire">'."\n".'<span class="inscription_label1">{label}<!-- BEGIN required --><span class="symbole_obligatoire">*</span><!-- END required --></span>'. |
"\n".'{element}'."\n".''."\n". |
'<!-- BEGIN error --><span class="erreur">{error}</span><!-- END error -->'."\n". |
''."\n" ; |
$modele_element_fin = "\n".'<span class="inscription_label2">{label}<!-- BEGIN required --><span class="symbole_obligatoire">*</span><!-- END required --></span>'. |
"\n".'{element}'."\n".''."\n". |
'<!-- BEGIN error --><span class="erreur">{error}</span><!-- END error -->'."\n". |
'</li>'."\n" ; |
$squelette->setElementTemplate( '<li class="liste_inscription">'."\n".'<span class="inscription_label">{label}<!-- BEGIN required --><span class="symbole_obligatoire">*</span><!-- END required --></span>'. |
"\n".'{element}'."\n".''."\n". |
'<!-- BEGIN error --><span class="erreur">{error}</span><!-- END error -->'."\n". |
'</li>'."\n"); |
//$squelette->setElementTemplate(, ) ; |
// Les modèles pour les champs qui se tienne 2 par ligne |
foreach (array('mot_de_passe', 'nom', 'cp') as $valeur) $squelette->setElementTemplate( $modele_element_debut, $valeur); |
foreach (array('password_repete', 'prenom', 'ville') as $valeur) $squelette->setElementTemplate( $modele_element_fin, $valeur); |
$squelette->setElementTemplate( '<ul><li class="groupe_bouton">{element}', 'annuler'); |
$squelette->setElementTemplate( '{element}</li></ul>', 'valider'); |
$squelette->setRequiredNoteTemplate("\n".'<p>'."\n".'<span class="symbole_obligatoire">*</span> {requiredNote}'."\n".'</p>'."\n"); |
$fieldset_debut = '<fieldset>'."\n". |
'<legend>'.INS_AJOUT_MEMBRE.'</legend>'."\n". |
'<ul>'."\n"; |
$this->addElement('html', $fieldset_debut); |
$this->addElement ('text', 'email', INS_EMAIL) ; |
$this->addRule ('email', INS_EMAIL_REQUIS, 'required','', 'client') ; |
$this->addRule ('email', INS_MAIL_INCORRECT, 'email', '', 'client') ; |
$this->registerRule('doublon', 'callback', 'verif_doublonMail') ; |
$this->addRule ('email', INS_MAIL_DOUBLE, 'doublon', true) ; |
$this->addElement('password', 'mot_de_passe', INS_MOT_DE_PASSE); |
$this->addElement('password', 'password_repete', INS_REPETE_MOT_DE_PASSE); |
$this->addRule ('mot_de_passe', INS_MOT_DE_PASSE_REQUIS, 'required', '', 'client') ; |
$this->addRule ('password_repete', INS_MOT_DE_PASSE_REQUIS, 'required', '', 'client') ; |
$this->addElement('text', 'nom', INS_NOM); |
$this->addElement('text', 'prenom', INS_PRENOM); |
$this->addRule ('nom', INS_NOM_REQUIS, 'required', '', 'client') ; |
$this->addRule ('prenom', INS_PRENOM_REQUIS, 'required', '', 'client') ; |
/* On enlève le champs non wiki, on va le générer |
$this->addElement ('text', 'nomwiki', INS_NOM_WIKI) ; |
$this->addRule ('nomwiki', INS_MAUVAIS_NOM_WIKI, 'regex', '/^[A-Z][a-z]+[A-Z,0-9][A-Z,a-z,0-9]*$/', 'client') ; |
*/ |
$this->addElement ('text', 'adresse_1', INS_ADRESSE_1) ; |
$this->addElement ('text', 'adresse_2', INS_ADRESSE_2) ; |
$this->addElement ('text', 'region', INS_REGION) ; |
$this->addElement('text', 'cp', INS_CODE_POSTAL) ; |
$this->addElement('text', 'ville', INS_VILLE) ; |
$this->addRule ('cp', INS_CODE_POSTAL_REQUIS, 'required', '', 'client') ; |
$this->addRule ('ville', INS_VILLE_REQUIS, 'required', '', 'client') ; |
// L'élément pays est construit à partir de la table gen_COUNTRY |
// $this->addElement ('select', 'pays', INS_PAYS, $liste_pays) ; |
$s =& $this->createElement('select','pays',INS_PAYS); |
$s->loadArray($liste_pays,'fr'); |
$this->addElement($s); |
$element_lettre = &new HTML_QuickForm_checkbox ('lettre', '', INS_LETTRE) ; |
$this->addElement($element_lettre) ; |
$this->addElement ('text', 'site', INS_SITE_INTERNET) ; |
$fieldset_fin = '</ul>'."\n". |
'</fieldset>'."\n"; |
$this->addElement('html', $fieldset_fin); |
$fieldset_debut = '<fieldset>'."\n". |
'<legend>'.INS_ADHERENT.'</legend>'."\n". |
'<ul>'."\n"; |
$this->addElement('html', $fieldset_debut); |
$this->addElement ('text', 'organisme', INS_ORGANISME) ; |
$this->addElement ('text', 'fonction', INS_FONCTION) ; |
$fieldset_fin = '</ul>'."\n". |
'</fieldset>'."\n"; |
$this->addElement('html', $fieldset_fin); |
$fieldset_debut = '<fieldset>'."\n". |
'<legend>'.INS_ETES_BOTANISTE.'</legend>'."\n". |
'<ul>'."\n"; |
$this->addElement('html', $fieldset_debut); |
// requete pour trouver les niveaux en botanique |
$requete = "select * from annuaire_LABEL_NIV" ; |
$resultat = $GLOBALS['ins_db']->query ($requete) ; |
if (DB::isError($resultat)) { |
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
} |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) { |
$this->addElement ('radio', 'niveau', '', $ligne->LABEL_NIV, $ligne->ID_LABEL_NIV) ; |
} |
$fieldset_fin = '</ul>'."\n". |
'</fieldset>'."\n"; |
$this->addElement('html', $fieldset_fin); |
// L'activité professionnelle |
$fieldset_debut = '<fieldset>'."\n". |
'<legend>'.INS_ACTIVITE_PROFESSIONNELLE.'</legend>'."\n". |
'<ul>'."\n"; |
$this->addElement('html', $fieldset_debut); |
// requete pour trouver les niveaux en botanique |
$requete = "select * from annuaire_LABEL_ACT" ; |
$resultat = $GLOBALS['ins_db']->query ($requete) ; |
if (DB::isError($resultat)) { |
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
} |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) { |
$this->addElement ('radio', 'activite', '', $ligne->LABEL_ACT, $ligne->ID_LABEL_ACT) ; |
} |
$fieldset_fin = '</ul>'."\n". |
'</fieldset>'."\n"; |
$this->addElement('html', $fieldset_fin); |
// L'activité professionnelle |
$fieldset_debut = '<fieldset>'."\n". |
'<legend>'.INS_MEMBRE_ASSO.'</legend>'."\n". |
'<ul>'."\n"; |
$this->addElement('html', $fieldset_debut); |
// requete pour trouver les niveaux en botanique |
$requete = "select * from annuaire_LABEL_ASS" ; |
$resultat = $GLOBALS['ins_db']->query ($requete) ; |
if (DB::isError($resultat)) { |
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
} |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) { |
$this->addElement ('radio', 'asso', '', $ligne->LABEL_ASS, $ligne->ID_LABEL_ASS) ; |
} |
$fieldset_fin = '</ul>'."\n". |
'</fieldset>'."\n"; |
$this->addElement('html', $fieldset_fin); |
// Les spécialité |
$fieldset_debut = '<fieldset>'."\n". |
'<legend>'.INS_SPECIALISTE.'</legend>'."\n". |
'<ul>'."\n"; |
$this->addElement('html', $fieldset_debut); |
$this->addElement ('textarea', 'specialite', '', array ('cols' => 50, 'rows' => 4)) ; |
$fieldset_fin = '</ul>'."\n". |
'</fieldset>'."\n"; |
$this->addElement('html', $fieldset_fin); |
// Les spécialité géographiques |
$fieldset_debut = '<fieldset>'."\n". |
'<legend>'.INS_SPE_ZONE.'</legend>'."\n". |
'<ul>'."\n"; |
$this->addElement('html', $fieldset_debut); |
$this->addElement ('textarea', 'specialite_geo', '', array ('cols' => 50, 'rows' => 4)) ; |
$fieldset_fin = '</ul>'."\n". |
'</fieldset>'."\n"; |
$this->addElement('html', $fieldset_fin); |
$this->addElement ('link', 'annuler', '', preg_replace ('/&/', '&', $GLOBALS['ins_url']->getURL()), INS_ANNULER) ; |
$this->addElement ('submit', 'valider', INS_VALIDER) ; |
$this->setRequiredNote(INS_NOTE_REQUIS) ; |
} // end of member function construitFormulaire |
/** Modifie le formulaire pour l'adapter au cas des structures |
* |
* |
* @return void |
* @access public |
*/ |
function formulaireStructure() |
{ |
$this->removeElement('email', false) ; |
$mail = & HTML_QuickForm::createElement ('text', 'email', INS_MAIL_STRUCTURE) ; |
$this->insertElementBefore ($mail, 'mot_de_passe') ; |
$nom_structure = & HTML_QuickForm::createElement ('text', 'nom', INS_NOM_STRUCTURE) ; |
$this->insertElementBefore ($nom_structure, 'email') ; |
$this->removeElement ('site', false) ; |
$site_structure = & HTML_QuickForm::createElement ('text', 'site', INS_SITE_STRUCTURE) ; |
$this->insertElementBefore ($site_structure, 'pays') ; |
$this->addElement ('hidden', 'est_structure', 1) ; |
$sigle_structure = & HTML_QuickForm::createElement ('text', 'sigle_structure', INS_SIGLE_STRUCTURE) ; |
$this->insertElementBefore ($sigle_structure, 'nom') ; |
$this->addRule ('sigle_structure', INS_SIGLE_REQUIS, 'required', '', 'client') ; |
} |
/** |
* |
* |
* @return string |
* @access public |
*/ |
function toHTML( ) |
{ |
$res = HTML_QuickForm::toHTML() ; |
return $res ; |
} // end of member function toHTML |
} |
class ListeDePays extends PEAR{ |
var $_db ; |
/** Constructeur |
* Vérifie l'existance de la table gen_pays_traduction |
* |
* @param DB Un objet PEAR::DB |
* @return |
*/ |
function ListeDePays (&$objetDB) { |
$this->_db = $objetDB ; |
$requete = "show tables" ; |
$resultat = $objetDB->query ($requete) ; |
if (DB::isError ($resultat)) { |
die ("Echec de la requete : $requete<br />".$resultat->getMessage()) ; |
} |
while ($ligne = $resultat->fetchRow()) { |
if ($ligne[0] == 'gen_COUNTRY') { |
return ; |
} |
} |
return $this->raiseError ('La table gen_COUNTRY n\'est pas présente dans la base de donnée !') ; |
} |
/** Renvoie la liste des pays traduite |
* |
* @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 getListePays ($i18n) { |
if (strlen($i18n) == 2) { |
$i18n = strtolower($i18n)."-".strtoupper($i18n) ; |
} |
$requete = "select GC_ID, GC_NAME from gen_COUNTRY where GC_LOCALE='fr'" ; |
$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!') ; |
} |
$retour = array() ; |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) { |
$retour[$ligne->GC_ID] = $ligne->GC_NAME; |
} |
return $retour ; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* Revision 1.1 2004/06/18 09:20:47 alex |
* version initiale |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/client/inscription/bibliotheque/inscription.fonct.php |
---|
New file |
0,0 → 1,711 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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.fonct.php,v 1.2 2005/03/21 16:50:27 alex Exp $ |
// CVS : $Id: inscription.fonct.php,v 1.2 2005/03/21 16:50:27 alex Exp $ |
/** |
* Fonctions du module inscription |
* |
* Fonctions du module inscription |
* |
*@package inscription |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.2 $ $Date: 2005/03/21 16:50:27 $ |
*@version $Revision: 1.2 $ $Date: 2005/03/21 16:50:27 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
include_once INS_CHEMIN_FICHIER.'bibliotheque/ins_wiki.fonct.php' ; |
include_once INS_CHEMIN_FICHIER.'bibliotheque/ins_spip.fonct.php' ; |
require_once 'HTML/QuickForm.php' ; |
require_once 'HTML/QuickForm/checkbox.php' ; |
require_once 'HTML/QuickForm/password.php' ; |
// +------------------------------------------------------------------------------------------------------+ |
// | LISTE de FONCTIONS | |
// +------------------------------------------------------------------------------------------------------+ |
/** |
* |
* @param array les valeurs renvoyés par le formulaire |
* @return |
*/ |
function demande_inscription ($valeurs) { |
// On stocke les informations dans un variable de session |
// On coupe l'identifiant de session pour ne prendre que les 8 premiers caractères |
// afin d'éviter d'obtenir une url trop longue |
$chaine = substr (session_id(), 0, 8) ; |
$requete_verif = 'select * from inscription_demande where id_identifiant_session="'.$chaine.'"' ; |
$resultat_verif = $GLOBALS['ins_db']->query ($requete_verif) ; |
if ($resultat_verif->numRows() != 0) { |
$requete_suppression = 'delete from inscription_demande where id_identifiant_session="'.$chaine.'"' ; |
$GLOBALS['ins_db']->query ($requete_suppression) ; |
} |
$requete = 'insert into inscription_demande set id_identifiant_session="'.$chaine.'", id_donnees="'. |
addslashes(serialize($valeurs)).'", id_date=NOW()' ; |
$resultat = $GLOBALS['ins_db']->query ($requete) ; |
if (DB::isError ($resultat)) { |
echo ("Echec de la requete : $requete<br />".$resultat->getMessage()) ; |
} |
// On envoie un email de confirmation pour l'utilisateur |
$GLOBALS['ins_url']->addQueryString ('id', $chaine) ; |
$corps = INS_MESSAGE_DEBUT_MAIL_INSCRIPTION ; |
if (INS_UTILISE_REECRITURE_URL) { |
$corps .= 'http://'.$GLOBALS['ins_url']->host.'/'.INS_URL_PREFIXE.$chaine ; |
} else { |
$corps .= str_replace ('&', '&', $GLOBALS['ins_url']->getURL()) ; |
} |
$corps .= INS_MESSAGE_FIN_MAIL_INSCRIPTION ; |
mail ($GLOBALS['email'], 'Inscription', $corps, 'From: '.INS_MAIL_ADMIN_APRES_INSCRIPTION) ; |
} |
function AUTH_formulaire_login ($msg = '') { |
//-------------------------------------------------------------------------- |
// Le formulaire |
//-------------------------------------------------------------------------- |
$url = preg_replace ('/&/', '&', $GLOBALS['ins_url']->getURL()) ; |
$form = new HTML_QuickForm ('inscription', 'post', $url."&action=inscription") ; |
$form->addElement ('submit', 'Inscription', INS_INSCRIPTION) ; |
$res = '<h1 class="titre1_inscription">'.INS_ACCUEIL_INSCRIPTION.'</h1>'; |
$res .= $msg ; |
$res .= "<h2 class=\"titre2_inscription\">".INS_LAIUS_INSCRIPTION."</h2>\n" ; |
$res .= "<div>".INS_LAIUS_INSCRIPTION_2."</div>\n" ; |
$res .= $form->toHTML() ; |
$res .= '<h2 class="titre2_inscription">'.INS_DEJA_INSCRIT.'</h2>' ; |
$form = new HTML_QuickForm ('inscription', 'post', $url) ; |
$form->addElement ('text', 'username', INS_EMAIL) ; |
$form->addElement ('password', 'password', INS_MOT_DE_PASSE) ; |
$form->addElement('submit', 'valider', INS_VALIDER); |
$res .= $form->toHTML() ; |
$res .= "<div>".INS_TEXTE_PERDU."</div>\n" ; |
return $res; |
} |
/** message_erreur () - Renvoie le code HTML d'un message d'erreur |
* |
* @return string HTML |
*/ |
function message_erreur () { |
$res = ''; |
$url = preg_replace ('/&/', '&', $GLOBALS['ins_url']->getURL()) ; |
$res .= '<h1 class="titre1_inscription">'.INS_ACCUEIL_INSCRIPTION.'</h1>' ; |
$res .= "<div class=\"inscription_erreur\">".INS_ERREUR_LOGIN."</div>\n" ; |
$res .= "<div>".INS_SI_PASSE_PERDU."</div>\n" ; |
$res .= '<div>' ; |
$res .= '<form action="'.$url.'&action=sendpasswd" method="post">'."\n" ; |
$res .= INS_EMAIL.' ' ; |
$res .= '<input type="text" value="'.$_POST['username'].'" name="nom_d_utilisateur" size="32" /></li></ul>'."\n" ; |
$res .= '<div>'.INS_INDIQUE_ADRESSE.'</div>'."\n" ; |
$res .= "<input type=\"submit\" value=\"".INS_ENVOIE_PASSE."\" />" ; |
$res .= "</form></div>\n" ; |
// On remet le formulaire d'inscription mais un peu réduit |
$res .= '<h2 class="titre2_inscription">'.INS_DEJA_INSCRIT.'</h2>' ; |
$form = new HTML_QuickForm ('inscription', 'post', $url) ; |
$form->addElement ('text', 'username', INS_EMAIL) ; |
$form->addElement ('password', 'password', INS_MOT_DE_PASSE) ; |
$form->addElement('submit', 'valider', INS_VALIDER); |
$res .= $form->toHTML() ; |
return $res; |
} |
function insertion($valeur) { |
// =========== Insertion dans l'annuaire gen_annuaire =================== |
// Génération du nom wikini à partir du nom et du prénom |
if (INS_UTILISE_WIKINI) { |
$valeur['nom_wiki'] = genere_nom_wiki ($valeur['nom'], $valeur['prenom']) ; |
$autres_valeurs[INS_CHAMPS_WIKINI] = $valeur['nom_wiki'] ; |
$autres_valeurs['email'] = $valeur['email'] ; |
} |
$autres_valeurs = info_annuaire($valeur) ; |
$autres_valeurs['U_DATE'] = date('Y-m-d'); |
$resultat = $GLOBALS['AUTH']->addUser($valeur['email'], $valeur['mot_de_passe'], $autres_valeurs) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
// récupération de l'identifiant de l'inscription |
$requete = 'select '.INS_CHAMPS_ID.' from '.INS_ANNUAIRE.' where '.INS_CHAMPS_MAIL.'="'.$valeur['email'].'"' ; |
$resultat = $GLOBALS['ins_db']->query ($requete) ; |
if (DB::isError ($resultat)) { |
die ('Echec de la requete : '.$requete.'<br />'.$resultat->getMessage()) ; |
} |
$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC) ; |
$id = $ligne[INS_CHAMPS_ID] ; |
// ================ Insertion dans SPIP ========================================= |
if (INS_UTILISE_SPIP) inscription_spip($id, $valeur) ; |
if (INS_UTILISE_WIKINI) inscription_interwikini_users($valeur['nom_wiki'], $valeur) ; |
// Insertion dans les statistiques |
$requete = 'insert into '.INS_TABLE_STATISTIQUE.' set '.INS_STATS_CHAMPS_DATE.'=NOW(), '.INS_STATS_CHAMPS_ACTION.'="add"' ; |
$resultat = $GLOBALS['ins_db']->query ($requete) ; |
if (DB::isError ($resultat)) { |
die ('Echec de la requete : '.$requete.'<br />'.$resultat->getMessage()) ; |
} |
} |
/** |
* Effectue une mise à jour dans la base de donnée |
* |
* @global AUTH un objet PEAR:Auth |
* @global ins_db un objet PEAR::DB |
* @return |
*/ |
function mise_a_jour($valeur) { |
// ====================Mise à jour dans l'annuaire ==================== |
$requete = 'update '.INS_ANNUAIRE.' set '. |
requete_annuaire ($valeur). |
'where '.INS_CHAMPS_ID.'="'.$GLOBALS['AUTH']->getAuthData(INS_CHAMPS_ID).'"'; |
$resultat = $GLOBALS['ins_db']->query ($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
if (isset($valeur['lettre'])) $GLOBALS['AUTH']->setAuthData (INS_CHAMPS_LETTRE, $valeur['lettre'], true) ; // On appelle cette fonction pour mettre à jour |
// la valeur de session (récupéré par getAuthData() |
unset ($resultat) ; |
// ========================= Mise à jour dans SPIP ================================ |
if (INS_UTILISE_SPIP) mod_inscription_spip($GLOBALS['AUTH']->getAuthData(INS_CHAMPS_ID)) ; |
if (INS_UTILISE_WIKINI) mod_inscription_interwikini_users($GLOBALS['AUTH']->getAuthData(INS_CHAMPS_WIKINI), $valeur) ; |
} |
/** requete_annuaire () - Renvoie une chaine contenant les champs de l'annuaire avec leur valeur suite à le fonction process de QuickForm |
* |
* @return string une requete du type champs="valeur",... |
*/ |
function requete_annuaire (&$valeur) { |
if (!isset($valeur['lettre'])) $valeur['lettre'] = 0 ; |
if (preg_match ('/([0-9][0-9])[0-9][0-9][0-9]/', $valeur['cp'], $match)) { |
$valeur['dpt'] = $match[1] ; |
if (preg_match ('/(97[0-9])[0-9][0-9]/', $valeur['cp'], $match2)) { |
$valeur['dpt'] = $match2[1] ; |
} |
} |
$req = INS_CHAMPS_NOM.'="'.$valeur['nom'].'",'. |
INS_CHAMPS_PRENOM.'="'.$valeur['prenom'].'",'. |
INS_CHAMPS_MAIL.'="'.$valeur['email'].'",'. |
INS_CHAMPS_PASSE.'="'.md5 ($valeur['mot_de_passe']).'",'. |
INS_CHAMPS_PAYS.'="'.$valeur['pays'].'", '. |
INS_CHAMPS_CODE_POSTAL.'="'.$valeur['cp'].'", '. |
INS_CHAMPS_VILLE.'="'.$valeur['ville'].'", '. |
INS_CHAMPS_ADRESSE_1.'="'.$valeur['adresse_1'].'", '. |
INS_CHAMPS_ADRESSE_2.'="'.$valeur['adresse_2'].'", '. |
INS_CHAMPS_REGION.'="'.$valeur['region'].'", '. |
INS_CHAMPS_STRUCTURE.'="'.$valeur['organisme'].'", '. |
INS_CHAMPS_SITE_WEB.'="'.$valeur['site'].'", '. |
INS_CHAMPS_LETTRE.'="'.$valeur['lettre'].'", '. |
'U_FONCTION="'.$valeur['fonction'].'", '. |
'U_NIV="'.$valeur['niveau'].'", '. |
'U_ACT="'.$valeur['activite'].'", '. |
'U_ASS="'.$valeur['asso'].'", '. |
'U_SPE="'.$valeur['specialite'].'", '. |
'U_GEO="'.$valeur['specialite_geo'].'" '; |
if (isset($valeur['dpt'])) { |
$req .= ',U_FRENCH_DPT="'.$valeur['dpt'].'"' ; |
} |
return $req ; |
} |
/** |
* renvoie un tableau avec en clé les champs de la base et en valeur les valeurs saisies dans le formulaire |
* |
* @return array renvoie un tableau avec en clé les champs de la base et en valeur les valeurs saisies dans le formulaire |
*/ |
function info_annuaire ($valeur) { |
$tableau = array ( |
INS_CHAMPS_ID => nextId(INS_ANNUAIRE, INS_CHAMPS_ID, $GLOBALS['ins_db']), |
INS_CHAMPS_NOM => $valeur['nom'], |
INS_CHAMPS_PRENOM => $valeur['prenom'], |
INS_CHAMPS_PAYS => $valeur['pays'], |
INS_CHAMPS_CODE_POSTAL => $valeur['cp'], |
INS_CHAMPS_VILLE => $valeur['ville'], |
INS_CHAMPS_ADRESSE_1 => $valeur['adresse_1'], |
INS_CHAMPS_ADRESSE_2 => $valeur['adresse_2'], |
INS_CHAMPS_REGION => $valeur['region'], |
INS_CHAMPS_STRUCTURE => $valeur['organisme'], |
INS_CHAMPS_SITE_WEB => $valeur['site'], |
INS_CHAMPS_LETTRE => $valeur['lettre'], |
'U_FONCTION' => $valeur['fonction'], |
'U_NIV' => $valeur['niveau'], |
'U_ACT' => $valeur['activite'], |
'U_ASS' => $valeur['asso'], |
'U_SPE' => $valeur['specialite'], |
'U_GEO' => $valeur['specialite_geo'] |
) ; |
return $tableau ; |
} |
/** formulaire_defaults () - Renvoie un tableau avec les valeurs par défaut du formulaire d'inscription |
* |
* @return array Valeurs par défaut du formulaire d'inscription |
*/ |
function formulaire_defaults () { |
$requete = 'select '.INS_ANNUAIRE.'.* '. |
'from '.INS_ANNUAIRE.' '. |
'where '.INS_ANNUAIRE.'.'.INS_CHAMPS_ID.'= "'.$GLOBALS['AUTH']->getAuthData (INS_CHAMPS_ID).'"' ; |
$resultat = $GLOBALS['ins_db']->query ($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ; |
} |
$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC) ; |
$valeurs_par_defaut = array() ; |
$valeurs_par_defaut['email'] = $ligne[INS_CHAMPS_MAIL]; |
$valeurs_par_defaut['nom'] = $ligne[INS_CHAMPS_NOM]; |
$valeurs_par_defaut['prenom'] = $ligne[INS_CHAMPS_PRENOM] ; |
$valeurs_par_defaut['pays'] = $ligne[INS_CHAMPS_PAYS] ; |
$valeurs_par_defaut['nomwiki'] = $ligne[INS_CHAMPS_LOGIN] ; |
$valeurs_par_defaut['cp'] = $ligne[INS_CHAMPS_CODE_POSTAL] ; |
$valeurs_par_defaut['ville'] = $ligne[INS_CHAMPS_VILLE] ; |
$valeurs_par_defaut['adresse_1'] = $ligne[INS_CHAMPS_ADRESSE_1] ; |
$valeurs_par_defaut['adresse_2'] = $ligne[INS_CHAMPS_ADRESSE_2] ; |
$valeurs_par_defaut['region'] = $ligne[INS_CHAMPS_REGION] ; |
$valeurs_par_defaut['structure'] = $ligne[INS_CHAMPS_STRUCTURE] ; |
$valeurs_par_defaut['site'] = $ligne['U_WEB'] ; |
$valeurs_par_defaut['organisme'] = $ligne['U_TITLE'] ; |
$valeurs_par_defaut['fonction'] = $ligne['U_FONCTION'] ; |
$valeurs_par_defaut['niveau'] = $ligne['U_NIV'] ; |
$valeurs_par_defaut['activite'] = $ligne['U_ACT'] ; |
$valeurs_par_defaut['asso'] = $ligne['U_ASS'] ; |
$valeurs_par_defaut['specialite'] = $ligne['U_SPE'] ; |
$valeurs_par_defaut['specialite_geo'] = $ligne['U_GEO'] ; |
$valeurs_par_defaut['lettre'] = $ligne[INS_CHAMPS_LETTRE] ; |
return $valeurs_par_defaut ; |
} |
function info() { |
$requete = 'select * from '.INS_ANNUAIRE.', '.INS_TABLE_PAYS.', annuaire_LABEL_ACT, annuaire_LABEL_NIV, annuaire_LABEL_ASS'. |
' where '.INS_ANNUAIRE.'.'.INS_CHAMPS_ID.'="'.$GLOBALS['AUTH']->getAuthData(INS_CHAMPS_ID).'"'. |
' and '.INS_CHAMPS_PAYS.'='.INS_CHAMPS_ID_PAYS. |
' and U_ACT=ID_LABEL_ACT and U_NIV=ID_LABEL_NIV and U_ASS=ID_LABEL_ASS' ; |
$resultat = $GLOBALS['ins_db'] -> query ($requete) ; |
if (DB::isError ($resultat)) { |
die ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ; |
} |
$ligne = $resultat->fetchRow (DB_FETCHMODE_ASSOC) ; |
$res = '<h1 class="inscription_titre1">'.INS_MESSAGE_BIENVENU."</h1>\n" ; |
$res .= "<h2 class=\"inscription_titre2\">".INS_FICHE_PERSONNELLE."</h2>\n" ; |
$res .= '<dl>' ; |
$res .= ligne_inscription (INS_EMAIL, $ligne[INS_CHAMPS_MAIL]) ; |
$res .= ligne_inscription (INS_NOM, $ligne[INS_CHAMPS_NOM]) ; |
$res .= ligne_inscription (INS_PRENOM, $ligne[INS_CHAMPS_PRENOM]) ; |
$res .= ligne_inscription (INS_ADRESSE_1, $ligne[INS_CHAMPS_ADRESSE_1]) ; |
$res .= ligne_inscription (INS_ADRESSE_2, $ligne[INS_CHAMPS_ADRESSE_2]) ; |
$res .= ligne_inscription (INS_REGION, $ligne[INS_CHAMPS_REGION]) ; |
$res .= ligne_inscription (INS_CODE_POSTAL, $ligne[INS_CHAMPS_CODE_POSTAL]) ; |
$res .= ligne_inscription (INS_VILLE, $ligne[INS_CHAMPS_VILLE]) ; |
$res .= ligne_inscription (INS_PAYS, $ligne[INS_CHAMPS_LABEL_PAYS]) ; |
$res .= ligne_inscription (INS_SITE_INTERNET, $ligne[INS_CHAMPS_SITE_WEB]) ; |
$res .= '</dl>' ; |
//$res .= "<div>".INS_NOM_WIKI." : ".$ligne[INS_CHAMPS_LOGIN]."</div>\n" ; |
$res .= '<h2 class="inscription_titre2">'.INS_ADHERENT.'</h2>' ; |
$res .= '<dl>' ; |
$res .= ligne_inscription (INS_ORGANISME, $ligne['U_TITLE']) ; |
$res .= ligne_inscription (INS_FONCTION, $ligne['U_FONCTION']) ; |
$res .= '</dl>' ; |
$res .= '<h2 class="inscription_titre2">'.INS_ETES_BOTANISTE.'</h2>' ; |
$res .= '<div>'.$ligne['LABEL_NIV'].'</div>'."\n" ; |
$res .= '<h2 class="inscription_titre2">'.INS_ACTIVITE_PROFESSIONNELLE.'</h2>' ; |
$res .= '<div>'.$ligne['LABEL_ACT'].'</div>'."\n" ; |
$res .= '<h2 class="inscription_titre2">'.INS_MEMBRE_ASSO.'</h2>' ; |
$res .= '<div>'.$ligne['LABEL_ASS'].'</div>'."\n" ; |
$res .= '<h2 class="inscription_titre2">'.INS_SPECIALISTE.'</h2>' ; |
$res .= '<div>'.$ligne['U_SPE'].'</div>'."\n" ; |
$res .= '<h2 class="inscription_titre2">'.INS_SPE_ZONE.'</h2>' ; |
$res .= '<div>'.$ligne['U_GEO'].'</div>'."\n" ; |
return $res ; |
} |
/** |
* |
* |
* @return |
*/ |
function ligne_inscription ($label, $valeur) { |
if ($valeur == '') { |
$valeur = ' ' ; |
} |
return '<dt>'.$label.' : </dt><dd>'.$valeur.'</dd>' ; |
} |
function bouton($url) { |
$boutons = new HTML_QuickForm('inscription', 'post', $url) ; ; |
//confirmation() ; |
$buttons[] = &HTML_QuickForm::createElement('submit', 'modifier', INS_MODIFIER_INSCRIPTION); |
$buttons[] = &HTML_QuickForm::createElement('submit', 'supprimer', INS_SUPPRIMER_INSCRIPTION, |
array ("onclick" => "javascript:return confirm('".INS_SUPPRIMER_INSCRIPTION." ?');")); |
$boutons->addGroup($buttons, null, null, ' '); |
$boutons->addElement('hidden', 'id_utilisateur', $GLOBALS['AUTH']->getAuthData (INS_CHAMPS_ID)) ; |
return $boutons->toHTML() ; |
} |
/** |
* Renvoie un lien pour se déconnex=cter |
* |
* @return string |
*/ |
function deconnexion ($url) { |
// Un champs logout |
return "<div><a href=\"$url&logout=1\">".INS_DECONNEXION."</a></div>" ; |
} |
function verif_doublonMail($mail) { |
if (isset ($GLOBALS['AUTH']) && $GLOBALS['AUTH']->getAuthData(INS_CHAMPS_ID) != '') { |
$requete_mail = "select ".INS_CHAMPS_MAIL." from ".INS_ANNUAIRE." where ".INS_CHAMPS_ID."=".$GLOBALS['AUTH']->getAuthData(INS_CHAMPS_ID) ; |
$resultat_mail = $GLOBALS['ins_db']->query ($requete_mail) ; |
if (DB::isError ($resultat_mail)) { |
die ("Echec de la requete : $requete_mail<br />".$resultat_mail->getMessage()) ; |
} |
$ligne_mail = $resultat_mail->fetchRow(DB_FETCHMODE_ASSOC) ; |
if ($mail == $ligne_mail[INS_CHAMPS_MAIL]) { |
return true ; |
} |
} |
$requete = "select ".INS_CHAMPS_MAIL." from ".INS_ANNUAIRE." where ".INS_CHAMPS_MAIL."= \"$mail\"" ; |
$resultat = $GLOBALS['ins_db']->query ($requete) ; |
if (DB::isError ($resultat)) { |
die ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ; |
} |
if ($resultat->numRows() == 0) return true ; |
return false ; |
} |
function envoie_passe() |
{ |
$headers['From'] = INS_MAIL_ADMIN_APRES_INSCRIPTION ; |
$headers['Subject'] = INS_NOUVEAU_MOT_DE_PASSE; |
$nouveau_passe = create_new_random(6) ; |
$body = INS_NOUVEAU_MOT_DE_PASSE_2.$nouveau_passe ; |
$body .= INS_NOUVEAU_MOT_DE_PASSE_LAIUS ; |
// modification du mot de passe dans la base |
$requete = "update ".INS_ANNUAIRE." set ".INS_CHAMPS_PASSE."=MD5(\"$nouveau_passe\") where ".INS_CHAMPS_MAIL."=\"".$_POST['nom_d_utilisateur']."\"" ; |
$resultat = $GLOBALS['ins_db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
} |
// On teste si l'email est présent dans la base |
if ($GLOBALS['ins_db']->affectedRows() == 0) { |
return '<div class="erreur">Il n\'y a pas d\'inscrit avec cet email</div>'."\n" ; |
} |
// création du mail |
if (!mail ($_POST['nom_d_utilisateur'], $headers['Subject'], $body)) { |
return 'erreur lors de l\'envoie de mail' ; |
} |
return "<div class=\"titre1_inscription\">".INS_MOT_DE_PASSE_ENVOYE_1." ".$_POST['nom_d_utilisateur']."</div>\n". |
"<div><br>".INS_MOT_DE_PASSE_ENVOYE_2."</div>\n"; |
} |
/** |
* |
* @global ins_db Un pointeur vers un objet PEAR::DB connecté |
* @return |
*/ |
function envoie_mail() |
{ |
include_once 'Mail/mime.php' ; |
$crlf="\n"; |
$headers ['From'] = INS_MAIL_ADMIN_APRES_INSCRIPTION ; |
$headers ['Subject'] = INS_MAIL_COORD_SUJET ; |
$headers ['Reply-To'] = INS_MAIL_ADMIN_APRES_INSCRIPTION ; |
$mime = new Mail_mime($crlf); |
$requete = 'select *, '.INS_CHAMPS_LABEL_PAYS.' from '.INS_ANNUAIRE.','.INS_TABLE_PAYS.', annuaire_LABEL_ACT, annuaire_LABEL_NIV, annuaire_LABEL_ASS'. |
' where '.INS_CHAMPS_MAIL.'="'.$GLOBALS['AUTH']->getUsername().'"'. |
' and '.INS_CHAMPS_ID_PAYS.'='.INS_CHAMPS_PAYS. |
' and U_ACT=ID_LABEL_ACT and U_NIV=ID_LABEL_NIV and U_ASS=ID_LABEL_ASS' ; |
$resultat = $GLOBALS['ins_db']->query($requete) ; |
if (DB::isError ($resultat)) { |
die ("Echec de la requete : $requete<br />".$resultat->getMessage()) ; |
} |
$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC) ; |
$body = INS_MAIL_COORD_CORPS."\n" ; |
$body .= "------------------------------------------\n"; |
$body .= INS_EMAIL.": ".unhtmlentities($ligne[INS_CHAMPS_MAIL])." \n" ; |
$body .= INS_NOM.": ".unhtmlentities($ligne[INS_CHAMPS_NOM])." \n" ; |
$body .= unhtmlentities(INS_PRENOM).' : '.unhtmlentities($ligne[INS_CHAMPS_PRENOM])." \n" ; |
$body .= INS_PAYS." : ".unhtmlentities($ligne[INS_CHAMPS_LABEL_PAYS])." \n" ; |
$body .= INS_ADRESSE_1." : ".unhtmlentities($ligne[INS_CHAMPS_ADRESSE_1])." \n" ; |
$body .= INS_ADRESSE_2." : ".unhtmlentities($ligne[INS_CHAMPS_ADRESSE_2])." \n" ; |
$body .= unhtmlentities(INS_REGION)." : ".unhtmlentities($ligne[INS_CHAMPS_REGION])." \n" ; |
$body .= INS_CODE_POSTAL." : ".unhtmlentities($ligne[INS_CHAMPS_CODE_POSTAL])." \n" ; |
$body .= INS_VILLE." : ".unhtmlentities($ligne[INS_CHAMPS_VILLE])." \n" ; |
$body .= INS_SITE_INTERNET." : ".unhtmlentities($ligne[INS_CHAMPS_SITE_WEB])." \n" ; |
$body .= INS_ORGANISME." : ".unhtmlentities($ligne['U_TITLE'])." \n" ; |
$body .= INS_FONCTION." : ".unhtmlentities($ligne['U_FONCTION'])." \n" ; |
$body .= unhtmlentities(INS_ETES_BOTANISTE)." : ".unhtmlentities($ligne['LABEL_NIV'])." \n" ; |
$body .= unhtmlentities(INS_ACTIVITE_PROFESSIONNELLE)." : ".unhtmlentities($ligne['LABEL_ACT'])." \n" ; |
$body .= unhtmlentities(INS_MEMBRE_ASSO)." : ".unhtmlentities($ligne['LABEL_ASS'])." \n" ; |
$body .= unhtmlentities(INS_SPECIALISTE)." : ".unhtmlentities($ligne['U_SPE'])." \n" ; |
$body .= unhtmlentities(INS_SPE_ZONE)." : ".unhtmlentities($ligne['U_GEO'])." \n" ; |
$body .= "-------------------------------------------\n" ; |
$mime->setTXTBody($body); |
$body = $mime->get(); |
$headers = $mime->headers($headers); |
$mail = & Mail::factory ('mail') ; |
$mail -> send ($ligne[INS_CHAMPS_MAIL], $headers, $body) ; |
// Envoi du mail aux administrateur du site |
foreach ($GLOBALS['mail_admin'] as $administrateur) { |
$mail -> send ($administrateur, $headers, $body) ; |
} |
if (PEAR::isError ($mail)) { |
echo 'erreur d\'envoi' ; |
return false ; |
} |
return true ; |
} |
/** |
* |
* |
* @return |
*/ |
function message_inscription () { |
return '<div>'.INS_MESSAGE_INSCRIPTION.'</div>' ; |
} |
/** |
* Inscrit un adhérent à la lettre d'actualité par l'envoie d'un email subscribe / unsubscribe |
* à la liste |
* |
* @global AUTH Un objet PEAR::Auth |
* @return boolean true en cas de succès |
*/ |
function inscription_lettre ($action) { |
$mail = & Mail::factory ('smtp') ; |
$email = $GLOBALS['AUTH']->getUsername() ; |
$headers ['Return-Path'] = $email ; |
$headers ['From'] = "<".$email.">" ; |
$headers ['Subject'] = $action ; |
$headers ['Reply-To'] = $email ; |
$mail -> send ($action, $headers, "") ; |
if (PEAR::isError ($mail)) { |
echo '<div class="erreur">Le mail n\'est pas partie...</div>' ; |
return false ; |
} |
return true ; |
} |
/** |
* Génère un nom wiki valide à partir des données saisies par l'utilisateur |
* fait une requete dans la base |
* |
* @return string un nom wiki valide |
*/ |
function genere_nom_wiki ($nom, $prenom) { |
// 1. suppression des espaces |
$nom = trim ($nom) ; |
$prenom = trim ($prenom) ; |
// 2. suppression des caractères non ascii et ajout de la première lettre en majuscule |
$nom = trim_non_ascii ($nom) ; |
$prenom = trim_non_ascii ($prenom) ; |
// Vérification |
$nom_wiki = $nom.$prenom ; |
if (!preg_match('/^[A-Z][a-z]+[A-Z,0-9][A-Z,a-z,0-9]*$/', $nom_wiki)) { |
$nom_wiki = chr(rand(65, 90)).$nom_wiki.chr(rand(65, 90)) ; |
} |
return $nom_wiki ; |
} |
/** |
* |
* |
* @return |
*/ |
function trim_non_ascii ($nom) { |
$premiere_lettre = true ; |
for ($i = 0; $i < strlen ($nom); $i++) { |
if (!preg_match ('/[a-zA-Z0-9]/', $nom[$i])) { |
// str_replace ($nom[$i], '_', $nom, 1) ; |
} |
// remplacement de la première lettre en majuscule |
if (preg_match ('/[a-zA-Z]/', $nom[$i]) && $premiere_lettre) { |
$nom[$i] = strtoupper ($nom[$i]) ; |
$premiere_lettre = false ; |
} else { |
if (preg_match ('/[a-zA-Z]/', $nom[$i])) { |
$nom[$i] = strtolower ($nom[$i]) ; |
} |
} |
} |
$nom = trim ($nom, '_') ; |
return $nom ; |
} |
// For users prior to PHP 4.3.0 you may do this: |
function unhtmlentities ($string) |
{ |
$trans_tbl = get_html_translation_table (HTML_ENTITIES); |
$trans_tbl = array_flip ($trans_tbl); |
return strtr ($string, $trans_tbl); |
} |
/* *********************************** |
create_new_random($n,$type) permet de générer un nombre de caractères aléatoires. |
ENTREE : |
- $n : créer un 'mot' de $n caractères |
- $type : permet de définir la liste des caractères disponibles |
SORTIE : chaine de $n caractères pris dans une liste $type |
*********************************** */ |
function create_new_random($n,$type="") |
{ |
$str = ""; |
switch ($type){ |
//liste des caractères possibles en virant ceux qui se ressemblent (ijl1oO0) |
// case "": |
// { |
// } |
// break; |
default:{ |
$chaine = "abcdefghkmnpqrstuvwxyzABCDEFGHKLMNPQRSTUVWXYZ23456789"; |
} |
break; |
} |
srand((double)microtime()*1000000); |
for($i = 0; $i < $n; $i++){ |
$str .= $chaine[rand()%strlen($chaine)]; |
} |
return "$str"; |
} |
//============================================================================== |
/** function nextId () Renvoie le prochain identifiant numérique libre d'une table |
* |
* On passe en paramètre le nom de la table et l'identifiant de la base selon PEAR DB |
* |
* @param mixed handler de connexion |
* @param string Nom de la table |
* return interger l'identifiant |
*/ |
function nextId ($table, $colonne_identifiant, $db) |
{ |
$requete = "select MAX($colonne_identifiant) as maxi from $table" ; |
$resultat = $db->query($requete) ; |
if (DB::isError($resultat)) { |
die (__FILE__ . __LINE__ . $resultat->getMessage() . $requete); |
return $db->raiseError($resultat) ; |
} |
if ($resultat->numRows() > 1) { |
return $db->raiseError("<br/>La table $table a un identifiant non unique<br/>") ; |
} |
$ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT) ; |
return $ligne->maxi + 1 ; |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: inscription.fonct.php,v $ |
* Revision 1.2 2005/03/21 16:50:27 alex |
* mille et une corrction |
* |
* Revision 1.1 2005/03/04 10:39:30 tam |
* installation |
* |
* Revision 1.1 2004/07/06 15:42:17 alex |
* en cours |
* |
* Revision 1.7 2004/07/06 15:28:41 alex |
* en cours |
* |
* Revision 1.5 2004/07/06 15:22:19 alex |
* en cours |
* |
======= |
* Revision 1.4 2004/06/30 10:00:26 alex |
* modification de l'envoie de mail |
* |
* Revision 1.2 2004/06/23 12:41:51 alex |
* amélioration de la gestion de la perte de mot de passe |
* |
* Revision 1.1 2004/06/18 09:20:47 alex |
* version initiale |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/trunk/client/inscription/bibliotheque/ins_spip.fonct.php |
---|
New file |
0,0 → 1,106 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: ins_spip.fonct.php,v 1.1 2005/03/04 10:39:30 tam Exp $ |
/** |
* Fonctions wikini |
* |
* Ce fichier propose 3 fonctions pour intervenir sur la table interwikini_users. |
* |
*@package inscription |
*@subpackage fonctions_wikini |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.1 $ $Date: 2005/03/04 10:39:30 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// +------------------------------------------------------------------------------------------------------+ |
// | LISTE de FONCTIONS | |
// +------------------------------------------------------------------------------------------------------+ |
function inscription_spip($id, $valeurs) |
{ |
$db = &DB::connect(INS_DSN_SPIP) ; |
// Requete pour inscrire dans SPIP |
$requete = "insert into spip_auteurs set id_auteur=$id, nom=\"".$valeurs['prenom']." ".$valeurs['nom']. |
"\",email=\"".$valeurs['email']."\",login=\"".$valeurs['email']. |
"\", pass=\"".md5($valeurs['mot_de_passe'])."\", statut=\"1comite\", lang=\"". |
strtolower($valeurs['pays'])."\"" ; |
$db->query($requete) ; |
} |
function mod_inscription_spip($id) |
{ |
global $HTTP_POST_VARS ; |
$db = &DB::connect(INS_DSN_SPIP) ; |
//BIEN METTRE alea_actuel, htpass ET alea_futur À "" |
$requete = "update spip_auteurs set nom=\"".$HTTP_POST_VARS['prenom']." ".$HTTP_POST_VARS['nom']. |
"\",email=\"".$HTTP_POST_VARS['email']."\",login=\"".$HTTP_POST_VARS['email']. |
"\", pass=\"".md5($HTTP_POST_VARS['mot_de_passe'])."\", htpass=\"\", alea_actuel=\"\", alea_futur=\"\", lang=\"en\" where id_auteur=$id" ; |
//echo $requete; |
$db->query($requete) ; |
} |
function desinscription_spip($id_utilisateur) |
{ |
$db = &DB::connect(INS_DSN_SPIP) ; |
//BIEN METTRE alea_actuel, htpass ET alea_futur À "" |
$requete = 'delete from spip_auteurs where id_auteur='.$id_utilisateur ; |
//echo $requete; |
$resultat = $db->query ($requete) ; |
if (DB::isError ($resultat)) { |
return "Echec de la requete : $requete<br />".$resultat->getMessage() ; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: ins_spip.fonct.php,v $ |
* Revision 1.1 2005/03/04 10:39:30 tam |
* installation |
* |
* Revision 1.1 2004/07/06 15:42:17 alex |
* en cours |
* |
* Revision 1.2 2004/06/25 14:25:27 alex |
* modification de la requete de suppresssion |
* |
* Revision 1.1 2004/06/18 09:20:48 alex |
* version initiale |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/trunk/client/inscription/langues/ins_langue_en.inc.php |
---|
New file |
0,0 → 1,114 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: ins_langue_en.inc.php,v 1.1 2004/07/06 15:42:17 alex Exp $ |
/** |
* Fichier de traduction en anglais de l'application inscription |
* |
* Fichier de traduction en anglais de l'application inscription |
* |
*@package inscription |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.1 $ $Date: 2004/07/06 15:42:17 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
define ("INS_NOM", "Name :") ; |
define ("INS_PRENOM", "First name") ; |
define ("INS_PAYS", "Country:") ; |
define ("INS_LANGUES_PARLES", "Languages spoken :") ; |
define ("INS_EMAIL", "E-mail :") ; |
define ("INS_MOT_DE_PASSE", "Password:") ; |
define ("INS_REPETE_MOT_DE_PASSE", "Repeat the password :") ; |
define ("INS_ANNULER", "Cancel") ; |
define ("INS_RETABLIR", "Restore") ; |
define ("INS_VALIDER", "Validate") ; |
define ("INS_MOTS_DE_PASSE_DIFFERENTS", "The two passwords are different !") ; |
define ("INS_EMAIL_REQUIS", "You must enter your e-mail.") ; |
define ("INS_MOT_DE_PASSE_REQUIS", "You must enter your password.") ; |
define ("INS_MAIL_INCORRECT", "E-mail addresses must be in the following format, user@domain.ext") ; |
define ("INS_MAIL_DOUBLE", "This e-mail has already been used") ; |
define ("INS_NOTE_REQUIS", "Indicate the required fields") ; |
define ("INS_MODIFIER_INSCRIPTION", "Modify your registration") ; |
define ("INS_SUPPRIMER_INSCRIPTION", "Cancel your registration") ; |
define ("INS_MESSAGE_BIENVENU", "You are registered to i-twinning ") ; |
define ("INS_FICHE_PERSONNELLE", "Personal form") ; |
define ("INS_DECONNEXION", "Logout") ; |
define ("INS_INSCRIPTION", "Registration") ; |
define ("INS_TEXTE_PERDU", "If you forgot your password, enter your e-mail address in the Login ". |
"field below and click on Validate") ; |
define ("INS_NOM_WIKI", "Wiki name") ; |
define ("INS_MAUVAIS_NOM_WIKI", "The wiki name is not valid (ex : NameFirstname)") ; |
define ("INS_DEJA_INSCRIT", "If you are already registered :") ; |
define ("INS_ERREUR_LOGIN", "Unknown user or invalid password") ; |
define ("INS_SI_PASSE_PERDU", "If you forgot your password") ; |
define ("INS_INDIQUE_ADRESSE", "Enter your e-mail address in the field below.<br>\n". |
"A new password will be sent to you ") ; |
define ("INS_ENVOIE_PASSE", "Password e-mailing") ; |
define ("INS_LAIUS_INSCRIPTION", "Click here for registration") ; |
//============= L'envoie du mot de passe perdu par mail ============================= |
define ("INS_NOUVEAU_MOT_DE_PASSE", "Your new i-twinning password") ; |
define ("INS_NOUVEAU_MOT_DE_PASSE_2", "Your new password : ") ; |
define ("INS_NOUVEAU_MOT_DE_PASSE_LAIUS", "\n\n This password allows you to modify your personnal informations\n". |
"in the i-t website\n.". |
"http://www.vecam.org/i-j/\n\n") ; |
define ("INS_MOT_DE_PASSE_ENVOYE_1", "Your new password has been sent to the address ") ; |
define ("INS_MOT_DE_PASSE_ENVOYE_2", "Check your mail, remember your password and register again. Don't ". |
"hesitate to change this password and replace it by an easier one.") ; |
//============= L'envoie d'un mail de confirmation =================================== |
// Ne pas utiliser d'entités HTML |
define ("INS_MAIL_INSCRIPTION_1", "Votre inscription a bien été prise en compte.\n". |
"Voici les informations que nous avons enregistré :\n") ; |
define ("INS_MAIL_INSCRIPTION_2", "\nVous pouvez modifier votre inscription sur \nhttp://www.vecam.org/i-j/\n". |
"rubrique Inscription.\n\n". |
"L'équipe I-Jumelage.") ; |
// Envoir d'un mail à la coordination |
define ("INS_MAIL_COORD_SUJET", "A new registration on the I-Twinning") ; |
define ("INS_MAIL_COORD_CORPS", "A new registration on the I-Twinning") ; |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: ins_langue_en.inc.php,v $ |
* Revision 1.1 2004/07/06 15:42:17 alex |
* en cours |
* |
* Revision 1.3 2004/06/25 14:25:40 alex |
* ajout de labels |
* |
* Revision 1.2 2004/06/24 07:43:55 alex |
* traduction |
* |
* Revision 1.1 2004/06/18 09:21:15 alex |
* version initiale |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/trunk/client/inscription/langues/ins_langue_es.inc.php |
---|
New file |
0,0 → 1,110 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: ins_langue_es.inc.php,v 1.1 2004/07/06 15:42:17 alex Exp $ |
/** |
* Fichier de traduction en français de l'application inscription |
* |
* Fichier de traduction en français de l'application inscription |
* |
*@package inscription |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.1 $ $Date: 2004/07/06 15:42:17 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
define ("INS_NOM", "Apellido") ; |
define ("INS_PRENOM", "Nombre") ; |
define ("INS_PAYS", "Pais") ; |
define ("INS_LANGUES_PARLES", "Idiomas hablados") ; |
define ("INS_EMAIL", "Correo electronico") ; |
define ("INS_MOT_DE_PASSE", "Contraseña") ; |
define ("INS_REPETE_MOT_DE_PASSE", "Repetir la contraseña") ; |
define ("INS_ANNULER", "Cancelar") ; |
define ("INS_RETABLIR", "Restablecer") ; |
define ("INS_VALIDER", "Ingresar") ; |
define ("INS_MOTS_DE_PASSE_DIFFERENTS", "Las contraseñas son diferentes!") ; |
define ("INS_EMAIL_REQUIS", "Debe ingresar un correo electronico") ; |
define ("INS_MOT_DE_PASSE_REQUIS", "Debe ingresar una contraseña.") ; |
define ("INS_MAIL_INCORRECT", "El correo electronico debe tener una forma correcta, utilizador@domaine.ext") ; |
define ("INS_MAIL_DOUBLE", "Este correo electronico ya es utilizado por otra persona") ; |
define ("INS_NOTE_REQUIS", "Indicar los espacios requeridos") ; |
define ("INS_MODIFIER_INSCRIPTION", "Modificar su inscripccion") ; |
define ("INS_SUPPRIMER_INSCRIPTION", "Cancelar su inscripcion") ; |
define ("INS_MESSAGE_BIENVENU", "Esta inscrito en I-Enlace") ; |
define ("INS_FICHE_PERSONNELLE", "Ficha personal") ; |
define ("INS_DECONNEXION", "Desconectar") ; |
define ("INS_INSCRIPTION", "Inscripcion") ; |
define ("INS_TEXTE_PERDU", "Si ha perdido su contraseña, indique su correo electronico en el espaciologin y haga clic en Ingresar") ; |
define ("INS_NOM_WIKI", "Nombre wiki") ; |
define ("INS_MAUVAIS_NOM_WIKI", "El nombre wiki no es valido (ex: NomPrenom)") ; |
define ("INS_DEJA_INSCRIT", "Si ya esta inscrito") ; |
define ("INS_ERREUR_LOGIN", "Utilizador desconocido o contraseña incorrecta") ; |
define ("INS_SI_PASSE_PERDU", "Si ha perdido su contraseña ") ; |
define ("INS_INDIQUE_ADRESSE", "indique su correo electronico en el espacio que sigue. Una nueva contraseñale sera enviada.") ; |
define ("INS_LAIUS_INSCRIPTION", "Si no està inscrito, haga clic en inscripción") ; |
define ("INS_ENVOIE_PASSE", "Envio de la contraseña por correo electronico") ; |
//=================== Envio de la contraseña perdida por correo electronico======================== |
define ("INS_NOUVEAU_MOT_DE_PASSE", "Su nueva contraseña I-Enlaces") ; |
define ("INS_NOUVEAU_MOT_DE_PASSE_2", "Su nueva contraseña:") ; |
define ("INS_NOUVEAU_MOT_DE_PASSE_LAIUS", "Esta contraseña le permite modificar las informaciones que le conciernen enel sitio de I-Enlace.Su nueva contraseña es enviada a la direccion") ; |
define ("INS_MOT_DE_PASSE_ENVOYE_1", "Rebice su correo electronico, anote su nueva contraseña e idenfiquedirigiendose de nuevo a la inscripcion.No dude en cambiar esta contraseña para poner una mas simple y mas facil aretener. ") ; |
//============= L'envoie d'un mail de confirmation =================================== |
// Ne pas utiliser d'entités HTML |
define ("INS_MAIL_INSCRIPTION_1", "Votre inscription a bien été prise en compte.\n". |
"Voici les informations que nous avons enregistré :\n") ; |
define ("INS_MAIL_INSCRIPTION_2", "\nVous pouvez modifier votre inscription sur \nhttp://www.vecam.org/i-j/\n". |
"rubrique Inscription.\n\n". |
"L'équipe I-Jumelage.") ; |
// Envoir d'un mail à la coordination |
define ("INS_MAIL_COORD_SUJET", "Un nouvel inscrit à I-Twinning") ; |
define ("INS_MAIL_COORD_CORPS", "Un nouvel inscrit à I-Twinning") ; |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: ins_langue_es.inc.php,v $ |
* Revision 1.1 2004/07/06 15:42:17 alex |
* en cours |
* |
* Revision 1.4 2004/06/30 10:00:59 alex |
* traduction |
* |
* Revision 1.3 2004/06/25 14:25:40 alex |
* ajout de labels |
* |
* Revision 1.2 2004/06/24 07:43:55 alex |
* traduction |
* |
* Revision 1.1 2004/06/18 09:21:15 alex |
* version initiale |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/trunk/client/inscription/langues/ins_langue_fr.inc.php |
---|
New file |
0,0 → 1,162 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: ins_langue_fr.inc.php,v 1.3 2005/03/21 16:50:45 alex Exp $ |
/** |
* Fichier de traduction en français de l'application inscription |
* |
* Fichier de traduction en français de l'application inscription |
* |
*@package inscription |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.3 $ $Date: 2005/03/21 16:50:45 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
define ("INS_AJOUT_MEMBRE", "Ajout d'un nouveau membre") ; |
define ("INS_NOM", "Nom") ; |
define ("INS_NOM_REQUIS", "Indiquez votre nom.") ; |
define ("INS_PRENOM", "Prénom") ; |
define ("INS_PRENOM_REQUIS", "Veuillez indiquer votre prénom.") ; |
define ("INS_PAYS", "Pays") ; |
define ("INS_LANGUES_PARLES", "Langues parlés") ; |
define ("INS_EMAIL", "Adresse mail") ; |
define ("INS_MOT_DE_PASSE", "Mot de passe :") ; |
define ("INS_REPETE_MOT_DE_PASSE", "Répéter le mot de passe :") ; |
define ("INS_ADRESSE_1", "Adresse ") ; |
define ("INS_ADRESSE_2", "Adresse (suite)") ; |
define ("INS_REGION", "Région / province") ; |
define ("INS_CODE_POSTAL", "Code postal") ; |
define ("INS_CODE_POSTAL_REQUIS", "Indiquez votre code postal.") ; |
define ("INS_VILLE", "Ville") ; |
define ("INS_VILLE_REQUIS", "Indiquez votre ville.") ; |
define ("INS_SITE_INTERNET", "Site web personnel") ; |
define ("INS_LETTRE", "Je souhaite recevoir la lettre d'actualité de Tela Botanica") ; |
define ("INS_ADHERENT", "Vous êtes adhérents de personnes morales (associations, institutions, entreprise... )") ; |
define ("INS_ORGANISME", "Organisme") ; |
define ("INS_FONCTION", "Fonction") ; |
define ("INS_ETES_BOTANISTE", "Vous êtes botaniste :") ; |
define ("INS_ACTIVITE_PROFESSIONNELLE", " Votre activité professionnelle (ou celle que vous aviez)") ; |
define ("INS_MEMBRE_ASSO", "Vous êtes membre d'une association botanique, naturaliste, ou autre... :") ; |
define ("INS_SPECIALISTE", " Vous êtes spécialiste d'une discipline ou d'un groupe de plantes particulier, lequel :") ; |
define ("INS_SPE_ZONE", "Vous ètes spécialiste d'une zone géographique, laquelle :") ; |
define ("INS_ANNULER", "Annuler") ; |
define ("INS_RETABLIR", "Rétablir") ; |
define ("INS_VALIDER", "Valider") ; |
define ("INS_MOTS_DE_PASSE_DIFFERENTS", "Les mots de passe sont différents !") ; |
define ("INS_EMAIL_REQUIS", "Vous devez saisir un email.") ; |
define ("INS_MOT_DE_PASSE_REQUIS", "Vous devez saisir un mot de passe.") ; |
define ("INS_MAIL_INCORRECT", "L'email doit avoir une forme correcte, utilisateur@domaine.ext") ; |
define ("INS_MAIL_DOUBLE", "Cet email est déjà utilisé par quelqu'un d'autre") ; |
define ("INS_NOTE_REQUIS", "Indique les champs requis") ; |
define ("INS_ACCUEIL_INSCRIPTION", "Inscription au réseau Tela Botanica") ; |
define ("INS_MODIFIER_INSCRIPTION", "Modifier votre inscription") ; |
define ("INS_SUPPRIMER_INSCRIPTION", "Supprimer votre inscription") ; |
define ("INS_MESSAGE_BIENVENU", "Vous êtes inscrit à Tela Botanica") ; |
define ('INS_MESSAGE_EXPIRATION', 'Votre demande a expiré, veuillez ressaisir le formulaire d\'inscription.') ; |
define ("INS_FICHE_PERSONNELLE", "Fiche personnelle") ; |
define ("INS_DECONNEXION", 'Déconnexion') ; |
define ("INS_INSCRIPTION", 'Inscription') ; |
define ("INS_TEXTE_PERDU", "Si vous avez perdu votre mot de passe, indiquez ". |
"votre adresse email dans le champs login ci-dessus et cliquez sur \"Valider\"") ; |
define ("INS_NOM_WIKI", "Nom wiki") ; |
define ("INS_MAUVAIS_NOM_WIKI", "Le nom wiki n'est pas valide (ex : NomPrenom)") ; |
define ("INS_DEJA_INSCRIT", "Déjà inscrit, identifiez-vous pour accéder à votre fiche personnelle :") ; |
define ("INS_ERREUR_LOGIN", "Utilisateur inconnu ou mot de passe erronné") ; |
define ("INS_SI_PASSE_PERDU", "Si vous avez perdu votre mot de passe") ; |
define ("INS_INDIQUE_ADRESSE", "Indiquez votre adresse email dans le champs ci-dessus.<br>\n". |
"Un nouveau mot de passe vous sera envoyé.") ; |
define ("INS_ENVOIE_PASSE", "Envoi du mot de passe par mail") ; |
define ("INS_LAIUS_INSCRIPTION", "L'inscription au réseau Tela Botanica est libre et gratuite !") ; |
define ("INS_LAIUS_INSCRIPTION_2", "Elle vous permet de :<br /> |
- consulter l'annuaire des personnes inscrites au Réseau et pouvoir ainsi échanger des informations ;<br /> |
- accéder à certaines informations diffusées sur le site ;<br /> |
- vous inscrire à des projets botaniques ;<br /> |
- recevoir un bulletin électronique d'informations.") ; |
//============= L'envoie du mot de passe perdu par mail ============================= |
define ("INS_NOUVEAU_MOT_DE_PASSE", "Votre nouveau mot de passe Tela Botanica") ; |
define ("INS_NOUVEAU_MOT_DE_PASSE_2", "Votre nouveau mot de passe : ") ; |
define ("INS_NOUVEAU_MOT_DE_PASSE_LAIUS", "\n\nCe mot de passe vous permet de modifier les informations\n". |
"vous concernant dans le site de Tela Botanica.\n". |
"http://www.tela-botanica.org/\n\n") ; |
define ("INS_MOT_DE_PASSE_ENVOYE_1", "Votre nouveau mot de passe a été ". |
"envoyé à l'adresse") ; |
define ("INS_MOT_DE_PASSE_ENVOYE_2", "Relevez votre messagerie, notez votre nouveau mot de passe et identifiez vous à ". |
"nouveau en allant à l'inscription. N'hésitez pas à changer ce mot de passe ". |
"pour en mettre un plus simple, très facile à retenir." ); |
//============= L'envoie d'un mail de confirmation =================================== |
// Ne pas utiliser d'entités HTML |
define ("INS_MAIL_INSCRIPTION_1", "Votre inscription a bien été prise en compte.\n". |
"Voici les informations que nous avons enregistré :\n") ; |
define ("INS_MAIL_INSCRIPTION_2", "\nVous pouvez modifier votre inscription sur \nhttp://www.tela-botanica.org\n". |
"rubrique Inscription.\n\n". |
"L'équipe de Tela Botanica.") ; |
// Envoir d'un mail à la coordination |
define ("INS_MAIL_COORD_SUJET", "Un nouvel inscrit à Tela Botanica") ; |
define ("INS_MAIL_COORD_CORPS", "Un nouvel inscrit à Tela Botanica") ; |
define ("INS_MESSAGE_INSCRIPTION", "<h1 class=\"titre1_inscription\">Inscription au réseau Tela Botanica</h1>\n". |
"<p>Votre inscription a bien été prise en compte.</p>\n". |
"<h2>Pour terminer votre inscription :</h2>\n". |
"<p>Un message de confirmation vous a été envoyé à l'adresse e-mail que vous avez fournie.". |
" Veuillez lire ce mail et en suivre les instructions pour activer complètement votre inscription.</p>") ; |
define ('INS_MESSAGE_DEBUT_MAIL_INSCRIPTION', 'Bonjour,'."\n\n". |
'Nous avons reçu une demande d\'inscription pour cette adresse mail.'."\n". |
'Pour confirmer, cliquer sur le lien ci-dessous.'."\n\n" ) ; |
define ('INS_MESSAGE_FIN_MAIL_INSCRIPTION', "\n\n".'L\'équipe de Tela Botanica') ; |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: ins_langue_fr.inc.php,v $ |
* Revision 1.3 2005/03/21 16:50:45 alex |
* labels |
* |
* Revision 1.2 2005/03/10 09:40:39 tam |
* modifs labels |
* |
* Revision 1.1 2005/03/04 10:39:54 tam |
* installation |
* |
* Revision 1.1 2004/07/06 15:42:17 alex |
* en cours |
* |
* Revision 1.4 2004/07/06 15:31:43 alex |
* en cours |
* |
* Revision 1.3 2004/06/25 14:25:40 alex |
* ajout de labels |
* |
* Revision 1.2 2004/06/24 07:43:55 alex |
* traduction |
* |
* Revision 1.1 2004/06/18 09:21:15 alex |
* version initiale |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |