Subversion Repositories Applications.papyrus

Rev

Rev 388 | Rev 441 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 388 Rev 399
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.15 2005-06-02 11:56:00 jpm Exp $
22
// CVS : $Id: identification.php,v 1.16 2005-06-09 17:06:28 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.15 $ $Date: 2005-06-02 11:56:00 $
41
*@version       $Revision: 1.16 $ $Date: 2005-06-09 17:06:28 $
42
// +------------------------------------------------------------------------------------------------------+
42
// +------------------------------------------------------------------------------------------------------+
43
*/
43
*/
Line 44... Line 44...
44
 
44
 
45
// +------------------------------------------------------------------------------------------------------+
45
// +------------------------------------------------------------------------------------------------------+
Line 72... Line 72...
72
        if (isset ($chemin_spip) && isset ($coauth) && $coauth == $auth_courante['gsab_id_auth_bdd']) {
72
        if (isset ($chemin_spip) && isset ($coauth) && $coauth == $auth_courante['gsab_id_auth_bdd']) {
73
            // On place un cookie avec une duré dépassée
73
            // On place un cookie avec une duré dépassée
74
            setcookie("spip_session", $id_session, time() - 3600*24, "/$chemin_cookie_spip/") ;
74
            setcookie("spip_session", $id_session, time() - 3600*24, "/$chemin_cookie_spip/") ;
75
            setcookie("spip_admin", "@".$login, time() -3600*24, "/$chemin_cookie_spip/") ;
75
            setcookie("spip_admin", "@".$login, time() -3600*24, "/$chemin_cookie_spip/") ;
Line 76... Line 76...
76
    
76
    
77
            $dirname = $GLOBALS['flag_ecrire'] ? "data/" : "ecrire/data/";
77
            $dirname = $GLOBALS['flag_ecrire'] ? 'data/' : 'ecrire/data/';
78
            $dirname = $chemin_spip."/".$dirname ;
78
            $dirname = $chemin_spip."/".$dirname ;
79
             // ne pas se zapper soi-meme
79
             // ne pas se zapper soi-meme
80
            if ($s = $GLOBALS['spip_session'])
80
            if ($s = $GLOBALS['spip_session'])
81
                   $fichier_session = fichier_session($s, lire_meta('alea_ephemere'));
81
                   $fichier_session = fichier_session($s, lire_meta('alea_ephemere'));
82
                $fichier_session = $chemin_spip."/ecrire/".$fichier_session ;
82
                $fichier_session = $chemin_spip.'/ecrire/'.$fichier_session ;
83
            $dir = opendir($dirname);
83
            $dir = opendir($dirname);
84
            $t = time();
84
            $t = time();
85
            while(($item = readdir($dir)) != '') {
85
            while(($item = readdir($dir)) != '') {
86
                $chemin = "$dirname$item";
86
                $chemin = "$dirname$item";
Line 139... Line 139...
139
    
139
    
140
    if (! $objet_pear_auth->getAuth()) {
140
    if (! $objet_pear_auth->getAuth()) {
141
        // L'utilisateur n'est pas identifié:
141
        // L'utilisateur n'est pas identifié:
142
        $retour .= str_repeat(' ', 16).'<form id="form_connexion" class="form_identification" action="'.$url.'" method="post">'."\n";
142
        $retour .= str_repeat(' ', 16).'<form id="form_connexion" class="form_identification" action="'.$url.'" method="post">'."\n";
143
        $retour .= str_repeat(' ', 16).'<fieldset>'."\n";
143
        $retour .= str_repeat(' ', 16).'<fieldset>'."\n";
144
        $retour .= str_repeat(' ', 20).'<legend>'.'Identification'.'</legend>'."\n";
144
        $retour .= str_repeat(' ', 20).'<legend>'.IDEN_LG_FORM_LEGEND.'</legend>'."\n";
145
        $retour .= str_repeat(' ', 20).''."\n";
145
        $retour .= str_repeat(' ', 20).''."\n";
146
        $retour .= str_repeat(' ', 24).'<label for="username">'.'Courriel :'.'</label>'."\n";
146
        $retour .= str_repeat(' ', 24).'<label for="username">'.IDEN_LG_FORM_LABEL_COURRIEL.'</label>'."\n";
147
        $retour .= str_repeat(' ', 24).'<input type="text" size="12" id="username" name="username" maxlength="80" tabindex="1" value="'.'courriel'.'" />'."\n";
147
        $retour .= str_repeat(' ', 24).'<input type="text" size="12" id="username" name="username" maxlength="80" tabindex="1" value="'.IDEN_LG_FORM_VALUE_COURRIEL.'" />'."\n";
148
        $retour .= str_repeat(' ', 20).''."\n";
148
        $retour .= str_repeat(' ', 20).''."\n";
149
        $retour .= str_repeat(' ', 20).''."\n";
149
        $retour .= str_repeat(' ', 20).''."\n";
150
        $retour .= str_repeat(' ', 24).'<label for="password">'.'Mot de passe :'.'</label>'."\n";
150
        $retour .= str_repeat(' ', 24).'<label for="password">'.IDEN_LG_FORM_LABEL_MDP.'</label>'."\n";
151
        $retour .= str_repeat(' ', 24).'<input type="password" size="12" id="password" name="password" maxlength="80" tabindex="2" value="'.'mot de passe'.'" />'."\n";
151
        $retour .= str_repeat(' ', 24).'<input type="password" size="12" id="password" name="password" maxlength="80" tabindex="2" value="'.IDEN_LG_FORM_VALUE_MDP.'" />'."\n";
152
        $retour .= str_repeat(' ', 20).''."\n";
152
        $retour .= str_repeat(' ', 20).''."\n";
153
        $retour .= str_repeat(' ', 20).''."\n";
153
        $retour .= str_repeat(' ', 20).''."\n";
154
        $retour .= str_repeat(' ', 24).'<input type="submit" id="connexion" name="connexion" tabindex="3" value="'.'ok'.'" />'."\n";
154
        $retour .= str_repeat(' ', 24).'<input type="submit" id="connexion" name="connexion" tabindex="3" value="'.IDEN_LG_FORM_VALUE_SUBMIT.'" />'."\n";
155
        $retour .= str_repeat(' ', 20).''."\n";
155
        $retour .= str_repeat(' ', 20).''."\n";
156
        // Si l'url de la page d'inscription est stockée dans les paramêtres, nous l'affichons
156
        // Si l'url de la page d'inscription est stockée dans les paramêtres, nous l'affichons
157
        if (isset($GLOBALS['_GEN_commun']['info_auth_bdd']->url_inscription)) {
157
        if (isset($GLOBALS['_GEN_commun']['info_auth_bdd']->url_inscription)) {
158
            $retour .=  '<p><a id="lien_inscription" href="'.$GLOBALS['_GEN_commun']['info_auth_bdd']->url_inscription.'">'.
158
            $retour .=  '<p><a id="lien_inscription" href="'.$GLOBALS['_GEN_commun']['info_auth_bdd']->url_inscription.'">'.
Line 187... Line 187...
187
                        $GLOBALS['_GEN_commun']['info_auth_bdd']->url_inscription_modif.'">'.
187
                        $GLOBALS['_GEN_commun']['info_auth_bdd']->url_inscription_modif.'">'.
188
                        IDEN_LG_INSCRIPTION_URL_MODIF.
188
                        IDEN_LG_INSCRIPTION_URL_MODIF.
189
                        '</a>'."\n";
189
                        '</a>'."\n";
190
        }
190
        }
191
        // Affichage du bouton de déconnexion
191
        // Affichage du bouton de déconnexion
192
        $retour .= str_repeat(' ', 20).'<a id="deconnexion" href="'.$url.'&amp;logout=1">'.'Déconnexion'.'</a>'."\n";
192
        $retour .= str_repeat(' ', 20).'<a id="deconnexion" href="'.$url.'&amp;logout=1">'.IDEN_LG_DECONNEXION.'</a>'."\n";
193
        $retour .= str_repeat(' ', 16).'</p>'."\n";
193
        $retour .= str_repeat(' ', 16).'</p>'."\n";
194
    }
194
    }
195
    return $retour;
195
    return $retour;
196
}
196
}
Line 202... Line 202...
202
 
202
 
203
 
203
 
204
/* +--Fin du code ----------------------------------------------------------------------------------------+
204
/* +--Fin du code ----------------------------------------------------------------------------------------+
-
 
205
*
-
 
206
* $Log: not supported by cvs2svn $
-
 
207
* Revision 1.15  2005/06/02 11:56:00  jpm
205
*
208
* Modification de l'affichage de l'identification.
206
* $Log: not supported by cvs2svn $
209
*
207
* Revision 1.14  2005/05/19 14:00:58  jpm
210
* Revision 1.14  2005/05/19 14:00:58  jpm
208
* Déplacement du menu de modif de l'inscription.
211
* Déplacement du menu de modif de l'inscription.
209
*
212
*