Fixes database connection

main
Yasen Pramatarov 2024-11-09 13:06:43 +02:00
parent a272d50174
commit b015ef275f
1 changed files with 7 additions and 1 deletions

View File

@ -97,7 +97,13 @@ if ( !isset($_COOKIE['username']) && ($page !== 'login' && $page !== 'register')
// connect to db of Jilo Web // connect to db of Jilo Web
require '../app/classes/database.php'; require '../app/classes/database.php';
require '../app/helpers/database.php'; require '../app/helpers/database.php';
$dbWeb = connectDB($config); $response = connectDB($config);
if ($response['db'] === null) {
$error = $response['error'];
include '../app/templates/block-message.php';
} else {
$dbWeb = $response['db'];
}
// start logging // start logging
require '../app/classes/log.php'; require '../app/classes/log.php';