Fermeture par timer en cas d'inactivité code java
Voici Code qui pourra vous être utile
 
<script type="text/javascript">            $(window).load(function(){ //$(window).load() must be used instead of $(document).ready() because of Webkit compatibility                var TimeTop=10000;                var timerID = setTimeout(function() { // On crée notre compte à rebours                      document.location.href="./includes/deconnexion.php";                  }, TimeTop);                });     </script>
define('INACTIVITY_TIMEOUT',3600);function check_timeout(){    if (time()>=$_SESSION['expires_on'])    {        logout();    }    $_SESSION['expires_on']=time()+INACTIVITY_TIMEOUT;}session_start();    define('INACTIVITY_TIMEOUT',120); //120 secondes pour tester         if (!isset($_SESSION['expires_on'])) {        $_SESSION['expires_on']=time()+INACTIVITY_TIMEOUT;    }           if (time()>=$_SESSION['expires_on'])    {        header ('Location:./includes/deconnexion.php');    }define('INACTIVITY_TIMEOUT',3600);function check_timeout(){    if (time()>=$_SESSION['expires_on'])    {        logout();    }    $_SESSION['expires_on']=time()+INACTIVITY_TIMEOUT;}
Fermeture par timer en cas d'inactivité code java
 
        Reviewed by Badr Dev
        on 
        
12:52
 
        Rating: 
      
 
        Reviewed by Badr Dev
        on 
        
12:52
 
        Rating: 



Aucun commentaire: