blob: cc5e325f3573559c9908e281c8f0aa1efd468be5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.api.php";
if (isset($_POST['document']) && strpos($_POST['document'], "/") === false) {
$doc = $_POST['document'];
} else {
die();
}
if ($doc === "conduct.fr") {
if (file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/drafts/" . $doc . ".html") === file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/code/fr.html")) {
die("true");
} else {
die("false");
}
}
if ($doc === "conduct.en") {
if (file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/drafts/" . $doc . ".html") === file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/code/en.html")) {
die("true");
} else {
die("false");
}
}
if ($doc === "blog.en") {
if (file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/drafts/blog-{$_POST['article']}.json.html") === file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/blog/data/{$_POST['article']}.json.html")) {
die("true");
} else {
die("false");
}
}
if ($doc === "blog.fr") {
if (file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/drafts/blog-{$_POST['article']}.json.fr.html") === file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/blog/data/{$_POST['article']}.json.fr.html")) {
die("true");
} else {
die("false");
}
}
|