".__('view_servers')." > "; echo __('server_detail').""; $total_modules = (int) get_db_sql ("SELECT COUNT(*) FROM tagente_modulo WHERE tagente_modulo.disabled = 0"); $servers = get_db_all_rows_in_table ('tserver'); if (sizeof ($servers) == 0) return; $table->width = '98%'; $table->size = array (); $table->size[6] = '60'; $table->align = array (); $table->align[1] = 'center'; $table->align[6] = 'center'; $table->head = array (); $table->head[0] = __('name'); $table->head[1] = __('status'); $table->head[2] = __('load'); $table->head[3] = __('modules'); $table->head[4] = __('lag'); $table->head[5] = __('description'); $table->head[6] = __('type'); $table->head[7] = __('version'); $table->head[8] = __('lastupdate'); $table->data = array (); foreach ($servers as $server) { $data = array (); $serverinfo = server_status ($server['id_server']); if ($server["recon_server"]==1) $data[0] = "".$server['name'].""; else $data[0] = "".$server['name'].""; if ($server['status'] == 0){ $data[1] = ''; } else { $data[1] = ''; } // Load if ($total_modules > 0) $load_percent = $serverinfo["modules"] / ($total_modules / 100); else $load_percent = 0; if ($load_percent > 100) $load_percent = 100; $data[2] = ''; $data[3] = $serverinfo["modules"] . " ".__('of')." ". $total_modules; $data[4] = human_time_description_raw ($serverinfo["lag"]) . " / ". $serverinfo["module_lag"]; $data[5] = ''.substr ($server['description'], 0, 25).''; $data[6] = ''; if ($server['network_server'] == 1) { $data[6] .= ' '; } if ($server['data_server'] == 1) { $data[6] .= ' '; } if ($server['snmp_server'] == 1) { $data[6] .= ' '; } if ($server['recon_server'] == 1) { $data[6] .= ' '; } if ($server['export_server'] == 1) { $data[6] .= ' '; } if ($server['wmi_server'] == 1) { $data[6] .= ' '; } if ($server['prediction_server'] == 1) { $data[6] .= ' '; } if ($server['plugin_server'] == 1) { $data[6] .= ' '; } if ($server['master'] == 1) { $data[6] .= ' '; } if ($server['checksum'] == 1){ $data[6] .= ' '; } $data[7] = $server['version']; $data[8] = human_time_comparation ($server['keepalive']) . ""; array_push ($table->data, $data); } print_table ($table); ?>