<?php
include_once ('../../../config.php');
include_once ("../path.php");
include_once ("helpers.php");


$folders = scandir($json_instance_path);

echo "<div style='$SCRIPT_STYLE'>";
echo 'Display data content for <b>' . strtoupper($instance_name) . '...</b><br>';
echo '<br>---------------------------------<br>';
echo 'TOTAL DATA SIZE:' . get_dir_size($json_instance_path, 'zip') . ' Mo <br>';
echo 'TOTAL BACKUPS SIZE:' . get_dir_size($backup_path) . ' Mo';
echo '<br>---------------------------------<br>';


foreach ($folders as $f)
{
    $path = $json_instance_path . $f;
    if ($f === '.' || $f === '..' || !is_dir($path)|| $f==='backups') continue;
    
    echo "<br>$f<br>";
    echo display_fileSize($path, $model_data_file);
    echo display_fileSize($path, $preview_file);
    echo display_fileSize($path, $social_preview_file);
    echo display_fileSize($path, $mask_file);
    echo display_dirSize($path, $drawings_dir);
    echo display_dirSize($path, $images_dir);
}
echo '</div>';

exit;

