function install() { //check php version $installedPhpVersion = floatval(phpversion()); $supportedPhpVersion = 5.1; require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . $this->component . DS . 'installer.template.php'; $step = JRequest::getVar('step', '', 'post'); $helper = new oseInstallerHelper(); if ($installedPhpVersion < $supportedPhpVersion) { $html = oseInstallerHelper::getErrorMessage(101, $installedPhpVersion); $status = false; $nextstep = 0; $title = JText::_('OSE Installer for') . ' ' . $this->com_title; $install = 1; $substep = 0; } else { if (!empty($step)) { $progress = $helper->installSteps($step); $html = $progress->message; $status = $progress->status; $nextstep = $progress->step; $title = $progress->title; $install = $progress->install; $substep = isset($progress->substep) ? $progress->substep : 0; } else { $nextstep = 1; $verifier = new oseInstallerVerifier(); $imageTest = $verifier->testImage(); $template = new oseInstallerTemplate(); $html = $template->getHTML('welcome', $imageTest); $status = true; $title = JText::_('OSE Installer for') . ' ' . $this->com_title; $install = 1; $substep = 0; } } $this->template->cInstallDraw($html, $nextstep, $title, $status, $install, $substep); return; }
} // INSTALLATION; $installedPhpVersion = floatval(phpversion()); $supportedPhpVersion = 5.1; $install = JRequest::getVar('install', '', 'REQUEST'); $view = JRequest::getVar('view', '', 'GET'); $task = JRequest::getVar('task', '', 'REQUEST'); $component = 'com_osemsc'; //install if (file_exists(JPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . $component . DS . 'installer.dummy.ini') || $install || $installedPhpVersion < $supportedPhpVersion) { $app = JFactory::getApplication(); $app->JComponentTitle = "OSE Application Installer"; require_once JPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . $component . DS . 'define.php'; require_once JPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . $component . DS . 'installer.helper.php'; require_once JPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . $component . DS . 'helpers' . DS . 'osemsc.php'; $oseInstaller = new oseInstallerHelper(); $oseInstaller->install(); $document = JFactory::getDocument(); $document->addScript(JURI::root() . 'media/system/js/mootools-core.js'); } else { require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'osesofthelper.php'; require_once JPATH_COMPONENT_SITE . DS . 'init.php'; require_once JPATH_COMPONENT . DS . 'libraries' . DS . 'oseMscPublic.php'; // Require the base controller if (JOOMLA30 == true) { require_once OSEMSC_B_CONTROLLER . DS . 'controller.php'; require_once OSEMSC_B_MODEL . DS . 'model.php'; require_once OSEMSC_B_VIEW . DS . 'view.php'; } else { require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'legacy' . DS . 'controller.php'; require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'legacy' . DS . 'model.php';