'".$periodo."'
ORDER BY timestamp DESC";
$string_type = 1;
}
else {
$sql1="SELECT * FROM tagente_datos WHERE id_agente_modulo = ".
$id_agente_modulo." AND id_agente = $id_agent AND utimestamp > '".$periodo."'
ORDER BY timestamp DESC";
$string_type = 0;
}
$result=mysql_query($sql1);
$nombre_agente = dame_nombre_agente_agentemodulo($id_agente_modulo);
$nombre_modulo = dame_nombre_modulo_agentemodulo($id_agente_modulo);
echo "
".$lang_label["data_received"]."
'$nombre_agente' / '$nombre_modulo'
";
echo "". $et ."
";
if (mysql_num_rows($result)){
echo "";
$color=1;
echo "".$lang_label["delete"]." | ";
echo "".$lang_label["timestamp"]." | ";
echo "".$lang_label["data"]." | ";
while ($row=mysql_fetch_array($result)){
if ($color == 1){
$tdcolor = "datos";
$color = 0;
}
else {
$tdcolor = "datos2";
$color = 1;
}
echo "";
if ((give_acl($id_user, $id_group, "AW") ==1) AND ($string_type == 0)){
echo "";
echo "";
} else {
echo " | ";
}
echo " | ".$row["timestamp"]." | ";
echo "";
if (is_numeric($row["datos"])) {
echo format_for_graph ($row["datos"]);
} else {
echo salida_limpia($row["datos"]);
}
echo " |
";
}
echo "
";
}
else {
echo "no_data
";
}
}
// ---------------
// Page begin
// ---------------
check_login();
$id_user = $_SESSION["id_usuario"];
if (give_acl($id_user, 0, "AR")!=1) {
audit_db ($id_user, $REMOTE_ADDR, "ACL Violation",
"Trying to access Agent Data view");
require ("general/noaccess.php");
exit;
}
if (isset($_GET["tipo"]) AND isset($_GET["id"])) {
$id =entrada_limpia($_GET["id"]);
$tipo= entrada_limpia($_GET["tipo"]);
} else {
echo "".$lang_label["graf_error"]."
";
exit;
}
if (isset($_GET["delete"])) {
$delete =$_GET["delete"];
$sql = "DELETE FROM tagente_datos WHERE id_agente_datos = $delete";
$result=mysql_query($sql);
}
datos_raw ($id,$tipo);
?>