Subversion Repositories Sites.tela-botanica.org

Rev

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

Rev 371 Rev 401
Line 42... Line 42...
42
include_once dirname(realpath(__FILE__)).'/../papyrus/configuration/pap_config_avancee.inc.php' ;
42
include_once dirname(realpath(__FILE__)).'/../papyrus/configuration/pap_config_avancee.inc.php' ;
43
include_once dirname(realpath(__FILE__)).'/../papyrus/configuration/pap_config.inc.php' ;
43
include_once dirname(realpath(__FILE__)).'/../papyrus/configuration/pap_config.inc.php' ;
44
// ATTENTION : bien inclure la racine du site /home/telabotap/www/ et le chemin de l'api PEAR /home/telabotap/www/api/pear/ dans l'include path.
44
// ATTENTION : bien inclure la racine du site /home/telabotap/www/ et le chemin de l'api PEAR /home/telabotap/www/api/pear/ dans l'include path.
45
// ATTENTION : l'ancien include_path ajouté grace à get_include_path() doit être impérativement ajouté APRÉS le chemin de l'api Pear de Papyrus!
45
// ATTENTION : l'ancien include_path ajouté grace à get_include_path() doit être impérativement ajouté APRÉS le chemin de l'api Pear de Papyrus!
46
set_include_path($_SERVER['DOCUMENT_ROOT'].PATH_SEPARATOR.$_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.PAP_CHEMIN_API_PEAR.PATH_SEPARATOR.get_include_path());
46
set_include_path($_SERVER['DOCUMENT_ROOT'].PATH_SEPARATOR.$_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.PAP_CHEMIN_API_PEAR.PATH_SEPARATOR.get_include_path());
-
 
47
 
47
include_once 'Auth.php' ;
48
include_once 'Auth.php' ;
48
include_once 'DB.php' ;
49
include_once 'DB.php' ;
49
include_once 'Net/URL.php' ;
50
include_once 'Net/URL.php' ;
Line 50... Line 51...
50
 
51
 
Line 83... Line 84...
83
                     'table' => 'annuaire_tela',
84
                     'table' => 'annuaire_tela',
84
                     'usernamecol' => 'U_MAIL',
85
                     'usernamecol' => 'U_MAIL',
85
                     'passwordcol' => 'U_PASSWD',
86
                     'passwordcol' => 'U_PASSWD',
86
                     'cryptType' => 'md5',
87
                     'cryptType' => 'md5',
87
                     'db_fields' => '*');
88
                     'db_fields' => '*');
88
 
-
 
-
 
89
// ATTENTION : bien définir le nom de la session avec la fonction PHP et le placer avant l'instanciation de l'objet AUTH!
-
 
90
session_name('pap-annuaire_tela');
89
$GLOBALS['identification'] = new Auth('DB', $param_auth, 'AUTH_formulaire_login');
91
$GLOBALS['identification'] = new Auth('DB', $param_auth, 'AUTH_formulaire_login');
90
//session_name('gen_annuaire_tela');
-
 
91
//$GLOBALS['identification']->_sessionName = 'gen_annuaire_tela';
-
 
92
// ATTENTION : TODO : setSessionname ne marche pas ici. Le nom de la session n'est jamais initialisé est reste PHPSESSID
-
 
93
$GLOBALS['identification']->setSessionname('gen_annuaire_tela');
92
$GLOBALS['identification']->setAdvancedSecurity(PAP_AUTH_SECURITE_AVANCEE);
94
//echo session_name().'-'.$GLOBALS['identification']->_sessionName;
-
 
95
// On débute une session
93
// On débute une session
96
$GLOBALS['identification']->start();
94
$GLOBALS['identification']->start();
97
 
-
 
-
 
95
//echo '<pre>'.print_r($GLOBALS['identification'], true).'</pre>';
98
// On teste si la variable logout existe, si oui, on deconnecte
96
// On teste si la variable logout existe, si oui, on deconnecte
99
if (isset($logout) && $logout != '' && $GLOBALS['identification']->checkAuth()) {
97
if (isset($_REQUEST['deconnexion']) || isset($_REQUEST['logout']) || $GLOBALS['identification']->checkAuth() == false) {
100
	// On place les cookies avec une durée dépassée
98
	// On place les cookies avec une durée dépassée
101
    setcookie('spip_session', '', time() - 3600, '/actu/') ;
99
    setcookie('spip_session', '', time() - 3600, '/actu/') ;
102
    setcookie('spip_admin', '', time() - 3600, '/actu/') ;
100
    setcookie('spip_admin', '', time() - 3600, '/actu/') ;
103
	$GLOBALS['identification']->logout();
101
	$GLOBALS['identification']->logout();
104
	$NetUrl->removeQueryString('logout');
102
	$NetUrl->removeQueryString('logout');