Ejemplo n.º 1
0
 /** This method is the main controller */
 public static function serveWeb()
 {
     if (Config::get('PROFILING_ENABLED')) {
         Profiling::start('index');
     }
     $url = $_SERVER['REQUEST_URI'];
     $hash = md5($url);
     if (!@(include 'cache/' . $hash)) {
         Router::setUrl($url);
         switch (Router::$node->getProperty('type')) {
             case 'page':
             case 'root':
                 ControllerPage::compile();
                 break;
             case 'php':
                 ControllerPhp::compile();
                 break;
         }
     }
     if (Config::get('PROFILING_ENABLED')) {
         Profiling::end();
     }
 }
Ejemplo n.º 2
0
<?php

$id = $_POST['id'];
$value = $_POST['value'];
$lang = $_POST['lang'];
ControllerPhp::$language = $lang;
SystemRoute::ROW($id)->setDescription($value);