scratch – Diff between revs 48 and 50

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 48 Rev 50
Line 1... Line 1...
1 <?php 1 <?php
Line 2... Line -...
2   -  
-   2  
-   3 ###########################################################################
-   4 ## Copyright (C) Wizardry and Steamworks 2017 - License: GNU GPLv3 ##
Line -... Line 5...
-   5 ###########################################################################
-   6  
-   7 require_once('inc/pseudocrypt.php');
-   8 require_once('inc/functions.php');
-   9 require_once('config.php');
-   10  
-   11 if (!isset($_GET['o']) or empty($_GET['o'])) {
-   12 http_response_code(404);
-   13 return;
-   14 }
-   15  
-   16 $file = array_shift(
-   17 preg_grep(
-   18 "/$_GET[o]/",
-   19 scandir($STORE_FOLDER)
-   20 )
-   21 );
-   22  
-   23 if(!isset($file) or empty($file))
-   24 return;
-   25  
-   26 header("Content-type: ".mime_content_type($STORE_FOLDER.'/'.$file));
-   27 header('Expires: 0');
-   28 header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
-   29 header('Pragma: public');