2006-03-27 05:37:27 +02:00
< ? php
2006-07-19 20:29:12 +02:00
2008-08-22 20:07:32 +02:00
// Pandora FMS - the Flexible Monitoring System
// ============================================
// Copyright (c) 2008 Artica Soluciones Tecnologicas, http://www.artica.es
2008-04-01 15:53:11 +02:00
// Please see http://pandora.sourceforge.net for full contribution list
2007-02-20 02:38:59 +01:00
2006-07-19 20:29:12 +02:00
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
2008-04-01 15:53:11 +02:00
// as published by the Free Software Foundation for version 2.
2006-07-19 20:29:12 +02:00
// 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.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2008-04-01 15:53:11 +02:00
2008-12-10 21:15:38 +01:00
require_once ( " include/config.php " );
require_once ( " include/functions_incidents.php " );
2007-02-06 16:38:29 +01:00
2008-08-11 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added __ as an alias of lang_string().
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/functions.php,
include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/extensions.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/status_events.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, ajax.php,
general/logoff.php, general/pandora_help.php, general/footer.php,
general/noaccess.php, general/logon_failed.php,
general/links_menu.php, general/login_page.php, general/logon_ok.php,
general/header.php, general/main_menu.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/setup/news.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/profiles/profile_list.php,
godmode/admin_access_logs.php, godmode/db/db_info_data.php,
godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_sanity.php, godmode/db/db_refine.php,
godmode/db/db_info.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/extensions.php,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a
instead of $lang_label to future use of gettext. Style
corrections.
* godmode/agentes/planned_downtime.php: Rewritten to use Pandora
functions and adopt the UI style. Replaced lang_string with __().
* pandoradb.sql: Fields in tplanned_downtime renamed to fit
guidelines.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
check_login ();
if ( ! give_acl ( $config [ 'id_user' ], 0 , " IR " )) {
2008-12-10 21:15:38 +01:00
audit_db ( $config [ 'id_user' ], $config [ " remote_addr " ], " ACL Violation " , " Trying to access incident viewer " );
2007-02-05 18:45:14 +01:00
require ( " general/noaccess.php " );
exit ;
}
2007-02-19 08:44:07 +01:00
// Take input parameters
// Offset adjustment
2008-09-19 18:08:59 +02:00
if ( isset ( $_GET [ " offset " ])) {
$offset = get_parameter_get ( " offset " );
} else {
$offset = 0 ;
}
2007-02-19 08:44:07 +01:00
2008-12-10 21:15:38 +01:00
// Check action. Try to get author and group
$action = get_parameter_get ( " action " );
if ( $action == " mass " ) {
$id_inc = get_parameter_post ( " id_inc " , array ());
$delete_btn = get_parameter_post ( " delete_btn " , - 1 );
$own_btn = get_parameter_post ( " own_btn " , - 1 );
2008-09-19 18:08:59 +02:00
2008-12-10 21:15:38 +01:00
foreach ( $id_inc as $incident ) {
if ( give_acl ( $config [ 'id_user' ], get_incidents_group ( $incident ), " IM " ) || get_incidents_author ( $incident ) == $config [ " id_user " ] || get_incidents_owner ( $incident ) == $config [ " id_user " ]) {
continue ;
2006-03-27 05:37:27 +02:00
}
2008-12-10 21:15:38 +01:00
audit_db ( $config [ " id_user " ], $config [ " remote_addr " ], " ACL Forbidden " , " Mass-update or deletion of incident " );
require ( " general/noaccess.php " );
exit ;
2006-03-27 05:37:27 +02:00
}
2008-09-19 18:08:59 +02:00
2008-12-10 21:15:38 +01:00
if ( $delete_btn != - 1 ) {
$result = delete_incidents ( $id_inc );
print_error_message ( $result , __ ( 'Incident successfully deleted' ), __ ( 'There was a problem deleting incident' ));
}
if ( $own_btn != - 1 ) {
$result = process_incidents_chown ( $id_inc , $config [ " id_user " ]);
print_error_message ( $result , __ ( 'Incident successfully owned' ), __ ( 'There was a problem becoming owner of incident' ));
}
} elseif ( $action == " update " ) {
$id_inc = get_parameter ( " id_inc " , 0 );
$author = get_incidents_author ( $id_inc );
$owner = get_incidents_owner ( $id_inc );
$grupo = get_incidents_group ( $id_inc );
2008-09-19 18:08:59 +02:00
2008-12-10 21:15:38 +01:00
if ( $author != $config [ " id_user " ] && $owner != $config [ " id_user " ] && ! give_acl ( $config [ 'id_user' ], $grupo , " IM " )) { // Only admins (manage incident) or owners/creators can modify incidents
audit_db ( $author , $config [ " remote_addr " ], " ACL Forbidden " , " Update incident # " . $id_inc );
require ( " general/noaccess.php " );
exit ;
2007-02-06 16:38:29 +01:00
}
2008-12-10 21:15:38 +01:00
$titulo = get_parameter_post ( " titulo " );
$descripcion = get_parameter_post ( " descripcion " );
$origen = get_parameter_post ( " origen_form " );
$prioridad = get_parameter_post ( " prioridad_form " , 0 );
$estado = get_parameter_post ( " estado_form " , 0 );
$grupo = get_parameter_post ( " grupo_form " , 1 );
$usuario = get_parameter_post ( " usuario_form " , $config [ " id_user " ]);
$sql = sprintf ( " UPDATE tincidencia SET titulo = '%s', origen = '%s', estado = %d, id_grupo = %d, id_usuario = '%s', prioridad = %d, descripcion = '%s', id_lastupdate = '%s' WHERE id_incidencia = %d " ,
$titulo , $origen , $estado , $grupo , $usuario , $prioridad , $descripcion , $config [ " id_user " ], $id_inc );
$result = process_sql ( $sql );
2008-09-19 18:08:59 +02:00
2008-12-10 21:15:38 +01:00
if ( $result !== false ) {
audit_db ( $config [ " id_user " ], $config [ " remote_addr " ], " Incident updated " , " User " . $config [ 'id_user' ] . " updated incident # " . $id_inc );
}
print_error_message ( $result , __ ( 'Incident successfully updated' ), __ ( 'There was a problem updating incident' ));
} elseif ( $action == " insert " ) {
//Create incident
2008-11-10 18:35:27 +01:00
$grupo = get_parameter_post ( " grupo_form " , 1 );
2008-12-10 21:15:38 +01:00
if ( ! give_acl ( $config [ 'id_user' ], $grupo , " IW " )) {
audit_db ( $config [ " id_user " ], $config [ " remote_addr " ], " ACL Forbidden " , " User " . $config [ " id_user " ] . " tried to update incident " );
require ( " general/noaccess.php " );
exit ;
}
// Read input variables
$titulo = get_parameter_post ( " titulo " );
$descripcion = get_parameter_post ( " descripcion " );
$origen = get_parameter_post ( " origen_form " );
$prioridad = get_parameter_post ( " prioridad_form " );
$id_creator = $config [ 'id_user' ];
$estado = get_parameter_post ( " estado_form " );
$sql = sprintf ( " INSERT INTO tincidencia (inicio, actualizacion, titulo, descripcion, id_usuario, origen, estado, prioridad, id_grupo, id_creator) VALUES
( NOW (), NOW (), '%s' , '%s' , '%s' , '%s' , % d , % d , '%s' , '%s' ) " , $titulo , $descripcion , $config["id_user"] , $origen , $estado , $prioridad , $grupo , $config["id_user"] );
$id_inc = process_sql ( $sql , " insert_id " );
if ( $id_inc === false ) {
echo '<h3 class="error">' . __ ( 'Error creating incident' ) . '</h3>' ;
2007-02-06 16:38:29 +01:00
} else {
2008-12-10 21:15:38 +01:00
audit_db ( $config [ " id_user " ], $config [ " remote_addr " ], " Incident created " , " User " . $config [ " id_user " ] . " created incident # " . $id_inc );
2007-02-06 16:38:29 +01:00
}
}
2007-02-05 18:45:14 +01:00
// Search
2008-09-19 18:08:59 +02:00
$filter = " " ;
$texto = ( string ) get_parameter ( " texto " , " " );
if ( $texto != " " )
$filter .= sprintf ( " AND (titulo LIKE '%%%s%%' OR descripcion LIKE '%%%s%%') " , $texto , $texto );
$usuario = ( string ) get_parameter ( " usuario " , " All " );
if ( $usuario != " All " )
$filter .= sprintf ( " AND id_usuario = '%s' " , $usuario );
$estado = ( int ) get_parameter ( " estado " , - 1 );
if ( $estado != - 1 ) //-1 = All
$filter .= sprintf ( " AND estado = %d " , $estado );
$grupo = ( int ) get_parameter ( " grupo " , 1 );
if ( $grupo != 1 ) {
$filter .= sprintf ( " AND id_grupo = %d " , $grupo );
if ( give_acl ( $config [ 'id_user' ], $grupo , " IM " ) == 0 ) {
2008-12-10 21:15:38 +01:00
audit_db ( $config [ " id_user " ], $config [ " remote_addr " ], " ACL Forbidden " , " User tried to read incidents from group without access " );
2009-02-12 22:04:02 +01:00
include ( " general/noaccess.php " );
exit ;
2006-03-27 05:37:27 +02:00
}
2007-02-05 18:45:14 +01:00
}
2006-03-27 05:37:27 +02:00
2008-09-19 18:08:59 +02:00
$prioridad = ( int ) get_parameter ( " prioridad " , - 1 );
if ( $prioridad != - 1 ) //-1 = All
$filter .= sprintf ( " AND prioridad = %d " , $prioridad );
2007-02-05 18:45:14 +01:00
2008-09-19 18:08:59 +02:00
$offset = ( int ) get_parameter ( " offset " , 0 );
2008-11-14 16:37:32 +01:00
$groups = get_user_groups ( $config [ " id_user " ], " IR " );
2006-03-27 05:37:27 +02:00
2008-09-19 18:08:59 +02:00
//Select incidencts where the user has access to ($groups from
//get_user_groups), array_keys for the id, implode to pass to SQL
$sql = " SELECT * FROM tincidencia WHERE
id_grupo IN ( " .implode ( " , " ,array_keys ( $groups )). " ) " . $filter . "
ORDER BY actualizacion DESC LIMIT " . $offset . " , " . $config["block_size"] ;
2007-02-19 08:44:07 +01:00
2008-09-19 18:08:59 +02:00
$result = get_db_all_rows_sql ( $sql );
if ( empty ( $result )) {
$result = array ();
$count = 0 ;
} else {
$count = count ( $result );
2007-02-05 18:45:14 +01:00
}
2006-03-27 05:37:27 +02:00
2008-09-19 18:08:59 +02:00
echo '<h2>' . __ ( 'Incident management' ) . ' > ' . __ ( 'Manage incidents' ) . ' </ h2 >
2009-03-20 20:57:13 +01:00
< form name = " visualizacion " method = " post " action = " index.php?sec=incidencias&sec2=operation/incidents/incident " >
< table class = " databox " cellpadding = " 4 " cellspacing = " 4 " width = " 95% " >< tr >
< td valign = " middle " >< h3 > '.__(' Filter ').' </ h3 > ' ;
2008-09-19 18:08:59 +02:00
2008-12-10 21:15:38 +01:00
$fields = get_incidents_status ();
2008-09-19 18:08:59 +02:00
$fields [ - 1 ] = __ ( 'All incidents' );
print_select ( $fields , " estado " , $estado , 'javascript:this.form.submit();' , '' , '' , false , false , false , 'w155' );
//Legend
echo '</td><td valign="middle"><noscript>' ;
2009-03-20 20:57:13 +01:00
print_submit_button ( __ ( 'Show' ), 'submit-estado' , false , array ( " class " => " sub " ));
2008-12-10 21:15:38 +01:00
echo '</noscript></td><td rowspan="5" class="f9" style="padding-left: 30px; vertical-align: top;"><h3>' . __ ( 'Status' ) . '</h3>' ;
foreach ( get_incidents_status () as $id => $str ) {
print_incidents_status_img ( $id );
echo ' - ' . $str . '<br />' ;
}
echo '</td><td rowspan="5" class="f9" style="padding-left: 30px; vertical-align: top;"><h3>' . __ ( 'Priority' ) . '</h3>' ;
foreach ( get_incidents_priorities () as $id => $str ) {
print_incidents_priority_img ( $id );
echo ' - ' . $str . '<br />' ;
}
echo '</td></tr><tr><td>' ;
$fields = get_incidents_priorities ();
2008-09-19 18:08:59 +02:00
$fields [ - 1 ] = __ ( 'All priorities' );
print_select ( $fields , " prioridad " , $prioridad , 'javascript:this.form.submit();' , '' , '' , false , false , false , 'w155' );
echo '</td><td valign="middle"><noscript>' ;
2009-03-20 20:57:13 +01:00
print_submit_button ( __ ( 'Show' ), 'submit-prioridad' , false , array ( " class " => " sub " ));
2008-09-19 18:08:59 +02:00
echo '</noscript></td></tr><tr><td>' ;
print_select ( $groups , " grupo " , $grupo , 'javascript:this.form.submit();' , '' , '' , false , false , false , 'w155' );
echo '</td><td valign="middle"><noscript>' ;
2009-03-20 20:57:13 +01:00
print_submit_button ( __ ( 'Show' ), 'submit-grupo' , false , array ( " class " => " sub " ));
2008-09-19 18:08:59 +02:00
echo '</noscript>' ;
2006-03-27 05:37:27 +02:00
2008-09-19 18:08:59 +02:00
// Pass search parameters for possible future filter searching by user
print_input_hidden ( " usuario " , $usuario );
print_input_hidden ( " texto " , $texto );
2006-03-27 05:37:27 +02:00
2008-09-19 18:08:59 +02:00
echo " </td></tr></table></form> " ;
2006-03-27 05:37:27 +02:00
2008-09-19 18:08:59 +02:00
if ( $count < 1 ) {
echo '<div class="nf">' . __ ( 'No incidents match your search filter' ) . '</div><br />' ;
2007-02-05 18:45:14 +01:00
} else {
2006-03-27 05:37:27 +02:00
// TOTAL incidents
2009-03-20 20:57:13 +01:00
$url = " index.php?sec=incidencias&sec2=operation/incidents/incident " ;
2006-03-27 05:37:27 +02:00
2008-11-10 18:35:27 +01:00
$estado = - 1 ;
2006-03-27 05:37:27 +02:00
// add form filter values for group, priority, state, and search fields: user and text
2008-09-19 18:08:59 +02:00
if ( $grupo != - 1 )
2009-03-20 20:57:13 +01:00
$url .= " &grupo= " . $grupo ;
2008-09-19 18:08:59 +02:00
if ( $prioridad != - 1 )
2009-03-20 20:57:13 +01:00
$url .= " &prioridad= " . $prioridad ;
2008-09-19 18:08:59 +02:00
if ( $estado != - 1 )
2009-03-20 20:57:13 +01:00
$url .= " &estado= " . $estado ;
2008-09-19 18:08:59 +02:00
if ( $usuario != '' )
2009-03-20 20:57:13 +01:00
$url .= " &usuario= " . $usuario ;
2008-09-19 18:08:59 +02:00
if ( $texto != '' )
2009-03-20 20:57:13 +01:00
$url .= " &texto= " . $texto ;
2006-03-27 05:37:27 +02:00
2007-02-05 18:45:14 +01:00
// Show pagination
2008-09-19 18:08:59 +02:00
pagination ( $count , $url , $offset );
echo '<br />' ;
2006-03-27 05:37:27 +02:00
// Show headers
2008-09-19 18:08:59 +02:00
$table -> width = 750 ;
$table -> class = " databox " ;
$table -> cellpadding = 4 ;
$table -> cellspacing = 4 ;
$table -> head = array ();
$table -> data = array ();
$table -> size = array ();
$table -> align = array ();
$table -> head [ 0 ] = __ ( 'ID' );
$table -> head [ 1 ] = __ ( 'Status' );
$table -> head [ 2 ] = __ ( 'Incident' );
$table -> head [ 3 ] = __ ( 'Priority' );
$table -> head [ 4 ] = __ ( 'Group' );
$table -> head [ 5 ] = __ ( 'Updated' );
$table -> head [ 6 ] = __ ( 'Source' );
$table -> head [ 7 ] = __ ( 'Owner' );
2008-12-10 21:15:38 +01:00
$table -> head [ 8 ] = 'X' ;
2008-09-19 18:08:59 +02:00
$table -> size [ 0 ] = 43 ;
$table -> size [ 7 ] = 50 ;
$table -> align [ 1 ] = " center " ;
$table -> align [ 3 ] = " center " ;
$table -> align [ 4 ] = " center " ;
$table -> align [ 8 ] = " center " ;
foreach ( $result as $row ) {
$data = array ();
2009-03-20 20:57:13 +01:00
$data [ 0 ] = '<a href="index.php?sec=incidencias&sec2=operation/incidents/incident_detail&id=' . $row [ " id_incidencia " ] . '">' . $row [ " id_incidencia " ] . '</a>' ;
2008-12-10 21:15:38 +01:00
$attach = get_incidents_attach ( $row [ " id_incidencia " ]);
2008-09-19 18:08:59 +02:00
2008-12-10 21:15:38 +01:00
if ( ! empty ( $attach ))
2009-03-20 20:57:13 +01:00
$data [ 0 ] .= ' ' . print_image ( " images/file.png " , true , array ( " style " => " align:middle; " ));
2008-12-10 21:15:38 +01:00
$data [ 1 ] = print_incidents_status_img ( $row [ " estado " ], true );
2008-09-19 18:08:59 +02:00
2009-03-20 20:57:13 +01:00
$data [ 2 ] = '<a href="index.php?sec=incidencias&sec2=operation/incidents/incident_detail&id=' . $row [ " id_incidencia " ] . '">' . safe_input ( substr ( $row [ " titulo " ], 0 , 45 )) . '</a>' ;
2008-12-10 21:15:38 +01:00
$data [ 3 ] = print_incidents_priority_img ( $row [ " prioridad " ], true );
2008-09-19 18:08:59 +02:00
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
$data [ 4 ] = print_group_icon ( $row [ " id_grupo " ], true );
2007-02-05 18:45:14 +01:00
2008-12-16 Evi Vanoost <vanooste@rcbi.rochester.edu>
* general/logon_ok.php, godmode/agentes/modificar_agente.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_recontask.php, godmode/setup/news.php,
operation/agentes/datos_agente.php, operation/agentes/estado_agente.php,
operation/agentes/status_events.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incidents.php,
operation/incidents/incident_detail.php, operation/messages/message.php:
Function updates and new function definitions
* include/functions.php: safe_input used utf_decode which gives problems
with foreign chars since everything else is (or should be UTF-8) fixed.
format_datetime is no longer necessary - use print_timestamp for output.
Extended multibyte wrapper functions.
* include/functions_db.php: give_server_name is now get_server_name;
dame_so_name is now get_os_name; dame_so_icon is now print_os_icon;
show_icon_group is now print_group_icon; give_network_profile_name is now
get_networkprofile_name; smal_event_table is now print_events_table
* include/functions_events.php: print_events_table was moved here and
fixed. Now calculates the cutoff of event and agent text.
* include/functions_html.php: Added title to print_table function and
updated documentation. print_timestamp now uses the new function
definitions (array) and handles 0-dates better. print_group_icon and
print_os_icon added and extended. Added print_agent_name. This function
fixes issues that show up when cutting off agent names with multibyte char
* operation/servers/view_server.php: Rewrite with new functions
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1295 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-12-17 15:26:42 +01:00
$data [ 5 ] = print_timestamp ( $row [ " actualizacion " ], true );
2008-09-19 18:08:59 +02:00
$data [ 6 ] = $row [ " origen " ];
2008-12-10 21:15:38 +01:00
$data [ 7 ] = print_username ( $row [ " id_usuario " ], true );
2008-09-19 18:08:59 +02:00
2008-12-10 21:15:38 +01:00
if ( give_acl ( $config [ " id_user " ], $row [ " id_grupo " ], " IM " ) || $config [ " id_user " ] == $row [ " id_usuario " ] || $config [ " id_user " ] == $row [ " id_creator " ]) {
$data [ 8 ] = print_checkbox ( " id_inc[] " , $row [ " id_incidencia " ], false , true );
2008-09-19 18:08:59 +02:00
} else {
$data [ 8 ] = '' ;
2006-03-27 05:37:27 +02:00
}
2008-09-19 18:08:59 +02:00
array_push ( $table -> data , $data );
2006-03-27 05:37:27 +02:00
}
2008-09-19 18:08:59 +02:00
2009-03-20 20:57:13 +01:00
echo '<form method="post" action="' . $url . '&action=mass" style="margin-bottom: 0px;">' ;
2008-09-19 18:08:59 +02:00
print_table ( $table );
2008-12-10 21:15:38 +01:00
if ( give_acl ( $config [ " id_user " ], 0 , " IM " )) {
echo '<div style="text-align:right; float:right; padding-right: 30px;">' ;
print_submit_button ( __ ( 'Delete incidents' ), 'delete_btn' , false , 'class="sub delete"' );
print_submit_button ( __ ( 'Become owner' ), 'own_btn' , false , 'class="sub upd"' );
echo '</div>' ;
}
echo '</form>' ;
2008-09-19 18:08:59 +02:00
unset ( $table );
2007-02-05 18:45:14 +01:00
}
2006-03-27 05:37:27 +02:00
2008-09-19 18:08:59 +02:00
if ( give_acl ( $config [ " id_user " ], 0 , " IW " )) {
2008-12-10 21:15:38 +01:00
echo '<div style="text-align:right; float:right; padding-right: 30px;">' ;
2009-03-20 20:57:13 +01:00
echo '<form method="post" action="index.php?sec=incidencias&sec2=operation/incidents/incident_detail&insert_form=1">' ;
2008-09-19 18:08:59 +02:00
print_submit_button ( __ ( 'Create incident' ), 'crt' , false , 'class="sub next"' );
2008-12-10 21:15:38 +01:00
echo '</form>' ;
echo '</div>' ;
2006-03-27 05:37:27 +02:00
}
2008-12-10 21:15:38 +01:00
echo '<div style="clear:both"> </div>' ;
2008-08-11 Esteban Sanchez <estebans@artica.es>
* include/functions_db.php: Added __ as an alias of lang_string().
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/functions.php,
include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/extensions.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php, operation/agentes/export_csv.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/status_events.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, ajax.php,
general/logoff.php, general/pandora_help.php, general/footer.php,
general/noaccess.php, general/logon_failed.php,
general/links_menu.php, general/login_page.php, general/logon_ok.php,
general/header.php, general/main_menu.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/setup/news.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/profiles/profile_list.php,
godmode/admin_access_logs.php, godmode/db/db_info_data.php,
godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_sanity.php, godmode/db/db_refine.php,
godmode/db/db_info.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/extensions.php,
godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced $id_user with $config['id_user']. Use __a
instead of $lang_label to future use of gettext. Style
corrections.
* godmode/agentes/planned_downtime.php: Rewritten to use Pandora
functions and adopt the UI style. Replaced lang_string with __().
* pandoradb.sql: Fields in tplanned_downtime renamed to fit
guidelines.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1005 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-11 12:59:07 +02:00
?>