New Feature: Maintenance Mode

Maintenance Mode

when enabled user/customer will not be able to login, a maintenance page will be displayed instead.

but all admin users can login
This commit is contained in:
Focuslinkstech
2024-05-21 00:22:40 +01:00
committed by Ibnu Maksum
parent 0bad687f7a
commit 533d46bbf5
6 changed files with 543 additions and 181 deletions

View File

@ -322,3 +322,16 @@ function _alert($text, $type = 'success', $url = "home", $time = 3)
if (!isset($api_secret)) {
$api_secret = $db_password;
}
function displayMaintenanceMessage(): void
{
global $config, $ui;
$date = $config['maintenance_date'];
if ($date){
$ui->assign('date', $date);
}
http_response_code(503);
$ui->assign('companyName', $config['CompanyName']);
$ui->display('maintenance.tpl');
die();
}