+ function is_running($etat){
+ $_etat = array();
+ if(is_array($etat)){
+ if(isset($etat["mod"])){
+ $_etat["mod"] = $etat["mod"];
+ if(isset($etat["controller"])){
+ $_etat["controller"] = $etat["controller"];
+ if(isset($etat["action"])) $_etat["action"] = $etat["action"];
+ }
+ }
+ }
+ else{
+ $etat = explode("/", $etat);
+ foreach($etat as $etat_item){
+ if($etat_item){
+ if(!isset($_etat["mod"])) $_etat["mod"] = $etat_item;
+ else{
+ if(!isset($_etat["controller"])) $_etat["controller"] = $etat_item;
+ else{
+ if(!isset($_etat["action"])) $_etat["action"] = $etat_item;
+ break;
+ }
+ }
+ }
+ }
+ }
+ $IS_RUNNING = true;
+ if($IS_RUNNING && isset($_etat["mod"])) $IS_RUNNING = ($_etat["mod"] == $this->etat("mod"));
+ if($IS_RUNNING && isset($_etat["controller"])) $IS_RUNNING = ($_etat["controller"] == $this->etat("controller"));
+ if($IS_RUNNING && isset($_etat["action"])) $IS_RUNNING = ($_etat["action"] == $this->etat("action"));
+ return $IS_RUNNING;