diff --git a/system/admin/views/backup.html.php b/system/admin/views/backup.html.php
index ecd8ad4..6b4f2b1 100644
--- a/system/admin/views/backup.html.php
+++ b/system/admin/views/backup.html.php
@@ -29,37 +29,17 @@ if (isset($_SESSION[site_url()]['user'])) {
krsort($files);
echo '
';
echo '| ' . i18n('Filename') . ' | '.i18n('Date').' | ' . i18n('Operations') . ' |
';
- $i = 0;
- $len = count($files);
foreach ($files as $file) {
- if ($i == 0) {
- $class = 'item first';
- } elseif ($i == $len - 1) {
- $class = 'item last';
- } else {
- $class = 'item';
- }
- $i++;
-
- // Extract the date
- $arr = explode('_', $file);
-
- // Replaced string
- $replaced = substr($arr[0], 0, strrpos($arr[0], '/')) . '/';
-
- $name = str_replace($replaced, '', $file);
-
- $date = str_replace('.zip', '', $arr[1]);
- $t = str_replace('-', '', $date);
- $time = new DateTime($t);
- $timestamp = $time->format("D, d F Y, H:i:s");
-
+ $arr = explode('_', pathinfo($file, PATHINFO_FILENAME));
+ $t = str_replace('-', '', $arr[1]);
+ $dt = new DateTime($t);
+ $timestamp = $dt->format("D, d F Y, H:i:s");
$url = site_url() . $file;
- echo '';
- echo '| ' . $name . ' | ';
+ echo '
';
+ echo '| ' . pathinfo($file, PATHINFO_BASENAME) . ' | ';
echo '' . $timestamp . ' | ';
- echo 'Download | ';
+ echo 'Download | ';
echo '
';
}
echo '
';