[Rebranding] Modified tinylogo by custom_logo in node

This commit is contained in:
fermin831 2018-05-22 13:40:23 +02:00
parent 0e3db1eb80
commit 2e8e3c27b6
4 changed files with 27 additions and 14 deletions

View File

@ -95,14 +95,14 @@ echo '<div id="header_login">';
if (file_exists (ENTERPRISE_DIR . "/load_enterprise.php")) {
if(isset ($config['custom_logo'])){
echo '<img src="enterprise/images/custom_logo/' . $config['custom_logo'] .'" alt="pandora_console">';
echo '<img src="enterprise/images/custom_logo/' . $config['custom_logo'] .'" alt="monitoring_console">';
}
else{
echo '<img src="images/custom_logo/pandora_logo_head_4.png" alt="pandora_console">';
echo '<img src="images/custom_logo/pandora_logo_head_4.png" alt="monitoring_console">';
}
}
else{
echo '<img src="images/custom_logo/pandora_logo_head_3.png" alt="pandora_console">';
echo '<img src="images/custom_logo/pandora_logo_head_3.png" alt="monitoring_console">';
}
echo '</div>';
echo '<div id="list_icon_docs_support"><ul style="line-height: 36px;">';

View File

@ -61,11 +61,12 @@ foreach ($files as $file) {
}
}
$logo = ui_get_custom_header_logo();
if (! $id || ! file_exists ($help_file)) {
echo '<div id="main_help" style="background-color: #fff;text-align:center; padding-top: 15px; padding-bottom: 15px; ">';
if (!is_metaconsole()) {
echo html_print_image('images/pandora_tinylogo.png', true, array("border" => '0'));
echo html_print_image($logo, true, array("border" => '0'));
}
echo '</div>';
echo '<div style="font-family: verdana, arial; font-size: 11px; text-align:left; background-color: #fff;">';
@ -86,16 +87,11 @@ if (! $id || ! file_exists ($help_file)) {
/* Show help */
echo '<div id="main_help_new" style="background-color: #fff">';
if (empty($config['enterprise_installed'])) {
echo html_print_image('images/pandora_tinylogo_open.png', true, array("border" => '0'));
if (!empty($config['enterprise_installed']) && is_metaconsole()) {
echo '<img src="' . $config["homeurl"] . $logo . '">';
}
else {
if (is_metaconsole()) {
echo '<img src="'.$config["homeurl"].'images/pandora_tinylogo.png">';
}
else{
echo html_print_image('images/pandora_tinylogo.png', true, array("border" => '0'));
}
echo html_print_image($logo, true, array("border" => '0'));
}
echo '</div>';
echo '<div id="main_help_new_content" style="height: auto ! important;overfloat: auto;">';

View File

@ -3956,4 +3956,21 @@ function ui_get_support_logo () {
return 'enterprise/images/custom_general_logos/' . $config['custom_support_logo'];
}
/**
* Get the custom header logo
*
* @return string with the path to logo. If it is not set, return the default value
*
*/
function ui_get_custom_header_logo () {
global $config;
if (empty($config['enterprise_installed'])) {
return 'images/pandora_tinylogo_open.png';
}
if (empty($config['custom_logo'])) return 'images/pandora_tinylogo.png';
return 'enterprise/images/custom_logo/' . $config['custom_logo'];
}
?>

View File

@ -702,7 +702,7 @@ if (! isset ($config['id_user'])) {
$cod_hash = $user_reset_pass . "::::" . md5(rand(10, 1000000) . rand(10, 1000000) . rand(10, 1000000));
$subject = '[Pandora] '.__('Reset password');
$subject = '[' . get_product_name() . '] '.__('Reset password');
$body = __('This is an automatically sent message for user ');
$body .= ' "<strong>' . $user_reset_pass . '"</strong>';
$body .= '<p />';
@ -710,7 +710,7 @@ if (! isset ($config['id_user'])) {
$body .= '<p />';
$body .= '<a href="' . $config['homeurl'] . 'index.php?reset_hash=' . $cod_hash . '">' . __('Reset your password') . '</a>';
$body .= '<p />';
$body .= 'Pandora FMS';
$body .= get_product_name();
$body .= '<p />';
$body .= '<em>'.__('Please do not reply to this email.').'</em>';