';
echo '
'; echo '
';
-html_print_image(ui_get_custom_header_logo());
+html_print_image(ui_get_custom_header_logo(true));
echo '
';
echo '' . __('To get your %s Enterprise License:', get_product_name()) . ''; echo '
- ';
diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php
index c885b1f2cc..dfa3758309 100755
--- a/pandora_console/godmode/setup/setup_visuals.php
+++ b/pandora_console/godmode/setup/setup_visuals.php
@@ -179,6 +179,32 @@ if(!enterprise_installed()){
$open=true;
}
+// Custom favicon
+$files = list_files('images/custom_favicon', "ico", 1, 0);
+$table_styles->data[$row][0] = __('Custom favicon');
+$table_styles->data[$row][0] .= ui_print_help_tip(__('You can place your favicon into the folder images/custom_favicon/. This file should be in .ico format with a size of 16x16.'), true);
+$table_styles->data[$row][1] = html_print_select(
+ $files,
+ 'custom_favicon',
+ $config["custom_favicon"],
+ 'setup_visuals_change_favicon();',
+ __('Default'),
+ '',
+ true,
+ false,
+ true,
+ '',
+ false,
+ 'width:240px'
+);
+$table_styles->data[$row][1] .= " " . html_print_image(
+ ui_get_favicon(),
+ true,
+ array('id' => 'favicon_preview')
+);
+$row++;
+
+$table_styles->data[$row][0] = __('Custom background logo');
$table_styles->data[$row][1] = html_print_select ($backgrounds_list,
'login_background', $config["login_background"], '', __('Default'),
'', true,false,true,'',false,'width:240px');
@@ -187,7 +213,6 @@ $table_styles->data[$row][1] .= " " .
$row++;
$table_styles->data[$row][0] = __('Custom logo (header)') . ui_print_help_icon("custom_logo", true);
-
if(enterprise_installed()){
$ent_files = list_files('enterprise/images/custom_logo', "png", 1, 0);
$open_files = list_files('images/custom_logo', "png", 1, 0);
@@ -201,8 +226,24 @@ else{
list_files('images/custom_logo', "png", 1, 0), 'custom_logo',
$config["custom_logo"], '', '', '',true,false,true,'',$open,'width:240px');
}
+$table_styles->data[$row][1] .= " " . html_print_button(__("View"), 'custom_logo_preview', $open, '', 'class="sub camera logo_preview"', true,false,$open,'visualmodal');
+$row++;
+
+$table_styles->data[$row][0] = __('Custom logo (header white background)');
+if(enterprise_installed()){
+ $ent_files = list_files('enterprise/images/custom_logo', "png", 1, 0);
+ $open_files = list_files('images/custom_logo', "png", 1, 0);
- $table_styles->data[$row][1] .= " " . html_print_button(__("View"), 'custom_logo_preview', $open, '', 'class="sub camera logo_preview"', true,false,$open,'visualmodal');
+ $table_styles->data[$row][1] = html_print_select(
+ array_merge($open_files, $ent_files), 'custom_logo_white_bg',
+ $config["custom_logo_white_bg"], '', '', '',true,false,true,'',$open,'width:240px');
+}
+else{
+ $table_styles->data[$row][1] = html_print_select(
+ list_files('images/custom_logo', "png", 1, 0), 'custom_logo_white_bg',
+ $config["custom_logo_white_bg"], '', '', '',true,false,true,'',$open,'width:240px');
+}
+$table_styles->data[$row][1] .= " " . html_print_button(__("View"), 'custom_logo_white_bg_preview', $open, '', 'class="sub camera logo_preview"', true,false,$open,'visualmodal');
$row++;
$table_styles->data[$row][0] = __('Custom logo (login)') . ui_print_help_icon("custom_logo", true);
@@ -230,7 +271,6 @@ if(enterprise_installed()) {
$config["custom_splash_login"], '', '', '',true,false,true,'',$open,'width:240px');
$table_styles->data[$row][1] .= " " . html_print_button(__("View"), 'custom_splash_login_preview', $open, '', 'class="sub camera logo_preview"', true,false,$open,'visualmodal');
-
$row++;
}
@@ -298,6 +338,26 @@ if(enterprise_installed()){
);
$table_styles->data[$row][1] .= " " . html_print_button(__("View"), 'custom_network_center_logo_preview', $open, '', 'class="sub camera logo_preview"', true,false,$open,'visualmodal');
$row++;
+
+ // Custom center mobile console icon
+ $table_styles->data[$row][0] = __('Custom mobile console icon');
+ $table_styles->data[$row][0] .= ui_print_help_tip(__('You can place your custom logos into the folder enterprise/images/custom_general_logos/'), true);
+ $table_styles->data[$row][1] = html_print_select(
+ $files,
+ 'custom_mobile_console_logo',
+ $config["custom_mobile_console_logo"],
+ '',
+ __('Default'),
+ '',
+ true,
+ false,
+ true,
+ '',
+ false,
+ 'width:240px'
+ );
+ $table_styles->data[$row][1] .= " " . html_print_button(__("View"), 'custom_mobile_console_logo_preview', $open, '', 'class="sub camera logo_preview"', true,false,$open,'visualmodal');
+ $row++;
}
//login title1
@@ -1135,13 +1195,22 @@ $(document).ready (function () {
});
});
+// Change the favicon preview when is changed
+function setup_visuals_change_favicon(meta) {
+ var icon_name = $("select#custom_favicon option:selected").val();
+ var icon_path = (icon_name == "")
+ ? "images/pandora.ico"
+ : "images/custom_favicon/" + icon_name;
+ $("#favicon_preview").attr("src", "" + icon_path);
+}
+
// Dialog loaders for the images previews
$(".logo_preview").click (function(e) {
// Init the vars
var icon_name = '';
var icon_path = '';
var options = {
- title: ""
+ title: ""
};
// Fill it seing the target has been clicked
@@ -1151,6 +1220,10 @@ $(".logo_preview").click (function(e) {
icon_path = "images/custom_logo/" + icon_name;
options.grayed = true;
break;
+ case 'button-custom_logo_white_bg_preview':
+ icon_name = $("select#custom_logo_white_bg option:selected").val();
+ icon_path = "images/custom_logo/" + icon_name;
+ break;
case 'button-custom_logo_login_preview':
icon_name = $("select#custom_logo_login option:selected").val();
icon_path = "images/custom_logo_login/" + icon_name;
@@ -1175,6 +1248,11 @@ $(".logo_preview").click (function(e) {
icon_name = $("select#custom_network_center_logo option:selected").val();
icon_path = "enterprise/images/custom_general_logos/" + icon_name;
break;
+ case 'button-custom_mobile_console_logo_preview':
+ icon_name = $("select#custom_mobile_console_logo option:selected").val();
+ icon_path = "enterprise/images/custom_general_logos/" + icon_name;
+ options.title = "";
+ break;
case 'button-login_background_preview':
icon_name = $("select#login_background option:selected").val();
icon_path = "/images/backgrounds/" + icon_name;
diff --git a/pandora_console/images/custom_favicon/favicon_meta.ico b/pandora_console/images/custom_favicon/favicon_meta.ico
new file mode 100644
index 0000000000..71713c757f
Binary files /dev/null and b/pandora_console/images/custom_favicon/favicon_meta.ico differ
diff --git a/pandora_console/images/custom_favicon/pandora.ico b/pandora_console/images/custom_favicon/pandora.ico
new file mode 100644
index 0000000000..f72d6cee90
Binary files /dev/null and b/pandora_console/images/custom_favicon/pandora.ico differ
diff --git a/pandora_console/images/custom_logo/pandora_logo_head_white_bg.png b/pandora_console/images/custom_logo/pandora_logo_head_white_bg.png
new file mode 100755
index 0000000000..56d101e463
Binary files /dev/null and b/pandora_console/images/custom_logo/pandora_logo_head_white_bg.png differ
diff --git a/pandora_console/images/custom_logo/pandora_logo_head_white_bg_2.png b/pandora_console/images/custom_logo/pandora_logo_head_white_bg_2.png
new file mode 100644
index 0000000000..9591e2fab1
Binary files /dev/null and b/pandora_console/images/custom_logo/pandora_logo_head_white_bg_2.png differ
diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php
index 472744c66c..395d83731c 100644
--- a/pandora_console/include/functions_config.php
+++ b/pandora_console/include/functions_config.php
@@ -500,8 +500,12 @@ function config_update_config () {
if (!config_update_value ('flash_charts', (bool) get_parameter ('flash_charts')))
$error_update[] = __('Interactive charts');
+ if (!config_update_value ('custom_favicon', (string) get_parameter ('custom_favicon')))
+ $error_update[] = __('Custom favicon');
if (!config_update_value ('custom_logo', (string) get_parameter ('custom_logo')))
$error_update[] = __('Custom logo');
+ if (!config_update_value ('custom_logo_white_bg', (string) get_parameter ('custom_logo_white_bg')))
+ $error_update[] = __('Custom logo white background');
if (!config_update_value ('custom_logo_login', (string) get_parameter ('custom_logo_login')))
$error_update[] = __('Custom logo login');
if (!config_update_value ('custom_splash_login', (string) get_parameter ('custom_splash_login')))
@@ -509,9 +513,11 @@ function config_update_config () {
if (!config_update_value ('custom_docs_logo', (string) get_parameter ('custom_docs_logo')))
$error_update[] = __('Custom documentation logo');
if (!config_update_value ('custom_support_logo', (string) get_parameter ('custom_support_logo')))
- $error_update[] = __('Custom networkmap center logo');
- if (!config_update_value ('custom_network_center_logo', (string) get_parameter ('custom_network_center_logo')))
$error_update[] = __('Custom support logo');
+ if (!config_update_value ('custom_network_center_logo', (string) get_parameter ('custom_network_center_logo')))
+ $error_update[] = __('Custom networkmap center logo');
+ if (!config_update_value ('custom_mobile_console_logo', (string) get_parameter ('custom_mobile_console_logo')))
+ $error_update[] = __('Custom networkmap center logo');
if (!config_update_value ('custom_title1_login', (string) get_parameter ('custom_title1_login')))
$error_update[] = __('Custom title1 login');
if (!config_update_value ('custom_title2_login', (string) get_parameter ('custom_title2_login')))
@@ -1189,11 +1195,19 @@ function config_process_config () {
if (!isset ($config["fixed_menu"])) {
config_update_value ('fixed_menu', false);
}
-
+
+ if (!isset ($config["custom_favicon"])) {
+ config_update_value ('custom_favicon', '');
+ }
+
if (!isset ($config["custom_logo"])) {
config_update_value ('custom_logo', 'pandora_logo_head_4.png');
}
+ if (!isset ($config["custom_logo_white_bg"])) {
+ config_update_value ('custom_logo_white_bg', 'pandora_logo_head_white_bg.png');
+ }
+
if (!isset ($config["custom_logo_login"])) {
config_update_value ('custom_logo_login', 'login_logo_v7.png');
}
@@ -1214,6 +1228,10 @@ function config_process_config () {
config_update_value ('custom_network_center_logo', '');
}
+ if (!isset ($config["custom_mobile_console_logo"])) {
+ config_update_value ('custom_mobile_console_logo', '');
+ }
+
if (!isset ($config["custom_title1_login"])) {
config_update_value ('custom_title1_login', __('WELCOME TO PANDORA FMS'));
}
diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php
index 5343fd7e23..42d839b81e 100755
--- a/pandora_console/include/functions_ui.php
+++ b/pandora_console/include/functions_ui.php
@@ -1355,14 +1355,9 @@ function ui_process_page_head ($string, $bitfield) {
';
- if(defined ('METACONSOLE')){
- $output .='';
- }
- else{
- $output .='';
- }
+ $output .='';
$output .='
-
+
';
if ($config["language"] != "en") {
@@ -3960,14 +3955,16 @@ function ui_get_support_logo () {
* @return string with the path to logo. If it is not set, return the default value
*
*/
-function ui_get_custom_header_logo () {
+function ui_get_custom_header_logo ($white_bg = false) {
global $config;
if (empty($config['enterprise_installed'])) {
return 'images/pandora_tinylogo_open.png';
}
- $stored_logo = is_metaconsole() ? $config['meta_custom_logo'] : $config['custom_logo'];
+ $stored_logo = is_metaconsole()
+ ? $config['meta_custom_logo']
+ : $white_bg ? $config['custom_logo_white_bg'] : $config['custom_logo'];
if (empty($stored_logo)) return 'images/pandora_tinylogo.png';
return 'enterprise/images/custom_logo/' . $stored_logo;
}
@@ -3987,4 +3984,41 @@ function ui_get_logo_to_center_networkmap () {
return 'enterprise/images/custom_general_logos/' . $config['custom_support_logo'];
}
+
+/**
+ * Get the mobile console login logo
+ *
+ * @return string with the path to logo. If it is not set, return the default.
+ *
+ */
+function ui_get_mobile_login_icon () {
+ global $config;
+
+ if ((!enterprise_installed()) || empty($config['custom_mobile_console_logo'])) {
+ return is_metaconsole()
+ ? "mobile/images/metaconsole_mobile.png"
+ : "mobile/images/pandora_mobile_console.png";
+ }
+
+ return 'enterprise/images/custom_general_logos/' . $config['custom_mobile_console_logo'];
+}
+
+/**
+ * Get the favicon
+ *
+ * @return string with the path to logo. If it is not set, return the default.
+ *
+ */
+function ui_get_favicon () {
+ global $config;
+
+ if (empty($config['custom_favicon'])) {
+ return !is_metaconsole()
+ ? "images/pandora.ico"
+ : "enterprise/meta/images/favicon_meta.ico";
+ }
+
+ return 'images/custom_favicon/' . $config['custom_favicon'];
+}
+
?>
diff --git a/pandora_console/mobile/include/user.class.php b/pandora_console/mobile/include/user.class.php
index ba16b537cf..82f10fd38e 100644
--- a/pandora_console/mobile/include/user.class.php
+++ b/pandora_console/mobile/include/user.class.php
@@ -226,11 +226,11 @@ class User {
$ui->showFooter(false);
$ui->beginContent();
- if (!$system->getConfig('metaconsole'))
- $logo_image = html_print_image ("mobile/images/pandora_mobile_console.png",
+ if ($system->getConfig('metaconsole'))
+ $logo_image = html_print_image (ui_get_mobile_login_icon(),
true, array ("alt" => "logo", "border" => 0));
else
- $logo_image = html_print_image ("mobile/images/metaconsole_mobile.png",
+ $logo_image = html_print_image (ui_get_mobile_login_icon(),
true, array ("alt" => "logo", "border" => 0),false, false, false, true);
$ui->contentAddHtml('
' .
@@ -289,7 +289,7 @@ class User {
$ui->showFooter(false);
$ui->beginContent();
$ui->contentAddHtml('
' .
- html_print_image ("mobile/images/pandora_mobile_console.png",
+ html_print_image (ui_get_mobile_login_icon(),
true, array ("alt" => "logo", "border" => 0)) .
'
');
$ui->contentAddHtml('');
diff --git a/pandora_console/operation/events/events_marquee.php b/pandora_console/operation/events/events_marquee.php
index 9ffea8f61d..e3b04e39da 100644
--- a/pandora_console/operation/events/events_marquee.php
+++ b/pandora_console/operation/events/events_marquee.php
@@ -110,7 +110,7 @@ echo "" . __("%s - Latest events", get_product_name()) . " ";
$query = ui_get_full_url();
echo '';
-echo '';
+echo '';
echo "";
echo "";
diff --git a/pandora_console/operation/events/sound_events.php b/pandora_console/operation/events/sound_events.php
index f9a89364a1..d8e3ce8cd3 100644
--- a/pandora_console/operation/events/sound_events.php
+++ b/pandora_console/operation/events/sound_events.php
@@ -61,7 +61,7 @@ echo "" . __("Sound Events") . " ";
}
';
+echo '';
echo '';
echo "";
echo "";
diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql
index 069d82186b..c8ed8f61cd 100644
--- a/pandora_console/pandoradb_data.sql
+++ b/pandora_console/pandoradb_data.sql
@@ -115,7 +115,8 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
('current_package_enterprise', '722'),
('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.0009765625":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'),
('custom_docs_logo', 'default_docs.png'),
-('custom_support_logo', 'default_support.png');
+('custom_support_logo', 'default_support.png'),
+('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
UNLOCK TABLES;
--