';
echo '';
echo ''.$lang_label["alert"]." | ";
echo ''.$lang_label["alert_type"]." | ";
echo ''.$lang_label["SNMP_agent"]." | ";
echo ''.$lang_label["OID"]." | ";
echo ''.$lang_label["customvalue"]." | ";
echo ''.$lang_label["description"]." | ";
echo ''.$lang_label["times_fired"]." | ";
echo ''.$lang_label["last_fired"]." | ";
echo ''.$lang_label["action"]." | ";
$color=1;
while ($row=mysql_fetch_array($result)){
if ($color == 1){
$tdcolor = "datos";
$color = 0;
}
else {
$tdcolor = "datos2";
$color = 1;
}
$id_as = $row["id_as"];
$id_alert = $row["id_alert"];
$nombre_alerta = dame_nombre_alerta($id_alert);
$alert_type = $row["alert_type"];
$agent = $row["agent"];
$description = $row["description"];
$oid = $row["oid"];
$custom_oid = $row["custom_oid"];
$time_threshold = $row["time_threshold"];
$al_field1 = $row["al_field1"];
$al_field2 = $row["al_field2"];
$al_field3 = $row["al_field3"];
$last_fired = $row["last_fired"];
$times_fired = $row["times_fired"];
$max_alerts = $row["max_alerts"];
$min_alerts = $row["min_alerts"];
echo "
---|
";
echo $nombre_alerta;
echo " | ";
if ($alert_type == 0) {
$tipo_alerta = $lang_label["OID"];
} elseif ($alert_type == 1) {
$tipo_alerta = $lang_label["customvalue"];
} elseif ($alert_type == 2) {
$tipo_alerta = $lang_label["SNMP_agent"];
} else {
$tipo_alerta = "N/A";
}
echo $tipo_alerta;
echo " | ";
if ($alert_type == 2) {
echo $agent;
} else {
echo "N/A";
}
echo " | ";
if ($alert_type == 0) {
echo $oid;
} else {
echo "N/A";
}
echo " | ";
if ($alert_type == 1) {
echo $custom_oid;
} else {
echo "N/A";
}
echo " | ";
echo $description;
echo " | ";
echo $times_fired;
echo " | ";
if ($last_fired != "0000-00-00 00:00:00")
echo $last_fired;
else
echo $lang_label["never"];
echo " | ";
echo "
";
echo "
![".$lang_label["update"]."](images/config.png) |
";
}
echo "
";
echo "