2023-02-13 13:26:49 +01:00
|
|
|
<?php
|
|
|
|
/**
|
2023-02-17 12:53:35 +01:00
|
|
|
* Dashboards View tips in modal
|
2023-02-13 13:26:49 +01:00
|
|
|
*
|
|
|
|
* @category Console Class
|
2023-02-17 12:53:35 +01:00
|
|
|
* @package Pandora FMS
|
2023-02-13 13:26:49 +01:00
|
|
|
* @subpackage Dashboards
|
2023-02-17 12:53:35 +01:00
|
|
|
* @version 1.0.0
|
|
|
|
* @license See below
|
2023-02-13 13:26:49 +01:00
|
|
|
*
|
2023-02-17 12:53:35 +01:00
|
|
|
* ______ ___ _______ _______ ________
|
|
|
|
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
|
|
|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
2023-02-13 13:26:49 +01:00
|
|
|
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
|
|
|
*
|
|
|
|
* ============================================================================
|
|
|
|
* Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
|
|
|
|
* Please see http://pandorafms.org for full contribution list
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation for version 2.
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
* ============================================================================
|
|
|
|
*/
|
2023-02-17 12:53:35 +01:00
|
|
|
|
2023-02-13 16:21:37 +01:00
|
|
|
$output = '';
|
2023-02-14 10:55:01 +01:00
|
|
|
$output .= '<script>var idTips = ['.$id.'];</script>';
|
2023-02-13 16:21:37 +01:00
|
|
|
$output .= '<div class="window">';
|
|
|
|
$output .= '<div class="tips_header">';
|
2023-02-14 10:34:08 +01:00
|
|
|
$output .= '<p class="title">'.__('Hello! These are the tips of the day.').'</p>';
|
|
|
|
$output .= '<p>'.html_print_checkbox(
|
|
|
|
'show_tips_startup',
|
|
|
|
true,
|
|
|
|
true,
|
|
|
|
true,
|
|
|
|
false,
|
|
|
|
'',
|
|
|
|
false,
|
|
|
|
'',
|
2023-02-16 18:13:34 +01:00
|
|
|
($preview === true) ? '' : 'checkbox_tips_startup'
|
2023-02-14 10:34:08 +01:00
|
|
|
).__('Show usage tips at startup').'</p>';
|
2023-02-13 16:21:37 +01:00
|
|
|
$output .= '</div>';
|
2023-02-17 11:07:28 +01:00
|
|
|
$output .= '<div class="carousel '.(($files === false && $files64 === false) ? 'invisible' : '').'">';
|
2023-02-13 16:21:37 +01:00
|
|
|
$output .= '<div class="images">';
|
2023-02-13 13:26:49 +01:00
|
|
|
|
2023-02-13 16:21:37 +01:00
|
|
|
if ($files !== false) {
|
2023-02-16 18:13:34 +01:00
|
|
|
if ($preview === true) {
|
|
|
|
foreach ($files as $key => $file) {
|
|
|
|
$output .= html_print_image($file, true);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
foreach ($files as $key => $file) {
|
|
|
|
$output .= html_print_image($file['path'].$file['filename'], true);
|
|
|
|
}
|
2023-02-13 16:21:37 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-02-17 11:07:28 +01:00
|
|
|
if ($files64 !== false) {
|
|
|
|
foreach ($files64 as $key => $file) {
|
|
|
|
$output .= '<img src="'.$file.'" />';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-02-13 16:21:37 +01:00
|
|
|
$output .= '</div>';
|
|
|
|
$output .= '</div>';
|
|
|
|
|
|
|
|
$output .= '<div class="description">';
|
|
|
|
$output .= '<h2 id="title_tip">'.$title.'</h2>';
|
|
|
|
$output .= '<p id="text_tip">';
|
|
|
|
$output .= $text;
|
|
|
|
$output .= '</p>';
|
|
|
|
|
|
|
|
if (empty($url) === false && $url !== '') {
|
2023-02-14 11:32:43 +01:00
|
|
|
$output .= '<a href="'.$url.'" target="_blank" id="url_tip">'.__('See more info').'<span class="arrow_tips">→</span></a>';
|
2023-02-13 16:21:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
$output .= '</div>';
|
|
|
|
|
|
|
|
$output .= '<div class="ui-dialog-buttonset">';
|
|
|
|
// TODO Delete this buttons and use html_print_button when merge new design
|
2023-02-14 10:34:08 +01:00
|
|
|
$output .= '<button type="button" class="submit-cancel-tips ui-button ui-corner-all ui-widget" onclick="close_dialog()">Maybe later</button>';
|
2023-02-13 16:21:37 +01:00
|
|
|
$output .= '<div class="counter-tips">';
|
2023-02-16 16:14:50 +01:00
|
|
|
$output .= html_print_image('images/arrow-left-grey.png', true, ['class' => 'arrow_counter']);
|
|
|
|
$output .= html_print_image('images/arrow-right-grey.png', true, ['class' => 'arrow_counter']);
|
2023-02-13 16:21:37 +01:00
|
|
|
$output .= '</div>';
|
2023-02-16 18:13:34 +01:00
|
|
|
if ($preview === true) {
|
|
|
|
$output .= '<button type="button" class="submit-next-tips ui-button ui-corner-all ui-widget" onclick="close_dialog()">Ok</button>';
|
|
|
|
} else {
|
|
|
|
$output .= '<button type="button" class="submit-next-tips ui-button ui-corner-all ui-widget" onclick="next_tip()">Ok</button>';
|
|
|
|
}
|
|
|
|
|
2023-02-13 16:21:37 +01:00
|
|
|
$output .= '</div>';
|
|
|
|
$output .= '</div>';
|
|
|
|
echo $output;
|