Skip to content

Commit cb6d339

Browse files
committed
Display list of backups per date
1 parent 815578e commit cb6d339

2 files changed

Lines changed: 74 additions & 0 deletions

File tree

lib/backup-versions.css

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/* First, reset everything to a standard */
2+
html, body, div, span, applet, object, iframe,
3+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
4+
a, abbr, acronym, address, big, cite, code,
5+
del, dfn, em, font, img, ins, kbd, q, s, samp,
6+
small, strike, strong, sub, sup, tt, var,
7+
b, u, i, center,
8+
dl, dt, dd, ol, ul, li,
9+
fieldset, form, label, legend,
10+
table, caption, tbody, tfoot, thead, tr, th, td {
11+
border: 0;
12+
margin: 0;
13+
padding: 0;
14+
outline: 0;
15+
font-size: 12px;
16+
vertical-align: top;
17+
}
18+
19+
body {overflow: hidden;
20+
-webkit-user-select: none;
21+
-moz-user-select: none;
22+
-ms-user-select: none;
23+
user-select: none;
24+
}
25+
26+
h1 {font-size: 36px; font-weight: normal; color: #888; margin-bottom: 20px}
27+
a {color: #fff; text-decoration: none}
28+
29+
.backup-versions {font-family: arial, verdana, helvetica, sans-serif; background-color: #1c1c19; color: #fff; padding: 20px}

lib/backup-versions.php

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
// Load common functions
3+
include("headers.php");
4+
include_once("settings-common.php");
5+
$text = $_SESSION['text'];
6+
$t = $text['backup-versions'];
7+
8+
$file = str_replace("|","/",xssClean($_GET['file'],'html'));
9+
$fileCountInfo = getVersionsCount(dirname($file),basename($file));
10+
$versions = $fileCountInfo['count'];
11+
?>
12+
<!DOCTYPE html>
13+
14+
<html>
15+
<head>
16+
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> backup version control</title>
17+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
18+
<meta name="robots" content="noindex, nofollow">
19+
<link rel="stylesheet" type="text/css" href="backup-versions.css?microtime=<?php echo microtime(true);?>">
20+
</head>
21+
22+
<body class="backup-versions">
23+
24+
<h1 id="title"><?php echo $versions." ".($versions != 1 ? $t["backups"] : $t["backup"])." ".$t['available for'].":";?></h1>
25+
<h2><?php echo $file;?></h2>
26+
27+
<br>
28+
<?php
29+
$dateCounts = $fileCountInfo['dateCounts'];
30+
$displayVersions = $versions;
31+
32+
foreach ($dateCounts as $key => $value) {
33+
echo "<b>".date("jS M Y",strtotime($key))." (".$value." ".($value != 1 ? $t["backups"] : $t["backup"]).")</b>";
34+
echo '<br>';
35+
for ($j=0; $j<$value; $j++) {
36+
echo "Backup ".$displayVersions.'<br>';
37+
$displayVersions--;
38+
}
39+
echo '<br>';
40+
}
41+
?>
42+
43+
</body>
44+
45+
</html>

0 commit comments

Comments
 (0)