diff options
author | Minteck <nekostarfan@gmail.com> | 2021-08-24 15:38:16 +0200 |
---|---|---|
committer | Minteck <nekostarfan@gmail.com> | 2021-08-24 15:38:16 +0200 |
commit | 529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105 (patch) | |
tree | 8a50c30271b9b328cde0d907b1441f2dabdc341b /Neutron-trunk/api/engine-jaw/render.php | |
parent | 15e4724761c50b30803df1811a525c85058f70bf (diff) | |
download | electrode-529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105.tar.gz electrode-529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105.tar.bz2 electrode-529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105.zip |
Update
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 |