-page(_("Backup and Restore Database"), false, false, '', '');
+if (get_post('view')) {
+ if (!get_post('backups')) {
+ display_error(_('Select backup file first.'));
+ } else {
+ $filename = BACKUP_PATH . clean_file_name(get_post('backups'));
+ if (in_ajax())
+ $Ajax->popup( $filename );
+ else {
+ header('Content-type: text/plain');
+ header('Content-Length: '.filesize($filename));
+ header("Content-Disposition: inline");
+ readfile($filename);
+ exit();
+ }
+ }
+};
+if (get_post('download')) {
+ if (get_post('backups')) {
+ download_file(BACKUP_PATH . clean_file_name(get_post('backups')));
+ exit;
+ } else
+ display_error(_("Select backup file first."));
+}
+
+page(_($help_context = "Backup and Restore Database"), false, false, '', '');