blob: 9a9efd311cab9993576b4101436eb9b35f71f089 (
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
|
<?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";
}
|