} else {
$next++;
}
- }
+ } // END - if
//* DEBUG: */ echo "WRITE: <font color=\"green\">".htmlentities($line)."</font><br />\n";
fputs($fp_tmp, $line);
- }
+ } // END - while
fclose($fp_tmp);
// Finished writing tmp file
$done = true;
- }
+ } // END - if
// Close source directory
fclose($fp);
} else {
OUTPUT_HTML("<STRONG>TMP:</STRONG> UNDONE!");
}
- }
+ } // END - if
} else {
OUTPUT_HTML("<STRONG>404:</STRONG> ".$file."<br />");
}
// Hostname not set
OUTPUT_HTML(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 />");
$_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 />");
$_GET['page'] = 3;
- }
+ } // END - if
if ($_POST['smtp_pass1'] != $_POST['smtp_pass1']) {
// Passwords are not matching
OUTPUT_HTML(INSTALL_SMTP_PASS_MISMATCH."<br />");
$_GET['page'] = 3;
- }
-}
+ } // END - if
+} // END - if
// Is MXChange installed or no admin registered so far?
if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndTrue('admin_registered')))
// And split it up against ;\n ...
$SQLs = array_merge($SQLs, explode(";\n", $sql));
- }
- }
+ } // END - if
+ } // END - foreach
// Are some SQLs found?
if (count($SQLs) == 0) {
// Abort here
ADD_FATAL(INSTALL_SQL_IMPORT_FAILED);
return;
- }
+ } // END - if
// Now run all queries through and try to keep out empty or comment queries
foreach ($SQLs as $sql) {
if ((!empty($sql)) && (substr($sql, 0, 2) != "--") && (substr($sql, 0, 1) != "#")) {
// Then run it!
SQL_QUERY($sql, __FILE__, __LINE__);
- }
- }
+ } // 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);
// Close the link
SQL_CLOSE($link, __FILE__, __LINE__);
- }
- else
- {
+ } else {
// Installation area not found!
ADD_FATAL(INSTALL_MISSING_DUMPS);
}
- }
- }
- if ((sizeof($FATAL) > 0) || ((isset($FATAL[0])) && ($FATAL[0] != '')))
- {
+ } // END - if
+ } // END - if
+
+ if ((sizeof($FATAL) > 0) || ((isset($FATAL[0])) && ($FATAL[0] != ''))) {
$OUT = "";
- foreach ($FATAL as $value)
- {
+ foreach ($FATAL as $value) {
$OUT .= " <LI>".$value."</LI>\n";
- }
+ } // END foreach
define('__FATAL_ERROR_LI', $OUT);
$OUT = "";
- foreach ($mysql as $key => $value)
- {
+ foreach ($mysql as $key => $value) {
$OUT .= " <INPUT type=\"hidden\" name=\"mysql[".$key."]\" value=\"".$value."\">\n";
- }
+ } // END foreach
define('__MYSQL_DATA' , $OUT);
define('__SPATH_VALUE' , $_POST['spath']);
define('__BURL_VALUE' , $_POST['burl']);
</TR>
</TABLE>
</FORM>");
- }
- else
- {
+ } else {
// Installation is done!
- $URL = $burl."/install.php?page=finalize";
- LOAD_URL($URL);
+ LOAD_URL($burl."/install.php?page=finalize");
}
- }
- elseif (isBooleanConstantAndTrue('mxchange_installed'))
- {
+ } elseif (isBooleanConstantAndTrue('mxchange_installed')) {
// Redirection after writing data... :-)
LOAD_TEMPLATE("install_finished");
- }
- else
- {
+ } else {
// Something goes wrong during installation! :-(
ADD_FATAL(INSTALL_FINALIZER_FAILED);
include ("inc/fatal_errors.php");
OUTPUT_HTML(" <STRONG class=\"install_error\">".WRONG_PAGE."</STRONG>");
break;
}
-}
- else
-{
+} else {
ADD_FATAL(ALREADY_INSTALLED);
}
//