2012-04-25 21:20:23 +02:00
< ? php
// Pandora FMS - http://pandorafms.com
// ==================================================
2020-11-27 13:52:35 +01:00
// Copyright (c) 2005-2021 Artica Soluciones Tecnologicas
2012-04-25 21:20:23 +02:00
// 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; 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.
/**
* @ package General
*/
global $config ;
2021-03-11 15:40:23 +01:00
2012-04-25 21:20:23 +02:00
if ( is_ajax ()) {
2019-01-30 16:18:44 +01:00
$skip_login_help = get_parameter ( 'skip_login_help' , 0 );
// Updates config['skip_login_help_dialog'] in order to don't show login help message
if ( $skip_login_help ) {
if ( isset ( $config [ 'skip_login_help_dialog' ])) {
$result_config = db_process_sql_update ( 'tconfig' , [ 'value' => 1 ], [ 'token' => 'skip_login_help_dialog' ]);
} else {
$result_config = db_process_sql_insert ( 'tconfig' , [ 'value' => 1 , 'token' => 'skip_login_help_dialog' ]);
}
}
return ;
2012-04-25 21:20:23 +02:00
}
// Prints help dialog information
2021-03-11 15:40:23 +01:00
echo '<div id="login_help_dialog" title="' . __ ( 'Welcome to %s' , get_product_name ()) . '" >' ;
2019-01-30 16:18:44 +01:00
2021-03-11 15:40:23 +01:00
echo '<div id="help_dialog">' ;
2019-01-30 16:18:44 +01:00
echo __ (
" If this is your first time using %s, we suggest a few links that'll help you learn more about the software. Monitoring can be overwhelming, but take your time to learn how to harness the power of %s! " ,
get_product_name (),
get_product_name ()
);
echo '</div>' ;
2021-03-11 15:40:23 +01:00
echo '<div>' ;
echo '<table cellspacing=0 cellpadding=0 class="border_solid_white w100p h100p">' ;
2019-01-30 16:18:44 +01:00
echo '<tr>' ;
2021-03-11 15:40:23 +01:00
echo '<td class="border_solid_white center">' ;
echo '<a href="' . ui_get_full_url ( false ) . 'general/pandora_help.php?id=main_help" target="_blank" class="no_decoration">' . html_print_image (
2019-01-30 16:18:44 +01:00
'images/online_help.png' ,
true ,
[
'alt' => __ ( 'Online help' ),
'border' => 0 ,
]
) . '</a>' ;
2021-03-11 15:40:23 +01:00
echo '<br id="br_mb_40" />' ;
echo '<a class="font_9pt" href="' . ui_get_full_url ( false ) . 'general/pandora_help.php?id=main_help" target="_blank">' . __ ( 'Online help' ) . '</a>' ;
2019-01-30 16:18:44 +01:00
echo '</td>' ;
2021-03-11 15:40:23 +01:00
echo '<td class="border_solid_white center">' ;
echo '<a href="http://pandorafms.com/" target="_blank" class="no_decoration">' . html_print_image (
2019-01-30 16:18:44 +01:00
'images/enterprise_version.png' ,
true ,
[
'alt' => __ ( 'Enterprise version' ),
'border' => 0 ,
]
) . '</a>' ;
2021-03-11 15:40:23 +01:00
echo '<br id="br_mb_40" />' ;
echo '<a class="font_9pt" href="http://pandorafms.com/" target="_blank">' . __ ( 'Enterprise version' ) . '</a>' ;
2019-01-30 16:18:44 +01:00
echo '</td>' ;
2021-03-11 15:40:23 +01:00
echo '<td class="border_solid_white center">' ;
echo '<a href="https://pandorafms.com/forums" target="_blank" class="no_decoration">' . html_print_image (
2019-01-30 16:18:44 +01:00
'images/support.png' ,
true ,
[
'alt' => __ ( 'Support' ),
'border' => 0 ,
]
) . '</a>' ;
2021-03-11 15:40:23 +01:00
echo '<br id="br_mb_40" />' ;
echo '<a class="font_9pt" href="https://pandorafms.com/forums" target="_blank">' . __ ( 'Support' ) . ' / ' . __ ( 'Forums' ) . '</a>' ;
2019-01-30 16:18:44 +01:00
echo '</td>' ;
2021-03-11 15:40:23 +01:00
echo '<td class="border_solid_white center">' ;
echo '<a href="' . ui_get_full_external_url ( $config [ 'custom_docs_url' ]) . '" target="_blank" class="no_decoration">' . html_print_image (
2019-01-30 16:18:44 +01:00
'images/documentation.png' ,
true ,
[
'alt' => __ ( 'Documentation' ),
'border' => 0 ,
]
) . '</a>' ;
2021-03-11 15:40:23 +01:00
echo '<br id="br_mb_40" />' ;
echo '<a clas="font_9pt" href="' . ui_get_full_external_url ( $config [ 'custom_docs_url' ]) . '" target="_blank">' . __ ( 'Documentation' ) . '</span></a>' ;
2019-01-30 16:18:44 +01:00
echo '</td>' ;
echo '</tr>' ;
echo '</table>' ;
echo '</div>' ;
2021-03-11 15:40:23 +01:00
echo '<div class="absolute help_dialog_login" ">' ;
echo '<div class="skip_help_login">' ;
2019-01-30 16:18:44 +01:00
html_print_checkbox ( 'skip_login_help' , 1 , false , false , false , 'cursor: \'pointer\'' );
2021-03-11 15:40:23 +01:00
echo ' <span class="font_12pt">' . __ ( " Click here to don't show again this message " ) . '</span>' ;
2019-01-30 16:18:44 +01:00
echo '</div>' ;
2021-03-11 15:40:23 +01:00
echo '<div class="float-right w20p">' ;
html_print_submit_button ( 'Ok' , 'hide-login-help' , false , 'class="ui-button-dialog ui-widget ui-state-default ui-corner-all ui-button-text-only sub ok w100p"' );
2019-01-30 16:18:44 +01:00
echo '</div>' ;
echo '</div>' ;
echo '</div>' ;
?>
2012-04-25 21:20:23 +02:00
< script type = " text/javascript " language = " javascript " >
/* <![CDATA[ */
2012-09-25 Miguel de Dios <miguel.dedios@artica.es>
* general/login_page.php, general/logoff.php, general/header.php,
general/login_help_dialog.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/visual_console_builder.elements.php,
godmode/agentes/planned_downtime.editor.php,
godmode/alerts/alert_list.list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_template.php,
include/styles/jquery-ui-1.8.23.custom.css,
include/javascript/jquery.jquery-ui-1.8.17.custom.min.js,
include/javascript/jquery.timeentry.js,
include/javascript/jquery.ui.droppable.js,
include/javascript/jquery.ui.draggable.js,
include/javascript/jquery.ui-timepicker-addon.js,
include/javascript/jquery.ui.resizable.js,
include/javascript/jquery.autocomplete.js,
include/javascript/jquery.ui.core.js,
include/javascript/jquery-1.8.2.js,
include/javascript/jquery.ui.dialog.js,
include/javascript/jquery.jquery-ui-1.8.23.custom.min.js,
include/functions_ui.php, index.php,
extensions/update_manager/update_pandora.php,
extensions/insert_data.php, operation/agentes/datos_agente.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php: updated the jquery and
jquery.ui, and removed old useless files. And added the jquery
library to timepicker and implemented the calls into the code.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6999 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2012-09-25 17:34:36 +02:00
$ ( document ) . ready ( function () {
2019-01-30 16:18:44 +01:00
$ ( " #login_help_dialog " ) . dialog ({
resizable : true ,
draggable : true ,
modal : true ,
height : 350 ,
width : 630 ,
overlay : {
opacity : 0.5 ,
background : " black "
}
});
$ ( " #submit-hide-login-help " ) . click ( function () {
$ ( " #login_help_dialog " ) . dialog ( 'close' );
var skip_login_help = $ ( " #checkbox-skip_login_help " ) . is ( ':checked' );
// Update config['skip_login_help_dialog'] to don't display more this message
if ( skip_login_help ) {
jQuery . post ( " ajax.php " ,
{ " page " : " general/login_help_dialog " ,
" skip_login_help " : 1 },
function ( data ) {}
);
}
});
2012-04-25 21:20:23 +02:00
});
/* ]]> */
</ script >