blob: 51df59ad8781e27b36212791091bf95775a8ee7d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $isLoggedIn;
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/bitset.php";
if (!$isLoggedIn) header("Location: /-/login") and die();
if (!isset($_GET['f']) || !file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $_GET['f'])) {
die();
} else {
header("Content-Type: " . mime_content_type($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $_GET['f']));
die(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $_GET['f']));
}
|