} else { $title = 'Installer step'; } $page->MainTitle($title, 'allsteps'); // Display the keys and values $page->StartTable(2, array('class' => 'dbtests')); foreach ($sett as $key => $value) { $show = GetSettingsValue($value); $page->AddTableData('<b>' . $key . '</b>', array('style' => 'text-align:right; padding-right:12px;')); $page->AddTableData('<tt>' . $show . '</tt>'); } $page->EndTable(); // Make sure this mask file exists! if (isset($sett['maskname'])) { if ($mask->DoesMaskExistAndIsReadable($sett['maskname'])) { $page->SuccessBox('The mask file <b>' . $sett['maskname'] . '</b> exists and is readable'); // The mask is checked for few things $maskContent = $mask->GetMask($sett['maskname'], false); // Get if ANY keyword is found in the mask $counts = $mask->GetReplaceKeywordCount($maskContent); if (is_array($counts) && count($counts) > 0) { $str = ''; foreach ($counts as $word => $count) { $str .= "\n" . '<br /><tt><b>' . $keywords['open_bracket'] . $word . $keywords['close_bracket'] . '</b></tt> = <b>' . $count . '</b>'; } $page->SuccessBox('The mask file contains the following keywords:' . $str); } else { $page->InfoBox('This mask file does not contain any keywords to replace.'); } // Check if there is SEPARATOR KEYWORD in the sql file $ext = $mask->GetMaskExtension($sett['maskname'], true);
{ /* ===================================================[ PHP MODULE CHECK ]=================================================== */ $phpmodules = true; if($steps[STEP_MODULECHECK]['enabled']) { $page->MainTitle($steps[STEP_MODULECHECK]['title'], 'phpmodule'); $page->Paragraph('All PHP extensions must be installed in order for the Installer and/or the system to function properly.'); // Do the module checking foreach($steps[STEP_MODULECHECK]['modules'] as $module) { if(IsModuleInstalled($module)) { $page->SuccessBox('<b><tt>'.$module.'</tt></b> is installed!'); } else { $page->ErrorBox('<b><tt>'.$module.'</tt></b> is <u>not installed!</u>'); $phpmodules = false; } } // If all modules are installed if($phpmodules) { $page->FormStart(array('step'=>GetNextStep(STEP_MODULECHECK))); $page->FormSubmit('Next'); $page->FormClose(); }
$results[$idx]['delete'] = TestFileDeletion($folderPath, $conf['maskname']); } else { $results[$idx]['delete'] = TestResults('ignored', 'Unable to perform this test due to previous failures'); } } else { $results[$idx]['write'] = TestResults('ignored', 'Unable to perform this test due to previous failures'); $results[$idx]['delete'] = TestResults('ignored', 'Unable to perform this test due to previous failures'); } // If any test failed, do not continue if ($results[$idx]['folder']['state'] == 'failed' || $results[$idx]['read']['state'] == 'failed' || $results[$idx]['write']['state'] == 'failed' || $results[$idx]['delete']['state'] == 'failed') { $ioable = false; } $idx++; } if ($ioable) { $page->SuccessBox('The Installer has sufficient file permissions on this server.'); } else { $page->InfoBox('All tests have to be successful inorder to continue'); } // THIS TABLE USES THE SAME TABLE-CSS AS "USER ACCESS TEST" STEP! $page->StartTable(4, array('class' => 'dbtests', 'cellspacing' => '0', 'cellpadding' => '0')); foreach ($results as $testTypes) { foreach ($testTypes as $test => $result) { if ($result['state'] == 'success') { $page->AddTableData('', array('class' => 'okayico')); $page->AddTableData($test, array('class' => 'operation')); $page->AddTableData('Success!', array('class' => 'okay')); $page->AddTableData($result['msg'], array('class' => 'normalmsg')); } else { if ($result['state'] == 'failed') { $page->AddTableData('', array('class' => 'failico'));
$MinMax = CompareVersons($bounds['lower'], $bounds['upper']); $maxStr = ($steps[$step]['maxversion']) ? ' - '.implode('.', $bounds['upper']) : ''; $verStr = '<br /> <br />PHP Version: '.phpversion().'<br />PHP Required: '.implode('.', $bounds['lower']).$maxStr; // If minimum is above maximum! if($MinMax == 1) { $page->ErrorBox('Minimum version requirements are higher than maximum requirements. '. 'This check will always fail due to incorrect configuration! <br /> <br />'. 'This must be corrected: [min '.$steps[$step]['phpversion'].' > '.$steps[$step]['maxversion'].' max]'); } // If current version is equal or higher than lower bound // and is below the upper bound - then accepted! if ($CurLow >= 0 && $CurHig < 0) $page->SuccessBox('Current PHP version is supported!'.$verStr); else if($CurLow < 0) $page->WarningBox('Current PHP version is below minimum requirements!'.$verStr); else if($CurHig > 0) $page->WarningBox('Current PHP version is above maximum requirements!'.$verStr); else if($CurHig == 0) $page->WarningBox('Current PHP version is the same as the maximum requirement, which is not supported!'.$verStr); else $page->WarningBox('Current PHP version not supported!'.$verStr); } /* -----------------------( VERIFY FORM STRUCTURE )----------------------- */ if($step == STEP_ADDEDINFO) { $page->Paragraph(' '); $page->MainTitle('Your custom form', 'userinfo');