+if (get_post('view')) {
+ $filename = BACKUP_PATH . get_post('cmb_backups');
+ if (in_ajax())
+ $Ajax->popup( $filename );
+ else {
+ header('Content-type: application/octet-stream');
+ header('Content-Length: '.filesize($filename));
+ header("Content-Disposition: inline; filename=$filename");
+ readfile($filename);
+ exit();
+ }
+};
+
+if (get_post('download')) {
+ download_file(BACKUP_PATH . get_post('cmb_backups'));
+ exit;
+}
+