mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-07 17:16:47 +01:00
data dir contains backups now
This commit is contained in:
@@ -6,7 +6,7 @@ include("settings.php");
|
||||
$file = str_replace("|","/",xssClean($_GET['file'],'html'));
|
||||
|
||||
// Get contents
|
||||
$loadedFile = toUTF8noBOM(getData("../backups/".$file),true);
|
||||
$loadedFile = toUTF8noBOM(getData("../data/backups/".$file),true);
|
||||
$encoding=ini_get("default_charset");
|
||||
if($encoding=="")
|
||||
$encoding="UTF-8";
|
||||
@@ -15,7 +15,7 @@ if($encoding=="")
|
||||
echo '<textarea name="loadedFile" id="loadedFile">'.htmlentities($loadedFile,ENT_COMPAT,$encoding).'</textarea>';
|
||||
|
||||
// Get bytes for this file
|
||||
$bytes = filesize("../backups/".$file);
|
||||
$bytes = filesize("../data/backups/".$file);
|
||||
// Change into kilobytes
|
||||
$outputSize = ($bytes/1024);
|
||||
$outputUnit = "kb";
|
||||
@@ -27,10 +27,10 @@ if ($outputSize >= 1024) {
|
||||
$size = number_format($outputSize, 2, '.', '').$outputUnit." (".number_format($bytes)." bytes)";
|
||||
|
||||
// Get date & time of file
|
||||
$datetime = str_replace("-","<br>",date( "D jS M Y-g:i:sa", filemtime("../backups/".$file)));
|
||||
$datetime = str_replace("-","<br>",date( "D jS M Y-g:i:sa", filemtime("../data/backups/".$file)));
|
||||
?>
|
||||
<script>
|
||||
parent.document.getElementById('buttonsContainer').style.display = 'inline-block';
|
||||
parent.editor.setValue(document.getElementById('loadedFile').value);
|
||||
parent.document.getElementById('infoContainer').innerHTML = 'Date & Time:<br><?php echo $datetime;?><br><br>Size:<br><?php echo $size;?>';
|
||||
</script>
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user