mirror of
https://github.com/itflow-org/itflow
synced 2026-03-15 10:14:51 +00:00
Add Next Button if Database is already configured
This commit is contained in:
18
setup.php
18
setup.php
@@ -6,7 +6,6 @@ if (file_exists("config.php")) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
include "functions.php";
|
include "functions.php";
|
||||||
|
|
||||||
include "includes/database_version.php";
|
include "includes/database_version.php";
|
||||||
|
|
||||||
|
|
||||||
@@ -855,10 +854,19 @@ if (isset($_POST['add_telemetry'])) {
|
|||||||
<h3 class="card-title"><i class="fas fa-fw fa-database mr-2"></i>Step 2 - Connect your Database</h3>
|
<h3 class="card-title"><i class="fas fa-fw fa-database mr-2"></i>Step 2 - Connect your Database</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<?php if (file_exists('config.php')) { ?>
|
<?php
|
||||||
Database is already configured. Any further changes should be made by editing the config.php file,
|
if (file_exists('config.php')) {
|
||||||
or deleting it and refreshing this page.
|
|
||||||
<?php } else { ?>
|
echo "<p>Database is already configured. Any further changes should be made by editing the <code>config.php</code> file.</p>";
|
||||||
|
|
||||||
|
if (@$mysqli) {
|
||||||
|
echo "<a href='?user' class='btn btn-success text-bold mt-3'>Next Step (User Setup) <i class='fa fa-fw fa-arrow-circle-right ml-2'></i></a>";
|
||||||
|
} else {
|
||||||
|
echo "<div class='alert alert-danger mt-3'>Database connection failed. Check <code>config.php</code>.</div>";
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
<form method="post" autocomplete="off">
|
<form method="post" autocomplete="off">
|
||||||
|
|
||||||
<h5>Database Connection Details</h5>
|
<h5>Database Connection Details</h5>
|
||||||
|
|||||||
Reference in New Issue
Block a user