backup list and backup download (.sql)

This commit is contained in:
Ricsi
2017-02-23 23:32:02 +01:00
parent 7096af6df3
commit 9440072ee0
9 changed files with 217 additions and 1 deletions

View File

@@ -0,0 +1,35 @@
<?php
# BACKUP DOWNLOAD
if ($this->is_id()) {
$backup = new backup();
$backup->set_backup_data_by_id($this->get_id());
$filename = "\backup\/".$backup->get_bu_name() . "\.sql";
header('Content-Type: application/octet-stream');
header("Content-Transfer-Encoding: Binary");
//header("Content-disposition: attachment; filename='backup/".$backup->get_bu_name().".sql'");
//header("Content-disposition: attachment; filename=\"backup/".$backup->get_bu_name().".sql\"");
header("Content-disposition: attachment; filename=\"".$filename."\"");
//var_dump(is_file("backup/".$backup->get_bu_name() . ".sql"));
//header('Location: /admin/settings/3');
}
else {
# NEM LEHET
}
?>