<?php
include(__DIR__.'/../includes/sysinit.php');
$key = ini_get("session.upload_progress.prefix") . "frmUpload";
debug($key);
debug($_SESSION);
die('ttt');
if (!empty($_SESSION[$key])) 
{
    $current = $_SESSION[$key]["bytes_processed"];
    $total = $_SESSION[$key]["content_length"];
    echo ($current < $total) ? ceil($current / $total * 100) : 100;
}
else echo 100;
?>