, 2003-2006 // Raul Mateos , 2005-2006 // Load global vars require("include/config.php"); //require("include/functions.php"); //require("include/functions_db.php"); if (comprueba_login() == 0) { if (isset($_GET["id_agente"])){ $id_agente = $_GET["id_agente"]; // Connect BBDD $sql1='SELECT * FROM tagente WHERE id_agente = '.$id_agente; $result=mysql_query($sql1); if ($row=mysql_fetch_array($result)){ $intervalo = $row["intervalo"]; // Interval in seconds to receive data $nombre_agente = $row["nombre"]; $direccion_agente =$row["direccion"]; $ultima_act = $row["ultimo_contacto"]; $ultima_act_remota =$row["ultimo_contacto_remoto"]; $comentarios = $row["comentarios"]; $id_grupo = $row["id_grupo"]; $id_os= $row["id_os"]; $os_version = $row["os_version"]; $agent_version = $row["agent_version"]; $disabled= $row["disabled"]; $agent_type= $row["agent_type"]; $server = $row["id_server"]; } else { echo "

".$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 "

".$lang_label["ag_title"]."

"; echo "

".$lang_label["view_agent_general_data"]." ".$lang_label["help"]."

"; 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; if ($intervalo > 0){ $percentil = round($diferencia/(($intervalo*2) / 100)); } else { echo "N/A"; } echo '
'.$lang_label["next_contact"].' '; echo ""; echo "
"; } ?>