Browse Source

update snaps list

main
ghost 1 year ago
parent
commit
783c60fd25
  1. 23
      src/webui/explore.php

23
src/webui/explore.php

@ -1,9 +1,9 @@
<?php <?php
// Debug // Debug
ini_set('display_errors', '1'); # ini_set('display_errors', '1');
ini_set('display_startup_errors', '1'); # ini_set('display_startup_errors', '1');
error_reporting(E_ALL); # error_reporting(E_ALL);
// Load dependencies // Load dependencies
require_once __DIR__ . '/../../vendor/autoload.php'; require_once __DIR__ . '/../../vendor/autoload.php';
@ -117,7 +117,7 @@ foreach ($config->snap->storage->remote->ftp as $i => $ftp)
$basename = basename($filename); $basename = basename($filename);
$time = preg_replace('/\D/', '', $basename); $time = preg_replace('/\D/', '', $basename);
$snaps[sprintf(_('Remote #%s'), $i + 1)][] = (object) $snaps[sprintf(_('Server #%s'), $i + 1)][] = (object)
[ [
'source' => $i, 'source' => $i,
'md5url' => $md5url, 'md5url' => $md5url,
@ -211,13 +211,6 @@ foreach ($config->snap->storage->remote->ftp as $i => $ftp)
margin: 4px 0; margin: 4px 0;
} }
h4 {
display: block;
font-size: 13px;
font-weight: normal;
margin: 4px 0;
}
form { form {
display: block; display: block;
max-width: 678px; max-width: 678px;
@ -295,6 +288,8 @@ foreach ($config->snap->storage->remote->ftp as $i => $ftp)
ul > li { ul > li {
margin-left: 16px; margin-left: 16px;
font-size: 13px;
padding: 4px 0;
} }
.text-warning { .text-warning {
@ -375,8 +370,10 @@ foreach ($config->snap->storage->remote->ftp as $i => $ftp)
<?php } ?> <?php } ?>
<?php if ($snaps) { ?> <?php if ($snaps) { ?>
<h3><?php echo _('Snaps') ?></h3> <h3><?php echo _('Snaps') ?></h3>
<ul>
<?php foreach ($snaps as $source => $snap) { ?> <?php foreach ($snaps as $source => $snap) { ?>
<h4><?php echo $source ?></h4> <li>
<?php echo $source ?>
<ul> <ul>
<?php foreach ($snap as $file) { ?> <?php foreach ($snap as $file) { ?>
<li> <li>
@ -386,7 +383,9 @@ foreach ($config->snap->storage->remote->ftp as $i => $ftp)
</li> </li>
<?php } ?> <?php } ?>
</ul> </ul>
</li>
<?php } ?> <?php } ?>
</ul>
<?php } ?> <?php } ?>
</div> </div>
<?php } else { ?> <?php } else { ?>

Loading…
Cancel
Save