<?php
session_start();

if ($_SESSION['s_logado'] != 1) {
    exit;
}
$data = array();

if (array_key_exists('s_my_mvp_percentual_done', $_SESSION)) {
    
    $doneFormated = $_SESSION['s_my_mvp_percentual_done'];

    $numberDone = str_replace('%', '', $doneFormated);
    $numberDone = str_replace('.', '', $numberDone);
    $numberDone = str_replace(',', '.', $numberDone);
    $done = (float)$numberDone;
    
    $data['my_mvp_percentual_done'] = $doneFormated;
    $data['gotit'] = $done >= 100;
    
    echo json_encode($data);
    return;
}


echo json_encode($data);
return;
?>
