summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Robinson <joe@lc8n.com>2014-08-05 17:54:55 +0100
committerJoe Robinson <joe@lc8n.com>2014-08-05 17:54:55 +0100
commitf5eba39fa959eeb13e0b5155af85159ceca3e872 (patch)
tree8427f2baae6c2cf7b487b00a82009ff94d16d39f
parent555f2886080333b10df9812777c36c04ae6b93bc (diff)
Moved configurable options to config file
-rw-r--r--config.php.example16
-rw-r--r--index.php5
2 files changed, 18 insertions, 3 deletions
diff --git a/config.php.example b/config.php.example
new file mode 100644
index 0000000..d74e4b5
--- /dev/null
+++ b/config.php.example
@@ -0,0 +1,16 @@
+<?php
+ #Blaupload Config
+ #Modify this file with your details and copy it to config.php
+
+ #The full URL used to access this directory
+ $url = "http://www.blaupload.co.uk";
+
+ #The SHA256 hash of the password used to access the folder
+ #Set to null if you don't want the folder to be password protected
+ $pass = "ENTER PASSWORD HASH HERE";
+
+ #A file to be shown at the top of the page
+ #For example, a HTML form to upload files
+ $headerfile = "upload.html"
+
+?>
diff --git a/index.php b/index.php
index 2c5af4e..bd25914 100644
--- a/index.php
+++ b/index.php
@@ -1,8 +1,7 @@
<?php
-$pass = 'REPLACE THIS WITH A SHA256 HASH OR SET VARIABLE TO NULL';
+include('config.php');
+
$indexignore = array();
-$headerfile = "upload.html";
-$url = "http://www.blaupload.co.uk/";
if ($_POST && $pass) {
if ((hash("sha256", $_POST['password']) == $pass)) {