Exemple #1
0
$contr->EsBefore();
$contr->{$page_function}();
if (!isset($title_page)) {
    if ($controller != $page) {
        $title_page = '..:: ' . ucfirst($cntr_class) . '->' . ucfirst($page_function) . ' ::..';
    } else {
        $title_page = '..:: ' . ucfirst($cntr_class) . ' ::..';
    }
}
// template variables defined by the controller
foreach ($_templ_vars as $key => $val) {
    ${$key} = $val;
}
// page loading and elaboration
if (file_exists('../pages/' . $controller . '/' . $page . '.php')) {
    $page_content = LoadPageContent('../pages/' . $controller . '/' . $page . '.php');
} else {
    $page_content = '';
}
unset($contr);
// setup alert message
if (SesVarCheck('esalert')) {
    $esalert = SesVarGet('esalert');
}
SesVarUnset('esalert');
// template loading and visualization
if ($template == null) {
    include '../template/default.php';
} else {
    include '../template/' . $template . '.php';
}
Exemple #2
0
 function NodesList()
 {
     $nodes = $this->nodes->Get(SesVarGet('user_id'), $this->utype);
     foreach ($nodes as &$node) {
         if ($node['lastmsg'] < time() - 2 * $node['freq'] && $node['tunnelon']) {
             $node['tunnelon'] = 0;
             $this->nodes->UpdateTunnelSt($node['id'], 0);
         }
     }
     SesVarUnset('node_id');
     ViewVar('nodes', $nodes);
 }