Пример #1
0
 function run_installer()
 {
     if (isset($_GET['step'])) {
         if ($_GET['step'] == 'autoupdate') {
             $_SESSION['or_install_lang'] = $_GET['or_install_lang'];
             $_SESSION['or_install_type'] = $_GET['or_install_type'];
             $this->load_lang($_SESSION['or_install_lang']);
             $this->set_version();
             require_once dirname(__FILE__) . '/versions/' . $_SESSION['or_install_type'] . '.inc.php';
             $version = new version();
             $version->load_version();
         } elseif ($_GET['step'] == 'autoinstall') {
             $_SESSION['or_install_lang'] = $_GET['or_install_lang'];
             $_SESSION['or_install_type'] = $_GET['or_install_type'];
             $this->load_lang($_SESSION['or_install_lang']);
             $this->set_version();
             require_once dirname(__FILE__) . '/versions/' . $_SESSION['or_install_type'] . '.inc.php';
             $version = new version();
             $version->load_version();
         } elseif ($_GET['step'] > 3) {
             $this->load_lang($_SESSION['or_install_lang']);
             $this->set_version();
             if (isset($_POST['install_type'])) {
                 $_SESSION['or_install_type'] = $_POST['install_type'];
             }
             // Possible Values
             // upgrade_115, install_200, ,install_200_beta_2 move
             require_once dirname(__FILE__) . '/versions/' . $_SESSION['or_install_type'] . '.inc.php';
             $version = new version();
             $version->load_version();
         } else {
             $runme = 'run_installer_' . $_GET['step'];
             $this->{$runme}();
         }
     } else {
         $this->welcome_screen();
     }
 }