893f4da173
Modification de certains chemins Ajout du framework dans l'extranet
50 lines
1.0 KiB
PHP
50 lines
1.0 KiB
PHP
<?
|
|
class Session {
|
|
|
|
function Session() {}
|
|
|
|
/** Création d'une session **/
|
|
function creerSession($user, $password) {
|
|
$password=md5($password);
|
|
$_SESSION['connected']=true;
|
|
$_SESSION['mon_login']=$user;
|
|
$_SESSION['mon_nom']='ricois';
|
|
$_SESSION['mon_prenom']='michael';
|
|
$_SESSION['mon_email']='mricois@scores-decisions.com';
|
|
Session::majSession($user);
|
|
return $ret;
|
|
}
|
|
|
|
function majSession($user, $page='') {
|
|
if ($_SESSION['connected']==true) {
|
|
return $ret; //return true;
|
|
}
|
|
else return false;
|
|
}
|
|
|
|
function existeSession($user) {
|
|
if ($_SESSION['connected']) {
|
|
Session::existeSession($user);
|
|
return true;
|
|
}
|
|
else
|
|
return false;
|
|
}
|
|
|
|
function supprSession($user) {
|
|
if ($_SESSION['connected']) {
|
|
$_SESSION['connected']=false;
|
|
$_SESSION['mon_login']='';
|
|
$_SESSION['mon_nom']='';
|
|
$_SESSION['mon_prenom']='';
|
|
$_SESSION['mon_email']='';
|
|
Session::majSession($user);
|
|
session_destroy();
|
|
return true;
|
|
}
|
|
else
|
|
return false;
|
|
}
|
|
|
|
}
|
|
?>
|