pandorafms/pandora_console/operation/search_users.php

241 lines
8.9 KiB
PHP
Raw Normal View History

<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
global $config;
$searchUsers = check_acl($config['id_user'], 0, "UM");
$selectUserIDUp = '';
$selectUserIDDown = '';
$selectNameUp = '';
$selectNameDown = '';
$selectEmailUp = '';
$selectEmailDown = '';
$selectLastContactUp = '';
$selectLastContactDown = '';
$selectProfileUp = '';
$selectProfileDown = '';
switch ($sortField) {
case 'id_user':
switch ($sort) {
case 'up':
$selectUserIDUp = $selected;
$order = array('field' => 'id_user', 'order' => 'ASC');
break;
case 'down':
$selectUserIDDown = $selected;
$order = array('field' => 'id_user', 'order' => 'DESC');
break;
}
break;
case 'name':
switch ($sort) {
case 'up':
$selectNameUp = $selected;
$order = array('field' => 'fullname', 'order' => 'ASC');
break;
case 'down':
$selectNameDown = $selected;
$order = array('field' => 'fullname', 'order' => 'DESC');
break;
}
break;
case 'email':
switch ($sort) {
case 'up':
$selectLastContactUp = $selected;
$order = array('field' => 'email', 'order' => 'ASC');
break;
case 'down':
$selectEmailDown = $selected;
$order = array('field' => 'email', 'order' => 'DESC');
break;
}
break;
case 'last_contact':
switch ($sort) {
case 'up':
$selectLastContactUp = $selected;
$order = array('field' => 'last_connect', 'order' => 'ASC');
break;
case 'down':
$selectLastContactDown = $selected;
$order = array('field' => 'last_connect', 'order' => 'DESC');
break;
}
break;
case 'last_contact':
switch ($sort) {
case 'up':
$selectLastContactUp = $selected;
$order = array('field' => 'last_connect', 'order' => 'ASC');
break;
case 'down':
$selectLastContactDown = $selected;
$order = array('field' => 'last_connect', 'order' => 'DESC');
break;
}
break;
case 'profile':
switch ($sort) {
case 'up':
$selectProfileUp = $selected;
$order = array('field' => 'is_admin', 'order' => 'ASC');
break;
case 'down':
$selectProfileDown = $selected;
$order = array('field' => 'is_admin', 'order' => 'DESC');
break;
}
break;
default:
$selectUserIDUp = $selected;
$selectUserIDDown = '';
$selectNameUp = '';
$selectNameDown = '';
$selectEmailUp = '';
$selectEmailDown = '';
$selectLastContactUp = '';
$selectLastContactDown = '';
$selectProfileUp = '';
$selectProfileDown = '';
$order = array('field' => 'id_user', 'order' => 'ASC');
break;
}
$users = false;
if ($searchUsers) {
$sql = "SELECT id_user, fullname, firstname, lastname, middlename, email, last_connect, is_admin, comments FROM tusuario
WHERE fullname LIKE '%" . $stringSearchSQL . "%' OR
id_user LIKE '%" . $stringSearchSQL . "%' OR
firstname LIKE '%" . $stringSearchSQL . "%' OR
lastname LIKE '%" . $stringSearchSQL . "%' OR
middlename LIKE '%" . $stringSearchSQL . "%' OR
email LIKE '%" . $stringSearchSQL . "%'
ORDER BY " . $order['field'] . " " . $order['order'] . "
LIMIT " . $config['block_size'] . " OFFSET " . get_parameter ('offset',0);
$users = process_sql($sql);
if($users !== false) {
//Check ACLs
$users_id = array();
foreach($users as $key => $user){
2011-03-08 Miguel de Dios <miguel.dedios@artica.es> * include/functions_html.php, include/functions_messages.php, include/functions_exportserver.php, include/functions_reporting.php, include/functions_gis.php, include/functions_networkmap.php, include/functions_servers.php, include/functions_api.php, include/fgraph.php, include/functions_agents.php, include/functions_db.php, include/functions_alerts.php, extensions/module_groups.php, operation/incidents/incident.php, operation/incidents/incident_detail.php, operation/search_modules.php, operation/agentes/status_monitor.php, operation/agentes/export_csv.php, operation/agentes/estado_ultimopaquete.php, operation/agentes/alerts_status.php, operation/agentes/estado_agente.php, operation/agentes/sla_view.php, operation/agentes/ver_agente.php, operation/servers/view_server_detail.php, operation/menu.php, operation/search_graphs.php, operation/snmpconsole/snmp_view.php, operation/gis_maps/ajax.php, operation/events/events_rss.php, operation/events/events_list.php, operation/search_alerts.php, operation/search_reports.php, operation/reporting/reporting_xml.php, operation/reporting/graph_viewer.php, operation/search_maps.php, operation/search_users.php, mobile/operation/agents/view_agents.php, mobile/operation/events/events.php, godmode/groups/modu_group_list.php, godmode/groups/configure_group.php, godmode/groups/group_list.php, godmode/db/db_main.php, godmode/db/db_purge.php, godmode/agentes/module_manager_editor_prediction.php, godmode/agentes/modificar_agente.php, godmode/agentes/module_manager_editor.php, godmode/agentes/planned_downtime.php, godmode/servers/manage_recontask_form.php, godmode/alerts/alert_list.list.php, godmode/users/configure_user.php, godmode/massive/massive_edit_modules.php, godmode/modules/manage_network_templates_form.php, godmode/modules/manage_network_components_form_wmi.php, godmode/reporting/visual_console_builder.php, godmode/reporting/reporting_builder.item_editor.php: changed or added in some cases the SQL queries for to be PostgreSQL standard, and cleaned source style. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4074 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-09 15:26:36 +01:00
if (!check_acl ($config["id_user"], get_user_groups ($user["id_user"]), "UM") && $config["id_user"] != $user["id_user"]) {
unset($users[$key]);
}
else {
$users_id[] = $user["id_user"];
}
}
if(!$users_id) {
$user_condition = "";
}
else {
// Condition with the visible agents
$user_condition = " AND id_user IN (\"".implode('","',$users_id)."\")";
}
$sql = "SELECT COUNT(id_user) AS count FROM tusuario
WHERE (fullname LIKE '%" . $stringSearchSQL . "%' OR
firstname LIKE '%" . $stringSearchSQL . "%' OR
lastname LIKE '%" . $stringSearchSQL . "%' OR
middlename LIKE '%" . $stringSearchSQL . "%' OR
email LIKE '%" . $stringSearchSQL . "%')".$user_condition;
$totalUsers = get_db_row_sql($sql);
$totalUsers = $totalUsers['count'];
}
}
if (!$users) {
echo "<br><div class='nf'>" . __("Zero results found") . "</div>\n";
}
else {
$table->cellpadding = 4;
$table->cellspacing = 4;
$table->width = "98%";
$table->class = "databox";
$table->align = array ();
$table->align[4] = "center";
$table->head = array ();
$table->head[0] = __('User ID') . ' ' .
2011-02-03 Juan Manuel Ramon <juanmanuel.ramon@artica.es> * include/functions_menu.php include/functions_html.php include/functions_modules.php include/functions_reporting.php include/functions_filemanager.php include/functions_gis.php include/functions_networkmap.php include/functions_visual_map.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/es/modu_group_list.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.php include/functions_db.php include/functions_fsgraph.php operation/incidents/incident_detail.php operation/agentes/status_monitor.php operation/agentes/estado_ultimopaquete.php operation/agentes/alerts_status.php operation/agentes/estado_generalagente.php operation/agentes/estado_agente.php operation/agentes/estado_monitores.php operation/agentes/ver_agente.php operation/agentes/group_view.php operation/servers/view_server_detail.php operation/snmpconsole/snmp_view.php operation/users/user_edit.php operation/gis_maps/render_view.php operation/events/sound_events.php operation/search_alerts.php operation/reporting/reporting_viewer.php operation/reporting/custom_reporting.php operation/search_reports.php operation/search_users.php general/pandora_help.php general/noaccess.php general/ui/agents_list.php general/header.php godmode/groups/modu_group_list.php godmode/groups/configure_group.php godmode/groups/group_list.php godmode/extensions.php godmode/db/db_sanity.php godmode/db/db_info.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.php godmode/agentes/modificar_agente.php godmode/agentes/planned_downtime.php godmode/agentes/agent_manager.php godmode/servers/recon_script.php godmode/servers/plugin.php godmode/servers/manage_recontask.php godmode/alerts/alert_list.list.php godmode/alerts/configure_alert_compound.php godmode/alerts/alert_compounds.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/os.list.php godmode/setup/news.php godmode/setup/links.php godmode/setup/setup.php godmode/users/user_list.php godmode/gis_maps/configure_gis_map.php godmode/massive/massive_add_alerts.php godmode/massive/massive_delete_agents.php godmode/massive/massive_enable_disable_alerts.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/module_list.php godmode/modules/manage_network_templates_form.php godmode/reporting/reporting_builder.list_items.php godmode/reporting/reporting_builder.preview.php godmode/reporting/visual_console_builder.elements.php godmode/reporting/graph_builder.graph_editor.php godmode/reporting/reporting_builder.item_editor.php godmode/reporting/graphs.php: Changed the way of print images from "<src=.." html tag to print_image function. * include/functions_ui.php mobile/operation/agents/view_agents.php: print_group_icon2 function renamed to print_group_icon_with_path git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3800 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-02-04 14:30:50 +01:00
'<a href="index.php?search_category=users&keywords=' . $config['search_keywords'] . '&head_search_keywords=abc&offset=' . $offset . '&sort_field=id_user&sort=up">' . print_image("images/sort_up.png", true, array("style" => $selectUserIDUp)) . '</a>' .
'<a href="index.php?search_category=users&keywords=' . $config['search_keywords'] . '&head_search_keywords=abc&offset=' . $offset . '&sort_field=id_user&sort=down">' . print_image("images/sort_down.png", true, array("style"=> $selectUserIDDown)) . '</a>';
$table->head[1] = __('Name') . ' ' .
'<a href="index.php?search_category=users&keywords=' . $config['search_keywords'] . '&head_search_keywords=abc&offset=' . $offset . '&sort_field=name&sort=up">' . print_image("images/sort_up.png", true, array("style" => $selectNameUp)) . '</a>' .
2011-02-03 Juan Manuel Ramon <juanmanuel.ramon@artica.es> * include/functions_menu.php include/functions_html.php include/functions_modules.php include/functions_reporting.php include/functions_filemanager.php include/functions_gis.php include/functions_networkmap.php include/functions_visual_map.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/es/modu_group_list.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.php include/functions_db.php include/functions_fsgraph.php operation/incidents/incident_detail.php operation/agentes/status_monitor.php operation/agentes/estado_ultimopaquete.php operation/agentes/alerts_status.php operation/agentes/estado_generalagente.php operation/agentes/estado_agente.php operation/agentes/estado_monitores.php operation/agentes/ver_agente.php operation/agentes/group_view.php operation/servers/view_server_detail.php operation/snmpconsole/snmp_view.php operation/users/user_edit.php operation/gis_maps/render_view.php operation/events/sound_events.php operation/search_alerts.php operation/reporting/reporting_viewer.php operation/reporting/custom_reporting.php operation/search_reports.php operation/search_users.php general/pandora_help.php general/noaccess.php general/ui/agents_list.php general/header.php godmode/groups/modu_group_list.php godmode/groups/configure_group.php godmode/groups/group_list.php godmode/extensions.php godmode/db/db_sanity.php godmode/db/db_info.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.php godmode/agentes/modificar_agente.php godmode/agentes/planned_downtime.php godmode/agentes/agent_manager.php godmode/servers/recon_script.php godmode/servers/plugin.php godmode/servers/manage_recontask.php godmode/alerts/alert_list.list.php godmode/alerts/configure_alert_compound.php godmode/alerts/alert_compounds.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/os.list.php godmode/setup/news.php godmode/setup/links.php godmode/setup/setup.php godmode/users/user_list.php godmode/gis_maps/configure_gis_map.php godmode/massive/massive_add_alerts.php godmode/massive/massive_delete_agents.php godmode/massive/massive_enable_disable_alerts.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/module_list.php godmode/modules/manage_network_templates_form.php godmode/reporting/reporting_builder.list_items.php godmode/reporting/reporting_builder.preview.php godmode/reporting/visual_console_builder.elements.php godmode/reporting/graph_builder.graph_editor.php godmode/reporting/reporting_builder.item_editor.php godmode/reporting/graphs.php: Changed the way of print images from "<src=.." html tag to print_image function. * include/functions_ui.php mobile/operation/agents/view_agents.php: print_group_icon2 function renamed to print_group_icon_with_path git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3800 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-02-04 14:30:50 +01:00
'<a href="index.php?search_category=users&keywords=' . $config['search_keywords'] . '&head_search_keywords=abc&offset=' . $offset . '&sort_field=name&sort=down">' . print_image("images/sort_down.png", true, array("style" => $selectNameDown)) . '</a>';
$table->head[2] = __('Email') . ' ' .
2011-02-03 Juan Manuel Ramon <juanmanuel.ramon@artica.es> * include/functions_menu.php include/functions_html.php include/functions_modules.php include/functions_reporting.php include/functions_filemanager.php include/functions_gis.php include/functions_networkmap.php include/functions_visual_map.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/es/modu_group_list.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.php include/functions_db.php include/functions_fsgraph.php operation/incidents/incident_detail.php operation/agentes/status_monitor.php operation/agentes/estado_ultimopaquete.php operation/agentes/alerts_status.php operation/agentes/estado_generalagente.php operation/agentes/estado_agente.php operation/agentes/estado_monitores.php operation/agentes/ver_agente.php operation/agentes/group_view.php operation/servers/view_server_detail.php operation/snmpconsole/snmp_view.php operation/users/user_edit.php operation/gis_maps/render_view.php operation/events/sound_events.php operation/search_alerts.php operation/reporting/reporting_viewer.php operation/reporting/custom_reporting.php operation/search_reports.php operation/search_users.php general/pandora_help.php general/noaccess.php general/ui/agents_list.php general/header.php godmode/groups/modu_group_list.php godmode/groups/configure_group.php godmode/groups/group_list.php godmode/extensions.php godmode/db/db_sanity.php godmode/db/db_info.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.php godmode/agentes/modificar_agente.php godmode/agentes/planned_downtime.php godmode/agentes/agent_manager.php godmode/servers/recon_script.php godmode/servers/plugin.php godmode/servers/manage_recontask.php godmode/alerts/alert_list.list.php godmode/alerts/configure_alert_compound.php godmode/alerts/alert_compounds.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/os.list.php godmode/setup/news.php godmode/setup/links.php godmode/setup/setup.php godmode/users/user_list.php godmode/gis_maps/configure_gis_map.php godmode/massive/massive_add_alerts.php godmode/massive/massive_delete_agents.php godmode/massive/massive_enable_disable_alerts.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/module_list.php godmode/modules/manage_network_templates_form.php godmode/reporting/reporting_builder.list_items.php godmode/reporting/reporting_builder.preview.php godmode/reporting/visual_console_builder.elements.php godmode/reporting/graph_builder.graph_editor.php godmode/reporting/reporting_builder.item_editor.php godmode/reporting/graphs.php: Changed the way of print images from "<src=.." html tag to print_image function. * include/functions_ui.php mobile/operation/agents/view_agents.php: print_group_icon2 function renamed to print_group_icon_with_path git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3800 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-02-04 14:30:50 +01:00
'<a href="index.php?search_category=users&keywords=' . $config['search_keywords'] . '&head_search_keywords=abc&offset=' . $offset . '&sort_field=email&sort=up">' . print_image("images/sort_up.png", true, array("style" => $selectEmailUp)) . '</a>' .
'<a href="index.php?search_category=users&keywords=' . $config['search_keywords'] . '&head_search_keywords=abc&offset=' . $offset . '&sort_field=email&sort=down">' . print_image("images/sort_down.png", true, array("style" => $selectEmailDown)) . '</a>';
$table->head[3] = __('Last contact') . ' ' .
2011-02-03 Juan Manuel Ramon <juanmanuel.ramon@artica.es> * include/functions_menu.php include/functions_html.php include/functions_modules.php include/functions_reporting.php include/functions_filemanager.php include/functions_gis.php include/functions_networkmap.php include/functions_visual_map.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/es/modu_group_list.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.php include/functions_db.php include/functions_fsgraph.php operation/incidents/incident_detail.php operation/agentes/status_monitor.php operation/agentes/estado_ultimopaquete.php operation/agentes/alerts_status.php operation/agentes/estado_generalagente.php operation/agentes/estado_agente.php operation/agentes/estado_monitores.php operation/agentes/ver_agente.php operation/agentes/group_view.php operation/servers/view_server_detail.php operation/snmpconsole/snmp_view.php operation/users/user_edit.php operation/gis_maps/render_view.php operation/events/sound_events.php operation/search_alerts.php operation/reporting/reporting_viewer.php operation/reporting/custom_reporting.php operation/search_reports.php operation/search_users.php general/pandora_help.php general/noaccess.php general/ui/agents_list.php general/header.php godmode/groups/modu_group_list.php godmode/groups/configure_group.php godmode/groups/group_list.php godmode/extensions.php godmode/db/db_sanity.php godmode/db/db_info.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.php godmode/agentes/modificar_agente.php godmode/agentes/planned_downtime.php godmode/agentes/agent_manager.php godmode/servers/recon_script.php godmode/servers/plugin.php godmode/servers/manage_recontask.php godmode/alerts/alert_list.list.php godmode/alerts/configure_alert_compound.php godmode/alerts/alert_compounds.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/os.list.php godmode/setup/news.php godmode/setup/links.php godmode/setup/setup.php godmode/users/user_list.php godmode/gis_maps/configure_gis_map.php godmode/massive/massive_add_alerts.php godmode/massive/massive_delete_agents.php godmode/massive/massive_enable_disable_alerts.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/module_list.php godmode/modules/manage_network_templates_form.php godmode/reporting/reporting_builder.list_items.php godmode/reporting/reporting_builder.preview.php godmode/reporting/visual_console_builder.elements.php godmode/reporting/graph_builder.graph_editor.php godmode/reporting/reporting_builder.item_editor.php godmode/reporting/graphs.php: Changed the way of print images from "<src=.." html tag to print_image function. * include/functions_ui.php mobile/operation/agents/view_agents.php: print_group_icon2 function renamed to print_group_icon_with_path git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3800 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-02-04 14:30:50 +01:00
'<a href="index.php?search_category=users&keywords=' . $config['search_keywords'] . '&head_search_keywords=abc&offset=' . $offset . '&sort_field=last_contact&sort=up">' . print_image("images/sort_up.png", true, array("style" => $selectLastContactUp)) . '</a>' .
'<a href="index.php?search_category=users&keywords=' . $config['search_keywords'] . '&head_search_keywords=abc&offset=' . $offset . '&sort_field=last_contact&sort=down">' . print_image("images/sort_down.png", true, array("style" => $selectLastContactDown)) . '</a>';
$table->head[4] = __('Profile') . ' ' .
2011-02-03 Juan Manuel Ramon <juanmanuel.ramon@artica.es> * include/functions_menu.php include/functions_html.php include/functions_modules.php include/functions_reporting.php include/functions_filemanager.php include/functions_gis.php include/functions_networkmap.php include/functions_visual_map.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/es/modu_group_list.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.php include/functions_db.php include/functions_fsgraph.php operation/incidents/incident_detail.php operation/agentes/status_monitor.php operation/agentes/estado_ultimopaquete.php operation/agentes/alerts_status.php operation/agentes/estado_generalagente.php operation/agentes/estado_agente.php operation/agentes/estado_monitores.php operation/agentes/ver_agente.php operation/agentes/group_view.php operation/servers/view_server_detail.php operation/snmpconsole/snmp_view.php operation/users/user_edit.php operation/gis_maps/render_view.php operation/events/sound_events.php operation/search_alerts.php operation/reporting/reporting_viewer.php operation/reporting/custom_reporting.php operation/search_reports.php operation/search_users.php general/pandora_help.php general/noaccess.php general/ui/agents_list.php general/header.php godmode/groups/modu_group_list.php godmode/groups/configure_group.php godmode/groups/group_list.php godmode/extensions.php godmode/db/db_sanity.php godmode/db/db_info.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.php godmode/agentes/modificar_agente.php godmode/agentes/planned_downtime.php godmode/agentes/agent_manager.php godmode/servers/recon_script.php godmode/servers/plugin.php godmode/servers/manage_recontask.php godmode/alerts/alert_list.list.php godmode/alerts/configure_alert_compound.php godmode/alerts/alert_compounds.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/os.list.php godmode/setup/news.php godmode/setup/links.php godmode/setup/setup.php godmode/users/user_list.php godmode/gis_maps/configure_gis_map.php godmode/massive/massive_add_alerts.php godmode/massive/massive_delete_agents.php godmode/massive/massive_enable_disable_alerts.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/module_list.php godmode/modules/manage_network_templates_form.php godmode/reporting/reporting_builder.list_items.php godmode/reporting/reporting_builder.preview.php godmode/reporting/visual_console_builder.elements.php godmode/reporting/graph_builder.graph_editor.php godmode/reporting/reporting_builder.item_editor.php godmode/reporting/graphs.php: Changed the way of print images from "<src=.." html tag to print_image function. * include/functions_ui.php mobile/operation/agents/view_agents.php: print_group_icon2 function renamed to print_group_icon_with_path git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3800 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-02-04 14:30:50 +01:00
'<a href="index.php?search_category=users&keywords=' . $config['search_keywords'] . '&head_search_keywords=abc&offset=' . $offset . '&sort_field=profile&sort=up">' . print_image("images/sort_up.png", true, array("style" => $selectProfileUp)) . '</a>' .
'<a href="index.php?search_category=users&keywords=' . $config['search_keywords'] . '&head_search_keywords=abc&offset=' . $offset . '&sort_field=profile&sort=down">' . print_image("images/sort_down.png", true, array("style" => $selectProfileDown)) . '</a>';
$table->head[5] = __('Description');
$table->data = array ();
foreach ($users as $user) {
$userIDCell = "<a href='?sec=gusuarios&sec2=godmode/users/configure_user&id=" .
$user['id_user'] . "'>" . $user['id_user'] . "</a>";
if ($user["is_admin"]) {
$profileCell = print_image ("images/user_suit.png", true,
array ("alt" => __('Admin'),
"title" => __('Administrator'))).'&nbsp;';
}
else {
$profileCell = print_image ("images/user_green.png", true,
array ("alt" => __('User'),
"title" => __('Standard User'))).'&nbsp;';
}
$profileCell .= '<a href="#" class="tip"><span>';
$result = get_db_all_rows_field_filter ("tusuario_perfil", "id_usuario", $user['id_user']);
if ($result !== false) {
foreach ($result as $row) {
$profileCell .= get_profile_name ($row["id_perfil"]);
$profileCell .= " / ";
$profileCell .= get_group_name ($row["id_grupo"]);
$profileCell .= "<br />";
}
}
else {
$profileCell .= __('The user doesn\'t have any assigned profile/group');
}
$profileCell .= "</span></a>";
array_push($table->data, array(
$userIDCell,
$user['fullname'],
"<a href='mailto:" . $user['email'] . "'>" . $user['email'] . "</a>",
print_timestamp ($user["last_connect"], true),
$profileCell,
$user['comments']));
}
echo "<br />";pagination ($totalUsers);
print_table ($table); unset($table);
pagination ($totalUsers);
}
?>