Beispiel #1
0
 private function initialize($node)
 {
     $this->title = '';
     $this->keywords = '';
     $this->description = '';
     $this->html = '';
     $this->css = '';
     $this->js = '';
     $is_404 = null === $this->page;
     $this->page = SystemPage::get($node->getProperty('reference'));
     if (null === $this->page) {
         header("HTTP/1.0 404 Not Found");
         $this->initialize(Router::$root->getById(Config::get('404_PAGE')));
         return;
     }
     $this->title = $node->getProperty('title');
     $this->keywords = $node->getProperty('keywords');
     $this->description = $node->getProperty('description');
     $this->render_page();
     $this->render_view();
     ob_start();
     eval('?>' . $this->html);
     if (count(Router::$parts)) {
         ob_end_clean();
         Router::$parts = array();
         header("HTTP/1.0 404 Not Found");
         $this->initialize(Router::$root->getById(Config::get('404_PAGE')));
         return;
     }
     if (Config::get('CACHE_ENABLED')) {
         Cache::add(Router::$url, Router::export() . $this->html);
         $filename = 'cache/' . md5(Router::$url);
         file_put_contents($filename, php_strip_whitespace($filename));
     }
 }
Beispiel #2
0
<?php

$reference = Router::$root->getById($_POST['id'])->getProperty('reference');
echo SystemPage::get($reference)->getCSS();
Beispiel #3
0
<?php

$reference = Router::$root->getById($_POST['id'])->getProperty('reference');
echo SystemPage::get($reference)->setJS($_POST['value']);
Beispiel #4
0
<?php

$reference = Router::$root->getById($_POST['id'])->getProperty('reference');
echo SystemPage::get($reference)->getPHP();