} } // Create a new array with the configuration overview as first element // and copy the rest of the $steps array into the new array $newSteps = array(STEP_SETTOVERVIEW => array('title' => 'Configuration Overview')); foreach ($steps as $key => $value) { $newSteps[$key] = $value; } // Clear the original steps and update with the modified version $steps = array(); $steps = $newSteps; if (!isset($steps[$step])) { $step = STEP_SETTOVERVIEW; } // Show the page with the modified steps array $page->ShowPage($step, true, true, 'Installation Overview'); //=================================[ Functions used in Overview Script ]=================================// function GetSettingsValue($value) { $show = ''; if (is_array($value)) { if (count($value) == 0) { $show = '<i style="color:#9A9A9A;">*empty*</i>'; } else { foreach ($value as $item) { $show .= $item . ', '; } $show = substr($show, 0, strlen($show) - 2); } } else { if ($value === true) {
$mask->SetKeywords(); /* ===================================================[ INSTALLATION BEGINS! ]=================================================== */ // If the output config does not exist, or is totally empty if (IsInstallerDone() == false) { /* ===================================================[ WELCOME MESSAGE ]=================================================== */ if ($steps[STEP_WELCOME]['enabled'] && $step == STEP_WELCOME) { $page->MainTitle($steps[STEP_WELCOME]['title'], 'home'); $page->Paragraph($mask->GetWelcomeMessage()); $page->FormStart(array('step' => GetNextStep(STEP_WELCOME))); $prev = GetPrevStep(STEP_WELCOME); if ($prev) { $page->FormButton('Back', array('step' => $prev)); } $page->FormSubmit('Next'); $page->FormClose(); $page->ShowPage(STEP_WELCOME); // <<<<<<<<<<<< PHP dies after the page has been shown! } /* ===================================================[ PHP REQUIREMENTS CHECKS ]=================================================== */ if ($steps[STEP_PHPREQUIRES]['enabled']) { $page->MainTitle($steps[STEP_PHPREQUIRES]['title'], 'phplogo'); // Three variations of PHP checks, these will // indicate if there is a problem in certain part $phpversion = true; $extensions = true; $directives = true; // If minimum PHP version is required if ($steps[STEP_PHPREQUIRES]['phpversion'] !== false) { $page->SubTitle('PHP Version', 'notepad'); $bounds = GetVersionBounds($steps[STEP_PHPREQUIRES]['phpversion'], $steps[STEP_PHPREQUIRES]['maxversion']); $CurLow = CompareVersons($bounds['current'], $bounds['lower']);
} // If all modules are installed if ($phpmodules) { $page->FormStart(array('step' => GetNextStep(STEP_MODULECHECK))); $page->FormSubmit('Next'); $page->FormClose(); } else { $page->Paragraph('Contact your webserver support (hosting service) to get the necessary PHP extensions loaded.'); $page->FormStart(array('step' => STEP_MODULECHECK)); $page->FormSubmit('Retry'); $page->FormClose(); } // If there are some modules not detected, or this step should not be // auto skipped and $step is currently set to view this step if (!$phpmodules || !$steps[STEP_MODULECHECK]['autoskip'] && $step == STEP_MODULECHECK) { $page->ShowPage(STEP_MODULECHECK); } else { $page->ClearHtmlQueue(); } } /* ===================================================[ FILE I/O PERMISSIONS ]=================================================== */ $ioable = true; // Only continue if IO should be checked. The installer might // be configured to only install tables (though unlikely) if ($steps[STEP_IOFILES]['enabled']) { // Errors along the way $status = array('folder' => array('state' => 'unknown', 'msg' => ' '), 'read' => array('state' => 'unknown', 'msg' => ' '), 'write' => array('state' => 'unknown', 'msg' => ' '), 'delete' => array('state' => 'unknown', 'msg' => ' ')); // Begin the page $page->MainTitle($steps[STEP_IOFILES]['title'], 'filelocked'); // If the config should be in a folder, make sure it exists // or try to create the folder first
// There where some errors or problems with the // file IO - show "retry" button else { $page->Paragraph('Contact your webserver support (hosting service) to get the necessary PHP extensions loaded.'); $page->FormStart(array('step'=>STEP_MODULECHECK)); $page->FormSubmit('Retry'); $page->FormClose(); } // If there are some modules not detected, or this step should not be // auto skipped and $step is currently set to view this step if(!$phpmodules || (!$steps[STEP_MODULECHECK]['autoskip'] && $step == STEP_MODULECHECK)) $page->ShowPage(STEP_MODULECHECK); // Page should not be shown, so the html queue is cleared // so the next step can start fresh else $page->ClearHtmlQueue(); } /* ===================================================[ FILE I/O PERMISSIONS ]=================================================== */ $ioable = true; // Only continue if IO should be checked. The installer might // be configured to only install tables (though unlikely) if($steps[STEP_IOFILES]['enabled']) {
// Create a new array with the configuration overview as first element // and copy the rest of the $steps array into the new array $newSteps = array(STEP_SETTOVERVIEW => array('title'=>'Configuration Overview')); foreach($steps as $key=>$value) $newSteps[$key] = $value; // Clear the original steps and update with the modified version $steps = array(); $steps = $newSteps; if(!isset($steps[$step])) $step = STEP_SETTOVERVIEW; // Show the page with the modified steps array $page->ShowPage($step, true, true, 'Configuration Overview'); //=================================[ Functions used in Overview Script ]=================================// function ShowMaskState($maskname) { global $keywords; global $mask; global $page; global $step; if($mask->DoesMaskExistAndIsReadable($maskname)) { $page->SuccessBox('The mask file <b>'.$maskname.'</b> exists and is readable');