1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
download-manager/index.php

27 lines
1.1 KiB
PHP
Raw Normal View History

2015-06-13 17:09:55 +01:00
<?php
2015-06-14 18:07:47 +01:00
require "property-manager.php"; // Initialise properties
2015-06-22 11:11:15 +01:00
require "file-information.php";
2015-06-14 18:07:47 +01:00
2015-06-13 17:09:55 +01:00
$properties = load_properties();
$file_name = $_GET[$properties["file QS"]] or die("No querystring given.");
if (file_exists($file_name)) {$GLOBALS["file"] = generate_file_object($file_name);}
else {die("File '$file_name' does not exist!");}
2015-06-13 17:09:55 +01:00
header("Content Type: text/html");
?>
2015-06-14 18:10:57 +01:00
<!DOCTYPE html>
2015-06-13 17:09:55 +01:00
<html><head><title><?php echo($properties["html title"]);?></title>
2015-06-14 18:10:57 +01:00
<link rel=stylesheet type=text/css href="style.css"/>
<?php yandex_meta($properties["yandex transparency"]) ?>
2015-06-22 11:11:15 +01:00
</head><body><center>
<h1>File Information</h1><table border=1>
<tr><td>File Name:</td><td><?php echo $file["file name"];?></td></tr>
<tr><td>Description:</td><td><?php echo $file["description"]; ?></td></tr>
</table>
2015-06-22 11:11:15 +01:00
<?php echo "<a id='downloadButton' href='./downloads/" . $file["file name"] . "' download='" . $file["file name"] . "' >Download File</a>"; ?>
2015-06-28 16:52:10 +01:00
<footer>Powered by <a href="//theorangeone.net">TheOrangeOne</a>'s Download Manager</footer>
</center>
<?php
if (isset($_GET['auto'])){
echo "<script>document.getElementById('downloadButton').click();</script>";
}
?></body></html>