'", "',", postRequestElement('mysql','host'), 0); changeDataInLocalConfigurationFile('MYSQL-DBASE', " 'dbase' => '", "',", postRequestElement('mysql','dbase'), 0); changeDataInLocalConfigurationFile('MYSQL-LOGIN', " 'login' => '", "',", postRequestElement('mysql','login'), 0); changeDataInLocalConfigurationFile('MYSQL-PASSWORD', " 'password' => '", "',", postRequestElement('mysql','pass1'), 0); changeDataInLocalConfigurationFile('MYSQL-PREFIX', "setConfigEntry('_MYSQL_PREFIX', '", "');", postRequestElement('mysql','prefix'), 0); changeDataInLocalConfigurationFile('TABLE-TYPE', "setConfigEntry('_TABLE_TYPE', '", "');", postRequestElement('mysql','type'), 0); changeDataInLocalConfigurationFile('SMTP-HOSTNAME', "setConfigEntry('SMTP_HOSTNAME', '", "');", postRequestElement('smtp_host'), 0); changeDataInLocalConfigurationFile('SMTP-USER', "setConfigEntry('SMTP_USER', '", "');", postRequestElement('smtp_user'), 0); changeDataInLocalConfigurationFile('SMTP-PASSWORD', "setConfigEntry('SMTP_PASSWORD', '", "');", postRequestElement('smtp_pass1'), 0); // Generate a long site key $siteKey = generatePassword(50); // And write it changeDataInLocalConfigurationFile('SITE-KEY', "setConfigEntry('SITE_KEY', '", "');", $siteKey, 0); // Script is now installed changeDataInLocalConfigurationFile('INSTALLED', "setConfigEntry('MXCHANGE_INSTALLED', '", "');", 'Y', 0); } // Adds a given template with content to install output stream function addTemplateToInstallContent ($template, $content = array()) { // Load the template $out = loadTemplate($template, true, $content); // Add it to output addToInstallContent($out); } // Add it to install content function addToInstallContent ($out) { // Set or add it... if (!isset($GLOBALS['install_content'])) { // Set it $GLOBALS['install_content'] = $out; } else { // Add it $GLOBALS['install_content'] .= $out; } // END - if } // Somewhat getter for installer content function getInstallerContent () { // Is it here? if (isset($GLOBALS['install_content'])) { // Yes, then use it $content = $GLOBALS['install_content']; } else { // Nothing found, this needs fixing $content = displayMessage('{--INSTALLER_CONTENT_404--}', true); } // Return content return $content; } // Read a given SQL dump function readSqlDump ($FQFN) { // Load the file $content = readFromFile($FQFN); // Remove some unwanted chars $content = str_replace("\r", '', $content); $content = str_replace("\n\n", "\n", $content); // Return the content return $content; } // [EOF] ?>