Line 1... |
Line 1... |
1 |
<?php
|
1 |
<?php
|
2 |
//vim: set expandtab tabstop=4 shiftwidth=4:
|
2 |
//vim: set expandtab tabstop=4 shiftwidth=4:
|
3 |
// +------------------------------------------------------------------------------------------------------+
|
3 |
// +------------------------------------------------------------------------------------------------------+
|
4 |
// | PHP version 4.1 |
|
4 |
// | PHP version 4.1 |
|
5 |
// +------------------------------------------------------------------------------------------------------+
|
5 |
// +------------------------------------------------------------------------------------------------------+
|
6 |
// | Copyright (C) 2003 Tela Botanica (accueil@tela-botanica.org) |
|
6 |
// | Copyright (C) 2003 Tela Botanica (accueil@tela-botanica.org) |
|
7 |
// +------------------------------------------------------------------------------------------------------+
|
7 |
// +------------------------------------------------------------------------------------------------------+
|
8 |
// | |
|
8 |
// | |
|
9 |
// | This library is free software; you can redistribute it and/or |
|
9 |
// | This library is free software; you can redistribute it and/or |
|
10 |
// | modify it under the terms of the GNU Lesser General Public |
|
10 |
// | modify it under the terms of the GNU Lesser General Public |
|
11 |
// | License as published by the Free Software Foundation; either |
|
11 |
// | License as published by the Free Software Foundation; either |
|
12 |
// | version 2.1 of the License, or (at your option) any later version. |
|
12 |
// | version 2.1 of the License, or (at your option) any later version. |
|
13 |
// | |
|
13 |
// | |
|
14 |
// | This library is distributed in the hope that it will be useful, |
|
14 |
// | This library is distributed in the hope that it will be useful, |
|
15 |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
16 |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
17 |
// | Lesser General Public License for more details. |
|
17 |
// | Lesser General Public License for more details. |
|
18 |
// | |
|
18 |
// | |
|
19 |
// | You should have received a copy of the GNU Lesser General Public |
|
19 |
// | You should have received a copy of the GNU Lesser General Public |
|
20 |
// | License along with this library; if not, write to the Free Software |
|
20 |
// | License along with this library; if not, write to the Free Software |
|
21 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
21 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
22 |
// | |
|
22 |
// | |
|
23 |
// +------------------------------------------------------------------------------------------------------+
|
23 |
// +------------------------------------------------------------------------------------------------------+
|
24 |
// CVS : $Id: pap_initialise_auth.inc.php,v 1.7 2004-12-07 10:26:27 jpm Exp $
|
24 |
// CVS : $Id: pap_initialise_auth.inc.php,v 1.8 2004-12-07 11:36:22 alex Exp $
|
25 |
/**
|
25 |
/**
|
26 |
* Initialisation de l'authentification.
|
26 |
* Initialisation de l'authentification.
|
27 |
*
|
27 |
*
|
28 |
* Suite à la recherche des informations depuis la base de données nous initialisons
|
28 |
* Suite à la recherche des informations depuis la base de données nous initialisons
|
29 |
* l'authentification des utilisateurs si le site l'utilise.
|
29 |
* l'authentification des utilisateurs si le site l'utilise.
|
30 |
* La page contient le code initialisant l'objet PEAR créé par Net_URL contenant l'url
|
30 |
* La page contient le code initialisant l'objet PEAR créé par Net_URL contenant l'url
|
31 |
* courante demandée par l'utilisateur.
|
31 |
* courante demandée par l'utilisateur.
|
32 |
* Nous initialisons aussi l'identification de l'utilisateur et le démarage de la session.
|
32 |
* Nous initialisons aussi l'identification de l'utilisateur et le démarage de la session.
|
33 |
*
|
33 |
*
|
34 |
*@package Papyrus
|
34 |
*@package Papyrus
|
35 |
//Auteur original :
|
35 |
//Auteur original :
|
36 |
*@author Alexandre GRANIER <alex@tela-botanica.org>
|
36 |
*@author Alexandre GRANIER <alex@tela-botanica.org>
|
37 |
//Autres auteurs :
|
37 |
//Autres auteurs :
|
38 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
38 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
39 |
*@copyright Tela-Botanica 2000-2004
|
39 |
*@copyright Tela-Botanica 2000-2004
|
40 |
*@version $Revision: 1.7 $ $Date: 2004-12-07 10:26:27 $
|
40 |
*@version $Revision: 1.8 $ $Date: 2004-12-07 11:36:22 $
|
41 |
// +------------------------------------------------------------------------------------------------------+
|
41 |
// +------------------------------------------------------------------------------------------------------+
|
42 |
*/
|
42 |
*/
|
43 |
|
43 |
|
44 |
// +------------------------------------------------------------------------------------------------------+
|
44 |
// +------------------------------------------------------------------------------------------------------+
|
45 |
// | ENTÊTE du PROGRAMME |
|
45 |
// | ENTÊTE du PROGRAMME |
|
46 |
// +------------------------------------------------------------------------------------------------------+
|
46 |
// +------------------------------------------------------------------------------------------------------+
|
47 |
|
47 |
|
48 |
/** <br> Inclusion de l'authentification de PEAR.*/
|
48 |
/** <br> Inclusion de l'authentification de PEAR.*/
|
49 |
include_once 'Auth/Auth.php';
|
49 |
include_once 'Auth/Auth.php';
|
50 |
|
50 |
|
51 |
/** Inclusion de la bibliothèque de fonctions d'identification.
|
51 |
/** Inclusion de la bibliothèque de fonctions d'identification.
|
52 |
* Contient entre autre la fonction founissant le formulaire d'identification pour Auth de Pear.
|
52 |
* Contient entre autre la fonction founissant le formulaire d'identification pour Auth de Pear.
|
53 |
* Cette inclusion n'a lieu que si le site utilise l'identification.
|
53 |
* Cette inclusion n'a lieu que si le site utilise l'identification.
|
54 |
*/
|
54 |
*/
|
55 |
include_once GEN_CHEMIN_PAP.'bibliotheque/fonctions/pap_identification.fonct.php' ;
|
55 |
include_once GEN_CHEMIN_PAP.'bibliotheque/fonctions/pap_identification.fonct.php' ;
|
- |
|
56 |
include_once GEN_CHEMIN_PAP.'bibliotheque/fonctions/pap_site.fonct.php' ;
|
56 |
|
57 |
|
57 |
// +------------------------------------------------------------------------------------------------------+
|
58 |
// +------------------------------------------------------------------------------------------------------+
|
58 |
// | CORPS du PROGRAMME |
|
59 |
// | CORPS du PROGRAMME |
|
59 |
// +------------------------------------------------------------------------------------------------------+
|
60 |
// +------------------------------------------------------------------------------------------------------+
|
60 |
|
61 |
|
61 |
// +------------------------------------------------------------------------------------------------------+
|
62 |
// +------------------------------------------------------------------------------------------------------+
|
62 |
// Gestion de l'identification des utilisateurs et des sessions
|
63 |
// Gestion de l'identification des utilisateurs et des sessions
|
Line 63... |
Line 64... |
63 |
|
64 |
|
64 |
// +------------------------------------------------------------------------------------------------------+
|
65 |
// +------------------------------------------------------------------------------------------------------+
|
Line 65... |
Line 66... |
65 |
// Récupération des informations d'identification pour le site courant
|
66 |
// Récupération des informations d'identification pour le site courant
|
66 |
|
67 |
|
67 |
// Récupération des informations sur le site
|
68 |
// Récupération des informations sur le site
|
68 |
$requete_auth = 'SELECT gen_site_auth.*, gs_id_site '.
|
69 |
$requete_auth = 'SELECT gen_site_auth.*, gs_id_site '.
|
69 |
'FROM gen_site_auth, gen_site '.
|
70 |
'FROM gen_site_auth, gen_site '.
|
Line 70... |
Line 71... |
70 |
'WHERE gs_ce_auth <> 0 '
|
71 |
'WHERE gs_ce_auth <> 0 '.
|
71 |
'AND gs_ce_auth = gsa_id_auth';
|
72 |
'AND gs_ce_auth = gsa_id_auth';
|
72 |
|
73 |
|
Line 77... |
Line 78... |
77 |
|
78 |
|
78 |
while ($ligne_auth = $resultat_auth->fetchRow(DB_FETCHMODE_OBJECT)) {
|
79 |
while ($ligne_auth = $resultat_auth->fetchRow(DB_FETCHMODE_OBJECT)) {
|
79 |
// Ajout des valeurs communes aux différents type d'auth
|
80 |
// Ajout des valeurs communes aux différents type d'auth
|
80 |
$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth]['gsa_nom'] = $ligne_auth->gsa_nom;
|
81 |
$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth]['gsa_nom'] = $ligne_auth->gsa_nom;
|
- |
|
82 |
$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth]['gsa_abreviation'] = $ligne_auth->gsa_abreviation;
|
Line 81... |
Line 83... |
81 |
$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth]['gsa_abreviation'] = $ligne_auth->gsa_abreviation;
|
83 |
$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth]['gsa_ce_type_auth'] = $ligne_auth->gsa_ce_type_auth;
|
82 |
|
84 |
|
83 |
if ($ligne_auth->gsa_id_auth == $_GEN_commun['info_site']->gs_ce_auth) {
|
85 |
if ($ligne_auth->gsa_id_auth == $_GEN_commun['info_site']->gs_ce_auth) {
|
Line 92... |
Line 94... |
92 |
|
94 |
|
93 |
$resultat_auth_bdd = $db->query($requete_auth_bdd);
|
95 |
$resultat_auth_bdd = $db->query($requete_auth_bdd);
|
94 |
(DB::isError($resultat_auth_bdd))
|
96 |
(DB::isError($resultat_auth_bdd))
|
95 |
? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat_auth_bdd->getMessage(), $requete_auth_bdd))
|
97 |
? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat_auth_bdd->getMessage(), $requete_auth_bdd))
|
- |
|
98 |
: '';
|
96 |
: '';
|
99 |
$tab_auth_bdd = $resultat_auth_bdd->fetchRow(DB_FETCHMODE_OBJECT) ;
|
97 |
if ($ligne_auth->gsa_id_auth == $_GEN_commun['info_site']->gs_ce_auth) {
|
100 |
if ($ligne_auth->gsa_id_auth == $_GEN_commun['info_site']->gs_ce_auth) {
|
98 |
$_GEN_commun['info_auth_bdd'] = $resultat_auth_bdd->fetchRow(DB_FETCHMODE_OBJECT);
|
101 |
$_GEN_commun['info_auth_bdd'] = $tab_auth_bdd ;
|
99 |
}
|
102 |
}
|
100 |
$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth] = $resultat_auth_bdd->fetchRow(DB_FETCHMODE_ASSOC);
|
103 |
$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth]=array_merge($GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth], $tab_auth_bdd);
|
Line 101... |
Line 104... |
101 |
$resultat_auth_bdd->free();
|
104 |
$resultat_auth_bdd->free();
|
102 |
|
105 |
|
103 |
} else if ($ligne_auth->gsa_ce_auth_ldap != 0) {
|
106 |
} else if ($ligne_auth->gsa_ce_auth_ldap != 0) {
|
Line 108... |
Line 111... |
108 |
|
111 |
|
109 |
$resultat_auth_ldap = $db->query($requete_auth_ldap);
|
112 |
$resultat_auth_ldap = $db->query($requete_auth_ldap);
|
110 |
(DB::isError($resultat_auth_ldap))
|
113 |
(DB::isError($resultat_auth_ldap))
|
111 |
? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat_auth_ldap->getMessage(), $requete_auth_ldap))
|
114 |
? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat_auth_ldap->getMessage(), $requete_auth_ldap))
|
- |
|
115 |
: '';
|
112 |
: '';
|
116 |
$tab_auth_ldap = $resultat_auth_ldap->fetchRow(DB_FETCHMODE_OBJECT);
|
113 |
if ($ligne_auth->gsa_id_auth == $_GEN_commun['info_site']->gs_ce_auth) {
|
117 |
if ($ligne_auth->gsa_id_auth == $_GEN_commun['info_site']->gs_ce_auth) {
|
114 |
$_GEN_commun['info_auth_ldap'] = $resultat_auth_ldap->fetchRow(DB_FETCHMODE_OBJECT);
|
118 |
$_GEN_commun['info_auth_ldap'] = $tab_auth_ldap;
|
115 |
}
|
119 |
}
|
116 |
$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth] = $resultat_auth_ldap->fetchRow(DB_FETCHMODE_ASSOC);
|
120 |
$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth] = array_merge($GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth], $tab_auth_ldap);
|
117 |
$resultat_auth_ldap->free();
|
121 |
$resultat_auth_ldap->free();
|
118 |
} else {
|
122 |
} else {
|
119 |
die('ERREUR Papyrus : impossible de trouver les information authentification. <br />'.
|
123 |
die('ERREUR Papyrus : impossible de trouver les information authentification. <br />'.
|
120 |
'Identifiant auth : '.$ligne_auth->gs_ce_auth.'<br />'.
|
124 |
'Identifiant auth : '.$ligne_auth->gs_ce_auth.'<br />'.
|
121 |
'Ligne n° : '. __LINE__ .'<br />'.
|
125 |
'Ligne n° : '. __LINE__ .'<br />'.
|
122 |
'Fichier : '. __FILE__ );
|
126 |
'Fichier : '. __FILE__ );
|
123 |
}
|
- |
|
124 |
// On teste le type d'authentification
|
- |
|
125 |
$requete = "SELECT * FROM gen_site_relation WHERE gsr_id_site_01=$ligne_auth->gs_id_site and gsr_id_site_01=gsr_id_site_02 and gsr_valeur=" ;
|
- |
|
Line -... |
Line 127... |
- |
|
127 |
}
|
- |
|
128 |
|
- |
|
129 |
// On teste le type d'authentification
|
- |
|
130 |
$tab_type_site = GEN_retournerTableauTypeSiteExterne($db);
|
- |
|
131 |
$types_site = '';
|
- |
|
132 |
foreach ($tab_type_site as $val) {
|
- |
|
133 |
$types_site .= $val['id'].', ';
|
- |
|
134 |
}
|
- |
|
135 |
$types_site = substr($types_site, 0, -2);
|
- |
|
136 |
$requete = 'SELECT gsr_id_valeur '.
|
- |
|
137 |
'FROM gen_site_relation '.
|
- |
|
138 |
'WHERE gsr_id_site_01 = '.$ligne_auth->gs_id_site.' '.
|
- |
|
139 |
'AND gsr_id_site_01 = gsr_id_site_02 '.
|
- |
|
140 |
'AND gsr_id_valeur IN ('.$types_site.')';
|
- |
|
141 |
$type_site_externe = $db->getOne($requete);
|
- |
|
142 |
(DB::isError($type_site_externe))
|
- |
|
143 |
? die(BOG_afficherErreurSql(__FILE__, __LINE__, $type_site_externe->getMessage(), $requete))
|
- |
|
144 |
: '';
|
- |
|
145 |
// Type du site de l'authentification
|
- |
|
146 |
if ($type_site_externe != '') {
|
126 |
$resultat = $db->query ($requete) ;
|
147 |
$GLOBALS['_PAPYRUS_']['auth'][$ligne_auth->gsa_id_auth]['type_site_externe'] = $type_site_externe;
|
127 |
|
148 |
}
|
Line 128... |
Line -... |
128 |
}
|
- |
|
129 |
$resultat_auth->free();
|
149 |
}
|
- |
|
150 |
$resultat_auth->free();
|
130 |
|
151 |
|
131 |
foreach ($GLOBALS['_PAPYRUS_']['auth'] as $cle => $auth_courrante) {
|
152 |
// Nour regardons à quel type d'identification nous avons à faire:
|
132 |
// Nour regardons à quel type d'identification nous avons à faire:
|
153 |
$auth_courante = $GLOBALS['_PAPYRUS_']['auth'][$_GEN_commun['info_site']->gs_ce_auth] ;
|
133 |
if ($_GEN_commun['info_auth']->gsa_ce_type_auth == 1) {
|
154 |
if ($auth_courante['gsa_ce_type_auth'] == 1) {
|
134 |
// Authentification via une base de données
|
155 |
// Authentification via une base de données
|
135 |
$param_bdd = array ('dsn' => $auth_courrante['gsab_dsn'],
|
156 |
$param_bdd = array ('dsn' => $auth_courante['gsab_dsn'],
|
136 |
'table' => $auth_courrante['gsab_nom_table'],
|
157 |
'table' => $auth_courante['gsab_nom_table'],
|
137 |
'usernamecol' => $auth_courrante['gsab_nom_champ_login'],
|
158 |
'usernamecol' => $auth_courante['gsab_nom_champ_login'],
|
138 |
'passwordcol' => $auth_courrante['gsab_nom_champ_mdp'],
|
159 |
'passwordcol' => $auth_courante['gsab_nom_champ_mdp'],
|
139 |
'cryptType' => $auth_courrante['gsab_cryptage_mdp'],
|
- |
|
140 |
'db_fields' => '*');
|
160 |
'cryptType' => $auth_courante['gsab_cryptage_mdp'],
|
141 |
// L'authentification courrante
|
161 |
'db_fields' => '*');
|
142 |
if ($ligne_auth->gsa_id_auth == $_GEN_commun['info_site']->gs_ce_auth) {
|
162 |
// L'authentification courrante
|
143 |
$_GEN_commun['pear_auth'] = new Auth('DB', $param_bdd, 'GEN_afficherInfoIdentification', 1);
|
163 |
$_GEN_commun['pear_auth'] = new Auth('DB', $param_bdd, 'GEN_afficherInfoIdentification', 1);
|
144 |
}
|
164 |
|
145 |
} else if ($_GEN_commun['info_auth']->gsa_ce_type_auth == 2) {
|
165 |
} else if ($auth_courante['gsa_ce_type_auth'] == 2) {
|
146 |
// Authentification via LDAP
|
166 |
// Authentification via LDAP
|
147 |
$param_ldap = array ( 'host' => $_GEN_commun['info_auth_ldap']->gsal_serveur,
|
167 |
$param_ldap = array ( 'host' => $auth_courante['gsal_serveur'],
|
148 |
'port' => $_GEN_commun['info_auth_ldap']->gsal_port,
|
168 |
'port' => $auth_courante['gsal_port'],
|
149 |
'basedn' => $_GEN_commun['info_auth_ldap']->gsal_base_dn,
|
169 |
'basedn' => $auth_courante['gsal_base_dn'],
|
150 |
'userattr' => $_GEN_commun['info_auth_ldap']->gsal_uid);
|
170 |
'userattr' => $auth_courante['gsal_uid']);
|
151 |
$_GEN_commun['pear_auth'] = new Auth('LDAP', $param_ldap, 'GEN_afficherInfoIdentification', 1);
|
171 |
$_GEN_commun['pear_auth'] = new Auth('LDAP', $param_ldap, 'GEN_afficherInfoIdentification', 1);
|
152 |
} else {
|
172 |
} else {
|
153 |
die('ERREUR Génésia : type identification introuvable. <br />'.
|
173 |
die('ERREUR Papyrus : type identification introuvable. <br />'.
|
154 |
'Type identification : '.$_GEN_commun['info_auth']->gsa_ce_type_auth.'<br />'.
|
174 |
'Type identification : '.$auth_courante['gsa_ce_type_auth'].'<br />'.
|
155 |
'Ligne n° : '. __LINE__ . '<br />'.
|
175 |
'Ligne n° : '. __LINE__ . '<br />'.
|
156 |
'Fichier : '. __FILE__ . '<br />');
|
176 |
'Fichier : '. __FILE__ . '<br />');
|
157 |
}
|
177 |
}
|
158 |
|
178 |
|
159 |
$_GEN_commun['pear_auth']->setSessionname( 'gen_'.$_GEN_commun['info_auth']->gsa_abreviation);
|
179 |
$_GEN_commun['pear_auth']->setSessionname( 'gen_'.$_GEN_commun['info_auth']->gsa_abreviation);
|
160 |
|
180 |
|
- |
|
181 |
$_GEN_commun['pear_auth']->setExpire(3600 * 24 * 30 * 6);// 6 mois
|
- |
|
182 |
|
- |
|
183 |
$_GEN_commun['pear_auth']->start();
|
- |
|
184 |
|
- |
|
185 |
// Recherche des paramètres de SPIP
|
- |
|
186 |
foreach ($GLOBALS['_PAPYRUS_']['auth'] as $cle => $valeur) {
|
- |
|
187 |
if (isset($valeur['type_site_externe']) && $valeur['type_site_externe'] == 200) { // 200 = site de type "SPIP"
|
- |
|
188 |
$tab_parametre = explode (" ", $valeur['gsab_parametres']) ;
|
- |
|
189 |
foreach ($tab_parametre as $cle_param => $valeur_param) {
|
- |
|
190 |
$tab_valeur = explode ('=', $valeur_param) ;
|
- |
|
191 |
if ($tab_valeur[0] == 'chemin_spip') $chemin_spip = $tab_valeur[1] ;
|
- |
|
192 |
if ($tab_valeur[0] == 'coauth') $coauth= $tab_valeur[1] ;
|
- |
|
193 |
}
|
- |
|
194 |
}
|
- |
|
195 |
}
|
- |
|
196 |
|
- |
|
197 |
|
- |
|
198 |
|
- |
|
199 |
if ($auth_courante['type_site_externe'] == '201') {// 201 = site de type "WIKINI"
|
- |
|
200 |
|
- |
|
201 |
}
|
- |
|
202 |
|
- |
|
203 |
if (isset ($chemin_spip) && isset ($coauth) && $coauth == $auth_courante['gsab_id_auth_bdd']&& $_GEN_commun['pear_auth']->getAuth()) {
|
- |
|
204 |
$login = $_GEN_commun['pear_auth']->getAuthData($auth_courante['gsab_nom_champ_login']) ;
|
- |
|
205 |
setcookie("spip_admin", "@".$login, time()+3600*24*30, "/$chemin_spip/") ;
|
- |
|
206 |
|
- |
|
207 |
|
- |
|
208 |
ajouter_session($GLOBALS['auteur_session'], $id_session) ;
|
- |
|
209 |
setcookie("spip_session", $id_session, time()+3600*24*30, "/$chemin_spip/") ;
|
- |
|
210 |
}
|
- |
|
211 |
setcookie("spip_session", $id_session, time()+3600*24*30, "/$chemin_spip/") ;
|
- |
|
212 |
|
- |
|
213 |
} else {
|
- |
|
214 |
$id_session = preg_replace("/[0-9]+_/", $userid."_", $HTTP_COOKIE_VARS["spip_session"]) ;
|
- |
|
215 |
include ("ecrire/inc_version.php3");
|
- |
|
216 |
|
- |
|
217 |
include_ecrire ("inc_meta.php3");
|
- |
|
218 |
include_ecrire ("inc_session.php3");
|
- |
|
219 |
$query = "SELECT * FROM spip_auteurs WHERE login=".$login;
|
- |
|
220 |
$result = mysql_query($query);
|
- |
|
221 |
$GLOBALS['auteur_session'] = mysql_fetch_array($result) ;
|
- |
|
222 |
$GLOBALS['auteur_session']['statut'] = "1comite" ;
|
- |
|
223 |
$GLOBALS['auteur_session']['lang'] = "fr" ;
|
- |
|
224 |
|
- |
|
225 |
if (!$HTTP_COOKIE_VARS["spip_session"]) {
|
- |
|
226 |
$id_session = $userid."_".(md5 (uniqid (rand ())));
|
- |
|
227 |
set_include_path(get_include_path().":".$chemin_spip) ;
|
161 |
$_GEN_commun['pear_auth']->setExpire(3600 * 24 * 30 * 6);// 6 mois
|
228 |
|
- |
|
229 |
|
162 |
|
230 |
|
163 |
$_GEN_commun['pear_auth']->start();
|
231 |
}
|
164 |
}
|
232 |
|
- |
|
233 |
|
- |
|
234 |
/* +--Fin du code ---------------------------------------------------------------------------------------+
|
- |
|
235 |
* $Log: not supported by cvs2svn $
|
165 |
|
236 |
* Revision 1.7 2004/12/07 10:26:27 jpm
|
166 |
/* +--Fin du code ---------------------------------------------------------------------------------------+
|
237 |
* Correction for en foreach.
|
167 |
* $Log: not supported by cvs2svn $
|
238 |
*
|
168 |
* Revision 1.6 2004/12/06 12:42:02 alex
|
239 |
* Revision 1.6 2004/12/06 12:42:02 alex
|
169 |
* en cours
|
240 |
* en cours
|
Line 184... |
Line 255... |
184 |
* Changement de nom de Génésia en Papyrus.
|
255 |
* Changement de nom de Génésia en Papyrus.
|
185 |
* Changement de l'arborescence.
|
256 |
* Changement de l'arborescence.
|
186 |
*
|
257 |
*
|
187 |
* Revision 1.6 2004/05/01 11:40:21 jpm
|
258 |
* Revision 1.6 2004/05/01 11:40:21 jpm
|
188 |
* Suppression de code intégré dans le fichier de l'applette Identification.
|
259 |
* Suppression de code intégré dans le fichier de l'applette Identification.
|
189 |
*
|
- |
|
190 |
* Revision 1.5 2004/04/28 12:04:31 jpm
|
- |
|
191 |
* Changement du modèle de la base de données.
|
- |
|
192 |
*
|
- |
|
193 |
* Revision 1.4 2004/04/22 08:29:11 jpm
|
- |
|
194 |
* Transformation de $GS_GLOBAL en $_GEN_commun.
|
- |
|
195 |
*
|
- |
|
196 |
* Revision 1.3 2004/04/09 16:20:33 jpm
|
- |
|
197 |
* Gestion de l'authentification uniquement.
|
- |
|
198 |
* Gestion des tables i18n.
|
- |
|
199 |
*
|
- |
|
200 |
* Revision 1.2 2004/04/02 16:29:58 jpm
|
- |
|
201 |
* Ajout de la gestion de la déconnexion et reconnexion.
|
- |
|
202 |
*
|
- |
|
203 |
* Revision 1.1 2004/04/02 08:54:58 jpm
|
- |
|
204 |
* Création du fichier qui contient l'initialisation des objets Pear, hormis la base de données.
|
- |
|
205 |
*
|
- |
|
206 |
* +--Fin du code ----------------------------------------------------------------------------------------+
|
- |
|
207 |
*/
|
- |
|
208 |
?>
|
- |
|
209 |
|
260 |
*
|
- |
|
261 |
* Revision 1.5 2004/04/28 12:04:31 jpm
|
- |
|
262 |
* Changement du modèle de la base de données.
|
- |
|
263 |
*
|
- |
|
264 |
* Revision 1.4 2004/04/22 08:29:11 jpm
|
- |
|
265 |
* Transformation de $GS_GLOBAL en $_GEN_commun.
|
- |
|
266 |
*
|
- |
|
267 |
* Revision 1.3 2004/04/09 16:20:33 jpm
|
- |
|
268 |
* Gestion de l'authentification uniquement.
|
- |
|
269 |
* Gestion des tables i18n.
|
- |
|
270 |
*
|
- |
|
271 |
* Revision 1.2 2004/04/02 16:29:58 jpm
|
- |
|
272 |
* Ajout de la gestion de la déconnexion et reconnexion.
|
- |
|
273 |
*
|
- |
|
274 |
* Revision 1.1 2004/04/02 08:54:58 jpm
|
- |
|
275 |
* Création du fichier qui contient l'initialisation des objets Pear, hormis la base de données.
|
- |
|
276 |
*
|
- |
|
277 |
* +--Fin du code ----------------------------------------------------------------------------------------+
|
- |
|
278 |
*/
|
- |
|
279 |
?>
|
- |
|
280 |
|