diff options
author | Luke Bratch <l_bratch@yahoo.co.uk> | 2014-07-25 11:58:22 +0100 |
---|---|---|
committer | Luke Bratch <l_bratch@yahoo.co.uk> | 2014-07-25 11:58:22 +0100 |
commit | d99a3276955482087be4b192287c2641eb6415d2 (patch) | |
tree | b24ee3cf0effdae163fef8fcfdd3445ca558b16a /index.php | |
parent | 69b8a4bd50e7aac4ce5d92dd1040ebd1d11dc69a (diff) |
Add support for a custom header file in HTML output
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -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++) { |