".lang_string ("view_servers")." > "; echo lang_string ("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] = lang_string ("name"); $table->head[1] = lang_string ('status'); $table->head[2] = lang_string ('load'); $table->head[3] = lang_string ('modules'); $table->head[4] = lang_string ('lag'); $table->head[5] = lang_string ('description'); $table->head[6] = lang_string ('type'); $table->head[7] = lang_string ('version'); $table->head[8] = lang_string ('lastupdate'); $table->data = array (); foreach ($servers as $server) { $data = array (); $serverinfo = server_status ($server['id_server']); $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"] . " ".lang_string("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); ?>