Subversion Repositories Applications.papyrus

Compare Revisions

Ignore whitespace Rev 1054 → Rev 1055

/trunk/papyrus/applettes/identification/langues/iden_langue_fr.inc.php
21,7 → 21,7
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: iden_langue_fr.inc.php,v 1.7 2006-03-02 10:49:49 ddelon Exp $
// CVS : $Id: iden_langue_fr.inc.php,v 1.8 2006-11-20 17:30:40 jp_milcent Exp $
/**
* Traduction de l'applette Identification : fr
*
34,7 → 34,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.7 $ $Date: 2006-03-02 10:49:49 $
*@version $Revision: 1.8 $ $Date: 2006-11-20 17:30:40 $
// +------------------------------------------------------------------------------------------------------+
*/
 
68,12 → 68,15
/** Message indiquant le lien pour se déconnecter.*/
define('IDEN_LG_DECONNEXION', 'Déconnexion');
/** Message d'échec d'authentification */
define ('IDEN_ECHEC_AUTH', 'Perdu mot de passe ') ;
define ('IDEN_ECHEC_AUTH', 'Mot de passe perdu ? ') ;
/** Message ici */
define ('IDEN_ICI', 'Cliquer ici') ;
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.7 2006/03/02 10:49:49 ddelon
* Fusion branche multilinguisme dans branche principale
*
* Revision 1.6 2005/12/13 11:13:52 alexandre_tb
* ajout d'un message si l'identification échoue
*
/trunk/papyrus/applettes/identification/identification.php
19,7 → 19,7
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: identification.php,v 1.22 2006-09-21 15:25:17 jp_milcent Exp $
// CVS : $Id: identification.php,v 1.23 2006-11-20 17:30:40 jp_milcent Exp $
/**
* Applette : identification
*
38,7 → 38,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.22 $ $Date: 2006-09-21 15:25:17 $
*@version $Revision: 1.23 $ $Date: 2006-11-20 17:30:40 $
// +------------------------------------------------------------------------------------------------------+
*/
 
64,41 → 64,24
// +------------------------------------------------------------------------------------------------------+
 
// Si le site utilise une authentification.
if ($_GEN_commun['info_auth']->gsa_ce_type_auth == 1) {
if ($GLOBALS['_GEN_commun']['info_auth']->gsa_ce_type_auth == 1) {
// Si un formulaire nous renvoie en POST une variable "deconnexion", nous délogons l'utilisateur.
if (isset($_REQUEST['deconnexion']) || isset($_REQUEST['logout'])) {
$_GEN_commun['pear_auth']->logout();
// Le test suivant vérifie si une authentification SPIP est en cour, vois pap_initialise_auth.inc.php
if (isset ($chemin_spip) && isset ($coauth) && $coauth == $auth_courante['gsab_id_auth_bdd']) {
// On place un cookie avec une duré dépassée
setcookie("spip_session", $id_session, time() - 3600*24, "/$chemin_cookie_spip/") ;
setcookie("spip_admin", "@".$login, time() -3600*24, "/$chemin_cookie_spip/") ;
$dirname = $GLOBALS['flag_ecrire'] ? 'data/' : 'ecrire/data/';
$dirname = $chemin_spip."/".$dirname ;
// ne pas se zapper soi-meme
if ($s = $GLOBALS['spip_session'])
$fichier_session = fichier_session($s, lire_meta('alea_ephemere'));
$fichier_session = $chemin_spip.'/ecrire/'.$fichier_session ;
$dir = opendir($dirname);
$t = time();
while(($item = readdir($dir)) != '') {
$chemin = "$dirname$item";
if (ereg("^session_([0-9]+_)?([a-z0-9]+)\.php3$", $item, $regs)) {
// Si c'est une vieille session, on jette
if (($t - filemtime($chemin)) > 48 * 3600) unlink($chemin);
// sinon voir si c'est une session du meme auteur
else if ($regs[1] == $id_auteur.'_') {
$zap_num ++;
if ($zap) unlink($chemin);
}
}
}
}
$GLOBALS['_GEN_commun']['pear_auth']->logout();
// Destruction du cookie de Papyrus
setcookie(session_name(), session_id(), time()-3600, '/');
}
// Si un formulaire nous renvoie en POST une variable "connexion", nous logons l'utilisateur.
if (isset($_REQUEST['connexion'])) {
$_GEN_commun['pear_auth']->login();
// Nous vérifions que l'utilisateur est coché "Mémoriser mon compte"
if (isset($_POST['persistant']) && $_POST['persistant'] == 'o') {
//echo '<pre>'.print_r($_POST, true).'</pre>';
// Expiration si l'utilisateur ne referme pas son navigateur
$GLOBALS['_GEN_commun']['pear_auth']->setExpire((int)IDEN_AUTH_SESSION_DUREE);
// Pour que la session dure même après avoir refermer son navigateur
setcookie(session_name(), session_id(), (int)IDEN_AUTH_SESSION_DUREE, '/');
}
$GLOBALS['_GEN_commun']['pear_auth']->login();
$_SESSION['username'] = $username;
}
}
122,8 → 105,10
$retour = '';
$objet_pear_auth =& $GLOBALS['_GEN_commun']['pear_auth'];
$objet_pear_db =& $GLOBALS['_GEN_commun']['pear_db'];
$url = $GLOBALS['_GEN_commun']['url']->getURL();
$objet_url = $GLOBALS['_GEN_commun']['url'] ;
$InfoAuthBdd =& $GLOBALS['_GEN_commun']['info_auth_bdd'];
$objet_url =& $GLOBALS['_GEN_commun']['url'];
$url = $objet_url->getURL();
// Récupération des valeurs pour le login et le mot de passe
$mot_de_passe = (! isset($_POST['password'])) ? '' : $_POST['password'];
$login = (! isset($_POST['username'])) ? '' : $_POST['username'];
130,7 → 115,7
// ATTENTION : Partie à supprimer une fois les mise à jour effectué dans l'annuaire de Tela Botanica
// Devrait être déplacer dans l'appli inscription de Tela.
if (isset($GLOBALS['_GEN_commun']['info_auth_bdd']->gsab_nom_table) && $GLOBALS['_GEN_commun']['info_auth_bdd']->gsab_nom_table == 'annuaire_tela') {
if (isset($InfoAuthBdd->gsab_nom_table) && $InfoAuthBdd->gsab_nom_table == 'annuaire_tela') {
verification_mot_de_passe($objet_pear_db, $mot_de_passe, $login);
if (isset($_POST['connexion'])) {
$objet_pear_auth->login();
139,13 → 124,13
if (! $objet_pear_auth->getAuth()) {
// L'utilisateur a essayé de s'identifier mais a échoué
if (isset($_POST['username'])) {
if ($login != '') {
$retour .= '<span class="erreur">'.IDEN_ECHEC_AUTH ;
if (isset($GLOBALS['_GEN_commun']['info_auth_bdd']->url_inscription)) {
$retour .= '<a id="lien_inscription" href="'.$GLOBALS['_GEN_commun']['info_auth_bdd']->url_inscription.'">' ;
if (isset($InfoAuthBdd->url_inscription)) {
$retour .= '<a id="lien_inscription" href="'.$InfoAuthBdd->url_inscription.'">' ;
$retour .= IDEN_ICI.'</a>' ;
}
$retour .= '</span>' ;
$retour .= '</span>'."\n";
}
// L'utilisateur n'est pas identifié:
$retour .= str_repeat(' ', 16).'<form id="form_connexion" class="form_identification" action="'.$url.'" method="post">'."\n";
160,11 → 145,15
$retour .= str_repeat(' ', 24).'<input type="password" id="password" name="password" maxlength="80" tabindex="2" value="'.IDEN_LG_FORM_VALUE_MDP.'" />'."\n";
$retour .= str_repeat(' ', 20).''."\n";
$retour .= str_repeat(' ', 20).''."\n";
$retour .= str_repeat(' ', 24).'<input type="submit" id="connexion" name="connexion" tabindex="3" value="'.IDEN_LG_FORM_VALUE_SUBMIT.'" />'."\n";
$retour .= str_repeat(' ', 24).'<input type="checkbox" id="persistant" name="persistant" tabindex="3" value="o" />'."\n";
$retour .= str_repeat(' ', 24).'<label id="persistant_label" for="persistant">'.'Mémoriser mon compte'.'</label>'."\n";
$retour .= str_repeat(' ', 20).''."\n";
$retour .= str_repeat(' ', 20).''."\n";
$retour .= str_repeat(' ', 24).'<input type="submit" id="connexion" name="connexion" tabindex="4" value="'.IDEN_LG_FORM_VALUE_SUBMIT.'" />'."\n";
$retour .= str_repeat(' ', 20).''."\n";
// Si l'url de la page d'inscription est stockée dans les paramêtres, nous l'affichons
if (isset($GLOBALS['_GEN_commun']['info_auth_bdd']->url_inscription)) {
$retour .= '<p><a id="lien_inscription" href="'.$GLOBALS['_GEN_commun']['info_auth_bdd']->url_inscription.'">'.
if (isset($InfoAuthBdd->url_inscription)) {
$retour .= '<p><a id="lien_inscription" href="'.$InfoAuthBdd->url_inscription.'">'.
IDEN_LG_INSCRIPTION_URL.
'</a></p>'."\n";
}
176,24 → 165,24
// de l'annuaire utilisé
$retour .= str_repeat(' ', 16).'<p id="identification_info"><span id="identification_message">'.IDEN_LG_MESSAGE.'</span> ';
// Si les intitulés des champs nom et prénoms d'une personne ou le nom d'une structure sont indiqués nous les affichons
if (isset($GLOBALS['_GEN_commun']['info_auth_bdd']->chp_personne_prenom) && isset($GLOBALS['_GEN_commun']['info_auth_bdd']->chp_personne_nom)) {
if (isset($InfoAuthBdd->chp_personne_prenom) && isset($InfoAuthBdd->chp_personne_nom)) {
$retour .= '<span id="identification_prenom">'.
$objet_pear_auth->getAuthData($GLOBALS['_GEN_commun']['info_auth_bdd']->chp_personne_prenom).
$objet_pear_auth->getAuthData($InfoAuthBdd->chp_personne_prenom).
'</span> '.
'<span id="identification_nom">'.
$objet_pear_auth->getAuthData($GLOBALS['_GEN_commun']['info_auth_bdd']->chp_personne_nom).
$objet_pear_auth->getAuthData($InfoAuthBdd->chp_personne_nom).
'</span>';
} elseif (isset($GLOBALS['_GEN_commun']['info_auth_bdd']->chp_structure_nom)) {
} elseif (isset($InfoAuthBdd->chp_structure_nom)) {
$retour .= '<span id="identification_structure">'.
$objet_pear_auth->getAuthData($GLOBALS['_GEN_commun']['info_auth_bdd']->chp_structure_nom).
$objet_pear_auth->getAuthData($InfoAuthBdd->chp_structure_nom).
'</span>';
}
$retour .= '</p>'."\n";
$retour .= str_repeat(' ', 16).'<p id="iden_action">'."\n";
// Si l'url de la page de modification de l'inscription est stockée dans les paramêtres, nous l'affichons
if (isset($GLOBALS['_GEN_commun']['info_auth_bdd']->url_inscription_modif)) {
if (isset($InfoAuthBdd->url_inscription_modif)) {
$retour .= str_repeat(' ', 20).'<a id="lien_inscription_modif" href="'.
$GLOBALS['_GEN_commun']['info_auth_bdd']->url_inscription_modif.'">'.
$InfoAuthBdd->url_inscription_modif.'">'.
IDEN_LG_INSCRIPTION_URL_MODIF.
'</a>'."\n";
}
215,6 → 204,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.22 2006/09/21 15:25:17 jp_milcent
* Nettoyage dans l'url de la querystring logout.
*
* Revision 1.21 2006/03/02 10:49:49 ddelon
* Fusion branche multilinguisme dans branche principale
*
/trunk/papyrus/applettes/identification/configuration/iden_config.inc.php
21,7 → 21,7
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: iden_config.inc.php,v 1.1 2005-03-15 14:18:49 jpm Exp $
// CVS : $Id: iden_config.inc.php,v 1.2 2006-11-20 17:30:40 jp_milcent Exp $
/**
* Configuration de l'applette Identification.
*
34,7 → 34,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-03-15 14:18:49 $
*@version $Revision: 1.2 $ $Date: 2006-11-20 17:30:40 $
// +------------------------------------------------------------------------------------------------------+
*/
 
49,6 → 49,9
/** Constante stockant la valeur de la langue par défaut pour l'applette IDEN.*/
define('IDEN_I18N_DEFAUT', GEN_I18N_ID_DEFAUT);
 
/** Constante stockant la valeur de durée de la session.*/
define('IDEN_AUTH_SESSION_DUREE', PAP_AUTH_SESSION_DUREE);
 
// Chemin vers les dossiers de l'applette
/** Chemin vers l'applette Identification de Papyrus.*/
define('IDEN_CHEMIN_APPLETTE', GEN_CHEMIN_APPLETTE.'identification'.GEN_SEP);
60,7 → 63,10
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/03/15 14:18:49 jpm
* Ajout d'un fichier de config.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>