<?php
	// required headers
	header("Access-Control-Allow-Origin: *");
	 
	include_once '../config/database.php';
	include_once '../objects/log.php';
	 
	// instantiate database
	$database = new Database();
	$db = $database->getConnection();
	 
	// initialize object
	$log = new Log($db);

	$stmt = $log->getLastLogin();
	$num = $stmt->rowCount();

	if($num>0){
		while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){
			extract($row);
            echo $date_time;
		}	 
	}else{
            echo "...";
    }
?>