forked from kevinowino869/mitrobill
commit
db49b9693b
@ -161,8 +161,11 @@ class User
|
|||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
if ($config['maintenance_mode'] == true) {
|
if ($config['maintenance_mode'] == true) {
|
||||||
displayMaintenanceMessage();
|
if ($config['maintenance_mode_logout'] == true) {
|
||||||
// r2(U . 'logout', 'd', '');
|
r2(U . 'logout', 'd', '');
|
||||||
|
} else {
|
||||||
|
displayMaintenanceMessage();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!$id) {
|
if (!$id) {
|
||||||
$id = User::getID();
|
$id = User::getID();
|
||||||
|
@ -775,10 +775,12 @@ switch ($action) {
|
|||||||
}
|
}
|
||||||
if (_post('save') == 'save') {
|
if (_post('save') == 'save') {
|
||||||
$status = isset($_POST['maintenance_mode']) ? 1 : 0; // Checkbox returns 1 if checked, otherwise 0
|
$status = isset($_POST['maintenance_mode']) ? 1 : 0; // Checkbox returns 1 if checked, otherwise 0
|
||||||
|
$force_logout = isset($_POST['maintenance_mode_logout']) ? 1 : 0; // Checkbox returns 1 if checked, otherwise 0
|
||||||
$date = isset($_POST['maintenance_date']) ? $_POST['maintenance_date'] : null;
|
$date = isset($_POST['maintenance_date']) ? $_POST['maintenance_date'] : null;
|
||||||
|
|
||||||
$settings = [
|
$settings = [
|
||||||
'maintenance_mode' => $status,
|
'maintenance_mode' => $status,
|
||||||
|
'maintenance_mode_logout' => $force_logout,
|
||||||
'maintenance_date' => $date
|
'maintenance_date' => $date
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -74,6 +74,16 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-md-2 control-label">{Lang::T('Force Logout:')}</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label class="switch">
|
||||||
|
<input type="checkbox" id="maintenance_mode_logout" value="1"
|
||||||
|
name="maintenance_mode_logout" {if $_c['maintenance_mode_logout']==1}checked{/if}>
|
||||||
|
<span class="slider"></span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2 control-label">{Lang::T('End Date:')}</label>
|
<label class="col-md-2 control-label">{Lang::T('End Date:')}</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user