protected function previousStep(Request $request) { try { // Undo the previous step. If success, we can redirect to its form $previousSetp = \InstallWizard::previousStep(); if (!$previousSetp->undo()) { return view()->make('install_wizard::steps.default', ['errors' => $previousSetp->getMessageBag()]); } return redirect()->route('install_wizard.show', ['slug' => $previousSetp->getSlug()]); } catch (StepNotFoundException $e) { return redirect()->route('install_wizard.show'); } }
/** * Handle an incoming request * * @param \Illuminate\Http\Request $request * @param Closure $next * @param string|null $guard * * @return mixed */ public function handle($request, Closure $next, $guard = null) { // Send a forbidden status if wizard should not be triggered if (TriggerHelper::hasWizardCompleted()) { return $this->forbiddenResponse(); } // Get the current step from the route slug $currentStepSlug = $request->route()->getParameter('slug', ''); \InstallWizard::initialize($currentStepSlug); // Share common data with our views view()->share('currentStep', \InstallWizard::currentStep()); view()->share('allSteps', \InstallWizard::steps()); // Proceed as usual return $next($request); }
* Control all requests to wizard * * @author KnowledgeTree Team * @access public * @param none * @return void */ public function dispatch() { $this->load(); if ($this->getBypass() === "1") { $this->removeInstallFile(); } elseif ($this->getBypass() === "0") { $this->createInstallFile(); } if (!$this->isSystemInstalled()) { // Check if the systems not installed $response = $this->systemChecks(); if ($response === true) { $this->displayInstaller(); } else { exit; } } else { // TODO: Die gracefully $this->iutil->error("System has been installed <div class=\"buttons\"><a href='../../'>Goto Login</a></div>"); } } } $ic = new InstallWizard(); $ic->dispatch();
define('INSTALL_DIALOG_CONFIRM', 7); define('INSTALL_DIALOG_FINISH', 8); define('INSTALL_DIALOG_DONE', 9); define('INSTALL_DIALOG_DOWNLOAD', 10); define('INSTALL_DIALOG_CANCELLED', 11); define('PROJECT_SITE', 'websiteatschool.eu'); if (get_magic_quotes_runtime() == 1) { set_magic_quotes_runtime(0); } session_name('WASINSTALL'); session_start(); include_once dirname(__FILE__) . '/version.php'; // which version are we installing anyway? include_once dirname(__FILE__) . '/lib/utf8lib.php'; // use essential UTF-8 routines from main program $wizard = new InstallWizard(); $wizard->run(); session_write_close(); exit; /** class for performing installation tasks * * Overview * * Dialog screens * * The installer basically consists of some six dialog screens * where the user is supposed to enter some data (e.g. language, install type, etc.). * Each of those screens has a [Next] button and most screens have a [Previous] * button. Also, every screen has a [Cancel] button. * The [Cancel] button always immediately leads to the Cancel screen and the whole process is * stopped (by resetting the collected information in $_SESSION['INSTALL']).