$showSerialForm = !$steps[STEP_SERIALKEY]['allowtrial'] && !$keywords['serial']['isMatch'] ? true : $showSerialForm; $showSerialForm = $steps[STEP_SERIALKEY]['allowtrial'] && !$keywords['serial']['isMatch'] && !$keywords['serial']['isTrial'] ? true : $showSerialForm; // Only show form if step is enabled, and above checks are "false" or user wants to preview the step again (clicked back) if ($steps[STEP_SERIALKEY]['enabled'] && ($showSerialForm || $step == STEP_SERIALKEY)) { $page->MainTitle($steps[STEP_SERIALKEY]['title'], 'keys'); // Notify the user if he has entered valid serial or not if ($keywords['serial']['isMatch']) { $page->SuccessBox('Your serial key is accepted and you can continue.'); } else { if ($step != STEP_SERIALKEY) { $page->InfoBox('You must enter valid serial key to be able to continue installation!'); } } // Display required serial input part of the form $page->Paragraph('Please enter purchased serial key for <strong>' . $keywords['special']['product'] . ' ' . $keywords['special']['version'] . '</strong> below.'); $page->Label('Serial key:'); $page->FormStart(array('step' => GetNextStep(STEP_SERIALKEY))); $page->FormInput($keywords['serial']['keyvalue'], 'keyvalue'); $prev = GetPrevStep(STEP_SERIALKEY); if ($prev) { $page->FormButton('Back', array('step' => $prev)); } $page->FormSubmit('Next'); $page->FormClose(); // If "Trial" option is enabled, show more info and place button if ($steps[STEP_SERIALKEY]['allowtrial']) { $page->SubTitle('Want to try it out first?', 'trial'); $page->FormStart(array('step' => GetNextStep(STEP_SERIALKEY), 'isTrial' => 'selected')); if ($steps[STEP_SERIALKEY]['allowtrial'] && $keywords['serial']['isTrial']) { $page->SuccessBox('You have selected <strong>Free trial</strong>, click Trial button again to continue.'); }
} $page->FormSubmit('Next'); $page->FormClose(); $page->ShowPage(STEP_LANGUAGE); } /* ===================================================[ TMEZONE SELECTION ]=================================================== */ /* * The TimeZone step can check the selected language (if enabled) * to see what TimeZone to select automatically */ // If the timezone step is enabled and active, show "select timezone" form if ($steps[STEP_TIMEZONE]['enabled'] && $step == STEP_TIMEZONE) { $page->MainTitle($steps[STEP_TIMEZONE]['title'], 'timezone'); $page->Paragraph('Assuming that you have a "timezone" feature in your system already, you might ' . 'want to design this step yourself to make it fit correctly with your system.'); $page->FormStart(array('step' => GetNextStep(STEP_TIMEZONE))); $page->Label('Select timezone:'); $page->AddTimezoneDropdown('timezone', $keywords['special']['timezone']); $prev = GetPrevStep(STEP_TIMEZONE); if ($prev) { $page->FormButton('Back', array('step' => $prev)); } $page->FormSubmit('Next'); $page->FormClose(); $page->ShowPage(STEP_TIMEZONE); } /* ===================================================[ DATABASE CONNECTION ]=================================================== */ // Try to connect to database $login = $keywords['connection']; $dbase->Connect($login); // Clear the plain-text password if encryption is enabled if ($steps[STEP_DBCONNECT]['encryptlogin']) {
/* ===================================================[ TMEZONE SELECTION ]=================================================== */ /* * The TimeZone step can check the selected language (if enabled) * to see what TimeZone to select automatically */ // If the timezone step is enabled and active, show "select timezone" form if($steps[STEP_TIMEZONE]['enabled'] && $step == STEP_TIMEZONE) { $page->MainTitle($steps[STEP_TIMEZONE]['title'], 'timezone'); $page->Paragraph('Pick Your Server Time Zone'); $page->FormStart(array('step'=>GetNextStep(STEP_TIMEZONE))); $page->Label('Select timezone:'); $page->AddTimezoneDropdown('timezone', $keywords['special']['timezone']); $prev = GetPrevStep(STEP_TIMEZONE); if($prev) $page->FormButton('Back', array('step'=>$prev)); $page->FormSubmit('Next'); $page->FormClose(); $page->ShowPage(STEP_TIMEZONE); } /* ===================================================[ DATABASE CONNECTION ]=================================================== */ // Try to connect to database $login = $keywords['connection'];
$data = FillInAllAttributes($data); $page->FormInput($data['value'], $data['keyword']); break; case 'textarea': CheckControlAttributes($data, array('type','keyword','value','numeric','mustfill'), array('minval','maxval','minlen','maxlen'), array('text','value_on','value_off','checked')); $data = FillInAllAttributes($data); $page->FormTextarea($data['value'], $data['keyword']); break; case 'label': $page->Label($mask->ReplaceKeywords($data['text'])); break; case 'paragraph': $page->Paragraph($mask->ReplaceKeywords($data['text'])); break; case 'space': $page->Paragraph(' '); break; default: if(isset($data['text'])) $page->Paragraph($mask->ReplaceKeywords($data['text'])); else $page->Paragraph(' '); break; } } }