// 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->Paragraph('You can enjoy the full version for <strong>' . $keywords['serial']['trialtime'] . '</strong> days until it stops working and you have to purchase a serial. Do you ' . 'want to try it out first?'); $page->FormSubmit('Try it out for ' . $keywords['serial']['trialtime'] . ' days');
} $page->FormSubmit('Next'); $page->FormClose(); $page->SubTitle('Disconnect', 'disconnect'); $page->Paragraph('The <i>username</i> and <i>password</i> provided to connect to <b>' . $login['hostname'] . '</b> are encrypted during the rest of this process. However, you can disconnect ' . 'from current connection and enter new username and password if needed.'); $page->FormStart(array('step' => STEP_DBCONNECT, 'reset' => 'connection')); $page->FormSubmit('Disconnect'); $page->FormClose(); } else { $page->FormStart(array('step' => GetNextStep(STEP_DBCONNECT))); // If port is offered as option if ($steps[STEP_DBCONNECT]['portoptional']) { $page->StartTable(2, array('class' => 'hostport', 'cellpadding' => '0', 'cellspacing' => '0')); // Insert the elements in wrong order, then when the // items are popped they are inserted in right order $page->FormInput($login['hostname'], 'hostname', array(), 'bigbox'); $page->Label('Hostname:'); $page->AddTableData($page->PopQueue() . $page->PopQueue(), array('class' => 'port')); $page->FormInput($login['dbport'], 'dbport', array(), 'tinybox'); $page->Label('Port:'); $page->AddTableData($page->PopQueue() . $page->PopQueue(), array('class' => 'host')); $page->EndTable(); } else { $page->Label('Hostname:'); $page->FormInput($login['hostname'], 'hostname'); } $page->Label('Username:'******'username'], 'username'); $page->Label('Password:'******'password'], 'password'); $prev = GetPrevStep(STEP_DBCONNECT);
$page->FormClose(); } // Only shown when not connected to database server else { $page->FormStart(array('step'=>GetNextStep(STEP_DBCONNECT))); // If port is offered as option if($steps[STEP_DBCONNECT]['portoptional']) { $page->StartTable(2, array('class'=>'hostport', 'cellpadding'=>'0', 'cellspacing'=>'0')); // Insert the elements in wrong order, then when the // items are popped they are inserted in right order $page->FormInput($login['hostname'], 'hostname', array(), 'bigbox'); $page->Label('Hostname:'); $page->AddTableData($page->PopQueue().$page->PopQueue(), array('class'=>'port')); $page->FormInput($login['dbport'], 'dbport', array(), 'tinybox'); $page->Label('Port:'); $page->AddTableData($page->PopQueue().$page->PopQueue(), array('class'=>'host')); $page->EndTable(); } // Display host normally else { $page->Label('Hostname:'); $page->FormInput($login['hostname'], 'hostname');
array('checked'), array('value_on','value_off','numeric','mustfill','minval','maxval','minlen','maxlen')); $data = FillInAllAttributes($data); $checked = (isset($data['checked']) && $data['checked'] === true) ? array('checked') : array(); $page->FormRadiobox($data['value'], $data['keyword'], $mask->ReplaceKeywords($data['text']), $checked); break; case 'textbox': CheckControlAttributes($data, array('type','keyword','value','numeric','mustfill'), array('minval','maxval','minlen','maxlen'), array('text','value_on','value_off','checked')); $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':