break; case 3: database_creation(); // Creates the database tables break; case 4: register_admin(); // Username and password for Admin user... break; case 5: installation_complete(); // Delete "install" folder. Visit your site" break; default: // Anything other than step=2, 3 or 4 will return user to step 1 installation_welcome(); break; } exit; /** * HTML header * * @return string returns the html output for the page header */ function html_header() { global $lang; $header = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 3.2//EN'>\n"; $header .= "<HTML><HEAD>\n"; $header .= "<meta http-equiv=Content-Type content='text/html; charset=UTF-8'>\n"; // Title
$dbhost_name = $h->cage->get->testAlnumLines('dbhost_name'); if (!$settings_file_exists) { $db = new ezSQL_mysql($dbuser_name, $dbpassword_name, $dbname_name, $dbhost_name); $db->show_errors = false; } $database_exists = $db->quick_connect($dbuser_name, $dbpassword_name, $dbname_name, $dbhost_name); //print $dbpassword_name . ' : ' . $dbuser_name . ' : ' . $dbname_name . ' : ' . $dbhost_name; if ($database_exists) { echo json_encode(array('error' => false)); } else { echo json_encode(array('error' => true)); } die; default: // Anything other than step=1, 3 or 4 will return user to Step 0 installation_welcome($h); } exit; /** * Step 0 of installation - Welcome message */ function installation_welcome($h, $settings_file_exists) { template($h, 'install/install_welcome.php', array('settings_file_exists' => $settings_file_exists)); } /**Step 1 of installation * */ function database_setup($h, $settings_file_exists) { global $lang;