From 2a13cb356a612a29821df48427dff76997830a96 Mon Sep 17 00:00:00 2001 From: "Eric Johansson (neku)" Date: Thu, 8 Oct 2015 00:27:39 +0200 Subject: [PATCH] Update core.php --- includes/core.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/includes/core.php b/includes/core.php index 7a1e4d6..320c21c 100644 --- a/includes/core.php +++ b/includes/core.php @@ -42,8 +42,17 @@ function save_file ($file, $name, $arg, $type){ } //Move the file to the above location with said filename move_uploaded_file($file,$path.$file_name); - //Return url+filename to the user + //Check if html or plain text should be returned + if($type==='tool'){ + //Return url+filename to the user (plain text) echo 'http://a.uguu.se/'.urlencode($file_name); + exit(0); + }elseif($type==='normal'){ + //Return url+filename to the user (HTML) + $n=urlencode($file_name); + include_once('/home/neku/www/page/public/upload-done.php'); + exit(0); + } } function gen_name($arg, $in){ $chars = 'abcdefghijklmnopqrstuvwxyz';