1
Fork 0

Added functionality for managing information on files

This commit is contained in:
Jake Howard 2015-06-14 18:06:24 +01:00
parent ff1a6b9eea
commit 59f60dd497
2 changed files with 18 additions and 0 deletions

15
file_information.php Normal file
View file

@ -0,0 +1,15 @@
<?php
define("INFORMATION_FILE", "private/information.yml");
function generate_file_object($file_name) {
$information_file = fopen(INFORMATION_FILE, "r") or die("Unable to open information file!");
$information = yaml_parse(fread($information_file, filesize(INFORMATION_FILE)))[strtolower($file_name)];
$file = array(
"file name" => $file_name,
"name" => $information["name"],
"description" => $information["description"]
);
return $file;
}
?>

3
private/information.yml Normal file
View file

@ -0,0 +1,3 @@
index.php:
name: Web Index
description: Main page for the download manager