getTarget('part'); $action = $system->getTarget('action'); ob_start(); include (__DIR__ . __DS__ . 'page.' . $part . '.' . $action . '.php'); $response->setFragment('CONTENT', ob_get_clean()); } public function runInstall(Response $response) { $system = System::getInstance(); $part = $system->getTarget('part'); $action = $system->getTarget('action'); ob_start(); $param = $system->getRequest()->getParam(); $TYPE = 'install'; $STEP = isset($param['step']) ? (int) $param['step'] : 1; $PLUGIN = $param['plugin']; list($CAT, $PLUGIN) = explode(':', $PLUGIN, 2); unset($param); $basepath = getPluginPath($CAT . '.' . $PLUGIN); include ($basepath . __DS__ . '_info_.php'); $setupFile = implode(__DS__, array( $basepath,'_admin_','install','setup-' . $info['version'] . '.php')); if(file_exists($setupFile)) include ($setupFile); $response->setFragment('CONTENT', ob_get_clean()); } public function runUpgrade(Response $response) { $system = \MCMS\System::getInstance(); $part = $system->getTarget('part'); $action = $system->getTarget('action'); ob_start(); $param = $system->getRequest()->getParam(); $TYPE = 'upgrade'; $STEP = isset($param['step']) ? (int) $param['step'] : 1; $PLUGIN = $param['plugin']; list($CAT, $PLUGIN) = explode(':', $PLUGIN, 2); unset($param); $basepath = getPluginPath($CAT . '.' . $PLUGIN); include ($basepath . __DS__ . '_info_.php'); $setupFile = implode(__DS__, array( $basepath,'_admin_','install','setup-' . $info['version'] . '.php')); if(file_exists($setupFile)) include ($setupFile); $response->setFragment('CONTENT', ob_get_clean()); } public function runValidate(Response $response) { $system = System::getInstance(); $part = $system->getTarget('part'); $action = $system->getTarget('action'); ob_start(); $param = $system->getRequest()->getParam(); $TYPE = 'validate'; $STEP = isset($param['step']) ? (int) $param['step'] : 1; $PLUGIN = $param['plugin']; list($CAT, $PLUGIN) = explode(':', $PLUGIN, 2); unset($param); $basepath = getPluginPath($CAT . '.' . $PLUGIN); include ($basepath . __DS__ . '_info_.php'); $setupFile = implode(__DS__, array( $basepath,'_admin_','install','setup-' . $info['version'] . '.php')); if(file_exists($setupFile)) include ($setupFile); $response->setFragment('CONTENT', ob_get_clean()); } public function runUninstall(Response $response) { $system = System::getInstance(); $part = $system->getTarget('part'); $action = $system->getTarget('action'); ob_start(); $param = $system->getRequest()->getParam(); $TYPE = 'uninstall'; $STEP = isset($param['step']) ? (int) $param['step'] : 1; $PLUGIN = $param['plugin']; list($CAT, $PLUGIN) = explode(':', $PLUGIN, 2); unset($param); $basepath = getPluginPath($CAT . '.' . $PLUGIN); include ($basepath . __DS__ . '_info_.php'); $setupFile = implode(__DS__, array( $basepath,'_admin_','install','setup-' . $info['version'] . '.php')); if(file_exists($setupFile)) include ($setupFile); $response->setFragment('CONTENT', ob_get_clean()); } }