diff options
Diffstat (limited to 'admin/api/draftvslive.php')
-rw-r--r-- | admin/api/draftvslive.php | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/admin/api/draftvslive.php b/admin/api/draftvslive.php new file mode 100644 index 0000000..cc5e325 --- /dev/null +++ b/admin/api/draftvslive.php @@ -0,0 +1,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");
+ }
+}
\ No newline at end of file |