Rework the logic of index.php

This commit is contained in:
Jeroen 2022-08-21 12:19:11 +02:00
parent 15cae2e64a
commit ee08edf6bc
Signed by: jeroen
GPG Key ID: 7C7028F783798BAB

View File

@ -17,27 +17,11 @@
//
// -none-
//
if (!file_exists(realpath("./setup.php"))) {
if (file_exists(realpath("./config.inc.php"))) {
header ("Location: login.php");
exit;
die();
} else {
print <<< EOF
<html>
<head>
<title>Welcome to OpenSMTPD Admin</title>
</head>
<body>
<img id="login_header_logo" src="images/postbox.png" />
<img id="login_header_logo" src="images/opensmtpdadmin.png" />
<h1>Welcome to OpenSMTPD Admin</h1>
It seems that you are running this version of OpenSMTPD Admin for the first time.<br />
<p />
You can now run <a href="setup.php">setup</a> to make sure that all the functions are available for OpenSMTPD Admin to run.<br />
<p />
If you still encounter any problems please check the documentation and website for more information.
<p />
</body>
</html>
EOF;
header ("Location: setup.php");
die();
}
?>