".$lang_label["agent_error"]."";
echo "";
include ("general/footer.php");
exit;
}
}
// Load icon index from tgrupos
$iconindex_g[]="";
$sql_tg='SELECT id_grupo, icon FROM tgrupo';
$result_tg=mysql_query($sql_tg);
while ($row_tg=mysql_fetch_array($result_tg)){
$iconindex_g[$row_tg["id_grupo"]] = $row_tg["icon"];
}
echo "
';
echo ''.$lang_label["agent_name"].' | '.salida_limpia($nombre_agente);
echo " ";
if (dame_admin($_SESSION['id_usuario'])==1 )
echo " ";
// Data base access graph
echo " | ".$lang_label["agent_access_rate"]."
";
echo ' |
'.$lang_label["ip_address"].' | '.salida_limpia($direccion_agente);
if ($agent_type == 0) {
echo ' |
'.$lang_label["os"].' | - '.dame_so_name($id_os);
} elseif ($agent_type == 1) {
echo ' |
'.$lang_label["agent_type"].' |  | '.$lang_label["interval"].' | '.$intervalo;
echo ' |
'.salida_limpia($lang_label["description"]).' | '.$comentarios;
echo " | ".$lang_label["agent_module_shareout"]."
";
echo " ";
echo ' |
'.salida_limpia($lang_label["group"]).' | ( '.dame_grupo($id_grupo).' )';
if ($agent_type == 0) {
echo ' |
'.$lang_label["agentversion"].' | '.salida_limpia($agent_version);
}
// Total packets
echo ' |
'.$lang_label["total_packets"].' | ';
$total_paketes= 0;
$id_agente = dame_agente_id($nombre_agente);
$sql_2='SELECT * FROM tagente_modulo WHERE id_agente = '.$id_agente;
$result_t=mysql_query($sql_2);
while ($row=mysql_fetch_array($result_t)){
$sql_3='SELECT COUNT(*) FROM tagente_datos WHERE id_agente_modulo = '.$row["id_agente_modulo"];
$result_3=mysql_query($sql_3);
$row3=mysql_fetch_array($result_3);
$total_paketes = $total_paketes + $row3[0];
}
echo $total_paketes;
// Last contact
echo ' |
'.$lang_label["last_contact"]." / ".$lang_label["remote"].' | ';
echo $ultima_act." / ".$ultima_act_remota;
// Asigned/active server
echo ' |
'.$lang_label["server_asigned"].' | ';
if ($server == ""){
echo "N/A";
} else {
echo give_server_name($server);
}
// Next contact
$ultima = strtotime($ultima_act);
$ahora = strtotime("now");
$diferencia = $ahora - $ultima;
// Get higher interval set for the set of modules from this agent
$sql_maxi ="SELECT MAX(module_interval) FROM tagente_modulo WHERE id_agente = ".$id_agente;
$result_maxi=mysql_query($sql_maxi);
if ($row_maxi=mysql_fetch_array($result_maxi))
if ($row_maxi[0] > 0 )
$intervalo = $row_maxi[0];
if ($intervalo > 0){
$percentil = round($diferencia/(($intervalo*2) / 100));
} else {
$percentil = -1;
}
echo ' |
'.$lang_label["next_contact"].' | ';
echo " ";
echo " |
";
}
?>