function doAction() { $action = getaction(); //если есть экшин- выполняем if (file_exists(__corePath . "actions/{$action}.php")) { include __corePath . "actions/{$action}.php"; $action = new action($this->db); $action->execute(); } }
} 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();