$folders = array_filter(glob(EXPORTS_DIR . '*'), 'is_dir');
if (count($folders) > 0) {
$html .= '
';
usort($folders, function($a, $b) {
return filemtime($b) - filemtime($a);
});
foreach ($folders as $folder) {
$folder_name = basename($folder);
$project_name = str_replace('_', ' ', ucfirst($folder_name));
$date = date('d/m/Y H:i', filemtime($folder));
$index_file = $folder . '/index.html';
if (file_exists($index_file)) {
$zip_file = EXPORTS_DIR . $folder_name . '.zip';
$zip_link = file_exists($zip_file) ? $folder_name . '.zip' : '#';
$html .= '
' . htmlspecialchars($project_name) . '
Exporté le : ' . $date . '
';
}
}
$html .= '
';
} else {
$html .= '
Aucun site exporté pour le moment
Exportez votre premier projet depuis le Website Builder pour le voir apparaître ici.
';
}
$html .= '