Ejemplo n.º 1
0
         $page->ShowPage(STEP_ADDEDINFO);
     } else {
         $page->ClearHtmlQueue();
     }
 }
 /* ===================================================[ DATABASE CONNECTION ]=================================================== */
 if ($steps[STEP_DBCONNECT]['enabled']) {
     // 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']) {
         $login['password'] = '';
     }
     // If connection cannot be made, force show "connection" step!
     if (!$dbase->IsConnected() || $step == STEP_DBCONNECT) {
         $page->MainTitle($steps[STEP_DBCONNECT]['title'], 'connection');
         // If the step is not STEP_DBCONNECT, then the installer was going
         // somewhere else - so error message should be displayed
         if ($step != STEP_DBCONNECT) {
             $page->WarningBox('Unable to establish a connection to <b>' . $login['hostname'] . '</b>. ' . 'Please fill in <i>hostname</i>, <i>username</i> and <i>password</i>.');
             if ($config['show_database_error_messages']) {
                 $page->ErrorDatabaseBox($dbase->GetDatabaseError());
             }
         } else {
             if ($step == STEP_DBCONNECT && $dbase->IsConnected()) {
                 $page->SuccessBox('Connection to database server is successful with login ' . 'provided. Proceed to the next step');
             }
         }
         // If the port is optional and the port value contains
         // non-digits then display warning message
Ejemplo n.º 2
0
				$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'])
				$login['password'] = '';
		   
			// If connection cannot be made, force show "connection" step!
			if(!$dbase->IsConnected() || $step == STEP_DBCONNECT)
			{
				$page->MainTitle($steps[STEP_DBCONNECT]['title'], 'connection');
				
				// If the step is not STEP_DBCONNECT, then the installer was going 
				// somewhere else - so error message should be displayed
				if($step != STEP_DBCONNECT)
				{
					$page->WarningBox('Unable to establish a connection to <b>'.$login['hostname'].'</b>. '.
									  'Please fill in <i>hostname</i>, <i>username</i> and <i>password</i>.'); 
					
					if($config['show_database_error_messages'])
						$page->ErrorDatabaseBox($dbase->GetDatabaseError());
				}
				
				// If how ever the step IS set to 1 and the connection to database has been