Exemplo n.º 1
0
function getcurpage()
{
    $route = getroute();
    if (file_exists(__corePath . "controllers/" . $route . '.php')) {
        return $route;
    } else {
        return '404';
    }
}
Exemplo n.º 2
0
 public function prepare()
 {
     $notification = new Notification($this->curpage, $this->db, $this->config);
     $notification->prepare();
     $mainToggle = '';
     $tasksToggle = '';
     $usersToggle = '';
     $serversToggle = '';
     $storeToggle = '';
     $settingsToggle = '';
     $route = getroute();
     if ($route == '') {
         $mainToggle = 'active';
     }
     if ($route == 'servers' || strpos('##' . $route, 'servers/')) {
         $serversToggle = 'active';
     } elseif ($route == 'tasks' || strpos('##' . $route, 'tasks/')) {
         $tasksToggle = 'active';
     }
     if ($route == 'users' || strpos('##' . $route, 'users/')) {
         $usersToggle = 'active';
     }
     if ($route == 'store' || strpos('##' . $route, 'store/')) {
         $storeToggle = 'active';
     }
     if ($route == 'settings' || strpos('##' . $route, 'settings/')) {
         $settingsToggle = 'active';
     }
     $this->data['mainToggle'] = $mainToggle;
     $this->data['tasksToggle'] = $tasksToggle;
     $this->data['usersToggle'] = $usersToggle;
     $this->data['serversToggle'] = $serversToggle;
     $this->data['storeToggle'] = $storeToggle;
     $this->data['settingsToggle'] = $settingsToggle;
     $this->data['notification'] = $notification->show();
 }
Exemplo n.º 3
0
    }
    return $res;
}
function getInstallActions()
{
    if (!isset($_POST['action'])) {
        return 0;
    }
    $action = str_replace('.', '##', $_POST['action']);
    if (file_exists("actions/" . $action . '.php')) {
        return $action;
    }
    return 0;
}
$action = getInstallActions();
if ($action) {
    include "actions/{$action}.php";
    $action = new action(0);
    $action->execute();
}
$route = getroute();
if (beforeInstall()) {
    $curpage = 'controller/beforeInstall';
} else {
    $curpage = 'controller/' . $route;
}
include "{$curpage}.php";
$page = new page($curpage, 0, 0);
$page->prepare();
$page->render();
echo $page->show();