mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
Load chosen backup, show buttons and set preview
This commit is contained in:
14
lib/backup-versions-preview-loader.php
Normal file
14
lib/backup-versions-preview-loader.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
// Load common functions
|
||||
include("headers.php");
|
||||
include("settings.php");
|
||||
|
||||
$file = str_replace("|","/",xssClean($_GET['file'],'html'));
|
||||
|
||||
$loadedFile = toUTF8noBOM(file_get_contents("../backups/".$file,false,$context),true);
|
||||
$encoding=ini_get("default_charset");
|
||||
if($encoding=="")
|
||||
$encoding="UTF-8";
|
||||
echo '<textarea name="loadedFile" id="loadedFile">'.htmlentities($loadedFile,ENT_COMPAT,$encoding).'</textarea>';
|
||||
echo "<script>parent.document.getElementById('buttonsContainer').style.display = 'inline-block';parent.editor.setValue(document.getElementById('loadedFile').value)</script>";
|
||||
?>
|
||||
Reference in New Issue
Block a user