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.33 2007-08-28 14:23:35 jp_milcent Exp $ |
// CVS : $Id: identification.php,v 1.34 2007-09-18 08:40:54 alexandre_tb Exp $ |
/** |
* Applette : identification |
* |
38,7 → 38,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.33 $ $Date: 2007-08-28 14:23:35 $ |
*@version $Revision: 1.34 $ $Date: 2007-09-18 08:40:54 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
47,7 → 47,13 |
// +------------------------------------------------------------------------------------------------------+ |
$GLOBALS['_GEN_commun']['info_applette_nom_fonction'] = 'afficherFormIdentification'; |
$GLOBALS['_GEN_commun']['info_applette_balise'] = '(?:<!-- '.$GLOBALS['_GEN_commun']['balise_prefixe'].'(IDENTIFICATION) -->|'. |
'\{\{[Ii]dentification\s*\}\})'; |
'\{\{[Ii]dentification'. |
'(?:\s*'. |
'(?:'. |
'(template=".*")|'. |
')'. |
')+'. |
'\s*\}\})'; |
|
/** Inclusion du fichier de configuration de cette applette.*/ |
require_once GEN_CHEMIN_APPLETTE.'identification'.GEN_SEP.'configuration'.GEN_SEP.'iden_config.inc.php'; |
119,6 → 125,19 |
*/ |
function afficherFormIdentification($tab_arguments, $_GEN_commun) |
{ |
// Extraction des arguments s il y a |
$balise = $tab_arguments[0]; |
$tab_arguments = $tab_arguments; |
unset($tab_arguments[0]); |
foreach($tab_arguments as $argument) { |
if ($argument != '') { |
$tab_parametres = explode('=', $argument, 2); |
if (isset($tab_parametres[1])) $options[$tab_parametres[0]] = trim($tab_parametres[1], '"'); |
} |
} |
if (!isset($options['template'])) { |
$options['template'] = IDEN_CHEMIN_APPLETTE.'squelettes/'.IDEN_SQUELETTE_DEFAUT; |
} |
// Initialisation de variable. |
$retour = ''; |
$objet_pear_auth =& $_GEN_commun['pear_auth']; |
153,8 → 172,23 |
$retour .= '<a id="lien_inscription" href="'.$url_erreur.'">'.IDEN_ICI.'</a>' ; |
$retour .= '</span>'."\n"; |
} |
$url_inscription_aide = ''; |
$url_page_inscription = ''; |
if (isset($InfoAuthBdd->url_inscription)) { |
$url_page_inscription = $InfoAuthBdd->url_inscription; |
} |
if (isset($InfoAuthBdd->url_inscription_aide)) { |
$url_inscription_aide = $InfoAuthBdd->url_inscription_aide; |
} |
|
ob_start(); |
include_once $options['template']; |
$retour = ob_get_contents(); |
// Arrete et detruit le buffer |
ob_end_clean(); |
|
// L'utilisateur n'est pas identifié: |
/* |
$retour .= str_repeat(' ', 16).'<form id="form_connexion" class="form_identification" action="'.$url.'" method="post">'."\n"; |
$retour .= str_repeat(' ', 16).'<fieldset>'."\n"; |
$retour .= str_repeat(' ', 20).'<legend>'.IDEN_LG_FORM_LEGEND.'</legend>'."\n"; |
192,6 → 226,7 |
} |
$retour .= str_repeat(' ', 16).'</fieldset>'."\n"; |
$retour .= str_repeat(' ', 16).'</form>'; |
*/ |
} else { |
// L'utilisateur est identifié. Nous affichons ses informations. |
// Affichage du prénom et nom d'une personne ou du nom de la structure en fonction des paramêtres |
237,6 → 272,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.33 2007-08-28 14:23:35 jp_milcent |
* Amélioration de la gestion des mots de passe perdus. |
* |
* Revision 1.32 2007-08-28 14:14:35 jp_milcent |
* Ajout de la gestion des erreurs d'identification. |
* |