Beispiel #1
0
                 }
                 break;
         }
     }
     // If current step, or some inputs are invalid, or no data has yet been displayed - prompt the step
     if ($step == STEP_ADDEDINFO || $hasErrors || !HasAnyAdditionalStepValueBeenPostedYet()) {
         // Do not show any info or success if this is "first show"
         if (HasAnyAdditionalStepValueBeenPostedYet()) {
             // Determine the box to show
             if ($hasErrors) {
                 $page->InfoBox('The form has not been properly filled out!');
             } else {
                 $page->SuccessBox('Inputs are accepted, please continue to the next step');
             }
             // Pop it out of the queue and insert at top
             $page->UpdateQueueAtIndex($msgBoxIndex, $page->PopQueue());
         }
         // Close the form and offer next and previous like in any other steps
         $prev = GetPrevStep(STEP_ADDEDINFO);
         if ($prev) {
             $page->FormButton('Back', array('step' => $prev));
         }
         $page->FormSubmit('Next');
         $page->FormClose();
         $page->ShowPage(STEP_ADDEDINFO);
     } else {
         $page->ClearHtmlQueue();
     }
 }
 /* ===================================================[ DATABASE CONNECTION ]=================================================== */
 if ($steps[STEP_DBCONNECT]['enabled']) {
Beispiel #2
0
				// 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');
					}