|
@@ -12,6 +12,7 @@ class PageContext
|
|
|
public $content;
|
|
public $content;
|
|
|
// The currently logged in user - if the user is actually logged in
|
|
// The currently logged in user - if the user is actually logged in
|
|
|
public $user;
|
|
public $user;
|
|
|
|
|
+ public $pageData;
|
|
|
|
|
|
|
|
public function __construct($requestPath)
|
|
public function __construct($requestPath)
|
|
|
{
|
|
{
|
|
@@ -40,6 +41,12 @@ class PageContext
|
|
|
public function render()
|
|
public function render()
|
|
|
{
|
|
{
|
|
|
$context = $this;
|
|
$context = $this;
|
|
|
|
|
+ $postHandler = substr($this->targetPage, 0, -4) . "-post.php";
|
|
|
|
|
+
|
|
|
|
|
+ if ($_SERVER['REQUEST_METHOD'] === 'POST' && is_file($postHandler))
|
|
|
|
|
+ {
|
|
|
|
|
+ $this->pageData = include $postHandler;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
// Start output buffering - everything that is "printed" while we are buffering
|
|
// Start output buffering - everything that is "printed" while we are buffering
|
|
|
// is captured for later use which allows us to insert the content into a larger
|
|
// is captured for later use which allows us to insert the content into a larger
|