scratch – Diff between revs 50 and 53
?pathlinks?
Rev 50 | Rev 53 | |||
---|---|---|---|---|
Line 2... | Line 2... | |||
2 | |
2 | |
|
3 | ########################################################################### |
3 | ########################################################################### |
|
4 | ## Copyright (C) Wizardry and Steamworks 2017 - License: GNU GPLv3 ## |
4 | ## Copyright (C) Wizardry and Steamworks 2017 - License: GNU GPLv3 ## |
|
Line 5... | Line -... | |||
5 | ########################################################################### |
- | ||
6 | |
- | ||
7 | header('Content-Type: text/html; charset=utf-8'); |
- | ||
8 | header('Cache-Control: no-cache, no-store, must-revalidate'); |
- | ||
9 | header('Pragma: no-cache'); |
- | ||
10 | header('Expires: 0'); |
5 | ########################################################################### |
|
11 | |
6 | |
|
12 | require_once('inc/pseudocrypt.php'); |
7 | require_once('inc/pseudocrypt.php'); |
|
Line 13... | Line 8... | |||
13 | require_once('inc/functions.php'); |
8 | require_once('inc/functions.php'); |
|
Line 64... | Line 59... | |||
64 | atomized_put_contents($userPath.'.html', $_POST['data']); |
59 | atomized_put_contents($userPath.'.html', $_POST['data']); |
|
65 | break; |
60 | break; |
|
66 | case 'LOAD': |
61 | case 'LOAD': |
|
67 | if(!file_exists($userPath.'.html')) |
62 | if(!file_exists($userPath.'.html')) |
|
68 | return; |
63 | return; |
|
- | 64 | ### Set no-cache |
||
- | 65 | header('Content-Type: text/html; charset=utf-8'); |
||
- | 66 | header('Cache-Control: no-cache, no-store, must-revalidate'); |
||
- | 67 | header('Pragma: no-cache'); |
||
- | 68 | header('Expires: 0'); |
||
- | 69 | ### Open MIME info database and send the content type. |
||
- | 70 | header('Content-type: text/html'); |
||
- | 71 | ### Send the file along with the inline content disposition. |
||
- | 72 | header('Content-length: '.(int)get_file_size($userPath.'.html')); |
||
- | 73 | header('Content-Disposition: inline; filename="' . basename($userPath.'.html') . '"'); |
||
69 | echo atomized_get_contents($userPath.'.html'); |
74 | header('X-Sendfile: '.$userPath.'.html'); |
|
70 | break; |
75 | break; |
|
71 | } |
76 | } |