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.33 2007-08-28 14:23:35 jp_milcent Exp $
|
22 |
// CVS : $Id: identification.php,v 1.34 2007-09-18 08:40:54 alexandre_tb 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.33 $ $Date: 2007-08-28 14:23:35 $
|
41 |
*@version $Revision: 1.34 $ $Date: 2007-09-18 08:40:54 $
|
42 |
// +------------------------------------------------------------------------------------------------------+
|
42 |
// +------------------------------------------------------------------------------------------------------+
|
43 |
*/
|
43 |
*/
|
Line 44... |
Line 44... |
44 |
|
44 |
|
45 |
// +------------------------------------------------------------------------------------------------------+
|
45 |
// +------------------------------------------------------------------------------------------------------+
|
46 |
// | ENTÊTE du PROGRAMME |
|
46 |
// | ENTÊTE du PROGRAMME |
|
47 |
// +------------------------------------------------------------------------------------------------------+
|
47 |
// +------------------------------------------------------------------------------------------------------+
|
48 |
$GLOBALS['_GEN_commun']['info_applette_nom_fonction'] = 'afficherFormIdentification';
|
48 |
$GLOBALS['_GEN_commun']['info_applette_nom_fonction'] = 'afficherFormIdentification';
|
49 |
$GLOBALS['_GEN_commun']['info_applette_balise'] = '(?:<!-- '.$GLOBALS['_GEN_commun']['balise_prefixe'].'(IDENTIFICATION) -->|'.
|
49 |
$GLOBALS['_GEN_commun']['info_applette_balise'] = '(?:<!-- '.$GLOBALS['_GEN_commun']['balise_prefixe'].'(IDENTIFICATION) -->|'.
|
- |
|
50 |
'\{\{[Ii]dentification'.
|
- |
|
51 |
'(?:\s*'.
|
- |
|
52 |
'(?:'.
|
- |
|
53 |
'(template=".*")|'.
|
- |
|
54 |
')'.
|
- |
|
55 |
')+'.
|
Line 50... |
Line 56... |
50 |
'\{\{[Ii]dentification\s*\}\})';
|
56 |
'\s*\}\})';
|
51 |
|
57 |
|
Line 52... |
Line 58... |
52 |
/** Inclusion du fichier de configuration de cette applette.*/
|
58 |
/** Inclusion du fichier de configuration de cette applette.*/
|
Line 117... |
Line 123... |
117 |
* @param array tableau global de Papyrus.
|
123 |
* @param array tableau global de Papyrus.
|
118 |
* @return string formulaire de connexion ou de déconnexion.
|
124 |
* @return string formulaire de connexion ou de déconnexion.
|
119 |
*/
|
125 |
*/
|
120 |
function afficherFormIdentification($tab_arguments, $_GEN_commun)
|
126 |
function afficherFormIdentification($tab_arguments, $_GEN_commun)
|
121 |
{
|
127 |
{
|
- |
|
128 |
// Extraction des arguments s il y a
|
- |
|
129 |
$balise = $tab_arguments[0];
|
- |
|
130 |
$tab_arguments = $tab_arguments;
|
- |
|
131 |
unset($tab_arguments[0]);
|
- |
|
132 |
foreach($tab_arguments as $argument) {
|
- |
|
133 |
if ($argument != '') {
|
- |
|
134 |
$tab_parametres = explode('=', $argument, 2);
|
- |
|
135 |
if (isset($tab_parametres[1])) $options[$tab_parametres[0]] = trim($tab_parametres[1], '"');
|
- |
|
136 |
}
|
- |
|
137 |
}
|
- |
|
138 |
if (!isset($options['template'])) {
|
- |
|
139 |
$options['template'] = IDEN_CHEMIN_APPLETTE.'squelettes/'.IDEN_SQUELETTE_DEFAUT;
|
- |
|
140 |
}
|
122 |
// Initialisation de variable.
|
141 |
// Initialisation de variable.
|
123 |
$retour = '';
|
142 |
$retour = '';
|
124 |
$objet_pear_auth =& $_GEN_commun['pear_auth'];
|
143 |
$objet_pear_auth =& $_GEN_commun['pear_auth'];
|
125 |
$objet_pear_db =& $_GEN_commun['pear_db'];
|
144 |
$objet_pear_db =& $_GEN_commun['pear_db'];
|
126 |
$InfoAuthBdd =& $_GEN_commun['info_auth_bdd'];
|
145 |
$InfoAuthBdd =& $_GEN_commun['info_auth_bdd'];
|
Line 151... |
Line 170... |
151 |
$url_erreur = $InfoAuthBdd->url_inscription;
|
170 |
$url_erreur = $InfoAuthBdd->url_inscription;
|
152 |
}
|
171 |
}
|
153 |
$retour .= '<a id="lien_inscription" href="'.$url_erreur.'">'.IDEN_ICI.'</a>' ;
|
172 |
$retour .= '<a id="lien_inscription" href="'.$url_erreur.'">'.IDEN_ICI.'</a>' ;
|
154 |
$retour .= '</span>'."\n";
|
173 |
$retour .= '</span>'."\n";
|
155 |
}
|
174 |
}
|
- |
|
175 |
$url_inscription_aide = '';
|
- |
|
176 |
$url_page_inscription = '';
|
- |
|
177 |
if (isset($InfoAuthBdd->url_inscription)) {
|
- |
|
178 |
$url_page_inscription = $InfoAuthBdd->url_inscription;
|
- |
|
179 |
}
|
- |
|
180 |
if (isset($InfoAuthBdd->url_inscription_aide)) {
|
- |
|
181 |
$url_inscription_aide = $InfoAuthBdd->url_inscription_aide;
|
- |
|
182 |
}
|
- |
|
183 |
|
- |
|
184 |
ob_start();
|
- |
|
185 |
include_once $options['template'];
|
- |
|
186 |
$retour = ob_get_contents();
|
- |
|
187 |
// Arrete et detruit le buffer
|
- |
|
188 |
ob_end_clean();
|
Line 156... |
Line 189... |
156 |
|
189 |
|
- |
|
190 |
// L'utilisateur n'est pas identifié:
|
157 |
// L'utilisateur n'est pas identifié:
|
191 |
/*
|
158 |
$retour .= str_repeat(' ', 16).'<form id="form_connexion" class="form_identification" action="'.$url.'" method="post">'."\n";
|
192 |
$retour .= str_repeat(' ', 16).'<form id="form_connexion" class="form_identification" action="'.$url.'" method="post">'."\n";
|
159 |
$retour .= str_repeat(' ', 16).'<fieldset>'."\n";
|
193 |
$retour .= str_repeat(' ', 16).'<fieldset>'."\n";
|
160 |
$retour .= str_repeat(' ', 20).'<legend>'.IDEN_LG_FORM_LEGEND.'</legend>'."\n";
|
194 |
$retour .= str_repeat(' ', 20).'<legend>'.IDEN_LG_FORM_LEGEND.'</legend>'."\n";
|
161 |
$retour .= str_repeat(' ', 20).''."\n";
|
195 |
$retour .= str_repeat(' ', 20).''."\n";
|
Line 190... |
Line 224... |
190 |
}
|
224 |
}
|
191 |
$retour .= '</p>'."\n";
|
225 |
$retour .= '</p>'."\n";
|
192 |
}
|
226 |
}
|
193 |
$retour .= str_repeat(' ', 16).'</fieldset>'."\n";
|
227 |
$retour .= str_repeat(' ', 16).'</fieldset>'."\n";
|
194 |
$retour .= str_repeat(' ', 16).'</form>';
|
228 |
$retour .= str_repeat(' ', 16).'</form>';
|
- |
|
229 |
*/
|
195 |
} else {
|
230 |
} else {
|
196 |
// L'utilisateur est identifié. Nous affichons ses informations.
|
231 |
// L'utilisateur est identifié. Nous affichons ses informations.
|
197 |
// Affichage du prénom et nom d'une personne ou du nom de la structure en fonction des paramêtres
|
232 |
// Affichage du prénom et nom d'une personne ou du nom de la structure en fonction des paramêtres
|
198 |
// de l'annuaire utilisé
|
233 |
// de l'annuaire utilisé
|
199 |
$retour .= str_repeat(' ', 16).'<p id="identification_info"><span id="identification_message">'.IDEN_LG_MESSAGE.'</span> ';
|
234 |
$retour .= str_repeat(' ', 16).'<p id="identification_info"><span id="identification_message">'.IDEN_LG_MESSAGE.'</span> ';
|
Line 235... |
Line 270... |
235 |
|
270 |
|
236 |
|
271 |
|
237 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
272 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
- |
|
273 |
*
|
- |
|
274 |
* $Log: not supported by cvs2svn $
|
- |
|
275 |
* Revision 1.33 2007-08-28 14:23:35 jp_milcent
|
238 |
*
|
276 |
* Amélioration de la gestion des mots de passe perdus.
|
239 |
* $Log: not supported by cvs2svn $
|
277 |
*
|
240 |
* Revision 1.32 2007-08-28 14:14:35 jp_milcent
|
278 |
* Revision 1.32 2007-08-28 14:14:35 jp_milcent
|
241 |
* Ajout de la gestion des erreurs d'identification.
|
279 |
* Ajout de la gestion des erreurs d'identification.
|
242 |
*
|
280 |
*
|