2011-04-27 Juan Manuel Ramon <juanmanuel.ramon@artica.es>

* include/functions_graph.php
	include/functions_users.php
	include/functions_events.php
	include/functions_html.php
	include/functions_menu.php
	include/styles/pandora.css
	include/graphs/functions_pchart.php
	include/functions_messages.php
	include/functions_exportserver.php
	include/functions_modules.php
	include/functions_reporting.php
	include/functions_filemanager.php
	include/functions_groups.php
	include/functions_gis.php
	include/functions_networkmap.php
	include/functions_servers.php
	include/functions_network_components.php
	include/functions_visual_map.php
	include/ajax/skins.ajax.php
	include/ajax/visual_console_builder.ajax.php
	include/help/en/help_gis_map_builder.php
	include/help/en/help_agent_status.php
	include/help/en/help_eventview.php
	include/help/en/help_configure_gis_map.php
	include/help/en/help_cascade_protection.php
	include/help/en/help_setup_gis_index.php
	include/help/es/help_gis_map_builder.php
	include/help/es/help_agent_status.php
	include/help/es/help_eventview.php
	include/help/es/help_configure_gis_map.php
	include/help/es/help_cascade_protection.php
	include/help/ja/help_gis_map_builder.php
	include/help/ja/help_agent_status.php
	include/help/ja/help_eventview.php
	include/help/ja/help_configure_gis_map.php
	include/help/ja/help_cascade_protection.php
	include/help/ja/help_setup_gis_index.php
	include/functions_ui.php
	include/functions_incidents.php
	include/functions.php
	include/functions_agents.php
	include/functions_db.php
	include/functions_fsgraph.php
	include/functions_extensions.php
	include/functions_ui_renders.php
	extensions/insert_data.php
	extensions/system_info.php
	extensions/extension_uploader.php
	extensions/agents_modules.php
	extensions/dbmanager.php
	extensions/resource_registration.php
	extensions/resource_exportation.php
	extensions/users_connected.php
	extensions/module_groups.php
	extensions/update_manager/settings.php
	extensions/update_manager/main.php
	operation/incidents/incident.incident.php
	operation/incidents/incident.php
	operation/incidents/incident.files.php
	operation/incidents/incident.tracking.php
	operation/incidents/incident_detail.php
	operation/incidents/incident.workunits.php
	operation/incidents/incident.list.php
	operation/search_modules.php
	operation/extensions.php
	operation/visual_console/render_view.php
	operation/visual_console/index.php
	operation/agentes/status_monitor.php
	operation/agentes/estado_ultimopaquete.php
	operation/agentes/datos_agente.php
	operation/agentes/alerts_status.php
	operation/agentes/estado_generalagente.php
	operation/agentes/custom_fields.php
	operation/agentes/estado_agente.php
	operation/agentes/networkmap.topology.php
	operation/agentes/alerts_status.functions.php
	operation/agentes/networkmap.groups.php
	operation/agentes/sla_view.php
	operation/agentes/exportdata.php
	operation/agentes/gis_view.php
	operation/agentes/estado_monitores.php
	operation/agentes/ver_agente.php
	operation/agentes/graphs.php
	operation/agentes/tactical.php
	operation/agentes/group_view.php
	operation/agentes/networkmap.php
	operation/agentes/stat_win.php
	operation/servers/view_server.php
	operation/servers/view_server_detail.php
	operation/search_agents.php
	operation/search_graphs.php
	operation/snmpconsole/snmp_view.php
	operation/users/user_edit.php
	operation/integria_incidents/incident.incident.php
	operation/integria_incidents/incident.php
	operation/integria_incidents/incident.files.php
	operation/integria_incidents/incident.tracking.php
	operation/integria_incidents/incident_detail.php
	operation/integria_incidents/incident.workunits.php
	operation/integria_incidents/incident.list.php
	operation/gis_maps/render_view.php
	operation/gis_maps/ajax.php
	operation/gis_maps/index.php
	operation/events/export_csv.php
	operation/events/sound_events.php
	operation/events/events_validate.php
	operation/events/events_list.php
	operation/events/events.php
	operation/search_alerts.php
	operation/messages/message.php
	operation/reporting/reporting_xml.php
	operation/reporting/reporting_viewer.php
	operation/reporting/graph_viewer.php
	operation/reporting/custom_reporting.php
	operation/search_reports.php
	operation/search_maps.php
	operation/search_results.php
	operation/search_users.php
	mobile/operation/agents/monitor_status.php
	mobile/operation/agents/view_agents.php
	mobile/operation/agents/tactical.php
	mobile/operation/agents/view_alerts.php
	mobile/operation/agents/group_view.php
	mobile/operation/events/events.php
	mobile/operation/servers/view_servers.php
	mobile/include/user.class.php
	general/pandora_help.php
	general/noaccess.php
	general/login_page.php
	general/logon_ok.php
	general/logoff.php
	general/ui/agents_list.php
	general/header.php
	godmode/groups/modu_group_list.php
	godmode/groups/configure_group.php
	godmode/groups/configure_modu_group.php
	godmode/groups/group_list.php
	godmode/admin_access_logs.php
	godmode/extensions.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/agentes/agent_template.php
	godmode/agentes/module_manager_editor_common.php
	godmode/agentes/module_manager_editor_network.php
	godmode/agentes/fields_manager.php
	godmode/agentes/module_manager_editor_wmi.php
	godmode/agentes/module_manager_editor_plugin.php
	godmode/agentes/agent_conf_gis.php
	godmode/agentes/module_manager_editor_prediction.php
	godmode/agentes/module_manager.php
	godmode/agentes/modificar_agente.php
	godmode/agentes/configurar_agente.php
	godmode/agentes/configure_field.php
	godmode/agentes/module_manager_editor.php
	godmode/agentes/planned_downtime.php
	godmode/agentes/manage_config_remote.php
	godmode/agentes/agent_manager.php
	godmode/servers/recon_script.php
	godmode/servers/plugin.php
	godmode/servers/manage_recontask.php
	godmode/servers/modificar_server.php
	godmode/servers/manage_recontask_form.php
	godmode/alerts/alert_list.list.php
	godmode/alerts/configure_alert_compound.php
	godmode/alerts/alert_compounds.php
	godmode/alerts/alert_list.php
	godmode/alerts/configure_alert_template.php
	godmode/alerts/alert_templates.php
	godmode/alerts/configure_alert_action.php
	godmode/alerts/configure_alert_command.php
	godmode/alerts/alert_actions.php
	godmode/alerts/alert_list.builder.php
	godmode/alerts/alert_commands.php
	godmode/snmpconsole/snmp_alert.php
	godmode/snmpconsole/snmp_filters.php
	godmode/setup/file_manager.php
	godmode/setup/os.list.php
	godmode/setup/news.php
	godmode/setup/gis_step_2.php
	godmode/setup/links.php
	godmode/setup/setup.php
	godmode/setup/os.php
	godmode/setup/performance.php
	godmode/setup/setup_auth.php
	godmode/setup/gis.php
	godmode/setup/os.builder.php
	godmode/setup/setup_visuals.php
	godmode/users/user_list.php
	godmode/users/configure_user.php
	godmode/users/configure_profile.php
	godmode/gis_maps/configure_gis_map.php
	godmode/gis_maps/index.php
	godmode/massive/massive_add_alerts.php
	godmode/massive/massive_copy_modules.php
	godmode/massive/massive_delete_agents.php
	godmode/massive/massive_enable_disable_alerts.php
	godmode/massive/massive_operations.php
	godmode/massive/massive_delete_profiles.php
	godmode/massive/massive_edit_agents.php
	godmode/massive/massive_delete_action_alerts.php
	godmode/massive/massive_delete_modules.php
	godmode/massive/massive_add_profiles.php
	godmode/massive/massive_delete_alerts.php
	godmode/massive/massive_edit_modules.php
	godmode/massive/massive_standby_alerts.php
	godmode/massive/massive_add_action_alerts.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_components_form_common.php
	godmode/modules/manage_network_components_form_network.php
	godmode/modules/manage_network_templates_form.php
	godmode/modules/manage_network_components_form_wmi.php
	godmode/modules/manage_network_components.php
	godmode/modules/manage_nc_groups.php
	godmode/modules/manage_network_components_form_plugin.php
	godmode/reporting/reporting_builder.list_items.php
	godmode/reporting/graph_builder.main.php
	godmode/reporting/visual_console_builder.wizard.php
	godmode/reporting/visual_console_builder.php
	godmode/reporting/reporting_builder.preview.php
	godmode/reporting/reporting_builder.main.php
	godmode/reporting/visual_console_builder.data.php
	godmode/reporting/visual_console_builder.elements.php
	godmode/reporting/graph_builder.php
	godmode/reporting/graph_builder.graph_editor.php
	godmode/reporting/reporting_builder.php
	godmode/reporting/visual_console_builder.editor.php
	godmode/reporting/reporting_builder.item_editor.php
	godmode/reporting/map_builder.php
	godmode/reporting/graphs.php
	godmode/reporting/graph_builder.preview.php: Now functions on 
	functions_html.php, functions_gis.php, functions_filemanager.php, 
	functions_exportserver.php have "html_", "gis_", "filemanager_" and
	"exportserver_" prefix respectively.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4281 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
juanmanuelr 2011-04-27 13:43:31 +00:00
parent 1e97f7f852
commit d5953df87b
237 changed files with 2736 additions and 2488 deletions

View File

@ -1,3 +1,245 @@
2011-04-27 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php
include/functions_users.php
include/functions_events.php
include/functions_html.php
include/functions_menu.php
include/styles/pandora.css
include/graphs/functions_pchart.php
include/functions_messages.php
include/functions_exportserver.php
include/functions_modules.php
include/functions_reporting.php
include/functions_filemanager.php
include/functions_groups.php
include/functions_gis.php
include/functions_networkmap.php
include/functions_servers.php
include/functions_network_components.php
include/functions_visual_map.php
include/ajax/skins.ajax.php
include/ajax/visual_console_builder.ajax.php
include/help/en/help_gis_map_builder.php
include/help/en/help_agent_status.php
include/help/en/help_eventview.php
include/help/en/help_configure_gis_map.php
include/help/en/help_cascade_protection.php
include/help/en/help_setup_gis_index.php
include/help/es/help_gis_map_builder.php
include/help/es/help_agent_status.php
include/help/es/help_eventview.php
include/help/es/help_configure_gis_map.php
include/help/es/help_cascade_protection.php
include/help/ja/help_gis_map_builder.php
include/help/ja/help_agent_status.php
include/help/ja/help_eventview.php
include/help/ja/help_configure_gis_map.php
include/help/ja/help_cascade_protection.php
include/help/ja/help_setup_gis_index.php
include/functions_ui.php
include/functions_incidents.php
include/functions.php
include/functions_agents.php
include/functions_db.php
include/functions_fsgraph.php
include/functions_extensions.php
include/functions_ui_renders.php
extensions/insert_data.php
extensions/system_info.php
extensions/extension_uploader.php
extensions/agents_modules.php
extensions/dbmanager.php
extensions/resource_registration.php
extensions/resource_exportation.php
extensions/users_connected.php
extensions/module_groups.php
extensions/update_manager/settings.php
extensions/update_manager/main.php
operation/incidents/incident.incident.php
operation/incidents/incident.php
operation/incidents/incident.files.php
operation/incidents/incident.tracking.php
operation/incidents/incident_detail.php
operation/incidents/incident.workunits.php
operation/incidents/incident.list.php
operation/search_modules.php
operation/extensions.php
operation/visual_console/render_view.php
operation/visual_console/index.php
operation/agentes/status_monitor.php
operation/agentes/estado_ultimopaquete.php
operation/agentes/datos_agente.php
operation/agentes/alerts_status.php
operation/agentes/estado_generalagente.php
operation/agentes/custom_fields.php
operation/agentes/estado_agente.php
operation/agentes/networkmap.topology.php
operation/agentes/alerts_status.functions.php
operation/agentes/networkmap.groups.php
operation/agentes/sla_view.php
operation/agentes/exportdata.php
operation/agentes/gis_view.php
operation/agentes/estado_monitores.php
operation/agentes/ver_agente.php
operation/agentes/graphs.php
operation/agentes/tactical.php
operation/agentes/group_view.php
operation/agentes/networkmap.php
operation/agentes/stat_win.php
operation/servers/view_server.php
operation/servers/view_server_detail.php
operation/search_agents.php
operation/search_graphs.php
operation/snmpconsole/snmp_view.php
operation/users/user_edit.php
operation/integria_incidents/incident.incident.php
operation/integria_incidents/incident.php
operation/integria_incidents/incident.files.php
operation/integria_incidents/incident.tracking.php
operation/integria_incidents/incident_detail.php
operation/integria_incidents/incident.workunits.php
operation/integria_incidents/incident.list.php
operation/gis_maps/render_view.php
operation/gis_maps/ajax.php
operation/gis_maps/index.php
operation/events/export_csv.php
operation/events/sound_events.php
operation/events/events_validate.php
operation/events/events_list.php
operation/events/events.php
operation/search_alerts.php
operation/messages/message.php
operation/reporting/reporting_xml.php
operation/reporting/reporting_viewer.php
operation/reporting/graph_viewer.php
operation/reporting/custom_reporting.php
operation/search_reports.php
operation/search_maps.php
operation/search_results.php
operation/search_users.php
mobile/operation/agents/monitor_status.php
mobile/operation/agents/view_agents.php
mobile/operation/agents/tactical.php
mobile/operation/agents/view_alerts.php
mobile/operation/agents/group_view.php
mobile/operation/events/events.php
mobile/operation/servers/view_servers.php
mobile/include/user.class.php
general/pandora_help.php
general/noaccess.php
general/login_page.php
general/logon_ok.php
general/logoff.php
general/ui/agents_list.php
general/header.php
godmode/groups/modu_group_list.php
godmode/groups/configure_group.php
godmode/groups/configure_modu_group.php
godmode/groups/group_list.php
godmode/admin_access_logs.php
godmode/extensions.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/agentes/agent_template.php
godmode/agentes/module_manager_editor_common.php
godmode/agentes/module_manager_editor_network.php
godmode/agentes/fields_manager.php
godmode/agentes/module_manager_editor_wmi.php
godmode/agentes/module_manager_editor_plugin.php
godmode/agentes/agent_conf_gis.php
godmode/agentes/module_manager_editor_prediction.php
godmode/agentes/module_manager.php
godmode/agentes/modificar_agente.php
godmode/agentes/configurar_agente.php
godmode/agentes/configure_field.php
godmode/agentes/module_manager_editor.php
godmode/agentes/planned_downtime.php
godmode/agentes/manage_config_remote.php
godmode/agentes/agent_manager.php
godmode/servers/recon_script.php
godmode/servers/plugin.php
godmode/servers/manage_recontask.php
godmode/servers/modificar_server.php
godmode/servers/manage_recontask_form.php
godmode/alerts/alert_list.list.php
godmode/alerts/configure_alert_compound.php
godmode/alerts/alert_compounds.php
godmode/alerts/alert_list.php
godmode/alerts/configure_alert_template.php
godmode/alerts/alert_templates.php
godmode/alerts/configure_alert_action.php
godmode/alerts/configure_alert_command.php
godmode/alerts/alert_actions.php
godmode/alerts/alert_list.builder.php
godmode/alerts/alert_commands.php
godmode/snmpconsole/snmp_alert.php
godmode/snmpconsole/snmp_filters.php
godmode/setup/file_manager.php
godmode/setup/os.list.php
godmode/setup/news.php
godmode/setup/gis_step_2.php
godmode/setup/links.php
godmode/setup/setup.php
godmode/setup/os.php
godmode/setup/performance.php
godmode/setup/setup_auth.php
godmode/setup/gis.php
godmode/setup/os.builder.php
godmode/setup/setup_visuals.php
godmode/users/user_list.php
godmode/users/configure_user.php
godmode/users/configure_profile.php
godmode/gis_maps/configure_gis_map.php
godmode/gis_maps/index.php
godmode/massive/massive_add_alerts.php
godmode/massive/massive_copy_modules.php
godmode/massive/massive_delete_agents.php
godmode/massive/massive_enable_disable_alerts.php
godmode/massive/massive_operations.php
godmode/massive/massive_delete_profiles.php
godmode/massive/massive_edit_agents.php
godmode/massive/massive_delete_action_alerts.php
godmode/massive/massive_delete_modules.php
godmode/massive/massive_add_profiles.php
godmode/massive/massive_delete_alerts.php
godmode/massive/massive_edit_modules.php
godmode/massive/massive_standby_alerts.php
godmode/massive/massive_add_action_alerts.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_components_form_common.php
godmode/modules/manage_network_components_form_network.php
godmode/modules/manage_network_templates_form.php
godmode/modules/manage_network_components_form_wmi.php
godmode/modules/manage_network_components.php
godmode/modules/manage_nc_groups.php
godmode/modules/manage_network_components_form_plugin.php
godmode/reporting/reporting_builder.list_items.php
godmode/reporting/graph_builder.main.php
godmode/reporting/visual_console_builder.wizard.php
godmode/reporting/visual_console_builder.php
godmode/reporting/reporting_builder.preview.php
godmode/reporting/reporting_builder.main.php
godmode/reporting/visual_console_builder.data.php
godmode/reporting/visual_console_builder.elements.php
godmode/reporting/graph_builder.php
godmode/reporting/graph_builder.graph_editor.php
godmode/reporting/reporting_builder.php
godmode/reporting/visual_console_builder.editor.php
godmode/reporting/reporting_builder.item_editor.php
godmode/reporting/map_builder.php
godmode/reporting/graphs.php
godmode/reporting/graph_builder.preview.php: Now functions on
functions_html.php, functions_gis.php, functions_filemanager.php,
functions_exportserver.php have "html_", "gis_", "filemanager_" and
"exportserver_" prefix respectively.
2011-04-26 Sergio Martin <sergio.martin@artica.es> 2011-04-26 Sergio Martin <sergio.martin@artica.es>
* include/graphs/functions_pchart.php * include/graphs/functions_pchart.php

View File

@ -59,7 +59,7 @@ function mainAgentsModules() {
$updated_info = __("Updated at realtime"); $updated_info = __("Updated at realtime");
} }
$updated_time = print_image ("images/information.png", true, array ("title" => __('Last update'), "style" => 'margin: 5px 3px 0px 10px')).$updated_info; $updated_time = html_print_image ("images/information.png", true, array ("title" => __('Last update'), "style" => 'margin: 5px 3px 0px 10px')).$updated_info;
$modulegroup = get_parameter('modulegroup', 0); $modulegroup = get_parameter('modulegroup', 0);
$refr = get_parameter('refr', 30); // By default 30 seconds $refr = get_parameter('refr', 30); // By default 30 seconds
@ -73,28 +73,28 @@ function mainAgentsModules() {
$filter_module_groups = '<form method="post" action="' . ui_get_url_refresh (array ('offset' => 0, 'hor_offset' => 0)).'">'; $filter_module_groups = '<form method="post" action="' . ui_get_url_refresh (array ('offset' => 0, 'hor_offset' => 0)).'">';
$filter_module_groups .= '<b>'.__('Module group').'</b>'; $filter_module_groups .= '<b>'.__('Module group').'</b>';
$filter_module_groups .= print_select_from_sql ("SELECT * FROM tmodule_group ORDER BY name", $filter_module_groups .= html_print_select_from_sql ("SELECT * FROM tmodule_group ORDER BY name",
'modulegroup', $modulegroup, 'this.form.submit()',__('All'), 0, true, false, true, false, 'width: 100px; margin-right: 10px; margin-top: 5px;'); 'modulegroup', $modulegroup, 'this.form.submit()',__('All'), 0, true, false, true, false, 'width: 100px; margin-right: 10px; margin-top: 5px;');
$filter_module_groups .= '</form>'; $filter_module_groups .= '</form>';
$filter_groups = '<form method="post" action="' . ui_get_url_refresh (array ('offset' => 0, 'hor_offset' => 0)).'">'; $filter_groups = '<form method="post" action="' . ui_get_url_refresh (array ('offset' => 0, 'hor_offset' => 0)).'">';
$filter_groups .= '<b>'.__('Group').'</b>'; $filter_groups .= '<b>'.__('Group').'</b>';
$filter_groups .= print_select_groups(false, "AR", true, 'group_id', $group_id, 'this.form.submit()', '', '', true, false, true, '', false , 'width: 100px; margin-right: 10px;; margin-top: 5px;'); $filter_groups .= html_print_select_groups(false, "AR", true, 'group_id', $group_id, 'this.form.submit()', '', '', true, false, true, '', false , 'width: 100px; margin-right: 10px;; margin-top: 5px;');
$filter_groups .= '</form>'; $filter_groups .= '</form>';
$comborefr = '<form method="post" action="' . ui_get_url_refresh (array ('offset' => 0, 'hor_offset' => 0)).'">'; $comborefr = '<form method="post" action="' . ui_get_url_refresh (array ('offset' => 0, 'hor_offset' => 0)).'">';
$comborefr .= '<b>'.__('Refresh').'</b>'; $comborefr .= '<b>'.__('Refresh').'</b>';
$comborefr .= print_select (array('30' => '30 '.__('seconds'), '60' => '1 '.__('minute'), '120' => '2 '.__('minutes'), '300' => '5 '.__('minutes'), '600' => '10 '.__('minutes')) , 'refr', $config['refr'], $script = 'this.form.submit()', '', 0, true, false, false, '', false, 'width: 100px; margin-right: 10px; margin-top: 5px;'); $comborefr .= html_print_select (array('30' => '30 '.__('seconds'), '60' => '1 '.__('minute'), '120' => '2 '.__('minutes'), '300' => '5 '.__('minutes'), '600' => '10 '.__('minutes')) , 'refr', $config['refr'], $script = 'this.form.submit()', '', 0, true, false, false, '', false, 'width: 100px; margin-right: 10px; margin-top: 5px;');
$comborefr .= "</form>"; $comborefr .= "</form>";
if ($config["pure"] == 0) { if ($config["pure"] == 0) {
$fullscreen = '<a href="index.php?extension_in_menu=estado&amp;sec=extensions&amp;sec2=extensions/agents_modules&amp;pure=1&amp;offset='.$offset.'&group_id='.$group_id.'&modulegroup='.$modulegroup.'">' $fullscreen = '<a href="index.php?extension_in_menu=estado&amp;sec=extensions&amp;sec2=extensions/agents_modules&amp;pure=1&amp;offset='.$offset.'&group_id='.$group_id.'&modulegroup='.$modulegroup.'">'
. print_image ("images/fullscreen.png", true, array ("title" => __('Full screen mode'))) . html_print_image ("images/fullscreen.png", true, array ("title" => __('Full screen mode')))
. "</a>"; . "</a>";
} }
else { else {
$fullscreen = '<a href="index.php?extension_in_menu=estado&amp;sec=extensions&amp;sec2=extensions/agents_modules&amp;refr=0&amp;offset='.$offset.'&group_id='.$group_id.'&modulegroup='.$modulegroup.'">' $fullscreen = '<a href="index.php?extension_in_menu=estado&amp;sec=extensions&amp;sec2=extensions/agents_modules&amp;refr=0&amp;offset='.$offset.'&group_id='.$group_id.'&modulegroup='.$modulegroup.'">'
. print_image ("images/normalscreen.png", true, array ("title" => __('Back to normal mode'))) . html_print_image ("images/normalscreen.png", true, array ("title" => __('Back to normal mode')))
. "</a>"; . "</a>";
$config['refr'] = $refr; $config['refr'] = $refr;
} }
@ -168,7 +168,7 @@ function mainAgentsModules() {
if($hor_offset > 0) { if($hor_offset > 0) {
$new_hor_offset = $hor_offset-$block; $new_hor_offset = $hor_offset-$block;
echo "<th width='20px' style='vertical-align:top; padding-top: 35px;' rowspan='".($nagents+1)."'><a href='index.php?sec=extensions&sec2=extensions/agents_modules&refr=0&hor_offset=".$new_hor_offset."&offset=".$offset."&group_id=".$group_id."&modulegroup=".$modulegroup."'>".print_image("images/darrowleft.png",true, array('title' => __('Previous modules')))."</a> </th>"; echo "<th width='20px' style='vertical-align:top; padding-top: 35px;' rowspan='".($nagents+1)."'><a href='index.php?sec=extensions&sec2=extensions/agents_modules&refr=0&hor_offset=".$new_hor_offset."&offset=".$offset."&group_id=".$group_id."&modulegroup=".$modulegroup."'>".html_print_image("images/darrowleft.png",true, array('title' => __('Previous modules')))."</a> </th>";
} }
$nmodules = 0; $nmodules = 0;
foreach($modules_by_name as $module) { foreach($modules_by_name as $module) {
@ -179,12 +179,12 @@ function mainAgentsModules() {
} }
$file_name = string2image(ui_print_truncate_text($module['name'],15, false, true, false, '...'), 115, 13, 3, 270, '#9EAC8B', 'FFF', 4, 0); $file_name = string2image(ui_print_truncate_text($module['name'],15, false, true, false, '...'), 115, 13, 3, 270, '#9EAC8B', 'FFF', 4, 0);
echo '<th width="22px">'.print_image($file_name, true, array('title' => $module['name']))."</th>"; echo '<th width="22px">'.html_print_image($file_name, true, array('title' => $module['name']))."</th>";
} }
if(($hor_offset + $block) < $nmodules) { if(($hor_offset + $block) < $nmodules) {
$new_hor_offset = $hor_offset+$block; $new_hor_offset = $hor_offset+$block;
echo "<th width='20px' style='vertical-align:top; padding-top: 35px;' rowspan='".($nagents+1)."'><a href='index.php?sec=extensions&sec2=extensions/agents_modules&hor_offset=".$new_hor_offset."&offset=".$offset."&group_id=".$group_id."&modulegroup=".$modulegroup."'>".print_image("images/darrowright.png",true, array('title' => __('More modules')))."</a> </th>"; echo "<th width='20px' style='vertical-align:top; padding-top: 35px;' rowspan='".($nagents+1)."'><a href='index.php?sec=extensions&sec2=extensions/agents_modules&hor_offset=".$new_hor_offset."&offset=".$offset."&group_id=".$group_id."&modulegroup=".$modulegroup."'>".html_print_image("images/darrowright.png",true, array('title' => __('More modules')))."</a> </th>";
} }
$filter_agents = false; $filter_agents = false;
@ -227,7 +227,7 @@ function mainAgentsModules() {
echo "<tr style='height: 35px;'>"; echo "<tr style='height: 35px;'>";
$file_name = string2image(ui_print_truncate_text($agent['nombre'],19, false, true, false, '...'), 140, 15, 3, 0, $rowcolor, $textcolor, 4, 0); $file_name = string2image(ui_print_truncate_text($agent['nombre'],19, false, true, false, '...'), 140, 15, 3, 0, $rowcolor, $textcolor, 4, 0);
echo "<td style='background-color: ".$rowcolor.";'><a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$agent['id_agente']."'>".print_image($file_name, true, array('title' => $agent['nombre']))."</a></td>"; echo "<td style='background-color: ".$rowcolor.";'><a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$agent['id_agente']."'>".html_print_image($file_name, true, array('title' => $agent['nombre']))."</a></td>";
$agent_modules = get_agent_modules($agent['id_agente']); $agent_modules = get_agent_modules($agent['id_agente']);
$nmodules = 0; $nmodules = 0;

View File

@ -102,10 +102,10 @@ function dbmgr_extension_main () {
echo "<br /><br />"; echo "<br /><br />";
echo "<form method='post' action=''>"; echo "<form method='post' action=''>";
print_textarea ('sql', 5, 40, html_entity_decode($sql, ENT_QUOTES)); html_print_textarea ('sql', 5, 40, html_entity_decode($sql, ENT_QUOTES));
echo '<br />'; echo '<br />';
echo '<div class="action-buttons" style="width: 96%">'; echo '<div class="action-buttons" style="width: 96%">';
print_submit_button (__('Execute SQL'), '', false, 'class="sub next"'); html_print_submit_button (__('Execute SQL'), '', false, 'class="sub next"');
echo '</div>'; echo '</div>';
echo "</form>"; echo "</form>";
@ -143,7 +143,7 @@ function dbmgr_extension_main () {
$table->data = $result; $table->data = $result;
print_table ($table); html_print_table ($table);
} }
/* This adds a option in the operation menu */ /* This adds a option in the operation menu */

View File

@ -55,14 +55,14 @@ function extension_uploader_extensions() {
$table->width = '50%'; $table->width = '50%';
$table->data = array(); $table->data = array();
$table->data[0][0] = __('Upload extension'); $table->data[0][0] = __('Upload extension');
$table->data[0][1] = print_input_file('extension', true) . $table->data[0][1] = html_print_input_file('extension', true) .
ui_print_help_tip (__("Upload the extension as a zip file."), true); ui_print_help_tip (__("Upload the extension as a zip file."), true);
echo "<form method='post' enctype='multipart/form-data'>"; echo "<form method='post' enctype='multipart/form-data'>";
print_table($table); html_print_table($table);
echo "<div style='text-align: right; width: " . $table->width . "'>"; echo "<div style='text-align: right; width: " . $table->width . "'>";
print_input_hidden('upload', 1); html_print_input_hidden('upload', 1);
print_submit_button(__('Upload'), 'submit', false, 'class="sub add"'); html_print_submit_button(__('Upload'), 'submit', false, 'class="sub add"');
echo "</div>"; echo "</div>";
echo "</form>"; echo "</form>";
} }

View File

@ -116,30 +116,30 @@ function mainInsertData() {
$table->data = array(); $table->data = array();
$table->data[0][0] = __('Agent'); $table->data[0][0] = __('Agent');
$table->data[0][1] = print_input_text_extended ('id_agent', $id_agent, 'text_id_agent', '', 30, 100, false, '', $table->data[0][1] = html_print_input_text_extended ('id_agent', $id_agent, 'text_id_agent', '', 30, 100, false, '',
array('style' => 'background: url(images/lightning.png) no-repeat right;'), true) array('style' => 'background: url(images/lightning.png) no-repeat right;'), true)
. '<a href="#" class="tip">&nbsp;<span>' . __("Type at least two characters to search") . '</span></a>'; . '<a href="#" class="tip">&nbsp;<span>' . __("Type at least two characters to search") . '</span></a>';
$table->data[1][0] = __('Module'); $table->data[1][0] = __('Module');
$modules = array (); $modules = array ();
if ($id_agent) if ($id_agent)
$modules = get_agent_modules ($id_agent, false, array("delete_pending" => 0)); $modules = get_agent_modules ($id_agent, false, array("delete_pending" => 0));
$table->data[1][1] = print_select ($modules, 'id_agent_module', $id_agent_module, true, $table->data[1][1] = html_print_select ($modules, 'id_agent_module', $id_agent_module, true,
__('Select'), 0, true, false, true, '', ($id_agent === '')); __('Select'), 0, true, false, true, '', ($id_agent === ''));
$table->data[2][0] = __('Data'); $table->data[2][0] = __('Data');
$table->data[2][1] = print_input_text('data', $data, __('Data'), 40, 60, true); $table->data[2][1] = html_print_input_text('data', $data, __('Data'), 40, 60, true);
$table->data[3][0] = __('Date'); $table->data[3][0] = __('Date');
$table->data[3][1] = print_input_text ('date', $date, '', 11, 11, true).' '; $table->data[3][1] = html_print_input_text ('date', $date, '', 11, 11, true).' ';
$table->data[3][1] .= print_input_text ('time', $time, '', 7, 7, true); $table->data[3][1] .= html_print_input_text ('time', $time, '', 7, 7, true);
$table->data[4][0] = __('CSV'); $table->data[4][0] = __('CSV');
$table->data[4][1] = print_input_file('csv', true); $table->data[4][1] = html_print_input_file('csv', true);
echo "<form method='post' enctype='multipart/form-data'>"; echo "<form method='post' enctype='multipart/form-data'>";
print_table($table); html_print_table($table);
echo "<div style='text-align: right; width: " . $table->width . "'>"; echo "<div style='text-align: right; width: " . $table->width . "'>";
print_input_hidden('save', 1); html_print_input_hidden('save', 1);
print_submit_button(__('Save'), 'submit', ($id_agent === ''), 'class="sub next"'); html_print_submit_button(__('Save'), 'submit', ($id_agent === ''), 'class="sub next"');
echo "</div>"; echo "</div>";
echo "</form>"; echo "</form>";

View File

@ -134,7 +134,7 @@ function mainModuleGroups() {
$head = $modelGroups; $head = $modelGroups;
array_unshift($head, '&nbsp;'); array_unshift($head, '&nbsp;');
//Metaobject use in print_table //Metaobject use in html_print_table
$table = null; $table = null;
$table->align[0] = 'right'; //Align to right the first column. $table->align[0] = 'right'; //Align to right the first column.
$table->style[0] = 'color: #ffffff; background-color: #778866; font-weight: bolder;'; $table->style[0] = 'color: #ffffff; background-color: #778866; font-weight: bolder;';
@ -231,7 +231,7 @@ function mainModuleGroups() {
} }
$table->data = $tableData; $table->data = $tableData;
echo "<div style='width:98%; overflow-x:scroll;'>"; echo "<div style='width:98%; overflow-x:scroll;'>";
print_table($table); html_print_table($table);
echo "</div>"; echo "</div>";
echo "<p>" . __("The colours meaning:") . echo "<p>" . __("The colours meaning:") .

View File

@ -352,16 +352,16 @@ function resource_exportation_extension_main() {
$table->style[1] = 'width: 10%;'; $table->style[1] = 'width: 10%;';
$table->class = "databox_color"; $table->class = "databox_color";
$table->data[0][0] = __('Report'); $table->data[0][0] = __('Report');
$table->data[0][1] = print_select_from_sql('SELECT id_report, name FROM treport', 'report', '', '', '', 0, true); $table->data[0][1] = html_print_select_from_sql('SELECT id_report, name FROM treport', 'report', '', '', '', 0, true);
$table->data[0][2] = print_button(__('Export'), '', false, 'export_to_ptr(\'report\');', 'class="sub"', true); $table->data[0][2] = html_print_button(__('Export'), '', false, 'export_to_ptr(\'report\');', 'class="sub"', true);
$table->data[1][0] = __('Visual console'); $table->data[1][0] = __('Visual console');
$table->data[1][1] = print_select_from_sql('SELECT id, name FROM tlayout', 'visual_console', '', '', '', 0, true); $table->data[1][1] = html_print_select_from_sql('SELECT id, name FROM tlayout', 'visual_console', '', '', '', 0, true);
$table->data[1][2] = print_button(__('Export'), '', false, 'export_to_ptr(\'visual_console\');', 'class="sub"', true); $table->data[1][2] = html_print_button(__('Export'), '', false, 'export_to_ptr(\'visual_console\');', 'class="sub"', true);
if ($hook_enterprise === true) if ($hook_enterprise === true)
add_rows_for_enterprise($table->data); add_rows_for_enterprise($table->data);
print_table($table); html_print_table($table);
?> ?>
<script type="text/javascript"> <script type="text/javascript">

View File

@ -843,7 +843,7 @@ function resource_registration_extension_main() {
echo "<tr>"; echo "<tr>";
echo "<td>" . __('Group filter: ') . "</td>"; echo "<td>" . __('Group filter: ') . "</td>";
echo "<td>"; echo "<td>";
print_select_groups(false, "AW", true, 'group'); html_print_select_groups(false, "AW", true, 'group');
echo "</td>"; echo "</td>";
echo "<td class='datos'><input type='submit' class='sub next' value='".__('Upload')."' />"; echo "<td class='datos'><input type='submit' class='sub next' value='".__('Upload')."' />";
echo "</tr>"; echo "</tr>";

View File

@ -233,7 +233,7 @@ function show_array($title, $anchor, $array = array()) {
echo "<h1><a name='" . $anchor . "'>" . $title . "</a></h1>"; echo "<h1><a name='" . $anchor . "'>" . $title . "</a></h1>";
print_table($table); html_print_table($table);
} }
function mainSystemInfo() { function mainSystemInfo() {
@ -272,27 +272,27 @@ function mainSystemInfo() {
else { else {
$table->data[0][0] = __('Pandora Diagnostic info'); $table->data[0][0] = __('Pandora Diagnostic info');
} }
$table->data[0][1] = print_checkbox('pandora_diag', 1, $pandora_diag, true); $table->data[0][1] = html_print_checkbox('pandora_diag', 1, $pandora_diag, true);
if ($system_info) { if ($system_info) {
$table->data[1][0] = '<a href="#system_info">' . __('System info') . '</a>'; $table->data[1][0] = '<a href="#system_info">' . __('System info') . '</a>';
} }
else { else {
$table->data[1][0] = __('System info'); $table->data[1][0] = __('System info');
} }
$table->data[1][1] = print_checkbox('system_info', 1, $system_info, true); $table->data[1][1] = html_print_checkbox('system_info', 1, $system_info, true);
if ($log_info) { if ($log_info) {
$table->data[2][0] = '<a href="#log_info">' . __('Log Info') . '</a>'; $table->data[2][0] = '<a href="#log_info">' . __('Log Info') . '</a>';
} }
else { else {
$table->data[2][0] = __('Log Info'); $table->data[2][0] = __('Log Info');
} }
$table->data[2][1] = print_checkbox('log_info', 1, $log_info, true); $table->data[2][1] = html_print_checkbox('log_info', 1, $log_info, true);
$table->data[3][0] = __('Number lines of log'); $table->data[3][0] = __('Number lines of log');
$table->data[3][1] = print_input_text('log_num_lines', $log_num_lines, __('Number lines of log'), 5, 10, true); $table->data[3][1] = html_print_input_text('log_num_lines', $log_num_lines, __('Number lines of log'), 5, 10, true);
print_table($table); html_print_table($table);
echo "<div style='width: " . $table->width . "; text-align: right;'>"; echo "<div style='width: " . $table->width . "; text-align: right;'>";
//print_submit_button(__('Show'), 'show', false, 'class="sub next"'); //html_print_submit_button(__('Show'), 'show', false, 'class="sub next"');
print_submit_button(__('Generate file'), 'generate', false, 'class="sub next"'); html_print_submit_button(__('Generate file'), 'generate', false, 'class="sub next"');
echo "</div>"; echo "</div>";
echo "</form>"; echo "</form>";

View File

@ -27,7 +27,7 @@ ui_print_page_header (__('Update manager'), "images/extensions.png", false, "",
if ($settings->customer_key == FREE_USER) { if ($settings->customer_key == FREE_USER) {
echo '<div class="notify" style="width: 80%; text-align:left;" >'; echo '<div class="notify" style="width: 80%; text-align:left;" >';
echo print_image("images/information.png", true) . '&nbsp;'; echo html_print_image("images/information.png", true) . '&nbsp;';
/* Translators: Do not translade Update Manager, it's the name of the program */ /* Translators: Do not translade Update Manager, it's the name of the program */
echo __('The new <a href="http://updatemanager.sourceforge.net">Update Manager</a> client is shipped with Pandora FMS 3.0. It helps system administrators to update their Pandora FMS automatically, since the Update Manager does the task of getting new modules, new plugins and new features (even full migrations tools for future versions) automatically.'); echo __('The new <a href="http://updatemanager.sourceforge.net">Update Manager</a> client is shipped with Pandora FMS 3.0. It helps system administrators to update their Pandora FMS automatically, since the Update Manager does the task of getting new modules, new plugins and new features (even full migrations tools for future versions) automatically.');
echo '<p />'; echo '<p />';
@ -169,14 +169,14 @@ if (check_acl ($config['id_user'], 0, 'PM')) {
$table->data[2][0] = '<strong>'.__('Description').'</strong>'; $table->data[2][0] = '<strong>'.__('Description').'</strong>';
$table->data[2][1] = html_entity_decode ($package->description); $table->data[2][1] = html_entity_decode ($package->description);
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
echo '<form method="post">'; echo '<form method="post">';
echo __('Overwrite local changes'); echo __('Overwrite local changes');
print_checkbox ('force_update', '1', false); html_print_checkbox ('force_update', '1', false);
echo '<p />'; echo '<p />';
print_input_hidden ('update_package', 1); html_print_input_hidden ('update_package', 1);
print_submit_button (__('Update'), 'update_button', false, 'class="sub upd"'); html_print_submit_button (__('Update'), 'update_button', false, 'class="sub upd"');
echo '</form>'; echo '</form>';
echo '</div>'; echo '</div>';
} }
@ -197,7 +197,7 @@ if (check_acl ($config['id_user'], 0, 'PM')) {
$table->data[1][1] = '<input type="submit" name="upload_button" value="'.__('Upload').'">'; $table->data[1][1] = '<input type="submit" name="upload_button" value="'.__('Upload').'">';
echo '<form method="post" enctype="multipart/form-data">'; echo '<form method="post" enctype="multipart/form-data">';
print_table($table); html_print_table($table);
echo '</form>'; echo '</form>';
} }

View File

@ -44,39 +44,39 @@ $table->width = '95%';
$table->data = array (); $table->data = array ();
$table->data[0][0] = '<strong>'.__('Customer key').'</strong>'; $table->data[0][0] = '<strong>'.__('Customer key').'</strong>';
$table->data[0][1] = print_input_text ('keys[customer_key]', $settings->customer_key, '', 40, 255, true); $table->data[0][1] = html_print_input_text ('keys[customer_key]', $settings->customer_key, '', 40, 255, true);
$table->data[1][0] = '<strong>'.__('Update server host').'</strong>'; $table->data[1][0] = '<strong>'.__('Update server host').'</strong>';
$table->data[1][1] = print_input_text ('keys[update_server_host]', $settings->update_server_host, '', 20, 255, true); $table->data[1][1] = html_print_input_text ('keys[update_server_host]', $settings->update_server_host, '', 20, 255, true);
$table->data[2][0] = '<strong>'.__('Update server path').'</strong>'; $table->data[2][0] = '<strong>'.__('Update server path').'</strong>';
$table->data[2][1] = print_input_text ('keys[update_server_path]', $settings->update_server_path, '', 40, 255, true); $table->data[2][1] = html_print_input_text ('keys[update_server_path]', $settings->update_server_path, '', 40, 255, true);
$table->data[3][0] = '<strong>'.__('Update server port').'</strong>'; $table->data[3][0] = '<strong>'.__('Update server port').'</strong>';
$table->data[3][1] = print_input_text ('keys[update_server_port]', $settings->update_server_port, '', 5, 5, true); $table->data[3][1] = html_print_input_text ('keys[update_server_port]', $settings->update_server_port, '', 5, 5, true);
$table->data[4][0] = '<strong>'.__('Binary input path').'</strong>'; $table->data[4][0] = '<strong>'.__('Binary input path').'</strong>';
$table->data[4][1] = print_input_text ('keys[updating_binary_path]', $settings->updating_binary_path, '', 40, 255, true); $table->data[4][1] = html_print_input_text ('keys[updating_binary_path]', $settings->updating_binary_path, '', 40, 255, true);
$table->data[5][0] = '<strong>'.__('Keygen path').'</strong>'; $table->data[5][0] = '<strong>'.__('Keygen path').'</strong>';
$table->data[5][1] = print_input_text ('keys[keygen_path]', $settings->keygen_path, '', 40, 255, true); $table->data[5][1] = html_print_input_text ('keys[keygen_path]', $settings->keygen_path, '', 40, 255, true);
$table->data[6][0] = '<strong>'.__('Proxy server').'</strong>'; $table->data[6][0] = '<strong>'.__('Proxy server').'</strong>';
$table->data[6][1] = print_input_text ('keys[proxy]', $settings->proxy, '', 40, 255, true); $table->data[6][1] = html_print_input_text ('keys[proxy]', $settings->proxy, '', 40, 255, true);
$table->data[7][0] = '<strong>'.__('Proxy port').'</strong>'; $table->data[7][0] = '<strong>'.__('Proxy port').'</strong>';
$table->data[7][1] = print_input_text ('keys[proxy_port]', $settings->proxy_port, '', 40, 255, true); $table->data[7][1] = html_print_input_text ('keys[proxy_port]', $settings->proxy_port, '', 40, 255, true);
$table->data[8][0] = '<strong>'.__('Proxy user').'</strong>'; $table->data[8][0] = '<strong>'.__('Proxy user').'</strong>';
$table->data[8][1] = print_input_text ('keys[proxy_user]', $settings->proxy_user, '', 40, 255, true); $table->data[8][1] = html_print_input_text ('keys[proxy_user]', $settings->proxy_user, '', 40, 255, true);
$table->data[9][0] = '<strong>'.__('Proxy password').'</strong>'; $table->data[9][0] = '<strong>'.__('Proxy password').'</strong>';
$table->data[9][1] = print_input_password ('keys[proxy_pass]', $settings->proxy_pass, '', 40, 255, true); $table->data[9][1] = html_print_input_password ('keys[proxy_pass]', $settings->proxy_pass, '', 40, 255, true);
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
print_input_hidden ('update_settings', 1); html_print_input_hidden ('update_settings', 1);
print_submit_button (__('Update'), 'update_button', false, 'class="sub upd"'); html_print_submit_button (__('Update'), 'update_button', false, 'class="sub upd"');
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -85,7 +85,7 @@ function users_extension_main_god ($god = true) {
array_push ($table->data, $data); array_push ($table->data, $data);
} }
print_table ($table); html_print_table ($table);
} }
} }
add_godmode_menu_option (__('Users connected'), 'UM','gusuarios',"users/icon.png"); add_godmode_menu_option (__('Users connected'), 'UM','gusuarios',"users/icon.png");

View File

@ -28,9 +28,9 @@ $msg_cnt = 0;
<a href="index.php?sec=main"> <a href="index.php?sec=main">
<?php <?php
if (!defined ('PANDORA_ENTERPRISE')){ if (!defined ('PANDORA_ENTERPRISE')){
echo print_image('images/pandora_header_logo.png', true, array("alt" => 'Pandora FMS Opensource', "border" => '0')); echo html_print_image('images/pandora_header_logo.png', true, array("alt" => 'Pandora FMS Opensource', "border" => '0'));
} else { } else {
echo print_image('images/pandora_header_logo_enterprise.png', true, array("alt" => 'Pandora FMS Enterprise', "border" => '0')); echo html_print_image('images/pandora_header_logo_enterprise.png', true, array("alt" => 'Pandora FMS Enterprise', "border" => '0'));
} }
?> ?>
</a> </a>
@ -38,9 +38,9 @@ $msg_cnt = 0;
<td width="20%"> <td width="20%">
<?php <?php
if (is_user_admin ($config["id_user"]) == 1) if (is_user_admin ($config["id_user"]) == 1)
print_image("images/user_suit.png" , false, array("class" => 'bot', "alt" => 'user')); html_print_image("images/user_suit.png" , false, array("class" => 'bot', "alt" => 'user'));
else else
print_image("images/user_green.png" , false, array("class" => 'bot', "alt" => 'user')); html_print_image("images/user_green.png" , false, array("class" => 'bot', "alt" => 'user'));
?> ?>
<a href="index.php?sec=usuarios&amp;sec2=operation/users/user_edit" class="white"> [<b><?php echo $config["id_user"];?></b>]</a> <a href="index.php?sec=usuarios&amp;sec2=operation/users/user_edit" class="white"> [<b><?php echo $config["id_user"];?></b>]</a>
<?php <?php
@ -54,14 +54,14 @@ $msg_cnt = 0;
ui_require_jquery_file ('ui.core'); ui_require_jquery_file ('ui.core');
ui_require_jquery_file ('ui.dialog'); ui_require_jquery_file ('ui.dialog');
echo '<a href="ajax.php?page=operation/messages/message" id="show_messages_dialog">'; echo '<a href="ajax.php?page=operation/messages/message" id="show_messages_dialog">';
print_image ("images/email.png", false, html_print_image ("images/email.png", false,
array ("title" => __('You have %d unread message(s)', $msg_cnt), "id" => "yougotmail", "class" => "bot")); array ("title" => __('You have %d unread message(s)', $msg_cnt), "id" => "yougotmail", "class" => "bot"));
echo '</a>'; echo '</a>';
} }
} }
?> ?>
&nbsp; &nbsp;
<a class="white_bold" href="index.php?bye=bye"><?php print_image("images/log-out.png", false, array("alt" => __('Logout'), "class" => 'bot', "title" => __('Logout')))?></a> <a class="white_bold" href="index.php?bye=bye"><?php html_print_image("images/log-out.png", false, array("alt" => __('Logout'), "class" => 'bot', "title" => __('Logout')))?></a>
</td> </td>
<td width="20%"> <td width="20%">
@ -75,15 +75,15 @@ $msg_cnt = 0;
$servers["down"] = $servers["all"] - $servers["up"]; $servers["down"] = $servers["all"] - $servers["up"];
if ($servers["up"] == 0) { if ($servers["up"] == 0) {
//All Servers down or no servers at all //All Servers down or no servers at all
echo print_image("images/cross.png", true, array("alt" => 'cross', "class" => 'bot')) . '&nbsp;'.__('All systems').': '.__('Down'); echo html_print_image("images/cross.png", true, array("alt" => 'cross', "class" => 'bot')) . '&nbsp;'.__('All systems').': '.__('Down');
} }
elseif ($servers["down"] != 0) { elseif ($servers["down"] != 0) {
//Some servers down //Some servers down
echo print_image("images/error.png", true, array("alt" => 'error', "class" => 'bot')) . '&nbsp;'.$servers["down"].' '.__('servers down'); echo html_print_image("images/error.png", true, array("alt" => 'error', "class" => 'bot')) . '&nbsp;'.$servers["down"].' '.__('servers down');
} }
else { else {
//All servers up //All servers up
echo print_image("images/ok.png", true, array("alt" => 'ok', "class" => 'bot')) . '&nbsp;'.__('All systems').': '.__('Ready'); echo html_print_image("images/ok.png", true, array("alt" => 'ok', "class" => 'bot')) . '&nbsp;'.__('All systems').': '.__('Ready');
} }
unset ($servers); // Since this is the header, we don't like to trickle down variables. unset ($servers); // Since this is the header, we don't like to trickle down variables.
echo '</a>'; echo '</a>';
@ -100,13 +100,13 @@ $msg_cnt = 0;
$ignored_params = array ('agent_config' => false, 'code' => false); $ignored_params = array ('agent_config' => false, 'code' => false);
if ($config["refr"]) { if ($config["refr"]) {
$ignored_params['refr'] = 0; $ignored_params['refr'] = 0;
echo '<a id="autorefresh" class="white_grey_bold" href="' . ui_get_url_refresh ($ignored_params).'">' . print_image("images/page_refresh.png", true, array("class" => 'bot', "alt" => 'lightning')) . '&nbsp;'. __('Autorefresh'); echo '<a id="autorefresh" class="white_grey_bold" href="' . ui_get_url_refresh ($ignored_params).'">' . html_print_image("images/page_refresh.png", true, array("class" => 'bot', "alt" => 'lightning')) . '&nbsp;'. __('Autorefresh');
echo ' (<span id="refrcounter">'.date ("i:s", $config["refr"]).'</span>)'; echo ' (<span id="refrcounter">'.date ("i:s", $config["refr"]).'</span>)';
echo '</a>'; echo '</a>';
} }
else { else {
$ignored_params['refr'] = ''; $ignored_params['refr'] = '';
echo '<a id="autorefresh" class="white_bold" href="' . ui_get_url_refresh ($ignored_params).'">' . print_image("images/page_refresh.png", true, array("class" => 'bot', "alt" => 'lightning')) . '&nbsp;'. __('Autorefresh'); echo '<a id="autorefresh" class="white_bold" href="' . ui_get_url_refresh ($ignored_params).'">' . html_print_image("images/page_refresh.png", true, array("class" => 'bot', "alt" => 'lightning')) . '&nbsp;'. __('Autorefresh');
$values = array ( $values = array (
'5' => '5 '.__('seconds'), '5' => '5 '.__('seconds'),
'10' => '10 '.__('seconds'), '10' => '10 '.__('seconds'),
@ -119,7 +119,7 @@ $msg_cnt = 0;
'1800' => '30 '.__('minutes'), '1800' => '30 '.__('minutes'),
'3600' => '1 '.__('hour')); '3600' => '1 '.__('hour'));
echo '<span id="combo_refr" style="display: none">'; echo '<span id="combo_refr" style="display: none">';
print_select ($values, 'ref', '', '', __('Select'), '0', false, false, false); html_print_select ($values, 'ref', '', '', __('Select'), '0', false, false, false);
unset ($values); unset ($values);
echo '</span>'; echo '</span>';
} }
@ -127,7 +127,7 @@ $msg_cnt = 0;
echo "<td width='20%' rowspan='2'>"; echo "<td width='20%' rowspan='2'>";
echo "<a href='index.php?sec=main'>"; echo "<a href='index.php?sec=main'>";
if (isset($config["custom_logo"])) if (isset($config["custom_logo"]))
echo print_image("images/custom_logo/" . $config["custom_logo"], true,array("height" => '60', "width" => '139', "alt" => 'Logo')); echo html_print_image("images/custom_logo/" . $config["custom_logo"], true,array("height" => '60', "width" => '139', "alt" => 'Logo'));
echo "</a>"; echo "</a>";
?> ?>
</td> </td>
@ -162,7 +162,7 @@ $msg_cnt = 0;
<td> <td>
<?php <?php
if ($config["metaconsole"] == 0){ if ($config["metaconsole"] == 0){
echo '<a class="white_bold" href="index.php?sec=eventos&amp;sec2=operation/events/events">' . print_image("images/lightning_go.png", true, array("alt" => 'lightning_go', "class" => 'bot')) . '&nbsp;'.__('Events').'</a>'; echo '<a class="white_bold" href="index.php?sec=eventos&amp;sec2=operation/events/events">' . html_print_image("images/lightning_go.png", true, array("alt" => 'lightning_go', "class" => 'bot')) . '&nbsp;'.__('Events').'</a>';
} }
?> ?>
</td> </td>

View File

@ -42,7 +42,7 @@ echo '<tr><td rowspan="3" align="left" style="border-right: solid 1px #678;">';
if (!empty ($page) && !empty ($sec)) { if (!empty ($page) && !empty ($sec)) {
foreach ($_POST as $key => $value) { foreach ($_POST as $key => $value) {
print_input_hidden ($key, $value); html_print_input_hidden ($key, $value);
} }
} }
@ -52,7 +52,7 @@ if (!empty ($page) && !empty ($sec)) {
// Replace the following with your own URL and logo. // Replace the following with your own URL and logo.
// A mashup of the Pandora FMS logo and your companies highly preferred // A mashup of the Pandora FMS logo and your companies highly preferred
echo '<a href="http://pandorafms.org" title="Go to pandorafms.org...">'; echo '<a href="http://pandorafms.org" title="Go to pandorafms.org...">';
print_image ("images/pandora_logo.png", false, array ("alt" => "logo", "border" => 0)); html_print_image ("images/pandora_logo.png", false, array ("alt" => "logo", "border" => 0));
echo '</a><br />'; echo '</a><br />';
// This prints the current pandora console version. // This prints the current pandora console version.
@ -62,13 +62,13 @@ echo $pandora_version.(($develop_bypass == 1) ? ' '.__('Build').' '.$build_versi
/* CUSTOM BRANDING ENDS HERE */ /* CUSTOM BRANDING ENDS HERE */
echo '</td><td class="f9b"> echo '</td><td class="f9b">
'.__('Login').':<br />'.print_input_text_extended ("nick", '', "nick", '', '', '' , false, '', 'class="login"', true).' '.__('Login').':<br />'.html_print_input_text_extended ("nick", '', "nick", '', '', '' , false, '', 'class="login"', true).'
</td></tr> </td></tr>
<tr><td class="f9b"> <tr><td class="f9b">
'.__('Password').':<br />'.print_input_text_extended ("pass", '', "pass", '', '', '' ,false, '', 'class="login"', true, true).' '.__('Password').':<br />'.html_print_input_text_extended ("pass", '', "pass", '', '', '' ,false, '', 'class="login"', true, true).'
</td></tr> </td></tr>
<tr><td align="center"> <tr><td align="center">
'.print_submit_button ("Login",'',false,'class="sub next"',true).' '.html_print_submit_button ("Login",'',false,'class="sub next"',true).'
</td></tr> </td></tr>
</table> </table>
</form> </form>

View File

@ -22,7 +22,7 @@
<tr><td align="left"> <tr><td align="left">
<?php <?php
echo '<a href="index.php">'; echo '<a href="index.php">';
print_image ("images/pandora_logo.png", false, array ("alt" => "logo", "border" => 0)); html_print_image ("images/pandora_logo.png", false, array ("alt" => "logo", "border" => 0));
echo '</a> '.$pandora_version; echo '</a> '.$pandora_version;
?> ?>
</td><td valign="bottom"> </td><td valign="bottom">

View File

@ -86,7 +86,7 @@ $table->data[4][0] = '<b>'.__('Alert level').'</b>';
$table->data[5][0] = $table->data[5][0] =
progress_bar2($data["alert_level"], 280, 20, $data["alert_level"].'% '.__('of defined alerts not fired'), 0); progress_bar2($data["alert_level"], 280, 20, $data["alert_level"].'% '.__('of defined alerts not fired'), 0);
print_table ($table); html_print_table ($table);
unset ($table); unset ($table);
echo '<table class="databox" cellpadding="4" cellspacing="4" width="100%">'; echo '<table class="databox" cellpadding="4" cellspacing="4" width="100%">';
@ -214,7 +214,7 @@ foreach ($sessions as $session) {
array_push ($table->data, $data); array_push ($table->data, $data);
} }
echo "<div style='width:100%; overflow-x:scroll;'>"; echo "<div style='width:100%; overflow-x:scroll;'>";
print_table ($table); html_print_table ($table);
echo "</div>"; echo "</div>";
echo "</div>"; // activity echo "</div>"; // activity
?> ?>

View File

@ -26,7 +26,7 @@ if (file_exists("images/noaccess.png")){
<?php <?php
if (file_exists("images/noaccess.png")){ if (file_exists("images/noaccess.png")){
echo print_image('images/noaccess.png', true, array("alt" => __('No access'))); echo html_print_image('images/noaccess.png', true, array("alt" => __('No access')));
} }
?> ?>
<div>&nbsp;</div> <div>&nbsp;</div>

View File

@ -50,7 +50,7 @@ if (! $id || ! file_exists ($help_file)) {
echo __('Help system error'); echo __('Help system error');
echo "</h1>"; echo "</h1>";
echo "<div class='noa'>"; echo "<div class='noa'>";
echo '<a href="../index.php">' . print_image("../images/pandora_logo.png", array("border" => '0')) . '</a><br>'; echo '<a href="../index.php">' . html_print_image("../images/pandora_logo.png", array("border" => '0')) . '</a><br>';
echo "</div>"; echo "</div>";
echo '<div class="msg">'.__('Pandora FMS help system has been called with a help reference that currently don\'t exist. There is no help content to show.').'</div></div></div>'; echo '<div class="msg">'.__('Pandora FMS help system has been called with a help reference that currently don\'t exist. There is no help content to show.').'</div></div></div>';
return; return;
@ -59,7 +59,7 @@ if (! $id || ! file_exists ($help_file)) {
/* Show help */ /* Show help */
echo '<div>'; echo '<div>';
echo '<span style="float:left; margin: 0px; padding: 0px">'; echo '<span style="float:left; margin: 0px; padding: 0px">';
echo print_image('../images/pandora_textlogo.png', true, array("border" => '0')); echo html_print_image('../images/pandora_textlogo.png', true, array("border" => '0'));
echo "</span>"; echo "</span>";
echo '<p style="text-align: right"><strong>'.__('Pandora FMS help system').'</strong></p>'; echo '<p style="text-align: right"><strong>'.__('Pandora FMS help system').'</strong></p>';
echo '</div>'; echo '</div>';

View File

@ -67,7 +67,7 @@ if ($show_filter_form) {
$data = array (); $data = array ();
$data = array (); $data = array ();
$data[] = __('Group'); $data[] = __('Group');
$data[] = print_select_groups(false, $access, true, $data[] = html_print_select_groups(false, $access, true,
'id_group', '', '', '', '', true); 'id_group', '', '', '', '', true);
if (! $odd) if (! $odd)
array_push ($table->data, $data); array_push ($table->data, $data);
@ -78,18 +78,18 @@ if ($show_filter_form) {
if ($odd) if ($odd)
$data = array (); $data = array ();
$data[] = __('Search'); $data[] = __('Search');
$data[] = print_input_text ('search_string', '', '', 15, 255, true); $data[] = html_print_input_text ('search_string', '', '', 15, 255, true);
if (! $odd) if (! $odd)
array_push ($table->data, $data); array_push ($table->data, $data);
$odd = !$odd; $odd = !$odd;
} }
echo '<form id="agent_search" method="post">'; echo '<form id="agent_search" method="post">';
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
print_submit_button (__('Search'), 'search', false, 'class="sub search"'); html_print_submit_button (__('Search'), 'search', false, 'class="sub search"');
print_input_hidden ('search_agents', 1); html_print_input_hidden ('search_agents', 1);
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';
@ -117,7 +117,7 @@ unset ($filter['offset']);
if (! is_ajax ()) { if (! is_ajax ()) {
echo '<div id="agents_loading" class="loading invisible">'; echo '<div id="agents_loading" class="loading invisible">';
echo print_image('images/spinner.png', true); echo html_print_image('images/spinner.png', true);
echo __('Loading').'&hellip;'; echo __('Loading').'&hellip;';
echo '</div>'; echo '</div>';
} }
@ -149,7 +149,7 @@ if ($agents !== false) {
} }
echo '<div id="agents"'.($agents === false ? ' class="invisible"' : '').'>'; echo '<div id="agents"'.($agents === false ? ' class="invisible"' : '').'>';
ui_pagination ($total_agents, '#'); ui_pagination ($total_agents, '#');
print_table ($table); html_print_table ($table);
echo '</div>'; echo '</div>';
echo '</div>'; echo '</div>';

View File

@ -62,18 +62,18 @@ $table = null;
$table->width = '100%'; $table->width = '100%';
$table->data = array(); $table->data = array();
$table->data[0][0] = __('Action'); $table->data[0][0] = __('Action');
$table->data[0][1] = print_select ($actions, 'tipo_log', $tipo_log, '', __('All'), 'all', true); $table->data[0][1] = html_print_select ($actions, 'tipo_log', $tipo_log, '', __('All'), 'all', true);
$table->data[1][0] = __('User'); $table->data[1][0] = __('User');
$table->data[1][1] = print_select_from_sql('SELECT id_user, id_user AS text FROM tusuario', 'user', $user_filter, '', __('All'), 0, true); $table->data[1][1] = html_print_select_from_sql('SELECT id_user, id_user AS text FROM tusuario', 'user', $user_filter, '', __('All'), 0, true);
$table->data[2][0] = __('Free text for search (*)'); $table->data[2][0] = __('Free text for search (*)');
$table->data[2][1] = print_input_text('filter_text', $filter_text, __('Free text for search (*)'), 20, 40, true); $table->data[2][1] = html_print_input_text('filter_text', $filter_text, __('Free text for search (*)'), 20, 40, true);
$table->data[3][0] = __('Max. hours old'); $table->data[3][0] = __('Max. hours old');
$table->data[3][1] = print_input_text('filter_hours_old', $filter_hours_old, __('Max. hours old'), 3, 6, true); $table->data[3][1] = html_print_input_text('filter_hours_old', $filter_hours_old, __('Max. hours old'), 3, 6, true);
$table->data[4][0] = __('IP'); $table->data[4][0] = __('IP');
$table->data[4][1] = print_input_text('filter_ip', $filter_ip, __('IP'), 15, 15, true); $table->data[4][1] = html_print_input_text('filter_ip', $filter_ip, __('IP'), 15, 15, true);
$table->data[5][0] = ''; $table->data[5][0] = '';
$table->data[5][1] = print_submit_button(__('Filter'), 'filter', false, 'class="sub search" style="float: right;"', true); $table->data[5][1] = html_print_submit_button(__('Filter'), 'filter', false, 'class="sub search" style="float: right;"', true);
print_table($table); html_print_table($table);
echo '</form>'; echo '</form>';
echo '</div>'; echo '</div>';
echo '<div style="float: right; width: 250px;">'; echo '<div style="float: right; width: 250px;">';
@ -284,7 +284,7 @@ foreach ($result as $row) {
} }
} }
print_table ($table); html_print_table ($table);
if ($enterprise_include !== ENTERPRISE_NOT_HOOK) { if ($enterprise_include !== ENTERPRISE_NOT_HOOK) {
enterprise_hook('enterpriseAuditFooter'); enterprise_hook('enterpriseAuditFooter');

View File

@ -26,14 +26,14 @@ ui_require_javascript_file('openlayers.pandora');
echo "<div style='margin-bottom: 10px;'></div>"; echo "<div style='margin-bottom: 10px;'></div>";
$agentData = getDataLastPositionAgent($id_agente); $agentData = gis_get_data_last_position_agent($id_agente);
$updateGisData = db_get_value('update_gis_data','tagente', 'id_agente', $id_agente); $updateGisData = db_get_value('update_gis_data','tagente', 'id_agente', $id_agente);
$agent_name = get_agent_name($id_agente); $agent_name = get_agent_name($id_agente);
/* Map with the current position */ /* Map with the current position */
echo "<div id=\"" . $agent_name . "_agent_map\" style=\"border:1px solid black; width:98%; height: 30em;\"></div>"; echo "<div id=\"" . $agent_name . "_agent_map\" style=\"border:1px solid black; width:98%; height: 30em;\"></div>";
if (!getAgentMap($id_agente, "500px", "98%", false)) { if (!gis_get_agent_map($id_agente, "500px", "98%", false)) {
echo "<br /><div class='nf'>" . __("There is no default map.") . "</div>"; echo "<br /><div class='nf'>" . __("There is no default map.") . "</div>";
} }
@ -49,28 +49,28 @@ $table->head[0] =__('Agent position');
$table->head_colspan[0] = 2; $table->head_colspan[0] = 2;
$table->data[1][0] = __('Longitude: '); $table->data[1][0] = __('Longitude: ');
$table->data[1][1] = print_input_text_extended ('longitude', $agentData['stored_longitude'], 'text-longitude', '', 10, 10, false, '', $table->data[1][1] = html_print_input_text_extended ('longitude', $agentData['stored_longitude'], 'text-longitude', '', 10, 10, false, '',
array('onchange' => "setIgnoreGISDataEnabled()", 'onkeyup' => "setIgnoreGISDataEnabled()"), true); array('onchange' => "setIgnoreGISDataEnabled()", 'onkeyup' => "setIgnoreGISDataEnabled()"), true);
$table->data[2][0] = __('Latitude: '); $table->data[2][0] = __('Latitude: ');
$table->data[2][1] = print_input_text_extended ('latitude', $agentData['stored_latitude'], 'text-latitude', '', 10, 10, false, '', $table->data[2][1] = html_print_input_text_extended ('latitude', $agentData['stored_latitude'], 'text-latitude', '', 10, 10, false, '',
array('onchange' => "setIgnoreGISDataEnabled()", 'onkeyup' => "setIgnoreGISDataEnabled()"), true); array('onchange' => "setIgnoreGISDataEnabled()", 'onkeyup' => "setIgnoreGISDataEnabled()"), true);
$table->data[3][0] = __('Altitude: '); $table->data[3][0] = __('Altitude: ');
$table->data[3][1] = print_input_text_extended ('altitude', $agentData['stored_altitude'], 'text-altitude', '', 10, 10, false, '', $table->data[3][1] = html_print_input_text_extended ('altitude', $agentData['stored_altitude'], 'text-altitude', '', 10, 10, false, '',
array('onchange' => "setIgnoreGISDataEnabled()", 'onkeyup' => "setIgnoreGISDataEnabled()"), true); array('onchange' => "setIgnoreGISDataEnabled()", 'onkeyup' => "setIgnoreGISDataEnabled()"), true);
$table->data[4][0] = __('Ignore new GIS data:'); $table->data[4][0] = __('Ignore new GIS data:');
$table->data[4][1] = __('Disabled').' '.print_radio_button_extended ("update_gis_data", 1, '', $updateGisData, false, '', 'style="margin-right: 40px;"', true); $table->data[4][1] = __('Disabled').' '.html_print_radio_button_extended ("update_gis_data", 1, '', $updateGisData, false, '', 'style="margin-right: 40px;"', true);
$table->data[4][1] .= __('Active').' '.print_radio_button_extended ("update_gis_data", 0, '', $updateGisData, false, '', 'style="margin-right: 40px;"', true); $table->data[4][1] .= __('Active').' '.html_print_radio_button_extended ("update_gis_data", 0, '', $updateGisData, false, '', 'style="margin-right: 40px;"', true);
$url = 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=gis&id_agente='.$id_agente; $url = 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=gis&id_agente='.$id_agente;
echo "<form method='post' action='" . $url . "' onsubmit ='return validateFormFields();'>"; echo "<form method='post' action='" . $url . "' onsubmit ='return validateFormFields();'>";
print_input_hidden('update_gis', 1); html_print_input_hidden('update_gis', 1);
print_table($table); html_print_table($table);
echo '<div class="action-buttons" style="clear: left; width: ' . $table->width . '; float: left;">'; echo '<div class="action-buttons" style="clear: left; width: ' . $table->width . '; float: left;">';
print_submit_button (__('Update'), '', false, 'class="sub upd"'); html_print_submit_button (__('Update'), '', false, 'class="sub upd"');
echo '</div>'; echo '</div>';
echo "</form>"; echo "</form>";
?> ?>

View File

@ -99,11 +99,11 @@ $table->data = array ();
$table->data[0][0] = __('Agent name') . $table->data[0][0] = __('Agent name') .
ui_print_help_tip (__("The agent's name must be the same as the one defined at the console"), true); ui_print_help_tip (__("The agent's name must be the same as the one defined at the console"), true);
$table->data[0][1] = print_input_text ('agente', $nombre_agente, '', 30, 100,true); $table->data[0][1] = html_print_input_text ('agente', $nombre_agente, '', 30, 100,true);
if ($id_agente) { if ($id_agente) {
$table->data[0][1] .= '<a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$id_agente.'">'; $table->data[0][1] .= '<a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$id_agente.'">';
$table->data[0][1] .= print_image ("images/lupa.png", true, array ("border" => 0, "title" => __('Agent detail'))); $table->data[0][1] .= html_print_image ("images/lupa.png", true, array ("border" => 0, "title" => __('Agent detail')));
$table->data[0][1] .= '</a>'; $table->data[0][1] .= '</a>';
} }
@ -111,35 +111,35 @@ if ($id_agente) {
if (!$new_agent) { if (!$new_agent) {
if (file_exists ($filename['md5'])) { if (file_exists ($filename['md5'])) {
$table->data[0][1] .= '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;tab=main&amp;id_agente='.$id_agente.'&amp;disk_conf='.$agent_md5.'">'; $table->data[0][1] .= '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;tab=main&amp;id_agente='.$id_agente.'&amp;disk_conf='.$agent_md5.'">';
$table->data[0][1] .= print_image ("images/application_edit.png", true, array ("border" => 0, "title" => __('This agent can be remotely configured'))); $table->data[0][1] .= html_print_image ("images/application_edit.png", true, array ("border" => 0, "title" => __('This agent can be remotely configured')));
$table->data[0][1] .= '</a>'.ui_print_help_tip (__('You can remotely edit this agent configuration'), true); $table->data[0][1] .= '</a>'.ui_print_help_tip (__('You can remotely edit this agent configuration'), true);
} }
} }
$table->data[1][0] = __('IP Address'); $table->data[1][0] = __('IP Address');
$table->data[1][1] = print_input_text ('direccion', $direccion_agente, '', 16, 100, true); $table->data[1][1] = html_print_input_text ('direccion', $direccion_agente, '', 16, 100, true);
if ($id_agente) { if ($id_agente) {
$table->data[1][1] .= '&nbsp;&nbsp;&nbsp;&nbsp;'; $table->data[1][1] .= '&nbsp;&nbsp;&nbsp;&nbsp;';
$ip_all = get_agent_addresses ($id_agente); $ip_all = get_agent_addresses ($id_agente);
$table->data[1][1] .= print_select ($ip_all, "address_list", $direccion_agente, '', '', 0, true); $table->data[1][1] .= html_print_select ($ip_all, "address_list", $direccion_agente, '', '', 0, true);
$table->data[1][1] .= "&nbsp;". print_checkbox ("delete_ip", 1, false, true).__('Delete selected'); $table->data[1][1] .= "&nbsp;". html_print_checkbox ("delete_ip", 1, false, true).__('Delete selected');
} }
$groups = get_user_groups ($config["id_user"], "AR",false); $groups = get_user_groups ($config["id_user"], "AR",false);
$agents = get_group_agents (array_keys ($groups)); $agents = get_group_agents (array_keys ($groups));
$table->data[2][0] = __('Parent'); $table->data[2][0] = __('Parent');
$table->data[2][1] = print_input_text_extended ('id_parent', get_agent_name ($id_parent), 'text-id_parent', '', 30, 100, false, '', $table->data[2][1] = html_print_input_text_extended ('id_parent', get_agent_name ($id_parent), 'text-id_parent', '', 30, 100, false, '',
array('style' => 'background: url(images/lightning.png) no-repeat right;'), true) array('style' => 'background: url(images/lightning.png) no-repeat right;'), true)
. '<a href="#" class="tip">&nbsp;<span>' . __("Type at least two characters to search") . '</span></a>'; . '<a href="#" class="tip">&nbsp;<span>' . __("Type at least two characters to search") . '</span></a>';
$table->data[2][1] .= print_checkbox ("cascade_protection", 1, $cascade_protection, true).__('Cascade protection'). "&nbsp;" . ui_print_help_icon("cascade_protection", true); $table->data[2][1] .= html_print_checkbox ("cascade_protection", 1, $cascade_protection, true).__('Cascade protection'). "&nbsp;" . ui_print_help_icon("cascade_protection", true);
$table->data[3][0] = __('Group'); $table->data[3][0] = __('Group');
$table->data[3][1] = print_select_groups(false, "AR", false, 'grupo', $grupo, '', '', 0, true); $table->data[3][1] = html_print_select_groups(false, "AR", false, 'grupo', $grupo, '', '', 0, true);
$table->data[4][0] = __('Interval'); $table->data[4][0] = __('Interval');
@ -152,11 +152,11 @@ $intervals[1200] = human_time_description_raw (1200);
$intervals[1800] = human_time_description_raw (1800); $intervals[1800] = human_time_description_raw (1800);
$intervals[3600] = human_time_description_raw (3600); $intervals[3600] = human_time_description_raw (3600);
$intervals[7200] = human_time_description_raw (7200); $intervals[7200] = human_time_description_raw (7200);
$table->data[4][1] = print_extended_select_for_time ($intervals, 'intervalo', $intervalo, '', '', '0', 10, true) . __(" seconds."); $table->data[4][1] = html_print_extended_select_for_time ($intervals, 'intervalo', $intervalo, '', '', '0', 10, true) . __(" seconds.");
//$table->data[4][1] = print_input_text ('intervalo', $intervalo, '', 16, 100, true); //$table->data[4][1] = html_print_input_text ('intervalo', $intervalo, '', 16, 100, true);
$table->data[5][0] = __('OS'); $table->data[5][0] = __('OS');
$table->data[5][1] = print_select_from_sql ('SELECT id_os, name FROM tconfig_os', $table->data[5][1] = html_print_select_from_sql ('SELECT id_os, name FROM tconfig_os',
'id_os', $id_os, '', '', '0', true); 'id_os', $id_os, '', '', '0', true);
$table->data[5][1] .= ' <span id="os_preview">'; $table->data[5][1] .= ' <span id="os_preview">';
$table->data[5][1] .= ui_print_os_icon ($id_os, false, true); $table->data[5][1] .= ui_print_os_icon ($id_os, false, true);
@ -167,14 +167,14 @@ $none = '';
if ($server_name == '' && $id_agente) if ($server_name == '' && $id_agente)
$none = __('None'); $none = __('None');
$table->data[6][0] = __('Server'); $table->data[6][0] = __('Server');
$table->data[6][1] = print_select (get_server_names (), $table->data[6][1] = html_print_select (get_server_names (),
'server_name', $server_name, '', $none, 0, true); 'server_name', $server_name, '', $none, 0, true);
// Description // Description
$table->data[7][0] = __('Description'); $table->data[7][0] = __('Description');
$table->data[7][1] = print_input_text ('comentarios', $comentarios, '', 45, 255, true); $table->data[7][1] = html_print_input_text ('comentarios', $comentarios, '', 45, 255, true);
print_table ($table); html_print_table ($table);
unset($table); unset($table);
$table->width = '95%'; $table->width = '95%';
@ -187,17 +187,17 @@ $table->data = array ();
// Custom ID // Custom ID
$table->data[0][0] = __('Custom ID'); $table->data[0][0] = __('Custom ID');
$table->data[0][1] = print_input_text ('custom_id', $custom_id, '', 16, 255, true); $table->data[0][1] = html_print_input_text ('custom_id', $custom_id, '', 16, 255, true);
// Learn mode / Normal mode // Learn mode / Normal mode
$table->data[1][0] = __('Module definition').ui_print_help_icon("module_definition", true); $table->data[1][0] = __('Module definition').ui_print_help_icon("module_definition", true);
$table->data[1][1] = __('Learning mode').' '.print_radio_button_extended ("modo", 1, '', $modo, false, '', 'style="margin-right: 40px;"', true); $table->data[1][1] = __('Learning mode').' '.html_print_radio_button_extended ("modo", 1, '', $modo, false, '', 'style="margin-right: 40px;"', true);
$table->data[1][1] .= __('Normal mode').' '.print_radio_button_extended ("modo", 0, '', $modo, false, '', 'style="margin-right: 40px;"', true); $table->data[1][1] .= __('Normal mode').' '.html_print_radio_button_extended ("modo", 0, '', $modo, false, '', 'style="margin-right: 40px;"', true);
// Status (Disabled / Enabled) // Status (Disabled / Enabled)
$table->data[2][0] = __('Status'); $table->data[2][0] = __('Status');
$table->data[2][1] = __('Disabled').' '.print_radio_button_extended ("disabled", 1, '', $disabled, false, '', 'style="margin-right: 40px;"', true); $table->data[2][1] = __('Disabled').' '.html_print_radio_button_extended ("disabled", 1, '', $disabled, false, '', 'style="margin-right: 40px;"', true);
$table->data[2][1] .= __('Active').' '.print_radio_button_extended ("disabled", 0, '', $disabled, false, '', 'style="margin-right: 40px;"', true); $table->data[2][1] .= __('Active').' '.html_print_radio_button_extended ("disabled", 0, '', $disabled, false, '', 'style="margin-right: 40px;"', true);
// Remote configuration // Remote configuration
$table->data[3][0] = __('Remote configuration'); $table->data[3][0] = __('Remote configuration');
@ -207,7 +207,7 @@ if (!$new_agent) {
$table->data[3][1] = date ("F d Y H:i:s", fileatime ($filename['md5'])); $table->data[3][1] = date ("F d Y H:i:s", fileatime ($filename['md5']));
// Delete remote configuration // Delete remote configuration
$table->data[3][1] .= '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;tab=main&amp;disk_conf_delete=1&amp;id_agente='.$id_agente.'">'; $table->data[3][1] .= '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;tab=main&amp;disk_conf_delete=1&amp;id_agente='.$id_agente.'">';
$table->data[3][1] .= print_image ("images/cross.png", true, array ('title' => __('Delete remote configuration file'), 'style' => 'vertical-align: middle;')).'</a>'; $table->data[3][1] .= html_print_image ("images/cross.png", true, array ('title' => __('Delete remote configuration file'), 'style' => 'vertical-align: middle;')).'</a>';
$table->data[3][1] .= '</a>'.ui_print_help_tip (__('Delete this conf file implies that for restore you must reactive remote config in the local agent.'), true); $table->data[3][1] .= '</a>'.ui_print_help_tip (__('Delete this conf file implies that for restore you must reactive remote config in the local agent.'), true);
} }
else else
@ -216,7 +216,7 @@ if (!$new_agent) {
else else
$table->data[3][1] = '<em>'.__('Not available').'</em>'; $table->data[3][1] = '<em>'.__('Not available').'</em>';
$listIcons = getArrayListIcons(); $listIcons = gis_get_array_list_icons();
$arraySelectIcon = array(); $arraySelectIcon = array();
foreach ($listIcons as $index => $value) $arraySelectIcon[$index] = $index; foreach ($listIcons as $index => $value) $arraySelectIcon[$index] = $index;
@ -224,22 +224,22 @@ foreach ($listIcons as $index => $value) $arraySelectIcon[$index] = $index;
$path = 'images/gis_map/icons/'; //TODO set better method the path $path = 'images/gis_map/icons/'; //TODO set better method the path
$table->data[4][0] = __('Agent icon'); $table->data[4][0] = __('Agent icon');
$table->data[4][1] = print_select($arraySelectIcon, "icon_path", $icon_path, "changeIcons();", __('None'), '', true) . $table->data[4][1] = html_print_select($arraySelectIcon, "icon_path", $icon_path, "changeIcons();", __('None'), '', true) .
'&nbsp;' . __('Without status') . ': ' . print_image($path . $icon_path . "default.png", true, array("id" => "icon_without_status", "style" => "display:none;")) . '&nbsp;' . __('Without status') . ': ' . html_print_image($path . $icon_path . "default.png", true, array("id" => "icon_without_status", "style" => "display:none;")) .
'&nbsp;' . __('Default') . ': ' . print_image($path . $icon_path . "default.png", true, array("id" => "icon_default", "style" => "display:none;")) . '&nbsp;' . __('Default') . ': ' . html_print_image($path . $icon_path . "default.png", true, array("id" => "icon_default", "style" => "display:none;")) .
'&nbsp;' . __('Ok') . ': ' . print_image($path . $icon_path . "ok.png", true, array("id" => "icon_ok", "style" => "display:none;")) . '&nbsp;' . __('Ok') . ': ' . html_print_image($path . $icon_path . "ok.png", true, array("id" => "icon_ok", "style" => "display:none;")) .
'&nbsp;' . __('Bad') . ': ' . print_image($path . $icon_path . "bad.png", true, array("id" => "icon_bad", "style" => "display:none;")) . '&nbsp;' . __('Bad') . ': ' . html_print_image($path . $icon_path . "bad.png", true, array("id" => "icon_bad", "style" => "display:none;")) .
'&nbsp;' . __('Warning') . ': ' . print_image($path . $icon_path . "warning.png", true, array("id" => "icon_warning", "style" => "display:none;")); '&nbsp;' . __('Warning') . ': ' . html_print_image($path . $icon_path . "warning.png", true, array("id" => "icon_warning", "style" => "display:none;"));
if ($config['activate_gis']) { if ($config['activate_gis']) {
$table->data[5][0] = __('Ignore new GIS data:'); $table->data[5][0] = __('Ignore new GIS data:');
$table->data[5][1] = __('Disabled').' '.print_radio_button_extended ("update_gis_data", 0, '', $update_gis_data, false, '', 'style="margin-right: 40px;"', true); $table->data[5][1] = __('Disabled').' '.html_print_radio_button_extended ("update_gis_data", 0, '', $update_gis_data, false, '', 'style="margin-right: 40px;"', true);
$table->data[5][1] .= __('Active').' '.print_radio_button_extended ("update_gis_data", 1, '', $update_gis_data, false, '', 'style="margin-right: 40px;"', true); $table->data[5][1] .= __('Active').' '.html_print_radio_button_extended ("update_gis_data", 1, '', $update_gis_data, false, '', 'style="margin-right: 40px;"', true);
} }
ui_toggle(print_table ($table, true), __('Advanced options')); ui_toggle(html_print_table ($table, true), __('Advanced options'));
unset($table); unset($table);
$table->width = '95%'; $table->width = '95%';
@ -264,23 +264,23 @@ foreach ($fields as $field) {
$custom_value = ''; $custom_value = '';
} }
$data[1] = print_textarea ('customvalue_'.$field['id_field'], 2, 65, $custom_value, 'style="min-height: 30px;"', true); $data[1] = html_print_textarea ('customvalue_'.$field['id_field'], 2, 65, $custom_value, 'style="min-height: 30px;"', true);
array_push ($table->data, $data); array_push ($table->data, $data);
} }
if(!empty($fields)) { if(!empty($fields)) {
ui_toggle(print_table ($table, true), __('Custom fields')); ui_toggle(html_print_table ($table, true), __('Custom fields'));
} }
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
if ($id_agente) { if ($id_agente) {
print_submit_button (__('Update'), 'updbutton', false, 'class="sub upd"'); html_print_submit_button (__('Update'), 'updbutton', false, 'class="sub upd"');
print_input_hidden ('update_agent', 1); html_print_input_hidden ('update_agent', 1);
print_input_hidden ('id_agente', $id_agente); html_print_input_hidden ('id_agente', $id_agente);
} else { } else {
print_submit_button (__('Create'), 'crtbutton', false, 'class="sub wand"'); html_print_submit_button (__('Create'), 'crtbutton', false, 'class="sub wand"');
print_input_hidden ('create_agent', 1); html_print_input_hidden ('create_agent', 1);
} }
echo '</div></form>'; echo '</div></form>';

View File

@ -120,8 +120,8 @@ foreach ($nps as $row) {
} }
echo '<div>'.__('Template'); echo '<div>'.__('Template');
print_select ($select, "template_id"); html_print_select ($select, "template_id");
print_submit_button (__('Assign'), 'crt', false, 'class="sub next"'); html_print_submit_button (__('Assign'), 'crt', false, 'class="sub next"');
echo '</div></form>'; echo '</div></form>';
// ========================== // ==========================
@ -164,21 +164,21 @@ foreach ($result as $row) {
$data[0] = $row["nombre"]; $data[0] = $row["nombre"];
if ($row["id_tipo_modulo"] > 0) { if ($row["id_tipo_modulo"] > 0) {
$data[1] = print_image("images/" . show_icon_type ($row["id_tipo_modulo"]), true, array("border" => "0")); $data[1] = html_print_image("images/" . show_icon_type ($row["id_tipo_modulo"]), true, array("border" => "0"));
} else { } else {
$data[1] = ''; $data[1] = '';
} }
$data[2] = mb_substr ($row["descripcion"], 0, 60); $data[2] = mb_substr ($row["descripcion"], 0, 60);
$data[3] = '<a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&tab=template&id_agente='.$id_agente.'&delete_module='.$row["id_agente_modulo"].'">' . print_image("images/cross.png", true, array("border" => "0", "alt" => __('Delete'), "onclick" => "if (!confirm('".__('Are you sure?') . "')) return false;")) . '</a>&nbsp;'; $data[3] = '<a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&tab=template&id_agente='.$id_agente.'&delete_module='.$row["id_agente_modulo"].'">' . html_print_image("images/cross.png", true, array("border" => "0", "alt" => __('Delete'), "onclick" => "if (!confirm('".__('Are you sure?') . "')) return false;")) . '</a>&nbsp;';
$data[3] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&edit_module=1&id_agent_module='.$row["id_agente_modulo"].'">' . print_image("images/config.png", true, array("border" => '0', "alt" => __('Update'))) . '</a>'; $data[3] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&edit_module=1&id_agent_module='.$row["id_agente_modulo"].'">' . html_print_image("images/config.png", true, array("border" => '0', "alt" => __('Update'))) . '</a>';
array_push ($table->data, $data); array_push ($table->data, $data);
} }
if (!empty ($table->data)) { if (!empty ($table->data)) {
print_table ($table); html_print_table ($table);
unset ($table); unset ($table);
} else { } else {
echo '<div class="nf">No modules</div>'; echo '<div class="nf">No modules</div>';

View File

@ -199,7 +199,7 @@ if ($id_agente) {
/* View tab */ /* View tab */
$viewtab['text'] = '<a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$id_agente.'">' $viewtab['text'] = '<a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$id_agente.'">'
. print_image ("images/zoom.png", true, array ("title" =>__('View'))) . html_print_image ("images/zoom.png", true, array ("title" =>__('View')))
. '</a>'; . '</a>';
if($tab == 'view') if($tab == 'view')
@ -209,7 +209,7 @@ if ($id_agente) {
/* Main tab */ /* Main tab */
$maintab['text'] = '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;tab=main&amp;id_agente='.$id_agente.'">' $maintab['text'] = '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;tab=main&amp;id_agente='.$id_agente.'">'
. print_image ("images/cog.png", true, array ("title" =>__('Setup'))) . html_print_image ("images/cog.png", true, array ("title" =>__('Setup')))
. '</a>'; . '</a>';
if($tab == 'main') if($tab == 'main')
@ -219,7 +219,7 @@ if ($id_agente) {
/* Module tab */ /* Module tab */
$moduletab['text'] = '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;tab=module&amp;id_agente='.$id_agente.'">' $moduletab['text'] = '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;tab=module&amp;id_agente='.$id_agente.'">'
. print_image ("images/lightbulb.png", true, array ("title" =>__('Modules'))) . html_print_image ("images/lightbulb.png", true, array ("title" =>__('Modules')))
. '</a>'; . '</a>';
if($tab == 'module') if($tab == 'module')
@ -229,7 +229,7 @@ if ($id_agente) {
/* Alert tab */ /* Alert tab */
$alerttab['text'] = '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;tab=alert&amp;id_agente='.$id_agente.'">' $alerttab['text'] = '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;tab=alert&amp;id_agente='.$id_agente.'">'
. print_image ("images/bell.png", true, array ("title" =>__('Alerts'))) . html_print_image ("images/bell.png", true, array ("title" =>__('Alerts')))
. '</a>'; . '</a>';
if($tab == 'alert') if($tab == 'alert')
@ -239,7 +239,7 @@ if ($id_agente) {
/* Template tab */ /* Template tab */
$templatetab['text'] = '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;tab=template&amp;id_agente='.$id_agente.'">' $templatetab['text'] = '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente&amp;tab=template&amp;id_agente='.$id_agente.'">'
. print_image ("images/network.png", true, array ("title" =>__('Module templates'))) . html_print_image ("images/network.png", true, array ("title" =>__('Module templates')))
. '</a>'; . '</a>';
if($tab == 'template') if($tab == 'template')
@ -263,7 +263,7 @@ if ($id_agente) {
/* Group tab */ /* Group tab */
$grouptab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&ag_group='.$group.'">' $grouptab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&ag_group='.$group.'">'
. print_image ("images/agents_group.png", true, array( "title" => __('Group'))) . html_print_image ("images/agents_group.png", true, array( "title" => __('Group')))
. '</a>'; . '</a>';
$grouptab['active'] = false; $grouptab['active'] = false;
@ -274,7 +274,7 @@ if ($id_agente) {
if ($config['activate_gis']) { if ($config['activate_gis']) {
$gistab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=gis&id_agente='.$id_agente.'">' $gistab['text'] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=gis&id_agente='.$id_agente.'">'
. print_image ("images/world.png", true, array ( "title" => __('GIS data'))) . html_print_image ("images/world.png", true, array ( "title" => __('GIS data')))
. '</a>'; . '</a>';
if ($tab == "gis") if ($tab == "gis")
@ -304,7 +304,7 @@ if ($id_agente) {
$url = 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=extension&id_agente='.$id_agente . '&id_extension=' . $id; $url = 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=extension&id_agente='.$id_agente . '&id_extension=' . $id;
$extension_tab = array('text' => '<a href="' . $url .'">' . print_image ($image, true, array ( "title" => $name)) . '</a>', 'active' => $active); $extension_tab = array('text' => '<a href="' . $url .'">' . html_print_image ($image, true, array ( "title" => $name)) . '</a>', 'active' => $active);
$onheader = $onheader + array($id => $extension_tab); $onheader = $onheader + array($id => $extension_tab);
} }

View File

@ -41,22 +41,22 @@ if ($id_field) {
$table->width = '450px'; $table->width = '450px';
$table->data = array (); $table->data = array ();
$table->data[0][0] = __('Name'); $table->data[0][0] = __('Name');
$table->data[0][1] = print_input_text ('name', $name, '', 35, 100, true); $table->data[0][1] = html_print_input_text ('name', $name, '', 35, 100, true);
$table->data[1][0] = __('Display on front').ui_print_help_tip (__('The fields with display on front enabled will be displayed into the agent details'), true); $table->data[1][0] = __('Display on front').ui_print_help_tip (__('The fields with display on front enabled will be displayed into the agent details'), true);
$table->data[1][1] = print_checkbox ('display_on_front', 1, $display_on_front, true); $table->data[1][1] = html_print_checkbox ('display_on_front', 1, $display_on_front, true);
echo '<form name="field" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/fields_manager">'; echo '<form name="field" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/fields_manager">';
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
if ($id_field) { if ($id_field) {
print_input_hidden ('update_field', 1); html_print_input_hidden ('update_field', 1);
print_input_hidden ('id_field', $id_field); html_print_input_hidden ('id_field', $id_field);
print_submit_button (__('Update'), 'updbutton', false, 'class="sub upd"'); html_print_submit_button (__('Update'), 'updbutton', false, 'class="sub upd"');
} else { } else {
print_input_hidden ('create_field', 1); html_print_input_hidden ('create_field', 1);
print_submit_button (__('Create'), 'crtbutton', false, 'class="sub wand"'); html_print_submit_button (__('Create'), 'crtbutton', false, 'class="sub wand"');
} }
echo '</div>'; echo '</div>';

View File

@ -109,24 +109,24 @@ foreach ($fields as $field) {
$data[0] = '<b>'.$field['name'].'</b>'; $data[0] = '<b>'.$field['name'].'</b>';
if($field['display_on_front']) { if($field['display_on_front']) {
$data[1] = print_image('images/tick.png', true); $data[1] = html_print_image('images/tick.png', true);
} }
else { else {
$data[1] = print_image('images/delete.png', true); $data[1] = html_print_image('images/delete.png', true);
} }
$data[2] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configure_field&id_field='.$field['id_field'].'">' . print_image("images/config.png", true, array("alt" => __('Edit'), "title" => __('Edit'), "border" => '0')) . '</a>'; $data[2] = '<a href="index.php?sec=gagente&sec2=godmode/agentes/configure_field&id_field='.$field['id_field'].'">' . html_print_image("images/config.png", true, array("alt" => __('Edit'), "title" => __('Edit'), "border" => '0')) . '</a>';
$data[2] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/fields_manager&delete_field=1&id_field='.$field['id_field'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">' . print_image("images/cross.png", true, array("alt" => __('Delete'), "title" => __('Delete'), "border" => '0')) . '</a>'; $data[2] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/fields_manager&delete_field=1&id_field='.$field['id_field'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">' . html_print_image("images/cross.png", true, array("alt" => __('Delete'), "title" => __('Delete'), "border" => '0')) . '</a>';
array_push ($table->data, $data); array_push ($table->data, $data);
} }
if($fields) if($fields)
print_table ($table); html_print_table ($table);
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configure_field">'; echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configure_field">';
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
print_submit_button (__('Create field'), 'crt', false, 'class="sub next"'); html_print_submit_button (__('Create field'), 'crt', false, 'class="sub next"');
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -107,7 +107,7 @@ if ((isset($_GET["operacion"])) AND ($update_group == -1) ) {
$group_select = get_user_groups ($config['id_user']); $group_select = get_user_groups ($config['id_user']);
$grouplist = implode (',', array_keys ($group_select)); $grouplist = implode (',', array_keys ($group_select));
echo print_select_groups($config['id_user'], "AR", true, 'id_group', $id_group, '', '', '', true); echo html_print_select_groups($config['id_user'], "AR", true, 'id_group', $id_group, '', '', '', true);
echo '&nbsp;&nbsp;'; echo '&nbsp;&nbsp;';
echo '<input type=submit name="update_group" class="sub upd" value="'.__('Filter').'">'; echo '<input type=submit name="update_group" class="sub upd" value="'.__('Filter').'">';
echo '<br><br>'; echo '<br><br>';

View File

@ -80,7 +80,7 @@ echo "<table cellpadding='4' cellspacing='4' class='databox' width='770'><tr>";
echo "<td valign='top'>".__('Group')."</td>"; echo "<td valign='top'>".__('Group')."</td>";
echo "<td valign='top'>"; echo "<td valign='top'>";
print_select_groups(false, "AR", true, "ag_group", $ag_group, 'this.form.submit();', '', 0); html_print_select_groups(false, "AR", true, "ag_group", $ag_group, 'this.form.submit();', '', 0);
echo "<td valign='top'> echo "<td valign='top'>
<noscript> <noscript>
@ -109,8 +109,8 @@ echo "</form>";
echo "<td>"; echo "<td>";
echo '<form method="post" action="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente">'; echo '<form method="post" action="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente">';
print_input_hidden ('new_agent', 1); html_print_input_hidden ('new_agent', 1);
print_submit_button (__('Create agent'), 'crt', false, 'class="sub next"'); html_print_submit_button (__('Create agent'), 'crt', false, 'class="sub next"');
echo "</form>"; echo "</form>";
echo "</td></tr></table>"; echo "</td></tr></table>";
@ -306,17 +306,17 @@ if ($agents !== false) {
echo "<table cellpadding='4' id='agent_list' cellspacing='4' width='95%' class='databox'>"; echo "<table cellpadding='4' id='agent_list' cellspacing='4' width='95%' class='databox'>";
echo "<th>".__('Agent name') . ' ' . echo "<th>".__('Agent name') . ' ' .
'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&search='.$search .'&offset='.$offset.'&sort_field=name&sort=up">' . print_image("images/sort_up.png", true, array("style" => $selectNameUp)) . '</a>' . '<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&search='.$search .'&offset='.$offset.'&sort_field=name&sort=up">' . html_print_image("images/sort_up.png", true, array("style" => $selectNameUp)) . '</a>' .
'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&search='.$search .'&offset='.$offset.'&sort_field=name&sort=down">' . print_image("images/sort_down.png", true, array("style" => $selectNameDown)) . '</a>'; '<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&search='.$search .'&offset='.$offset.'&sort_field=name&sort=down">' . html_print_image("images/sort_down.png", true, array("style" => $selectNameDown)) . '</a>';
echo "</th>"; echo "</th>";
echo "<th title='".__('Remote agent configuration')."'>".__('R')."</th>"; echo "<th title='".__('Remote agent configuration')."'>".__('R')."</th>";
echo "<th>".__('OS'). ' ' . echo "<th>".__('OS'). ' ' .
'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&search='.$search .'&offset='.$offset.'&sort_field=os&sort=up">' . print_image("images/sort_up.png", true, array("style" => $selectOsUp)) . '</a>' . '<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&search='.$search .'&offset='.$offset.'&sort_field=os&sort=up">' . html_print_image("images/sort_up.png", true, array("style" => $selectOsUp)) . '</a>' .
'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&search='.$search .'&offset='.$offset.'&sort_field=os&sort=down">' . print_image("images/sort_down.png", true, array("style" => $selectOsDown)) . '</a>'; '<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&search='.$search .'&offset='.$offset.'&sort_field=os&sort=down">' . html_print_image("images/sort_down.png", true, array("style" => $selectOsDown)) . '</a>';
echo "</th>"; echo "</th>";
echo "<th>".__('Group'). ' ' . echo "<th>".__('Group'). ' ' .
'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&search='.$search .'&offset='.$offset.'&sort_field=group&sort=up">' . print_image("images/sort_up.png", true, array("style" => $selectGroupUp)) . '</a>' . '<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&search='.$search .'&offset='.$offset.'&sort_field=group&sort=up">' . html_print_image("images/sort_up.png", true, array("style" => $selectGroupUp)) . '</a>' .
'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&search='.$search .'&offset='.$offset.'&sort_field=group&sort=down">' . print_image("images/sort_down.png", true, array("style" => $selectGroupDown)) . '</a>'; '<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&search='.$search .'&offset='.$offset.'&sort_field=group&sort=down">' . html_print_image("images/sort_down.png", true, array("style" => $selectGroupDown)) . '</a>';
echo "</th>"; echo "</th>";
echo "<th>".__('Description')."</th>"; echo "<th>".__('Description')."</th>";
echo "<th>".__('Delete')."</th>"; echo "<th>".__('Delete')."</th>";
@ -382,7 +382,7 @@ if ($agents !== false) {
$agent_md5 = md5 ($agent["nombre"], false); $agent_md5 = md5 ($agent["nombre"], false);
if (file_exists ($config["remote_config"]."/md5/".$agent_md5.".md5")) { if (file_exists ($config["remote_config"]."/md5/".$agent_md5.".md5")) {
echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=main&id_agente=".$agent["id_agente"]."&disk_conf=1'>"; echo "<a href='index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=main&id_agente=".$agent["id_agente"]."&disk_conf=1'>";
echo print_image("images/application_edit.png", true, array("align" => 'middle', "title" => __('Edit remote config'))); echo html_print_image("images/application_edit.png", true, array("align" => 'middle', "title" => __('Edit remote config')));
echo "</a>"; echo "</a>";
} }
echo "</td>"; echo "</td>";
@ -406,7 +406,7 @@ if ($agents !== false) {
echo "<td class='$tdcolor' align='center' valign='middle'><a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente& echo "<td class='$tdcolor' align='center' valign='middle'><a href='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&
borrar_agente=".$agent["id_agente"]."&search=$search&offset=$offsetArg&sort_field=$sortField&sort=$sort'"; borrar_agente=".$agent["id_agente"]."&search=$search&offset=$offsetArg&sort_field=$sortField&sort=$sort'";
echo ' onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'; echo ' onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
echo print_image('images/cross.png', true, array("border" => '0')) . "</a></td>"; echo html_print_image('images/cross.png', true, array("border" => '0')) . "</a></td>";
} }
echo "</table>"; echo "</table>";
ui_pagination ($total_agents, "index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=$ag_group&search=$search&sort_field=$sortField&sort=$sort", $offset); ui_pagination ($total_agents, "index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=$ag_group&search=$search&sort_field=$sortField&sort=$sort", $offset);
@ -420,8 +420,8 @@ else {
// Create agent button // Create agent button
echo '<a name="bottom">'; echo '<a name="bottom">';
echo '<form method="post" action="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente">'; echo '<form method="post" action="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente">';
print_input_hidden ('new_agent', 1); html_print_input_hidden ('new_agent', 1);
print_submit_button (__('Create agent'), 'crt', false, 'class="sub next"'); html_print_submit_button (__('Create agent'), 'crt', false, 'class="sub next"');
echo "</form></td></tr></table>"; echo "</form></td></tr></table>";
?> ?>

View File

@ -64,8 +64,8 @@ if (strstr($sec2, "enterprise/godmode/policies/policies") !== false) {
unset($modules['predictionserver']); unset($modules['predictionserver']);
} }
print_select ($modules, 'moduletype', '', '', '', '', false, false, false); html_print_select ($modules, 'moduletype', '', '', '', '', false, false, false);
print_input_hidden ('edit_module', 1); html_print_input_hidden ('edit_module', 1);
echo '</td>'; echo '</td>';
echo '<td class="datos">'; echo '<td class="datos">';
echo '<input align="right" name="updbutton" type="submit" class="sub next" value="'.__('Create').'">'; echo '<input align="right" name="updbutton" type="submit" class="sub next" value="'.__('Create').'">';
@ -272,19 +272,19 @@ if ($modules === false) {
$table->width = '95%'; $table->width = '95%';
$table->head = array (); $table->head = array ();
$table->head[0] = __('Name') . ' ' . $table->head[0] = __('Name') . ' ' .
'<a href="' . $url . '&sort_field=name&sort=up">' . print_image("images/sort_up.png", true, array("style" => $selectNameUp)) . '</a>' . '<a href="' . $url . '&sort_field=name&sort=up">' . html_print_image("images/sort_up.png", true, array("style" => $selectNameUp)) . '</a>' .
'<a href="' . $url . '&sort_field=name&sort=down">' . print_image("images/sort_down.png", true, array("style" => $selectNameDown)) . '</a>'; '<a href="' . $url . '&sort_field=name&sort=down">' . html_print_image("images/sort_down.png", true, array("style" => $selectNameDown)) . '</a>';
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK)
$table->head[1] = "<span title='" . __('Policy') . "'>" . __('P.') . "</span>"; $table->head[1] = "<span title='" . __('Policy') . "'>" . __('P.') . "</span>";
$table->head[2] = "<span title='" . __('Server') . "'>" . __('S.') . "</span>" . ' ' . $table->head[2] = "<span title='" . __('Server') . "'>" . __('S.') . "</span>" . ' ' .
'<a href="' . $url . '&sort_field=server&sort=up">' . print_image("images/sort_up.png", true, array("style" => $selectServerUp)) . '</a>' . '<a href="' . $url . '&sort_field=server&sort=up">' . html_print_image("images/sort_up.png", true, array("style" => $selectServerUp)) . '</a>' .
'<a href="' . $url . '&sort_field=server&sort=down">' . print_image("images/sort_down.png", true, array("style" => $selectServerDown)) . '</a>'; '<a href="' . $url . '&sort_field=server&sort=down">' . html_print_image("images/sort_down.png", true, array("style" => $selectServerDown)) . '</a>';
$table->head[3] = __('Type') . ' ' . $table->head[3] = __('Type') . ' ' .
'<a href="' . $url . '&sort_field=type&sort=up">' . print_image("images/sort_up.png", true, array("style" => $selectTypeUp)) .'</a>' . '<a href="' . $url . '&sort_field=type&sort=up">' . html_print_image("images/sort_up.png", true, array("style" => $selectTypeUp)) .'</a>' .
'<a href="' . $url . '&sort_field=type&sort=down">' . print_image("images/sort_down.png", true, array("style" => $selectTypeDown)) . '</a>'; '<a href="' . $url . '&sort_field=type&sort=down">' . html_print_image("images/sort_down.png", true, array("style" => $selectTypeDown)) . '</a>';
$table->head[4] = __('Interval') . ' ' . $table->head[4] = __('Interval') . ' ' .
'<a href="' . $url . '&sort_field=interval&sort=up">' . print_image("images/sort_up.png", true, array("style" => $selectIntervalUp)) . '</a>' . '<a href="' . $url . '&sort_field=interval&sort=up">' . html_print_image("images/sort_up.png", true, array("style" => $selectIntervalUp)) . '</a>' .
'<a href="' . $url . '&sort_field=interval&sort=down">' . print_image("images/sort_down.png", true, array("style" => $selectIntervalDown)) . '</a>'; '<a href="' . $url . '&sort_field=interval&sort=down">' . html_print_image("images/sort_down.png", true, array("style" => $selectIntervalDown)) . '</a>';
$table->head[5] = __('Description'); $table->head[5] = __('Description');
$table->head[6] = __('Max/Min'); $table->head[6] = __('Max/Min');
$table->head[7] = __('Action'); $table->head[7] = __('Action');
@ -377,7 +377,7 @@ foreach ($modules as $module) {
} }
$data[1] = '<a href="?sec=gpolicies&sec2=enterprise/godmode/policies/policies&id=' . $policyInfo['id_policy'] . '">' . $data[1] = '<a href="?sec=gpolicies&sec2=enterprise/godmode/policies/policies&id=' . $policyInfo['id_policy'] . '">' .
print_image($img,true, array('title' => $title)) . html_print_image($img,true, array('title' => $title)) .
'</a>'; '</a>';
} }
} }
@ -391,7 +391,7 @@ foreach ($modules as $module) {
// This module is initialized ? (has real data) // This module is initialized ? (has real data)
$module_init = db_get_value ('utimestamp', 'tagente_estado', 'id_agente_modulo', $module['id_agente_modulo']); $module_init = db_get_value ('utimestamp', 'tagente_estado', 'id_agente_modulo', $module['id_agente_modulo']);
if ($module_init == 0) if ($module_init == 0)
$data[2] .= print_image ('images/error.png', true, array ('title' => __('Non initialized module'))); $data[2] .= html_print_image ('images/error.png', true, array ('title' => __('Non initialized module')));
// Module type (by data type) // Module type (by data type)
$data[3] = ''; $data[3] = '';
@ -413,15 +413,15 @@ foreach ($modules as $module) {
$data[6] .= ' / '.($module["min"] != $module['max']? $module["min"] : __('N/A')); $data[6] .= ' / '.($module["min"] != $module['max']? $module["min"] : __('N/A'));
// Delete module // Delete module
$data[7] = print_checkbox('id_delete[]', $module['id_agente_modulo'], false, true); $data[7] = html_print_checkbox('id_delete[]', $module['id_agente_modulo'], false, true);
$data[7] .= '<a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&delete_module='.$module['id_agente_modulo'].'" $data[7] .= '<a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&delete_module='.$module['id_agente_modulo'].'"
onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'; onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
$data[7] .= print_image ('images/cross.png', true, $data[7] .= html_print_image ('images/cross.png', true,
array ('title' => __('Delete'))); array ('title' => __('Delete')));
$data[7] .= '</a> '; $data[7] .= '</a> ';
$data[7] .= '<a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&duplicate_module='.$module['id_agente_modulo'].'" $data[7] .= '<a href="index.php?sec=gagente&tab=module&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&duplicate_module='.$module['id_agente_modulo'].'"
onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'; onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
$data[7] .= print_image ('images/copy.png', true, $data[7] .= html_print_image ('images/copy.png', true,
array ('title' => __('Duplicate'))); array ('title' => __('Duplicate')));
$data[7] .= '</a> '; $data[7] .= '</a> ';
@ -430,7 +430,7 @@ foreach ($modules as $module) {
if (isset($numericModules[$type])) { if (isset($numericModules[$type])) {
if ($numericModules[$type] === true) { if ($numericModules[$type] === true) {
$data[7] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&fix_module='.$module['id_agente_modulo'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'; $data[7] .= '<a href="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module&fix_module='.$module['id_agente_modulo'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
$data[7] .= print_image ('images/chart_curve.png', true, $data[7] .= html_print_image ('images/chart_curve.png', true,
array ('title' => __('Normalize'))); array ('title' => __('Normalize')));
$data[7] .= '</a>'; $data[7] .= '</a>';
} }
@ -441,10 +441,10 @@ foreach ($modules as $module) {
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module" echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente='.$id_agente.'&tab=module"
onsubmit="if (! confirm (\''.__('Are you sure?').'\')) return false">'; onsubmit="if (! confirm (\''.__('Are you sure?').'\')) return false">';
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
print_input_hidden ('multiple_delete', 1); html_print_input_hidden ('multiple_delete', 1);
print_submit_button (__('Delete'), 'multiple_delete', false, 'class="sub delete"'); html_print_submit_button (__('Delete'), 'multiple_delete', false, 'class="sub delete"');
echo '</div>'; echo '</div>';
echo '</form>' echo '</form>'
?> ?>

View File

@ -314,27 +314,27 @@ if($config['enterprise_installed'] && $id_agent_module) {
echo '<h3 id="message" class="error invisible"></h3>'; echo '<h3 id="message" class="error invisible"></h3>';
echo '<form method="post" id="module_form">'; echo '<form method="post" id="module_form">';
print_table ($table_simple); html_print_table ($table_simple);
echo '<b><a href="#" id="show_advanced" onclick="$(\'div#advanced\').show ();$(this).remove (); return false">'; echo '<b><a href="#" id="show_advanced" onclick="$(\'div#advanced\').show ();$(this).remove (); return false">';
echo __('Advanced options').'&nbsp;' .print_image ("images/down.png", true, array ("title" => __('Advanced options'))); echo __('Advanced options').'&nbsp;' .html_print_image ("images/down.png", true, array ("title" => __('Advanced options')));
echo '</a></b>'; echo '</a></b>';
echo '<div id="advanced" style="display: none">'; echo '<div id="advanced" style="display: none">';
print_table ($table_advanced); html_print_table ($table_advanced);
echo '</div>'; echo '</div>';
// Submit // Submit
echo '<div class="action-buttons" style="width: '.$table_simple->width.'">'; echo '<div class="action-buttons" style="width: '.$table_simple->width.'">';
if ($id_agent_module) { if ($id_agent_module) {
print_submit_button (__('Update'), 'updbutton', false, 'class="sub upd"'); html_print_submit_button (__('Update'), 'updbutton', false, 'class="sub upd"');
print_input_hidden ('update_module', 1); html_print_input_hidden ('update_module', 1);
print_input_hidden ('id_agent_module', $id_agent_module); html_print_input_hidden ('id_agent_module', $id_agent_module);
print_input_hidden ('id_module_type', $id_module_type); html_print_input_hidden ('id_module_type', $id_module_type);
} else { } else {
print_submit_button (__('Create'), 'crtbutton', false, 'class="sub wand"'); html_print_submit_button (__('Create'), 'crtbutton', false, 'class="sub wand"');
print_input_hidden ('id_module', $moduletype); html_print_input_hidden ('id_module', $moduletype);
print_input_hidden ('create_module', 1); html_print_input_hidden ('create_module', 1);
} }
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -69,20 +69,20 @@ function add_component_selection ($id_network_component_type) {
$component_groups = get_network_component_groups ($id_network_component_type); $component_groups = get_network_component_groups ($id_network_component_type);
$data[1] = '<span id="component_group" class="left">'; $data[1] = '<span id="component_group" class="left">';
$data[1] .= print_select ($component_groups, $data[1] .= html_print_select ($component_groups,
'network_component_group', '', '', '--'.__('Manual setup').'--', 0, 'network_component_group', '', '', '--'.__('Manual setup').'--', 0,
true, false, false); true, false, false);
$data[1] .= '</span>'; $data[1] .= '</span>';
$data[1] .= print_input_hidden ('id_module_component_type', $id_network_component_type, true); $data[1] .= html_print_input_hidden ('id_module_component_type', $id_network_component_type, true);
$data[1] .= '<span id="no_component" class="invisible error">'; $data[1] .= '<span id="no_component" class="invisible error">';
$data[1] .= __('No component was found'); $data[1] .= __('No component was found');
$data[1] .= '</span>'; $data[1] .= '</span>';
$data[1] .= '<span id="component" class="invisible right">'; $data[1] .= '<span id="component" class="invisible right">';
$data[1] .= print_select (array (), 'network_component', '', '', $data[1] .= html_print_select (array (), 'network_component', '', '',
'---'.__('Manual setup').'---', 0, true); '---'.__('Manual setup').'---', 0, true);
$data[1] .= '</span>'; $data[1] .= '</span>';
$data[1] .= ' <span id="component_loading" class="invisible">'; $data[1] .= ' <span id="component_loading" class="invisible">';
$data[1] .= print_image('images/spinner.png', true); $data[1] .= html_print_image('images/spinner.png', true);
$data[1] .= '</span>'; $data[1] .= '</span>';
$table_simple->colspan['module_component'][1] = 3; $table_simple->colspan['module_component'][1] = 3;
@ -110,7 +110,7 @@ if (strstr($page, "policy_modules") === false && $id_agent_module) {
$update_module_id = (int) get_parameter_get ('update_module'); $update_module_id = (int) get_parameter_get ('update_module');
print_input_hidden ('moduletype', $moduletype); html_print_input_hidden ('moduletype', $moduletype);
$table_simple->id = 'simple'; $table_simple->id = 'simple';
$table_simple->width = '90%'; $table_simple->width = '90%';
@ -122,9 +122,9 @@ $table_simple->style[0] = 'font-weight: bold; vertical-align: top';
$table_simple->style[2] = 'font-weight: bold; vertical-align: top'; $table_simple->style[2] = 'font-weight: bold; vertical-align: top';
$table_simple->data[0][0] = __('Name'); $table_simple->data[0][0] = __('Name');
$table_simple->data[0][1] = print_input_text ('name', $name, '', 20, 100, true, $disabledBecauseInPolicy); $table_simple->data[0][1] = html_print_input_text ('name', $name, '', 20, 100, true, $disabledBecauseInPolicy);
$table_simple->data[0][2] = __('Disabled'); $table_simple->data[0][2] = __('Disabled');
$table_simple->data[0][3] = print_checkbox ("disabled", 1, $disabled, true); $table_simple->data[0][3] = html_print_checkbox ("disabled", 1, $disabled, true);
$table_simple->data[1][0] = __('Type').' ' . ui_print_help_icon ('module_type', true); $table_simple->data[1][0] = __('Type').' ' . ui_print_help_icon ('module_type', true);
@ -158,36 +158,36 @@ else {
WHERE categoria IN (%s) WHERE categoria IN (%s)
ORDER BY descripcion', ORDER BY descripcion',
implode (',', $categories)); implode (',', $categories));
$table_simple->data[1][1] = print_select_from_sql ($sql, 'id_module_type', $table_simple->data[1][1] = html_print_select_from_sql ($sql, 'id_module_type',
$idModuleType, '', '', '', true, false, false, $disabledBecauseInPolicy); $idModuleType, '', '', '', true, false, false, $disabledBecauseInPolicy);
} }
$table_simple->data[1][2] = __('Module group'); $table_simple->data[1][2] = __('Module group');
$table_simple->data[1][3] = print_select_from_sql ('SELECT id_mg, name FROM tmodule_group ORDER BY name', $table_simple->data[1][3] = html_print_select_from_sql ('SELECT id_mg, name FROM tmodule_group ORDER BY name',
'id_module_group', $id_module_group, '', __('Not assigned'), '0', 'id_module_group', $id_module_group, '', __('Not assigned'), '0',
true, false, true, $disabledBecauseInPolicy); true, false, true, $disabledBecauseInPolicy);
$table_simple->data[2][0] = __('Warning status').' ' . ui_print_help_icon ('warning_status', true); $table_simple->data[2][0] = __('Warning status').' ' . ui_print_help_icon ('warning_status', true);
$table_simple->data[2][1] = '<em>'.__('Min.').'</em>'; $table_simple->data[2][1] = '<em>'.__('Min.').'</em>';
$table_simple->data[2][1] .= print_input_text ('min_warning', $min_warning, $table_simple->data[2][1] .= html_print_input_text ('min_warning', $min_warning,
'', 5, 255, true, $disabledBecauseInPolicy); '', 5, 255, true, $disabledBecauseInPolicy);
$table_simple->data[2][1] .= '<br /><em>'.__('Max.').'</em>'; $table_simple->data[2][1] .= '<br /><em>'.__('Max.').'</em>';
$table_simple->data[2][1] .= print_input_text ('max_warning', $max_warning, $table_simple->data[2][1] .= html_print_input_text ('max_warning', $max_warning,
'', 5, 255, true, $disabledBecauseInPolicy); '', 5, 255, true, $disabledBecauseInPolicy);
$table_simple->data[2][2] = __('Critical status').' ' . ui_print_help_icon ('critical_status', true); $table_simple->data[2][2] = __('Critical status').' ' . ui_print_help_icon ('critical_status', true);
$table_simple->data[2][3] = '<em>'.__('Min.').'</em>'; $table_simple->data[2][3] = '<em>'.__('Min.').'</em>';
$table_simple->data[2][3] .= print_input_text ('min_critical', $min_critical, $table_simple->data[2][3] .= html_print_input_text ('min_critical', $min_critical,
'', 5, 255, true, $disabledBecauseInPolicy); '', 5, 255, true, $disabledBecauseInPolicy);
$table_simple->data[2][3] .= '<br /><em>'.__('Max.').'</em>'; $table_simple->data[2][3] .= '<br /><em>'.__('Max.').'</em>';
$table_simple->data[2][3] .= print_input_text ('max_critical', $max_critical, $table_simple->data[2][3] .= html_print_input_text ('max_critical', $max_critical,
'', 5, 255, true, $disabledBecauseInPolicy); '', 5, 255, true, $disabledBecauseInPolicy);
/* FF stands for Flip-flop */ /* FF stands for Flip-flop */
$table_simple->data[3][0] = __('FF threshold').' ' . ui_print_help_icon ('ff_threshold', true); $table_simple->data[3][0] = __('FF threshold').' ' . ui_print_help_icon ('ff_threshold', true);
$table_simple->data[3][1] = print_input_text ('ff_event', $ff_event, $table_simple->data[3][1] = html_print_input_text ('ff_event', $ff_event,
'', 5, 15, true, $disabledBecauseInPolicy); '', 5, 15, true, $disabledBecauseInPolicy);
$table_simple->data[3][2] = __('Historical data'); $table_simple->data[3][2] = __('Historical data');
$table_simple->data[3][3] = print_checkbox ("history_data", 1, $history_data, true, $disabledBecauseInPolicy); $table_simple->data[3][3] = html_print_checkbox ("history_data", 1, $history_data, true, $disabledBecauseInPolicy);
/* Advanced form part */ /* Advanced form part */
$table_advanced->id = 'advanced'; $table_advanced->id = 'advanced';
@ -201,28 +201,28 @@ $table_advanced->colspan = array ();
$table_advanced->data[0][0] = __('Description'); $table_advanced->data[0][0] = __('Description');
$table_advanced->colspan[0][1] = 3; $table_advanced->colspan[0][1] = 3;
$table_advanced->data[0][1] = print_textarea ('description', 2, 65, $table_advanced->data[0][1] = html_print_textarea ('description', 2, 65,
$description, $disabledTextBecauseInPolicy, true); $description, $disabledTextBecauseInPolicy, true);
$table_advanced->data[1][0] = __('Custom ID'); $table_advanced->data[1][0] = __('Custom ID');
$table_advanced->data[1][1] = print_input_text ('custom_id', $custom_id, $table_advanced->data[1][1] = html_print_input_text ('custom_id', $custom_id,
'', 20, 65, true); '', 20, 65, true);
$table_advanced->data[2][0] = __('Interval'); $table_advanced->data[2][0] = __('Interval');
$table_advanced->data[2][1] = print_input_text ('module_interval', $interval, $table_advanced->data[2][1] = html_print_input_text ('module_interval', $interval,
'', 5, 10, true, $disabledBecauseInPolicy).ui_print_help_tip (__('Module execution time interval (in secs).'), true); '', 5, 10, true, $disabledBecauseInPolicy).ui_print_help_tip (__('Module execution time interval (in secs).'), true);
$table_advanced->data[2][2] = __('Post process').' ' . ui_print_help_icon ('postprocess', true); $table_advanced->data[2][2] = __('Post process').' ' . ui_print_help_icon ('postprocess', true);
$table_advanced->data[2][3] = print_input_text ('post_process', $table_advanced->data[2][3] = html_print_input_text ('post_process',
$post_process, '', 12, 25, true, $disabledBecauseInPolicy); $post_process, '', 12, 25, true, $disabledBecauseInPolicy);
$table_advanced->data[3][0] = __('Min. Value'); $table_advanced->data[3][0] = __('Min. Value');
$table_advanced->data[3][1] = print_input_text ('min', $min, '', 5, 15, true, $disabledBecauseInPolicy); $table_advanced->data[3][1] = html_print_input_text ('min', $min, '', 5, 15, true, $disabledBecauseInPolicy);
$table_advanced->data[3][2] = __('Max. Value'); $table_advanced->data[3][2] = __('Max. Value');
$table_advanced->data[3][3] = print_input_text ('max', $max, '', 5, 15, true, $disabledBecauseInPolicy); $table_advanced->data[3][3] = html_print_input_text ('max', $max, '', 5, 15, true, $disabledBecauseInPolicy);
$table_advanced->data[4][0] = __('Export target'); $table_advanced->data[4][0] = __('Export target');
$table_advanced->data[4][1] = print_select_from_sql ('SELECT id, name FROM tserver_export ORDER BY name', $table_advanced->data[4][1] = html_print_select_from_sql ('SELECT id, name FROM tserver_export ORDER BY name',
'id_export', $id_export, '',__('None'),'0', true, false, false, $disabledBecauseInPolicy).ui_print_help_tip (__('In case you use an Export server you can link this module and export data to one these.'), true); 'id_export', $id_export, '',__('None'),'0', true, false, false, $disabledBecauseInPolicy).ui_print_help_tip (__('In case you use an Export server you can link this module and export data to one these.'), true);
$table_advanced->colspan[4][1] = 3; $table_advanced->colspan[4][1] = 3;
?> ?>

View File

@ -40,9 +40,9 @@ $extra_title = __('Network server module');
$data = array (); $data = array ();
$data[0] = __('Target IP'); $data[0] = __('Target IP');
$data[1] = print_input_text ('ip_target', $ip_target, '', 15, 60, true); $data[1] = html_print_input_text ('ip_target', $ip_target, '', 15, 60, true);
$data[2] = __('Port'); $data[2] = __('Port');
$data[3] = print_input_text ('tcp_port', $tcp_port, '', 5, 20, true, $disabledBecauseInPolicy); $data[3] = html_print_input_text ('tcp_port', $tcp_port, '', 5, 20, true, $disabledBecauseInPolicy);
push_table_simple ($data, 'target_ip'); push_table_simple ($data, 'target_ip');
@ -58,19 +58,19 @@ if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK && isset($id_agent_module)) {
$adopt = isModuleAdopt($id_agent_module); $adopt = isModuleAdopt($id_agent_module);
} }
if (!$adopt) { if (!$adopt) {
$data[1] = print_input_text ('snmp_community', $snmp_community, '', 15, 60, true, $disabledBecauseInPolicy); $data[1] = html_print_input_text ('snmp_community', $snmp_community, '', 15, 60, true, $disabledBecauseInPolicy);
} }
else { else {
$data[1] = print_input_text ('snmp_community', $snmp_community, '', 15, 60, true, false); $data[1] = html_print_input_text ('snmp_community', $snmp_community, '', 15, 60, true, false);
} }
$data[2] = _('SNMP version'); $data[2] = _('SNMP version');
if ($id_module_type >= 15 && $id_module_type <= 18) { if ($id_module_type >= 15 && $id_module_type <= 18) {
$data[3] = print_select ($snmp_versions, 'snmp_version', $snmp_version, $data[3] = html_print_select ($snmp_versions, 'snmp_version', $snmp_version,
'', '', '', true, false, false, '', $disabledBecauseInPolicy); '', '', '', true, false, false, '', $disabledBecauseInPolicy);
} else { } else {
$data[3] = print_select ($snmp_versions, 'snmp_version', 0, '', '', $data[3] = html_print_select ($snmp_versions, 'snmp_version', 0, '', '',
'', true, false, false, '', $disabledBecauseInPolicy); '', true, false, false, '', $disabledBecauseInPolicy);
} }
@ -79,14 +79,14 @@ push_table_simple ($data, 'snmp_1');
$data = array (); $data = array ();
$data[0] = __('SNMP OID'); $data[0] = __('SNMP OID');
$data[1] = '<span class="left"; style="width: 50%">'; $data[1] = '<span class="left"; style="width: 50%">';
$data[1] .= print_input_text ('snmp_oid', $snmp_oid, '', 30, 255, true, $disabledBecauseInPolicy); $data[1] .= html_print_input_text ('snmp_oid', $snmp_oid, '', 30, 255, true, $disabledBecauseInPolicy);
$data[1] .= '<span class="invisible" id="oid">'; $data[1] .= '<span class="invisible" id="oid">';
$data[1] .= print_select (array (), 'select_snmp_oid', $snmp_oid, '', '', 0, true, false, false, '', $disabledBecauseInPolicy); $data[1] .= html_print_select (array (), 'select_snmp_oid', $snmp_oid, '', '', 0, true, false, false, '', $disabledBecauseInPolicy);
$data[1] .= print_image("images/edit.png", true, array("class" => "invisible clickable", "id" => "edit_oid")); $data[1] .= html_print_image("images/edit.png", true, array("class" => "invisible clickable", "id" => "edit_oid"));
$data[1] .= '</span>'; $data[1] .= '</span>';
$data[1] .= '<span id="no_snmp" class="error invisible">'.__('Unable to do SNMP walk').'</span>'; $data[1] .= '<span id="no_snmp" class="error invisible">'.__('Unable to do SNMP walk').'</span>';
$data[1] .= '</span> <span class="right" style="width: 50%; text-align: right"><span id="oid_loading" class="invisible">'; $data[1] .= '</span> <span class="right" style="width: 50%; text-align: right"><span id="oid_loading" class="invisible">';
$data[1] .= print_image('images/spinner.gif', true); $data[1] .= html_print_image('images/spinner.gif', true);
$data[1] .= '</span>'; $data[1] .= '</span>';
if ($disabledBecauseInPolicy) if ($disabledBecauseInPolicy)
$disableButton = true; $disableButton = true;
@ -96,7 +96,7 @@ else
else else
$disableButton = false; $disableButton = false;
$data[1] .= print_button (__('SNMP walk'), 'snmp_walk', $disableButton, '', $data[1] .= html_print_button (__('SNMP walk'), 'snmp_walk', $disableButton, '',
'class="sub next"', true); 'class="sub next"', true);
$data[1] .= ui_print_help_icon ('snmpwalk', true); $data[1] .= ui_print_help_icon ('snmpwalk', true);
$data[1] .= '</span>'; $data[1] .= '</span>';
@ -107,13 +107,13 @@ push_table_simple ($data, 'snmp_2');
/* Advanced stuff */ /* Advanced stuff */
$data = array (); $data = array ();
$data[0] = __('TCP send') . ' ' . ui_print_help_icon ("tcp_send", true); $data[0] = __('TCP send') . ' ' . ui_print_help_icon ("tcp_send", true);
$data[1] = print_textarea ('tcp_send', 2, 65, $tcp_send, $disabledTextBecauseInPolicy, true); $data[1] = html_print_textarea ('tcp_send', 2, 65, $tcp_send, $disabledTextBecauseInPolicy, true);
$table_advanced->colspan['tcp_send'][1] = 3; $table_advanced->colspan['tcp_send'][1] = 3;
push_table_advanced ($data, 'tcp_send'); push_table_advanced ($data, 'tcp_send');
$data[0] = __('TCP receive'); $data[0] = __('TCP receive');
$data[1] = print_textarea ('tcp_rcv', 2, 65, $tcp_rcv, $disabledTextBecauseInPolicy, true); $data[1] = html_print_textarea ('tcp_rcv', 2, 65, $tcp_rcv, $disabledTextBecauseInPolicy, true);
$table_advanced->colspan['tcp_receive'][1] = 3; $table_advanced->colspan['tcp_receive'][1] = 3;
push_table_advanced ($data, 'tcp_receive'); push_table_advanced ($data, 'tcp_receive');
@ -148,26 +148,26 @@ if (!isset($id_agent_module)) {
$data = array(); $data = array();
$data[0] = __('Auth user'); $data[0] = __('Auth user');
$data[1] = print_input_text ('snmp3_auth_user', $snmp3_auth_user, '', 15, 60, true); $data[1] = html_print_input_text ('snmp3_auth_user', $snmp3_auth_user, '', 15, 60, true);
$data[2] = __('Auth password'); $data[2] = __('Auth password');
$data[3] = print_input_text ('snmp3_auth_pass', $snmp3_auth_pass, '', 15, 60, true); $data[3] = html_print_input_text ('snmp3_auth_pass', $snmp3_auth_pass, '', 15, 60, true);
$data[3] .= print_input_hidden('active_snmp_v3', 0, true); $data[3] .= html_print_input_hidden('active_snmp_v3', 0, true);
if ($snmp_version != 3) $table_simple->rowstyle['field_snmpv3_row1'] = 'display: none;'; if ($snmp_version != 3) $table_simple->rowstyle['field_snmpv3_row1'] = 'display: none;';
push_table_simple($data, 'field_snmpv3_row1'); push_table_simple($data, 'field_snmpv3_row1');
$data = array(); $data = array();
$data[0] = __('Privacy method'); $data[0] = __('Privacy method');
$data[1] = print_select(array('DES' => __('DES'), 'AES' => __('AES')), 'snmp3_privacy_method', $snmp3_privacy_method, '', '', '', true); $data[1] = html_print_select(array('DES' => __('DES'), 'AES' => __('AES')), 'snmp3_privacy_method', $snmp3_privacy_method, '', '', '', true);
$data[2] = __('privacy pass'); $data[2] = __('privacy pass');
$data[3] = print_input_text ('snmp3_privacy_pass', $snmp3_privacy_pass, '', 15, 60, true); $data[3] = html_print_input_text ('snmp3_privacy_pass', $snmp3_privacy_pass, '', 15, 60, true);
if ($snmp_version != 3) $table_simple->rowstyle['field_snmpv3_row2'] = 'display: none;'; if ($snmp_version != 3) $table_simple->rowstyle['field_snmpv3_row2'] = 'display: none;';
push_table_simple($data, 'field_snmpv3_row2'); push_table_simple($data, 'field_snmpv3_row2');
$data = array(); $data = array();
$data[0] = __('Auth method'); $data[0] = __('Auth method');
$data[1] = print_select(array('MD5' => __('MD5'), 'SHA' => __('SHA')), 'snmp3_auth_method', $snmp3_auth_method, '', '', '', true); $data[1] = html_print_select(array('MD5' => __('MD5'), 'SHA' => __('SHA')), 'snmp3_auth_method', $snmp3_auth_method, '', '', '', true);
$data[2] = __('Security level'); $data[2] = __('Security level');
$data[3] = print_select(array('noAuthNoPriv' => __('Not auth and not privacy method'), $data[3] = html_print_select(array('noAuthNoPriv' => __('Not auth and not privacy method'),
'authNoPriv' => __('Auth and not privacy method'), 'authPriv' => __('Auth and privacy method')), 'snmp3_security_level', $snmp3_security_level, '', '', '', true); 'authNoPriv' => __('Auth and not privacy method'), 'authPriv' => __('Auth and privacy method')), 'snmp3_security_level', $snmp3_security_level, '', '', '', true);
if ($snmp_version != 3) $table_simple->rowstyle['field_snmpv3_row3'] = 'display: none;'; if ($snmp_version != 3) $table_simple->rowstyle['field_snmpv3_row3'] = 'display: none;';
push_table_simple($data, 'field_snmpv3_row3'); push_table_simple($data, 'field_snmpv3_row3');

View File

@ -40,7 +40,7 @@ $extra_title = __('Plugin server module');
$data = array (); $data = array ();
$data[0] = __('Plugin'); $data[0] = __('Plugin');
$data[1] = print_select_from_sql ('SELECT id, name FROM tplugin ORDER BY name', $data[1] = html_print_select_from_sql ('SELECT id, name FROM tplugin ORDER BY name',
'id_plugin', $id_plugin, 'changePluginSelect();', __('None'), 0, true, false, false, $disabledBecauseInPolicy); 'id_plugin', $id_plugin, 'changePluginSelect();', __('None'), 0, true, false, false, $disabledBecauseInPolicy);
$table_simple->colspan['plugin_1'][2] = 2; $table_simple->colspan['plugin_1'][2] = 2;
$data[2] = '<span style="font-weight: normal;" id="plugin_description"></span>'; $data[2] = '<span style="font-weight: normal;" id="plugin_description"></span>';
@ -49,24 +49,24 @@ push_table_simple ($data, 'plugin_1');
$data = array (); $data = array ();
$data[0] = __('Target IP'); $data[0] = __('Target IP');
$data[1] = print_input_text ('ip_target', $ip_target, '', 15, 60, true); $data[1] = html_print_input_text ('ip_target', $ip_target, '', 15, 60, true);
$data[2] = __('Port'); $data[2] = __('Port');
$data[3] = print_input_text ('tcp_port', $tcp_port, '', 5, 20, true); $data[3] = html_print_input_text ('tcp_port', $tcp_port, '', 5, 20, true);
push_table_simple ($data, 'target_ip'); push_table_simple ($data, 'target_ip');
$data = array (); $data = array ();
$data[0] = __('Username'); $data[0] = __('Username');
$data[1] = print_input_text ('plugin_user', $plugin_user, '', 15, 60, true); $data[1] = html_print_input_text ('plugin_user', $plugin_user, '', 15, 60, true);
$data[2] = __('Password'); $data[2] = __('Password');
$data[3] = print_input_password ('plugin_pass', $plugin_pass, '', 15, 60, true); $data[3] = html_print_input_password ('plugin_pass', $plugin_pass, '', 15, 60, true);
push_table_simple ($data, 'plugin_2'); push_table_simple ($data, 'plugin_2');
$data = array (); $data = array ();
$data[0] = __('Plugin parameters'); $data[0] = __('Plugin parameters');
$data[0] .= ui_print_help_icon ('plugin_parameters', true); $data[0] .= ui_print_help_icon ('plugin_parameters', true);
$data[1] = print_input_text ('plugin_parameter', $plugin_parameter, '', 255, '', true, $disabledBecauseInPolicy); $data[1] = html_print_input_text ('plugin_parameter', $plugin_parameter, '', 255, '', true, $disabledBecauseInPolicy);
$table_simple->colspan['plugin_3'][1] = 3; $table_simple->colspan['plugin_3'][1] = 3;
push_table_simple ($data, 'plugin_3'); push_table_simple ($data, 'plugin_3');

View File

@ -57,23 +57,23 @@ if ($module_service_selector !== ENTERPRISE_NOT_HOOK) {
$data[1] = $module_service_selector; $data[1] = $module_service_selector;
} }
$data[1] .= '<div id="module_data" style="top:1em; float:left; width:50%;">'; $data[1] .= '<div id="module_data" style="top:1em; float:left; width:50%;">';
$data[1] .= print_label(__("Agent"),'agent_name', true)."<br/>"; $data[1] .= html_print_label(__("Agent"),'agent_name', true)."<br/>";
$sql = "SELECT id_agente, nombre FROM tagente"; $sql = "SELECT id_agente, nombre FROM tagente";
// TODO: ACL Filter // TODO: ACL Filter
$data[1] .= print_input_text_extended ('agent_name',$agent_name, 'text_agent_name', '', 30, 100, $is_service, '', $data[1] .= html_print_input_text_extended ('agent_name',$agent_name, 'text_agent_name', '', 30, 100, $is_service, '',
array('style' => 'background: url(images/lightning.png) no-repeat right;'), true, false); array('style' => 'background: url(images/lightning.png) no-repeat right;'), true, false);
$data[1] .= '<a href="#" class="tip">&nbsp;<span>' . __("Type at least two characters to search") . '</span></a>&nbsp; <br/>'; $data[1] .= '<a href="#" class="tip">&nbsp;<span>' . __("Type at least two characters to search") . '</span></a>&nbsp; <br/>';
$data[1] .= print_label(__("Module"),'prediction_module',true); $data[1] .= html_print_label(__("Module"),'prediction_module',true);
if($id_agente) { if($id_agente) {
$sql = "SELECT id_agente_modulo, nombre $sql = "SELECT id_agente_modulo, nombre
FROM tagente_modulo FROM tagente_modulo
WHERE history_data = 1 AND id_agente = ".$id_agente; WHERE history_data = 1 AND id_agente = ".$id_agente;
$data[1] .= print_select_from_sql($sql, 'prediction_module', $prediction_module, false, __('Select Module'), 0, true, false, true, $is_service); $data[1] .= html_print_select_from_sql($sql, 'prediction_module', $prediction_module, false, __('Select Module'), 0, true, false, true, $is_service);
} }
else { else {
$data[1] .= '<select id="prediction_module" name="prediction_module" disabled="disabled"><option value="0">Select an Agent first</option></select>'; $data[1] .= '<select id="prediction_module" name="prediction_module" disabled="disabled"><option value="0">Select an Agent first</option></select>';
} }
$data[1] .= print_input_hidden ('id_agente', $id_agente, true); $data[1] .= html_print_input_hidden ('id_agente', $id_agente, true);
$data[1] .= '</div>'; $data[1] .= '</div>';
// Services are an Enterprise feature. // Services are an Enterprise feature.

View File

@ -39,25 +39,25 @@ if (empty ($update_module_id)) {
$data = array (); $data = array ();
$data[0] = __('Target IP'); $data[0] = __('Target IP');
$data[1] = print_input_text ('ip_target', $ip_target, '', 15, 60, true); $data[1] = html_print_input_text ('ip_target', $ip_target, '', 15, 60, true);
$data[2] = __('Namespace'); $data[2] = __('Namespace');
$data[2] .= ui_print_help_icon ('wminamespace', true); $data[2] .= ui_print_help_icon ('wminamespace', true);
$data[3] = print_input_text ('tcp_send', $tcp_send, '', 5, 20, true, $disabledBecauseInPolicy); $data[3] = html_print_input_text ('tcp_send', $tcp_send, '', 5, 20, true, $disabledBecauseInPolicy);
push_table_simple ($data, 'target_ip'); push_table_simple ($data, 'target_ip');
$data = array (); $data = array ();
$data[0] = __('Username'); $data[0] = __('Username');
$data[1] = print_input_text ('plugin_user', $plugin_user, '', 15, 60, true); $data[1] = html_print_input_text ('plugin_user', $plugin_user, '', 15, 60, true);
$data[2] = __('Password'); $data[2] = __('Password');
$data[3] = print_input_password ('plugin_pass', $plugin_pass, '', 15, 60, true); $data[3] = html_print_input_password ('plugin_pass', $plugin_pass, '', 15, 60, true);
push_table_simple ($data, 'user_pass'); push_table_simple ($data, 'user_pass');
$data = array (); $data = array ();
$data[0] = __('WMI query'); $data[0] = __('WMI query');
$data[0] .= ui_print_help_icon ('wmiquery', true); $data[0] .= ui_print_help_icon ('wmiquery', true);
$data[1] = print_input_text ('snmp_oid', $snmp_oid, '', 35, 255, true, $disabledBecauseInPolicy); $data[1] = html_print_input_text ('snmp_oid', $snmp_oid, '', 35, 255, true, $disabledBecauseInPolicy);
$table_simple->colspan['wmi_query'][1] = 3; $table_simple->colspan['wmi_query'][1] = 3;
push_table_simple ($data, 'wmi_query'); push_table_simple ($data, 'wmi_query');
@ -65,10 +65,10 @@ push_table_simple ($data, 'wmi_query');
$data = array (); $data = array ();
$data[0] = __('Key string'); $data[0] = __('Key string');
$data[0] .= ui_print_help_icon ('wmikey', true); $data[0] .= ui_print_help_icon ('wmikey', true);
$data[1] = print_input_text ('snmp_community', $snmp_community, '', 20, 60, true, $disabledBecauseInPolicy); $data[1] = html_print_input_text ('snmp_community', $snmp_community, '', 20, 60, true, $disabledBecauseInPolicy);
$data[2] = __('Field number'); $data[2] = __('Field number');
$data[2] .= ui_print_help_icon ('wmifield', true); $data[2] .= ui_print_help_icon ('wmifield', true);
$data[3] = print_input_text ('tcp_port', $tcp_port, '', 5, 15, true, $disabledBecauseInPolicy); $data[3] = html_print_input_text ('tcp_port', $tcp_port, '', 5, 15, true, $disabledBecauseInPolicy);
push_table_simple ($data, 'key_field'); push_table_simple ($data, 'key_field');
?> ?>

View File

@ -169,19 +169,19 @@ if ($create_downtime || $update_downtime) {
$table->width = '90%'; $table->width = '90%';
$table->data = array (); $table->data = array ();
$table->data[0][0] = __('Name'); $table->data[0][0] = __('Name');
$table->data[0][1] = print_input_text ('name', $name, '', 25, 40, true); $table->data[0][1] = html_print_input_text ('name', $name, '', 25, 40, true);
$table->data[2][0] = __('Description'); $table->data[2][0] = __('Description');
$table->data[2][1] = print_textarea ('description', 3, 35, $description, '', true); $table->data[2][1] = html_print_textarea ('description', 3, 35, $description, '', true);
$table->data[3][0] = __('Timestamp from'); $table->data[3][0] = __('Timestamp from');
$table->data[3][1] = print_input_text ('date_from', $date_from, '', 10, 10, true); $table->data[3][1] = html_print_input_text ('date_from', $date_from, '', 10, 10, true);
$table->data[3][1] .= print_input_text ('time_from', $time_from, '', 7, 7, true); $table->data[3][1] .= html_print_input_text ('time_from', $time_from, '', 7, 7, true);
$table->data[4][0] = __('Timestamp to'); $table->data[4][0] = __('Timestamp to');
$table->data[4][1] = print_input_text ('date_to', $date_to, '', 10, 10, true); $table->data[4][1] = html_print_input_text ('date_to', $date_to, '', 10, 10, true);
$table->data[4][1] .= print_input_text ('time_to', $time_to, '', 7, 7, true); $table->data[4][1] .= html_print_input_text ('time_to', $time_to, '', 7, 7, true);
$table->data[5][0] = __('Group'); $table->data[5][0] = __('Group');
$table->data[5][1] = print_select_groups(false, "AR", true, 'id_group', $id_group, '', '', 0, true); $table->data[5][1] = html_print_select_groups(false, "AR", true, 'id_group', $id_group, '', '', 0, true);
echo '<form method="POST" action="index.php?sec=gagente&amp;sec2=godmode/agentes/planned_downtime">'; echo '<form method="POST" action="index.php?sec=gagente&amp;sec2=godmode/agentes/planned_downtime">';
if ($id_downtime > 0){ if ($id_downtime > 0){
@ -191,18 +191,18 @@ if ($create_downtime || $update_downtime) {
//Editor form //Editor form
echo '<h3>'.__('Planned Downtime Form').' '.ui_print_help_icon ('planned_downtime', true).'</h3>'; echo '<h3>'.__('Planned Downtime Form').' '.ui_print_help_icon ('planned_downtime', true).'</h3>';
print_table ($table); html_print_table ($table);
print_input_hidden ('id_agent', $id_agent); html_print_input_hidden ('id_agent', $id_agent);
echo '<div class="action-buttons" style="width: 90%">'; echo '<div class="action-buttons" style="width: 90%">';
if ($id_downtime) { if ($id_downtime) {
print_input_hidden ('update_downtime', 1); html_print_input_hidden ('update_downtime', 1);
print_input_hidden ('id_downtime', $id_downtime); html_print_input_hidden ('id_downtime', $id_downtime);
print_submit_button (__('Update'), 'updbutton', false, 'class="sub upd"'); html_print_submit_button (__('Update'), 'updbutton', false, 'class="sub upd"');
} }
else { else {
print_input_hidden ('create_downtime', 1); html_print_input_hidden ('create_downtime', 1);
print_submit_button (__('Add'), 'crtbutton', false, 'class="sub wand"'); html_print_submit_button (__('Add'), 'crtbutton', false, 'class="sub wand"');
} }
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';
@ -238,16 +238,16 @@ if ($create_downtime || $update_downtime) {
echo "<form method=post action='index.php?sec=gagente&sec2=godmode/agentes/planned_downtime&first_update=1&id_downtime=$id_downtime'>"; echo "<form method=post action='index.php?sec=gagente&sec2=godmode/agentes/planned_downtime&first_update=1&id_downtime=$id_downtime'>";
print_select_groups(false, "AR", true, 'filter_group', $filter_group); html_print_select_groups(false, "AR", true, 'filter_group', $filter_group);
echo "<br /><br />"; echo "<br /><br />";
print_submit_button (__('Filter by group'), '', false, 'class="sub next"',false); html_print_submit_button (__('Filter by group'), '', false, 'class="sub next"',false);
echo "</form>"; echo "</form>";
echo "<form method=post action='index.php?sec=gagente&sec2=godmode/agentes/planned_downtime&first_update=1&insert_downtime_agent=1&id_downtime=$id_downtime'>"; echo "<form method=post action='index.php?sec=gagente&sec2=godmode/agentes/planned_downtime&first_update=1&insert_downtime_agent=1&id_downtime=$id_downtime'>";
echo print_select ($data, "id_agent[]", '', '', '', 0, false, true); echo html_print_select ($data, "id_agent[]", '', '', '', 0, false, true);
echo "<br /><br /><br />"; echo "<br /><br /><br />";
print_submit_button (__('Add'), '', false, 'class="sub next"',false); html_print_submit_button (__('Add'), '', false, 'class="sub next"',false);
echo "</form>"; echo "</form>";
echo "</table>"; echo "</table>";
@ -291,11 +291,11 @@ if ($create_downtime || $update_downtime) {
$data[4] = '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/planned_downtime&amp;id_agent='. $data[4] = '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/planned_downtime&amp;id_agent='.
$id_agent.'&amp;delete_downtime_agent=1&amp;first_update=1&amp;id_downtime_agent='.$downtime["id"].'&amp;id_downtime='.$id_downtime.'">' . $id_agent.'&amp;delete_downtime_agent=1&amp;first_update=1&amp;id_downtime_agent='.$downtime["id"].'&amp;id_downtime='.$id_downtime.'">' .
print_image("images/cross.png", true, array("border" => '0', "alt" => __('Delete'))); html_print_image("images/cross.png", true, array("border" => '0', "alt" => __('Delete')));
array_push ($table->data, $data); array_push ($table->data, $data);
} }
print_table ($table); html_print_table ($table);
} }
} }
} }
@ -339,9 +339,9 @@ else {
if ($downtime["executed"] == 0){ if ($downtime["executed"] == 0){
$data[5] = '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/planned_downtime&amp;id_agent='. $data[5] = '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/planned_downtime&amp;id_agent='.
$id_agent.'&amp;delete_downtime=1&amp;id_downtime='.$downtime['id'].'">' . $id_agent.'&amp;delete_downtime=1&amp;id_downtime='.$downtime['id'].'">' .
print_image("images/cross.png", true, array("border" => '0', "alt" => __('Delete'))); html_print_image("images/cross.png", true, array("border" => '0', "alt" => __('Delete')));
$data[6] = '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/planned_downtime&amp;edit_downtime=1&amp;first_update=1&amp;id_downtime='.$downtime['id'].'">' . $data[6] = '<a href="index.php?sec=gagente&amp;sec2=godmode/agentes/planned_downtime&amp;edit_downtime=1&amp;first_update=1&amp;id_downtime='.$downtime['id'].'">' .
print_image("images/config.png", true, array("border" => '0', "alt" => __('Update'))) . '</a>'; html_print_image("images/config.png", true, array("border" => '0', "alt" => __('Update'))) . '</a>';
} }
else { else {
$data[5]= "N/A"; $data[5]= "N/A";
@ -349,19 +349,19 @@ else {
} }
if ($downtime["executed"] == 0) if ($downtime["executed"] == 0)
$data[7] = print_image ("images/pixel_green.png", true, array ('width' => 20, 'height' => 20, 'alt' => __('Executed'))); $data[7] = html_print_image ("images/pixel_green.png", true, array ('width' => 20, 'height' => 20, 'alt' => __('Executed')));
else else
$data[7] = print_image ("images/pixel_red.png", true, array ('width' => 20, 'height' => 20, 'alt' => __('Not executed'))); $data[7] = html_print_image ("images/pixel_red.png", true, array ('width' => 20, 'height' => 20, 'alt' => __('Not executed')));
array_push ($table->data, $data); array_push ($table->data, $data);
} }
print_table ($table); html_print_table ($table);
} }
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
echo '<form method="post" action="index.php?sec=gagente&amp;sec2=godmode/agentes/planned_downtime">'; echo '<form method="post" action="index.php?sec=gagente&amp;sec2=godmode/agentes/planned_downtime">';
print_input_hidden ("first_create", 1); html_print_input_hidden ("first_create", 1);
print_submit_button (__('Create'), 'create', false, 'class="sub next"'); html_print_submit_button (__('Create'), 'create', false, 'class="sub next"');
echo '</form>'; echo '</form>';
echo '</div>'; echo '</div>';
} }

View File

@ -284,26 +284,26 @@ foreach ($actions as $action) {
$data[0] = '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_action&id='.$action['id'].'">'. $data[0] = '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_action&id='.$action['id'].'">'.
$action['name'].'</a>'; $action['name'].'</a>';
$data[1] = ui_print_group_icon ($action["id_group"], true) .'&nbsp;'. ui_print_truncate_text(get_group_name ($action["id_group"], true)); $data[1] = ui_print_group_icon ($action["id_group"], true) .'&nbsp;'. ui_print_truncate_text(groups_get_name ($action["id_group"], true));
$data[2] = '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_actions&copy_action=1&id='.$action['id'].'" $data[2] = '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_actions&copy_action=1&id='.$action['id'].'"
onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">' . onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">' .
print_image("images/copy.png", true) . '</a>'; html_print_image("images/copy.png", true) . '</a>';
$data[3] = '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_actions&delete_action=1&id='.$action['id'].'" $data[3] = '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_actions&delete_action=1&id='.$action['id'].'"
onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'. onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.
print_image("images/cross.png", true) . '</a>'; html_print_image("images/cross.png", true) . '</a>';
array_push ($table->data, $data); array_push ($table->data, $data);
} }
if (isset($data)){ if (isset($data)){
print_table ($table); html_print_table ($table);
} else { } else {
echo "<div class='nf'>".__('No alert actions configured')."</div>"; echo "<div class='nf'>".__('No alert actions configured')."</div>";
} }
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
echo '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_action">'; echo '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_action">';
print_submit_button (__('Create'), 'create', false, 'class="sub next"'); html_print_submit_button (__('Create'), 'create', false, 'class="sub next"');
print_input_hidden ('create_alert', 1); html_print_input_hidden ('create_alert', 1);
echo '</form>'; echo '</form>';
echo '</div>'; echo '</div>';
?> ?>

View File

@ -154,17 +154,17 @@ foreach ($commands as $command) {
if (! $command['internal']) if (! $command['internal'])
$data[2] = '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_commands&delete_command=1&id='.$command['id'].'" $data[2] = '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_commands&delete_command=1&id='.$command['id'].'"
onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'. onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;">'.
print_image("images/cross.png", true) . '</a>'; html_print_image("images/cross.png", true) . '</a>';
array_push ($table->data, $data); array_push ($table->data, $data);
} }
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
echo '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_command">'; echo '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_command">';
print_submit_button (__('Create'), 'create', false, 'class="sub next"'); html_print_submit_button (__('Create'), 'create', false, 'class="sub next"');
print_input_hidden ('create_alert', 1); html_print_input_hidden ('create_alert', 1);
echo '</form>'; echo '</form>';
echo '</div>'; echo '</div>';
?> ?>

View File

@ -115,24 +115,24 @@ $table->size[2] = '15%';
$table->size[3] = '35%'; $table->size[3] = '35%';
$table->data[0][0] = __('Group'); $table->data[0][0] = __('Group');
$table->data[0][1] = print_select_groups(0, "LM", true, 'id_group', $id_group, false, '', $table->data[0][1] = html_print_select_groups(0, "LM", true, 'id_group', $id_group, false, '',
'', true); '', true);
$table->data[0][2] = __('Agent'); $table->data[0][2] = __('Agent');
$table->data[0][2] .= ' <span id="agent_loading" class="invisible">'; $table->data[0][2] .= ' <span id="agent_loading" class="invisible">';
$table->data[0][2] .= print_image("images/spinner.png", true); $table->data[0][2] .= html_print_image("images/spinner.png", true);
$table->data[0][2] .= '</span>'; $table->data[0][2] .= '</span>';
$table->data[0][3] = print_select ($agents, 'id_agent', $id_agent, false, $table->data[0][3] = html_print_select ($agents, 'id_agent', $id_agent, false,
__('All'), 0, true); __('All'), 0, true);
$table->data[1][0] = __('Free search'); $table->data[1][0] = __('Free search');
$table->data[1][1] = print_input_text ('search', $search, '', 20, 40, true); $table->data[1][1] = html_print_input_text ('search', $search, '', 20, 40, true);
$table->colspan[1][1] = 3; $table->colspan[1][1] = 3;
echo '<form id="filter_form" method="post" action="index.php?galertas&sec2=godmode/alerts/alert_compounds">'; echo '<form id="filter_form" method="post" action="index.php?galertas&sec2=godmode/alerts/alert_compounds">';
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: 90%">'; echo '<div class="action-buttons" style="width: 90%">';
print_input_hidden ('do_search', 1); html_print_input_hidden ('do_search', 1);
print_submit_button (__('Search'), 'search_btn', false, 'class="sub search"'); html_print_submit_button (__('Search'), 'search_btn', false, 'class="sub search"');
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';
unset ($table); unset ($table);
@ -221,13 +221,13 @@ foreach ($id_alerts as $alert) {
$data[0] = '<form class="disable_alert_form" action="'.$url.'" method="post" style="display: inline;">'; $data[0] = '<form class="disable_alert_form" action="'.$url.'" method="post" style="display: inline;">';
if ($alert['disabled']) { if ($alert['disabled']) {
$data[0] .= print_input_image ('enable', 'images/lightbulb_off.png', 1, '', true); $data[0] .= html_print_input_image ('enable', 'images/lightbulb_off.png', 1, '', true);
$data[0] .= print_input_hidden ('enable_alert', 1, true); $data[0] .= html_print_input_hidden ('enable_alert', 1, true);
} else { } else {
$data[0] .= print_input_image ('disable', 'images/lightbulb.png', 1, '', true); $data[0] .= html_print_input_image ('disable', 'images/lightbulb.png', 1, '', true);
$data[0] .= print_input_hidden ('disable_alert', 1, true); $data[0] .= html_print_input_hidden ('disable_alert', 1, true);
} }
$data[0] .= print_input_hidden ('id', $alert['id'], true); $data[0] .= html_print_input_hidden ('id', $alert['id'], true);
$data[0] .= '</form>'; $data[0] .= '</form>';
$data[1] = '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_compound&id='.$alert['id'].'">'; $data[1] = '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_compound&id='.$alert['id'].'">';
@ -236,22 +236,22 @@ foreach ($id_alerts as $alert) {
$data[2] = get_agent_name ($alert['id_agent']); $data[2] = get_agent_name ($alert['id_agent']);
$data[3] = '<a href="'.$url.'&delete_alert=1&id='.$alert['id'].'" $data[3] = '<a href="'.$url.'&delete_alert=1&id='.$alert['id'].'"
onClick="javascript:confirm(\''.__('Are you sure?').'\')">'; onClick="javascript:confirm(\''.__('Are you sure?').'\')">';
$data[3] .= print_image("images/cross.png", true, array("title" => __('Delete'))); $data[3] .= html_print_image("images/cross.png", true, array("title" => __('Delete')));
$data[3] .= '</a>'; $data[3] .= '</a>';
array_push ($table->data, $data); array_push ($table->data, $data);
} }
if (isset($data)){ if (isset($data)){
print_table ($table); html_print_table ($table);
} else { } else {
echo "<div class='nf'>".__('No alerts found')."</div>"; echo "<div class='nf'>".__('No alerts found')."</div>";
} }
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
echo '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_compound">'; echo '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_compound">';
print_submit_button (__('Create'), 'crtbtn', false, 'class="sub next"'); html_print_submit_button (__('Create'), 'crtbtn', false, 'class="sub next"');
print_input_hidden ('new_compound', 1); html_print_input_hidden ('new_compound', 1);
echo '</form>'; echo '</form>';
echo '</div>'; echo '</div>';

View File

@ -47,7 +47,7 @@ if (! $id_agente) {
$table->data['agent'][0] = __('Agent'); $table->data['agent'][0] = __('Agent');
$table->data['agent'][1] = print_input_text_extended ('id_agent', '', 'text_id_agent', '', 30, 100, false, '', $table->data['agent'][1] = html_print_input_text_extended ('id_agent', '', 'text_id_agent', '', 30, 100, false, '',
array('style' => 'background: url(images/lightning.png) no-repeat right;'), true) array('style' => 'background: url(images/lightning.png) no-repeat right;'), true)
. '<a href="#" class="tip">&nbsp;<span>' . __("Type at least two characters to search") . '</span></a>'; . '<a href="#" class="tip">&nbsp;<span>' . __("Type at least two characters to search") . '</span></a>';
} }
@ -57,12 +57,12 @@ $modules = array ();
if ($id_agente) if ($id_agente)
$modules = get_agent_modules ($id_agente, false, array("delete_pending" => 0)); $modules = get_agent_modules ($id_agente, false, array("delete_pending" => 0));
$table->data[0][1] = print_select ($modules, 'id_agent_module', 0, true, $table->data[0][1] = html_print_select ($modules, 'id_agent_module', 0, true,
__('Select'), 0, true, false, true, '', ($id_agente == 0)); __('Select'), 0, true, false, true, '', ($id_agente == 0));
$table->data[0][1] .= ' <span id="latest_value" class="invisible">'.__('Latest value').': '; $table->data[0][1] .= ' <span id="latest_value" class="invisible">'.__('Latest value').': ';
$table->data[0][1] .= '<span id="value">&nbsp;</span></span>'; $table->data[0][1] .= '<span id="value">&nbsp;</span></span>';
$table->data[0][1] .= ' <span id="module_loading" class="invisible">'; $table->data[0][1] .= ' <span id="module_loading" class="invisible">';
$table->data[0][1] .= print_image('images/spinner.png', true) . '</span>'; $table->data[0][1] .= html_print_image('images/spinner.png', true) . '</span>';
$table->data[1][0] = __('Template'); $table->data[1][0] = __('Template');
@ -77,12 +77,12 @@ else{
$templates = alerts_get_alert_templates (array ('id_group IN (' . $filter_groups . ')'), array ('id', 'name')); $templates = alerts_get_alert_templates (array ('id_group IN (' . $filter_groups . ')'), array ('id', 'name'));
} }
$table->data[1][1] = print_select (index_array ($templates, 'id', 'name'), $table->data[1][1] = html_print_select (index_array ($templates, 'id', 'name'),
'template', '', '', __('Select'), 0, true); 'template', '', '', __('Select'), 0, true);
$table->data[1][1] .= ' <a class="template_details invisible" href="#">' . $table->data[1][1] .= ' <a class="template_details invisible" href="#">' .
print_image("images/zoom.png", true, array("class" => 'img_help')) . '</a>'; html_print_image("images/zoom.png", true, array("class" => 'img_help')) . '</a>';
if (check_acl ($config['id_user'], 0, "LM")) { if (check_acl ($config['id_user'], 0, "LM")) {
$table->data[1][1] .= print_image ('images/add.png', true); $table->data[1][1] .= html_print_image ('images/add.png', true);
$table->data[1][1] .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_template">'; $table->data[1][1] .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_template">';
$table->data[1][1] .= __('Create Template'); $table->data[1][1] .= __('Create Template');
$table->data[1][1] .= '</a>'; $table->data[1][1] .= '</a>';
@ -93,33 +93,33 @@ $table->data[2][0] = __('Actions');
$actions = array ('0' => __('None')); $actions = array ('0' => __('None'));
$table->data[2][1] = '<div class="actions_container">'; $table->data[2][1] = '<div class="actions_container">';
$table->data[2][1] = print_select($actions,'action_select','','','','',true); $table->data[2][1] = html_print_select($actions,'action_select','','','','',true);
$table->data[2][1] .= ' <span id="action_loading" class="invisible">'; $table->data[2][1] .= ' <span id="action_loading" class="invisible">';
$table->data[2][1] .= print_image('images/spinner.png', true) . '</span>'; $table->data[2][1] .= html_print_image('images/spinner.png', true) . '</span>';
$table->data[2][1] .= ' <span id="advanced_action" class="advanced_actions invisible">'; $table->data[2][1] .= ' <span id="advanced_action" class="advanced_actions invisible">';
$table->data[2][1] .= __('Number of alerts match from').' '; $table->data[2][1] .= __('Number of alerts match from').' ';
$table->data[2][1] .= print_input_text ('fires_min', '', '', 4, 10, true); $table->data[2][1] .= html_print_input_text ('fires_min', '', '', 4, 10, true);
$table->data[2][1] .= ' '.__('to').' '; $table->data[2][1] .= ' '.__('to').' ';
$table->data[2][1] .= print_input_text ('fires_max', '', '', 4, 10, true); $table->data[2][1] .= html_print_input_text ('fires_max', '', '', 4, 10, true);
$table->data[2][1] .= ui_print_help_icon ("alert-matches", true); $table->data[2][1] .= ui_print_help_icon ("alert-matches", true);
$table->data[2][1] .= '</span>'; $table->data[2][1] .= '</span>';
$table->data[2][1] .= '</div>'; $table->data[2][1] .= '</div>';
if (check_acl ($config['id_user'], 0, "LM")) { if (check_acl ($config['id_user'], 0, "LM")) {
$table->data[2][1] .= print_image ('images/add.png', true); $table->data[2][1] .= html_print_image ('images/add.png', true);
$table->data[2][1] .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_action">'; $table->data[2][1] .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_action">';
$table->data[2][1] .= __('Create Action'); $table->data[2][1] .= __('Create Action');
$table->data[2][1] .= '</a>'; $table->data[2][1] .= '</a>';
} }
$table->data[3][0] = __('Threshold'); $table->data[3][0] = __('Threshold');
$table->data[3][1] = print_input_text ('module_action_threshold', '', '', 4, 10, true) . ui_print_help_icon ('action_threshold', true); $table->data[3][1] = html_print_input_text ('module_action_threshold', '', '', 4, 10, true) . ui_print_help_icon ('action_threshold', true);
echo '<form class="add_alert_form" method="post">'; echo '<form class="add_alert_form" method="post">';
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
print_submit_button (__('Add alert'), 'add', false, 'class="sub wand"'); html_print_submit_button (__('Add alert'), 'add', false, 'class="sub wand"');
print_input_hidden ('create_alert', 1); html_print_input_hidden ('create_alert', 1);
echo '</div></form>'; echo '</div></form>';
ui_require_css_file ('cluetip'); ui_require_css_file ('cluetip');

View File

@ -44,7 +44,7 @@ $form_filter .= "<input type='hidden' name='search' value='1' />\n";
$form_filter .= '<table style="width: 90%;" cellpadding="4" cellspacing="4" class="databox">'."\n"; $form_filter .= '<table style="width: 90%;" cellpadding="4" cellspacing="4" class="databox">'."\n";
$form_filter .= "<tr>\n"; $form_filter .= "<tr>\n";
$form_filter .= "<td>".__('Template name')."</td><td>"; $form_filter .= "<td>".__('Template name')."</td><td>";
$form_filter .= print_input_text ('template_name', $templateName, '', 12, 255, true); $form_filter .= html_print_input_text ('template_name', $templateName, '', 12, 255, true);
$form_filter .= "</td>\n"; $form_filter .= "</td>\n";
$temp = agents_get_agents(); $temp = agents_get_agents();
$arrayAgents = array(); $arrayAgents = array();
@ -57,14 +57,14 @@ if ($temp){
} }
$form_filter .= "<td>".__('Agents')."</td><td>"; $form_filter .= "<td>".__('Agents')."</td><td>";
$form_filter .= print_input_text_extended ('agent_name', $agentName, 'text-agent_name', '', 12, 100, false, '', $form_filter .= html_print_input_text_extended ('agent_name', $agentName, 'text-agent_name', '', 12, 100, false, '',
array('style' => 'background: url(images/lightning.png) no-repeat right;'), true); array('style' => 'background: url(images/lightning.png) no-repeat right;'), true);
$form_filter .= '<a href="#" class="tip">&nbsp;<span>' . __("Type at least two characters to search") . '</span></a>'; $form_filter .= '<a href="#" class="tip">&nbsp;<span>' . __("Type at least two characters to search") . '</span></a>';
$form_filter .= "</td>\n"; $form_filter .= "</td>\n";
$form_filter .= "<td>".__('Module name')."</td><td>"; $form_filter .= "<td>".__('Module name')."</td><td>";
$form_filter .= print_input_text ('module_name', $moduleName, '', 12, 255, true); $form_filter .= html_print_input_text ('module_name', $moduleName, '', 12, 255, true);
$form_filter .= "</td>\n"; $form_filter .= "</td>\n";
$form_filter .= "</tr>\n"; $form_filter .= "</tr>\n";
@ -86,13 +86,13 @@ if (is_array($temp)) {
} }
} }
$form_filter .= "<td>".__('Actions')."</td><td>"; $form_filter .= "<td>".__('Actions')."</td><td>";
$form_filter .= print_select ($arrayActions, "action_id", $actionID, '', __('All'), -1, true); $form_filter .= html_print_select ($arrayActions, "action_id", $actionID, '', __('All'), -1, true);
$form_filter .= "</td>\n"; $form_filter .= "</td>\n";
$form_filter .= "<td>".__('Field content')."</td><td>"; $form_filter .= "<td>".__('Field content')."</td><td>";
$form_filter .= print_input_text ('field_content', $fieldContent, '', 12, 255, true); $form_filter .= html_print_input_text ('field_content', $fieldContent, '', 12, 255, true);
$form_filter .= "</td>\n"; $form_filter .= "</td>\n";
$form_filter .= "<td>".__('Priority')."</td><td>"; $form_filter .= "<td>".__('Priority')."</td><td>";
$form_filter .= print_select (get_priorities (), 'priority',$priority, '', __('All'), -1, true); $form_filter .= html_print_select (get_priorities (), 'priority',$priority, '', __('All'), -1, true);
$form_filter .= "</td>"; $form_filter .= "</td>";
$form_filter .= "</tr>\n"; $form_filter .= "</tr>\n";
@ -101,17 +101,17 @@ $form_filter .= "<td>".__('Enabled / Disabled')."</td><td>";
$ed_list = array (); $ed_list = array ();
$ed_list[0] = __('Enable'); $ed_list[0] = __('Enable');
$ed_list[1] = __('Disable'); $ed_list[1] = __('Disable');
$form_filter .= print_select ($ed_list, 'enabledisable', $enabledisable, '', __('All'), -1, true); $form_filter .= html_print_select ($ed_list, 'enabledisable', $enabledisable, '', __('All'), -1, true);
$form_filter .= "</td><td>".__('Standby')."</td><td>"; $form_filter .= "</td><td>".__('Standby')."</td><td>";
$sb_list = array (); $sb_list = array ();
$sb_list[1] = __('Standby on'); $sb_list[1] = __('Standby on');
$sb_list[0] = __('Standby off'); $sb_list[0] = __('Standby off');
$form_filter .= print_select ($sb_list, 'standby', $standby, '', __('All'), -1, true); $form_filter .= html_print_select ($sb_list, 'standby', $standby, '', __('All'), -1, true);
$form_filter .= "</td></tr>\n"; $form_filter .= "</td></tr>\n";
$form_filter .= "<tr>\n"; $form_filter .= "<tr>\n";
$form_filter .= "<td colspan='6' align='right'>"; $form_filter .= "<td colspan='6' align='right'>";
$form_filter .= print_submit_button (__('Update'), '', false, 'class="sub upd"', true); $form_filter .= html_print_submit_button (__('Update'), '', false, 'class="sub upd"', true);
$form_filter .= "</td>"; $form_filter .= "</td>";
$form_filter .= "</tr>\n"; $form_filter .= "</tr>\n";
$form_filter .= "</table>\n"; $form_filter .= "</table>\n";
@ -302,17 +302,17 @@ $table->align[1] = 'center';
$table->head = array (); $table->head = array ();
$table->head[0] = "<span title='" . __('Enabled / Disabled') . "'>" . __('E/D') . "</span><br>" . $table->head[0] = "<span title='" . __('Enabled / Disabled') . "'>" . __('E/D') . "</span><br>" .
'<a href="' . $url . '&sort_field=disabled&sort=up">' . print_image("images/sort_up.png", true, array("style" => $selectDisabledUp)) . '</a>' . '<a href="' . $url . '&sort_field=disabled&sort=up">' . html_print_image("images/sort_up.png", true, array("style" => $selectDisabledUp)) . '</a>' .
'<a href="' . $url . '&sort_field=disabled&sort=down">' . print_image("images/sort_down.png", true, array("style" => $selectDisabledDown)) . '</a>'; '<a href="' . $url . '&sort_field=disabled&sort=down">' . html_print_image("images/sort_down.png", true, array("style" => $selectDisabledDown)) . '</a>';
$table->head[1] = "<span title='" . __('Standby') . "'>" . __('S.') . "</span><br>" . $table->head[1] = "<span title='" . __('Standby') . "'>" . __('S.') . "</span><br>" .
'<a href="' . $url . '&sort_field=standby&sort=up">' . print_image("images/sort_up.png", true, array("style" => $selectStandbyUp)) . '</a>' . '<a href="' . $url . '&sort_field=standby&sort=up">' . html_print_image("images/sort_up.png", true, array("style" => $selectStandbyUp)) . '</a>' .
'<a href="' . $url . '&sort_field=standby&sort=down">' . print_image("images/sort_down.png", true, array("style" => $selectStandbyDown)) . '</a>'; '<a href="' . $url . '&sort_field=standby&sort=down">' . html_print_image("images/sort_down.png", true, array("style" => $selectStandbyDown)) . '</a>';
if (! $id_agente) { if (! $id_agente) {
$table->style = array (); $table->style = array ();
$table->style[2] = 'font-weight: bold'; $table->style[2] = 'font-weight: bold';
$table->head[2] = __('Agent') . '<br>' . $table->head[2] = __('Agent') . '<br>' .
'<a href="' . $url . '&sort_field=agent&sort=up">' . print_image("images/sort_up.png", true, array("style" => $selectAgentUp)) . '</a>' . '<a href="' . $url . '&sort_field=agent&sort=up">' . html_print_image("images/sort_up.png", true, array("style" => $selectAgentUp)) . '</a>' .
'<a href="' . $url . '&sort_field=agent&sort=down">' . print_image("images/sort_down.png", true, array("style" => $selectAgentDown)) . '</a>'; '<a href="' . $url . '&sort_field=agent&sort=down">' . html_print_image("images/sort_down.png", true, array("style" => $selectAgentDown)) . '</a>';
$table->size[0] = '6%'; $table->size[0] = '6%';
$table->size[1] = '6%'; $table->size[1] = '6%';
$table->size[2] = '20%'; $table->size[2] = '20%';
@ -338,11 +338,11 @@ else {
} }
$table->head[3] = __('Module') . '<br>' . $table->head[3] = __('Module') . '<br>' .
'<a href="' . $url . '&sort_field=module&sort=up">' . print_image("images/sort_up.png", true, array("style" => $selectModuleUp)) . '</a>' . '<a href="' . $url . '&sort_field=module&sort=up">' . html_print_image("images/sort_up.png", true, array("style" => $selectModuleUp)) . '</a>' .
'<a href="' . $url . '&sort_field=module&sort=down">' . print_image("images/sort_down.png", true, array("style" => $selectModuleDown)) . '</a>'; '<a href="' . $url . '&sort_field=module&sort=down">' . html_print_image("images/sort_down.png", true, array("style" => $selectModuleDown)) . '</a>';
$table->head[4] = __('Template') . '<br>' . $table->head[4] = __('Template') . '<br>' .
'<a href="' . $url . '&sort_field=template&sort=up">' . print_image("images/sort_up.png", true, array("style" => $selectTemplateUp)) . '</a>' . '<a href="' . $url . '&sort_field=template&sort=up">' . html_print_image("images/sort_up.png", true, array("style" => $selectTemplateUp)) . '</a>' .
'<a href="' . $url . '&sort_field=template&sort=down">' . print_image("images/sort_down.png", true, array("style" => $selectTemplateDown)) . '</a>'; '<a href="' . $url . '&sort_field=template&sort=down">' . html_print_image("images/sort_down.png", true, array("style" => $selectTemplateDown)) . '</a>';
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) { if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
$table->head[5] = "<span title='" . __('Policy') . "'>" . __('P.') . "</span>"; $table->head[5] = "<span title='" . __('Policy') . "'>" . __('P.') . "</span>";
} }
@ -389,26 +389,26 @@ foreach ($simple_alerts as $alert) {
$data[0] = '<form class="disable_alert_form" method="post" style="display: inline;">'; $data[0] = '<form class="disable_alert_form" method="post" style="display: inline;">';
if ($alert['disabled']) { if ($alert['disabled']) {
$data[0] .= print_input_image ('enable', 'images/lightbulb_off.png', 1, '', true); $data[0] .= html_print_input_image ('enable', 'images/lightbulb_off.png', 1, '', true);
$data[0] .= print_input_hidden ('enable_alert', 1, true); $data[0] .= html_print_input_hidden ('enable_alert', 1, true);
} }
else { else {
$data[0] .= print_input_image ('disable', 'images/lightbulb.png', 1, '', true); $data[0] .= html_print_input_image ('disable', 'images/lightbulb.png', 1, '', true);
$data[0] .= print_input_hidden ('disable_alert', 1, true); $data[0] .= html_print_input_hidden ('disable_alert', 1, true);
} }
$data[0] .= print_input_hidden ('id_alert', $alert['id'], true); $data[0] .= html_print_input_hidden ('id_alert', $alert['id'], true);
$data[0] .= '</form>'; $data[0] .= '</form>';
$data[1] = '<form class="standby_alert_form" method="post" style="display: inline;">'; $data[1] = '<form class="standby_alert_form" method="post" style="display: inline;">';
if (!$alert['standby']) { if (!$alert['standby']) {
$data[1] .= print_input_image ('standby_off', 'images/bell.png', 1, '', true); $data[1] .= html_print_input_image ('standby_off', 'images/bell.png', 1, '', true);
$data[1] .= print_input_hidden ('standbyon_alert', 1, true); $data[1] .= html_print_input_hidden ('standbyon_alert', 1, true);
} }
else { else {
$data[1] .= print_input_image ('standby_on', 'images/bell_pause.png', 1, '', true); $data[1] .= html_print_input_image ('standby_on', 'images/bell_pause.png', 1, '', true);
$data[1] .= print_input_hidden ('standbyoff_alert', 1, true); $data[1] .= html_print_input_hidden ('standbyoff_alert', 1, true);
} }
$data[1] .= print_input_hidden ('id_alert', $alert['id'], true); $data[1] .= html_print_input_hidden ('id_alert', $alert['id'], true);
$data[1] .= '</form>'; $data[1] .= '</form>';
if (! $id_agente) { if (! $id_agente) {
@ -424,7 +424,7 @@ foreach ($simple_alerts as $alert) {
$data[3] = ui_print_truncate_text(get_agentmodule_name ($alert['id_agent_module']), 25, false); $data[3] = ui_print_truncate_text(get_agentmodule_name ($alert['id_agent_module']), 25, false);
$data[4] = ' <a class="template_details" $data[4] = ' <a class="template_details"
href="ajax.php?page=godmode/alerts/alert_templates&get_template_tooltip=1&id_template='.$alert['id_alert_template'].'">' . href="ajax.php?page=godmode/alerts/alert_templates&get_template_tooltip=1&id_template='.$alert['id_alert_template'].'">' .
print_image("images/zoom.png", true, array("id" => 'template-details-'.$alert['id_alert_template'], "class" => "img_help")) . '</a> '; html_print_image("images/zoom.png", true, array("id" => 'template-details-'.$alert['id_alert_template'], "class" => "img_help")) . '</a> ';
$data[4] .= "<a href='index.php?sec=galertas&sec2=godmode/alerts/configure_alert_template&id=".$alert['id_alert_template']."'>"; $data[4] .= "<a href='index.php?sec=galertas&sec2=godmode/alerts/configure_alert_template&id=".$alert['id_alert_template']."'>";
$data[4] .= ui_print_truncate_text(alerts_get_alert_template_name ($alert['id_alert_template']), 15, false); $data[4] .= ui_print_truncate_text(alerts_get_alert_template_name ($alert['id_alert_template']), 15, false);
@ -438,7 +438,7 @@ foreach ($simple_alerts as $alert) {
$img = 'images/policies.png'; $img = 'images/policies.png';
$data[5] = '<a href="?sec=gpolicies&sec2=enterprise/godmode/policies/policies&id=' . $policyInfo['id'] . '">' . $data[5] = '<a href="?sec=gpolicies&sec2=enterprise/godmode/policies/policies&id=' . $policyInfo['id'] . '">' .
print_image($img,true, array('title' => $policyInfo['name'])) . html_print_image($img,true, array('title' => $policyInfo['name'])) .
'</a>'; '</a>';
} }
} }
@ -481,10 +481,10 @@ foreach ($simple_alerts as $alert) {
$data[6] .= '</font>'; $data[6] .= '</font>';
// $data[6] .= ' <span class="delete" style="clear:right">'; // $data[6] .= ' <span class="delete" style="clear:right">';
$data[6] .= '<form method="post" class="delete_link" style="display: inline; vertical-align: -50%;">'; $data[6] .= '<form method="post" class="delete_link" style="display: inline; vertical-align: -50%;">';
$data[6] .= print_input_image ('delete', 'images/cross.png', 1, '', true, array('title' => __('Delete'))); $data[6] .= html_print_input_image ('delete', 'images/cross.png', 1, '', true, array('title' => __('Delete')));
$data[6] .= print_input_hidden ('delete_action', 1, true); $data[6] .= html_print_input_hidden ('delete_action', 1, true);
$data[6] .= print_input_hidden ('id_alert', $alert['id'], true); $data[6] .= html_print_input_hidden ('id_alert', $alert['id'], true);
$data[6] .= print_input_hidden ('id_action', $action_id, true); $data[6] .= html_print_input_hidden ('id_action', $action_id, true);
$data[6] .= '</form>'; $data[6] .= '</form>';
// $data[6] .= '</span>'; // $data[6] .= '</span>';
$data[6] .= '</li>'; $data[6] .= '</li>';
@ -494,7 +494,7 @@ foreach ($simple_alerts as $alert) {
$data[6] .= '<a class="add_action" id="add-action-'.$alert['id'].'" href="#">'; $data[6] .= '<a class="add_action" id="add-action-'.$alert['id'].'" href="#">';
$data[6] .= print_image ('images/add.png', true); $data[6] .= html_print_image ('images/add.png', true);
if ($alert['disabled']) if ($alert['disabled'])
$data[6] .= ' '. '<span style="font-style: italic; color: #aaaaaa;">' .__('Add action') . '</span>'; $data[6] .= ' '. '<span style="font-style: italic; color: #aaaaaa;">' .__('Add action') . '</span>';
else else
@ -502,27 +502,27 @@ foreach ($simple_alerts as $alert) {
$data[6] .= '</a>'; $data[6] .= '</a>';
$data[6] .= '<form id="add_action_form-'.$alert['id'].'" method="post" class="invisible">'; $data[6] .= '<form id="add_action_form-'.$alert['id'].'" method="post" class="invisible">';
$data[6] .= print_input_hidden ('add_action', 1, true); $data[6] .= html_print_input_hidden ('add_action', 1, true);
$data[6] .= print_input_hidden ('id_alert_module', $alert['id'], true); $data[6] .= html_print_input_hidden ('id_alert_module', $alert['id'], true);
$own_info = get_user_info($config['id_user']); $own_info = get_user_info($config['id_user']);
$own_groups = get_user_groups($config['id_user'], 'LW', $own_info['is_admin']); $own_groups = get_user_groups($config['id_user'], 'LW', $own_info['is_admin']);
$filter_groups = ''; $filter_groups = '';
$filter_groups = implode(',', array_keys($own_groups)); $filter_groups = implode(',', array_keys($own_groups));
$actions = alerts_get_alert_actions_filter(true, 'id_group IN (' . $filter_groups . ')'); $actions = alerts_get_alert_actions_filter(true, 'id_group IN (' . $filter_groups . ')');
$data[6] .= print_select ($actions, 'action', '', '', __('None'), 0, true); $data[6] .= html_print_select ($actions, 'action', '', '', __('None'), 0, true);
$data[6] .= '<br />'; $data[6] .= '<br />';
$data[6] .= '<span><a href="#" class="show_advanced_actions">'.__('Advanced options').' &raquo; </a></span>'; $data[6] .= '<span><a href="#" class="show_advanced_actions">'.__('Advanced options').' &raquo; </a></span>';
$data[6] .= '<span class="advanced_actions invisible">'; $data[6] .= '<span class="advanced_actions invisible">';
$data[6] .= __('Number of alerts match from').' '; $data[6] .= __('Number of alerts match from').' ';
$data[6] .= print_input_text ('fires_min', -1, '', 4, 10, true); $data[6] .= html_print_input_text ('fires_min', -1, '', 4, 10, true);
$data[6] .= ' '.__('to').' '; $data[6] .= ' '.__('to').' ';
$data[6] .= print_input_text ('fires_max', -1, '', 4, 10, true); $data[6] .= html_print_input_text ('fires_max', -1, '', 4, 10, true);
$data[6] .= ui_print_help_icon ("alert-matches", true); $data[6] .= ui_print_help_icon ("alert-matches", true);
$data[6] .= '<br />' . __('Threshold'); $data[6] .= '<br />' . __('Threshold');
$data[6] .= print_input_text ('module_action_threshold', '', '', 4, 10, true) . ui_print_help_icon ('action_threshold', true); $data[6] .= html_print_input_text ('module_action_threshold', '', '', 4, 10, true) . ui_print_help_icon ('action_threshold', true);
$data[6] .= '</span>'; $data[6] .= '</span>';
$data[6] .= '<div class="right">'; $data[6] .= '<div class="right">';
$data[6] .= print_submit_button (__('Add'), 'add_action', false, 'class="sub next"', true); $data[6] .= html_print_submit_button (__('Add'), 'add_action', false, 'class="sub next"', true);
$data[6] .= '</div>'; $data[6] .= '</div>';
$data[6] .= '</form>'; $data[6] .= '</form>';
@ -546,15 +546,15 @@ foreach ($simple_alerts as $alert) {
$data[8] = '<form class="delete_alert_form" method="post" style="display: inline;">'; $data[8] = '<form class="delete_alert_form" method="post" style="display: inline;">';
$data[8] .= print_input_image ('delete', 'images/cross.png', 1, '', true, array('title' => __('Delete'))); $data[8] .= html_print_input_image ('delete', 'images/cross.png', 1, '', true, array('title' => __('Delete')));
$data[8] .= print_input_hidden ('delete_alert', 1, true); $data[8] .= html_print_input_hidden ('delete_alert', 1, true);
$data[8] .= print_input_hidden ('id_alert', $alert['id'], true); $data[8] .= html_print_input_hidden ('id_alert', $alert['id'], true);
$data[8] .= '</form>'; $data[8] .= '</form>';
array_push ($table->data, $data); array_push ($table->data, $data);
} }
if (isset($data)){ if (isset($data)){
print_table ($table); html_print_table ($table);
} }
else { else {
echo "<div class='nf'>".__('No alerts defined')."</div>"; echo "<div class='nf'>".__('No alerts defined')."</div>";
@ -563,7 +563,7 @@ else {
// Create alert button // Create alert button
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
echo '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=builder">'; echo '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=builder">';
print_submit_button (__('Create'), 'crtbtn', false, 'class="sub next"'); html_print_submit_button (__('Create'), 'crtbtn', false, 'class="sub next"');
echo '</form>'; echo '</form>';
echo '</div>'; echo '</div>';

View File

@ -251,11 +251,11 @@ else {
'list' => array( 'list' => array(
'active' => false, 'active' => false,
'text' => '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=list">' . 'text' => '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=list">' .
print_image ("images/god6.png", true, array ("title" => __('List alerts'))) .'</a>'), html_print_image ("images/god6.png", true, array ("title" => __('List alerts'))) .'</a>'),
'builder' => array( 'builder' => array(
'active' => false, 'active' => false,
'text' => '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=builder">' . 'text' => '<a href="index.php?sec=galertas&sec2=godmode/alerts/alert_list&tab=builder">' .
print_image ("images/config.png", true, array ("title" => __('Builder alert'))) .'</a>')); html_print_image ("images/config.png", true, array ("title" => __('Builder alert'))) .'</a>'));
$buttons[$tab]['active'] = true; $buttons[$tab]['active'] = true;

View File

@ -199,18 +199,18 @@ $table->style[0] = 'font-weight: bold';
$table->style[2] = 'font-weight: bold'; $table->style[2] = 'font-weight: bold';
$table->data[0][0] = __('Type'); $table->data[0][0] = __('Type');
$table->data[0][1] = print_select (alerts_get_alert_templates_types (), 'search_type', $table->data[0][1] = html_print_select (alerts_get_alert_templates_types (), 'search_type',
$search_type, '', __('All'), '', true, false, false); $search_type, '', __('All'), '', true, false, false);
$table->data[0][2] = __('Search'); $table->data[0][2] = __('Search');
$table->data[0][3] = print_input_text ('search_string', $search_string, '', 25, $table->data[0][3] = html_print_input_text ('search_string', $search_string, '', 25,
255, true); 255, true);
$table->data[0][4] = '<div class="action-buttons">'; $table->data[0][4] = '<div class="action-buttons">';
$table->data[0][4] .= print_submit_button (__('Search'), 'search', false, $table->data[0][4] .= html_print_submit_button (__('Search'), 'search', false,
'class="sub search"', true); 'class="sub search"', true);
$table->data[0][4] .= '</div>'; $table->data[0][4] .= '</div>';
echo '<form method="post" action="'.$url.'">'; echo '<form method="post" action="'.$url.'">';
print_table ($table); html_print_table ($table);
echo '</form>'; echo '</form>';
unset ($table); unset ($table);
@ -259,19 +259,19 @@ foreach ($templates as $template) {
$data[0] = '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_template&id='.$template['id'].'">'. $data[0] = '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_template&id='.$template['id'].'">'.
$template['name'].'</a>'; $template['name'].'</a>';
$data[1] = ui_print_group_icon ($template["id_group"], true) .'&nbsp;'. ui_print_truncate_text(get_group_name ($template['id_group'], true)); $data[1] = ui_print_group_icon ($template["id_group"], true) .'&nbsp;'. ui_print_truncate_text(groups_get_name ($template['id_group'], true));
$data[3] = alerts_get_alert_templates_type_name ($template['type']); $data[3] = alerts_get_alert_templates_type_name ($template['type']);
$data[4] = '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_template" style="display: inline; float: left">'; $data[4] = '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_template" style="display: inline; float: left">';
$data[4] .= print_input_hidden ('duplicate_template', 1, true); $data[4] .= html_print_input_hidden ('duplicate_template', 1, true);
$data[4] .= print_input_hidden ('source_id', $template['id'], true); $data[4] .= html_print_input_hidden ('source_id', $template['id'], true);
$data[4] .= print_input_image ('dup', 'images/copy.png', 1, '', true, array ('title' => __('Duplicate'))); $data[4] .= html_print_input_image ('dup', 'images/copy.png', 1, '', true, array ('title' => __('Duplicate')));
$data[4] .= '</form> '; $data[4] .= '</form> ';
$data[4] .= '<form method="post" style="display: inline; float: right" onsubmit="if (!confirm(\''.__('Are you sure?').'\')) return false;">'; $data[4] .= '<form method="post" style="display: inline; float: right" onsubmit="if (!confirm(\''.__('Are you sure?').'\')) return false;">';
$data[4] .= print_input_hidden ('delete_template', 1, true); $data[4] .= html_print_input_hidden ('delete_template', 1, true);
$data[4] .= print_input_hidden ('id', $template['id'], true); $data[4] .= html_print_input_hidden ('id', $template['id'], true);
$data[4] .= print_input_image ('del', 'images/cross.png', 1, '', true, array ('title' => __('Delete'))); $data[4] .= html_print_input_image ('del', 'images/cross.png', 1, '', true, array ('title' => __('Delete')));
$data[4] .= '</form> '; $data[4] .= '</form> ';
array_push ($table->data, $data); array_push ($table->data, $data);
@ -279,14 +279,14 @@ foreach ($templates as $template) {
ui_pagination ($total_templates, $url); ui_pagination ($total_templates, $url);
if (isset($data)){ if (isset($data)){
print_table ($table); html_print_table ($table);
} else { } else {
echo "<div class='nf'>".__('No alert templates defined')."</div>"; echo "<div class='nf'>".__('No alert templates defined')."</div>";
} }
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
echo '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_template">'; echo '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_template">';
print_submit_button (__('Create'), 'create', false, 'class="sub next"'); html_print_submit_button (__('Create'), 'create', false, 'class="sub next"');
print_input_hidden ('create_alert', 1); html_print_input_hidden ('create_alert', 1);
echo '</form>'; echo '</form>';
echo '</div>'; echo '</div>';

View File

@ -93,7 +93,7 @@ $table->size = array ();
$table->size[0] = '20%'; $table->size[0] = '20%';
$table->data = array (); $table->data = array ();
$table->data[0][0] = __('Name'); $table->data[0][0] = __('Name');
$table->data[0][1] = print_input_text ('name', $name, '', 35, 255, true); $table->data[0][1] = html_print_input_text ('name', $name, '', 35, 255, true);
$table->data[1][0] = __('Group'); $table->data[1][0] = __('Group');
@ -104,44 +104,44 @@ if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
$display_all_group = true; $display_all_group = true;
else else
$display_all_group = false; $display_all_group = false;
$table->data[1][1] = print_select_groups(false, "LW", $display_all_group, 'group', $group, '', '', 0, true); $table->data[1][1] = html_print_select_groups(false, "LW", $display_all_group, 'group', $group, '', '', 0, true);
$table->data[2][0] = __('Command'); $table->data[2][0] = __('Command');
$table->data[2][1] = print_select_from_sql ('SELECT id, name FROM talert_commands', $table->data[2][1] = html_print_select_from_sql ('SELECT id, name FROM talert_commands',
'id_command', $id_command, '', __('None'), 0, true); 'id_command', $id_command, '', __('None'), 0, true);
$table->data[2][1] .= ' '; $table->data[2][1] .= ' ';
if (check_acl ($config['id_user'], 0, "PM")){ if (check_acl ($config['id_user'], 0, "PM")){
$table->data[2][1] .= print_image ('images/add.png', true); $table->data[2][1] .= html_print_image ('images/add.png', true);
$table->data[2][1] .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_command">'; $table->data[2][1] .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_command">';
$table->data[2][1] .= __('Create Command'); $table->data[2][1] .= __('Create Command');
$table->data[2][1] .= '</a>'; $table->data[2][1] .= '</a>';
} }
$table->data[3][0] = __('Threshold'); $table->data[3][0] = __('Threshold');
$table->data[3][1] = print_input_text ('action_threshold', $action_threshold, '', 5, 7, true); $table->data[3][1] = html_print_input_text ('action_threshold', $action_threshold, '', 5, 7, true);
$table->data[3][1] .= ' '.__('seconds') . ui_print_help_icon ('action_threshold', true); $table->data[3][1] .= ' '.__('seconds') . ui_print_help_icon ('action_threshold', true);
$table->data[4][0] = __('Field 1'); $table->data[4][0] = __('Field 1');
$table->data[4][1] = print_input_text ('field1', $field1, '', 35, 255, true) . ui_print_help_icon ('alert_macros', true); $table->data[4][1] = html_print_input_text ('field1', $field1, '', 35, 255, true) . ui_print_help_icon ('alert_macros', true);
$table->data[5][0] = __('Field 2'); $table->data[5][0] = __('Field 2');
$table->data[5][1] = print_input_text ('field2', $field2, '', 80, 255, true); $table->data[5][1] = html_print_input_text ('field2', $field2, '', 80, 255, true);
$table->data[6][0] = __('Field 3'); $table->data[6][0] = __('Field 3');
$table->data[6][1] = print_textarea ('field3', 10, 30, $field3, '', true); $table->data[6][1] = html_print_textarea ('field3', 10, 30, $field3, '', true);
$table->data[7][0] = __('Command preview'); $table->data[7][0] = __('Command preview');
$table->data[7][1] = print_textarea ('command_preview', 10, 30, '', 'disabled="disabled"', true); $table->data[7][1] = html_print_textarea ('command_preview', 10, 30, '', 'disabled="disabled"', true);
echo '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/alert_actions">'; echo '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/alert_actions">';
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
if ($id) { if ($id) {
print_input_hidden ('id', $id); html_print_input_hidden ('id', $id);
print_input_hidden ('update_action', 1); html_print_input_hidden ('update_action', 1);
print_submit_button (__('Update'), 'create', false, 'class="sub upd"'); html_print_submit_button (__('Update'), 'create', false, 'class="sub upd"');
} else { } else {
print_input_hidden ('create_action', 1); html_print_input_hidden ('create_action', 1);
print_submit_button (__('Create'), 'create', false, 'class="sub wand"'); html_print_submit_button (__('Create'), 'create', false, 'class="sub wand"');
} }
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -48,25 +48,25 @@ $table->size = array ();
$table->size[0] = '20%'; $table->size[0] = '20%';
$table->data = array (); $table->data = array ();
$table->data[0][0] = __('Name'); $table->data[0][0] = __('Name');
$table->data[0][1] = print_input_text ('name', $name, '', 35, 255, true); $table->data[0][1] = html_print_input_text ('name', $name, '', 35, 255, true);
$table->data[1][0] = __('Command'); $table->data[1][0] = __('Command');
$table->data[1][0] .= ui_print_help_icon ('alert_macros', true); $table->data[1][0] .= ui_print_help_icon ('alert_macros', true);
$table->data[1][1] = print_input_text ('command', $command, '', 80, 255, true); $table->data[1][1] = html_print_input_text ('command', $command, '', 80, 255, true);
$table->data[2][0] = __('Description'); $table->data[2][0] = __('Description');
$table->data[2][1] = print_textarea ('description', 10, 30, $description, '', true); $table->data[2][1] = html_print_textarea ('description', 10, 30, $description, '', true);
echo '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/alert_commands">'; echo '<form method="post" action="index.php?sec=galertas&sec2=godmode/alerts/alert_commands">';
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
if ($id) { if ($id) {
print_input_hidden ('id', $id); html_print_input_hidden ('id', $id);
print_input_hidden ('update_command', 1); html_print_input_hidden ('update_command', 1);
print_submit_button (__('Update'), 'create', false, 'class="sub upd"'); html_print_submit_button (__('Update'), 'create', false, 'class="sub upd"');
} else { } else {
print_input_hidden ('create_command', 1); html_print_input_hidden ('create_command', 1);
print_submit_button (__('Create'), 'create', false, 'class="sub wand"'); html_print_submit_button (__('Create'), 'create', false, 'class="sub wand"');
} }
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -318,55 +318,55 @@ if ($step == 2) {
$table->data[0][0] = __('Days of week'); $table->data[0][0] = __('Days of week');
$table->data[0][1] = __('Mon'); $table->data[0][1] = __('Mon');
$table->data[0][1] .= print_checkbox ('monday', 1, $monday, true); $table->data[0][1] .= html_print_checkbox ('monday', 1, $monday, true);
$table->data[0][1] .= __('Tue'); $table->data[0][1] .= __('Tue');
$table->data[0][1] .= print_checkbox ('tuesday', 1, $tuesday, true); $table->data[0][1] .= html_print_checkbox ('tuesday', 1, $tuesday, true);
$table->data[0][1] .= __('Wed'); $table->data[0][1] .= __('Wed');
$table->data[0][1] .= print_checkbox ('wednesday', 1, $wednesday, true); $table->data[0][1] .= html_print_checkbox ('wednesday', 1, $wednesday, true);
$table->data[0][1] .= __('Thu'); $table->data[0][1] .= __('Thu');
$table->data[0][1] .= print_checkbox ('thursday', 1, $thursday, true); $table->data[0][1] .= html_print_checkbox ('thursday', 1, $thursday, true);
$table->data[0][1] .= __('Fri'); $table->data[0][1] .= __('Fri');
$table->data[0][1] .= print_checkbox ('friday', 1, $friday, true); $table->data[0][1] .= html_print_checkbox ('friday', 1, $friday, true);
$table->data[0][1] .= __('Sat'); $table->data[0][1] .= __('Sat');
$table->data[0][1] .= print_checkbox ('saturday', 1, $saturday, true); $table->data[0][1] .= html_print_checkbox ('saturday', 1, $saturday, true);
$table->data[0][1] .= __('Sun'); $table->data[0][1] .= __('Sun');
$table->data[0][1] .= print_checkbox ('sunday', 1, $sunday, true); $table->data[0][1] .= html_print_checkbox ('sunday', 1, $sunday, true);
$table->data[1][0] = __('Time from'); $table->data[1][0] = __('Time from');
$table->data[1][1] = print_input_text ('time_from', $time_from, '', 7, 7, $table->data[1][1] = html_print_input_text ('time_from', $time_from, '', 7, 7,
true); true);
$table->data[1][2] = __('Time to'); $table->data[1][2] = __('Time to');
$table->data[1][3] = print_input_text ('time_to', $time_to, '', 7, 7, $table->data[1][3] = html_print_input_text ('time_to', $time_to, '', 7, 7,
true); true);
$table->data['threshold'][0] = __('Time threshold'); $table->data['threshold'][0] = __('Time threshold');
$table->data['threshold'][1] = print_select ($threshold_values, $table->data['threshold'][1] = html_print_select ($threshold_values,
'threshold', $threshold_selected, '', '', '', true, false, false); 'threshold', $threshold_selected, '', '', '', true, false, false);
$table->data['threshold']['other_label'] = __('Other value'); $table->data['threshold']['other_label'] = __('Other value');
$table->data['threshold']['other_input'] = print_input_text ('other_threshold', $table->data['threshold']['other_input'] = html_print_input_text ('other_threshold',
$threshold, '', 5, 7, true); $threshold, '', 5, 7, true);
$table->data['threshold']['other_input'] .= ' '.__('seconds'); $table->data['threshold']['other_input'] .= ' '.__('seconds');
$table->data[3][0] = __('Min. number of alerts'); $table->data[3][0] = __('Min. number of alerts');
$table->data[3][1] = print_input_text ('min_alerts', $min_alerts, '', $table->data[3][1] = html_print_input_text ('min_alerts', $min_alerts, '',
5, 7, true); 5, 7, true);
$table->data[3][2] = __('Max. number of alerts'); $table->data[3][2] = __('Max. number of alerts');
$table->data[3][3] = print_input_text ('max_alerts', $max_alerts, '', $table->data[3][3] = html_print_input_text ('max_alerts', $max_alerts, '',
5, 7, true); 5, 7, true);
$table->data[4][0] = __('Actions'); $table->data[4][0] = __('Actions');
$table->data[4][1] = print_select_from_sql ('SELECT id, name FROM talert_actions ORDER BY name', $table->data[4][1] = html_print_select_from_sql ('SELECT id, name FROM talert_actions ORDER BY name',
'action', '', '', __('Select'), 0, true, false, false).' '; 'action', '', '', __('Select'), 0, true, false, false).' ';
$table->data[4][1] .= print_button (__('Add'), 'add_action', false, '', $table->data[4][1] .= html_print_button (__('Add'), 'add_action', false, '',
'class="sub next"', true); 'class="sub next"', true);
$table->data[4][1] .= '<br />'; $table->data[4][1] .= '<br />';
/* TODO: Finish fires_max and fires_min support */ /* TODO: Finish fires_max and fires_min support */
/* $table->data[4][1] .= '<span><a href="" class="show_advanced_actions">'.__('Advanced options').' &raquo; </a></span>'; /* $table->data[4][1] .= '<span><a href="" class="show_advanced_actions">'.__('Advanced options').' &raquo; </a></span>';
$table->data[4][1] .= '<span class="advanced_actions invisible">'; $table->data[4][1] .= '<span class="advanced_actions invisible">';
$table->data[4][1] .= __('From').' '; $table->data[4][1] .= __('From').' ';
$table->data[4][1] .= print_input_text ('fires_min', 0, '', 4, 10, true); $table->data[4][1] .= html_print_input_text ('fires_min', 0, '', 4, 10, true);
$table->data[4][1] .= ' '.__('to').' '; $table->data[4][1] .= ' '.__('to').' ';
$table->data[4][1] .= print_input_text ('fires_max', 0, '', 4, 10, true); $table->data[4][1] .= html_print_input_text ('fires_max', 0, '', 4, 10, true);
$table->data[4][1] .= ' '.__('matches of the alert'); $table->data[4][1] .= ' '.__('matches of the alert');
$table->data[4][1] .= ui_print_help_icon("alert-matches", true); $table->data[4][1] .= ui_print_help_icon("alert-matches", true);
$table->data[4][1] .= '</span>'; $table->data[4][1] .= '</span>';
@ -407,16 +407,16 @@ if ($step == 2) {
} }
$table->data[0][0] = __('Alert recovery'); $table->data[0][0] = __('Alert recovery');
$values = array (false => __('Disabled'), true => __('Enabled')); $values = array (false => __('Disabled'), true => __('Enabled'));
$table->data[0][1] = print_select ($values, $table->data[0][1] = html_print_select ($values,
'recovery_notify', $recovery_notify, '', '', '', true, false, 'recovery_notify', $recovery_notify, '', '', '', true, false,
false); false);
$table->data['field2'][0] = __('Field 2'); $table->data['field2'][0] = __('Field 2');
$table->data['field2'][1] = print_input_text ('field2_recovery', $table->data['field2'][1] = html_print_input_text ('field2_recovery',
$field2_recovery, '', 35, 255, true); $field2_recovery, '', 35, 255, true);
$table->data['field3'][0] = __('Field 3'); $table->data['field3'][0] = __('Field 3');
$table->data['field3'][1] = print_textarea ('field3_recovery', 10, 30, $table->data['field3'][1] = html_print_textarea ('field3_recovery', 10, 30,
$field3_recovery, '', true); $field3_recovery, '', true);
} else { } else {
/* Step 1 by default */ /* Step 1 by default */
@ -435,13 +435,13 @@ if ($step == 2) {
} }
$table->data[0][0] = __('Name'); $table->data[0][0] = __('Name');
$table->data[0][1] = print_input_text ('name', $name, '', 35, 255, true); $table->data[0][1] = html_print_input_text ('name', $name, '', 35, 255, true);
$table->data[1][0] = __('Assigned to'); $table->data[1][0] = __('Assigned to');
$table->data[1][1] = print_select (get_group_agents (array_keys ($groups)), $table->data[1][1] = html_print_select (get_group_agents (array_keys ($groups)),
'id_agent', $id_agent, '', __('Select'), 0, true); 'id_agent', $id_agent, '', __('Select'), 0, true);
$table->data[2][0] = __('Description'); $table->data[2][0] = __('Description');
$table->data[2][1] = print_textarea ('description', 10, 30, $table->data[2][1] = html_print_textarea ('description', 10, 30,
$description, '', true); $description, '', true);
$table->data[3][0] = __('Condition'); $table->data[3][0] = __('Condition');
@ -473,7 +473,7 @@ if ($step == 2) {
$alert = alerts_get_alert_agent_module ($condition['id_alert_template_module']); $alert = alerts_get_alert_agent_module ($condition['id_alert_template_module']);
$data[0] = '<a href="#" class="remove_alert" id="alert-'.$alert['id'].'" />'; $data[0] = '<a href="#" class="remove_alert" id="alert-'.$alert['id'].'" />';
$data[0] .= print_image("images/delete.png", true); $data[0] .= html_print_image("images/delete.png", true);
$data[0] .= '</a>'; $data[0] .= '</a>';
$idAgent = get_agent_module_id($alert['id_agent_module']); $idAgent = get_agent_module_id($alert['id_agent_module']);
$nameAgent = get_agent_name($idAgent); $nameAgent = get_agent_name($idAgent);
@ -481,18 +481,18 @@ if ($step == 2) {
$data[2] = alerts_get_alert_template_name ($alert['id_alert_template']); $data[2] = alerts_get_alert_template_name ($alert['id_alert_template']);
$data[3] = get_agentmodule_name ($alert['id_agent_module']); $data[3] = get_agentmodule_name ($alert['id_agent_module']);
if ($condition['operation'] == 'NOP') { if ($condition['operation'] == 'NOP') {
$data[4] = print_input_hidden ('operations['.$alert['id'].']', 'NOP', true); $data[4] = html_print_input_hidden ('operations['.$alert['id'].']', 'NOP', true);
} else { } else {
$data[4] = print_select (alerts_compound_operations (), $data[4] = html_print_select (alerts_compound_operations (),
'operations['.$alert['id'].']', $condition['operation'], '', '', '', true); 'operations['.$alert['id'].']', $condition['operation'], '', '', '', true);
} }
$data[4] .= print_input_hidden ("conditions[]", $alert['id'], true); $data[4] .= html_print_input_hidden ("conditions[]", $alert['id'], true);
array_push ($table_alerts->data, $data); array_push ($table_alerts->data, $data);
} }
} }
$table->data['conditions'][1] = print_table ($table_alerts, true); $table->data['conditions'][1] = html_print_table ($table_alerts, true);
$table->colspan['conditions'][1] = 2; $table->colspan['conditions'][1] = 2;
} }
@ -502,22 +502,22 @@ if ($step >= LAST_STEP) {
} else { } else {
echo '<form method="post" id="alert_form">'; echo '<form method="post" id="alert_form">';
} }
print_table ($table); html_print_table ($table);
echo '<div id="message" class="invisible error">&nbsp;</div>'; echo '<div id="message" class="invisible error">&nbsp;</div>';
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
if ($id) { if ($id) {
print_input_hidden ('id', $id); html_print_input_hidden ('id', $id);
print_input_hidden ('update_compound', 1); html_print_input_hidden ('update_compound', 1);
} else { } else {
print_input_hidden ('create_compound', 1); html_print_input_hidden ('create_compound', 1);
} }
if ($step >= LAST_STEP) { if ($step >= LAST_STEP) {
print_submit_button (__('Finish'), 'finish', false, 'class="sub upd"'); html_print_submit_button (__('Finish'), 'finish', false, 'class="sub upd"');
} else { } else {
print_input_hidden ('step', $step + 1); html_print_input_hidden ('step', $step + 1);
print_submit_button (__('Next'), 'next', false, 'class="sub next"'); html_print_submit_button (__('Next'), 'next', false, 'class="sub next"');
} }
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';
@ -538,18 +538,18 @@ if ($step == 1) {
$table->size[3] = '40%'; $table->size[3] = '40%';
$table->data[0][0] = __('Group'); $table->data[0][0] = __('Group');
$table->data[0][1] = print_select_groups(false, "AR", true, 'search_id_group', $id_group, $table->data[0][1] = html_print_select_groups(false, "AR", true, 'search_id_group', $id_group,
false, '', '', true); false, '', '', true);
$table->data[0][2] = __('Agent'); $table->data[0][2] = __('Agent');
$table->data[0][3] = print_select (get_group_agents ($id_group, false, "none"), $table->data[0][3] = html_print_select (get_group_agents ($id_group, false, "none"),
'search_id_agent', $id_agent, false, __('Select'), 0, true); 'search_id_agent', $id_agent, false, __('Select'), 0, true);
$table->data[0][3] .= '<span id="agent_loading" class="invisible">'; $table->data[0][3] .= '<span id="agent_loading" class="invisible">';
$table->data[0][3] .= print_image('images/spinner.png', true); $table->data[0][3] .= html_print_image('images/spinner.png', true);
$table->data[0][3] .= '</span>'; $table->data[0][3] .= '</span>';
print_table ($table); html_print_table ($table);
echo '<div id="alerts_loading" class="loading invisible">'; echo '<div id="alerts_loading" class="loading invisible">';
echo print_image('images/spinner.png', true); echo html_print_image('images/spinner.png', true);
echo __('Loading').'&hellip;'; echo __('Loading').'&hellip;';
echo '</div>'; echo '</div>';
@ -574,7 +574,7 @@ if ($step == 1) {
$data = array (); $data = array ();
$data[0] = '<a href="#" class="add_alert" id="add-'.$alert['id'].'" />'; $data[0] = '<a href="#" class="add_alert" id="add-'.$alert['id'].'" />';
$data[0] .= print_image('images/add.png', true); $data[0] .= html_print_image('images/add.png', true);
$data[0] .= '</a>'; $data[0] .= '</a>';
$data[1] = get_agentmodule_name ($alert['id_agent_module']); $data[1] = get_agentmodule_name ($alert['id_agent_module']);
$data[2] = alerts_get_alert_template_name ($alert['id_alert_template']); $data[2] = alerts_get_alert_template_name ($alert['id_alert_template']);
@ -583,16 +583,16 @@ if ($step == 1) {
} }
} }
print_table ($table_alerts); html_print_table ($table_alerts);
/* Pager for alert list using Javascript */ /* Pager for alert list using Javascript */
echo '<div id="alerts_pager" class="'.($id_agent ? '' : 'invisible ').'pager">'; echo '<div id="alerts_pager" class="'.($id_agent ? '' : 'invisible ').'pager">';
echo '<form>'; echo '<form>';
echo print_image("images/go_first.png", true, array("class" => "first")); echo html_print_image("images/go_first.png", true, array("class" => "first"));
echo print_image("images/go_previous.png", true, array("class" => "prev")); echo html_print_image("images/go_previous.png", true, array("class" => "prev"));
echo '<input type="text" class="pagedisplay" />'; echo '<input type="text" class="pagedisplay" />';
echo print_image("images/go_next.png", true, array("class" => "next")); echo html_print_image("images/go_next.png", true, array("class" => "next"));
echo print_image("images/go_last.png", true, array("class" => "last")); echo html_print_image("images/go_last.png", true, array("class" => "last"));
echo '<select class="pagesize invisible">'; echo '<select class="pagesize invisible">';
echo '<option selected="selected" value="'.$config['block_size'].'">'.$config['block_size'].'</option>'; echo '<option selected="selected" value="'.$config['block_size'].'">'.$config['block_size'].'</option>';
echo '</select>'; echo '</select>';
@ -600,7 +600,7 @@ if ($step == 1) {
echo '</div>'; echo '</div>';
echo '<div class="invisible">'; echo '<div class="invisible">';
print_select (alerts_compound_operations (), 'operations'); html_print_select (alerts_compound_operations (), 'operations');
echo '</div>'; echo '</div>';
} }

View File

@ -410,55 +410,55 @@ if ($step == 2) {
$table->data[0][0] = __('Days of week'); $table->data[0][0] = __('Days of week');
$table->data[0][1] = __('Mon'); $table->data[0][1] = __('Mon');
$table->data[0][1] .= print_checkbox ('monday', 1, $monday, true); $table->data[0][1] .= html_print_checkbox ('monday', 1, $monday, true);
$table->data[0][1] .= __('Tue'); $table->data[0][1] .= __('Tue');
$table->data[0][1] .= print_checkbox ('tuesday', 1, $tuesday, true); $table->data[0][1] .= html_print_checkbox ('tuesday', 1, $tuesday, true);
$table->data[0][1] .= __('Wed'); $table->data[0][1] .= __('Wed');
$table->data[0][1] .= print_checkbox ('wednesday', 1, $wednesday, true); $table->data[0][1] .= html_print_checkbox ('wednesday', 1, $wednesday, true);
$table->data[0][1] .= __('Thu'); $table->data[0][1] .= __('Thu');
$table->data[0][1] .= print_checkbox ('thursday', 1, $thursday, true); $table->data[0][1] .= html_print_checkbox ('thursday', 1, $thursday, true);
$table->data[0][1] .= __('Fri'); $table->data[0][1] .= __('Fri');
$table->data[0][1] .= print_checkbox ('friday', 1, $friday, true); $table->data[0][1] .= html_print_checkbox ('friday', 1, $friday, true);
$table->data[0][1] .= __('Sat'); $table->data[0][1] .= __('Sat');
$table->data[0][1] .= print_checkbox ('saturday', 1, $saturday, true); $table->data[0][1] .= html_print_checkbox ('saturday', 1, $saturday, true);
$table->data[0][1] .= __('Sun'); $table->data[0][1] .= __('Sun');
$table->data[0][1] .= print_checkbox ('sunday', 1, $sunday, true); $table->data[0][1] .= html_print_checkbox ('sunday', 1, $sunday, true);
$table->data[1][0] = __('Time from'); $table->data[1][0] = __('Time from');
$table->data[1][1] = print_input_text ('time_from', $time_from, '', 7, 7, $table->data[1][1] = html_print_input_text ('time_from', $time_from, '', 7, 7,
true); true);
$table->data[1][2] = __('Time to'); $table->data[1][2] = __('Time to');
$table->data[1][3] = print_input_text ('time_to', $time_to, '', 7, 7, $table->data[1][3] = html_print_input_text ('time_to', $time_to, '', 7, 7,
true); true);
$table->data['threshold'][0] = __('Time threshold'); $table->data['threshold'][0] = __('Time threshold');
$table->data['threshold'][1] = print_select ($threshold_values, $table->data['threshold'][1] = html_print_select ($threshold_values,
'threshold', $threshold_selected, '', '', '', true, false, false); 'threshold', $threshold_selected, '', '', '', true, false, false);
$table->data['threshold']['other_label'] = __('Other value'); $table->data['threshold']['other_label'] = __('Other value');
$table->data['threshold']['other_input'] = print_input_text ('other_threshold', $table->data['threshold']['other_input'] = html_print_input_text ('other_threshold',
$threshold, '', 5, 7, true); $threshold, '', 5, 7, true);
$table->data['threshold']['other_input'] .= ' '.__('seconds'); $table->data['threshold']['other_input'] .= ' '.__('seconds');
$table->data[3][0] = __('Min. number of alerts'); $table->data[3][0] = __('Min. number of alerts');
$table->data[3][1] = print_input_text ('min_alerts', $min_alerts, '', $table->data[3][1] = html_print_input_text ('min_alerts', $min_alerts, '',
5, 7, true); 5, 7, true);
$table->data[3][2] = __('Max. number of alerts'); $table->data[3][2] = __('Max. number of alerts');
$table->data[3][3] = print_input_text ('max_alerts', $max_alerts, '', $table->data[3][3] = html_print_input_text ('max_alerts', $max_alerts, '',
5, 7, true); 5, 7, true);
$table->data['field1'][0] = __('Field 1') . ui_print_help_icon ('alert_macros', true); $table->data['field1'][0] = __('Field 1') . ui_print_help_icon ('alert_macros', true);
$table->data['field1'][1] = print_input_text ('field1', $field1, '', 70, 255, true); $table->data['field1'][1] = html_print_input_text ('field1', $field1, '', 70, 255, true);
$table->data['field2'][0] = __('Field 2') . ui_print_help_icon ('alert_macros', true); $table->data['field2'][0] = __('Field 2') . ui_print_help_icon ('alert_macros', true);
$table->data['field2'][1] = print_input_text ('field2', $field2, '', 70, 255, true); $table->data['field2'][1] = html_print_input_text ('field2', $field2, '', 70, 255, true);
$table->data['field3'][0] = __('Field 3') . ui_print_help_icon ('alert_macros', true); $table->data['field3'][0] = __('Field 3') . ui_print_help_icon ('alert_macros', true);
$table->data['field3'][1] = print_textarea ('field3', 10, 30, $field3, '', true); $table->data['field3'][1] = html_print_textarea ('field3', 10, 30, $field3, '', true);
$table->data[4][0] = __('Default action'); $table->data[4][0] = __('Default action');
$usr_groups = implode(',', array_keys(get_user_groups($config['id_user'], 'LM', true))); $usr_groups = implode(',', array_keys(get_user_groups($config['id_user'], 'LM', true)));
$sql_query = sprintf('SELECT id, name FROM talert_actions WHERE id_group IN (%s) ORDER BY name', $usr_groups); $sql_query = sprintf('SELECT id, name FROM talert_actions WHERE id_group IN (%s) ORDER BY name', $usr_groups);
$table->data[4][1] = print_select_from_sql ($sql_query, $table->data[4][1] = html_print_select_from_sql ($sql_query,
'default_action', $default_action, '', __('None'), 0, 'default_action', $default_action, '', __('None'), 0,
true, false, false).ui_print_help_tip (__('In case you fill any Field 1, Field 2 or Field 3 above, those will replace the corresponding fields of this associated "Default action".'), true); true, false, false).ui_print_help_tip (__('In case you fill any Field 1, Field 2 or Field 3 above, those will replace the corresponding fields of this associated "Default action".'), true);
} else if ($step == 3) { } else if ($step == 3) {
@ -470,16 +470,16 @@ if ($step == 2) {
} }
$table->data[0][0] = __('Alert recovery'); $table->data[0][0] = __('Alert recovery');
$values = array (false => __('Disabled'), true => __('Enabled')); $values = array (false => __('Disabled'), true => __('Enabled'));
$table->data[0][1] = print_select ($values, $table->data[0][1] = html_print_select ($values,
'recovery_notify', $recovery_notify, '', '', '', true, false, 'recovery_notify', $recovery_notify, '', '', '', true, false,
false); false);
$table->data['field2'][0] = __('Field 2'); $table->data['field2'][0] = __('Field 2');
$table->data['field2'][1] = print_input_text ('field2_recovery', $table->data['field2'][1] = html_print_input_text ('field2_recovery',
$field2_recovery, '', 35, 255, true); $field2_recovery, '', 35, 255, true);
$table->data['field3'][0] = __('Field 3'); $table->data['field3'][0] = __('Field 3');
$table->data['field3'][1] = print_textarea ('field3_recovery', 10, 30, $table->data['field3'][1] = html_print_textarea ('field3_recovery', 10, 30,
$field3_recovery, '', true); $field3_recovery, '', true);
} else { } else {
/* Step 1 by default */ /* Step 1 by default */
@ -514,7 +514,7 @@ if ($step == 2) {
} }
$table->data[0][0] = __('Name'); $table->data[0][0] = __('Name');
$table->data[0][1] = print_input_text ('name', $name, '', 35, 255, true); $table->data[0][1] = html_print_input_text ('name', $name, '', 35, 255, true);
$table->data[0][1] .= "&nbsp;&nbsp;". __("Group"); $table->data[0][1] .= "&nbsp;&nbsp;". __("Group");
$groups = get_user_groups (); $groups = get_user_groups ();
@ -524,34 +524,34 @@ if ($step == 2) {
$display_all_group = true; $display_all_group = true;
else else
$display_all_group = false; $display_all_group = false;
$table->data[0][1] .= "&nbsp;".print_select_groups(false, "AR", $display_all_group, 'id_group', $id_group, '', '', 0, true); $table->data[0][1] .= "&nbsp;".html_print_select_groups(false, "AR", $display_all_group, 'id_group', $id_group, '', '', 0, true);
$table->data[1][0] = __('Description'); $table->data[1][0] = __('Description');
$table->data[1][1] = print_textarea ('description', 10, 30, $table->data[1][1] = html_print_textarea ('description', 10, 30,
$description, '', true); $description, '', true);
$table->data[2][0] = __('Priority'); $table->data[2][0] = __('Priority');
$table->data[2][1] = print_select (get_priorities (), 'priority', $table->data[2][1] = html_print_select (get_priorities (), 'priority',
$priority, '', 0, 0, true, false, false); $priority, '', 0, 0, true, false, false);
$table->data[3][0] = __('Condition type'); $table->data[3][0] = __('Condition type');
$table->data[3][1] = print_select (alerts_get_alert_templates_types (), 'type', $table->data[3][1] = html_print_select (alerts_get_alert_templates_types (), 'type',
$type, '', __('Select'), 0, true, false, false); $type, '', __('Select'), 0, true, false, false);
$table->data[3][1] .= '<span id="matches_value" '.($show_matches ? '' : 'style="display: none"').'>'; $table->data[3][1] .= '<span id="matches_value" '.($show_matches ? '' : 'style="display: none"').'>';
$table->data[3][1] .= '&nbsp;'.print_checkbox ('matches_value', 1, $matches, true); $table->data[3][1] .= '&nbsp;'.html_print_checkbox ('matches_value', 1, $matches, true);
$table->data[3][1] .= print_label (__('Trigger when matches the value'), $table->data[3][1] .= html_print_label (__('Trigger when matches the value'),
'checkbox-matches_value', true); 'checkbox-matches_value', true);
$table->data[3][1] .= '</span>'; $table->data[3][1] .= '</span>';
$table->data['value'][0] = __('Value'); $table->data['value'][0] = __('Value');
$table->data['value'][1] = print_input_text ('value', $value, '', $table->data['value'][1] = html_print_input_text ('value', $value, '',
35, 255, true); 35, 255, true);
$table->data['value'][1] .= '&nbsp;<span id="regex_ok">'; $table->data['value'][1] .= '&nbsp;<span id="regex_ok">';
$table->data['value'][1] .= print_image ('images/suc.png', true, $table->data['value'][1] .= html_print_image ('images/suc.png', true,
array ('style' => 'display:none', array ('style' => 'display:none',
'id' => 'regex_good', 'id' => 'regex_good',
'title' => __('The regular expression is valid'))); 'title' => __('The regular expression is valid')));
$table->data['value'][1] .= print_image ('images/err.png', true, $table->data['value'][1] .= html_print_image ('images/err.png', true,
array ('style' => 'display:none', array ('style' => 'display:none',
'id' => 'regex_bad', 'id' => 'regex_bad',
'title' => __('The regular expression is not valid'))); 'title' => __('The regular expression is not valid')));
@ -559,10 +559,10 @@ if ($step == 2) {
//Min first, then max, that's more logical //Min first, then max, that's more logical
$table->data['min'][0] = __('Min.'); $table->data['min'][0] = __('Min.');
$table->data['min'][1] = print_input_text ('min', $min, '', 5, 255, true); $table->data['min'][1] = html_print_input_text ('min', $min, '', 5, 255, true);
$table->data['max'][0] = __('Max.'); $table->data['max'][0] = __('Max.');
$table->data['max'][1] = print_input_text ('max', $max, '', 5, 255, true); $table->data['max'][1] = html_print_input_text ('max', $max, '', 5, 255, true);
$table->data['example'][1] = ui_print_alert_template_example ($id, true, false); $table->data['example'][1] = ui_print_alert_template_example ($id, true, false);
$table->colspan['example'][1] = 2; $table->colspan['example'][1] = 2;
@ -574,21 +574,21 @@ if ($step >= LAST_STEP) {
} else { } else {
echo '<form method="post">'; echo '<form method="post">';
} }
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
if ($id) { if ($id) {
print_input_hidden ('id', $id); html_print_input_hidden ('id', $id);
print_input_hidden ('update_template', 1); html_print_input_hidden ('update_template', 1);
} else { } else {
print_input_hidden ('create_template', 1); html_print_input_hidden ('create_template', 1);
} }
if ($step >= LAST_STEP) { if ($step >= LAST_STEP) {
print_submit_button (__('Finish'), 'finish', false, 'class="sub upd"'); html_print_submit_button (__('Finish'), 'finish', false, 'class="sub upd"');
} else { } else {
print_input_hidden ('step', $step + 1); html_print_input_hidden ('step', $step + 1);
print_submit_button (__('Next'), 'next', false, 'class="sub next"'); html_print_submit_button (__('Next'), 'next', false, 'class="sub next"');
} }
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -60,7 +60,7 @@ $table->data[1][1] = $row["first_date"];
$table->data[2][0] = '<b>'.__('Latest data').':</b>'; $table->data[2][0] = '<b>'.__('Latest data').':</b>';
$table->data[2][1] = $row["latest_date"]; $table->data[2][1] = $row["latest_date"];
print_table ($table); html_print_table ($table);
unset ($table); unset ($table);
echo '<h3>'.__('Purge data').'</h3>'; echo '<h3>'.__('Purge data').'</h3>';
@ -79,9 +79,9 @@ $fields[$time - 259200] = __('Purge event data over 3 days');
$fields[$time - 86400] = __('Purge event data over 1 day'); $fields[$time - 86400] = __('Purge event data over 1 day');
$fields[$time] = __('Purge all event data'); $fields[$time] = __('Purge all event data');
print_select ($fields, "date_purge", '', '', '', '0', false, false, false, "w255"); html_print_select ($fields, "date_purge", '', '', '', '0', false, false, false, "w255");
echo '</td><td class="datos">'; echo '</td><td class="datos">';
print_submit_button (__('Do it!'),'purgedb', false, 'class="sub wand" onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;"'); html_print_submit_button (__('Do it!'),'purgedb', false, 'class="sub wand" onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;"');
echo '</td></tr></table></form>'; echo '</td></tr></table></form>';
?> ?>

View File

@ -58,7 +58,7 @@ echo '<h3>'.__('Packets per agent').'</h3>';
echo grafico_db_agentes_paquetes2(700, 300); echo grafico_db_agentes_paquetes2(700, 300);
echo '</table>'; echo '</table>';
echo '<a href="#" onClick="toggleDiv(\'db_info_data\'); toggleDiv(\'db_info_graph\'); return false;"><b>'.__('Press here to get database information as text').'</b>&nbsp;' . print_image("images/down.png", true, array("alt" => "down", "title" => "down")) . '</a></div>'; echo '<a href="#" onClick="toggleDiv(\'db_info_data\'); toggleDiv(\'db_info_graph\'); return false;"><b>'.__('Press here to get database information as text').'</b>&nbsp;' . html_print_image("images/down.png", true, array("alt" => "down", "title" => "down")) . '</a></div>';
echo '<div id="db_info_data" style="display:none">'; echo '<div id="db_info_data" style="display:none">';
//Merged from db_info_data.php because the queries are the same, so the cache //Merged from db_info_data.php because the queries are the same, so the cache
@ -89,7 +89,7 @@ foreach ($count as $agent_id => $value) {
array_unshift ($table->data, $data); array_unshift ($table->data, $data);
} }
print_table ($table); html_print_table ($table);
echo '<a href="#" onClick="toggleDiv(\'db_info_graph\'); toggleDiv(\'db_info_data\'); return false;">'.__('Press here to get database information as a graph').'</a></div>'; echo '<a href="#" onClick="toggleDiv(\'db_info_graph\'); toggleDiv(\'db_info_data\'); return false;">'.__('Press here to get database information as a graph').'</a></div>';
?> ?>

View File

@ -157,10 +157,10 @@ $agents[0] = __('All agents');
echo '<form action="index.php?sec=gdbman&sec2=godmode/db/db_purge" method="post">'; echo '<form action="index.php?sec=gdbman&sec2=godmode/db/db_purge" method="post">';
echo '<div style="width:100%;">'; echo '<div style="width:100%;">';
print_select ($agents, "agent", $id_agent, "this.form.submit();", "", "", false, false, false); html_print_select ($agents, "agent", $id_agent, "this.form.submit();", "", "", false, false, false);
ui_print_help_tip (__("Select the agent you want information about")); ui_print_help_tip (__("Select the agent you want information about"));
echo '<noscript>'; echo '<noscript>';
print_submit_button (__('Get data'), 'purgedb_ag', false, 'class="sub upd"'); html_print_submit_button (__('Get data'), 'purgedb_ag', false, 'class="sub upd"');
ui_print_help_tip (__("Click here to get the data from the agent specified in the select box")); ui_print_help_tip (__("Click here to get the data from the agent specified in the select box"));
echo '</noscript><br />'; echo '</noscript><br />';
@ -233,7 +233,7 @@ $table->data[5][1] = format_numeric($data["1day"]);
$table->data[6][0] = '<strong>'.__('Total number of packets').'</strong>'; $table->data[6][0] = '<strong>'.__('Total number of packets').'</strong>';
$table->data[6][1] = '<strong>'.format_numeric($data["total"]).'</strong>'; $table->data[6][1] = '<strong>'.format_numeric($data["total"]).'</strong>';
print_table ($table); html_print_table ($table);
echo '<br />'; echo '<br />';
echo '<h3>'.__('Purge data').'</h3>'; echo '<h3>'.__('Purge data').'</h3>';
@ -249,12 +249,12 @@ $times[$time["3day"]] = __('Purge data over 3 days');
$times[$time["1day"]] = __('Purge data over 1 day'); $times[$time["1day"]] = __('Purge data over 1 day');
$times[$time["all"]] = __('All data until now'); $times[$time["all"]] = __('All data until now');
$table->data[0][0] = print_select ($times, 'date_purge', '', '', '', '', $table->data[0][0] = html_print_select ($times, 'date_purge', '', '', '', '',
true, false, false); true, false, false);
$table->data[0][1] = print_submit_button (__('Purge'), "purgedb", false, $table->data[0][1] = html_print_submit_button (__('Purge'), "purgedb", false,
'class="sub wand"', true); 'class="sub wand"', true);
print_table ($table); html_print_table ($table);
echo '</form>'; echo '</form>';
?> ?>

View File

@ -70,11 +70,11 @@ echo '<b>'.__('Source agent').'</b><br /><br />';
$agent_selected = get_parameter_post ("origen", 0); $agent_selected = get_parameter_post ("origen", 0);
$agents = get_group_agents (array_keys (get_user_groups ($config["id_user"], "AW"))); $agents = get_group_agents (array_keys (get_user_groups ($config["id_user"], "AW")));
print_select ($agents, "origen", $agent_selected, 'javascript:this.form.update_agent.click();', __('No agent selected'), '0', false, false, false, 'w130'); html_print_select ($agents, "origen", $agent_selected, 'javascript:this.form.update_agent.click();', __('No agent selected'), '0', false, false, false, 'w130');
echo '&nbsp;&nbsp;'; echo '&nbsp;&nbsp;';
print_submit_button (__('Get Info'), 'update_agent', false, 'style="display:none;"'); html_print_submit_button (__('Get Info'), 'update_agent', false, 'style="display:none;"');
echo '<br /><br />'; echo '<br /><br />';
echo '<b>'.__('Modules').'</b><br /><br />'; echo '<b>'.__('Modules').'</b><br /><br />';
@ -82,7 +82,7 @@ echo '<b>'.__('Modules').'</b><br /><br />';
$module_selected = get_parameter_post ("origen", array ()); $module_selected = get_parameter_post ("origen", array ());
$modules = get_agent_modules ($module_selected, false, 'delete_pending != 1'); $modules = get_agent_modules ($module_selected, false, 'delete_pending != 1');
print_select ($modules, "origen_modulo[]", $module_selected, '', '', '0', false, true, false, 'w130'); html_print_select ($modules, "origen_modulo[]", $module_selected, '', '', '0', false, true, false, 'w130');
echo '</div>'; //Left div echo '</div>'; //Left div
@ -90,17 +90,17 @@ echo '<div style="float:left; width:250px;"><b>'.__('Purge data out of these lim
echo '<table><tr><td>'; echo '<table><tr><td>';
echo __('Minimum').': '; echo __('Minimum').': ';
echo '</td><td>'; echo '</td><td>';
print_input_text ("min", 0, __('Minimum'), 4, 0, false); html_print_input_text ("min", 0, __('Minimum'), 4, 0, false);
echo '</td></tr>'; echo '</td></tr>';
echo '<tr><td>'; echo '<tr><td>';
echo __('Maximum').': '; echo __('Maximum').': ';
echo '</td><td>'; echo '</td><td>';
print_input_text ("max", 0, __('Maximum'), 4, 0, false); html_print_input_text ("max", 0, __('Maximum'), 4, 0, false);
echo '</td></tr>'; echo '</td></tr>';
echo '</table>'; echo '</table>';
echo '</div>'; echo '</div>';
echo '<div style="clear:both;">&nbsp;</div>'; echo '<div style="clear:both;">&nbsp;</div>';
print_submit_button (__('Delete'), 'eliminar', false, 'class="sub delete" onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;"'); html_print_submit_button (__('Delete'), 'eliminar', false, 'class="sub delete" onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;"');
echo '</td></tr></table>'; echo '</td></tr></table>';
?> ?>

View File

@ -102,14 +102,14 @@ echo __('Pandora FMS Sanity tool is used to remove bad database structure data,
echo "<br><br>"; echo "<br><br>";
echo "<b><a href='index.php?sec=gdbman&sec2=godmode/db/db_sanity&sanity=1'>"; echo "<b><a href='index.php?sec=gdbman&sec2=godmode/db/db_sanity&sanity=1'>";
echo print_image('images/status_away.png', true) . "&nbsp;&nbsp;"; echo html_print_image('images/status_away.png', true) . "&nbsp;&nbsp;";
echo __('Sanitize my database now'); echo __('Sanitize my database now');
echo "</a></b>"; echo "</a></b>";
echo "<br><br>"; echo "<br><br>";
echo "<b><a href='index.php?sec=gdbman&sec2=godmode/db/db_sanity&sanity=2'>"; echo "<b><a href='index.php?sec=gdbman&sec2=godmode/db/db_sanity&sanity=2'>";
echo print_image('images/status_away.png', true) . "&nbsp;&nbsp;"; echo html_print_image('images/status_away.png', true) . "&nbsp;&nbsp;";
echo __('Delete non-initialized modules now'); echo __('Delete non-initialized modules now');
echo "</a></b>"; echo "</a></b>";

View File

@ -182,11 +182,11 @@ $table->data = array();
foreach ($extensions as $file => $extension) { foreach ($extensions as $file => $extension) {
$data = array(); $data = array();
$on = print_image("images/dot_green.png", true); $on = html_print_image("images/dot_green.png", true);
$off = print_image("images/dot_red.png", true); $off = html_print_image("images/dot_red.png", true);
if (!$extension['enabled']) { if (!$extension['enabled']) {
$on = print_image("images/dot_green.disabled.png", true); $on = html_print_image("images/dot_green.disabled.png", true);
$off = print_image("images/dot_red.disabled.png", true); $off = html_print_image("images/dot_red.disabled.png", true);
$data[] = '<i style="color: grey;">' . $file . '</i>'; $data[] = '<i style="color: grey;">' . $file . '</i>';
} }
else { else {
@ -250,15 +250,15 @@ foreach ($extensions as $file => $extension) {
} }
if (!$extension['enabled']) { if (!$extension['enabled']) {
$data[] = '<a title="' . __('Delete') . '" href="index.php?sec=gextensions&amp;sec2=godmode/extensions&enterprise=' . (int)$extension['enterprise'] . '&delete='.$file.'" class="mn">' . print_image("images/cross.disabled.png", true) . '</a>' . $data[] = '<a title="' . __('Delete') . '" href="index.php?sec=gextensions&amp;sec2=godmode/extensions&enterprise=' . (int)$extension['enterprise'] . '&delete='.$file.'" class="mn">' . html_print_image("images/cross.disabled.png", true) . '</a>' .
' <a title="' . __('Enable') . '" href="index.php?sec=gextensions&amp;sec2=godmode/extensions&enterprise=' . (int)$extension['enterprise'] . '&enabled='.$file.'" class="mn">' . print_image("images/lightbulb_off.png", true) . '</a>'; ' <a title="' . __('Enable') . '" href="index.php?sec=gextensions&amp;sec2=godmode/extensions&enterprise=' . (int)$extension['enterprise'] . '&enabled='.$file.'" class="mn">' . html_print_image("images/lightbulb_off.png", true) . '</a>';
} }
else { else {
$data[] = '<a title="' . __('Delete') . '" href="index.php?sec=gextensions&amp;sec2=godmode/extensions&enterprise=' . (int)$extension['enterprise'] . '&delete='.$file.'" class="mn">' . print_image("images/cross.png", true) . '</a>' . $data[] = '<a title="' . __('Delete') . '" href="index.php?sec=gextensions&amp;sec2=godmode/extensions&enterprise=' . (int)$extension['enterprise'] . '&delete='.$file.'" class="mn">' . html_print_image("images/cross.png", true) . '</a>' .
' <a title="' . __('Disable') . '" href="index.php?sec=gextensions&amp;sec2=godmode/extensions&enterprise=' . (int)$extension['enterprise'] . '&disabled='.$file.'" class="mn">' . print_image("images/lightbulb.png", true) . '</a>'; ' <a title="' . __('Disable') . '" href="index.php?sec=gextensions&amp;sec2=godmode/extensions&enterprise=' . (int)$extension['enterprise'] . '&disabled='.$file.'" class="mn">' . html_print_image("images/lightbulb.png", true) . '</a>';
} }
$table->data[] = $data; $table->data[] = $data;
} }
print_table ($table); html_print_table ($table);
?> ?>

View File

@ -56,10 +56,10 @@ function updateArrowLayers() {
$('.up_arrow', layerObj).html(''); $('.up_arrow', layerObj).html('');
} }
else { else {
$('.up_arrow', layerObj).html('<a class="up_arrow" href="javascript: upLayer(' + numLayer + ');"><?php print_image ("images/up.png"); ?></a>'); $('.up_arrow', layerObj).html('<a class="up_arrow" href="javascript: upLayer(' + numLayer + ');"><?php html_print_image ("images/up.png"); ?></a>');
} }
$('.down_arrow', layerObj).html('<a class="down_arrow" href="javascript: downLayer(' + numLayer + ');"><?php print_image ("images/down.png"); ?></a>'); $('.down_arrow', layerObj).html('<a class="down_arrow" href="javascript: downLayer(' + numLayer + ');"><?php html_print_image ("images/down.png"); ?></a>');
count++; count++;
@ -141,20 +141,20 @@ switch ($action) {
$arrayLayers[] = JSON_decode($layer, true); $arrayLayers[] = JSON_decode($layer, true);
} }
$invalidFields = validateMapData($map_name, $map_zoom_level, $invalidFields = gis_validate_map_data($map_name, $map_zoom_level,
$map_initial_longitude, $map_initial_latitude, $map_initial_altitude, $map_initial_longitude, $map_initial_latitude, $map_initial_altitude,
$map_default_longitude, $map_default_latitude, $map_default_altitude, $map_default_longitude, $map_default_latitude, $map_default_altitude,
$map_connection_list, $map_levels_zoom); $map_connection_list, $map_levels_zoom);
if (empty($invalidFields) && get_parameter('map_connection_list') != "") { if (empty($invalidFields) && get_parameter('map_connection_list') != "") {
saveMap($map_name, $map_initial_longitude, $map_initial_latitude, gis_save_map($map_name, $map_initial_longitude, $map_initial_latitude,
$map_initial_altitude, $map_zoom_level, $map_background, $map_initial_altitude, $map_zoom_level, $map_background,
$map_default_longitude, $map_default_latitude, $map_default_altitude, $map_default_longitude, $map_default_latitude, $map_default_altitude,
$map_group_id, $map_connection_list, $arrayLayers); $map_group_id, $map_connection_list, $arrayLayers);
$mapCreatedOk = true; $mapCreatedOk = true;
} }
else { else {
print_input_hidden('action', 'save_new'); html_print_input_hidden('action', 'save_new');
$mapCreatedOk = false; $mapCreatedOk = false;
} }
$layer_list = $arrayLayers; $layer_list = $arrayLayers;
@ -163,7 +163,7 @@ switch ($action) {
__('Map could not be created')); __('Map could not be created'));
break; break;
case 'new_map': case 'new_map':
print_input_hidden('action', 'save_new'); html_print_input_hidden('action', 'save_new');
$map_name = ''; $map_name = '';
$map_initial_longitude = ''; $map_initial_longitude = '';
@ -182,10 +182,10 @@ switch ($action) {
case 'edit_map': case 'edit_map':
$idMap = get_parameter('map_id'); $idMap = get_parameter('map_id');
print_input_hidden('action', 'update_saved'); html_print_input_hidden('action', 'update_saved');
print_input_hidden('map_id', $idMap); html_print_input_hidden('map_id', $idMap);
$mapData = getMapData($idMap); $mapData = gis_get_map_data($idMap);
$map_name = $mapData['map']['map_name']; $map_name = $mapData['map']['map_name'];
$map_group_id = $mapData['map']['group_id']; $map_group_id = $mapData['map']['group_id'];
@ -199,7 +199,7 @@ switch ($action) {
$map_default_altitude = $mapData['map']['default_altitude']; $map_default_altitude = $mapData['map']['default_altitude'];
$map_connection_list = $mapData['connections']; $map_connection_list = $mapData['connections'];
$map_levels_zoom = getNumZoomLevelsOfConnectionDefault($map_connection_list); $map_levels_zoom = gis_get_num_zoom_levels_connection_default($map_connection_list);
//$map_levels_zoom = get_parameter('map_levels_zoom'); //$map_levels_zoom = get_parameter('map_levels_zoom');
@ -269,14 +269,14 @@ switch ($action) {
$arrayLayers[] = JSON_decode($layer, true); $arrayLayers[] = JSON_decode($layer, true);
} }
$invalidFields = validateMapData($map_name, $map_zoom_level, $invalidFields = gis_validate_map_data($map_name, $map_zoom_level,
$map_initial_longitude, $map_initial_latitude, $map_initial_altitude, $map_initial_longitude, $map_initial_latitude, $map_initial_altitude,
$map_default_longitude, $map_default_latitude, $map_default_altitude, $map_default_longitude, $map_default_latitude, $map_default_altitude,
$map_connection_list, $map_levels_zoom); $map_connection_list, $map_levels_zoom);
if (empty($invalidFields) && get_parameter('map_connection_list') != "") { if (empty($invalidFields) && get_parameter('map_connection_list') != "") {
//TODO //TODO
updateMap($idMap, $map_name, $map_initial_longitude, $map_initial_latitude, gis_update_map($idMap, $map_name, $map_initial_longitude, $map_initial_latitude,
$map_initial_altitude, $map_zoom_level, $map_background, $map_initial_altitude, $map_zoom_level, $map_background,
$map_default_longitude, $map_default_latitude, $map_default_altitude, $map_default_longitude, $map_default_latitude, $map_default_altitude,
$map_group_id, $map_connection_list, $arrayLayers); $map_group_id, $map_connection_list, $arrayLayers);
@ -284,7 +284,7 @@ switch ($action) {
} }
else { else {
print_input_hidden('action', 'update_saved'); html_print_input_hidden('action', 'update_saved');
$mapCreatedOk = false; $mapCreatedOk = false;
} }
$layer_list = $arrayLayers; $layer_list = $arrayLayers;
@ -292,8 +292,8 @@ switch ($action) {
ui_print_result_message ($mapCreatedOk, __('Map successfully update'), ui_print_result_message ($mapCreatedOk, __('Map successfully update'),
__('Map could not be update')); __('Map could not be update'));
print_input_hidden('action', 'update_saved'); html_print_input_hidden('action', 'update_saved');
print_input_hidden('map_id', $idMap); html_print_input_hidden('map_id', $idMap);
break; break;
} }
@ -302,13 +302,13 @@ $table->data = array ();
$table->valign[0] = 'top'; $table->valign[0] = 'top';
$table->data[0][0] = __('Map Name') . ui_print_help_tip (__('Descriptive name for the map'), true). ':'; $table->data[0][0] = __('Map Name') . ui_print_help_tip (__('Descriptive name for the map'), true). ':';
$table->data[0][1] = print_input_text ('map_name', $map_name, '', 30, 60, true); $table->data[0][1] = html_print_input_text ('map_name', $map_name, '', 30, 60, true);
$table->rowspan[0][2] = 9; $table->rowspan[0][2] = 9;
$iconError = ''; $iconError = '';
if (isset($invalidFields['map_connection_list'])) { if (isset($invalidFields['map_connection_list'])) {
if ($invalidFields['map_connection_list']) { if ($invalidFields['map_connection_list']) {
$iconError = print_image("images/dot_red.png", true); $iconError = html_print_image("images/dot_red.png", true);
} }
} }
@ -324,14 +324,14 @@ $table->data[1][0] = __("Add Map connection") . ui_print_help_tip (__('At least
$table->data[1][1] = "<table class='databox' border='0' id='map_connection'> $table->data[1][1] = "<table class='databox' border='0' id='map_connection'>
<tr> <tr>
<td> <td>
" . print_select($listConnection, 'map_connection', '', '', '', '0', true) ." " . html_print_select($listConnection, 'map_connection', '', '', '', '0', true) ."
</td> </td>
<td> <td>
<a href='javascript: addConnectionMap();'>" . print_image ("images/add.png", true) . "</a> <a href='javascript: addConnectionMap();'>" . html_print_image ("images/add.png", true) . "</a>
<input type='hidden' name='map_connection_list' value='' id='map_connection_list' /> <input type='hidden' name='map_connection_list' value='' id='map_connection_list' />
<input type='hidden' name='layer_list' value='' id='layer_list' /> <input type='hidden' name='layer_list' value='' id='layer_list' />
</td> </td>
</tr> " . addConectionMapsInForm($map_connection_list) . " </tr> " . gis_add_conection_maps_in_form($map_connection_list) . "
</table>"; </table>";
$own_info = get_user_info($config['id_user']); $own_info = get_user_info($config['id_user']);
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM")) if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
@ -339,30 +339,30 @@ if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
else else
$display_all_group = false; $display_all_group = false;
$table->data[2][0] = __('Group') . ui_print_help_tip (__('Group that owns the map'), true). ':'; $table->data[2][0] = __('Group') . ui_print_help_tip (__('Group that owns the map'), true). ':';
$table->data[2][1] = print_select_groups(false, 'IW', $display_all_group, 'map_group_id', $map_group_id, '', '', '', true); $table->data[2][1] = html_print_select_groups(false, 'IW', $display_all_group, 'map_group_id', $map_group_id, '', '', '', true);
$table->data[3][0] = __('Default zoom') . ui_print_help_tip (__('Default zoom level when opening the map'), true). ':'; $table->data[3][0] = __('Default zoom') . ui_print_help_tip (__('Default zoom level when opening the map'), true). ':';
$table->data[3][1] = print_input_text ('map_zoom_level', $map_zoom_level, '', 2, 4, true) . print_input_hidden('map_levels_zoom', $map_levels_zoom, true); $table->data[3][1] = html_print_input_text ('map_zoom_level', $map_zoom_level, '', 2, 4, true) . html_print_input_hidden('map_levels_zoom', $map_levels_zoom, true);
$table->data[4][0] = __('Center Longitude') . ':'; $table->data[4][0] = __('Center Longitude') . ':';
$table->data[4][1] = print_input_text ('map_initial_longitude', $map_initial_longitude, '', 4, 8, true); $table->data[4][1] = html_print_input_text ('map_initial_longitude', $map_initial_longitude, '', 4, 8, true);
$table->data[5][0] = __('Center Latitude') . ':'; $table->data[5][0] = __('Center Latitude') . ':';
$table->data[5][1] = print_input_text ('map_initial_latitude', $map_initial_latitude, '', 4, 8, true); $table->data[5][1] = html_print_input_text ('map_initial_latitude', $map_initial_latitude, '', 4, 8, true);
$table->data[6][0] = __('Center Altitude') . ':'; $table->data[6][0] = __('Center Altitude') . ':';
$table->data[6][1] = print_input_text ('map_initial_altitude', $map_initial_altitude, '', 4, 8, true); $table->data[6][1] = html_print_input_text ('map_initial_altitude', $map_initial_altitude, '', 4, 8, true);
$table->data[7][0] = __('Default Longitude') . ':'; $table->data[7][0] = __('Default Longitude') . ':';
$table->data[7][1] = print_input_text ('map_default_longitude', $map_default_longitude, '', 4, 8, true); $table->data[7][1] = html_print_input_text ('map_default_longitude', $map_default_longitude, '', 4, 8, true);
$table->data[8][0] = __('Default Latitude') . ':'; $table->data[8][0] = __('Default Latitude') . ':';
$table->data[8][1] = print_input_text ('map_default_latitude', $map_default_latitude, '', 4, 8, true); $table->data[8][1] = html_print_input_text ('map_default_latitude', $map_default_latitude, '', 4, 8, true);
$table->data[9][0] = __('Default Altitude') . ':'; $table->data[9][0] = __('Default Altitude') . ':';
$table->data[9][1] = print_input_text ('map_default_altitude', $map_default_altitude, '', 4, 8, true); $table->data[9][1] = html_print_input_text ('map_default_altitude', $map_default_altitude, '', 4, 8, true);
print_table($table); html_print_table($table);
echo "<h3>" . __('Layers') . ui_print_help_tip (__('Each layer can show agents from one group or the agents added to that layer or both.'), true). "</h3>"; echo "<h3>" . __('Layers') . ui_print_help_tip (__('Each layer can show agents from one group or the agents added to that layer or both.'), true). "</h3>";
@ -372,22 +372,22 @@ $table->valign[0] = 'top';
$table->valign[1] = 'top'; $table->valign[1] = 'top';
$table->data[0][0] = "<h4>" .__('List of layers') . ui_print_help_tip (__('It is possible to edit, delete and reorder the layers.'), true) . "</h4>"; $table->data[0][0] = "<h4>" .__('List of layers') . ui_print_help_tip (__('It is possible to edit, delete and reorder the layers.'), true) . "</h4>";
$table->data[0][1] = '<div style="text-align: right;">' . print_button(__('New layer'), 'new_layer', false, 'newLayer();', 'class="sub add"', true) . '</div>'; $table->data[0][1] = '<div style="text-align: right;">' . html_print_button(__('New layer'), 'new_layer', false, 'newLayer();', 'class="sub add"', true) . '</div>';
$table->data[1][0] = '<table class="databox" border="0" cellpadding="4" cellspacing="4" id="list_layers">' . $table->data[1][0] = '<table class="databox" border="0" cellpadding="4" cellspacing="4" id="list_layers">' .
addLayerList($layer_list) . gis_add_layer_list($layer_list) .
'</table>'; '</table>';
$table->data[1][1] = '<div id="form_layer"> $table->data[1][1] = '<div id="form_layer">
<table id="form_layer_table" class="databox" border="0" cellpadding="4" cellspacing="4" style="visibility: hidden;"> <table id="form_layer_table" class="databox" border="0" cellpadding="4" cellspacing="4" style="visibility: hidden;">
<tr> <tr>
<td>' . __('Layer name') . ':</td> <td>' . __('Layer name') . ':</td>
<td>' . print_input_text ('layer_name_form', '', '', 20, 40, true) . '</td> <td>' . html_print_input_text ('layer_name_form', '', '', 20, 40, true) . '</td>
<td>' . __('Visible') . ':</td> <td>' . __('Visible') . ':</td>
<td>' . print_checkbox('layer_visible_form', 1, true, true) . '</td> <td>' . html_print_checkbox('layer_visible_form', 1, true, true) . '</td>
</tr> </tr>
<tr> <tr>
<td>' . __('Show agents from group') . ':</td> <td>' . __('Show agents from group') . ':</td>
<td colspan="3">' . print_select_groups(false, 'IW', $display_all_group, 'layer_group_form', '-1', '', __('None'), '-1', true) . '</td> <td colspan="3">' . html_print_select_groups(false, 'IW', $display_all_group, 'layer_group_form', '-1', '', __('None'), '-1', true) . '</td>
</tr> </tr>
<tr> <tr>
<td colspan="4"><hr /></td> <td colspan="4"><hr /></td>
@ -395,10 +395,10 @@ $table->data[1][1] = '<div id="form_layer">
<tr> <tr>
<td>' . __('Agent') . ':</td> <td>' . __('Agent') . ':</td>
<td colspan="3"> <td colspan="3">
' . print_input_text_extended ('id_agent', __('Select'), 'text_id_agent', '', 30, 100, false, '', ' . html_print_input_text_extended ('id_agent', __('Select'), 'text_id_agent', '', 30, 100, false, '',
array('style' => 'background: url(images/lightning.png) no-repeat right;'), true) array('style' => 'background: url(images/lightning.png) no-repeat right;'), true)
. '<a href="#" class="tip">&nbsp;<span>' . __("Type at least two characters to search") . '</span></a>&nbsp;' . . '<a href="#" class="tip">&nbsp;<span>' . __("Type at least two characters to search") . '</span></a>&nbsp;' .
print_button(__('Add agent'), 'add_agent', true, 'addAgentLayer();', 'class="sub add"', true) .' html_print_button(__('Add agent'), 'add_agent', true, 'addAgentLayer();', 'class="sub add"', true) .'
</td> </td>
</tr> </tr>
<tr> <tr>
@ -410,14 +410,14 @@ $table->data[1][1] = '<div id="form_layer">
</tr> </tr>
<tr> <tr>
<td align="right" colspan="4">' . <td align="right" colspan="4">' .
print_button(__('Save Layer'), 'save_layer', false, 'saveLayer();', 'class="sub wand"', true) . ' html_print_button(__('Save Layer'), 'save_layer', false, 'saveLayer();', 'class="sub wand"', true) . '
' . print_input_hidden('layer_edit_id_form', '', true) . ' ' . html_print_input_hidden('layer_edit_id_form', '', true) . '
</td> </td>
</tr> </tr>
</table> </table>
</div>'; </div>';
print_table($table); html_print_table($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
@ -426,14 +426,14 @@ switch ($action) {
case 'edit_map': case 'edit_map':
case 'update_saved': case 'update_saved':
if (!empty($invalidFields)) { if (!empty($invalidFields)) {
print_submit_button(_('Save map'), 'save_button', false, 'class="sub wand"'); html_print_submit_button(_('Save map'), 'save_button', false, 'class="sub wand"');
} }
else { else {
print_submit_button(_('Update map'), 'update_button', false, 'class="sub upd"'); html_print_submit_button(_('Update map'), 'update_button', false, 'class="sub upd"');
} }
break; break;
case 'new_map': case 'new_map':
print_submit_button(_('Save map'), 'save_button', false, 'class="sub wand"'); html_print_submit_button(_('Save map'), 'save_button', false, 'class="sub wand"');
break; break;
} }
echo '</div>'; echo '</div>';
@ -447,9 +447,9 @@ echo "</form>";
<table style="visibility: hidden;"> <table style="visibility: hidden;">
<tbody id="chunk_map_connection"> <tbody id="chunk_map_connection">
<tr class="row_0"> <tr class="row_0">
<td><?php print_input_text ('map_connection_name', $map_name, '', 20, 40, false, true); ?></td> <td><?php html_print_input_text ('map_connection_name', $map_name, '', 20, 40, false, true); ?></td>
<td><?php print_radio_button_extended('map_connection_default', '', '', true, false, 'changeDefaultConection(this.value)', '');?></td> <td><?php html_print_radio_button_extended('map_connection_default', '', '', true, false, 'changeDefaultConection(this.value)', '');?></td>
<td><a id="delete_row" href="none"><?php print_image("images/cross.png", false, array("alt" => ""));?></a></td> <td><a id="delete_row" href="none"><?php html_print_image("images/cross.png", false, array("alt" => ""));?></a></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -460,7 +460,7 @@ echo "</form>";
<td class="col1">XXXX</td> <td class="col1">XXXX</td>
<td class="col2"> <td class="col2">
<input type="hidden" id="name_agent" name="name_agent" value="" /> <input type="hidden" id="name_agent" name="name_agent" value="" />
<a id="delete_row" href="none"><?php print_image("images/cross.png", false, array("alt" => ""));?></a> <a id="delete_row" href="none"><?php html_print_image("images/cross.png", false, array("alt" => ""));?></a>
</td> </td>
</tr> </tr>
</tbody> </tbody>
@ -470,14 +470,14 @@ echo "</form>";
<tbody id="chuck_layer_item"> <tbody id="chuck_layer_item">
<tr> <tr>
<td class="col1">XXXXXXXXXXXXXXXXXX</td> <td class="col1">XXXXXXXXXXXXXXXXXX</td>
<td class="up_arrow"><a id="up_arrow" href="javascript: upLayer();"><?php print_image("images/up.png", false, array("alt" => ""));?></a></td> <td class="up_arrow"><a id="up_arrow" href="javascript: upLayer();"><?php html_print_image("images/up.png", false, array("alt" => ""));?></a></td>
<td class="down_arrow"><a id="down_arrow" href="javascript: downLayer();"><?php print_image("images/down.png", false, array("alt" => ""));?></a></td> <td class="down_arrow"><a id="down_arrow" href="javascript: downLayer();"><?php html_print_image("images/down.png", false, array("alt" => ""));?></a></td>
<td class="col3"> <td class="col3">
<a id="edit_layer" href="javascript: editLayer(none);"><?php print_image("images/config.png", false, array("alt" => ""));?></a> <a id="edit_layer" href="javascript: editLayer(none);"><?php html_print_image("images/config.png", false, array("alt" => ""));?></a>
</td> </td>
<td class="col4"> <td class="col4">
<input type="hidden" name="layer_values" id="layer_values" /> <input type="hidden" name="layer_values" id="layer_values" />
<a id="delete_row" href="none"><?php print_image("images/cross.png", false, array("alt" => ""));?></a> <a id="delete_row" href="none"><?php html_print_image("images/cross.png", false, array("alt" => ""));?></a>
</td> </td>
</tr> </tr>
</tbody> </tbody>

View File

@ -58,7 +58,7 @@ else
switch ($action) { switch ($action) {
case 'delete_map': case 'delete_map':
$idMap = get_parameter('map_id'); $idMap = get_parameter('map_id');
deleteMap($idMap); gis_delete_map($idMap);
break; break;
} }
@ -101,22 +101,22 @@ if (!$maps) {
$table_info = array('<a href="index.php?sec=godgismaps&sec2=godmode/gis_maps/configure_gis_map&map_id='.$map['id_tgis_map'].'&amp;action=edit_map">' . $map['map_name'] . '</a>', $table_info = array('<a href="index.php?sec=godgismaps&sec2=godmode/gis_maps/configure_gis_map&map_id='.$map['id_tgis_map'].'&amp;action=edit_map">' . $map['map_name'] . '</a>',
ui_print_group_icon ($map['group_id'], true), ui_print_group_icon ($map['group_id'], true),
'<a href="index.php?sec=gismaps&sec2=operation/gis_maps/render_view&map_id='.$map['id_tgis_map'].'">' . print_image ("images/eye.png", true).'</a>'); '<a href="index.php?sec=gismaps&sec2=operation/gis_maps/render_view&map_id='.$map['id_tgis_map'].'">' . html_print_image ("images/eye.png", true).'</a>');
if ($display_default_column) { if ($display_default_column) {
$default_button = print_radio_button_extended('default_map', $map['id_tgis_map'], '', $checked, false, "setDefault(" . $map['id_tgis_map'] . ");", '', true); $default_button = html_print_radio_button_extended('default_map', $map['id_tgis_map'], '', $checked, false, "setDefault(" . $map['id_tgis_map'] . ");", '', true);
array_push($table_info, $default_button); array_push($table_info, $default_button);
} }
$delete_button = '<a href="index.php?sec=godgismaps&amp;sec2=godmode/gis_maps/index&amp;map_id='.$map['id_tgis_map'].'&amp;action=delete_map" onclick="return confirmDelete();">' . print_image ("images/cross.png", true).'</a>'; $delete_button = '<a href="index.php?sec=godgismaps&amp;sec2=godmode/gis_maps/index&amp;map_id='.$map['id_tgis_map'].'&amp;action=delete_map" onclick="return confirmDelete();">' . html_print_image ("images/cross.png", true).'</a>';
array_push ($table_info, $delete_button); array_push ($table_info, $delete_button);
$table->data[] = $table_info; $table->data[] = $table_info;
} }
print_table($table); html_print_table($table);
} }
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
echo '<form action="index.php?sec=godgismaps&amp;sec2=godmode/gis_maps/configure_gis_map" method="post">'; echo '<form action="index.php?sec=godgismaps&amp;sec2=godmode/gis_maps/configure_gis_map" method="post">';
print_input_hidden ('action','new_map'); html_print_input_hidden ('action','new_map');
print_submit_button (__('Create'), '', false, 'class="sub next"'); html_print_submit_button (__('Create'), '', false, 'class="sub next"');
echo '</form>'; echo '</form>';
echo '</div>'; echo '</div>';
?> ?>

View File

@ -69,14 +69,14 @@ else {
$table->width = '450px'; $table->width = '450px';
$table->data = array (); $table->data = array ();
$table->data[0][0] = __('Name'); $table->data[0][0] = __('Name');
$table->data[0][1] = print_input_text ('name', $name, '', 35, 100, true); $table->data[0][1] = html_print_input_text ('name', $name, '', 35, 100, true);
$table->data[1][0] = __('Icon'); $table->data[1][0] = __('Icon');
$files = list_files ('images/groups_small/', "png", 1, 0); $files = list_files ('images/groups_small/', "png", 1, 0);
$table->data[1][1] = print_select ($files, 'icon', $icon, '', 'None', '', true); $table->data[1][1] = html_print_select ($files, 'icon', $icon, '', 'None', '', true);
$table->data[1][1] .= ' <span id="icon_preview">'; $table->data[1][1] .= ' <span id="icon_preview">';
if ($icon) { if ($icon) {
$table->data[1][1] .= print_image("images/groups_small/".$icon, true); $table->data[1][1] .= html_print_image("images/groups_small/".$icon, true);
} }
$table->data[1][1] .= '</span>'; $table->data[1][1] .= '</span>';
@ -86,24 +86,24 @@ if ($id_group)
$sql .= sprintf ('WHERE id_grupo != %d', $id_group); $sql .= sprintf ('WHERE id_grupo != %d', $id_group);
$groups = get_user_groups(); $groups = get_user_groups();
if ($id_group) { if ($id_group) {
$table->data[2][1] = print_select_groups(false, "AR", true, 'id_parent', $id_parent, $table->data[2][1] = html_print_select_groups(false, "AR", true, 'id_parent', $id_parent,
'', '', '', true, false, true, '', false, false, false, $id_group); '', '', '', true, false, true, '', false, false, false, $id_group);
} }
else { else {
$table->data[2][1] = print_select_groups(false, "AR", true, 'id_parent', $id_parent, '', '', '', true); $table->data[2][1] = html_print_select_groups(false, "AR", true, 'id_parent', $id_parent, '', '', '', true);
} }
$table->data[2][1] .= ' <span id="parent_preview">'; $table->data[2][1] .= ' <span id="parent_preview">';
$table->data[2][1] .= print_image("images/groups_small/".get_group_icon ($id_parent).".png", true); $table->data[2][1] .= html_print_image("images/groups_small/".groups_get_icon ($id_parent).".png", true);
$table->data[2][1] .= '</span>'; $table->data[2][1] .= '</span>';
$table->data[3][0] = __('Alerts'); $table->data[3][0] = __('Alerts');
$table->data[3][1] = print_checkbox ('alerts_enabled', 1, ! $alerts_disabled, true); $table->data[3][1] = html_print_checkbox ('alerts_enabled', 1, ! $alerts_disabled, true);
$table->data[4][0] = __('Propagate ACL') . ui_print_help_tip (__("Propagate the same ACL security into the child subgroups."), true); $table->data[4][0] = __('Propagate ACL') . ui_print_help_tip (__("Propagate the same ACL security into the child subgroups."), true);
$table->data[4][1] = print_checkbox('propagate', 1, $propagate, true); $table->data[4][1] = html_print_checkbox('propagate', 1, $propagate, true);
$table->data[5][0] = __('Custom ID'); $table->data[5][0] = __('Custom ID');
$table->data[5][1] = print_input_text ('custom_id', $custom_id, '', 16, 255, true); $table->data[5][1] = html_print_input_text ('custom_id', $custom_id, '', 16, 255, true);
$isFunctionSkins = enterprise_include_once ('include/functions_skins.php'); $isFunctionSkins = enterprise_include_once ('include/functions_skins.php');
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) { if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
@ -112,16 +112,16 @@ if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
} }
echo '<form name="grupo" method="post" action="index.php?sec=gagente&sec2=godmode/groups/group_list">'; echo '<form name="grupo" method="post" action="index.php?sec=gagente&sec2=godmode/groups/group_list">';
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
if ($id_group) { if ($id_group) {
print_input_hidden ('update_group', 1); html_print_input_hidden ('update_group', 1);
print_input_hidden ('id_group', $id_group); html_print_input_hidden ('id_group', $id_group);
print_submit_button (__('Update'), 'updbutton', false, 'class="sub upd"'); html_print_submit_button (__('Update'), 'updbutton', false, 'class="sub upd"');
} }
else { else {
print_input_hidden ('create_group', 1); html_print_input_hidden ('create_group', 1);
print_submit_button (__('Create'), 'crtbutton', false, 'class="sub wand"'); html_print_submit_button (__('Create'), 'crtbutton', false, 'class="sub wand"');
} }
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -54,20 +54,20 @@ if ($id_group) {
$table->width = '450px'; $table->width = '450px';
$table->data = array (); $table->data = array ();
$table->data[0][0] = __('Name'); $table->data[0][0] = __('Name');
$table->data[0][1] = print_input_text ('name', $name, '', 35, 100, true); $table->data[0][1] = html_print_input_text ('name', $name, '', 35, 100, true);
echo'</span>'; echo'</span>';
echo '<form name="grupo" method="post" action="index.php?sec=gagente&sec2=godmode/groups/modu_group_list">'; echo '<form name="grupo" method="post" action="index.php?sec=gagente&sec2=godmode/groups/modu_group_list">';
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
if ($id_group) { if ($id_group) {
print_input_hidden ('update_group', 1); html_print_input_hidden ('update_group', 1);
print_input_hidden ('id_group', $id_group); html_print_input_hidden ('id_group', $id_group);
print_submit_button (__('Update'), 'updbutton', false, 'class="sub upd"'); html_print_submit_button (__('Update'), 'updbutton', false, 'class="sub upd"');
} else { } else {
print_input_hidden ('create_group', 1); html_print_input_hidden ('create_group', 1);
print_submit_button (__('Create'), 'crtbutton', false, 'class="sub wand"'); html_print_submit_button (__('Create'), 'crtbutton', false, 'class="sub wand"');
} }
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -169,7 +169,7 @@ if ($update_group) {
if ($delete_group) { if ($delete_group) {
$id_group = (int) get_parameter ('id_group'); $id_group = (int) get_parameter ('id_group');
$usedGroup = checkUsedGroup($id_group); $usedGroup = groups_check_used($id_group);
if (!$usedGroup['return']) { if (!$usedGroup['return']) {
@ -289,8 +289,8 @@ foreach ($groups as $id_group => $group) {
$data[3] = ''; $data[3] = '';
} }
else { else {
$data[3] = '<a href="index.php?sec=gagente&sec2=godmode/groups/configure_group&id_group='.$group['id_grupo'].'">' . print_image("images/config.png", true, array("alt" => __('Edit'), "title" => __('Edit'), "border" => '0')); $data[3] = '<a href="index.php?sec=gagente&sec2=godmode/groups/configure_group&id_group='.$group['id_grupo'].'">' . html_print_image("images/config.png", true, array("alt" => __('Edit'), "title" => __('Edit'), "border" => '0'));
$data[3] .= '<a href="index.php?sec=gagente&sec2=godmode/groups/group_list&id_group='.$id_group.'&delete_group=1" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">' . print_image("images/cross.png", true, array("alt" => __('Delete'), "border" => '0')); $data[3] .= '<a href="index.php?sec=gagente&sec2=godmode/groups/group_list&id_group='.$id_group.'&delete_group=1" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">' . html_print_image("images/cross.png", true, array("alt" => __('Delete'), "border" => '0'));
} }
array_push ($table->data, $data); array_push ($table->data, $data);
@ -318,11 +318,11 @@ function showBranch(parent) {
</script> </script>
<?php <?php
print_table ($table); html_print_table ($table);
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/groups/configure_group">'; echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/groups/configure_group">';
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
print_submit_button (__('Create group'), 'crt', false, 'class="sub next"'); html_print_submit_button (__('Create group'), 'crt', false, 'class="sub next"');
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -122,16 +122,16 @@ foreach ($groups as $id_group ) {
$data = array (); $data = array ();
$data[0] = '<strong><a href="index.php?sec=gagente&sec2=godmode/groups/configure_modu_group&id_group='.$id_group["id_mg"].'">' . ui_print_truncate_text($id_group["name"], 50).'</a></strong>'; $data[0] = '<strong><a href="index.php?sec=gagente&sec2=godmode/groups/configure_modu_group&id_group='.$id_group["id_mg"].'">' . ui_print_truncate_text($id_group["name"], 50).'</a></strong>';
$data[1] = '<a href="index.php?sec=gagente&sec2=godmode/groups/modu_group_list&id_group='.$id_group["id_mg"].'&delete_group=1" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">' . print_image("images/cross.png", true, array("border" => '0')) . '</a>'; $data[1] = '<a href="index.php?sec=gagente&sec2=godmode/groups/modu_group_list&id_group='.$id_group["id_mg"].'&delete_group=1" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">' . html_print_image("images/cross.png", true, array("border" => '0')) . '</a>';
array_push ($table->data, $data); array_push ($table->data, $data);
} }
print_table ($table); html_print_table ($table);
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/groups/configure_modu_group">'; echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/groups/configure_modu_group">';
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
print_submit_button (__('Create module group'), 'crt', false, 'class="sub next"'); html_print_submit_button (__('Create module group'), 'crt', false, 'class="sub next"');
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -145,14 +145,14 @@ $table->size[1] = '85%';
$table->data = array (); $table->data = array ();
$table->data[0][0] = __('Group'); $table->data[0][0] = __('Group');
$table->data[0][1] = print_select_groups(false, "AR", true, 'id_group', $id_group, $table->data[0][1] = html_print_select_groups(false, "AR", true, 'id_group', $id_group,
false, '', '', true); false, '', '', true);
$table->data[1][0] = __('Agents'); $table->data[1][0] = __('Agents');
$table->data[1][0] .= '<span id="agent_loading" class="invisible">'; $table->data[1][0] .= '<span id="agent_loading" class="invisible">';
$table->data[1][0] .= print_image('images/spinner.png', true); $table->data[1][0] .= html_print_image('images/spinner.png', true);
$table->data[1][0] .= '</span>'; $table->data[1][0] .= '</span>';
$table->data[1][1] = print_select (get_group_agents ($id_group, false, "none"), $table->data[1][1] = html_print_select (get_group_agents ($id_group, false, "none"),
'id_agents[]', 0, false, '', '', true, true); 'id_agents[]', 0, false, '', '', true, true);
if (empty($id_agents)) { if (empty($id_agents)) {
@ -163,9 +163,9 @@ else {
} }
$table->data[2][0] = __('Alert templates'); $table->data[2][0] = __('Alert templates');
$table->data[2][0] .= '<span id="template_loading" class="invisible">'; $table->data[2][0] .= '<span id="template_loading" class="invisible">';
$table->data[2][0] .= print_image('images/spinner.png', true); $table->data[2][0] .= html_print_image('images/spinner.png', true);
$table->data[2][0] .= '</span>'; $table->data[2][0] .= '</span>';
$table->data[2][1] = print_select (index_array ($alert_templates, 'id_alert_template', 'template_name'), 'id_alert_templates[]', '', '', '', '', true, true, true, '', $alert_templates == 0); $table->data[2][1] = html_print_select (index_array ($alert_templates, 'id_alert_template', 'template_name'), 'id_alert_templates[]', '', '', '', '', true, true, true, '', $alert_templates == 0);
if (empty($id_agents)) { if (empty($id_agents)) {
$alert_compounds = ''; $alert_compounds = '';
@ -182,28 +182,28 @@ else {
} }
$table->data[3][0] = __('Alert compounds'); $table->data[3][0] = __('Alert compounds');
$table->data[3][0] .= '<span id="compound_loading" class="invisible">'; $table->data[3][0] .= '<span id="compound_loading" class="invisible">';
$table->data[3][0] .= print_image('images/spinner.png', true); $table->data[3][0] .= html_print_image('images/spinner.png', true);
$table->data[3][0] .= '</span>'; $table->data[3][0] .= '</span>';
$table->data[3][1] = print_select (index_array ($alert_compounds, 'id', 'name'), 'id_alert_compounds[]', '', false, '', '', true, true, true, '', $alert_compounds == 0); $table->data[3][1] = html_print_select (index_array ($alert_compounds, 'id', 'name'), 'id_alert_compounds[]', '', false, '', '', true, true, true, '', $alert_compounds == 0);
$actions = alerts_get_alert_actions (); $actions = alerts_get_alert_actions ();
$table->data[4][0] = __('Action'); $table->data[4][0] = __('Action');
$table->data[4][1] = print_select ($actions, 'action', '', '', __('None'), 0, true); $table->data[4][1] = html_print_select ($actions, 'action', '', '', __('None'), 0, true);
$table->data[4][1] .= '<span><a href="#" class="show_advanced_actions">'.__('Advanced options').' &raquo; </a></span>'; $table->data[4][1] .= '<span><a href="#" class="show_advanced_actions">'.__('Advanced options').' &raquo; </a></span>';
$table->data[4][1] .= '<span id="advanced_actions" class="advanced_actions invisible">'; $table->data[4][1] .= '<span id="advanced_actions" class="advanced_actions invisible">';
$table->data[4][1] .= __('Number of alerts match from').' '; $table->data[4][1] .= __('Number of alerts match from').' ';
$table->data[4][1] .= print_input_text ('fires_min', 0, '', 4, 10, true); $table->data[4][1] .= html_print_input_text ('fires_min', 0, '', 4, 10, true);
$table->data[4][1] .= ' '.__('to').' '; $table->data[4][1] .= ' '.__('to').' ';
$table->data[4][1] .= print_input_text ('fires_max', 0, '', 4, 10, true); $table->data[4][1] .= html_print_input_text ('fires_max', 0, '', 4, 10, true);
$table->data[4][1] .= ui_print_help_icon ("alert-matches", true); $table->data[4][1] .= ui_print_help_icon ("alert-matches", true);
$table->data[4][1] .= '</span>'; $table->data[4][1] .= '</span>';
echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=add_action_alerts" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">'; echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=add_action_alerts" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'; echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
print_input_hidden ('add', 1); html_print_input_hidden ('add', 1);
print_submit_button (__('Add'), 'go', false, 'class="sub add"'); html_print_submit_button (__('Add'), 'go', false, 'class="sub add"');
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -117,36 +117,36 @@ $table->size[3] = '40%';
$table->data = array (); $table->data = array ();
$table->data[0][0] = __('Group'); $table->data[0][0] = __('Group');
$table->data[0][1] = print_select_groups(false, "AR", true, 'id_group', 0, $table->data[0][1] = html_print_select_groups(false, "AR", true, 'id_group', 0,
'', 'Select', -1, true, false, true, '', false); '', 'Select', -1, true, false, true, '', false);
$table->data[0][2] = ''; $table->data[0][2] = '';
$table->data[0][3] = ''; $table->data[0][3] = '';
$table->data[1][0] = __('Agents'); $table->data[1][0] = __('Agents');
$table->data[1][0] .= '<span id="agent_loading" class="invisible">'; $table->data[1][0] .= '<span id="agent_loading" class="invisible">';
$table->data[1][0] .= print_image('images/spinner.png', true); $table->data[1][0] .= html_print_image('images/spinner.png', true);
$table->data[1][0] .= '</span>'; $table->data[1][0] .= '</span>';
$agents_alerts = alerts_get_agents_with_alert_template ($id_alert_template, $id_group, $agents_alerts = alerts_get_agents_with_alert_template ($id_alert_template, $id_group,
false, array ('tagente.nombre', 'tagente.id_agente')); false, array ('tagente.nombre', 'tagente.id_agente'));
$agents = agents_get_agents(); $agents = agents_get_agents();
$table->data[1][1] = print_select (index_array ($agents, 'id_agente', 'nombre'), $table->data[1][1] = html_print_select (index_array ($agents, 'id_agente', 'nombre'),
'id_agents[]', '', '', '', '', true, true, true, '', false); 'id_agents[]', '', '', '', '', true, true, true, '', false);
$table->data[1][2] = __('Modules'); $table->data[1][2] = __('Modules');
$table->data[1][3] = print_select (array(), 'module[]', '', false, '', '', true, true, false); $table->data[1][3] = html_print_select (array(), 'module[]', '', false, '', '', true, true, false);
$templates = alerts_get_alert_templates (false, array ('id', 'name')); $templates = alerts_get_alert_templates (false, array ('id', 'name'));
$table->data[2][0] = __('Alert template'); $table->data[2][0] = __('Alert template');
$table->data[2][1] = print_select (index_array ($templates, 'id', 'name'), $table->data[2][1] = html_print_select (index_array ($templates, 'id', 'name'),
'id_alert_template', $id_alert_template, false, __('Select'), 0, true); 'id_alert_template', $id_alert_template, false, __('Select'), 0, true);
$table->data[2][2] = ''; $table->data[2][2] = '';
$table->data[2][3] = ''; $table->data[2][3] = '';
echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=add_alerts" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">'; echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=add_alerts" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'; echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
print_input_hidden ('add', 1); html_print_input_hidden ('add', 1);
print_submit_button (__('Add'), 'go', false, 'class="sub add"'); html_print_submit_button (__('Add'), 'go', false, 'class="sub add"');
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -73,7 +73,7 @@ if ($create_profiles) {
__('Profiles cannot be added')); __('Profiles cannot be added'));
} }
print_table ($table); html_print_table ($table);
unset($table); unset($table);
@ -94,26 +94,26 @@ $table->size[2] = '33%';
$data = array (); $data = array ();
$data[0] = '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_users&option=add_profiles">'; $data[0] = '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_users&option=add_profiles">';
$data[0] .= print_select (get_profiles (), 'profiles_id[]', '', '', '', $data[0] .= html_print_select (get_profiles (), 'profiles_id[]', '', '', '',
'', true, true, false, '', false, 'width: 100%'); '', true, true, false, '', false, 'width: 100%');
$data[1] = print_select_groups($config['id_user'], "UM", true, $data[1] = html_print_select_groups($config['id_user'], "UM", true,
'groups_id[]', '', '', '', '', true, true, false, '', false, 'width: 100%'); 'groups_id[]', '', '', '', '', true, true, false, '', false, 'width: 100%');
$data[2] = '<span id="alerts_loading" class="invisible">'; $data[2] = '<span id="alerts_loading" class="invisible">';
$data[2] .= print_image('images/spinner.png', true); $data[2] .= html_print_image('images/spinner.png', true);
$data[2] .= '</span>'; $data[2] .= '</span>';
$users_profiles = ""; $users_profiles = "";
$data[2] .= print_select (get_users_info(), 'users_id[]', '', '', '', $data[2] .= html_print_select (get_users_info(), 'users_id[]', '', '', '',
'', true, true, true, '', false, 'width: 100%'); '', true, true, true, '', false, 'width: 100%');
array_push ($table->data, $data); array_push ($table->data, $data);
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'; echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
print_input_hidden ('create_profiles', 1); html_print_input_hidden ('create_profiles', 1);
print_submit_button (__('Create'), 'go', false, 'class="sub add"'); html_print_submit_button (__('Create'), 'go', false, 'class="sub add"');
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -66,16 +66,16 @@ $table->size[3] = '35%';
/* Source selection */ /* Source selection */
$table->id = 'source_table'; $table->id = 'source_table';
$table->data[0][0] = __('Group'); $table->data[0][0] = __('Group');
$table->data[0][1] = print_select_groups(false, "AR", true, 'source_id_group', $source_id_group, $table->data[0][1] = html_print_select_groups(false, "AR", true, 'source_id_group', $source_id_group,
false, '', '', true); false, '', '', true);
$table->data[0][2] = __('Agent'); $table->data[0][2] = __('Agent');
$table->data[0][2] .= ' <span id="source_agent_loading" class="invisible">'; $table->data[0][2] .= ' <span id="source_agent_loading" class="invisible">';
$table->data[0][2] .= print_image ("images/spinner.png", true); $table->data[0][2] .= html_print_image ("images/spinner.png", true);
$table->data[0][2] .= '</span>'; $table->data[0][2] .= '</span>';
$table->data[0][3] = print_select (get_group_agents ($source_id_group, false, "none"), $table->data[0][3] = html_print_select (get_group_agents ($source_id_group, false, "none"),
'source_id_agent', $source_id_agent, false, __('Select'), 0, true); 'source_id_agent', $source_id_agent, false, __('Select'), 0, true);
//$table->data[0][3] = print_input_text_extended ('id_agent', __('Select'), 'text-id_agent', '', 25, 100, false, '', //$table->data[0][3] = html_print_input_text_extended ('id_agent', __('Select'), 'text-id_agent', '', 25, 100, false, '',
// array('style' => 'background: url(images/lightning.png) no-repeat right;'), true) // array('style' => 'background: url(images/lightning.png) no-repeat right;'), true)
// . '<a href="#" class="tip">&nbsp;<span>' . __("Type two chars at least for search") . '</span></a>'; // . '<a href="#" class="tip">&nbsp;<span>' . __("Type two chars at least for search") . '</span></a>';
@ -85,7 +85,7 @@ echo '<fieldset id="fieldset_source">';
echo '<legend><span>'.__('Source'); echo '<legend><span>'.__('Source');
ui_print_help_icon ('manageconfig'); ui_print_help_icon ('manageconfig');
echo '</span></legend>'; echo '</span></legend>';
print_table ($table); html_print_table ($table);
echo '</fieldset>'; echo '</fieldset>';
/* Target selection */ /* Target selection */
@ -98,18 +98,18 @@ if ($source_id_agent)
$table->data['operations'][0] = __('Operations'); $table->data['operations'][0] = __('Operations');
$table->data['operations'][1] = '<span class="with_modules'.(empty ($modules) ? ' invisible': '').'">'; $table->data['operations'][1] = '<span class="with_modules'.(empty ($modules) ? ' invisible': '').'">';
$table->data['operations'][1] .= print_checkbox ('copy_modules', 1, true, true); $table->data['operations'][1] .= html_print_checkbox ('copy_modules', 1, true, true);
$table->data['operations'][1] .= print_label (__('Copy modules'), 'checkbox-copy_modules', true); $table->data['operations'][1] .= html_print_label (__('Copy modules'), 'checkbox-copy_modules', true);
$table->data['operations'][1] .= '</span><br />'; $table->data['operations'][1] .= '</span><br />';
$table->data['operations'][1] .= '<span class="with_alerts'.(empty ($alerts) ? ' invisible': '').'">'; $table->data['operations'][1] .= '<span class="with_alerts'.(empty ($alerts) ? ' invisible': '').'">';
$table->data['operations'][1] .= print_checkbox ('copy_alerts', 1, true, true); $table->data['operations'][1] .= html_print_checkbox ('copy_alerts', 1, true, true);
$table->data['operations'][1] .= print_label (__('Copy alerts'), 'checkbox-copy_alerts', true); $table->data['operations'][1] .= html_print_label (__('Copy alerts'), 'checkbox-copy_alerts', true);
$table->data['operations'][1] .= '</span>'; $table->data['operations'][1] .= '</span>';
$table->data[1][0] = __('Modules'); $table->data[1][0] = __('Modules');
$table->data[1][1] = '<span class="with_modules'.(empty ($modules) ? ' invisible': '').'">'; $table->data[1][1] = '<span class="with_modules'.(empty ($modules) ? ' invisible': '').'">';
$table->data[1][1] .= print_select ($modules, $table->data[1][1] .= html_print_select ($modules,
'target_modules[]', 0, false, '', '', true, true); 'target_modules[]', 0, false, '', '', true, true);
$table->data[1][1] .= '</span>'; $table->data[1][1] .= '</span>';
$table->data[1][1] .= '<span class="without_modules'.(! empty ($modules) ? ' invisible': '').'">'; $table->data[1][1] .= '<span class="without_modules'.(! empty ($modules) ? ' invisible': '').'">';
@ -128,7 +128,7 @@ foreach ($agent_alerts as $alert) {
$alerts[$alert['id']] = $name; $alerts[$alert['id']] = $name;
} }
$table->data[2][1] = '<span class="with_alerts'.(empty ($alerts) ? ' invisible': '').'">'; $table->data[2][1] = '<span class="with_alerts'.(empty ($alerts) ? ' invisible': '').'">';
$table->data[2][1] .= print_select ($alerts, $table->data[2][1] .= html_print_select ($alerts,
'target_alerts[]', 0, false, '', '', true, true); 'target_alerts[]', 0, false, '', '', true, true);
$table->data[2][1] .= '</span>'; $table->data[2][1] .= '</span>';
$table->data[2][1] .= '<span class="without_alerts'.(! empty ($modules) ? ' invisible': '').'">'; $table->data[2][1] .= '<span class="without_alerts'.(! empty ($modules) ? ' invisible': '').'">';
@ -136,37 +136,37 @@ $table->data[2][1] .= '<em>'.__('No alerts for this agent').'</em>';
$table->data[2][1] .= '</span>'; $table->data[2][1] .= '</span>';
echo '<div id="modules_loading" class="loading invisible">'; echo '<div id="modules_loading" class="loading invisible">';
print_image ("images/spinner.png"); html_print_image ("images/spinner.png");
echo __('Loading').'&hellip;'; echo __('Loading').'&hellip;';
echo '</div>'; echo '</div>';
echo '<fieldset id="fieldset_targets"'.($source_id_agent ? '' : ' class="invisible"').'>'; echo '<fieldset id="fieldset_targets"'.($source_id_agent ? '' : ' class="invisible"').'>';
echo '<legend><span>'.__('Targets').'</span></legend>'; echo '<legend><span>'.__('Targets').'</span></legend>';
print_table ($table); html_print_table ($table);
echo '</fieldset>'; echo '</fieldset>';
/* Destiny selection */ /* Destiny selection */
$table->id = 'destiny_table'; $table->id = 'destiny_table';
$table->data = array (); $table->data = array ();
$table->data[0][0] = __('Group'); $table->data[0][0] = __('Group');
$table->data[0][1] = print_select ($groups, 'destiny_id_group', $destiny_id_group, $table->data[0][1] = html_print_select ($groups, 'destiny_id_group', $destiny_id_group,
false, '', '', true); false, '', '', true);
$table->data[1][0] = __('Agent'); $table->data[1][0] = __('Agent');
$table->data[1][0] .= '<span id="destiny_agent_loading" class="invisible">'; $table->data[1][0] .= '<span id="destiny_agent_loading" class="invisible">';
$table->data[1][0] .= print_image ("images/spinner.png", true); $table->data[1][0] .= html_print_image ("images/spinner.png", true);
$table->data[1][0] .= '</span>'; $table->data[1][0] .= '</span>';
$table->data[1][1] = print_select (get_group_agents ($destiny_id_group, false, "none"), $table->data[1][1] = html_print_select (get_group_agents ($destiny_id_group, false, "none"),
'destiny_id_agent[]', 0, false, '', '', true, true); 'destiny_id_agent[]', 0, false, '', '', true, true);
echo '<fieldset id="fieldset_destiny"'.($source_id_agent ? '' : ' class="invisible"').'>'; echo '<fieldset id="fieldset_destiny"'.($source_id_agent ? '' : ' class="invisible"').'>';
echo '<legend><span>'.__('To agent(s)').'</span></legend>'; echo '<legend><span>'.__('To agent(s)').'</span></legend>';
print_table ($table); html_print_table ($table);
echo '</fieldset>'; echo '</fieldset>';
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
print_input_hidden ('do_operation', 1); html_print_input_hidden ('do_operation', 1);
print_submit_button (__('Copy'), 'go', false, 'class="sub wand"'); html_print_submit_button (__('Copy'), 'go', false, 'class="sub wand"');
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -154,14 +154,14 @@ $table->size[1] = '85%';
$table->data = array (); $table->data = array ();
$table->data[0][0] = __('Group'); $table->data[0][0] = __('Group');
$table->data[0][1] = print_select_groups(false, "AR", true, 'id_group', $id_group, $table->data[0][1] = html_print_select_groups(false, "AR", true, 'id_group', $id_group,
false, '', '', true); false, '', '', true);
$table->data[1][0] = __('Agents'); $table->data[1][0] = __('Agents');
$table->data[1][0] .= '<span id="agent_loading" class="invisible">'; $table->data[1][0] .= '<span id="agent_loading" class="invisible">';
$table->data[1][0] .= print_image('images/spinner.png', true); $table->data[1][0] .= html_print_image('images/spinner.png', true);
$table->data[1][0] .= '</span>'; $table->data[1][0] .= '</span>';
$table->data[1][1] = print_select (get_group_agents ($id_group, false, "none"), $table->data[1][1] = html_print_select (get_group_agents ($id_group, false, "none"),
'id_agents[]', 0, false, '', '', true, true); 'id_agents[]', 0, false, '', '', true, true);
if (empty($id_agents)) { if (empty($id_agents)) {
@ -171,9 +171,9 @@ if (empty($id_agents)) {
} }
$table->data[2][0] = __('Alert templates'); $table->data[2][0] = __('Alert templates');
$table->data[2][0] .= '<span id="template_loading" class="invisible">'; $table->data[2][0] .= '<span id="template_loading" class="invisible">';
$table->data[2][0] .= print_image('images/spinner.png', true); $table->data[2][0] .= html_print_image('images/spinner.png', true);
$table->data[2][0] .= '</span>'; $table->data[2][0] .= '</span>';
$table->data[2][1] = print_select (index_array ($alert_templates, 'id_alert_template', 'template_name'), 'id_alert_templates[]', '', '', '', '', true, true, true, '', $alert_templates == 0); $table->data[2][1] = html_print_select (index_array ($alert_templates, 'id_alert_template', 'template_name'), 'id_alert_templates[]', '', '', '', '', true, true, true, '', $alert_templates == 0);
if (empty($id_agents)) { if (empty($id_agents)) {
$alert_compounds = ''; $alert_compounds = '';
@ -189,20 +189,20 @@ if (empty($id_agents)) {
} }
$table->data[3][0] = __('Alert compounds'); $table->data[3][0] = __('Alert compounds');
$table->data[3][0] .= '<span id="compound_loading" class="invisible">'; $table->data[3][0] .= '<span id="compound_loading" class="invisible">';
$table->data[3][0] .= print_image('images/spinner.png', true); $table->data[3][0] .= html_print_image('images/spinner.png', true);
$table->data[3][0] .= '</span>'; $table->data[3][0] .= '</span>';
$table->data[3][1] = print_select (index_array ($alert_compounds, 'id', 'name'), 'id_alert_compounds[]', '', false, '', '', true, true, true, '', $alert_compounds == 0); $table->data[3][1] = html_print_select (index_array ($alert_compounds, 'id', 'name'), 'id_alert_compounds[]', '', false, '', '', true, true, true, '', $alert_compounds == 0);
$actions = alerts_get_alert_actions (); $actions = alerts_get_alert_actions ();
$table->data[4][0] = __('Action'); $table->data[4][0] = __('Action');
$table->data[4][1] = print_select ($actions, 'action', '', '', __('None'), 0, true); $table->data[4][1] = html_print_select ($actions, 'action', '', '', __('None'), 0, true);
echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=delete_action_alerts" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">'; echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=delete_action_alerts" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'; echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
print_input_hidden ('delete', 1); html_print_input_hidden ('delete', 1);
print_submit_button (__('Delete'), 'go', false, 'class="sub delete"'); html_print_submit_button (__('Delete'), 'go', false, 'class="sub delete"');
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -95,22 +95,22 @@ $table->size[1] = '85%';
$table->data = array (); $table->data = array ();
$table->data[0][0] = __('Group'); $table->data[0][0] = __('Group');
$table->data[0][1] = print_select_groups(false, "AR", true, 'id_group', $id_group, $table->data[0][1] = html_print_select_groups(false, "AR", true, 'id_group', $id_group,
false, '', '', true); false, '', '', true);
$table->data[1][0] = __('Agents'); $table->data[1][0] = __('Agents');
$table->data[1][0] .= '<span id="agent_loading" class="invisible">'; $table->data[1][0] .= '<span id="agent_loading" class="invisible">';
$table->data[1][0] .= print_image('images/spinner.png', true); $table->data[1][0] .= html_print_image('images/spinner.png', true);
$table->data[1][0] .= '</span>'; $table->data[1][0] .= '</span>';
$table->data[1][1] = print_select (get_group_agents ($id_group, false, "none"), $table->data[1][1] = html_print_select (get_group_agents ($id_group, false, "none"),
'id_agents[]', 0, false, '', '', true, true); 'id_agents[]', 0, false, '', '', true, true);
echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=delete_agents" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">'; echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=delete_agents" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'; echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
print_input_hidden ('delete', 1); html_print_input_hidden ('delete', 1);
print_submit_button (__('Delete'), 'go', false, 'class="sub delete"'); html_print_submit_button (__('Delete'), 'go', false, 'class="sub delete"');
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -125,34 +125,34 @@ $table->data = array ();
$templates = alerts_get_alert_templates (false, array ('id', 'name')); $templates = alerts_get_alert_templates (false, array ('id', 'name'));
$table->data[0][0] = __('Alert template'); $table->data[0][0] = __('Alert template');
$table->data[0][1] = print_select (index_array ($templates, 'id', 'name'), $table->data[0][1] = html_print_select (index_array ($templates, 'id', 'name'),
'id_alert_template', $id_alert_template, false, __('Select'), 0, true); 'id_alert_template', $id_alert_template, false, __('Select'), 0, true);
$table->data[0][2] = ''; $table->data[0][2] = '';
$table->data[0][3] = ''; $table->data[0][3] = '';
$table->data[1][0] = __('Group'); $table->data[1][0] = __('Group');
$table->data[1][1] = print_select_groups(false, "AR", true, 'id_group', $id_group, $table->data[1][1] = html_print_select_groups(false, "AR", true, 'id_group', $id_group,
'', '', '', true, false, true, '', $id_alert_template == 0); '', '', '', true, false, true, '', $id_alert_template == 0);
$table->data[1][2] = ''; $table->data[1][2] = '';
$table->data[1][3] = ''; $table->data[1][3] = '';
$table->data[2][0] = __('Agents'); $table->data[2][0] = __('Agents');
$table->data[2][0] .= '<span id="agent_loading" class="invisible">'; $table->data[2][0] .= '<span id="agent_loading" class="invisible">';
$table->data[2][0] .= print_image('images/spinner.png', true); $table->data[2][0] .= html_print_image('images/spinner.png', true);
$table->data[2][0] .= '</span>'; $table->data[2][0] .= '</span>';
$agents_alerts = alerts_get_agents_with_alert_template ($id_alert_template, $id_group, $agents_alerts = alerts_get_agents_with_alert_template ($id_alert_template, $id_group,
false, array ('tagente.nombre', 'tagente.id_agente')); false, array ('tagente.nombre', 'tagente.id_agente'));
$table->data[2][1] = print_select (index_array ($agents_alerts, 'id_agente', 'nombre'), $table->data[2][1] = html_print_select (index_array ($agents_alerts, 'id_agente', 'nombre'),
'id_agents[]', '', '', '', '', true, true, true, '', $id_alert_template == 0); 'id_agents[]', '', '', '', '', true, true, true, '', $id_alert_template == 0);
$table->data[2][2] = __('Modules'); $table->data[2][2] = __('Modules');
$table->data[2][3] = print_select (array(), 'module[]', '', false, '', '', true, true, false); $table->data[2][3] = html_print_select (array(), 'module[]', '', false, '', '', true, true, false);
echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=delete_alerts" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">'; echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=delete_alerts" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'; echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
print_input_hidden ('delete', 1); html_print_input_hidden ('delete', 1);
print_submit_button (__('Delete'), 'go', false, 'class="sub delete"'); html_print_submit_button (__('Delete'), 'go', false, 'class="sub delete"');
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -115,30 +115,30 @@ $modulesSelect = array();
foreach ($modules as $module) { foreach ($modules as $module) {
$modulesSelect[$module] = $module; $modulesSelect[$module] = $module;
} }
$table->data[0][1] = print_select($modulesSelect, $table->data[0][1] = html_print_select($modulesSelect,
'module_name', $module_name, false, __('Select'), '', true); 'module_name', $module_name, false, __('Select'), '', true);
$table->data[1][0] = __('Group'); $table->data[1][0] = __('Group');
$table->data[1][1] = print_select_groups(false, "AR", true, 'id_group', $id_group, $table->data[1][1] = html_print_select_groups(false, "AR", true, 'id_group', $id_group,
false, '', '', true, false, true, '', empty ($module_name)); false, '', '', true, false, true, '', empty ($module_name));
$table->data[2][0] = __('Agent'); $table->data[2][0] = __('Agent');
$table->data[2][0] .= '<span id="agent_loading" class="invisible">'; $table->data[2][0] .= '<span id="agent_loading" class="invisible">';
$table->data[2][0] .= print_image('images/spinner.png', true); $table->data[2][0] .= html_print_image('images/spinner.png', true);
$table->data[2][0] .= '</span>'; $table->data[2][0] .= '</span>';
$agents = get_agents_with_module_name ($module_name, $id_group, $agents = get_agents_with_module_name ($module_name, $id_group,
array ('delete_pending' => 0, array ('delete_pending' => 0,
'tagente_modulo.disabled' => 0), 'tagente_modulo.disabled' => 0),
array ('tagente.id_agente', 'tagente.nombre')); array ('tagente.id_agente', 'tagente.nombre'));
$table->data[2][1] = print_select (index_array ($agents, 'id_agente', 'nombre'), $table->data[2][1] = html_print_select (index_array ($agents, 'id_agente', 'nombre'),
'id_agents[]', 0, false, __('None'), 0, true, true, true, '', empty ($module_name)); 'id_agents[]', 0, false, __('None'), 0, true, true, true, '', empty ($module_name));
echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=delete_modules" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">'; echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=delete_modules" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'; echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
print_input_hidden ('delete', 1); html_print_input_hidden ('delete', 1);
print_submit_button (__('Delete'), 'go', false, 'class="sub delete"'); html_print_submit_button (__('Delete'), 'go', false, 'class="sub delete"');
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -82,7 +82,7 @@ if ($delete_profiles) {
__('Profiles cannot be deleted')); __('Profiles cannot be deleted'));
} }
print_table ($table); html_print_table ($table);
unset($table); unset($table);
@ -103,26 +103,26 @@ $table->size[2] = '33%';
$data = array (); $data = array ();
$data[0] = '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_users&option=delete_profiles">'; $data[0] = '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_users&option=delete_profiles">';
$data[0] .= print_select (get_profiles (), 'profiles_id[]', '', '', '', $data[0] .= html_print_select (get_profiles (), 'profiles_id[]', '', '', '',
'', true, false, false, '', false, 'width: 100%'); '', true, false, false, '', false, 'width: 100%');
$data[1] = print_select_groups($config['id_user'], "UM", true, $data[1] = html_print_select_groups($config['id_user'], "UM", true,
'groups_id[]', '', '', '', '', true, false, false, '', false, 'width: 100%'); 'groups_id[]', '', '', '', '', true, false, false, '', false, 'width: 100%');
$data[2] = '<span id="users_loading" class="invisible">'; $data[2] = '<span id="users_loading" class="invisible">';
$data[2] .= print_image('images/spinner.png', true); $data[2] .= html_print_image('images/spinner.png', true);
$data[2] .= '</span>'; $data[2] .= '</span>';
$users_profiles = ""; $users_profiles = "";
$data[2] .= print_select (array(), 'users_id[]', '', '', '', $data[2] .= html_print_select (array(), 'users_id[]', '', '', '',
'', true, true, true, '', false, 'width: 100%'); '', true, true, true, '', false, 'width: 100%');
array_push ($table->data, $data); array_push ($table->data, $data);
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'; echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
print_input_hidden ('delete_profiles', 1); html_print_input_hidden ('delete_profiles', 1);
print_submit_button (__('Delete'), 'del', false, 'class="sub delete"'); html_print_submit_button (__('Delete'), 'del', false, 'class="sub delete"');
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -188,21 +188,21 @@ $table->size[1] = '85%';
$table->data = array (); $table->data = array ();
$table->data[0][0] = __('Group'); $table->data[0][0] = __('Group');
$table->data[0][1] = print_select_groups(false, "AR", true, 'id_group', $id_group, $table->data[0][1] = html_print_select_groups(false, "AR", true, 'id_group', $id_group,
false, '', '', true); false, '', '', true);
$table->data[1][0] = __('Agents'); $table->data[1][0] = __('Agents');
$table->data[1][0] .= '<span id="agent_loading" class="invisible">'; $table->data[1][0] .= '<span id="agent_loading" class="invisible">';
$table->data[1][0] .= print_image('images/spinner.png', true); $table->data[1][0] .= html_print_image('images/spinner.png', true);
$table->data[1][0] .= '</span>'; $table->data[1][0] .= '</span>';
$enabled_agents = get_group_agents ($id_group, array('disabled' => 0), "none"); $enabled_agents = get_group_agents ($id_group, array('disabled' => 0), "none");
$all_agents = get_group_agents ($id_group, array('disabled' => 1), "none") + $enabled_agents; $all_agents = get_group_agents ($id_group, array('disabled' => 1), "none") + $enabled_agents;
$table->data[1][1] = print_select ($all_agents, $table->data[1][1] = html_print_select ($all_agents,
'id_agents[]', 0, false, '', '', true, true); 'id_agents[]', 0, false, '', '', true, true);
echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=edit_agents" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">'; echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=edit_agents" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
print_table ($table); html_print_table ($table);
$nombre_agente = ""; $nombre_agente = "";
$direccion_agente = ""; $direccion_agente = "";
@ -229,14 +229,14 @@ $groups = get_user_groups ($config["id_user"], "AR",false);
$agents = get_group_agents (array_keys ($groups)); $agents = get_group_agents (array_keys ($groups));
$table->data[0][0] = __('Parent'); $table->data[0][0] = __('Parent');
$table->data[0][1] = print_input_text_extended ('id_parent', get_agent_name ($id_parent), 'text-id_parent', '', 30, 100, false, '', $table->data[0][1] = html_print_input_text_extended ('id_parent', get_agent_name ($id_parent), 'text-id_parent', '', 30, 100, false, '',
array('style' => 'background: url(images/lightning.png) no-repeat right;'), true) array('style' => 'background: url(images/lightning.png) no-repeat right;'), true)
. '<a href="#" class="tip">&nbsp;<span>' . __("Type at least two characters to search") . '</span></a>'; . '<a href="#" class="tip">&nbsp;<span>' . __("Type at least two characters to search") . '</span></a>';
$table->data[0][1] .= print_checkbox ("cascade_protection", 1, $cascade_protection, true).__('Cascade protection'). "&nbsp;" . ui_print_help_icon("cascade_protection", true); $table->data[0][1] .= html_print_checkbox ("cascade_protection", 1, $cascade_protection, true).__('Cascade protection'). "&nbsp;" . ui_print_help_icon("cascade_protection", true);
$table->data[1][0] = __('Group'); $table->data[1][0] = __('Group');
$table->data[1][1] = print_select_groups(false, "AR", false, 'group', $group, '', __('No change'), -1, true, false, true, '', false, 'width: 150px;'); $table->data[1][1] = html_print_select_groups(false, "AR", false, 'group', $group, '', __('No change'), -1, true, false, true, '', false, 'width: 150px;');
$table->data[2][0] = __('Interval'); $table->data[2][0] = __('Interval');
@ -249,10 +249,10 @@ $intervals[1200] = human_time_description_raw (1200);
$intervals[1800] = human_time_description_raw (1800); $intervals[1800] = human_time_description_raw (1800);
$intervals[3600] = human_time_description_raw (3600); $intervals[3600] = human_time_description_raw (3600);
$intervals[7200] = human_time_description_raw (7200); $intervals[7200] = human_time_description_raw (7200);
$table->data[2][1] = print_extended_select_for_time ($intervals, 'interval', $interval, '', '', '0', 10, true, 'width: 150px') . __(" seconds."); $table->data[2][1] = html_print_extended_select_for_time ($intervals, 'interval', $interval, '', '', '0', 10, true, 'width: 150px') . __(" seconds.");
$table->data[3][0] = __('OS'); $table->data[3][0] = __('OS');
$table->data[3][1] = print_select_from_sql ('SELECT id_os, name FROM tconfig_os', $table->data[3][1] = html_print_select_from_sql ('SELECT id_os, name FROM tconfig_os',
'id_os', $id_os, '', __('No change'), -1, true, false, true, false, 'width: 105px;'); 'id_os', $id_os, '', __('No change'), -1, true, false, true, false, 'width: 105px;');
$table->data[3][1] .= ' <span id="os_preview">'; $table->data[3][1] .= ' <span id="os_preview">';
$table->data[3][1] .= ui_print_os_icon ($id_os, false, true); $table->data[3][1] .= ui_print_os_icon ($id_os, false, true);
@ -263,14 +263,14 @@ $none = '';
if ($server_name == '' && $id_agente) if ($server_name == '' && $id_agente)
$none = __('None'); $none = __('None');
$table->data[4][0] = __('Server'); $table->data[4][0] = __('Server');
$table->data[4][1] = print_select (get_server_names (), $table->data[4][1] = html_print_select (get_server_names (),
'server_name', $server_name, '', __('No change'), -1, true, false, true, '', false, 'width: 150px;'); 'server_name', $server_name, '', __('No change'), -1, true, false, true, '', false, 'width: 150px;');
// Description // Description
$table->data[5][0] = __('Description'); $table->data[5][0] = __('Description');
$table->data[5][1] = print_input_text ('description', $description, '', 45, 255, true); $table->data[5][1] = html_print_input_text ('description', $description, '', 45, 255, true);
print_table ($table); html_print_table ($table);
unset($table); unset($table);
$custom_id = ''; $custom_id = '';
@ -291,19 +291,19 @@ $table->data = array ();
// Custom ID // Custom ID
$table->data[0][0] = __('Custom ID'); $table->data[0][0] = __('Custom ID');
$table->data[0][1] = print_input_text ('custom_id', $custom_id, '', 16, 255, true); $table->data[0][1] = html_print_input_text ('custom_id', $custom_id, '', 16, 255, true);
// Learn mode / Normal mode // Learn mode / Normal mode
$table->data[1][0] = __('Module definition') . ui_print_help_icon("module_definition", true); $table->data[1][0] = __('Module definition') . ui_print_help_icon("module_definition", true);
$table->data[1][1] = __('No change').' '.print_radio_button_extended ("mode", -1, '', $mode, false, '', 'style="margin-right: 40px;"', true); $table->data[1][1] = __('No change').' '.html_print_radio_button_extended ("mode", -1, '', $mode, false, '', 'style="margin-right: 40px;"', true);
$table->data[1][1] .= __('Learning mode').' '.print_radio_button_extended ("mode", 1, '', $mode, false, '', 'style="margin-right: 40px;"', true); $table->data[1][1] .= __('Learning mode').' '.html_print_radio_button_extended ("mode", 1, '', $mode, false, '', 'style="margin-right: 40px;"', true);
$table->data[1][1] .= __('Normal mode').' '.print_radio_button_extended ("mode", 0, '', $mode, false, '', 'style="margin-right: 40px;"', true); $table->data[1][1] .= __('Normal mode').' '.html_print_radio_button_extended ("mode", 0, '', $mode, false, '', 'style="margin-right: 40px;"', true);
// Status (Disabled / Enabled) // Status (Disabled / Enabled)
$table->data[2][0] = __('Status'); $table->data[2][0] = __('Status');
$table->data[2][1] = __('No change').' '.print_radio_button_extended ("disabled", -1, '', $disabled, false, '', 'style="margin-right: 40px;"', true); $table->data[2][1] = __('No change').' '.html_print_radio_button_extended ("disabled", -1, '', $disabled, false, '', 'style="margin-right: 40px;"', true);
$table->data[2][1] .= __('Disabled').' '.print_radio_button_extended ("disabled", 1, '', $disabled, false, '', 'style="margin-right: 40px;"', true); $table->data[2][1] .= __('Disabled').' '.html_print_radio_button_extended ("disabled", 1, '', $disabled, false, '', 'style="margin-right: 40px;"', true);
$table->data[2][1] .= __('Active').' '.print_radio_button_extended ("disabled", 0, '', $disabled, false, '', 'style="margin-right: 40px;"', true); $table->data[2][1] .= __('Active').' '.html_print_radio_button_extended ("disabled", 0, '', $disabled, false, '', 'style="margin-right: 40px;"', true);
// Remote configuration // Remote configuration
$table->data[3][0] = __('Remote configuration'); $table->data[3][0] = __('Remote configuration');
@ -311,11 +311,11 @@ $table->data[3][0] = __('Remote configuration');
// Delete remote configuration // Delete remote configuration
$table->data[3][1] = '<div id="delete_configurations" style="display: none">'. __('Delete available remote configurations').' ('; $table->data[3][1] = '<div id="delete_configurations" style="display: none">'. __('Delete available remote configurations').' (';
$table->data[3][1] .= '<span id="n_configurations"></span>'; $table->data[3][1] .= '<span id="n_configurations"></span>';
$table->data[3][1] .= ') '.print_radio_button_extended ("delete_conf", 1, '', $disabled, false, '', 'style="margin-right: 40px;"', true).'</div>'; $table->data[3][1] .= ') '.html_print_radio_button_extended ("delete_conf", 1, '', $disabled, false, '', 'style="margin-right: 40px;"', true).'</div>';
$table->data[3][1] .= '<div id="not_available_configurations" style="display: none"><em>'.__('Not available').'</em></div>'; $table->data[3][1] .= '<div id="not_available_configurations" style="display: none"><em>'.__('Not available').'</em></div>';
$listIcons = getArrayListIcons(); $listIcons = gis_get_array_list_icons();
$arraySelectIcon = array(); $arraySelectIcon = array();
foreach ($listIcons as $index => $value) $arraySelectIcon[$index] = $index; foreach ($listIcons as $index => $value) $arraySelectIcon[$index] = $index;
@ -323,20 +323,20 @@ foreach ($listIcons as $index => $value) $arraySelectIcon[$index] = $index;
$path = 'images/gis_map/icons/'; //TODO set better method the path $path = 'images/gis_map/icons/'; //TODO set better method the path
$table->data[4][0] = __('Agent icon'); $table->data[4][0] = __('Agent icon');
$table->data[4][1] = print_select($arraySelectIcon, "icon_path", $icon_path, "changeIcons();", __('None'), '', true) . $table->data[4][1] = html_print_select($arraySelectIcon, "icon_path", $icon_path, "changeIcons();", __('None'), '', true) .
'&nbsp;' . __('Without status') . ': ' . print_image($path . $icon_path . 'default.png', true, array("id" => 'icon_without_status',"style" => 'display:none;')) . '&nbsp;' . __('Without status') . ': ' . html_print_image($path . $icon_path . 'default.png', true, array("id" => 'icon_without_status',"style" => 'display:none;')) .
'&nbsp;' . __('Default') . ': ' . print_image($path . $icon_path . 'default.png', true, array("id" => 'icon_default',"style" => 'display:none;')) . '&nbsp;' . __('Default') . ': ' . html_print_image($path . $icon_path . 'default.png', true, array("id" => 'icon_default',"style" => 'display:none;')) .
'&nbsp;' . __('Ok') . ': ' . print_image($path . $icon_path . 'ok.png', true, array("id" => 'icon_ok',"style" => 'display:none;')) . '&nbsp;' . __('Ok') . ': ' . html_print_image($path . $icon_path . 'ok.png', true, array("id" => 'icon_ok',"style" => 'display:none;')) .
'&nbsp;' . __('Bad') . ': ' . print_image($path . $icon_path . 'bad.png', true, array("id" => 'icon_bad',"style" => 'display:none;')) . '&nbsp;' . __('Warning') . ': ' . print_image($path . $icon_path . 'warning.png', true, array("id" => 'icon_warning',"style" => 'display:none;')); '&nbsp;' . __('Bad') . ': ' . html_print_image($path . $icon_path . 'bad.png', true, array("id" => 'icon_bad',"style" => 'display:none;')) . '&nbsp;' . __('Warning') . ': ' . html_print_image($path . $icon_path . 'warning.png', true, array("id" => 'icon_warning',"style" => 'display:none;'));
if ($config['activate_gis']) { if ($config['activate_gis']) {
$table->data[5][0] = __('Ignore new GIS data:'); $table->data[5][0] = __('Ignore new GIS data:');
$table->data[5][1] = __('No change').' '.print_radio_button_extended ("update_gis_data", -1, '', $update_gis_data, false, '', 'style="margin-right: 40px;"', true); $table->data[5][1] = __('No change').' '.html_print_radio_button_extended ("update_gis_data", -1, '', $update_gis_data, false, '', 'style="margin-right: 40px;"', true);
$table->data[5][1] .= __('Disabled').' '.print_radio_button_extended ("update_gis_data", 0, '', $update_gis_data, false, '', 'style="margin-right: 40px;"', true); $table->data[5][1] .= __('Disabled').' '.html_print_radio_button_extended ("update_gis_data", 0, '', $update_gis_data, false, '', 'style="margin-right: 40px;"', true);
$table->data[5][1] .= __('Active').' '.print_radio_button_extended ("update_gis_data", 1, '', $update_gis_data, false, '', 'style="margin-right: 40px;"', true); $table->data[5][1] .= __('Active').' '.html_print_radio_button_extended ("update_gis_data", 1, '', $update_gis_data, false, '', 'style="margin-right: 40px;"', true);
} }
ui_toggle(print_table ($table, true), __('Advanced options')); ui_toggle(html_print_table ($table, true), __('Advanced options'));
unset($table); unset($table);
$table->width = '95%'; $table->width = '95%';
@ -361,13 +361,13 @@ foreach ($fields as $field) {
$custom_value = ''; $custom_value = '';
} }
$data[1] = print_textarea ('customvalue_'.$field['id_field'], 2, 65, $custom_value, 'style="min-height: 30px;"', true); $data[1] = html_print_textarea ('customvalue_'.$field['id_field'], 2, 65, $custom_value, 'style="min-height: 30px;"', true);
array_push ($table->data, $data); array_push ($table->data, $data);
} }
if (!empty($fields)) { if (!empty($fields)) {
ui_toggle(print_table ($table, true), __('Custom fields')); ui_toggle(html_print_table ($table, true), __('Custom fields'));
} }
@ -375,9 +375,9 @@ echo '<h3 class="error invisible" id="message"> </h3>';
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
print_submit_button (__('Update'), 'updbutton', false, 'class="sub upd"'); html_print_submit_button (__('Update'), 'updbutton', false, 'class="sub upd"');
print_input_hidden ('update_agents', 1); html_print_input_hidden ('update_agents', 1);
print_input_hidden ('id_agente', $id_agente); html_print_input_hidden ('id_agente', $id_agente);
echo "</div>"; // Shown and hide div echo "</div>"; // Shown and hide div

View File

@ -230,21 +230,21 @@ $snmp_versions['3'] = 'v. 3';
$table->data = array (); $table->data = array ();
$table->data[0][0] = __('Selection mode'); $table->data[0][0] = __('Selection mode');
$table->data[0][1] = __('Select modules first').' '.print_radio_button_extended ("selection_mode", 'modules', '', $selection_mode, false, '', 'style="margin-right: 40px;"', true); $table->data[0][1] = __('Select modules first').' '.html_print_radio_button_extended ("selection_mode", 'modules', '', $selection_mode, false, '', 'style="margin-right: 40px;"', true);
$table->data[0][2] = ''; $table->data[0][2] = '';
$table->data[0][3] = __('Select agents first').' '.print_radio_button_extended ("selection_mode", 'agents', '', $selection_mode, false, '', 'style="margin-right: 40px;"', true); $table->data[0][3] = __('Select agents first').' '.html_print_radio_button_extended ("selection_mode", 'agents', '', $selection_mode, false, '', 'style="margin-right: 40px;"', true);
$table->rowclass[1] = 'select_modules_row'; $table->rowclass[1] = 'select_modules_row';
$table->data[1][0] = __('Module type'); $table->data[1][0] = __('Module type');
$table->data[1][0] .= '<span id="module_loading" class="invisible">'; $table->data[1][0] .= '<span id="module_loading" class="invisible">';
$table->data[1][0] .= print_image('images/spinner.png', true); $table->data[1][0] .= html_print_image('images/spinner.png', true);
$table->data[1][0] .= '</span>'; $table->data[1][0] .= '</span>';
$types[0] = __('All'); $types[0] = __('All');
$table->colspan[1][1] = 2; $table->colspan[1][1] = 2;
$table->data[1][1] = print_select ($types, $table->data[1][1] = html_print_select ($types,
'module_type', '', false, __('Select'), -1, true, false, true); 'module_type', '', false, __('Select'), -1, true, false, true);
$table->data[1][3] = __('Select all modules of this type').' '.print_checkbox_extended ("force_type", 'type', '', '', false, '', 'style="margin-right: 40px;"', true); $table->data[1][3] = __('Select all modules of this type').' '.html_print_checkbox_extended ("force_type", 'type', '', '', false, '', 'style="margin-right: 40px;"', true);
$modules = array (); $modules = array ();
if ($module_type != '') { if ($module_type != '') {
@ -262,91 +262,91 @@ foreach ($names as $name) {
$table->rowclass[2] = 'select_agents_row'; $table->rowclass[2] = 'select_agents_row';
$table->data[2][0] = __('Agent group'); $table->data[2][0] = __('Agent group');
$groups = get_all_groups(true); $groups = groups_get_all(true);
$groups[0] = __('All'); $groups[0] = __('All');
$table->colspan[2][1] = 2; $table->colspan[2][1] = 2;
$table->data[2][1] = print_select ($groups, 'groups_select', $table->data[2][1] = html_print_select ($groups, 'groups_select',
'', true, __('Select'), -1, true, false, true); '', true, __('Select'), -1, true, false, true);
$table->data[2][3] = __('Select all modules of this group').' '.print_checkbox_extended ("force_group", 'group', '', '', false, '', 'style="margin-right: 40px;"', true); $table->data[2][3] = __('Select all modules of this group').' '.html_print_checkbox_extended ("force_group", 'group', '', '', false, '', 'style="margin-right: 40px;"', true);
$table->rowstyle[3] = 'vertical-align: top;'; $table->rowstyle[3] = 'vertical-align: top;';
$table->rowclass[3] = 'select_modules_row select_modules_row_2'; $table->rowclass[3] = 'select_modules_row select_modules_row_2';
$table->data[3][0] = __('Modules'); $table->data[3][0] = __('Modules');
$table->data[3][1] = print_select ($modules, 'module_name[]', $table->data[3][1] = html_print_select ($modules, 'module_name[]',
$module_name, false, __('Select'), -1, true, true, true); $module_name, false, __('Select'), -1, true, true, true);
$table->data[3][2] = __('Agents'); $table->data[3][2] = __('Agents');
$table->data[3][3] = print_select (array(), 'agents[]', $table->data[3][3] = html_print_select (array(), 'agents[]',
$agents_select, false, __('None'), 0, true, true, false); $agents_select, false, __('None'), 0, true, true, false);
$table->rowstyle[4] = 'vertical-align: top;'; $table->rowstyle[4] = 'vertical-align: top;';
$table->rowclass[4] = 'select_agents_row select_agents_row_2'; $table->rowclass[4] = 'select_agents_row select_agents_row_2';
$table->data[4][0] = __('Agents'); $table->data[4][0] = __('Agents');
$table->data[4][1] = print_select ($agents, 'id_agents[]', $table->data[4][1] = html_print_select ($agents, 'id_agents[]',
$agents_id, false, '', '', true, true, false); $agents_id, false, '', '', true, true, false);
$table->data[4][2] = __('Modules'); $table->data[4][2] = __('Modules');
$table->data[4][3] = print_select (array(), 'module[]', $table->data[4][3] = html_print_select (array(), 'module[]',
$modules_select, false, '', '', true, true, false); $modules_select, false, '', '', true, true, false);
$table->data['edit1'][0] = __('Warning status'); $table->data['edit1'][0] = __('Warning status');
$table->data['edit1'][1] = '<em>'.__('Min.').'</em>'; $table->data['edit1'][1] = '<em>'.__('Min.').'</em>';
$table->data['edit1'][1] .= print_input_text ('min_warning', '', '', 5, 15, true); $table->data['edit1'][1] .= html_print_input_text ('min_warning', '', '', 5, 15, true);
$table->data['edit1'][1] .= '<br /><em>'.__('Max.').'</em>'; $table->data['edit1'][1] .= '<br /><em>'.__('Max.').'</em>';
$table->data['edit1'][1] .= print_input_text ('max_warning', '', '', 5, 15, true); $table->data['edit1'][1] .= html_print_input_text ('max_warning', '', '', 5, 15, true);
$table->data['edit1'][2] = __('Critical status'); $table->data['edit1'][2] = __('Critical status');
$table->data['edit1'][3] = '<em>'.__('Min.').'</em>'; $table->data['edit1'][3] = '<em>'.__('Min.').'</em>';
$table->data['edit1'][3] .= print_input_text ('min_critical', '', '', 5, 15, true); $table->data['edit1'][3] .= html_print_input_text ('min_critical', '', '', 5, 15, true);
$table->data['edit1'][3] .= '<br /><em>'.__('Max.').'</em>'; $table->data['edit1'][3] .= '<br /><em>'.__('Max.').'</em>';
$table->data['edit1'][3] .= print_input_text ('max_critical', '', '', 5, 15, true); $table->data['edit1'][3] .= html_print_input_text ('max_critical', '', '', 5, 15, true);
$table->data['edit2'][0] = __('Interval'); $table->data['edit2'][0] = __('Interval');
$table->data['edit2'][1] = print_input_text ('module_interval', '', '', 5, 15, true); $table->data['edit2'][1] = html_print_input_text ('module_interval', '', '', 5, 15, true);
$table->data['edit2'][2] = __('Disabled'); $table->data['edit2'][2] = __('Disabled');
//$table->data['edit2'][3] = print_checkbox ("disabled", 1, '', true); //$table->data['edit2'][3] = html_print_checkbox ("disabled", 1, '', true);
$table->data['edit2'][3] = print_select(array('' => '', '1' => __('Yes'), '0' => __('No')),'disabled','','','', '', true); $table->data['edit2'][3] = html_print_select(array('' => '', '1' => __('Yes'), '0' => __('No')),'disabled','','','', '', true);
$table->data['edit3'][0] = __('Post process'); $table->data['edit3'][0] = __('Post process');
$table->data['edit3'][1] = print_input_text ('post_process', '', '', 10, 15, true); $table->data['edit3'][1] = html_print_input_text ('post_process', '', '', 10, 15, true);
$table->data['edit3'][2] = __('SMNP community'); $table->data['edit3'][2] = __('SMNP community');
$table->data['edit3'][3] = print_input_text ('snmp_community', '', '', 10, 15, true); $table->data['edit3'][3] = html_print_input_text ('snmp_community', '', '', 10, 15, true);
$table->data['edit35'][0] = ''; $table->data['edit35'][0] = '';
$table->data['edit35'][1] = ''; $table->data['edit35'][1] = '';
$table->data['edit35'][2] = __('SNMP version'); $table->data['edit35'][2] = __('SNMP version');
$table->data['edit35'][3] = print_select ($snmp_versions, 'tcp_send', '', '', __('Select'), '', true, false, false, ''); $table->data['edit35'][3] = html_print_select ($snmp_versions, 'tcp_send', '', '', __('Select'), '', true, false, false, '');
$table->data['edit4'][0] = __('Value'); $table->data['edit4'][0] = __('Value');
$table->data['edit4'][1] = '<em>'.__('Min.').'</em>'; $table->data['edit4'][1] = '<em>'.__('Min.').'</em>';
$table->data['edit4'][1] .= print_input_text ('min', '', '', 5, 15, true); $table->data['edit4'][1] .= html_print_input_text ('min', '', '', 5, 15, true);
$table->data['edit4'][1] .= '<br /><em>'.__('Max.').'</em>'; $table->data['edit4'][1] .= '<br /><em>'.__('Max.').'</em>';
$table->data['edit4'][1] .= print_input_text ('max', '', '', 5, 15, true); $table->data['edit4'][1] .= html_print_input_text ('max', '', '', 5, 15, true);
$table->data['edit4'][2] = __('Module group'); $table->data['edit4'][2] = __('Module group');
$table->data['edit4'][3] = print_select (get_modulegroups(), $table->data['edit4'][3] = html_print_select (get_modulegroups(),
'id_module_group', '', '', __('Select'), 0, true, false, false); 'id_module_group', '', '', __('Select'), 0, true, false, false);
$table->data['edit5'][0] = __('Username'); $table->data['edit5'][0] = __('Username');
$table->data['edit5'][1] = print_input_text ('plugin_user', '', '', 15, 60, true); $table->data['edit5'][1] = html_print_input_text ('plugin_user', '', '', 15, 60, true);
$table->data['edit5'][2] = __('Password'); $table->data['edit5'][2] = __('Password');
$table->data['edit5'][3] = print_input_password ('plugin_pass', '', '', 15, 60, true); $table->data['edit5'][3] = html_print_input_password ('plugin_pass', '', '', 15, 60, true);
$table->data['edit6'][0] = __('Export target'); $table->data['edit6'][0] = __('Export target');
$table->data['edit6'][1] = print_select_from_sql ('SELECT id, name $table->data['edit6'][1] = html_print_select_from_sql ('SELECT id, name
FROM tserver_export ORDER BY name', FROM tserver_export ORDER BY name',
'id_export', '', '',__('None'),'0', true, false, false); 'id_export', '', '',__('None'),'0', true, false, false);
/* FF stands for Flip-flop */ /* FF stands for Flip-flop */
$table->data['edit7'][0] = __('FF threshold') . ' ' . ui_print_help_icon ('ff_threshold', true); $table->data['edit7'][0] = __('FF threshold') . ' ' . ui_print_help_icon ('ff_threshold', true);
$table->data['edit7'][1] = print_input_text ('min_ff_event', '', '', 5, 15, true); $table->data['edit7'][1] = html_print_input_text ('min_ff_event', '', '', 5, 15, true);
$table->data['edit7'][2] = __('Historical data'); $table->data['edit7'][2] = __('Historical data');
$table->data['edit7'][3] = print_select(array('' => '', '1' => __('Yes'), '0' => __('No')),'history_data','','','', '', true); $table->data['edit7'][3] = html_print_select(array('' => '', '1' => __('Yes'), '0' => __('No')),'history_data','','','', '', true);
echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=edit_modules" id="form_edit" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">'; echo '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&option=edit_modules" id="form_edit" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'; echo '<div class="action-buttons" style="width: '.$table->width.'" onsubmit="if (!confirm(\' '.__('Are you sure?').'\')) return false;">';
print_input_hidden ('update', 1); html_print_input_hidden ('update', 1);
print_submit_button (__('Update'), 'go', false, 'class="sub upd"'); html_print_submit_button (__('Update'), 'go', false, 'class="sub upd"');
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -121,50 +121,50 @@ $table->size[1] = '85%';
$table->data = array (); $table->data = array ();
$table->data[0][0] = '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_alerts&option=enable_disable_alerts&action=disable_alerts" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">'; $table->data[0][0] = '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_alerts&option=enable_disable_alerts&action=disable_alerts" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
$table->data[0][0] .= print_input_hidden('id_alert_template_enabled', $id_alert_templates, true); $table->data[0][0] .= html_print_input_hidden('id_alert_template_enabled', $id_alert_templates, true);
$table->data[0][0] .= __('Group'); $table->data[0][0] .= __('Group');
$table->data[0][1] = print_select_groups(false, "AR", true, 'id_group', $id_group, '', '', '', true); $table->data[0][1] = html_print_select_groups(false, "AR", true, 'id_group', $id_group, '', '', '', true);
$table->data[1][0] = __('Agents'); $table->data[1][0] = __('Agents');
$table->data[1][0] .= '<span id="agent_loading" class="invisible">'; $table->data[1][0] .= '<span id="agent_loading" class="invisible">';
$table->data[1][0] .= print_image("images/spinner.png", true); $table->data[1][0] .= html_print_image("images/spinner.png", true);
$table->data[1][0] .= '</span>'; $table->data[1][0] .= '</span>';
$table->data[1][1] = print_select (get_group_agents ($id_group, false, "none"), $table->data[1][1] = html_print_select (get_group_agents ($id_group, false, "none"),
'id_agents[]', 0, false, '', '', true, true); 'id_agents[]', 0, false, '', '', true, true);
$table->data[2][0] = __('Alert template'); $table->data[2][0] = __('Alert template');
$table->data[2][0] .= '<span id="template_loading" class="invisible">'; $table->data[2][0] .= '<span id="template_loading" class="invisible">';
$table->data[2][0] .= print_image("images/spinner.png", true); $table->data[2][0] .= html_print_image("images/spinner.png", true);
$table->data[2][0] .= '</span>'; $table->data[2][0] .= '</span>';
$table->data[2][1] = print_select ('', 'id_alert_templates[]', '', '', '', '', true, true, true, '', true); $table->data[2][1] = html_print_select ('', 'id_alert_templates[]', '', '', '', '', true, true, true, '', true);
$table->data[3][0] = __('Enabled alerts').ui_print_help_tip(__('Format').":<br> ".__('Agent')." - ".__('Module'), true); $table->data[3][0] = __('Enabled alerts').ui_print_help_tip(__('Format').":<br> ".__('Agent')." - ".__('Module'), true);
$table->data[3][0] .= '<span id="alerts_loading" class="invisible">'; $table->data[3][0] .= '<span id="alerts_loading" class="invisible">';
$table->data[3][0] .= print_image("images/spinner.png", true); $table->data[3][0] .= html_print_image("images/spinner.png", true);
$table->data[3][0] .= '</span>'; $table->data[3][0] .= '</span>';
$agents_alerts = alerts_get_agents_with_alert_template ($id_alert_templates, $id_group, $agents_alerts = alerts_get_agents_with_alert_template ($id_alert_templates, $id_group,
false, array ('tagente.nombre', 'tagente.id_agente')); false, array ('tagente.nombre', 'tagente.id_agente'));
$table->data[3][1] = print_select (index_array ($agents_alerts, 'id_agente', 'nombre'), $table->data[3][1] = html_print_select (index_array ($agents_alerts, 'id_agente', 'nombre'),
'id_enabled_alerts[]', '', '', '', '', true, true, true, '', $id_alert_templates == 0); 'id_enabled_alerts[]', '', '', '', '', true, true, true, '', $id_alert_templates == 0);
$table->data[4][0] = __('Action'); $table->data[4][0] = __('Action');
$table->data[4][1] = "<table border='0' width='100%'><tr><td>".print_input_image ('disable_alerts', 'images/darrowdown.png', 1, 'margin-left: 150px;', true, array ('title' => __('Disable selected alerts')))."</td><td>"; $table->data[4][1] = "<table border='0' width='100%'><tr><td>".html_print_input_image ('disable_alerts', 'images/darrowdown.png', 1, 'margin-left: 150px;', true, array ('title' => __('Disable selected alerts')))."</td><td>";
$table->data[4][1] .= '</form>'; $table->data[4][1] .= '</form>';
$table->data[4][1] .= '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_alerts&option=enable_disable_alerts&action=enable_alerts" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">'; $table->data[4][1] .= '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_alerts&option=enable_disable_alerts&action=enable_alerts" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
$table->data[4][1] .= print_input_hidden('id_alert_template_disabled', $id_alert_templates, true); $table->data[4][1] .= html_print_input_hidden('id_alert_template_disabled', $id_alert_templates, true);
$table->data[4][1] .= print_input_image ('enable_alerts', 'images/darrowup.png', 1, 'margin-left: 200px;', true, array ('title' => __('Enable selected alerts')))."</td></tr></table>"; $table->data[4][1] .= html_print_input_image ('enable_alerts', 'images/darrowup.png', 1, 'margin-left: 200px;', true, array ('title' => __('Enable selected alerts')))."</td></tr></table>";
$table->data[5][0] = __('Disabled alerts').ui_print_help_tip(__('Format').":<br> ".__('Agent')." - ".__('Module'), true); $table->data[5][0] = __('Disabled alerts').ui_print_help_tip(__('Format').":<br> ".__('Agent')." - ".__('Module'), true);
$table->data[5][0] .= '<span id="alerts_loading2" class="invisible">'; $table->data[5][0] .= '<span id="alerts_loading2" class="invisible">';
$table->data[5][0] .= print_image("images/spinner.png", true); $table->data[5][0] .= html_print_image("images/spinner.png", true);
$table->data[5][0] .= '</span>'; $table->data[5][0] .= '</span>';
$table->data[5][1] = print_select (index_array ($agents_alerts, 'id_agente2', 'nombre'), $table->data[5][1] = html_print_select (index_array ($agents_alerts, 'id_agente2', 'nombre'),
'id_disabled_alerts[]', '', '', '', '', true, true, true, '', $id_alert_templates == 0); 'id_disabled_alerts[]', '', '', '', '', true, true, true, '', $id_alert_templates == 0);
$table->data[5][1] .= '</form>'; $table->data[5][1] .= '</form>';
print_table ($table); html_print_table ($table);
echo '<h3 class="error invisible" id="message"> </h3>'; echo '<h3 class="error invisible" id="message"> </h3>';

View File

@ -101,20 +101,20 @@ if ($option == '') {
} }
$alertstab = array('text' => '<a href="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_alerts">' $alertstab = array('text' => '<a href="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_alerts">'
. print_image ('images/bell.png', true, array ('title' => __('Alerts operations'))) . html_print_image ('images/bell.png', true, array ('title' => __('Alerts operations')))
. '</a>', 'active' => $tab == 'massive_alerts'); . '</a>', 'active' => $tab == 'massive_alerts');
$userstab = array('text' => '<a href="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_users">' $userstab = array('text' => '<a href="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_users">'
. print_image ('images/group.png', true, array ('title' => __('Users operations'))) . html_print_image ('images/group.png', true, array ('title' => __('Users operations')))
. '</a>', 'active' => $tab == 'massive_users'); . '</a>', 'active' => $tab == 'massive_users');
$agentstab = array('text' => '<a href="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_agents">' $agentstab = array('text' => '<a href="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_agents">'
. print_image ('images/bricks.png', true, array ('title' => __('Agents operations'))) . html_print_image ('images/bricks.png', true, array ('title' => __('Agents operations')))
. '</a>', 'active' => $tab == 'massive_agents'); . '</a>', 'active' => $tab == 'massive_agents');
$modulestab = array('text' => '<a href="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_modules">' $modulestab = array('text' => '<a href="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_modules">'
. print_image ('images/brick.png', true, array ('title' => __('Modules operations'))) . html_print_image ('images/brick.png', true, array ('title' => __('Modules operations')))
. '</a>', 'active' => $tab == 'massive_modules'); . '</a>', 'active' => $tab == 'massive_modules');
/* Collection */ /* Collection */
@ -134,7 +134,7 @@ echo '<form method="post" id="form_options" action="index.php?sec=gmassive&sec2=
echo '<table border="0"><tr><td>'; echo '<table border="0"><tr><td>';
echo '<h3>'.__('Massive options').':</h3>'; echo '<h3>'.__('Massive options').':</h3>';
echo '</td><td>'; echo '</td><td>';
print_select($options, 'option', $option, 'this.form.submit()', '', 0, false, false, false); html_print_select($options, 'option', $option, 'this.form.submit()', '', 0, false, false, false);
if($option == 'edit_agents' || $option == 'edit_modules') if($option == 'edit_agents' || $option == 'edit_modules')
echo '<a href="#" class="tip">&nbsp;<span>' . __("The blank fields will not be updated") . '</span></a>'; echo '<a href="#" class="tip">&nbsp;<span>' . __("The blank fields will not be updated") . '</span></a>';
echo '</td></tr></table>'; echo '</td></tr></table>';

View File

@ -123,50 +123,50 @@ $table->data = array ();
$templates = alerts_get_alert_templates (false, array ('id', 'name')); $templates = alerts_get_alert_templates (false, array ('id', 'name'));
$table->data[0][0] = '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_alerts&option=standby_alerts&action=set_standby_alerts" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">'; $table->data[0][0] = '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_alerts&option=standby_alerts&action=set_standby_alerts" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
$table->data[0][0] .= print_input_hidden('id_alert_template_not_standby', $id_alert_templates, true); $table->data[0][0] .= html_print_input_hidden('id_alert_template_not_standby', $id_alert_templates, true);
$table->data[0][0] .= __('Group'); $table->data[0][0] .= __('Group');
$table->data[0][1] = print_select_groups(false, "AR", true, 'id_group', $id_group, $table->data[0][1] = html_print_select_groups(false, "AR", true, 'id_group', $id_group,
'', '', '', true, false, true, ''); '', '', '', true, false, true, '');
$table->data[1][0] = __('Agents'); $table->data[1][0] = __('Agents');
$table->data[1][0] .= '<span id="agent_loading" class="invisible">'; $table->data[1][0] .= '<span id="agent_loading" class="invisible">';
$table->data[1][0] .= print_image('images/spinner.png', true); $table->data[1][0] .= html_print_image('images/spinner.png', true);
$table->data[1][0] .= '</span>'; $table->data[1][0] .= '</span>';
$table->data[1][1] = print_select (get_group_agents ($id_group, false, "none"), $table->data[1][1] = html_print_select (get_group_agents ($id_group, false, "none"),
'id_agents[]', 0, false, '', '', true, true); 'id_agents[]', 0, false, '', '', true, true);
$table->data[2][0] = __('Alert template'); $table->data[2][0] = __('Alert template');
$table->data[2][0] .= '<span id="template_loading" class="invisible">'; $table->data[2][0] .= '<span id="template_loading" class="invisible">';
$table->data[2][0] .= print_image('images/spinner.png', true); $table->data[2][0] .= html_print_image('images/spinner.png', true);
$table->data[2][0] .= '</span>'; $table->data[2][0] .= '</span>';
$table->data[2][1] = print_select ('', 'id_alert_templates[]', '', '', '', '', true, true, true, '', true); $table->data[2][1] = html_print_select ('', 'id_alert_templates[]', '', '', '', '', true, true, true, '', true);
$table->data[3][0] = __('Not standby alerts').ui_print_help_tip(__('Format').":<br> ".__('Agent')." - ".__('Module'), true); $table->data[3][0] = __('Not standby alerts').ui_print_help_tip(__('Format').":<br> ".__('Agent')." - ".__('Module'), true);
$table->data[3][0] .= '<span id="alerts_loading" class="invisible">'; $table->data[3][0] .= '<span id="alerts_loading" class="invisible">';
$table->data[3][0] .= print_image('images/spinner.png', true); $table->data[3][0] .= html_print_image('images/spinner.png', true);
$table->data[3][0] .= '</span>'; $table->data[3][0] .= '</span>';
$agents_alerts = alerts_get_agents_with_alert_template ($id_alert_templates, $id_group, $agents_alerts = alerts_get_agents_with_alert_template ($id_alert_templates, $id_group,
false, array ('tagente.nombre', 'tagente.id_agente')); false, array ('tagente.nombre', 'tagente.id_agente'));
$table->data[3][1] = print_select (index_array ($agents_alerts, 'id_agente', 'nombre'), $table->data[3][1] = html_print_select (index_array ($agents_alerts, 'id_agente', 'nombre'),
'id_not_standby_alerts[]', '', '', '', '', true, true, true, '', $id_alert_templates == 0); 'id_not_standby_alerts[]', '', '', '', '', true, true, true, '', $id_alert_templates == 0);
$table->data[4][0] = __('Action'); $table->data[4][0] = __('Action');
$table->data[4][1] = "<table border='0' width='100%'><tr><td>".print_input_image ('standby_alerts', 'images/darrowdown.png', 1, 'margin-left: 150px;', true, array ('title' => __('Set standby selected alerts')))."</td><td>"; $table->data[4][1] = "<table border='0' width='100%'><tr><td>".html_print_input_image ('standby_alerts', 'images/darrowdown.png', 1, 'margin-left: 150px;', true, array ('title' => __('Set standby selected alerts')))."</td><td>";
$table->data[4][1] .= '</form>'; $table->data[4][1] .= '</form>';
$table->data[4][1] .= '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_alerts&option=standby_alerts&action=set_off_standby_alerts" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">'; $table->data[4][1] .= '<form method="post" action="index.php?sec=gmassive&sec2=godmode/massive/massive_operations&tab=massive_alerts&option=standby_alerts&action=set_off_standby_alerts" onsubmit="if (! confirm(\''.__('Are you sure?').'\')) return false;">';
$table->data[4][1] .= print_input_hidden('id_alert_template_standby', $id_alert_templates, true); $table->data[4][1] .= html_print_input_hidden('id_alert_template_standby', $id_alert_templates, true);
$table->data[4][1] .= print_input_image ('set_off_standby_alerts', 'images/darrowup.png', 1, 'margin-left: 200px;', true, array ('title' => __('Set standby selected alerts')))."</td></tr></table>"; $table->data[4][1] .= html_print_input_image ('set_off_standby_alerts', 'images/darrowup.png', 1, 'margin-left: 200px;', true, array ('title' => __('Set standby selected alerts')))."</td></tr></table>";
$table->data[5][0] = __('Standby alerts').ui_print_help_tip(__('Format').":<br> ".__('Agent')." - ".__('Module'), true); $table->data[5][0] = __('Standby alerts').ui_print_help_tip(__('Format').":<br> ".__('Agent')." - ".__('Module'), true);
$table->data[5][0] .= '<span id="alerts_loading2" class="invisible">'; $table->data[5][0] .= '<span id="alerts_loading2" class="invisible">';
$table->data[5][0] .= print_image('images/spinner.png', true); $table->data[5][0] .= html_print_image('images/spinner.png', true);
$table->data[5][0] .= '</span>'; $table->data[5][0] .= '</span>';
$table->data[5][1] = print_select (index_array ($agents_alerts, 'id_agente2', 'nombre'), $table->data[5][1] = html_print_select (index_array ($agents_alerts, 'id_agente2', 'nombre'),
'id_standby_alerts[]', '', '', '', '', true, true, true, '', $id_alert_templates == 0); 'id_standby_alerts[]', '', '', '', '', true, true, true, '', $id_alert_templates == 0);
$table->data[5][1] .= '</form>'; $table->data[5][1] .= '</form>';
print_table ($table); html_print_table ($table);
echo '<h3 class="error invisible" id="message"> </h3>'; echo '<h3 class="error invisible" id="message"> </h3>';

View File

@ -121,21 +121,21 @@ foreach ($groups as $group) {
$data[1] = get_network_component_group_name ($group['parent']); $data[1] = get_network_component_group_name ($group['parent']);
$data[2] = '<form method="post" onsubmit="if (! confirm (\''.__('Are you sure?').'\')) return false">'; $data[2] = '<form method="post" onsubmit="if (! confirm (\''.__('Are you sure?').'\')) return false">';
$data[2] .= print_input_hidden ('delete', 1, true); $data[2] .= html_print_input_hidden ('delete', 1, true);
$data[2] .= print_input_hidden ('id', $group['id_sg'], true); $data[2] .= html_print_input_hidden ('id', $group['id_sg'], true);
$data[2] .= print_input_image ('del', 'images/cross.png', 1, '', true, $data[2] .= html_print_input_image ('del', 'images/cross.png', 1, '', true,
array ('title' => __('Delete'))); array ('title' => __('Delete')));
$data[2] .= '</form>'; $data[2] .= '</form>';
array_push ($table->data, $data); array_push ($table->data, $data);
} }
print_table ($table); html_print_table ($table);
echo '<form method="post">'; echo '<form method="post">';
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
print_input_hidden ('new', 1); html_print_input_hidden ('new', 1);
print_submit_button (__('Create'), 'crt', false, 'class="sub next"'); html_print_submit_button (__('Create'), 'crt', false, 'class="sub next"');
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';
?> ?>

View File

@ -44,22 +44,22 @@ $table->style[0] = 'font-weight: bold';
$table->data = array (); $table->data = array ();
$table->data[0][0] = __('Name'); $table->data[0][0] = __('Name');
$table->data[0][1] = print_input_text ('name', $name, '', 15, 255, true); $table->data[0][1] = html_print_input_text ('name', $name, '', 15, 255, true);
$table->data[1][0] = __('Parent'); $table->data[1][0] = __('Parent');
$table->data[1][1] = print_select (get_network_component_groups (), $table->data[1][1] = html_print_select (get_network_component_groups (),
'parent', $parent, false, __('None'), 0, true, false, false); 'parent', $parent, false, __('None'), 0, true, false, false);
echo '<form method="post" action="index.php?sec=gmodules&sec2=godmode/modules/manage_nc_groups">'; echo '<form method="post" action="index.php?sec=gmodules&sec2=godmode/modules/manage_nc_groups">';
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
if ($id) { if ($id) {
print_input_hidden ('update', 1); html_print_input_hidden ('update', 1);
print_input_hidden ('id', $id); html_print_input_hidden ('id', $id);
print_submit_button (__('Update'), 'crt', false, 'class="sub upd"'); html_print_submit_button (__('Update'), 'crt', false, 'class="sub upd"');
} else { } else {
print_input_hidden ('create', 1); html_print_input_hidden ('create', 1);
print_submit_button (__('Create'), 'crt', false, 'class="sub wand"'); html_print_submit_button (__('Create'), 'crt', false, 'class="sub wand"');
} }
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -259,18 +259,18 @@ $table->style[2] = 'font-weight: bold';
$table->data = array (); $table->data = array ();
$table->data[0][0] = __('Group'); $table->data[0][0] = __('Group');
$table->data[0][1] = print_select (get_network_component_groups (), $table->data[0][1] = html_print_select (get_network_component_groups (),
'search_id_group', $search_id_group, '', __('All'), 0, true, false, false); 'search_id_group', $search_id_group, '', __('All'), 0, true, false, false);
$table->data[0][2] = __('Search'); $table->data[0][2] = __('Search');
$table->data[0][3] = print_input_text ('search_string', $search_string, '', 25, $table->data[0][3] = html_print_input_text ('search_string', $search_string, '', 25,
255, true); 255, true);
$table->data[0][4] = '<div class="action-buttons">'; $table->data[0][4] = '<div class="action-buttons">';
$table->data[0][4] .= print_submit_button (__('Search'), 'search', false, $table->data[0][4] .= html_print_submit_button (__('Search'), 'search', false,
'class="sub search"', true); 'class="sub search"', true);
$table->data[0][4] .= '</div>'; $table->data[0][4] .= '</div>';
echo '<form method="post" action="'.$url.'">'; echo '<form method="post" action="'.$url.'">';
print_table ($table); html_print_table ($table);
echo '</form>'; echo '</form>';
$filter = array (); $filter = array ();
@ -323,25 +323,25 @@ foreach ($components as $component) {
$data[6] = '<a style="display: inline; float: left" href="' . $url . '&search_id_group=' . $search_id_group . $data[6] = '<a style="display: inline; float: left" href="' . $url . '&search_id_group=' . $search_id_group .
'search_string=' . $search_string . '&duplicate_network_component=1&source_id=' . $component['id_nc'] . '">' . 'search_string=' . $search_string . '&duplicate_network_component=1&source_id=' . $component['id_nc'] . '">' .
print_image('images/copy.png', true, array('alt' => __('Duplicate'), 'title' => __('Duplicate'))) . '</a>'; html_print_image('images/copy.png', true, array('alt' => __('Duplicate'), 'title' => __('Duplicate'))) . '</a>';
$data[6] .= '<a href="' . $url . '&delete_component=1&id=' . $component['id_nc'] . '&search_id_group=' . $search_id_group . $data[6] .= '<a href="' . $url . '&delete_component=1&id=' . $component['id_nc'] . '&search_id_group=' . $search_id_group .
'search_string=' . $search_string . 'search_string=' . $search_string .
'" onclick="if (! confirm (\''.__('Are you sure?').'\')) return false" >' . '" onclick="if (! confirm (\''.__('Are you sure?').'\')) return false" >' .
print_image('images/cross.png', true, array('alt' => __('Delete'), 'title' => __('Delete'))) . '</a>'; html_print_image('images/cross.png', true, array('alt' => __('Delete'), 'title' => __('Delete'))) . '</a>';
array_push ($table->data, $data); array_push ($table->data, $data);
} }
print_table ($table); html_print_table ($table);
echo '<form method="post" action="'.$url.'">'; echo '<form method="post" action="'.$url.'">';
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
print_input_hidden ('new_component', 1); html_print_input_hidden ('new_component', 1);
print_select (array (2 => __('Create a new network component'), html_print_select (array (2 => __('Create a new network component'),
4 => __('Create a new plugin component'), 4 => __('Create a new plugin component'),
6 => __('Create a new WMI component')), 6 => __('Create a new WMI component')),
'id_component_type', '', '', '', '', ''); 'id_component_type', '', '', '', '', '');
print_submit_button (__('Create'), 'crt', false, 'class="sub next"'); html_print_submit_button (__('Create'), 'crt', false, 'class="sub next"');
echo '</div>'; echo '</div>';
echo '</form>' echo '</form>'
?> ?>

View File

@ -111,7 +111,7 @@ if (isset ($id)) {
* 2 - network component * 2 - network component
* *
* You can see this values in file godmode/modules/manage_network_components.php * You can see this values in file godmode/modules/manage_network_components.php
* in the last lines (in the call function "print_select"). * in the last lines (in the call function "html_print_select").
*/ */
if ($id_component_type == 6) { if ($id_component_type == 6) {
@ -139,20 +139,20 @@ echo '<form name="component" method="post">';
$table->colspan['description'][1] = 3; $table->colspan['description'][1] = 3;
$data = array (); $data = array ();
$data[0] = __('Description'); $data[0] = __('Description');
$data[1] = print_textarea ('description', 2, 65, $description, '', true); $data[1] = html_print_textarea ('description', 2, 65, $description, '', true);
push_table_row ($data, 'description'); push_table_row ($data, 'description');
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
print_input_hidden ('id_component_type', $id_component_type); html_print_input_hidden ('id_component_type', $id_component_type);
if ($id) { if ($id) {
print_input_hidden ('update_component', 1); html_print_input_hidden ('update_component', 1);
print_input_hidden ('id', $id); html_print_input_hidden ('id', $id);
print_submit_button (__('Update'), 'upd', false, 'class="sub upd"'); html_print_submit_button (__('Update'), 'upd', false, 'class="sub upd"');
} else { } else {
print_input_hidden ('create_component', 1); html_print_input_hidden ('create_component', 1);
print_submit_button (__('Create'), 'crt', false, 'class="sub wand"'); html_print_submit_button (__('Create'), 'crt', false, 'class="sub wand"');
} }
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -45,7 +45,7 @@ $table->colspan[0][1] = 3;
$table->data = array (); $table->data = array ();
$table->data[0][0] = __('Name'); $table->data[0][0] = __('Name');
$table->data[0][1] = print_input_text ('name', $name, '', 55, 255, true); $table->data[0][1] = html_print_input_text ('name', $name, '', 55, 255, true);
$table->data[1][0] = __('Type') . ' ' . ui_print_help_icon ('module_type', true); $table->data[1][0] = __('Type') . ' ' . ui_print_help_icon ('module_type', true);
$sql = sprintf ('SELECT id_tipo, descripcion $sql = sprintf ('SELECT id_tipo, descripcion
@ -53,44 +53,44 @@ $sql = sprintf ('SELECT id_tipo, descripcion
WHERE categoria IN (%s) WHERE categoria IN (%s)
ORDER BY descripcion', ORDER BY descripcion',
implode (',', $categories)); implode (',', $categories));
$table->data[1][1] = print_select_from_sql ($sql, 'type', $table->data[1][1] = html_print_select_from_sql ($sql, 'type',
$type, ($id_component_type == 2 ? 'type_change()' : ''), '', '', true, $type, ($id_component_type == 2 ? 'type_change()' : ''), '', '', true,
false, false); false, false);
$table->data[1][2] = __('Module group'); $table->data[1][2] = __('Module group');
$table->data[1][3] = print_select_from_sql ('SELECT id_mg, name FROM tmodule_group ORDER BY name', $table->data[1][3] = html_print_select_from_sql ('SELECT id_mg, name FROM tmodule_group ORDER BY name',
'id_module_group', $id_module_group, '', '', '', true, false, false); 'id_module_group', $id_module_group, '', '', '', true, false, false);
$table->data[2][0] = __('Group'); $table->data[2][0] = __('Group');
$table->data[2][1] = print_select (get_network_component_groups (), $table->data[2][1] = html_print_select (get_network_component_groups (),
'id_group', $id_group, '', '', '', true, false, false); 'id_group', $id_group, '', '', '', true, false, false);
$table->data[2][2] = __('Interval'); $table->data[2][2] = __('Interval');
$table->data[2][3] = print_input_text ('module_interval', $module_interval, '', $table->data[2][3] = html_print_input_text ('module_interval', $module_interval, '',
5, 15, true); 5, 15, true);
$table->data[3][0] = __('Warning status'); $table->data[3][0] = __('Warning status');
$table->data[3][1] = '<em>'.__('Min.').'</em>'; $table->data[3][1] = '<em>'.__('Min.').'</em>';
$table->data[3][1] .= print_input_text ('min_warning', $min_warning, $table->data[3][1] .= html_print_input_text ('min_warning', $min_warning,
'', 5, 15, true); '', 5, 15, true);
$table->data[3][1] .= '<br /><em>'.__('Max.').'</em>'; $table->data[3][1] .= '<br /><em>'.__('Max.').'</em>';
$table->data[3][1] .= print_input_text ('max_warning', $max_warning, $table->data[3][1] .= html_print_input_text ('max_warning', $max_warning,
'', 5, 15, true); '', 5, 15, true);
$table->data[3][2] = __('Critical status'); $table->data[3][2] = __('Critical status');
$table->data[3][3] = '<em>'.__('Min.').'</em>'; $table->data[3][3] = '<em>'.__('Min.').'</em>';
$table->data[3][3] .= print_input_text ('min_critical', $min_critical, $table->data[3][3] .= html_print_input_text ('min_critical', $min_critical,
'', 5, 15, true); '', 5, 15, true);
$table->data[3][3] .= '<br /><em>'.__('Max.').'</em>'; $table->data[3][3] .= '<br /><em>'.__('Max.').'</em>';
$table->data[3][3] .= print_input_text ('max_critical', $max_critical, $table->data[3][3] .= html_print_input_text ('max_critical', $max_critical,
'', 5, 15, true); '', 5, 15, true);
$table->data[4][0] = __('FF threshold') . ' ' . ui_print_help_icon ('ff_threshold', true); $table->data[4][0] = __('FF threshold') . ' ' . ui_print_help_icon ('ff_threshold', true);
$table->data[4][1] = print_input_text ('ff_event', $ff_event, $table->data[4][1] = html_print_input_text ('ff_event', $ff_event,
'', 5, 15, true); '', 5, 15, true);
$table->data[4][2] = __('Historical data'); $table->data[4][2] = __('Historical data');
$table->data[4][3] = print_checkbox ("history_data", 1, $history_data, true); $table->data[4][3] = html_print_checkbox ("history_data", 1, $history_data, true);
$table->data[5][0] = __('Min. Value'); $table->data[5][0] = __('Min. Value');
$table->data[5][1] = print_input_text ('min', $min, '', 5, 15, true); $table->data[5][1] = html_print_input_text ('min', $min, '', 5, 15, true);
$table->data[5][2] = __('Max. Value'); $table->data[5][2] = __('Max. Value');
$table->data[5][3] = print_input_text ('max', $max, '', 5, 15, true); $table->data[5][3] = html_print_input_text ('max', $max, '', 5, 15, true);
?> ?>

View File

@ -38,49 +38,49 @@ $snmp_versions['3'] = 'v. 3';
$data = array (); $data = array ();
$data[0] = __('Port'); $data[0] = __('Port');
$data[1] = print_input_text ('tcp_port', $tcp_port, '', 5, 20, true); $data[1] = html_print_input_text ('tcp_port', $tcp_port, '', 5, 20, true);
$data[2] = __('SNMP version'); $data[2] = __('SNMP version');
$data[3] = print_select ($snmp_versions, 'snmp_version', $snmp_version, $data[3] = html_print_select ($snmp_versions, 'snmp_version', $snmp_version,
'', '', '', true, false, false, ''); '', '', '', true, false, false, '');
push_table_row ($data, 'snmp_port'); push_table_row ($data, 'snmp_port');
$data = array (); $data = array ();
$data[0] = __('SNMP OID'); $data[0] = __('SNMP OID');
$data[1] = print_input_text ('snmp_oid', $snmp_oid, '', 30, 400, true); $data[1] = html_print_input_text ('snmp_oid', $snmp_oid, '', 30, 400, true);
//$table->colspan['snmp_2'][1] = 3; //$table->colspan['snmp_2'][1] = 3;
$data[2] = __('SNMP community'); $data[2] = __('SNMP community');
$data[3] = print_input_text ('snmp_community', $snmp_community, '', 15, 60, true); $data[3] = html_print_input_text ('snmp_community', $snmp_community, '', 15, 60, true);
push_table_row ($data, 'snmp_2'); push_table_row ($data, 'snmp_2');
$data = array(); $data = array();
$data[0] = __('Auth user'); $data[0] = __('Auth user');
$data[1] = print_input_text ('snmp3_auth_user', $snmp3_auth_user, '', 15, 60, true); $data[1] = html_print_input_text ('snmp3_auth_user', $snmp3_auth_user, '', 15, 60, true);
$data[2] = __('Auth password'); $data[2] = __('Auth password');
$data[3] = print_input_text ('snmp3_auth_pass', $snmp3_auth_pass, '', 15, 60, true); $data[3] = print_input_text ('snmp3_auth_pass', $snmp3_auth_pass, '', 15, 60, true);
$data[3] .= print_input_hidden('active_snmp_v3', 0, true); $data[3] .= html_print_input_hidden('active_snmp_v3', 0, true);
push_table_row($data, 'field_snmpv3_row1'); push_table_row($data, 'field_snmpv3_row1');
$data = array(); $data = array();
$data[0] = __('Privacy method'); $data[0] = __('Privacy method');
$data[1] = print_select(array('DES' => __('DES'), 'AES' => __('AES')), 'snmp3_privacy_method', $snmp3_privacy_method, '', '', '', true); $data[1] = html_print_select(array('DES' => __('DES'), 'AES' => __('AES')), 'snmp3_privacy_method', $snmp3_privacy_method, '', '', '', true);
$data[2] = __('privacy pass'); $data[2] = __('privacy pass');
$data[3] = print_input_text ('snmp3_privacy_pass', $snmp3_privacy_pass, '', 15, 60, true); $data[3] = html_print_input_text ('snmp3_privacy_pass', $snmp3_privacy_pass, '', 15, 60, true);
push_table_row($data, 'field_snmpv3_row2'); push_table_row($data, 'field_snmpv3_row2');
$data = array(); $data = array();
$data[0] = __('Auth method'); $data[0] = __('Auth method');
$data[1] = print_select(array('MD5' => __('MD5'), 'SHA' => __('SHA')), 'snmp3_auth_method', $snmp3_auth_method, '', '', '', true); $data[1] = html_print_select(array('MD5' => __('MD5'), 'SHA' => __('SHA')), 'snmp3_auth_method', $snmp3_auth_method, '', '', '', true);
$data[2] = __('Security level'); $data[2] = __('Security level');
$data[3] = print_select(array('noAuthNoPriv' => __('Not auth and not privacy method'), $data[3] = html_print_select(array('noAuthNoPriv' => __('Not auth and not privacy method'),
'authNoPriv' => __('Auth and not privacy method'), 'authPriv' => __('Auth and privacy method')), 'snmp3_security_level', $snmp3_security_level, '', '', '', true); 'authNoPriv' => __('Auth and not privacy method'), 'authPriv' => __('Auth and privacy method')), 'snmp3_security_level', $snmp3_security_level, '', '', '', true);
push_table_row($data, 'field_snmpv3_row3'); push_table_row($data, 'field_snmpv3_row3');
$data = array(); $data = array();
$data[0] = __('Post process') . ' ' . ui_print_help_icon ('postprocess', true); $data[0] = __('Post process') . ' ' . ui_print_help_icon ('postprocess', true);
$data[1] = print_input_text ('post_process', $post_process, '', 12, 25, true); $data[1] = html_print_input_text ('post_process', $post_process, '', 12, 25, true);
$data[2] = $data[3] = ''; $data[2] = $data[3] = '';
push_table_row($data, 'field_process'); push_table_row($data, 'field_process');
@ -89,14 +89,14 @@ push_table_row($data, 'field_process');
/* Advanced stuff */ /* Advanced stuff */
$data = array (); $data = array ();
$data[0] = __('TCP send') . ' ' . ui_print_help_icon ("tcp_send", true); $data[0] = __('TCP send') . ' ' . ui_print_help_icon ("tcp_send", true);
$data[1] = print_textarea ('tcp_send', 2, 65, $tcp_send, '', true); $data[1] = html_print_textarea ('tcp_send', 2, 65, $tcp_send, '', true);
$table->colspan['tcp_send'][1] = 3; $table->colspan['tcp_send'][1] = 3;
push_table_row ($data, 'tcp_send'); push_table_row ($data, 'tcp_send');
$data = array(); $data = array();
$data[0] = __('TCP receive'); $data[0] = __('TCP receive');
$data[1] = print_textarea ('tcp_rcv', 2, 65, $tcp_rcv, '', true); $data[1] = html_print_textarea ('tcp_rcv', 2, 65, $tcp_rcv, '', true);
$table->colspan['tcp_receive'][1] = 3; $table->colspan['tcp_receive'][1] = 3;
push_table_row ($data, 'tcp_receive'); push_table_row ($data, 'tcp_receive');

View File

@ -22,14 +22,14 @@ echo "<h3>".__('Plugin component').'</h3>';
$data = array (); $data = array ();
$data[0] = __('Port'); $data[0] = __('Port');
$data[1] = print_input_text ('tcp_port', $tcp_port, '', 5, 20, true); $data[1] = html_print_input_text ('tcp_port', $tcp_port, '', 5, 20, true);
$table->colspan['plugin_0'][1] = 3; $table->colspan['plugin_0'][1] = 3;
push_table_row ($data, 'plugin_0'); push_table_row ($data, 'plugin_0');
$data = array (); $data = array ();
$data[0] = __('Plugin'); $data[0] = __('Plugin');
$data[1] = print_select_from_sql ('SELECT id, name FROM tplugin ORDER BY name', $data[1] = html_print_select_from_sql ('SELECT id, name FROM tplugin ORDER BY name',
'id_plugin', $id_plugin, '', __('None'), 0, true, false, false); 'id_plugin', $id_plugin, '', __('None'), 0, true, false, false);
$table->colspan['plugin_1'][1] = 3; $table->colspan['plugin_1'][1] = 3;
@ -37,18 +37,18 @@ push_table_row ($data, 'plugin_1');
$data = array (); $data = array ();
$data[0] = __('Username'); $data[0] = __('Username');
$data[1] = print_input_text ('plugin_user', $plugin_user, '', 15, 60, true); $data[1] = html_print_input_text ('plugin_user', $plugin_user, '', 15, 60, true);
$data[2] = _('Password'); $data[2] = _('Password');
$data[3] = print_input_password ('plugin_pass', $plugin_pass, '', 15, 60, true); $data[3] = html_print_input_password ('plugin_pass', $plugin_pass, '', 15, 60, true);
push_table_row ($data, 'plugin_2'); push_table_row ($data, 'plugin_2');
$data = array (); $data = array ();
$data[0] = __('Plugin parameters'); $data[0] = __('Plugin parameters');
$data[0] .= ui_print_help_icon ('plugin_parameters', true); $data[0] .= ui_print_help_icon ('plugin_parameters', true);
$data[1] = print_input_text ('plugin_parameter', $plugin_parameter, '', 30, 255, true); $data[1] = html_print_input_text ('plugin_parameter', $plugin_parameter, '', 30, 255, true);
$data[2] = __('Post process') . ' ' . ui_print_help_icon ('postprocess', true); $data[2] = __('Post process') . ' ' . ui_print_help_icon ('postprocess', true);
$data[3] = print_input_text ('post_process', $post_process, '', 12, 25, true); $data[3] = html_print_input_text ('post_process', $post_process, '', 12, 25, true);
push_table_row ($data, 'plugin_3'); push_table_row ($data, 'plugin_3');

View File

@ -32,31 +32,31 @@ echo "<h3>".__('WMI component management').'</h3>';
$data = array (); $data = array ();
$data[0] = __('WMI query'); $data[0] = __('WMI query');
$data[1] = print_input_text ('snmp_oid', $snmp_oid, '', 25, 255, true); $data[1] = html_print_input_text ('snmp_oid', $snmp_oid, '', 25, 255, true);
$data[2] = __('Key string') . ' ' . ui_print_help_icon ('wmikey', true); $data[2] = __('Key string') . ' ' . ui_print_help_icon ('wmikey', true);
$data[3] = print_input_text ('snmp_community', $snmp_community, '', 25, 255, true); $data[3] = html_print_input_text ('snmp_community', $snmp_community, '', 25, 255, true);
push_table_row ($data, 'wmi_1'); push_table_row ($data, 'wmi_1');
$data = array (); $data = array ();
$data[0] = __('Field number') . ' ' . ui_print_help_icon ('wmifield', true); $data[0] = __('Field number') . ' ' . ui_print_help_icon ('wmifield', true);
$data[1] = print_input_text ('tcp_port', $tcp_port, '', 5, 25, true); $data[1] = html_print_input_text ('tcp_port', $tcp_port, '', 5, 25, true);
$data[2] = __('Namespace') . ' ' . ui_print_help_icon ('wminamespace', true); $data[2] = __('Namespace') . ' ' . ui_print_help_icon ('wminamespace', true);
$data[3] = print_input_text ('tcp_send', $tcp_send, '', 25, 255, true); $data[3] = html_print_input_text ('tcp_send', $tcp_send, '', 25, 255, true);
push_table_row ($data, 'wmi_2'); push_table_row ($data, 'wmi_2');
$data = array (); $data = array ();
$data[0] = __('Username'); $data[0] = __('Username');
$data[1] = print_input_text ('plugin_user', $plugin_user, '', 15, 255, true); $data[1] = html_print_input_text ('plugin_user', $plugin_user, '', 15, 255, true);
$data[2] = __('Password'); $data[2] = __('Password');
$data[3] = print_input_password ('plugin_pass', $plugin_pass, '', 25, 255, true); $data[3] = html_print_input_password ('plugin_pass', $plugin_pass, '', 25, 255, true);
push_table_row ($data, 'wmi_3'); push_table_row ($data, 'wmi_3');
$data = array(); $data = array();
$data[0] = __('Post process') . ' ' . ui_print_help_icon ('postprocess', true); $data[0] = __('Post process') . ' ' . ui_print_help_icon ('postprocess', true);
$data[1] = print_input_text ('post_process', $post_process, '', 12, 25, true); $data[1] = html_print_input_text ('post_process', $post_process, '', 12, 25, true);
$data[2] = $data[3] = ''; $data[2] = $data[3] = '';
push_table_row($data, 'field_process'); push_table_row($data, 'field_process');
@ -108,7 +108,7 @@ echo '<tr>';
// Component group // Component group
echo '<td class="datos">' . __('Group') . '</td>'; echo '<td class="datos">' . __('Group') . '</td>';
echo '<td class="datos">'; echo '<td class="datos">';
print_select (get_network_component_groups (), html_print_select (get_network_component_groups (),
'id_group', $id_group, '', '', '', false, false, false); 'id_group', $id_group, '', '', '', false, false, false);
// Module group // Module group
@ -206,18 +206,18 @@ echo '</textarea>';
echo '</td></tr>'; echo '</td></tr>';
echo '</table>'; echo '</table>';
print_input_hidden ('id_modulo', $id_component_type); html_print_input_hidden ('id_modulo', $id_component_type);
// Update/Add buttons // Update/Add buttons
echo '<div class="action-buttons" style="width: 95%">'; echo '<div class="action-buttons" style="width: 95%">';
if ($id) { if ($id) {
print_input_hidden ('update_component', 1); html_print_input_hidden ('update_component', 1);
print_input_hidden ('id', $id); html_print_input_hidden ('id', $id);
print_submit_button (__('Update'), 'crt', false, 'class="sub upd"'); html_print_submit_button (__('Update'), 'crt', false, 'class="sub upd"');
} }
else { else {
print_input_hidden ('create_component', 1); html_print_input_hidden ('create_component', 1);
print_submit_button (__('Create'), 'crt', false, 'class="sub next"'); html_print_submit_button (__('Create'), 'crt', false, 'class="sub next"');
} }
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -154,23 +154,23 @@ foreach ($result as $row) {
$data = array (); $data = array ();
$data[0] = '<a href="index.php?sec=gmodules&amp;sec2=godmode/modules/manage_network_templates_form&amp;id_np='.$row["id_np"].'">'. safe_output($row["name"]).'</a>'; $data[0] = '<a href="index.php?sec=gmodules&amp;sec2=godmode/modules/manage_network_templates_form&amp;id_np='.$row["id_np"].'">'. safe_output($row["name"]).'</a>';
$data[1] = ui_print_truncate_text(safe_output($row["description"]), 70, true, true, true, true); $data[1] = ui_print_truncate_text(safe_output($row["description"]), 70, true, true, true, true);
$data[2] = print_input_image ("delete_profile", "images/cross.png", $data[2] = html_print_input_image ("delete_profile", "images/cross.png",
$row["id_np"],'', true, $row["id_np"],'', true,
array ('onclick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;')); array ('onclick' => 'if (!confirm(\''.__('Are you sure?').'\')) return false;'));
$data[2] .= print_input_image ("export_profile", "images/lightning_go.png", $data[2] .= html_print_input_image ("export_profile", "images/lightning_go.png",
$row["id_np"], '', true); $row["id_np"], '', true);
$data[2] = '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates' . $data[2] = '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates' .
'&delete_profile=1&delete_profile=' . $row['id_np'] . '" ' . '&delete_profile=1&delete_profile=' . $row['id_np'] . '" ' .
'onclick="if (!confirm(\''.__('Are you sure?').'\')) return false;">' . print_image("images/cross.png", true) . '</a>'; 'onclick="if (!confirm(\''.__('Are you sure?').'\')) return false;">' . html_print_image("images/cross.png", true) . '</a>';
$data[2] .= '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates' . $data[2] .= '<a href="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates' .
'&export_profile=' . $row['id_np'] . '">' . print_image("images/lightning_go.png", true) . '</a>'; '&export_profile=' . $row['id_np'] . '">' . html_print_image("images/lightning_go.png", true) . '</a>';
array_push ($table->data, $data); array_push ($table->data, $data);
} }
if (!empty ($table->data)) { if (!empty ($table->data)) {
echo '<form method="post" action="index.php?sec=gmodules&amp;sec2=godmode/modules/manage_network_templates">'; echo '<form method="post" action="index.php?sec=gmodules&amp;sec2=godmode/modules/manage_network_templates">';
print_table ($table); html_print_table ($table);
echo '</form>'; echo '</form>';
} else { } else {
echo '<div class="nf" style="width:'.$table->width.'">'.__('There are no defined network profiles').'</div>'; echo '<div class="nf" style="width:'.$table->width.'">'.__('There are no defined network profiles').'</div>';
@ -178,7 +178,7 @@ if (!empty ($table->data)) {
echo '<form method="post" action="index.php?sec=gmodules&amp;sec2=godmode/modules/manage_network_templates_form">'; echo '<form method="post" action="index.php?sec=gmodules&amp;sec2=godmode/modules/manage_network_templates_form">';
echo '<div style="width: '.$table->width.'" class="action-buttons">'; echo '<div style="width: '.$table->width.'" class="action-buttons">';
print_submit_button (__('Create'), "crt", '', 'class="sub next"'); html_print_submit_button (__('Create'), "crt", '', 'class="sub next"');
echo '</div></form>'; echo '</div></form>';
?> ?>

View File

@ -123,19 +123,19 @@ else {
echo '<table width="550" cellpadding="4" cellspacing="4" class="databox_color">'; echo '<table width="550" cellpadding="4" cellspacing="4" class="databox_color">';
echo '<tr><td class="datos">'.__('Name').'</td><td class="datos">'; echo '<tr><td class="datos">'.__('Name').'</td><td class="datos">';
print_input_text ("name", $name, '', 63); html_print_input_text ("name", $name, '', 63);
echo '</td></tr>'; echo '</td></tr>';
echo '<tr><td class="datos2">'.__('Description').'</td>'; echo '<tr><td class="datos2">'.__('Description').'</td>';
echo '<td class="datos2">'; echo '<td class="datos2">';
print_textarea ("description", 2, 60, $description); html_print_textarea ("description", 2, 60, $description);
echo "</td></tr>"; echo "</td></tr>";
echo '<tr><td></td><td style="text-align:right;">'; echo '<tr><td></td><td style="text-align:right;">';
if ($id_np > 0) { if ($id_np > 0) {
print_submit_button (__("Update"), "updbutton", false, 'class="sub upd"'); html_print_submit_button (__("Update"), "updbutton", false, 'class="sub upd"');
} }
else { else {
print_submit_button (__("Create"), "crtbutton", false, 'class="sub wand"'); html_print_submit_button (__("Create"), "crtbutton", false, 'class="sub wand"');
} }
echo "</td></tr></table></form>"; echo "</td></tr></table></form>";
@ -180,24 +180,24 @@ if ($id_np > 0) {
$table->head[2] = __('Description'); $table->head[2] = __('Description');
$table->head[3] = __('Group'); $table->head[3] = __('Group');
$table->align[3] = "center"; $table->align[3] = "center";
$table->head[4] = print_checkbox_extended ('allbox', '', false, false, 'CheckAll();', '', true); $table->head[4] = html_print_checkbox_extended ('allbox', '', false, false, 'CheckAll();', '', true);
$table->align[4] = "center"; $table->align[4] = "center";
foreach ($result as $row) { foreach ($result as $row) {
$data = array (); $data = array ();
$data[0] = $row["name"]; $data[0] = $row["name"];
$data[1] = print_image("images/".show_icon_type($row["type"]), true, array("border" => '0')); $data[1] = html_print_image("images/".show_icon_type($row["type"]), true, array("border" => '0'));
$data[2] = mb_strimwidth($row["description"],0,30,"..."); $data[2] = mb_strimwidth($row["description"],0,30,"...");
$data[3] = get_network_component_group_name ($row["group"]); $data[3] = get_network_component_group_name ($row["group"]);
$data[4] = print_checkbox ("components[]", $row["component_id"], false, true); $data[4] = html_print_checkbox ("components[]", $row["component_id"], false, true);
array_push ($table->data, $data); array_push ($table->data, $data);
} }
if (!empty ($table->data)) { if (!empty ($table->data)) {
echo '<form name="component_delete" method="post" action="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates_form&id_np='.$id_np.'&delete_module=1">'; echo '<form name="component_delete" method="post" action="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates_form&id_np='.$id_np.'&delete_module=1">';
print_table ($table); html_print_table ($table);
echo '<div style="width:540px; text-align:right">'; echo '<div style="width:540px; text-align:right">';
print_submit_button (__('Delete'), "delbutton", false, 'class="sub delete" onClick="if (!confirm(\'Are you sure?\')) return false;"'); html_print_submit_button (__('Delete'), "delbutton", false, 'class="sub delete" onClick="if (!confirm(\'Are you sure?\')) return false;"');
echo '</div></form>'; echo '</div></form>';
} }
unset ($table); unset ($table);
@ -226,9 +226,9 @@ if ($id_np > 0) {
$groups_compound[$row["id_sg"]] .= $row["name"]; $groups_compound[$row["id_sg"]] .= $row["name"];
} }
print_select ($groups_compound, "ncgroup", $ncgroup, 'javascript:this.form.submit();', __('Group')." - ".__('All'), -1, false, false, true, '" style="width:350px'); html_print_select ($groups_compound, "ncgroup", $ncgroup, 'javascript:this.form.submit();', __('Group')." - ".__('All'), -1, false, false, true, '" style="width:350px');
echo '<noscript>'; echo '<noscript>';
print_submit_button (__('Filter'), 'ncgbutton', false, 'class="sub search"'); html_print_submit_button (__('Filter'), 'ncgbutton', false, 'class="sub search"');
echo '</noscript></div></form>'; echo '</noscript></div></form>';
echo '<form name="add_module" method="post" action="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates_form&id_np='.$id_np.'&add_module=1">'; echo '<form name="add_module" method="post" action="index.php?sec=gmodules&sec2=godmode/modules/manage_network_templates_form&id_np='.$id_np.'&add_module=1">';
@ -249,9 +249,9 @@ if ($id_np > 0) {
$components[$row["id_nc"]] = $row["name"]; $components[$row["id_nc"]] = $row["name"];
} }
print_select ($components, "components[]", $id_nc, '', '', -1, false, true, false, '" style="width:350px'); html_print_select ($components, "components[]", $id_nc, '', '', -1, false, true, false, '" style="width:350px');
echo "&nbsp;&nbsp;"; echo "&nbsp;&nbsp;";
print_submit_button (__('Add'), 'crtbutton', false, 'class="sub wand"'); html_print_submit_button (__('Add'), 'crtbutton', false, 'class="sub wand"');
echo "</div></form>"; echo "</div></form>";
} }

View File

@ -77,7 +77,7 @@ foreach ($rows as $row) {
echo " echo "
<tr> <tr>
<td class='$tdcolor' align='center'>" . <td class='$tdcolor' align='center'>" .
print_image("images/".$row["icon"], true, array("border" => '0')) . html_print_image("images/".$row["icon"], true, array("border" => '0')) .
"</td> "</td>
<td class='$tdcolor'> <td class='$tdcolor'>
<b>".$row["id_tipo"]." <b>".$row["id_tipo"]."

View File

@ -99,14 +99,14 @@ if(count($module_array) > 0){
echo "<td class='$tdcolor' align='center'>"; echo "<td class='$tdcolor' align='center'>";
echo "<table><tr>"; echo "<table><tr>";
$new_weight = $weight_array[$a]-0.125; $new_weight = $weight_array[$a]-0.125;
echo "<td align='center'><a href='index.php?sec=greporting&sec2=godmode/reporting/graph_builder&edit_graph=1&tab=graph_editor&change_weight=1&weight=".$new_weight."&id=". $id ."&graph=" . $idgs_array[$a] . "'>".print_image('images/down.png', true, array ('title' => __('Decrease Weight')))."</a></td>"; echo "<td align='center'><a href='index.php?sec=greporting&sec2=godmode/reporting/graph_builder&edit_graph=1&tab=graph_editor&change_weight=1&weight=".$new_weight."&id=". $id ."&graph=" . $idgs_array[$a] . "'>".html_print_image('images/down.png', true, array ('title' => __('Decrease Weight')))."</a></td>";
echo "<td align='center'>$weight_array[$a]</td>"; echo "<td align='center'>$weight_array[$a]</td>";
$new_weight = $weight_array[$a]+0.125; $new_weight = $weight_array[$a]+0.125;
echo "<td align='center'><a href='index.php?sec=greporting&sec2=godmode/reporting/graph_builder&edit_graph=1&tab=graph_editor&change_weight=1&weight=".$new_weight."&id=". $id ."&graph=" . $idgs_array[$a] . "'>".print_image('images/up.png', true, array ('title' => __('Increase Weight')))."</a></td>"; echo "<td align='center'><a href='index.php?sec=greporting&sec2=godmode/reporting/graph_builder&edit_graph=1&tab=graph_editor&change_weight=1&weight=".$new_weight."&id=". $id ."&graph=" . $idgs_array[$a] . "'>".html_print_image('images/up.png', true, array ('title' => __('Increase Weight')))."</a></td>";
echo "</tr></table>"; echo "</tr></table>";
echo "</td>"; echo "</td>";
echo "<td class='$tdcolor' align='center'>"; echo "<td class='$tdcolor' align='center'>";
echo "<a href='index.php?sec=greporting&sec2=godmode/reporting/graph_builder&edit_graph=1&tab=graph_editor&delete_module=1&id=". $id ."&delete=" . $idgs_array[$a] . "'>".print_image('images/cross.png', true, array ('title' => __('Delete')))."</a>"; echo "<a href='index.php?sec=greporting&sec2=godmode/reporting/graph_builder&edit_graph=1&tab=graph_editor&delete_module=1&id=". $id ."&delete=" . $idgs_array[$a] . "'>".html_print_image('images/cross.png', true, array ('title' => __('Delete')))."</a>";
echo "</td></tr>"; echo "</td></tr>";
} }
@ -122,15 +122,15 @@ echo "<table width='500' cellpadding='4' cellpadding='4' class='databox_color'>"
echo "<tr>"; echo "<tr>";
echo "<td colspan='3'>".__('Filter group')."</td>"; echo "<td colspan='3'>".__('Filter group')."</td>";
echo "</tr><tr>"; echo "</tr><tr>";
echo "<td colspan='3'>".print_select(get_all_groups(), 'group', '', "filterByGroup($('#group').val());", __('All'), '0', true)."</td>"; echo "<td colspan='3'>".html_print_select(groups_get_all(), 'group', '', "filterByGroup($('#group').val());", __('All'), '0', true)."</td>";
echo "</tr><tr>"; echo "</tr><tr>";
echo "<td style='vertical-align: top;'>".__('Agents')."</td>"; echo "<td style='vertical-align: top;'>".__('Agents')."</td>";
echo "<td></td>"; echo "<td></td>";
echo "<td style='vertical-align: top;'>".__('Modules')."</td>"; echo "<td style='vertical-align: top;'>".__('Modules')."</td>";
echo "</tr><tr>"; echo "</tr><tr>";
echo "<td>".print_select (get_group_agents(), 'id_agents[]', 0, false, '', '', true, true, true, '', false, 'width:200px;')."</td>"; echo "<td>".html_print_select (get_group_agents(), 'id_agents[]', 0, false, '', '', true, true, true, '', false, 'width:200px;')."</td>";
echo "<td style='vertical-align: center; text-align: center;'>" . print_image("images/darrowright.png", true) . "</td>"; echo "<td style='vertical-align: center; text-align: center;'>" . html_print_image("images/darrowright.png", true) . "</td>";
echo "<td>".print_select (array (), 'module[]', 0, false, '', 0, true, true, true, '', false, 'width:200px;')."</td>"; echo "<td>".html_print_select (array (), 'module[]', 0, false, '', 0, true, true, true, '', false, 'width:200px;')."</td>";
echo "</tr><tr>"; echo "</tr><tr>";
echo "<td colspan='3'>"; echo "<td colspan='3'>";
echo "<table cellpadding='4'><tr>"; echo "<table cellpadding='4'><tr>";

View File

@ -105,7 +105,7 @@ else
$return_all_groups = false; $return_all_groups = false;
echo "<td><b>".__('Group')."</b></td><td>" . echo "<td><b>".__('Group')."</b></td><td>" .
print_select_groups($config['id_user'], "AR", $return_all_groups, 'graph_id_group', $id_group, '', '', '', true) . html_print_select_groups($config['id_user'], "AR", $return_all_groups, 'graph_id_group', $id_group, '', '', '', true) .
"</td></tr>"; "</td></tr>";
echo "<tr>"; echo "<tr>";
echo "<td class='datos2'><b>".__('Description')."</b></td>"; echo "<td class='datos2'><b>".__('Description')."</b></td>";
@ -137,7 +137,7 @@ echo "<tr>";
echo "<td class='datos'>"; echo "<td class='datos'>";
echo "<b>".__('Period')."</b></td>"; echo "<b>".__('Period')."</b></td>";
echo "<td class='datos'>"; echo "<td class='datos'>";
print_select ($periods, 'period', $period); html_print_select ($periods, 'period', $period);
echo "</td><td class='datos2'>"; echo "</td><td class='datos2'>";
echo "<b>".__('Stacked')."</b></td>"; echo "<b>".__('Stacked')."</b></td>";
echo "<td class='datos2'>"; echo "<td class='datos2'>";
@ -149,21 +149,21 @@ $stackeds = array(
GRAPH_STACKED_AREA => __('Stacked area'), GRAPH_STACKED_AREA => __('Stacked area'),
GRAPH_LINE => __('Line'), GRAPH_LINE => __('Line'),
GRAPH_STACKED_LINE => __('Stacked line')); GRAPH_STACKED_LINE => __('Stacked line'));
print_select ($stackeds, 'stacked', $stacked); html_print_select ($stackeds, 'stacked', $stacked);
echo "</td>"; echo "</td>";
echo "<tr>"; echo "<tr>";
echo "<td class='datos'>"; echo "<td class='datos'>";
echo "<b>".__('View events')."</b></td>"; echo "<b>".__('View events')."</b></td>";
echo "<td class='datos'>"; echo "<td class='datos'>";
print_checkbox('events', 1, $events); html_print_checkbox('events', 1, $events);
echo "</td>"; echo "</td>";
echo "<td></td><td></td>"; echo "<td></td><td></td>";
/*echo "<td class='datos'>"; /*echo "<td class='datos'>";
echo "<b>".__('View alerts')."</b></td>"; echo "<b>".__('View alerts')."</b></td>";
echo "<td class='datos'>"; echo "<td class='datos'>";
print_checkbox('alerts', 1, $alerts); html_print_checkbox('alerts', 1, $alerts);
echo "</td>";*/ echo "</td>";*/
echo "</tr>"; echo "</tr>";

View File

@ -152,13 +152,13 @@ if($edit_graph) {
$buttons = array( $buttons = array(
'main' => array('active' => false, 'main' => array('active' => false,
'text' => '<a href="index.php?sec=greporting&sec2=godmode/reporting/graph_builder&tab=main&edit_graph=1&id=' . $id_graph . '">' . 'text' => '<a href="index.php?sec=greporting&sec2=godmode/reporting/graph_builder&tab=main&edit_graph=1&id=' . $id_graph . '">' .
print_image("images/setup.png", true, array ("title" => __('Setup'))) .'</a>'), html_print_image("images/setup.png", true, array ("title" => __('Setup'))) .'</a>'),
'graph_editor' => array('active' => false, 'graph_editor' => array('active' => false,
'text' => '<a href="index.php?sec=greporting&sec2=godmode/reporting/graph_builder&tab=graph_editor&edit_graph=1&id=' . $id_graph . '">' . 'text' => '<a href="index.php?sec=greporting&sec2=godmode/reporting/graph_builder&tab=graph_editor&edit_graph=1&id=' . $id_graph . '">' .
print_image("images/config.png", true, array ("title" => __('Graph editor'))) .'</a>'), html_print_image("images/config.png", true, array ("title" => __('Graph editor'))) .'</a>'),
'preview' => array('active' => false, 'preview' => array('active' => false,
'text' => '<a href="index.php?sec=greporting&sec2=godmode/reporting/graph_builder&tab=preview&edit_graph=1&id=' . $id_graph . '">' . 'text' => '<a href="index.php?sec=greporting&sec2=godmode/reporting/graph_builder&tab=preview&edit_graph=1&id=' . $id_graph . '">' .
print_image("images/chart_curve.png", true, array ("title" => __('Preview'))) .'</a>') html_print_image("images/chart_curve.png", true, array ("title" => __('Preview'))) .'</a>')
); );
$buttons[$active_tab]['active'] = true; $buttons[$active_tab]['active'] = true;

View File

@ -155,17 +155,17 @@ echo "<td>";
echo "<b>".__('Date')."</b>"." "; echo "<b>".__('Date')."</b>"." ";
echo "</td>"; echo "</td>";
echo "<td>"; echo "<td>";
echo print_input_text ('date', $date, '', 12, 10, true). ' '; echo html_print_input_text ('date', $date, '', 12, 10, true). ' ';
echo "</td>"; echo "</td>";
echo "<td>"; echo "<td>";
echo print_input_text ('time', $time, '', 7, 7, true). ' '; echo html_print_input_text ('time', $time, '', 7, 7, true). ' ';
echo "</td>"; echo "</td>";
echo "<td class='datos'>"; echo "<td class='datos'>";
echo "<b>".__('Period')."</b>"; echo "<b>".__('Period')."</b>";
echo "</td>"; echo "</td>";
echo "<td class='datos'>"; echo "<td class='datos'>";
print_select (custom_graphs_get_periods (), 'period', intval ($period / 3600), html_print_select (custom_graphs_get_periods (), 'period', intval ($period / 3600),
'', '', 0, false, false, false); '', '', 0, false, false, false);
echo "</td>"; echo "</td>";
@ -176,7 +176,7 @@ $stackeds[0] = __('Area');
$stackeds[1] = __('Stacked area'); $stackeds[1] = __('Stacked area');
$stackeds[2] = __('Line'); $stackeds[2] = __('Line');
$stackeds[3] = __('Stacked line'); $stackeds[3] = __('Stacked line');
print_select ($stackeds, 'stacked', $stacked , '', '', -1, false, false); html_print_select ($stackeds, 'stacked', $stacked , '', '', -1, false, false);
echo "</td>"; echo "</td>";
echo "<td class='datos'>"; echo "<td class='datos'>";
@ -185,7 +185,7 @@ $zooms[0] = __('Graph defined');
$zooms[1] = __('Zoom x1'); $zooms[1] = __('Zoom x1');
$zooms[2] = __('Zoom x2'); $zooms[2] = __('Zoom x2');
$zooms[3] = __('Zoom x3'); $zooms[3] = __('Zoom x3');
print_select ($zooms, 'zoom', $zoom , '', '', 0); html_print_select ($zooms, 'zoom', $zoom , '', '', 0);
echo "</td>"; echo "</td>";
echo "<td class='datos'>"; echo "<td class='datos'>";

View File

@ -95,7 +95,7 @@ if (! empty ($graphs)) {
$data = array (); $data = array ();
$data[0] = '<a href="index.php?sec=reporting&sec2=operation/reporting/graph_viewer&view_graph=1&id='. $data[0] = '<a href="index.php?sec=reporting&sec2=operation/reporting/graph_viewer&view_graph=1&id='.
$graph['id_graph'].'">' . print_image('images/eye.png', true) . "</a>" . '</a>'; $graph['id_graph'].'">' . html_print_image('images/eye.png', true) . "</a>" . '</a>';
$data[1] = '<a href="index.php?sec=greporting&sec2=godmode/reporting/graph_builder&edit_graph=1&id='. $data[1] = '<a href="index.php?sec=greporting&sec2=godmode/reporting/graph_builder&edit_graph=1&id='.
$graph['id_graph'].'">'.$graph['name'].'</a>'; $graph['id_graph'].'">'.$graph['name'].'</a>';
$data[2] = $graph["description"]; $data[2] = $graph["description"];
@ -106,12 +106,12 @@ if (! empty ($graphs)) {
if (check_acl ($config['id_user'], 0, "AW")) { if (check_acl ($config['id_user'], 0, "AW")) {
$data[5] = '<a href="index.php?sec=greporting&sec2=godmode/reporting/graphs&delete_graph=1&id=' $data[5] = '<a href="index.php?sec=greporting&sec2=godmode/reporting/graphs&delete_graph=1&id='
.$graph['id_graph'].'" onClick="if (!confirm(\''.__('Are you sure?').'\')) .$graph['id_graph'].'" onClick="if (!confirm(\''.__('Are you sure?').'\'))
return false;">' . print_image("images/cross.png", true) . '</a>'; return false;">' . html_print_image("images/cross.png", true) . '</a>';
} }
array_push ($table->data, $data); array_push ($table->data, $data);
} }
print_table ($table); html_print_table ($table);
} }
else { else {
echo "<div class='nf'>".__('There are no defined reportings')."</div>"; echo "<div class='nf'>".__('There are no defined reportings')."</div>";
@ -119,7 +119,7 @@ else {
echo '<form method="post" action="index.php?sec=greporting&sec2=godmode/reporting/graph_builder">'; echo '<form method="post" action="index.php?sec=greporting&sec2=godmode/reporting/graph_builder">';
echo '<div class="action-buttons" style="width: 720px;">'; echo '<div class="action-buttons" style="width: 720px;">';
print_submit_button (__('Create graph'), 'create', false, 'class="sub next"'); html_print_submit_button (__('Create graph'), 'create', false, 'class="sub next"');
echo "</div>"; echo "</div>";
echo "</form>"; echo "</form>";
?> ?>

View File

@ -133,12 +133,12 @@ if (!$maps) {
$data[1] = ui_print_group_icon ($map['id_group'], true); $data[1] = ui_print_group_icon ($map['id_group'], true);
$data[2] = db_get_sql ("SELECT COUNT(*) FROM tlayout_data WHERE id_layout = ".$map['id']); $data[2] = db_get_sql ("SELECT COUNT(*) FROM tlayout_data WHERE id_layout = ".$map['id']);
$data[3] = '<a href="index.php?sec=gmap&amp;sec2=godmode/reporting/map_builder&amp;id_layout='.$map['id'].'&amp;copy_layout=1">'.print_image ("images/copy.png", true).'</a>'; $data[3] = '<a href="index.php?sec=gmap&amp;sec2=godmode/reporting/map_builder&amp;id_layout='.$map['id'].'&amp;copy_layout=1">'.html_print_image ("images/copy.png", true).'</a>';
$data[4] = '<a href="index.php?sec=gmap&amp;sec2=godmode/reporting/map_builder&amp;id_layout='.$map['id'].'&amp;delete_layout=1">'.print_image ("images/cross.png", true).'</a>'; $data[4] = '<a href="index.php?sec=gmap&amp;sec2=godmode/reporting/map_builder&amp;id_layout='.$map['id'].'&amp;delete_layout=1">'.html_print_image ("images/cross.png", true).'</a>';
array_push ($table->data, $data); array_push ($table->data, $data);
} }
} }
print_table ($table); html_print_table ($table);
} }
if (!$maps) { if (!$maps) {
echo '<div class="action-buttons" style="width: 0px;">'; echo '<div class="action-buttons" style="width: 0px;">';
@ -147,8 +147,8 @@ else {
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
} }
echo '<form action="index.php?sec=gmap&amp;sec2=godmode/reporting/visual_console_builder" method="post">'; echo '<form action="index.php?sec=gmap&amp;sec2=godmode/reporting/visual_console_builder" method="post">';
print_input_hidden ('edit_layout', 1); html_print_input_hidden ('edit_layout', 1);
print_submit_button (__('Create'), '', false, 'class="sub next"'); html_print_submit_button (__('Create'), '', false, 'class="sub next"');
echo '</form>'; echo '</form>';
echo '</div>'; echo '</div>';
?> ?>

View File

@ -282,7 +282,7 @@ $intervals[2592000] = human_time_description_raw (2592000);
$urlForm = 'index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=item_editor&action=' . $actionParameter . '&id_report=' . $idReport; $urlForm = 'index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=item_editor&action=' . $actionParameter . '&id_report=' . $idReport;
echo '<form action="' . $urlForm . '" method="post">'; echo '<form action="' . $urlForm . '" method="post">';
print_input_hidden('id_item', $idItem); html_print_input_hidden('id_item', $idItem);
?> ?>
<table style="" class="databox" id="" border="0" cellpadding="4" cellspacing="4" width="95%"> <table style="" class="databox" id="" border="0" cellpadding="4" cellspacing="4" width="95%">
<tbody> <tbody>
@ -291,7 +291,7 @@ print_input_hidden('id_item', $idItem);
<td style=""> <td style="">
<?php <?php
if ($action == 'new') { if ($action == 'new') {
print_select(get_report_types(), 'type', $type, 'chooseType();', '', ''); html_print_select(get_report_types(), 'type', $type, 'chooseType();', '', '');
} }
else { else {
echo get_report_name($type); echo get_report_name($type);
@ -302,36 +302,36 @@ print_input_hidden('id_item', $idItem);
</tr> </tr>
<tr id="row_description" style="" class="datos"> <tr id="row_description" style="" class="datos">
<td style="vertical-align: top;"><?php echo __('Description'); ?></td> <td style="vertical-align: top;"><?php echo __('Description'); ?></td>
<td style=""><?php echo print_textarea('description', 3, 25, $description); ?></td> <td style=""><?php echo html_print_textarea('description', 3, 25, $description); ?></td>
</tr> </tr>
<tr id="row_period" style="" class="datos"> <tr id="row_period" style="" class="datos">
<td style="vertical-align: top;"><?php echo __('Period'); ?></td> <td style="vertical-align: top;"><?php echo __('Period'); ?></td>
<td style=""><?php print_extended_select_for_time ($intervals, 'period', $period, '', '', '0', 10); echo __(" seconds."); ?></td> <td style=""><?php html_print_extended_select_for_time ($intervals, 'period', $period, '', '', '0', 10); echo __(" seconds."); ?></td>
</tr> </tr>
<tr id="row_only_display_wrong" style="" class="datos"> <tr id="row_only_display_wrong" style="" class="datos">
<td><?php echo __('Only display wrong SLAs');?></td> <td><?php echo __('Only display wrong SLAs');?></td>
<td><?php print_checkbox('checkbox_only_display_wrong', 1, $only_display_wrong);?></td> <td><?php html_print_checkbox('checkbox_only_display_wrong', 1, $only_display_wrong);?></td>
</tr> </tr>
<tr id="row_working_time"> <tr id="row_working_time">
<td style="vertical-align: top;"><?php echo __('Working time');?></td> <td style="vertical-align: top;"><?php echo __('Working time');?></td>
<td> <td>
<table border="0"> <table border="0">
<tr> <tr>
<td><?php echo __('Monday'); print_checkbox('monday', 1, $monday);?></td> <td><?php echo __('Monday'); html_print_checkbox('monday', 1, $monday);?></td>
<td><?php echo __('Tuesday'); print_checkbox('tuesday', 1, $tuesday);?></td> <td><?php echo __('Tuesday'); html_print_checkbox('tuesday', 1, $tuesday);?></td>
<td><?php echo __('Wednesday'); print_checkbox('wednesday', 1, $wednesday);?></td> <td><?php echo __('Wednesday'); html_print_checkbox('wednesday', 1, $wednesday);?></td>
<td><?php echo __('Thursday'); print_checkbox('thursday', 1, $thursday);?></td> <td><?php echo __('Thursday'); html_print_checkbox('thursday', 1, $thursday);?></td>
<td><?php echo __('Friday'); print_checkbox('friday', 1, $friday);?></td> <td><?php echo __('Friday'); html_print_checkbox('friday', 1, $friday);?></td>
<td><?php echo __('Saturday'); print_checkbox('saturday', 1, $saturday);?></td> <td><?php echo __('Saturday'); html_print_checkbox('saturday', 1, $saturday);?></td>
<td><?php echo __('Sunday'); print_checkbox('sunday', 1, $sunday);?></td> <td><?php echo __('Sunday'); html_print_checkbox('sunday', 1, $sunday);?></td>
</tr> </tr>
<tr> <tr>
<td><?php echo __('Time from');?></td> <td><?php echo __('Time from');?></td>
<td colspan="6"><?php print_input_text ('time_from', $time_from, '', 7, 7);?></td> <td colspan="6"><?php html_print_input_text ('time_from', $time_from, '', 7, 7);?></td>
</tr> </tr>
<tr> <tr>
<td><?php echo __('Time to');?></td> <td><?php echo __('Time to');?></td>
<td colspan="6"><?php print_input_text ('time_to', $time_to, '', 7, 7);?></td> <td colspan="6"><?php html_print_input_text ('time_to', $time_to, '', 7, 7);?></td>
</tr> </tr>
</table> </table>
</td> </td>
@ -339,13 +339,13 @@ print_input_hidden('id_item', $idItem);
<tr id="row_group" style="" class="datos"> <tr id="row_group" style="" class="datos">
<td style="vertical-align: top;"><?php echo __('Group');?></td> <td style="vertical-align: top;"><?php echo __('Group');?></td>
<td style=""> <td style="">
<?php print_select_groups($config['id_user'], "AR", true, 'combo_group', $group, 'extract_group_agents()');?> <?php html_print_select_groups($config['id_user'], "AR", true, 'combo_group', $group, 'extract_group_agents()');?>
</td> </td>
</tr> </tr>
<tr id="row_module_group" style="" class="datos"> <tr id="row_module_group" style="" class="datos">
<td style="vertical-align: top;"><?php echo __('Module group');?></td> <td style="vertical-align: top;"><?php echo __('Module group');?></td>
<td style=""> <td style="">
<?php print_select_from_sql ("SELECT * FROM tmodule_group ORDER BY name", <?php html_print_select_from_sql ("SELECT * FROM tmodule_group ORDER BY name",
'combo_modulegroup', $modulegroup, '',__('All'));?> 'combo_modulegroup', $modulegroup, '',__('All'));?>
</td> </td>
</tr> </tr>
@ -353,8 +353,8 @@ print_input_hidden('id_item', $idItem);
<td style="vertical-align: top;"><?php echo __('Agent'); ?></td> <td style="vertical-align: top;"><?php echo __('Agent'); ?></td>
<td style=""> <td style="">
<?php <?php
print_input_hidden('id_agent', $idAgent) . html_print_input_hidden('id_agent', $idAgent) .
print_input_text_extended ('agent', get_agent_name ($idAgent), 'text-agent', '', 30, 100, false, '', html_print_input_text_extended ('agent', get_agent_name ($idAgent), 'text-agent', '', 30, 100, false, '',
array('style' => 'background: url(images/lightning.png) no-repeat right;')) array('style' => 'background: url(images/lightning.png) no-repeat right;'))
. '<a href="#" class="tip">&nbsp;<span>' . __("Type at least two characters to search") . '</span></a>'; . '<a href="#" class="tip">&nbsp;<span>' . __("Type at least two characters to search") . '</span></a>';
?> ?>
@ -366,7 +366,7 @@ print_input_hidden('id_item', $idItem);
<?php <?php
if($idAgent) { if($idAgent) {
$sql = "SELECT id_agente_modulo, nombre FROM tagente_modulo WHERE id_agente = " . $idAgent; $sql = "SELECT id_agente_modulo, nombre FROM tagente_modulo WHERE id_agente = " . $idAgent;
print_select_from_sql($sql, 'id_agent_module', $idAgentModule, '', '', '0'); html_print_select_from_sql($sql, 'id_agent_module', $idAgentModule, '', '', '0');
} }
else { else {
?> ?>
@ -391,25 +391,25 @@ print_input_hidden('id_item', $idItem);
$query_sql = 'SELECT id_graph, name FROM tgraph WHERE private = 0 OR (private = 1 AND id_user = \''.$config["id_user"].'\')'; $query_sql = 'SELECT id_graph, name FROM tgraph WHERE private = 0 OR (private = 1 AND id_user = \''.$config["id_user"].'\')';
break; break;
} }
print_select_from_sql($query_sql, 'id_custom_graph', $idCustomGraph, '', '--', 0); html_print_select_from_sql($query_sql, 'id_custom_graph', $idCustomGraph, '', '--', 0);
?> ?>
</td> </td>
</tr> </tr>
<tr id="row_text" style="" class="datos"> <tr id="row_text" style="" class="datos">
<td style="vertical-align: top;"><?php echo __('Text'); ?></td> <td style="vertical-align: top;"><?php echo __('Text'); ?></td>
<td style=""><?php print_textarea('text', 5, 25, $text); ?></td> <td style=""><?php html_print_textarea('text', 5, 25, $text); ?></td>
</tr> </tr>
<tr id="row_query" style="" class="datos"> <tr id="row_query" style="" class="datos">
<td style="vertical-align: top;"><?php echo __('Query SQL'); ?></td> <td style="vertical-align: top;"><?php echo __('Query SQL'); ?></td>
<td style=""><?php print_textarea('sql', 5, 25, $sql); ?></td> <td style=""><?php html_print_textarea('sql', 5, 25, $sql); ?></td>
</tr> </tr>
<tr id="row_header" style="" class="datos"> <tr id="row_header" style="" class="datos">
<td style="vertical-align: top;"><?php echo __('Serialized header') . '<a href="#" class="tip">&nbsp;<span>' . __("The separator character is | .") . '</span></a>';?></td> <td style="vertical-align: top;"><?php echo __('Serialized header') . '<a href="#" class="tip">&nbsp;<span>' . __("The separator character is | .") . '</span></a>';?></td>
<td style=""><?php print_input_text('header', $header, '', 40, 90); ?></td> <td style=""><?php html_print_input_text('header', $header, '', 40, 90); ?></td>
</tr> </tr>
<tr id="row_custom" style="" class="datos"> <tr id="row_custom" style="" class="datos">
<td style="vertical-align: top;"><?php echo __('Custom SQL template'); ?></td> <td style="vertical-align: top;"><?php echo __('Custom SQL template'); ?></td>
<td style=""><?php print_select_from_sql('SELECT id, name FROM treport_custom_sql', 'id_custom', $idCustom, 'chooseSQLquery()', '--', '0'); ?></td> <td style=""><?php html_print_select_from_sql('SELECT id, name FROM treport_custom_sql', 'id_custom', $idCustom, 'chooseSQLquery()', '--', '0'); ?></td>
</tr> </tr>
<tr id="row_custom_example"> <tr id="row_custom_example">
<td style="vertical-align: top;"><?php echo __('SQL preview'); ?></td> <td style="vertical-align: top;"><?php echo __('SQL preview'); ?></td>
@ -417,82 +417,82 @@ print_input_hidden('id_item', $idItem);
</tr> </tr>
<tr id="row_url" style="" class="datos"> <tr id="row_url" style="" class="datos">
<td style="vertical-align: top;"><?php echo __('URL'); ?></td> <td style="vertical-align: top;"><?php echo __('URL'); ?></td>
<td style=""><?php print_input_text('url', $url, '', 40, 90); ?></td> <td style=""><?php html_print_input_text('url', $url, '', 40, 90); ?></td>
</tr> </tr>
<tr id="row_field_separator" style="" class="datos"> <tr id="row_field_separator" style="" class="datos">
<td style="vertical-align: top;"><?php echo __('Field separator'); ?></td> <td style="vertical-align: top;"><?php echo __('Field separator'); ?></td>
<td style=""><?php print_input_text('field', $field, '', 2, 4); ?></td> <td style=""><?php html_print_input_text('field', $field, '', 2, 4); ?></td>
</tr> </tr>
<tr id="row_line_separator" style="" class="datos"> <tr id="row_line_separator" style="" class="datos">
<td style="vertical-align: top;"><?php echo __('Line separator'); ?></td> <td style="vertical-align: top;"><?php echo __('Line separator'); ?></td>
<td style=""><?php print_input_text('line', $line, '', 2, 4); ?></td> <td style=""><?php html_print_input_text('line', $line, '', 2, 4); ?></td>
</tr> </tr>
<tr id="row_group_by_agent" style="" class="datos"> <tr id="row_group_by_agent" style="" class="datos">
<td><?php echo __('Group by agent');?></td> <td><?php echo __('Group by agent');?></td>
<td><?php print_checkbox('checkbox_row_group_by_agent', 1, $group_by_agent);?></td> <td><?php html_print_checkbox('checkbox_row_group_by_agent', 1, $group_by_agent);?></td>
</tr> </tr>
<tr id="row_order_uptodown" style="" class="datos"> <tr id="row_order_uptodown" style="" class="datos">
<td><?php echo __('Order');?></td> <td><?php echo __('Order');?></td>
<td><?php <td><?php
echo __('Ascending'); echo __('Ascending');
print_radio_button ('radiobutton_order_uptodown', 2, '', $order_uptodown); html_print_radio_button ('radiobutton_order_uptodown', 2, '', $order_uptodown);
echo __('Descending'); echo __('Descending');
print_radio_button ('radiobutton_order_uptodown', 1, '', $order_uptodown); html_print_radio_button ('radiobutton_order_uptodown', 1, '', $order_uptodown);
echo __('By agent name'); echo __('By agent name');
print_radio_button ('radiobutton_order_uptodown', 3, '', $order_uptodown); html_print_radio_button ('radiobutton_order_uptodown', 3, '', $order_uptodown);
?></td> ?></td>
</tr> </tr>
<tr id="row_quantity" style="" class="datos"> <tr id="row_quantity" style="" class="datos">
<td style="vertical-align: top;"><?php echo __('Quantity (n)'); ?></td> <td style="vertical-align: top;"><?php echo __('Quantity (n)'); ?></td>
<td style=""><?php print_input_text('quantity', $top_n_value, '', 5, 5); ?></td> <td style=""><?php html_print_input_text('quantity', $top_n_value, '', 5, 5); ?></td>
</tr> </tr>
<tr id="row_max_min_avg" style="" class="datos"> <tr id="row_max_min_avg" style="" class="datos">
<td><?php echo __('Display');?></td> <td><?php echo __('Display');?></td>
<td><?php <td><?php
echo __('Max'); echo __('Max');
print_radio_button ('radiobutton_max_min_avg', 1, '', $top_n); html_print_radio_button ('radiobutton_max_min_avg', 1, '', $top_n);
echo __('Min'); echo __('Min');
print_radio_button ('radiobutton_max_min_avg', 2, '', $top_n); html_print_radio_button ('radiobutton_max_min_avg', 2, '', $top_n);
echo __('Avg'); echo __('Avg');
print_radio_button ('radiobutton_max_min_avg', 3, '', $top_n); html_print_radio_button ('radiobutton_max_min_avg', 3, '', $top_n);
?></td> ?></td>
</tr> </tr>
<tr id="row_exception_condition_value" style="" class="datos"> <tr id="row_exception_condition_value" style="" class="datos">
<td style="vertical-align: top;"><?php echo __('Value'); ?></td> <td style="vertical-align: top;"><?php echo __('Value'); ?></td>
<td style=""><?php print_input_text('exception_condition_value', $exception_condition_value, '', 5, 5); ?></td> <td style=""><?php html_print_input_text('exception_condition_value', $exception_condition_value, '', 5, 5); ?></td>
</tr> </tr>
<tr id="row_exception_condition" style="" class="datos"> <tr id="row_exception_condition" style="" class="datos">
<td><?php echo __('Condition');?></td> <td><?php echo __('Condition');?></td>
<td><?php <td><?php
echo __('Everything'); echo __('Everything');
print_radio_button ('radiobutton_exception_condition', 0, '', $exception_condition); html_print_radio_button ('radiobutton_exception_condition', 0, '', $exception_condition);
echo __('>='); echo __('>=');
print_radio_button ('radiobutton_exception_condition', 1, '', $exception_condition); html_print_radio_button ('radiobutton_exception_condition', 1, '', $exception_condition);
echo __('<'); echo __('<');
print_radio_button ('radiobutton_exception_condition', 2, '', $exception_condition); html_print_radio_button ('radiobutton_exception_condition', 2, '', $exception_condition);
echo __('OK'); echo __('OK');
print_radio_button ('radiobutton_exception_condition', 3, '', $exception_condition); html_print_radio_button ('radiobutton_exception_condition', 3, '', $exception_condition);
echo __('Not OK'); echo __('Not OK');
print_radio_button ('radiobutton_exception_condition', 4, '', $exception_condition); html_print_radio_button ('radiobutton_exception_condition', 4, '', $exception_condition);
?></td> ?></td>
</tr> </tr>
<tr id="row_show_graph" style="" class="datos"> <tr id="row_show_graph" style="" class="datos">
<td><?php echo __('Show graph');?></td> <td><?php echo __('Show graph');?></td>
<td><?php print_select ($show_graph_options, 'combo_graph_options', $show_graph);?></td> <td><?php html_print_select ($show_graph_options, 'combo_graph_options', $show_graph);?></td>
</tr> </tr>
<tr id="row_show_resume" style="" class="datos"> <tr id="row_show_resume" style="" class="datos">
<td><?php echo __('Show resume');?></td> <td><?php echo __('Show resume');?></td>
<td><?php print_checkbox('checkbox_show_resume', 1, $show_resume);?></td> <td><?php html_print_checkbox('checkbox_show_resume', 1, $show_resume);?></td>
</tr> </tr>
<tr id="row_show_in_two_columns" style="" class="datos"> <tr id="row_show_in_two_columns" style="" class="datos">
<td><?php echo __('Show in two columns');?></td> <td><?php echo __('Show in two columns');?></td>
<td><?php print_checkbox('show_in_two_columns', 1, $show_in_two_columns, false, <td><?php html_print_checkbox('show_in_two_columns', 1, $show_in_two_columns, false,
false, 'if ($(\'input[name=show_in_two_columns]\').is(\':checked\')) $(\'input[name=show_in_landscape]\').attr(\'checked\', false);');?></td> false, 'if ($(\'input[name=show_in_two_columns]\').is(\':checked\')) $(\'input[name=show_in_landscape]\').attr(\'checked\', false);');?></td>
</tr> </tr>
<tr id="row_show_in_landscape" style="" class="datos"> <tr id="row_show_in_landscape" style="" class="datos">
<td><?php echo __('Show in landscape');?></td> <td><?php echo __('Show in landscape');?></td>
<td><?php print_checkbox('show_in_landscape', 1, $show_in_landscape, false, false, <td><?php html_print_checkbox('show_in_landscape', 1, $show_in_landscape, false, false,
'if ($(\'input[name=show_in_landscape]\').is(\':checked\')) $(\'input[name=show_in_two_columns]\').attr(\'checked\', false);');?></td> 'if ($(\'input[name=show_in_landscape]\').is(\':checked\')) $(\'input[name=show_in_two_columns]\').attr(\'checked\', false);');?></td>
</tr> </tr>
</tbody> </tbody>
@ -502,10 +502,10 @@ print_SLA_list('95%', $action, $idItem);
print_General_list('95%', $action, $idItem); print_General_list('95%', $action, $idItem);
echo '<div class="action-buttons" style="width: 95%">'; echo '<div class="action-buttons" style="width: 95%">';
if ($action == 'new') { if ($action == 'new') {
print_submit_button(__('Create item'), 'create_item', false, 'class="sub wand"'); html_print_submit_button(__('Create item'), 'create_item', false, 'class="sub wand"');
} }
else { else {
print_submit_button(__('Edit item'), 'edit_item', false, 'class="sub upd"'); html_print_submit_button(__('Edit item'), 'edit_item', false, 'class="sub upd"');
} }
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';
@ -559,7 +559,7 @@ function print_SLA_list($width, $action, $idItem = null) {
<td>' . $item['sla_max'] . '</td> <td>' . $item['sla_max'] . '</td>
<td>' . $item['sla_limit'] . '</td> <td>' . $item['sla_limit'] . '</td>
<td style="text-align: center;"> <td style="text-align: center;">
<a href="javascript: deleteSLARow(' . $item['id'] . ');">' . print_image("images/cross.png", true) . '</a> <a href="javascript: deleteSLARow(' . $item['id'] . ');">' . html_print_image("images/cross.png", true) . '</a>
</td> </td>
</tr>'; </tr>';
} }
@ -572,7 +572,7 @@ function print_SLA_list($width, $action, $idItem = null) {
<td class="sla_min"></td> <td class="sla_min"></td>
<td class="sla_max"></td> <td class="sla_max"></td>
<td class="sla_limit"></td> <td class="sla_limit"></td>
<td style="text-align: center;"><a class="delete_button" href="javascript: deleteSLARow(0);"><?php print_image("images/cross.png", false); ?></a></td> <td style="text-align: center;"><a class="delete_button" href="javascript: deleteSLARow(0);"><?php html_print_image("images/cross.png", false); ?></a></td>
</tr> </tr>
</tbody> </tbody>
<tbody> <tbody>
@ -584,7 +584,7 @@ function print_SLA_list($width, $action, $idItem = null) {
<td><input name="sla_min" id="text-sla_min" size="10" maxlength="10" type="text"></td> <td><input name="sla_min" id="text-sla_min" size="10" maxlength="10" type="text"></td>
<td><input name="sla_max" id="text-sla_max" size="10" maxlength="10" type="text"></td> <td><input name="sla_max" id="text-sla_max" size="10" maxlength="10" type="text"></td>
<td><input name="sla_limit" id="text-sla_limit" size="10" maxlength="10" type="text"></td> <td><input name="sla_limit" id="text-sla_limit" size="10" maxlength="10" type="text"></td>
<td style="text-align: center;"><a href="javascript: addSLARow();"><?php print_image("images/disk.png", false); ?></a></td> <td style="text-align: center;"><a href="javascript: addSLARow();"><?php html_print_image("images/disk.png", false); ?></a></td>
</tr> </tr>
</tbody> </tbody>
<?php <?php
@ -634,7 +634,7 @@ function print_General_list($width, $action, $idItem = null) {
<td>' . printSmallFont($nameAgent) . '</td> <td>' . printSmallFont($nameAgent) . '</td>
<td>' . printSmallFont($nameModule) . '</td> <td>' . printSmallFont($nameModule) . '</td>
<td style="text-align: center;"> <td style="text-align: center;">
<a href="javascript: deleteGeneralRow(' . $item['id'] . ');">' . print_image("images/cross.png", true) . '</a> <a href="javascript: deleteGeneralRow(' . $item['id'] . ');">' . html_print_image("images/cross.png", true) . '</a>
</td> </td>
</tr>'; </tr>';
} }
@ -644,7 +644,7 @@ function print_General_list($width, $action, $idItem = null) {
<tr id="row" style="display: none;" class="datos"> <tr id="row" style="display: none;" class="datos">
<td class="agent_name"></td> <td class="agent_name"></td>
<td class="module_name"></td> <td class="module_name"></td>
<td style="text-align: center;"><a class="delete_button" href="javascript: deleteGeneralRow(0);"><?php print_image("images/cross.png", false); ?></a></td> <td style="text-align: center;"><a class="delete_button" href="javascript: deleteGeneralRow(0);"><?php html_print_image("images/cross.png", false); ?></a></td>
</tr> </tr>
</tbody> </tbody>
<tbody> <tbody>
@ -653,7 +653,7 @@ function print_General_list($width, $action, $idItem = null) {
<input id="hidden-id_agent_general" name="id_agent_general" value="" type="hidden"> <input id="hidden-id_agent_general" name="id_agent_general" value="" type="hidden">
<input style="background: transparent url(images/lightning.png) no-repeat right;" name="agent_general" id="text-agent_general" size="15" maxlength="20" type="text"><a href="#" class="tip">&nbsp;<span>Type at least two characters to search</span></a></td> <input style="background: transparent url(images/lightning.png) no-repeat right;" name="agent_general" id="text-agent_general" size="15" maxlength="20" type="text"><a href="#" class="tip">&nbsp;<span>Type at least two characters to search</span></a></td>
<td><select id="id_agent_module_general" name="id_agente_modulo_general" disabled="disabled" style="max-width: 180px"><option value="0"><?php echo __('Select an Agent first'); ?></option></select></td> <td><select id="id_agent_module_general" name="id_agente_modulo_general" disabled="disabled" style="max-width: 180px"><option value="0"><?php echo __('Select an Agent first'); ?></option></select></td>
<td style="text-align: center;"><a href="javascript: addGeneralRow();"><?php print_image("images/disk.png", false); ?></a></td> <td style="text-align: center;"><a href="javascript: addGeneralRow();"><?php html_print_image("images/disk.png", false); ?></a></td>
</tr> </tr>
</tbody> </tbody>
<?php <?php

View File

@ -88,25 +88,25 @@ if (($agentFilter == 0) && ($moduleFilter == 0) && ($typeFilter == 0)) {
$urlFilter = '&agent_filter=' . $agentFilter . '&module_filter=' . $moduleFilter . '&type_filter=' . $typeFilter; $urlFilter = '&agent_filter=' . $agentFilter . '&module_filter=' . $moduleFilter . '&type_filter=' . $typeFilter;
echo '<a href="javascript: toggleFormFilter();"><b>'.__('Items filter').'</b> ' . print_image("images/down.png", true, array("title" => __('Toggle filter(s)'), "id" => 'image_form_filter')) . '</a>'; echo '<a href="javascript: toggleFormFilter();"><b>'.__('Items filter').'</b> ' . html_print_image("images/down.png", true, array("title" => __('Toggle filter(s)'), "id" => 'image_form_filter')) . '</a>';
$table = null; $table = null;
$table->width = '80%'; $table->width = '80%';
$table->data[0][0] = __('Agents'); $table->data[0][0] = __('Agents');
$table->data[0][1] = print_select($agents, 'agent_filter', $agentFilter, '', __('All'), 0, true); $table->data[0][1] = html_print_select($agents, 'agent_filter', $agentFilter, '', __('All'), 0, true);
$table->data[0][2] = __('Modules'); $table->data[0][2] = __('Modules');
$table->data[0][3] = print_select($modules, 'module_filter', $moduleFilter, '', __('All'), 0, true); $table->data[0][3] = html_print_select($modules, 'module_filter', $moduleFilter, '', __('All'), 0, true);
$table->data[1][0] = __('Type'); $table->data[1][0] = __('Type');
$table->data[1][1] = print_select($types, 'type_filter', $typeFilter, '', __('All'), 0, true); $table->data[1][1] = html_print_select($types, 'type_filter', $typeFilter, '', __('All'), 0, true);
echo '<div id="form_filter" style="display: none;">'; echo '<div id="form_filter" style="display: none;">';
echo '<form method="post" action ="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=filter&&id_report=' . $idReport . '">'; echo '<form method="post" action ="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=filter&&id_report=' . $idReport . '">';
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
print_submit_button(__('Filter'), 'filter', false, 'class="sub upd"'); html_print_submit_button(__('Filter'), 'filter', false, 'class="sub upd"');
print_input_hidden('action', 'filter'); html_print_input_hidden('action', 'filter');
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';
echo '</div>'; echo '</div>';
@ -156,18 +156,18 @@ if ($items){
$table->head[0] = '<span title="' . __('Sort') . '">' . __('S.') . '</span>'; $table->head[0] = '<span title="' . __('Sort') . '">' . __('S.') . '</span>';
$table->head[1] = __('Type'); $table->head[1] = __('Type');
if (!$filterEnable) { if (!$filterEnable) {
$table->head[1] .= ' <a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=type&id_report=' . $idReport . $urlFilter . '">' . print_image("images/sort_up.png", true, array("title" => __('Ascendent'))) . '</a>' . $table->head[1] .= ' <a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=type&id_report=' . $idReport . $urlFilter . '">' . html_print_image("images/sort_up.png", true, array("title" => __('Ascendent'))) . '</a>' .
'<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=type&id_report=' . $idReport . $urlFilter . '">' . print_image("images/sort_down.png", true, array("title" => __('Descent'))) . '</a>'; '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=type&id_report=' . $idReport . $urlFilter . '">' . html_print_image("images/sort_down.png", true, array("title" => __('Descent'))) . '</a>';
} }
$table->head[2] = __('Agent'); $table->head[2] = __('Agent');
if (!$filterEnable) { if (!$filterEnable) {
$table->head[2] .= ' <a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=agent&id_report=' . $idReport . $urlFilter . '">' . print_image("images/sort_up.png", true, array("title" => __('Ascendent'))) . '</a>' . $table->head[2] .= ' <a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=agent&id_report=' . $idReport . $urlFilter . '">' . html_print_image("images/sort_up.png", true, array("title" => __('Ascendent'))) . '</a>' .
'<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=agent&id_report=' . $idReport . $urlFilter . '">' . print_image("images/sort_down.png", true, array("title" => __('Descent'))) . '</a>'; '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=agent&id_report=' . $idReport . $urlFilter . '">' . html_print_image("images/sort_down.png", true, array("title" => __('Descent'))) . '</a>';
} }
$table->head[3] = __('Module'); $table->head[3] = __('Module');
if (!$filterEnable) { if (!$filterEnable) {
$table->head[3] .= ' <a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=module&id_report=' . $idReport . $urlFilter . '">' . print_image("images/sort_up.png", true, array("title" => __('Ascendent'))) . '</a>' . $table->head[3] .= ' <a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&field=module&id_report=' . $idReport . $urlFilter . '">' . html_print_image("images/sort_up.png", true, array("title" => __('Ascendent'))) . '</a>' .
'<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=module&id_report=' . $idReport . $urlFilter . '">' . print_image("images/sort_down.png", true, array("title" => __('Descent'))) . '</a>'; '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&field=module&id_report=' . $idReport . $urlFilter . '">' . html_print_image("images/sort_down.png", true, array("title" => __('Descent'))) . '</a>';
} }
$table->head[4] = __('Period'); $table->head[4] = __('Period');
$table->head[5] = __('Description'); $table->head[5] = __('Description');
@ -204,14 +204,14 @@ foreach ($items as $item) {
$row[0] = '<span style="display: block; float: left; width: 16px;">&nbsp;</span>'; $row[0] = '<span style="display: block; float: left; width: 16px;">&nbsp;</span>';
} }
else { else {
$row[0] = '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&id_report=' . $idReport . '&id_item=' . $item['id_rc'] . $urlFilter . '">' . print_image("images/up.png", true, array("title" => __('Move to up'))) . '</a>'; $row[0] = '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=up&id_report=' . $idReport . '&id_item=' . $item['id_rc'] . $urlFilter . '">' . html_print_image("images/up.png", true, array("title" => __('Move to up'))) . '</a>';
} }
if ((end($items) == $item) && $lastPage) { if ((end($items) == $item) && $lastPage) {
$row[0] .= '<span style="width: 16px;">&nbsp;</span>'; $row[0] .= '<span style="width: 16px;">&nbsp;</span>';
} }
else { else {
$row[0] .= '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&id_report=' . $idReport . '&id_item=' . $item['id_rc'] . $urlFilter . '">' . print_image("images/down.png", true, array("title" => __('Move to down'))) . '</a>'; $row[0] .= '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=order&dir=down&id_report=' . $idReport . '&id_item=' . $item['id_rc'] . $urlFilter . '">' . html_print_image("images/down.png", true, array("title" => __('Move to down'))) . '</a>';
} }
if ($filterEnable) { if ($filterEnable) {
@ -250,15 +250,15 @@ foreach ($items as $item) {
$row[5] = ui_print_truncate_text($item['description'], 25, true, true); $row[5] = ui_print_truncate_text($item['description'], 25, true, true);
} }
$row[6] = '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=item_editor&action=edit&id_report=' . $idReport . '&id_item=' . $item['id_rc'] . '">' . print_image("images/wrench_orange.png", true, array("title" => __('Edit'))) . '</a>'; $row[6] = '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=item_editor&action=edit&id_report=' . $idReport . '&id_item=' . $item['id_rc'] . '">' . html_print_image("images/wrench_orange.png", true, array("title" => __('Edit'))) . '</a>';
$row[6] .= '&nbsp;'; $row[6] .= '&nbsp;';
$row[6] .= '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=delete&id_report=' . $idReport . '&id_item=' . $item['id_rc'] . $urlFilter . '">' . print_image("images/cross.png", true, array("title" => __('Delete'))) .'</a>'; $row[6] .= '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=delete&id_report=' . $idReport . '&id_item=' . $item['id_rc'] . $urlFilter . '">' . html_print_image("images/cross.png", true, array("title" => __('Delete'))) .'</a>';
$table->data[] = $row; $table->data[] = $row;
$count++; $count++;
} }
ui_pagination ($countItems, 'index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report=' . $idReport . $urlFilter); ui_pagination ($countItems, 'index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report=' . $idReport . $urlFilter);
print_table($table); html_print_table($table);
ui_pagination ($countItems, 'index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report=' . $idReport . $urlFilter); ui_pagination ($countItems, 'index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report=' . $idReport . $urlFilter);
?> ?>
<script type="text/javascript"> <script type="text/javascript">

View File

@ -29,12 +29,12 @@ $groups = get_user_groups ();
switch ($action) { switch ($action) {
case 'new': case 'new':
$actionButtonHtml = print_submit_button(__('Save'), 'add', false, 'class="sub wand"', true); $actionButtonHtml = html_print_submit_button(__('Save'), 'add', false, 'class="sub wand"', true);
$hiddenFieldAction = 'save'; $hiddenFieldAction = 'save';
break; break;
case 'update': case 'update':
case 'edit': case 'edit':
$actionButtonHtml = print_submit_button(__('Update'), 'edit', false, 'class="sub upd"', true); $actionButtonHtml = html_print_submit_button(__('Update'), 'edit', false, 'class="sub upd"', true);
$hiddenFieldAction = 'update'; $hiddenFieldAction = 'update';
break; break;
} }
@ -51,7 +51,7 @@ $table->size[1] = '90%';
$table->style[0] = 'font-weight: bold; vertical-align: top;'; $table->style[0] = 'font-weight: bold; vertical-align: top;';
$table->data['name'][0] = __('Name'); $table->data['name'][0] = __('Name');
$table->data['name'][1] = print_input_text('name', $reportName, __('Name'), 20, 40, true); $table->data['name'][1] = html_print_input_text('name', $reportName, __('Name'), 20, 40, true);
$table->data['group'][0] = __('Group'); $table->data['group'][0] = __('Group');
$own_info = get_user_info ($config['id_user']); $own_info = get_user_info ($config['id_user']);
@ -59,17 +59,17 @@ if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
$return_all_groups = true; $return_all_groups = true;
else else
$return_all_groups = false; $return_all_groups = false;
$table->data['group'][1] = print_select_groups(false, "AR", $return_all_groups, 'id_group', $idGroupReport, false, '', '', true); $table->data['group'][1] = html_print_select_groups(false, "AR", $return_all_groups, 'id_group', $idGroupReport, false, '', '', true);
$table->data['description'][0] = __('Description'); $table->data['description'][0] = __('Description');
$table->data['description'][1] = print_textarea('description', 5, 15, $description, '', true); $table->data['description'][1] = html_print_textarea('description', 5, 15, $description, '', true);
echo '<form class="" method="post">'; echo '<form class="" method="post">';
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
echo $actionButtonHtml; echo $actionButtonHtml;
print_input_hidden('action', $hiddenFieldAction); html_print_input_hidden('action', $hiddenFieldAction);
print_input_hidden('id_report', $idReport); html_print_input_hidden('id_report', $idReport);
echo '</div></form>'; echo '</div></form>';
?> ?>

View File

@ -97,23 +97,23 @@ switch ($action) {
$data[3] = ui_print_group_icon($report['id_group'], true); $data[3] = ui_print_group_icon($report['id_group'], true);
$data[4] = '<form method="post" style="display:inline" onsubmit="if (!confirm (\''.__('Are you sure?').'\')) return false">'; $data[4] = '<form method="post" style="display:inline" onsubmit="if (!confirm (\''.__('Are you sure?').'\')) return false">';
$data[4] .= print_input_hidden ('id_report', $report['id_report'], true); $data[4] .= html_print_input_hidden ('id_report', $report['id_report'], true);
$data[4] .= print_input_hidden ('action','delete_report', true); $data[4] .= html_print_input_hidden ('action','delete_report', true);
$data[4] .= print_input_image ('delete', 'images/cross.png', 1, '', $data[4] .= html_print_input_image ('delete', 'images/cross.png', 1, '',
true, array ('title' => __('Delete'))); true, array ('title' => __('Delete')));
$data[4] .= '</form>'; $data[4] .= '</form>';
array_push ($table->data, $data); array_push ($table->data, $data);
} }
print_table ($table); html_print_table ($table);
} else { } else {
echo "<div class='nf'>".__('There are no defined reportings')."</div>"; echo "<div class='nf'>".__('There are no defined reportings')."</div>";
} }
echo '<form method="post" action="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=main&action=new">'; echo '<form method="post" action="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=main&action=new">';
echo '<div class="action-buttons" style="width: 720px;">'; echo '<div class="action-buttons" style="width: 720px;">';
print_submit_button (__('Create report'), 'create', false, 'class="sub next"'); html_print_submit_button (__('Create report'), 'create', false, 'class="sub next"');
echo "</div>"; echo "</div>";
echo "</form>"; echo "</form>";
return; return;
@ -490,13 +490,13 @@ if ($enterpriseEnable) {
$buttons = array( $buttons = array(
'main' => array('active' => false, 'main' => array('active' => false,
'text' => '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=main&action=edit&id_report=' . $idReport . '">' . 'text' => '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=main&action=edit&id_report=' . $idReport . '">' .
print_image("images/reporting_edit.png", true, array ("title" => __('Main'))) .'</a>'), html_print_image("images/reporting_edit.png", true, array ("title" => __('Main'))) .'</a>'),
'list_items' => array('active' => false, 'list_items' => array('active' => false,
'text' => '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report=' . $idReport . '">' . 'text' => '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=edit&id_report=' . $idReport . '">' .
print_image("images/god6.png", true, array ("title" => __('List items'))) .'</a>'), html_print_image("images/god6.png", true, array ("title" => __('List items'))) .'</a>'),
'item_editor' => array('active' => false, 'item_editor' => array('active' => false,
'text' => '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=item_editor&action=new&id_report=' . $idReport . '">' . 'text' => '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=item_editor&action=new&id_report=' . $idReport . '">' .
print_image("images/config.png", true, array ("title" => __('Item editor'))) .'</a>') html_print_image("images/config.png", true, array ("title" => __('Item editor'))) .'</a>')
); );
if ($enterpriseEnable) { if ($enterpriseEnable) {
@ -505,7 +505,7 @@ if ($enterpriseEnable) {
$buttons['preview'] = array('active' => false, $buttons['preview'] = array('active' => false,
'text' => '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=preview&action=edit&id_report=' . $idReport . '">' . 'text' => '<a href="index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=preview&action=edit&id_report=' . $idReport . '">' .
print_image("images/reporting.png", true, array ("title" => __('Preview'))) .'</a>'); html_print_image("images/reporting.png", true, array ("title" => __('Preview'))) .'</a>');
$buttons[$activeTab]['active'] = true; $buttons[$activeTab]['active'] = true;

View File

@ -49,11 +49,11 @@ $url = "index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id=$id
if ($config["pure"] == 0) { if ($config["pure"] == 0) {
$options[] = "<a href='$url&pure=1'>" $options[] = "<a href='$url&pure=1'>"
. print_image ("images/fullscreen.png", true, array ("title" => __('Full screen mode'))) . html_print_image ("images/fullscreen.png", true, array ("title" => __('Full screen mode')))
. "</a>"; . "</a>";
} else { } else {
$options[] = "<a href='$url&pure=0'>" $options[] = "<a href='$url&pure=0'>"
. print_image ("images/normalscreen.png", true, array ("title" => __('Back to normal mode'))) . html_print_image ("images/normalscreen.png", true, array ("title" => __('Back to normal mode')))
. "</a>"; . "</a>";
} }
@ -64,24 +64,24 @@ $table->style[0] = 'font-weight: bold';
$table->size = array (); $table->size = array ();
$table->size[0] = '50px'; $table->size[0] = '50px';
$table->data = array (); $table->data = array ();
$table->data[0][0] = print_image("images/reporting.png", true, array("width" => '32', "height" => '32')); $table->data[0][0] = html_print_image("images/reporting.png", true, array("width" => '32', "height" => '32'));
if ($report['description'] != '') { if ($report['description'] != '') {
$table->data[0][1] = $report['description']; $table->data[0][1] = $report['description'];
} else { } else {
$table->data[0][1] = $report['name']; $table->data[0][1] = $report['name'];
} }
$table->data[1][0] = __('Date'); $table->data[1][0] = __('Date');
$table->data[1][1] = print_input_text ('date', $date, '', 12, 10, true). ' '; $table->data[1][1] = html_print_input_text ('date', $date, '', 12, 10, true). ' ';
$table->data[1][1] .= print_input_text ('time', $time, '', 7, 7, true). ' '; $table->data[1][1] .= html_print_input_text ('time', $time, '', 7, 7, true). ' ';
$table->data[1][1] .= print_submit_button (__('Update'), 'date_submit', false, 'class="sub next"', true); $table->data[1][1] .= html_print_submit_button (__('Update'), 'date_submit', false, 'class="sub next"', true);
echo '<form method="post" action="">'; echo '<form method="post" action="">';
print_table ($table); html_print_table ($table);
print_input_hidden ('id_report', $id_report); html_print_input_hidden ('id_report', $id_report);
echo '</form>'; echo '</form>';
echo '<div id="loading">'; echo '<div id="loading">';
echo print_image("images/wait.gif", true, array("border" => '0')) . '<br />'; echo html_print_image("images/wait.gif", true, array("border" => '0')) . '<br />';
echo '<strong>'.__('Loading').'...</strong>'; echo '<strong>'.__('Loading').'...</strong>';
echo '</div>'; echo '</div>';
@ -122,7 +122,7 @@ $table->class = 'databox report_table';
$table->rowclass = array (); $table->rowclass = array ();
$table->rowclass[0] = 'datos3'; $table->rowclass[0] = 'datos3';
$report["group_name"] = get_group_name ($report['id_group']); $report["group_name"] = groups_get_name ($report['id_group']);
switch ($config["dbtype"]) { switch ($config["dbtype"]) {
case "mysql": case "mysql":
@ -147,7 +147,7 @@ foreach ($contents as $content) {
render_report_html_item ($content, $table, $report); render_report_html_item ($content, $table, $report);
echo '<div style = "overflow:auto;">'; echo '<div style = "overflow:auto;">';
print_table ($table); html_print_table ($table);
echo "</div>"; echo "</div>";
flush (); flush ();
} }

View File

@ -30,16 +30,16 @@ require_once ('include/functions_users.php');
switch ($action) { switch ($action) {
case 'new': case 'new':
echo "<form method='post' action='index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=" . $activeTab . "'>"; echo "<form method='post' action='index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=" . $activeTab . "'>";
print_input_hidden('action', 'save'); html_print_input_hidden('action', 'save');
break; break;
case 'update': case 'update':
case 'save': case 'save':
echo "<form method='post' action='index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=" . $activeTab . "&id_visual_console=" . $idVisualConsole . "'>"; echo "<form method='post' action='index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=" . $activeTab . "&id_visual_console=" . $idVisualConsole . "'>";
print_input_hidden('action', 'update'); html_print_input_hidden('action', 'update');
break; break;
case 'edit': case 'edit':
echo "<form method='post' action='index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=" . $activeTab . "&id_visual_console=" . $idVisualConsole . "'>"; echo "<form method='post' action='index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=" . $activeTab . "&id_visual_console=" . $idVisualConsole . "'>";
print_input_hidden('action', 'update'); html_print_input_hidden('action', 'update');
break; break;
} }
@ -47,7 +47,7 @@ $table->width = '70%';
$table->data = array (); $table->data = array ();
$table->data[0][0] = __('Name:'). ui_print_help_tip (__("Use [ or ( as first character, for example '[*] Map name', to render this map name in main menu"), true); $table->data[0][0] = __('Name:'). ui_print_help_tip (__("Use [ or ( as first character, for example '[*] Map name', to render this map name in main menu"), true);
$table->data[0][1] = print_input_text ('name', $visualConsoleName, '', 21, 30, true); $table->data[0][1] = html_print_input_text ('name', $visualConsoleName, '', 21, 30, true);
$table->data[1][0] = __('Group:'); $table->data[1][0] = __('Group:');
$groups = get_user_groups ($config['id_user']); $groups = get_user_groups ($config['id_user']);
@ -58,11 +58,11 @@ if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
else else
$display_all_group = false; $display_all_group = false;
$table->data[1][1] = print_select_groups($config['id_user'], "AR", $display_all_group, 'id_group', $idGroup, '', '', '', true); $table->data[1][1] = html_print_select_groups($config['id_user'], "AR", $display_all_group, 'id_group', $idGroup, '', '', '', true);
$backgrounds_list = list_files ('images/console/background/', "jpg", 1, 0); $backgrounds_list = list_files ('images/console/background/', "jpg", 1, 0);
$backgrounds_list = array_merge ($backgrounds_list, list_files ('images/console/background/', "png", 1, 0)); $backgrounds_list = array_merge ($backgrounds_list, list_files ('images/console/background/', "png", 1, 0));
$table->data[2][0] = __('Background'); $table->data[2][0] = __('Background');
$table->data[2][1] = print_select ($backgrounds_list, 'background', $background, '', '', 0, true); $table->data[2][1] = html_print_select ($backgrounds_list, 'background', $background, '', '', 0, true);
if ($action == 'new') { if ($action == 'new') {
$textButtonSubmit = __('Save'); $textButtonSubmit = __('Save');
$classButtonSubmit = 'sub wand'; $classButtonSubmit = 'sub wand';
@ -72,10 +72,10 @@ else {
$classButtonSubmit = 'sub upd'; $classButtonSubmit = 'sub upd';
} }
print_table($table); html_print_table($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
print_submit_button ($textButtonSubmit, 'update_layout', false, 'class="' . $classButtonSubmit . '"'); html_print_submit_button ($textButtonSubmit, 'update_layout', false, 'class="' . $classButtonSubmit . '"');
echo '</div>'; echo '</div>';
echo "</form>"; echo "</form>";

View File

@ -75,7 +75,7 @@ echo '</div>';
echo '<div style="clear: right; margin-bottom: 10px;"></div>'; echo '<div style="clear: right; margin-bottom: 10px;"></div>';
echo "<form id='form_visual_map' method='post' action='index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=" . $activeTab . "&id_visual_console=" . $idVisualConsole . "'>"; echo "<form id='form_visual_map' method='post' action='index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=" . $activeTab . "&id_visual_console=" . $idVisualConsole . "'>";
print_input_hidden('action', 'update'); html_print_input_hidden('action', 'update');
$background = $visualConsole['background']; $background = $visualConsole['background'];
$widthBackground = $visualConsole['width']; $widthBackground = $visualConsole['width'];
$heightBackground = $visualConsole['height']; $heightBackground = $visualConsole['height'];
@ -118,45 +118,45 @@ echo '<div id="properties_panel" style="display: none; position: absolute; borde
<tbody> <tbody>
<tr id="label_row" style="" class="static_graph percentile_bar module_graph simple_value label datos"> <tr id="label_row" style="" class="static_graph percentile_bar module_graph simple_value label datos">
<td style=""><?php echo __('Label');?></td> <td style=""><?php echo __('Label');?></td>
<td style=""><?php print_input_text ('label', '', '', 20, 200); ?></td> <td style=""><?php html_print_input_text ('label', '', '', 20, 200); ?></td>
</tr> </tr>
<tr id="image_row" style="" class="static_graph icon datos"> <tr id="image_row" style="" class="static_graph icon datos">
<td><?php echo __('Image');?></td> <td><?php echo __('Image');?></td>
<td><?php print_select ($images_list, 'image', '', 'showPreview(this.value);', 'None', '');?></td> <td><?php html_print_select ($images_list, 'image', '', 'showPreview(this.value);', 'None', '');?></td>
</tr> </tr>
<tr id="preview_row" style="" class="static_graph datos icon"> <tr id="preview_row" style="" class="static_graph datos icon">
<td colspan="2" style="text-align: right;"><div id="preview" style="text-align: right;"></div></td> <td colspan="2" style="text-align: right;"><div id="preview" style="text-align: right;"></div></td>
</tr> </tr>
<tr id="agent_row" class="static_graph percentile_bar module_graph simple_value datos"> <tr id="agent_row" class="static_graph percentile_bar module_graph simple_value datos">
<td><?php echo __('Agent') . '<a href="#" class="tip">&nbsp;<span>' . __("Type at least two characters to search.") . '</span></a>';?></td> <td><?php echo __('Agent') . '<a href="#" class="tip">&nbsp;<span>' . __("Type at least two characters to search.") . '</span></a>';?></td>
<td><?php print_input_text_extended ('agent', '', 'text-agent', '', 25, 100, false, '', <td><?php html_print_input_text_extended ('agent', '', 'text-agent', '', 25, 100, false, '',
array('style' => 'background: #ffffff url(images/lightning.png) no-repeat right;'), false);?></td> array('style' => 'background: #ffffff url(images/lightning.png) no-repeat right;'), false);?></td>
</tr> </tr>
<tr id="module_row" class="static_graph percentile_bar module_graph simple_value datos"> <tr id="module_row" class="static_graph percentile_bar module_graph simple_value datos">
<td><?php echo __('Module');?></td> <td><?php echo __('Module');?></td>
<td><?php print_select (array (), 'module', '', '', __('Any'), 0);?></td> <td><?php html_print_select (array (), 'module', '', '', __('Any'), 0);?></td>
</tr> </tr>
<tr id="background_row_1" class="background datos"> <tr id="background_row_1" class="background datos">
<td><?php echo __('Background');?></td> <td><?php echo __('Background');?></td>
<td><?php print_select($backgrounds_list, 'background_image', $background, '', 'None', '');?></td> <td><?php html_print_select($backgrounds_list, 'background_image', $background, '', 'None', '');?></td>
</tr> </tr>
<tr id="background_row_2" class="background datos"> <tr id="background_row_2" class="background datos">
<td><?php echo __('Original Size');?></td> <td><?php echo __('Original Size');?></td>
<td><?php print_button(__('Apply'), 'original_false', false, 'setOriginalSizeBackground()', 'class="sub"');?></td> <td><?php html_print_button(__('Apply'), 'original_false', false, 'setOriginalSizeBackground()', 'class="sub"');?></td>
</tr> </tr>
<tr id="background_row_3" class="background datos"> <tr id="background_row_3" class="background datos">
<td><?php echo __('Aspect ratio');?></td> <td><?php echo __('Aspect ratio');?></td>
<td><?php print_button(__('Width proportional'), 'original_false', false, "setAspectRatioBackground('width')", 'class="sub"');?></td> <td><?php html_print_button(__('Width proportional'), 'original_false', false, "setAspectRatioBackground('width')", 'class="sub"');?></td>
</tr> </tr>
<tr id="background_row_4" class="background datos"> <tr id="background_row_4" class="background datos">
<td></td> <td></td>
<td><?php print_button(__('Height proportional'), 'original_false', false, "setAspectRatioBackground('height')", 'class="sub"');?></td> <td><?php html_print_button(__('Height proportional'), 'original_false', false, "setAspectRatioBackground('height')", 'class="sub"');?></td>
</tr> </tr>
<tr id="percentile_bar_row_1" class="percentile_bar datos"> <tr id="percentile_bar_row_1" class="percentile_bar datos">
<td><?php echo __('Width');?></td> <td><?php echo __('Width');?></td>
<td> <td>
<?php <?php
print_input_text('width_percentile', 0, '', 3, 5); html_print_input_text('width_percentile', 0, '', 3, 5);
?> ?>
</td> </td>
</tr> </tr>
@ -164,37 +164,37 @@ echo '<div id="properties_panel" style="display: none; position: absolute; borde
<td><?php echo __('Max value');?></td> <td><?php echo __('Max value');?></td>
<td> <td>
<?php <?php
print_input_text('max_percentile', 0, '', 3, 5); html_print_input_text('max_percentile', 0, '', 3, 5);
?> ?>
</td> </td>
</tr> </tr>
<tr id="period_row" class="module_graph datos"> <tr id="period_row" class="module_graph datos">
<td><?php echo __('Period');?></td> <td><?php echo __('Period');?></td>
<td><?php print_select ($intervals, 'period', '', '', '--', 0, false, false, false);?></td> <td><?php html_print_select ($intervals, 'period', '', '', '--', 0, false, false, false);?></td>
</tr> </tr>
<tr id="module_graph_size_row" class="module_graph datos"> <tr id="module_graph_size_row" class="module_graph datos">
<td><?php echo __('Size');?></td> <td><?php echo __('Size');?></td>
<td> <td>
<?php <?php
print_input_text('width_module_graph', 300, '', 3, 5); html_print_input_text('width_module_graph', 300, '', 3, 5);
echo ' X '; echo ' X ';
print_input_text('height_module_graph', 180, '', 3, 5); html_print_input_text('height_module_graph', 180, '', 3, 5);
?> ?>
</td> </td>
</tr> </tr>
<tr id="button_update_row" class="datos"> <tr id="button_update_row" class="datos">
<td colspan="2" style="text-align: right;"> <td colspan="2" style="text-align: right;">
<?php <?php
print_button(__('Cancel'), 'cancel_button', false, 'cancelAction();', 'class="sub cancel"'); html_print_button(__('Cancel'), 'cancel_button', false, 'cancelAction();', 'class="sub cancel"');
print_button(__('Update'), 'update_button', false, 'updateAction();', 'class="sub upd"'); html_print_button(__('Update'), 'update_button', false, 'updateAction();', 'class="sub upd"');
?> ?>
</td> </td>
</tr> </tr>
<tr id="button_create_row" class="datos"> <tr id="button_create_row" class="datos">
<td colspan="2" style="text-align: right;"> <td colspan="2" style="text-align: right;">
<?php <?php
print_button(__('Cancel'), 'cancel_button', false, 'cancelAction();', 'class="sub cancel"'); html_print_button(__('Cancel'), 'cancel_button', false, 'cancelAction();', 'class="sub cancel"');
print_button(__('Create'), 'create_button', false, 'createAction();', 'class="sub wand"'); html_print_button(__('Create'), 'create_button', false, 'createAction();', 'class="sub wand"');
?> ?>
</td> </td>
</tr> </tr>
@ -210,9 +210,9 @@ echo '<div id="properties_panel" style="display: none; position: absolute; borde
<td> <td>
<?php <?php
echo '('; echo '(';
print_input_text('left', '0', '', 3, 5); html_print_input_text('left', '0', '', 3, 5);
echo ' , '; echo ' , ';
print_input_text('top', '0', '', 3, 5); html_print_input_text('top', '0', '', 3, 5);
echo ')'; echo ')';
?> ?>
</td> </td>
@ -221,9 +221,9 @@ echo '<div id="properties_panel" style="display: none; position: absolute; borde
<td><?php echo __('Size') . '<a href="#" class="tip">&nbsp;<span>' . __("For use the original image file size, set 0 width and 0 height.") . '</span></a>';?></td> <td><?php echo __('Size') . '<a href="#" class="tip">&nbsp;<span>' . __("For use the original image file size, set 0 width and 0 height.") . '</span></a>';?></td>
<td> <td>
<?php <?php
print_input_text('width', 0, '', 3, 5); html_print_input_text('width', 0, '', 3, 5);
echo ' X '; echo ' X ';
print_input_text('height', 0, '', 3, 5); html_print_input_text('height', 0, '', 3, 5);
?> ?>
</td> </td>
</tr> </tr>
@ -232,7 +232,7 @@ echo '<div id="properties_panel" style="display: none; position: absolute; borde
<td> <td>
<?php <?php
$parents = get_items_parents($visualConsole['id']); $parents = get_items_parents($visualConsole['id']);
print_select($parents, 'parent', '', '', __('None'), 0); html_print_select($parents, 'parent', '', '', __('None'), 0);
?> ?>
</td> </td>
</tr> </tr>
@ -240,13 +240,13 @@ echo '<div id="properties_panel" style="display: none; position: absolute; borde
<td><?php echo __('Map linked');?></td> <td><?php echo __('Map linked');?></td>
<td> <td>
<?php <?php
print_select_from_sql ('SELECT id, name FROM tlayout WHERE id != ' . $idVisualConsole, 'map_linked', '', '', 'None', '0'); html_print_select_from_sql ('SELECT id, name FROM tlayout WHERE id != ' . $idVisualConsole, 'map_linked', '', '', 'None', '0');
?> ?>
</td> </td>
</tr> </tr>
<tr id="label_color_row" class="static_graph percentile_bar module_graph simple_value label datos"> <tr id="label_color_row" class="static_graph percentile_bar module_graph simple_value label datos">
<td><?php echo __('Label color');?></td> <td><?php echo __('Label color');?></td>
<td><?php print_input_text_extended ('label_color', '#000000', 'text-'.'label_color', '', 7, 7, false, '', 'class="label_color"', false);?></td> <td><?php html_print_input_text_extended ('label_color', '#000000', 'text-'.'label_color', '', 7, 7, false, '', 'class="label_color"', false);?></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -270,19 +270,19 @@ foreach ($layoutDatas as $layoutData) {
continue; continue;
printItemInVisualConsole($layoutData); printItemInVisualConsole($layoutData);
print_input_hidden('status_'.$layoutData['id'], getStatusElement($layoutData)); html_print_input_hidden('status_'.$layoutData['id'], getStatusElement($layoutData));
} }
echo '</div>'; echo '</div>';
echo '</div>'; echo '</div>';
print_input_hidden('background_width', $widthBackground); html_print_input_hidden('background_width', $widthBackground);
print_input_hidden('background_height', $heightBackground); html_print_input_hidden('background_height', $heightBackground);
$backgroundSizes = getimagesize('images/console/background/' . $background); $backgroundSizes = getimagesize('images/console/background/' . $background);
print_input_hidden('background_original_width', $backgroundSizes[0]); html_print_input_hidden('background_original_width', $backgroundSizes[0]);
print_input_hidden('background_original_height', $backgroundSizes[1]); html_print_input_hidden('background_original_height', $backgroundSizes[1]);
echo "</form>"; echo "</form>";
//Hack to translate messages in javascript //Hack to translate messages in javascript

View File

@ -84,10 +84,10 @@ $table->data = array();
//Background //Background
$table->data[0]['icon'] = ''; $table->data[0]['icon'] = '';
$table->data[0][0] = __('Background'); $table->data[0][0] = __('Background');
$table->data[0][1] = print_select($backgrounds_list, 'background', $visualConsole['background'], '', 'None', '', true, false, true, '', false, 'width: 100px;'); $table->data[0][1] = html_print_select($backgrounds_list, 'background', $visualConsole['background'], '', 'None', '', true, false, true, '', false, 'width: 100px;');
$table->data[0][2] = print_input_text('width', $visualConsole['width'], '', 3, 5, true) . $table->data[0][2] = html_print_input_text('width', $visualConsole['width'], '', 3, 5, true) .
'x' . 'x' .
print_input_text('height', $visualConsole['height'], '', 3, 5, true); html_print_input_text('height', $visualConsole['height'], '', 3, 5, true);
$table->data[0][3] = $table->data[0][4] = $table->data[0][5] = ''; $table->data[0][3] = $table->data[0][4] = $table->data[0][5] = '';
$i = 1; $i = 1;
@ -105,22 +105,22 @@ foreach ($layoutDatas as $layoutData) {
switch ($layoutData['type']) { switch ($layoutData['type']) {
case STATIC_GRAPH: case STATIC_GRAPH:
$table->data[$i + 1]['icon'] = print_image('images/camera.png', true, array('title' => __('Static Graph'))); $table->data[$i + 1]['icon'] = html_print_image('images/camera.png', true, array('title' => __('Static Graph')));
break; break;
case PERCENTILE_BAR: case PERCENTILE_BAR:
$table->data[$i + 1]['icon'] = print_image('images/chart_bar.png', true, array('title' => __('Percentile Bar'))); $table->data[$i + 1]['icon'] = html_print_image('images/chart_bar.png', true, array('title' => __('Percentile Bar')));
break; break;
case MODULE_GRAPH: case MODULE_GRAPH:
$table->data[$i + 1]['icon'] = print_image('images/chart_curve.png', true, array('title' => __('Module Graph'))); $table->data[$i + 1]['icon'] = html_print_image('images/chart_curve.png', true, array('title' => __('Module Graph')));
break; break;
case SIMPLE_VALUE: case SIMPLE_VALUE:
$table->data[$i + 1]['icon'] = print_image('images/binary.png', true, array('title' => __('Simple Value'))); $table->data[$i + 1]['icon'] = html_print_image('images/binary.png', true, array('title' => __('Simple Value')));
break; break;
case LABEL: case LABEL:
$table->data[$i + 1]['icon'] = print_image('images/tag_red.png', true, array('title' => __('Label'))); $table->data[$i + 1]['icon'] = html_print_image('images/tag_red.png', true, array('title' => __('Label')));
break; break;
case ICON: case ICON:
$table->data[$i + 1]['icon'] = print_image('images/photo.png', true, array('title' => __('Icon'))); $table->data[$i + 1]['icon'] = html_print_image('images/photo.png', true, array('title' => __('Icon')));
break; break;
default: default:
$table->data[$i + 1]['icon'] = ''; $table->data[$i + 1]['icon'] = '';
@ -132,8 +132,8 @@ foreach ($layoutDatas as $layoutData) {
//Label and color label //Label and color label
if ($layoutData['type'] != ICON) { if ($layoutData['type'] != ICON) {
$table->data[$i + 1][0] = '<span style="width: 130px; display: block;">' . $table->data[$i + 1][0] = '<span style="width: 130px; display: block;">' .
print_input_text ('label_' . $idLayoutData, $layoutData['label'], '', 10, 200, true) . html_print_input_text ('label_' . $idLayoutData, $layoutData['label'], '', 10, 200, true) .
print_input_text_extended ('label_color_' . $idLayoutData, $layoutData['label_color'], 'text-'.'label_color_' . $idLayoutData, '', 7, 7, false, '', 'style="visibility: hidden; width: 0px;" class="label_color"', true) . html_print_input_text_extended ('label_color_' . $idLayoutData, $layoutData['label_color'], 'text-'.'label_color_' . $idLayoutData, '', 7, 7, false, '', 'style="visibility: hidden; width: 0px;" class="label_color"', true) .
'</span>'; '</span>';
} }
else { else {
@ -143,30 +143,30 @@ foreach ($layoutDatas as $layoutData) {
//Image //Image
if (($layoutData['type'] == STATIC_GRAPH) || ($layoutData['type'] == ICON)) { if (($layoutData['type'] == STATIC_GRAPH) || ($layoutData['type'] == ICON)) {
$table->data[$i + 1][1] = print_select ($images_list, 'image_' . $idLayoutData, $layoutData['image'], '', 'None', '', true); $table->data[$i + 1][1] = html_print_select ($images_list, 'image_' . $idLayoutData, $layoutData['image'], '', 'None', '', true);
} }
else { else {
$table->data[$i + 1][1] = ''; $table->data[$i + 1][1] = '';
} }
//Width and height //Width and height
$table->data[$i + 1][2] = print_input_text('width_' . $idLayoutData, $layoutData['width'], '', 3, 5, true) . $table->data[$i + 1][2] = html_print_input_text('width_' . $idLayoutData, $layoutData['width'], '', 3, 5, true) .
'x' . 'x' .
print_input_text('height_' . $idLayoutData, $layoutData['height'], '', 3, 5, true); html_print_input_text('height_' . $idLayoutData, $layoutData['height'], '', 3, 5, true);
//Position //Position
$table->data[$i + 1][3] = '(' . print_input_text('left_' . $idLayoutData, $layoutData['pos_x'], '', 3, 5, true) . $table->data[$i + 1][3] = '(' . html_print_input_text('left_' . $idLayoutData, $layoutData['pos_x'], '', 3, 5, true) .
',' . print_input_text('top_' . $idLayoutData, $layoutData['pos_y'], '', 3, 5, true) . ',' . html_print_input_text('top_' . $idLayoutData, $layoutData['pos_y'], '', 3, 5, true) .
')'; ')';
//Parent //Parent
$table->data[$i + 1][4] = print_select_from_sql ('SELECT id, label FROM tlayout_data WHERE id_layout = '. $idVisualConsole . ' AND id !=' . $idLayoutData, $table->data[$i + 1][4] = html_print_select_from_sql ('SELECT id, label FROM tlayout_data WHERE id_layout = '. $idVisualConsole . ' AND id !=' . $idLayoutData,
'parent_' . $idLayoutData, $layoutData['parent_item'], '', 'None', 0, true); 'parent_' . $idLayoutData, $layoutData['parent_item'], '', 'None', 0, true);
//Delete row button //Delete row button
$table->data[$i + 1][5] = '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=' . $table->data[$i + 1][5] = '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=' .
$activeTab . '&action=delete&id_visual_console=' . $visualConsole["id"] . '&id_element=' . $idLayoutData . '" ' . $activeTab . '&action=delete&id_visual_console=' . $visualConsole["id"] . '&id_element=' . $idLayoutData . '" ' .
'onclick="javascript: if (!confirm(\'' . __('Are you sure?') . '\')) return false;">' . print_image('images/cross.png', true) . '</a>'; 'onclick="javascript: if (!confirm(\'' . __('Are you sure?') . '\')) return false;">' . html_print_image('images/cross.png', true) . '</a>';
//Second row //Second row
@ -175,7 +175,7 @@ foreach ($layoutDatas as $layoutData) {
//Agent //Agent
if (($layoutData['type'] != ICON) && ($layoutData['type'] != LABEL)) { if (($layoutData['type'] != ICON) && ($layoutData['type'] != LABEL)) {
$table->data[$i + 2][0] = '<a href="#" class="tip">&nbsp;<span>' . __("Type at least two characters to search.") . '</span></a>' . $table->data[$i + 2][0] = '<a href="#" class="tip">&nbsp;<span>' . __("Type at least two characters to search.") . '</span></a>' .
print_input_text_extended ('agent_' . $idLayoutData, get_agent_name($layoutData['id_agent']), 'text-agent_' . $idLayoutData, '', 15, 100, false, '', html_print_input_text_extended ('agent_' . $idLayoutData, get_agent_name($layoutData['id_agent']), 'text-agent_' . $idLayoutData, '', 15, 100, false, '',
array('class' => 'text-agent', 'style' => 'background: #ffffff url(images/lightning.png) no-repeat right;'), true); array('class' => 'text-agent', 'style' => 'background: #ffffff url(images/lightning.png) no-repeat right;'), true);
} }
else { else {
@ -185,7 +185,7 @@ foreach ($layoutDatas as $layoutData) {
//Modules //Modules
if (($layoutData['type'] != ICON) && ($layoutData['type'] != LABEL)) { if (($layoutData['type'] != ICON) && ($layoutData['type'] != LABEL)) {
$sql = 'SELECT id_agente_modulo, nombre FROM tagente_modulo WHERE disabled = 0 AND id_agente = ' . $layoutData['id_agent']; $sql = 'SELECT id_agente_modulo, nombre FROM tagente_modulo WHERE disabled = 0 AND id_agente = ' . $layoutData['id_agent'];
$table->data[$i + 2][1] = print_select_from_sql($sql, $table->data[$i + 2][1] = html_print_select_from_sql($sql,
'module_' . $idLayoutData, $layoutData['id_agente_modulo'], '', '---', 0, true); 'module_' . $idLayoutData, $layoutData['id_agente_modulo'], '', '---', 0, true);
} }
else { else {
@ -197,14 +197,14 @@ foreach ($layoutDatas as $layoutData) {
//Period //Period
if ($layoutData['type'] == MODULE_GRAPH) { if ($layoutData['type'] == MODULE_GRAPH) {
$table->data[$i + 2][3] = print_select ($intervals, 'period_' . $idLayoutData, $layoutData['period'], '', '--', 0, true); $table->data[$i + 2][3] = html_print_select ($intervals, 'period_' . $idLayoutData, $layoutData['period'], '', '--', 0, true);
} }
else { else {
$table->data[$i + 2][3] = ''; $table->data[$i + 2][3] = '';
} }
//Map linked //Map linked
$table->data[$i + 2][4] = print_select_from_sql ('SELECT id, name FROM tlayout WHERE id != ' . $idVisualConsole, $table->data[$i + 2][4] = html_print_select_from_sql ('SELECT id, name FROM tlayout WHERE id != ' . $idVisualConsole,
'map_linked_' . $idLayoutData, $layoutData['id_layout_linked'], '', 'None', '', true); 'map_linked_' . $idLayoutData, $layoutData['id_layout_linked'], '', 'None', '', true);
$table->data[$i + 2][5] = ''; $table->data[$i + 2][5] = '';
@ -224,14 +224,14 @@ foreach ($layoutDatas as $layoutData) {
echo '<form method="post" action="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=' . $activeTab . '&id_visual_console=' . $visualConsole["id"] . '">'; echo '<form method="post" action="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=' . $activeTab . '&id_visual_console=' . $visualConsole["id"] . '">';
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
print_input_hidden ('action', 'update'); html_print_input_hidden ('action', 'update');
print_input_hidden ('id_visual_console', $visualConsole["id"]); html_print_input_hidden ('id_visual_console', $visualConsole["id"]);
print_submit_button (__('Update'), 'go', false, 'class="sub next"'); html_print_submit_button (__('Update'), 'go', false, 'class="sub next"');
echo '</div>'; echo '</div>';
print_table($table); html_print_table($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
print_submit_button (__('Update'), 'go', false, 'class="sub next"'); html_print_submit_button (__('Update'), 'go', false, 'class="sub next"');
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

View File

@ -211,19 +211,19 @@ switch ($activeTab) {
$buttons = array( $buttons = array(
'data' => array('active' => false, 'data' => array('active' => false,
'text' => '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=data&action=' . $action . '&id_visual_console=' . $idVisualConsole . '">' . 'text' => '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=data&action=' . $action . '&id_visual_console=' . $idVisualConsole . '">' .
print_image ("images/god9.png", true, array ("title" => __('Data'))) .'</a>'), html_print_image ("images/god9.png", true, array ("title" => __('Data'))) .'</a>'),
'list_elements' => array('active' => false, 'list_elements' => array('active' => false,
'text' => '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=list_elements&action=' . $action . '&id_visual_console=' . $idVisualConsole . '">' . 'text' => '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=list_elements&action=' . $action . '&id_visual_console=' . $idVisualConsole . '">' .
print_image ("images/god6.png", true, array ("title" => __('List elements'))) .'</a>'), html_print_image ("images/god6.png", true, array ("title" => __('List elements'))) .'</a>'),
'wizard' => array('active' => false, 'wizard' => array('active' => false,
'text' => '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=wizard&action=' . $action . '&id_visual_console=' . $idVisualConsole . '">' . 'text' => '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=wizard&action=' . $action . '&id_visual_console=' . $idVisualConsole . '">' .
print_image ("images/wand.png", true, array ("title" => __('Wizard'))) .'</a>'), html_print_image ("images/wand.png", true, array ("title" => __('Wizard'))) .'</a>'),
'editor' => array('active' => false, 'editor' => array('active' => false,
'text' => '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=editor&action=' . $action . '&id_visual_console=' . $idVisualConsole . '">' . 'text' => '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=editor&action=' . $action . '&id_visual_console=' . $idVisualConsole . '">' .
print_image ("images/config.png", true, array ("title" => __('Editor'))) .'</a>'), html_print_image ("images/config.png", true, array ("title" => __('Editor'))) .'</a>'),
'preview' => array('active' => false, 'preview' => array('active' => false,
'text' => '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=preview&action=' . $action . '&id_visual_console=' . $idVisualConsole . '">' . 'text' => '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=preview&action=' . $action . '&id_visual_console=' . $idVisualConsole . '">' .
print_image ("images/eye.png", true, array ("title" => __('Preview'))) .'</a>'),); html_print_image ("images/eye.png", true, array ("title" => __('Preview'))) .'</a>'),);
if ($action == 'new' || $idVisualConsole === false){ if ($action == 'new' || $idVisualConsole === false){
$buttons = array('data' => $buttons['data']); //Show only the data tab $buttons = array('data' => $buttons['data']); //Show only the data tab

View File

@ -51,29 +51,29 @@ foreach ($all_images as $image_file) {
} }
$table->data[0][0] = __('Image'); $table->data[0][0] = __('Image');
$table->data[0][1] = print_select ($images_list, 'image', '', '', '', '', true); $table->data[0][1] = html_print_select ($images_list, 'image', '', '', '', '', true);
$table->data[1][0] = __('Image range (px)'); $table->data[1][0] = __('Image range (px)');
$table->data[1][1] = print_input_text ('range', 50, '', 5, 5, true); $table->data[1][1] = html_print_input_text ('range', 50, '', 5, 5, true);
$table->data[2][0] = __('Image size (px)'); $table->data[2][0] = __('Image size (px)');
$table->data[2][1] = __('Width').': '.print_input_text ('width', 0, '', 5, 5, true); $table->data[2][1] = __('Width').': '.html_print_input_text ('width', 0, '', 5, 5, true);
$table->data[2][1] .= '<br />'.__('Height').': '.print_input_text ('height', 0, '', 5, 5, true); $table->data[2][1] .= '<br />'.__('Height').': '.html_print_input_text ('height', 0, '', 5, 5, true);
$table->data[3][0] = __('Agents'); $table->data[3][0] = __('Agents');
$table->data[3][1] = print_select (get_group_agents ($visualConsole['id_group'], false, "none", false, true), $table->data[3][1] = html_print_select (get_group_agents ($visualConsole['id_group'], false, "none", false, true),
'id_agents[]', 0, false, '', '', true, true); 'id_agents[]', 0, false, '', '', true, true);
$table->data[4][0] = __('Modules'); $table->data[4][0] = __('Modules');
$table->data[4][1] = print_select (array (), 'module[]', 0, false, '', '', true, true); $table->data[4][1] = html_print_select (array (), 'module[]', 0, false, '', '', true, true);
echo '<form method="post" action="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=' . $activeTab . '&id_visual_console=' . $visualConsole["id"] . '" onsubmit="if (! confirm(\''.__('Are you sure to add many elements\nin visual map?').'\')) return false;">'; echo '<form method="post" action="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=' . $activeTab . '&id_visual_console=' . $visualConsole["id"] . '" onsubmit="if (! confirm(\''.__('Are you sure to add many elements\nin visual map?').'\')) return false;">';
print_table ($table); html_print_table ($table);
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
print_input_hidden ('action', 'update'); html_print_input_hidden ('action', 'update');
print_input_hidden ('id_visual_console', $visualConsole["id"]); html_print_input_hidden ('id_visual_console', $visualConsole["id"]);
print_submit_button (__('Add'), 'go', false, 'class="sub wizard wand"'); html_print_submit_button (__('Add'), 'go', false, 'class="sub wizard wand"');
echo '</div>'; echo '</div>';
echo '</form>'; echo '</form>';

Some files were not shown because too many files have changed in this diff Show More