[UPDATE] switch instead of if
This commit is contained in:
parent
2c24099e93
commit
7358b420f1
@ -24,7 +24,7 @@ $aSettings['website'][] = array(
|
|||||||
'display' => 'MOTD Style', 'type' => 'select',
|
'display' => 'MOTD Style', 'type' => 'select',
|
||||||
'options' => array( 0 => 'Success', 1 => 'Information', 2 => 'Warning', 3 => 'Danger' ),
|
'options' => array( 0 => 'Success', 1 => 'Information', 2 => 'Warning', 3 => 'Danger' ),
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
'name' => 'motd_style', 'value' => $setting->getValue('motd_style'),
|
'name' => 'system_motd_style', 'value' => $setting->getValue('system_motd_style'),
|
||||||
'tooltip' => 'Set the Style what MOTD looks like.'
|
'tooltip' => 'Set the Style what MOTD looks like.'
|
||||||
);
|
);
|
||||||
$aSettings['website'][] = array(
|
$aSettings['website'][] = array(
|
||||||
|
|||||||
@ -188,16 +188,21 @@ if (@$_SESSION['USERDATA']['id']) {
|
|||||||
if ($setting->getValue('maintenance'))
|
if ($setting->getValue('maintenance'))
|
||||||
$_SESSION['POPUP'][] = array('CONTENT' => 'This pool is currently in maintenance mode.', 'TYPE' => 'alert alert-warning');
|
$_SESSION['POPUP'][] = array('CONTENT' => 'This pool is currently in maintenance mode.', 'TYPE' => 'alert alert-warning');
|
||||||
if ($motd = $setting->getValue('system_motd'))
|
if ($motd = $setting->getValue('system_motd'))
|
||||||
if ($setting->getValue('motd_style') == 0) {
|
switch ($setting->getValue('system_motd_style')) {
|
||||||
$motd_style = "alert-success";
|
case 0:
|
||||||
} else if ($setting->getValue('motd_style') == 1) {
|
$motd_style = "alert-success";
|
||||||
$motd_style = "alert-info";
|
break;
|
||||||
} else if ($setting->getValue('motd_style') == 2) {
|
case 1:
|
||||||
$motd_style = "alert-warning";
|
$motd_style = "alert-info";
|
||||||
} else if ($setting->getValue('motd_style') == 3) {
|
break;
|
||||||
$motd_style = "alert-danger";
|
case 2:
|
||||||
} else {
|
$motd_style = "alert-warning";
|
||||||
$motd_style = "alert-info";
|
break;
|
||||||
|
case 3:
|
||||||
|
$motd_style = "alert-danger";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$motd_style = "alert-info";
|
||||||
}
|
}
|
||||||
$_SESSION['POPUP'][] = array('CONTENT' => $motd, 'DISMISS' => 'yes', 'ID' => 'motd', 'TYPE' => 'alert ' . $motd_style . '');
|
$_SESSION['POPUP'][] = array('CONTENT' => $motd, 'DISMISS' => 'yes', 'ID' => 'motd', 'TYPE' => 'alert ' . $motd_style . '');
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user