diff options
Diffstat (limited to 'Neutron-trunk/api/engine-jaw/render.php')
-rw-r--r-- | Neutron-trunk/api/engine-jaw/render.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Neutron-trunk/api/engine-jaw/render.php b/Neutron-trunk/api/engine-jaw/render.php new file mode 100644 index 0000000..9a9efd3 --- /dev/null +++ b/Neutron-trunk/api/engine-jaw/render.php @@ -0,0 +1,29 @@ +<?php + +function render(string $name) { + if (!cacheCheck($name)) { + if ($name == "index") { + require_once $_SERVER['DOCUMENT_ROOT'] . "/api/engine-jaw/homepage.php"; + + $content = ob_get_contents(); + file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/page-index", $content); + require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/debug.php";debugDump(); + } else { + $MPCMSRendererPageNameValue = $name; + require_once $_SERVER['DOCUMENT_ROOT'] . "/api/engine-jaw/init.php"; + + $content = ob_get_contents(); + file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/cache/page-" . $name, $content); + require_once $_SERVER['DOCUMENT_ROOT'] . "/resources/private/debug.php";debugDump(); + } + } else { + rlgps("Received page from cache"); + } +} + +function renderSpecial(string $markup, string $displayName = "Page") { + $MPCMSRendererPageMarkup = $markup; + $MPCMSRendererPageMarkupDN = $displayName; + rlgps("Special page"); + require_once $_SERVER['DOCUMENT_ROOT'] . "/api/engine-jaw/init.php"; +}
\ No newline at end of file |