Init(); } private function Init(){ session_name(SESSION_NAME); session_start(); } public function Add($Cle,$Valeur,$ForcePath = false){ if($ForcePath) $Path = $ForcePath; else{$ForcePath = get_actual_part();} $this->Vars[$ForcePath][$Cle] = $Valeur; if($this->Execute) $_SESSION[$ForcePath][$Cle] = $Valeur; } public function Del($Cle,$ForcePath = false){ if($ForcePath) $Path = $ForcePath; else{$ForcePath = get_actual_part();} unset($this->Vars[$ForcePath][$Cle]); if($this->Execute) unset($_SESSION[$ForcePath][$Cle]); } public function Compile($All = false,$ForcePath = false){ if(!$All){ if($ForcePath) $Path = $ForcePath; else{$ForcePath = get_actual_part();} $_SESSION[$ForcePath] = $this->Vars[$ForcePath]; }else{ $_SESSION = $this->Vars; } } public function Get($Cle,$ForcePath = false){ if($ForcePath) $Path = $ForcePath; else{$ForcePath = get_actual_part();} return $this->Vars[$ForcePath][$Cle]; } public function Show(){ foreach($this->Vars as $k=>$v){ echobr("POUR ".$k); foreach ($v as $k2=>$v2){ echobr($k2." = ".$v2.""); } Separateur(); } } public function Kill(){ session_destroy(); } } ?>