Line 17... |
Line 17... |
17 |
// | |
|
17 |
// | |
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
22 |
// CVS : $Id: identification.php,v 1.11 2005-03-17 15:52:17 jpm Exp $
|
22 |
// CVS : $Id: identification.php,v 1.12 2005-03-25 14:40:51 jpm Exp $
|
23 |
/**
|
23 |
/**
|
24 |
* Applette : identification
|
24 |
* Applette : identification
|
25 |
*
|
25 |
*
|
26 |
* Génère un formulaire les champs nécessaires pour s'identifier.
|
26 |
* Génère un formulaire les champs nécessaires pour s'identifier.
|
27 |
* Nécessite :
|
27 |
* Nécessite :
|
Line 36... |
Line 36... |
36 |
//Auteur original :
|
36 |
//Auteur original :
|
37 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
37 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
38 |
//Autres auteurs :
|
38 |
//Autres auteurs :
|
39 |
*@author Aucun
|
39 |
*@author Aucun
|
40 |
*@copyright Tela-Botanica 2000-2004
|
40 |
*@copyright Tela-Botanica 2000-2004
|
41 |
*@version $Revision: 1.11 $ $Date: 2005-03-17 15:52:17 $
|
41 |
*@version $Revision: 1.12 $ $Date: 2005-03-25 14:40:51 $
|
42 |
// +------------------------------------------------------------------------------------------------------+
|
42 |
// +------------------------------------------------------------------------------------------------------+
|
43 |
*/
|
43 |
*/
|
Line 44... |
Line 44... |
44 |
|
44 |
|
45 |
// +------------------------------------------------------------------------------------------------------+
|
45 |
// +------------------------------------------------------------------------------------------------------+
|
Line 117... |
Line 117... |
117 |
* @param array tableau global de Papyrus.
|
117 |
* @param array tableau global de Papyrus.
|
118 |
* @return string formulaire de connexion ou de déconnexion.
|
118 |
* @return string formulaire de connexion ou de déconnexion.
|
119 |
*/
|
119 |
*/
|
120 |
function afficherFormIdentification($tab_arguments, &$_GEN_commun)
|
120 |
function afficherFormIdentification($tab_arguments, &$_GEN_commun)
|
121 |
{
|
121 |
{
|
122 |
// Initialisation de variable.
|
122 |
// Initialisation de variable.
|
- |
|
123 |
$retour = '';
|
123 |
$objet_pear_auth =& $GLOBALS['_GEN_commun']['pear_auth'];
|
124 |
$objet_pear_auth =& $GLOBALS['_GEN_commun']['pear_auth'];
|
124 |
$objet_pear_db =& $GLOBALS['_GEN_commun']['pear_db'];
|
125 |
$objet_pear_db =& $GLOBALS['_GEN_commun']['pear_db'];
|
125 |
$url = $GLOBALS['_GEN_commun']['url']->getURL();
|
126 |
$url = $GLOBALS['_GEN_commun']['url']->getURL();
|
126 |
// Récupération des valeurs pour le login et le mot de passe
|
127 |
// Récupération des valeurs pour le login et le mot de passe
|
127 |
$mot_de_passe = (! isset($_POST['password'])) ? '' : $_POST['password'];
|
128 |
$mot_de_passe = (! isset($_POST['password'])) ? '' : $_POST['password'];
|
Line 135... |
Line 136... |
135 |
$objet_pear_auth->login();
|
136 |
$objet_pear_auth->login();
|
136 |
}
|
137 |
}
|
137 |
}
|
138 |
}
|
Line 138... |
Line 139... |
138 |
|
139 |
|
139 |
if (! $objet_pear_auth->getAuth()) {
|
140 |
if (! $objet_pear_auth->getAuth()) {
|
- |
|
141 |
// L'utilisateur n'est pas identifié:
|
- |
|
142 |
// Si l'url de la page d'inscription est stockée dans les paramêtres, nous l'affichons
|
- |
|
143 |
if (isset($GLOBALS['_GEN_commun']['info_auth_bdd']->url_inscription)) {
|
- |
|
144 |
$retour .= '<div><a id="lien_inscription" href="'.$GLOBALS['_GEN_commun']['info_auth_bdd']->url_inscription.'">'.
|
- |
|
145 |
IDEN_LG_INSCRIPTION_URL.
|
- |
|
146 |
'</a></div>';
|
140 |
// L'utilisateur n'est pas identifié:
|
147 |
}
|
141 |
$retour = str_repeat(' ', 16).'<form id="form_connexion" class="form_identification" action="'.$url.'" method="post">'."\n";
|
148 |
$retour .= str_repeat(' ', 16).'<form id="form_connexion" class="form_identification" action="'.$url.'" method="post">'."\n";
|
142 |
$retour .= str_repeat(' ', 16).'<fieldset>'."\n";
|
149 |
$retour .= str_repeat(' ', 16).'<fieldset>'."\n";
|
143 |
$retour .= str_repeat(' ', 20).'<legend>'.'Identification'.'</legend>'."\n";
|
150 |
$retour .= str_repeat(' ', 20).'<legend>'.'Identification'.'</legend>'."\n";
|
144 |
$retour .= str_repeat(' ', 20).''."\n";
|
151 |
$retour .= str_repeat(' ', 20).''."\n";
|
145 |
$retour .= str_repeat(' ', 24).'<label for="username">'.'Courriel :'.'</label>'."\n";
|
152 |
$retour .= str_repeat(' ', 24).'<label for="username">'.'Courriel :'.'</label>'."\n";
|
Line 156... |
Line 163... |
156 |
$retour .= str_repeat(' ', 16).'</form>';
|
163 |
$retour .= str_repeat(' ', 16).'</form>';
|
157 |
} else {
|
164 |
} else {
|
158 |
// L'utilisateur est identifié. Nous affichons ses informations.
|
165 |
// L'utilisateur est identifié. Nous affichons ses informations.
|
159 |
// Affichage du prénom et nom d'une personne ou du nom de la structure en fonction des paramêtres
|
166 |
// Affichage du prénom et nom d'une personne ou du nom de la structure en fonction des paramêtres
|
160 |
// de l'annuaire utilisé
|
167 |
// de l'annuaire utilisé
|
161 |
$retour = str_repeat(' ', 16).'<p id="identification_info"><span id="identification_message">'.IDEN_LANG_MESSAGE.'</span> ';
|
168 |
$retour = str_repeat(' ', 16).'<p id="identification_info"><span id="identification_message">'.IDEN_LG_MESSAGE.'</span> ';
|
- |
|
169 |
// 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
|
162 |
if (isset($GLOBALS['_GEN_commun']['info_auth_bdd']->chp_personne_prenom) && isset($GLOBALS['_GEN_commun']['info_auth_bdd']->chp_personne_nom)) {
|
170 |
if (isset($GLOBALS['_GEN_commun']['info_auth_bdd']->chp_personne_prenom) && isset($GLOBALS['_GEN_commun']['info_auth_bdd']->chp_personne_nom)) {
|
163 |
$retour .= '<span id="identification_prenom">'.
|
171 |
$retour .= '<span id="identification_prenom">'.
|
164 |
$objet_pear_auth->getAuthData($GLOBALS['_GEN_commun']['info_auth_bdd']->chp_personne_prenom).
|
172 |
$objet_pear_auth->getAuthData($GLOBALS['_GEN_commun']['info_auth_bdd']->chp_personne_prenom).
|
165 |
'</span> '.
|
173 |
'</span> '.
|
166 |
'<span id="identification_nom">'.
|
174 |
'<span id="identification_nom">'.
|
Line 188... |
Line 196... |
188 |
|
196 |
|
189 |
|
197 |
|
190 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
198 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
- |
|
199 |
*
|
- |
|
200 |
* $Log: not supported by cvs2svn $
|
- |
|
201 |
* Revision 1.11 2005/03/17 15:52:17 jpm
|
191 |
*
|
202 |
* Suppression d'un / causant un bogue.
|
192 |
* $Log: not supported by cvs2svn $
|
203 |
*
|
193 |
* Revision 1.10 2005/03/15 14:47:14 jpm
|
204 |
* Revision 1.10 2005/03/15 14:47:14 jpm
|
194 |
* Utilisation d'un lien à la place d'un formulaire pour la déconnexion.
|
205 |
* Utilisation d'un lien à la place d'un formulaire pour la déconnexion.
|
195 |
*
|
206 |
*
|