Subversion Repositories Applications.gtt

Rev

Rev 34 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
11 jpm 1
<?php
2
 
3
class GttCtrlActionIdentification extends aControlleurAction {
4
 
5
	public function __construct(Registre $Registre)
6
    {
7
    	$Registre->ajouterEspace('Identification', 'identification');
8
    	$Registre->ajouterSquelette('identification', 'connexion.tpl.html');
9
    }
10
 
11
    public function executer()
12
    {
13
    	$aso_identification = array();
14
    	$this->getRegistre()->ajouterSquelette('identification', 'identite.tpl.html');
15
    	//$GLOBALS['_GTT_']['auth']->logout();
16
    	$aso_identification['nom'] = $GLOBALS['_GTT_']['Utilisateur']->getNom();
17
    	$aso_identification['prenom'] = $GLOBALS['_GTT_']['Utilisateur']->getPrenom();
18
 
19
    	//echo '<pre>'.print_r($aso_identification, true).'</pre>';
20
		$this->getRegistre()->ajouterDonnee('identification', $aso_identification);
21
    }
22
 
23
    public function executerDeconnexion()
24
    {
25
    	$aso_connexion = array();
26
		$this->getRegistre()->setTitre('Bienvenue sur GTT!');
27
    	// Création de l'url de réponse du formulaire
28
		$aso_connexion['url'] = 'index.php?action='.GTT_ACTION_CONNEXION;
29
    	$GLOBALS['_GTT_']['auth']->logout();
30
 
31
    	//echo '<pre>'.print_r($aso_connexion, true).'</pre>';
32
		$this->getRegistre()->ajouterDonnee('identification', $aso_connexion);
33
    }
34
}
35
?>