summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bratch <l_bratch@yahoo.co.uk>2014-07-25 11:58:22 +0100
committerLuke Bratch <l_bratch@yahoo.co.uk>2014-07-25 11:58:22 +0100
commitd99a3276955482087be4b192287c2641eb6415d2 (patch)
treeb24ee3cf0effdae163fef8fcfdd3445ca558b16a
parent69b8a4bd50e7aac4ce5d92dd1040ebd1d11dc69a (diff)
Add support for a custom header file in HTML output
-rw-r--r--index.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/index.php b/index.php
index 42515eb..e563ee8 100644
--- a/index.php
+++ b/index.php
@@ -1,6 +1,7 @@
<?php
$pass = 'REPLACE THIS WITH A SHA256 HASH OR SET VARIABLE TO NULL';
$indexignore = array();
+$headerfile = "upload.html";
if ($_POST && $pass) {
if ((hash("sha256", $_POST['password']) == $pass)) {
@@ -280,11 +281,11 @@ if (!isset($_GET['format']) || $_GET['format'] == "html") {
</head>
<body>
-<form action="upload_file.php" method="post"
-enctype="multipart/form-data">
-<input type="file" name="file" id="file"> <input type="submit" name="submit" value="Submit">
-</form>
-
+<?php
+if ($headerfile) {
+ echo file_get_contents($headerfile);
+}
+?>
<pre><img src="/icons/blank.gif" alt="Icon "> <a href="<?php echo $nameurl; ?>">Name</a> <a href="<?php echo $modifiedurl; ?>">Last modified</a> <a href="<?php echo $sizeurl; ?>">Size</a>
<hr><?php
for ($i = 0; $i < count($listing); $i++) {