mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-15 04:47:05 +01:00
Display list of backups per date
This commit is contained in:
29
lib/backup-versions.css
Normal file
29
lib/backup-versions.css
Normal file
@@ -0,0 +1,29 @@
|
||||
/* First, reset everything to a standard */
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, font, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td {
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
outline: 0;
|
||||
font-size: 12px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
body {overflow: hidden;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
h1 {font-size: 36px; font-weight: normal; color: #888; margin-bottom: 20px}
|
||||
a {color: #fff; text-decoration: none}
|
||||
|
||||
.backup-versions {font-family: arial, verdana, helvetica, sans-serif; background-color: #1c1c19; color: #fff; padding: 20px}
|
||||
45
lib/backup-versions.php
Normal file
45
lib/backup-versions.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
// Load common functions
|
||||
include("headers.php");
|
||||
include_once("settings-common.php");
|
||||
$text = $_SESSION['text'];
|
||||
$t = $text['backup-versions'];
|
||||
|
||||
$file = str_replace("|","/",xssClean($_GET['file'],'html'));
|
||||
$fileCountInfo = getVersionsCount(dirname($file),basename($file));
|
||||
$versions = $fileCountInfo['count'];
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> backup version control</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link rel="stylesheet" type="text/css" href="backup-versions.css?microtime=<?php echo microtime(true);?>">
|
||||
</head>
|
||||
|
||||
<body class="backup-versions">
|
||||
|
||||
<h1 id="title"><?php echo $versions." ".($versions != 1 ? $t["backups"] : $t["backup"])." ".$t['available for'].":";?></h1>
|
||||
<h2><?php echo $file;?></h2>
|
||||
|
||||
<br>
|
||||
<?php
|
||||
$dateCounts = $fileCountInfo['dateCounts'];
|
||||
$displayVersions = $versions;
|
||||
|
||||
foreach ($dateCounts as $key => $value) {
|
||||
echo "<b>".date("jS M Y",strtotime($key))." (".$value." ".($value != 1 ? $t["backups"] : $t["backup"]).")</b>";
|
||||
echo '<br>';
|
||||
for ($j=0; $j<$value; $j++) {
|
||||
echo "Backup ".$displayVersions.'<br>';
|
||||
$displayVersions--;
|
||||
}
|
||||
echo '<br>';
|
||||
}
|
||||
?>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user