X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Finstall-inc.php;h=5768d4807b22dc8bc1490d9b2e3e492afa492102;hp=58b56350cd7e3ba7d5a728e4e4be02aa01ed8b23;hb=5b498995f1792ba5972d782b63cd5cb044727c21;hpb=4ef4c88fc481335dc0631b223111c15a84cccb51
diff --git a/inc/install-inc.php b/inc/install-inc.php
index 58b56350cd..5768d4807b 100644
--- a/inc/install-inc.php
+++ b/inc/install-inc.php
@@ -36,7 +36,7 @@
************************************************************************/
// Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
+if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
@@ -71,15 +71,15 @@ function install_WriteData ($file, $comment, $prefix, $suffix, $DATA, $sneak=0)
} else {
$next++;
}
- }
+ } // END - if
//* DEBUG: */ echo "WRITE: ".htmlentities($line)."
\n";
fputs($fp_tmp, $line);
- }
+ } // END - while
fclose($fp_tmp);
// Finished writing tmp file
$done = true;
- }
+ } // END - if
// Close source directory
fclose($fp);
@@ -91,7 +91,7 @@ function install_WriteData ($file, $comment, $prefix, $suffix, $DATA, $sneak=0)
} else {
OUTPUT_HTML("TMP: UNDONE!");
}
- }
+ } // END - if
} else {
OUTPUT_HTML("404: ".$file."
");
}
@@ -104,7 +104,7 @@ if (isset($_POST['mysql']) && is_array($_POST['mysql'])) $mysql = $_POST['mysql'
if (URL != "http://your-server.com") {
// Already installed???
$burl = URL;
-} elseif ($burl == "") {
+} elseif (empty($burl)) {
// Auto-detect URL
$burl = "http://".$SERVER_NAME.$_SERVER['PHP_SELF'];
$burl = substr($burl, 0, strpos($burl, "install.php"));
@@ -117,23 +117,23 @@ if ((isset($_GET['page']) && ($_GET['page'] == 5))) {
// Hostname not set
OUTPUT_HTML(INSTALL_SMTP_HOSTNAME_EMPTY."
");
$_GET['page'] = 3;
- }
+ } // END - if
if ((empty($_POST['smtp_pass1'])) && (!empty($_POST['smtp_pass2']))) {
// Password is empty
OUTPUT_HTML(INSTALL_SMTP_PASS1_EMPTY."
");
$_GET['page'] = 3;
- }
+ } // END - if
if ((!empty($_POST['smtp_pass1'])) && (empty($_POST['smtp_pass2']))) {
// Password repeat is empty
OUTPUT_HTML(INSTALL_SMTP_PASS2_EMPTY."
");
$_GET['page'] = 3;
- }
+ } // END - if
if ($_POST['smtp_pass1'] != $_POST['smtp_pass1']) {
// Passwords are not matching
OUTPUT_HTML(INSTALL_SMTP_PASS_MISMATCH."
");
$_GET['page'] = 3;
- }
-}
+ } // END - if
+} // END - if
// Is MXChange installed or no admin registered so far?
if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndTrue('admin_registered')))
@@ -166,7 +166,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT
if (empty($mysql['prefix'])) $mysql['prefix'] = "mxchange_";
if ((sizeof($FATAL) > 0) || (!empty($FATAL[0]))) {
OUTPUT_HTML("");
- foreach ($FATAL as $key=>$err) {
+ foreach ($FATAL as $key => $err) {
OUTPUT_HTML(" · ".FATAL_NO.($key + 1).": ".$err."
");
}
OUTPUT_HTML("
");
@@ -275,7 +275,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT
if (isBooleanConstantAndTrue('warn_no_pass')) OUTPUT_HTML(" selected=\"selected\"");
OUTPUT_HTML(">".YES."
@@ -289,7 +289,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT
if (isBooleanConstantAndTrue('WRITE_FOOTER')) OUTPUT_HTML(" selected=\"selected\"");
OUTPUT_HTML(">".YES."
@@ -311,7 +311,7 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT