mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-03 17:54:41 +02:00
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:
parent
0bad687f7a
commit
533d46bbf5
6 changed files with 543 additions and 181 deletions
13
init.php
13
init.php
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue