"; $nick = $_SESSION['id_usuario']; echo "

" . $lang_label["welcome_title"] . "

"; echo "

"; echo $lang_label["main_text"]; echo "

"; // Private messages pending to read ! $sql='SELECT COUNT(*) FROM tmensajes WHERE id_usuario_destino="'.$nick.'" AND estado="FALSE";'; $resultado = mysql_query ($sql); $row = mysql_fetch_array ($resultado); if ($row["COUNT(*)"] != 0){ echo "

". $lang_label["new_message_bra"] . ' ' .$row["COUNT(*)"] . ' ' .$lang_label["new_message_ket"] . '

'; } echo ""; echo "
"; // Site news ! // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo '

' . $lang_label["site_news"] . '

'; $sql_news = "SELECT * FROM tnews ORDER by timestamp DESC LIMIT 3"; if ($result_news = mysql_query ($sql_news)){ echo ''; while ($row = mysql_fetch_array ($result_news)) { echo ''; echo "
".$row["subject"].""; echo "
".$lang_label["by"]." ".$row["author"]. " ".$lang_label["at"]." ".$row["timestamp"].""; echo '
'; echo clean_output_breaks($row["text"]); } echo "
"; } echo "
"; // Site stats // Summary // ~~~~~~~~~~~~~~~ $data = general_stats($id_user,0); $monitor_checks = $data[0]; $monitor_ok = $data[1]; $monitor_bad = $data[2]; $monitor_unknown = $data[3]; $monitor_alert = $data[4]; $total_agents = $data[5]; $data_checks = $data[6]; $data_unknown = $data[7]; $data_alert = $data[8]; $data_alert_total = $data[9]; $monitor_alert_total = $data[10]; $total_alerts = $data_alert_total + $monitor_alert_total; $total_checks = $data_checks + $monitor_checks; $monitor_health = format_numeric ((($monitor_ok - $monitor_alert - $monitor_unknown) / $monitor_checks) * 100,1); $data_health = format_numeric ( (($data_checks -($data_unknown + $data_alert)) / $data_checks ) * 100,1);; $global_health = format_numeric( ((($monitor_ok - $monitor_alert - $monitor_unknown)+($data_checks -($data_unknown + $data_alert))) / ($data_checks + $monitor_checks) ) * 100, 1); echo "

".$lang_label["tactical_indicator"]."

"; echo ""; echo "
"; $query1 = "SELECT COUNT(id_usuario) FROM tusuario"; $result = mysql_query ($query1); $row = mysql_fetch_array ($result); $users_defined = $row[0]; echo ""; echo ""; echo "
".$lang_label["Pandora_FMS_summary"]."
"."Total agents"; echo "".$total_agents; echo "
"."Total checks"; echo "".$total_checks; echo "
"."Monitor BAD"; echo ""; if ($monitor_bad > 0) echo $monitor_bad; else echo "-"; echo "
"."Alerts defined"; echo "".$total_alerts; echo "
"."Total users"; echo "".$users_defined; echo "
"; echo "
"; echo "
"; // Show last activity from this user echo "

" . $lang_label["user_last_activity"] . "

"; // Show table header echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; // Skip offset records $query1="SELECT * FROM tsesion WHERE (TO_DAYS(fecha) > TO_DAYS(NOW()) - 7) AND ID_usuario = '" . $nick . "' ORDER BY fecha DESC limit 15"; $result = mysql_query ($query1); $contador = 5; // Max items $color = 1; while (($row = mysql_fetch_array ($result)) and ($contador > 0)) { if ($color == 1){ $tdcolor = "datos"; $color = 0; } else { $tdcolor = "datos2"; $color = 1; } $usuario = $row["ID_usuario"]; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; $contador--; } echo "
' . $lang_label["user"] . '' . $lang_label["action"] . '' . $lang_label["date"] . '' . $lang_label["src_address"] . '' . $lang_label["comments"] . '
' . $usuario . '' . $row["accion"]. '' . $row["fecha"]. '' . $row["IP_origen"]. '' . $row["descripcion"]. '
"; echo "
"; echo "
"; // activity echo ''; // class "jus" ?>