<?php
//include_once '../../scripts/bd.php';
session_start();
//$now = time();
if(!isset($_SESSION['id-manager'])){
    header("Location: /app/manager/account/");
}
/*if ($now > $_SESSION['expire']) {
    add_log("<span class='badge badge-warning'>Session has expired</span>");
    session_destroy();
    header("Location: ../account/signin.php");
}else{
    $_SESSION['start'] = time();
    $_SESSION['expire'] = $_SESSION['start'] + (30*60);
}
function add_log($str){
    $mailer=$_SESSION['id-mailer'];
    $ip=$_SERVER["REMOTE_ADDR"];
    $activity=addslashes($str);
    $dateactivity=date('Y-m-d h:i:s');
    bd::query("INSERT INTO mailer_log VALUES (NULL, '$mailer', '$ip', '$activity', '$dateactivity');");
}*/

  // echo "Your session has expired! <a href='http://localhost/somefolder/login.php'>Login here</a>";  

   /* $time1=date('Y-m-d h:i:s');
    $time2=date('50');  
    $diff=$time1-$time1;
    
    echo 'Time now: '.$time1.'</br>';
    echo 'Time before: '.$time2.'</br>';
    echo 'Different: '.date('s',$diff);*/
    


