[UPDATE] alert styles

This commit is contained in:
iAmShorty 2014-05-05 14:27:38 +02:00
parent 8351cffab8
commit 2c24099e93
2 changed files with 19 additions and 1 deletions

View File

@ -20,6 +20,13 @@ $aSettings['website'][] = array(
'name' => 'system_motd', 'value' => $setting->getValue('system_motd'),
'tooltip' => 'Display a message of the day as information popup if set.'
);
$aSettings['website'][] = array(
'display' => 'MOTD Style', 'type' => 'select',
'options' => array( 0 => 'Success', 1 => 'Information', 2 => 'Warning', 3 => 'Danger' ),
'default' => 0,
'name' => 'motd_style', 'value' => $setting->getValue('motd_style'),
'tooltip' => 'Set the Style what MOTD looks like.'
);
$aSettings['website'][] = array(
'display' => 'Website Name', 'type' => 'text',
'size' => 25,

View File

@ -188,7 +188,18 @@ if (@$_SESSION['USERDATA']['id']) {
if ($setting->getValue('maintenance'))
$_SESSION['POPUP'][] = array('CONTENT' => 'This pool is currently in maintenance mode.', 'TYPE' => 'alert alert-warning');
if ($motd = $setting->getValue('system_motd'))
$_SESSION['POPUP'][] = array('CONTENT' => $motd, 'DISMISS' => 'yes', 'ID' => 'motd', 'TYPE' => 'alert alert-info');
if ($setting->getValue('motd_style') == 0) {
$motd_style = "alert-success";
} else if ($setting->getValue('motd_style') == 1) {
$motd_style = "alert-info";
} else if ($setting->getValue('motd_style') == 2) {
$motd_style = "alert-warning";
} else if ($setting->getValue('motd_style') == 3) {
$motd_style = "alert-danger";
} else {
$motd_style = "alert-info";
}
$_SESSION['POPUP'][] = array('CONTENT' => $motd, 'DISMISS' => 'yes', 'ID' => 'motd', 'TYPE' => 'alert ' . $motd_style . '');
// check for deprecated theme
if ($setting->getValue('website_theme') == "mpos")