aboutsummaryrefslogtreecommitdiffstats
path: root/config/filemgr/rbfminc/download.tmp
diff options
context:
space:
mode:
Diffstat (limited to 'config/filemgr/rbfminc/download.tmp')
-rw-r--r--config/filemgr/rbfminc/download.tmp22
1 files changed, 22 insertions, 0 deletions
diff --git a/config/filemgr/rbfminc/download.tmp b/config/filemgr/rbfminc/download.tmp
new file mode 100644
index 00000000..232e90d0
--- /dev/null
+++ b/config/filemgr/rbfminc/download.tmp
@@ -0,0 +1,22 @@
+<?php
+include "config.php";
+include "session.php";
+
+if($user_login == 'ok'){
+
+ include "functions.php";
+
+ $_GET['file_name'] = urldecode($_GET['file_name']);
+ $_GET['p'] = urldecode($_GET['p']);
+
+ if($_GET['file_name'] and $_GET['p']){
+ if(file_exists($_GET['p'].$_GET['file_name'])){
+ $file = file_get_contents($_GET['p'].$_GET['file_name']);
+ $type = wp_check_filetype($_GET['file_name']);
+ header('Content-type: {$type[type]}');
+ header('Content-Disposition: attachment; filename="'.$_GET['file_name'].'"');
+ echo $file;
+ }
+ }
+}
+?> \ No newline at end of file