Example #1
0
                <thead>
                    <tr>
                        <th class="rex-table-icon"></th>
                        <th>' . rex_i18n::msg('backup_filename') . '</th>
                        <th class="rex-table-width-5">' . rex_i18n::msg('backup_filesize') . '</th>
                        <th class="rex-table-width-5">' . rex_i18n::msg('backup_createdate') . '</th>
                        <th class="rex-table-action" colspan="3">' . rex_i18n::msg('backup_function') . '</th>
                    </tr>
                </thead>
                <tbody>';
$dir = rex_backup::getDir();
$folder = rex_backup::getBackupFiles('.tar.gz');
foreach ($folder as $file) {
    $filepath = $dir . '/' . $file;
    $filec = date('d.m.Y H:i', filemtime($filepath));
    $filesize = rex_file::formattedSize($filepath);
    $content .= '<tr>
                    <td class="rex-table-icon"><i class="rex-icon rex-icon-file-archive"></i></td>
                    <td data-title="' . rex_i18n::msg('backup_filename') . '">' . $file . '</td>
                    <td data-title="' . rex_i18n::msg('backup_filesize') . '">' . $filesize . '</td>
                    <td data-title="' . rex_i18n::msg('backup_createdate') . '">' . $filec . '</td>
                    <td class="rex-table-action"><a href="' . rex_url::currentBackendPage(['function' => 'fileimport', 'impname' => $file]) . '" title="' . rex_i18n::msg('backup_import_file') . '" data-confirm="' . rex_i18n::msg('backup_proceed_file_import') . '"><i class="rex-icon rex-icon-import"></i> ' . rex_i18n::msg('backup_to_import') . '</a></td>
                    <td class="rex-table-action"><a href="' . rex_url::currentBackendPage(['function' => 'download', 'impname' => $file]) . '" title="' . rex_i18n::msg('backup_download_file') . '"><i class="rex-icon rex-icon-download"></i> ' . rex_i18n::msg('backup_download') . '</a></td>
                    <td class="rex-table-action"><a href="' . rex_url::currentBackendPage(['function' => 'delete', 'impname' => $file]) . '" title="' . rex_i18n::msg('backup_delete_file') . '" data-confirm="' . rex_i18n::msg('backup_delete') . ' ?"><i class="rex-icon rex-icon-delete"></i> ' . rex_i18n::msg('backup_delete') . '</a></td>
                </tr>';
}
$content .= '
               </tbody>
            </table>
        ';
$fragment = new rex_fragment();