<?php 
if(!isset($_SESSION['userId']) && !isset($_SESSION['login']) )
{
     echo "<meta http-equiv='refresh' content='1;URL=index.php'>";

     exit();
     

}

$data = $dba->getUserLastactivityTime($_SESSION['ownerId']);
$heure_connexion = oci_fetch_array($data);
//echo $heure_connexion[0];
$actu = date("U");
$inactivity_time = $actu-$heure_connexion['CONNECT_TIMESTAMP_N'];
echo $inactivity_time;

if($inactivity_time>60)
{
header("location:index.php");
}

?>


