<?php include_once 'CORALInstaller.php'; $installer = new CORALInstaller(); if (!$installer->installed()) { header('Location: install.php'); exit; } else { if ($next_version = $installer->getNextUpdateVersion()) { header('Location: update.php?version=' . $next_version); exit; } } $installer->header('CORAL Maintenance'); ?> <?php $installer->displayMessages(); ?> <?php $installer->displayErrorMessages(); ?> <h3>CORAL Usage</h3> <p>Your CORAL Usage Module is correctly installed and there are no pending updates.</p> <p><a href="..">Go to Usage Module</a></p> <?php $installer->footer();
<?php include_once 'CORALInstaller.php'; $installer = new CORALInstaller(); if ($installer->installed()) { header('Location: index.php'); exit; } //this script runs entire installation process in 5 steps //take "step" variable to determine which step the current is $step = $_POST['step']; //perform field validation(steps 3-5) and database connection tests (steps 3 and 4) and send back to previous step if not working $errorMessage = array(); if ($step == "3") { //first, validate all fields are filled in $database_host = trim($_POST['database_host']); $database_username = trim($_POST['database_username']); $database_password = trim($_POST['database_password']); $database_name = trim($_POST['database_name']); if (!$database_host) { $errorMessage[] = 'Host name is required'; } if (!$database_name) { $errorMessage[] = 'Database name is required'; } if (!$database_username) { $errorMessage[] = 'User name is required'; } if (!$database_password) { $errorMessage[] = 'Password is required'; }