// Okay, we have to check it
if (!empty($_POST['smtp_user']) && (empty($_POST['smtp_host']))) {
// Hostname not set
- OUTPUT_HTML(INSTALL_SMTP_HOSTNAME_EMPTY."<br />");
+ OUTPUT_HTML(getMessage('INSTALL_SMTP_HOSTNAME_EMPTY')."<br />");
$_GET['page'] = 3;
} // END - if
if ((empty($_POST['smtp_pass1'])) && (!empty($_POST['smtp_pass2']))) {
// Password is empty
- OUTPUT_HTML(INSTALL_SMTP_PASS1_EMPTY."<br />");
+ OUTPUT_HTML(getMessage('INSTALL_SMTP_PASS1_EMPTY')."<br />");
$_GET['page'] = 3;
} // END - if
if ((!empty($_POST['smtp_pass1'])) && (empty($_POST['smtp_pass2']))) {
// Password repeat is empty
- OUTPUT_HTML(INSTALL_SMTP_PASS2_EMPTY."<br />");
+ OUTPUT_HTML(getMessage('INSTALL_SMTP_PASS2_EMPTY')."<br />");
$_GET['page'] = 3;
} // END - if
if ($_POST['smtp_pass1'] != $_POST['smtp_pass1']) {
// Passwords are not matching
- OUTPUT_HTML(INSTALL_SMTP_PASS_MISMATCH."<br />");
+ OUTPUT_HTML(getMessage('INSTALL_SMTP_PASS_MISMATCH')."<br />");
$_GET['page'] = 3;
} // END - if
} // END - if
define('__EMAIL_VALUE' , $_POST['email']);
// Use default SMTP data
- $smtpHost = SMTP_HOSTNAME;
- $smtpUser = SMTP_USER;
- $smtpPass1 = SMTP_PASSWORD;
- $smtpPass2 = SMTP_PASSWORD;
+ $smtpHost = constant('SMTP_HOSTNAME');
+ $smtpUser = constant('SMTP_USER');
+ $smtpPass1 = constant('SMTP_PASSWORD');
+ $smtpPass2 = constant('SMTP_PASSWORD');
// Overwrite it with the data from sent (failed) form
if (!empty($_POST['smtp_host'])) $smtpHost = $_POST['smtp_host'];
if (isBooleanConstantAndTrue('warn_no_pass')) OUTPUT_HTML(" selected=\"selected\"");
OUTPUT_HTML(">{!YES!}</option>
<option value=\"false\"");
- if (!defined('warn_no_pass')) OUTPUT_HTML(" selected=\"selected\"");
+ if (!isBooleanConstantAndTrue('warn_no_pass')) OUTPUT_HTML(" selected=\"selected\"");
OUTPUT_HTML(">{!NO!}</option>
</select>
</td>
if (isBooleanConstantAndTrue('WRITE_FOOTER')) OUTPUT_HTML(" selected=\"selected\"");
OUTPUT_HTML(">{!YES!}</option>
<option value=\"false\"");
- if (!defined('WRITE_FOOTER')) OUTPUT_HTML(" selected=\"selected\"");
+ if (!isBooleanConstantAndTrue('WRITE_FOOTER')) OUTPUT_HTML(" selected=\"selected\"");
OUTPUT_HTML(">{!NO!}</option>
</select>
</td>
<td>
<select name=\"blink\" size=\"1\" class=\"install_select\">
<option value=\"true\"");
- if (ENABLE_BACKLINK) OUTPUT_HTML(" selected=\"selected\"");
+ if (isBooleanConstantAndTrue('ENABLE_BACKLINK')) OUTPUT_HTML(" selected=\"selected\"");
OUTPUT_HTML(">{!YES!}</option>
<option value=\"false\"");
- if (!ENABLE_BACKLINK) OUTPUT_HTML(" selected=\"selected\"");
+ if (!isBooleanConstantAndTrue('ENABLE_BACKLINK')) OUTPUT_HTML(" selected=\"selected\"");
OUTPUT_HTML(">{!NO!}</option>
</select>
</td>
// Are some SQLs found?
if (count($SQLs) == 0) {
// Abort here
- addFatalMessage(INSTALL_SQL_IMPORT_FAILED);
+ addFatalMessage(getMessage('INSTALL_SQL_IMPORT_FAILED'));
return;
} // END - if
} // END - foreach
// Ok, all done. So we can write the config data to the php files
- if ($_POST['spath'] != PATH) install_WriteData($_POST['spath']."inc/config.php", "SERVER-PATH", "define('PATH', \"", "\");", $_POST['spath'], 0);
- if ($_POST['burl'] != URL) install_WriteData($_POST['spath']."inc/config.php", "HOST-URL", "define('URL', \"", "\");", $_POST['burl'], 0);
+ if ($_POST['spath'] != constant('PATH')) install_WriteData($_POST['spath']."inc/config.php", "SERVER-PATH", "define('PATH', \"", "\");", $_POST['spath'], 0);
+ if ($_POST['burl'] != constant('URL')) install_WriteData($_POST['spath']."inc/config.php", "HOST-URL", "define('URL', \"", "\");", $_POST['burl'], 0);
install_WriteData($_POST['spath']."inc/config.php", "MAIN_TITLE", "define('MAIN_TITLE', \"", "\");", $_POST['title'], 0);
install_WriteData($_POST['spath']."inc/config.php", "SLOGAN", "define('SLOGAN', \"", "\");", $_POST['slogan'], 0);
install_WriteData($_POST['spath']."inc/config.php", "WEBMASTER", "define('WEBMASTER', \"", "\");", $_POST['email'], 0);
install_WriteData($_POST['spath']."inc/config.php", "INSTALLED", "define('mxchange_installed', ", ");", "true", 0);
} else {
// Installation area not found!
- addFatalMessage(INSTALL_MISSING_DUMPS);
+ addFatalMessage(getMessage('INSTALL_MISSING_DUMPS'));
}
} // END - if
} // END - if
LOAD_TEMPLATE("install_finished");
} else {
// Something goes wrong during installation! :-(
- addFatalMessage(INSTALL_FINALIZER_FAILED);
+ addFatalMessage(getMessage('INSTALL_FINALIZER_FAILED'));
LOAD_INC("inc/fatal_errors.php");
}
break;