pandorafms/pandora_console/general/pandora_help.php

108 lines
3.4 KiB
PHP
Raw Normal View History

<?php
2023-06-08 13:19:01 +02:00
// Pandora FMS - https://pandorafms.com
// ==================================================
2023-06-08 11:53:13 +02:00
// Copyright (c) 2005-2023 Pandora FMS
2023-06-08 13:19:01 +02:00
// Please see https://pandorafms.com/community/ for full contribution list
2008-03-06 Sancho Lerena <slerena@gmail.com> Pandora FMS 2.0 development first commit. 1.4 version is now 2.0 * pandoradb_data.sql: Added correct tnetwork_components, fixed ttipo_modulo (categoria values). * include/styles/pandora.css: Added some server icons, tab style for module editor has been improved. * include/functions_db.php: added new functions, lang_string and check_login, and a first review of several functions that currently need change for new config session parameters in array $config[] * include/javascript/pandora.js: Added a new global include for spare javascript functions before included into a few pages. * include/languages/language_en.php: New tokens. * include/help*: New contextual help system. * include/config_process.php: New way to manage config. * include/functions.php: Added new functions to manage global * operation/agentes/estado_ultimopaquete.php: removed old javascript code from there. * operation/agentes/estado_agente.php: Removed references to deprecated field "agent_type". * operation/agentes/tactical.php: Some code cleanup and progressbar issues merged from 1.3.1 branch. Need to add support to new server types and new module types. * operation/servers/view_server.php: Added support to new servers, code cleanup. * reporting/fgraph.php: Code cleanup, changes to use new config method, and a lot of style change. * general/pandora_help.php: New source for contextual help in the way of moodle. * general/footer.php, general/noaccess.php: Code cleanup and uses of new config. * module_manager_editor: New editors for each module family. Need finish and implement EDITION of data, now only inserts data. * godmode/agentes/agent_manager.php: Implemented new server assigment and edition. * godmode/agentes/configurar_agente.php: Small changes that affects module management, visualization and agent management. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@739 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-03-07 17:22:16 +01:00
// 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.
2018-11-21 13:08:58 +01:00
// Don't start a session before this import.
// The session is configured and started inside the config process.
require_once '../include/config.php';
2018-11-21 13:08:58 +01:00
require_once '../include/functions.php';
require_once '../include/functions_html.php';
?>
<html class="help_pname"><head><title>
<?php
echo __('%s help system', get_product_name());
?>
</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
2023-03-24 12:06:40 +01:00
<?php echo '<link rel="stylesheet" href="../include/styles/'.$config['style'].'.css?v='.$config['current_package'].'" type="text/css">'; ?>
<body class="height_100p bg_333">
<?php
$id = get_parameter('id');
$id_user = get_parameter('id_user');
$user_language = get_user_language($id_user);
if (file_exists('../include/languages/'.$user_language.'.mo')) {
$l10n = new gettext_reader(new CachedFileReader('../include/languages/'.$user_language.'.mo'));
$l10n->load_tables();
}
// Possible file locations
$safe_language = safe_url_extraclean($user_language, 'en');
$safe_id = safe_url_extraclean($id, '');
$files = [
$config['homedir'].'/include/help/'.$safe_language.'/help_'.$safe_id.'.php',
$config['homedir'].'/'.ENTERPRISE_DIR.'/include/help/'.$safe_language.'/help_'.$safe_id.'.php',
$config['homedir'].'/'.ENTERPRISE_DIR.'/include/help/en/help_'.$safe_id.'.php',
$config['homedir'].'/include/help/en/help_'.$safe_id.'.php',
];
2009-03-24 Esteban Sanchez <estebans@artica.es> * general/pandora_help.php: Added support for enterprise help files. * include/javascript/pandora.js: Renamed pandora_help() to open_help(). * include/functions_ui.php: Renamed event function on print_help_icon(). Removed deprecated pandora_help(). * godmode/agentes/module_manager.php: Added enterprise hooks. * godmode/agentes/module_manager_editor.php: Added categories construction here. Added enterprise hooks. * godmode/agentes/module_manager_editor_common.php: Replaced deprecated pandora_help() with print_help_icon(). Moved categories construction to module_manager_editor. * include/config_process.php: Updated build version. * include/styles/pandora.css: Fixed textarea height. * godmode/agentes/manage_config_remote.php, godmode/agentes/massive_config.php, godmode/agentes/massive_edit_modules.php, godmode/agentes/module_manager_editor_network.php, godmode/agentes/module_manager_editor_plugin.php, godmode/agentes/module_manager_editor_prediction.php, godmode/agentes/module_manager_editor_wmi.php, godmode/agentes/planned_downtime.php, godmode/alerts/alert_list.php, godmode/alerts/configure_alert_compound.php, godmode/modules/manage_network_components_form_network.php, godmode/modules/manage_network_components_form_wmi.php, godmode/reporting/map_builder.php, godmode/servers/manage_export_form.php, godmode/servers/manage_recontask_form.php, godmode/servers/plugin.php, godmode/setup/setup.php, operation/agentes/alerts_status.php, operation/agentes/tactical.php, godmode/agentes/agent_manager.php: Replaced deprecated pandora_help() with print_help_icon(). git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1557 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-03-24 16:38:54 +01:00
$help_file = '';
foreach ($files as $file) {
if (file_exists($file)) {
$help_file = $file;
break;
}
}
$logo = ui_get_custom_header_logo(true);
2017-03-31 13:03:54 +02:00
if (! $id || ! file_exists($help_file)) {
echo '<div id="main_help">';
if (!is_metaconsole()) {
echo html_print_image($logo, true, ['border' => '0']);
}
2017-03-31 13:03:54 +02:00
echo '</div>';
echo '<div id="parent_dic">';
echo '<div class="databox bg-white font_12px no_border">';
echo '<hr class="mgn_tp_0">';
echo '<h1 class="pdd_l_30px">';
echo __('Help system error');
echo '</h1>';
echo "<div class='center bg-white'>";
echo '</div>';
echo '<div class="msg msg_pandora_help">'.__("%s help system has been called with a help reference that currently don't exist. There is no help content to show.", get_product_name()).'</div></div></div>';
echo '<br /><br />';
echo '<div id="footer_help">';
2022-11-22 17:41:14 +01:00
// include 'footer.php';
return;
2008-03-06 Sancho Lerena <slerena@gmail.com> Pandora FMS 2.0 development first commit. 1.4 version is now 2.0 * pandoradb_data.sql: Added correct tnetwork_components, fixed ttipo_modulo (categoria values). * include/styles/pandora.css: Added some server icons, tab style for module editor has been improved. * include/functions_db.php: added new functions, lang_string and check_login, and a first review of several functions that currently need change for new config session parameters in array $config[] * include/javascript/pandora.js: Added a new global include for spare javascript functions before included into a few pages. * include/languages/language_en.php: New tokens. * include/help*: New contextual help system. * include/config_process.php: New way to manage config. * include/functions.php: Added new functions to manage global * operation/agentes/estado_ultimopaquete.php: removed old javascript code from there. * operation/agentes/estado_agente.php: Removed references to deprecated field "agent_type". * operation/agentes/tactical.php: Some code cleanup and progressbar issues merged from 1.3.1 branch. Need to add support to new server types and new module types. * operation/servers/view_server.php: Added support to new servers, code cleanup. * reporting/fgraph.php: Code cleanup, changes to use new config method, and a lot of style change. * general/pandora_help.php: New source for contextual help in the way of moodle. * general/footer.php, general/noaccess.php: Code cleanup and uses of new config. * module_manager_editor: New editors for each module family. Need finish and implement EDITION of data, now only inserts data. * godmode/agentes/agent_manager.php: Implemented new server assigment and edition. * godmode/agentes/configurar_agente.php: Small changes that affects module management, visualization and agent management. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@739 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-03-07 17:22:16 +01:00
}
// Show help
echo '<div id="main_help_new">';
if (!empty($config['enterprise_installed']) && is_metaconsole()) {
echo '<img src="'.$config['homeurl'].$logo.'">';
} else {
echo html_print_image($logo, true, ['border' => '0']);
}
echo '</div>';
echo '<div id="main_help_new_content">';
ob_start();
require_once $help_file;
$help = ob_get_contents();
ob_end_clean();
// Add a line after H1 tags
echo $help;
echo '</div>';
echo '<div id="footer_help">';
2022-11-22 17:41:14 +01:00
// require 'footer.php';
echo '</div>';
2008-08-11 Esteban Sanchez <estebans@artica.es> * include/functions_db.php: Added __ as an alias of lang_string(). * include/functions_reporting_pdf.php, include/functions_reporting.php, include/functions.php, include/functions_visual_map.php, index.php, operation/incidents/incident.php, operation/incidents/incident_detail.php, operation/incidents/incident_note.php, operation/incidents/incident_search.php, operation/incidents/incident_statistics.php, operation/snmpconsole/snmp_alert.php, operation/snmpconsole/snmp_view.php, operation/users/user.php, operation/users/user_edit.php, operation/users/user_statistics.php, operation/events/event_statistics.php, operation/events/events.php, operation/visual_console/render_view.php, operation/visual_console/index.php, operation/extensions.php, operation/agentes/estado_alertas.php, operation/agentes/status_monitor.php, operation/agentes/estado_grupo.php, operation/agentes/export_csv.php, operation/agentes/datos_agente.php, operation/agentes/estado_ultimopaquete.php, operation/agentes/estado_generalagente.php, operation/agentes/estado_agente.php, operation/agentes/bulbs.php, operation/agentes/status_events.php, operation/agentes/sla_view.php, operation/agentes/exportdata.php, operation/agentes/estado_monitores.php, operation/agentes/ver_agente.php, operation/agentes/estadisticas.php, operation/agentes/tactical.php, operation/agentes/networkmap.php, operation/messages/message.php, operation/reporting/reporting_viewer.php, operation/reporting/graph_viewer.php, operation/reporting/custom_reporting.php, operation/servers/view_server.php, operation/servers/view_server_detail.php, operation/menu.php, reporting/fgraph.php, reporting/stat_win.php, ajax.php, general/logoff.php, general/pandora_help.php, general/footer.php, general/noaccess.php, general/logon_failed.php, general/links_menu.php, general/login_page.php, general/logon_ok.php, general/header.php, general/main_menu.php, godmode/groups/configure_group.php, godmode/groups/group_list.php, godmode/setup/news.php, godmode/setup/links.php, godmode/setup/setup.php, godmode/users/user_list.php, godmode/users/configure_user.php, godmode/profiles/profile_list.php, godmode/admin_access_logs.php, godmode/db/db_info_data.php, godmode/db/db_main.php, godmode/db/db_audit.php, godmode/db/db_sanity.php, godmode/db/db_refine.php, godmode/db/db_info.php, godmode/db/db_event.php, godmode/db/db_purge.php, godmode/extensions.php, godmode/agentes/agent_template.php, godmode/agentes/module_manager_editor_network.php, godmode/agentes/module_manager_editor_wmi.php, godmode/agentes/alert_manager.php, godmode/agentes/module_manager_editor_plugin.php, godmode/agentes/module_manager_editor_prediction.php, godmode/agentes/alert_manager_editor.php, godmode/agentes/manage_config.php, godmode/agentes/module_manager_editor_data.php, godmode/agentes/module_manager.php, godmode/agentes/modificar_agente.php, godmode/agentes/configurar_agente.php, godmode/agentes/agent_disk_conf_editor.php, godmode/agentes/planned_downtime.php, godmode/agentes/manage_config_remote.php, godmode/agentes/agent_manager.php, godmode/modules/manage_network_components_form.php, godmode/modules/manage_nc_groups_form.php, godmode/modules/manage_network_templates.php, godmode/modules/module_list.php, godmode/modules/manage_network_templates_form.php, godmode/modules/manage_network_components_form_network.php, godmode/modules/manage_network_components_form_wmi.php, godmode/modules/manage_network_components.php, godmode/modules/manage_nc_groups.php, godmode/reporting/reporting_builder.php, godmode/reporting/map_builder.php, godmode/reporting/graph_builder.php, godmode/servers/plugin.php, godmode/servers/manage_recontask.php, godmode/servers/modificar_server.php, godmode/servers/manage_recontask_form.php, godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php, godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a instead of $lang_label to future use of gettext. Style corrections. * godmode/agentes/planned_downtime.php: Rewritten to use Pandora functions and adopt the UI style. Replaced lang_string with __(). * pandoradb.sql: Fields in tplanned_downtime renamed to fit guidelines. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
?>
</body>
</html>