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

" . $lang_label["welcome_title"] . "

"; echo "

"; echo $lang_label["main_text"]; 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 ''; $contador--; } echo "
' . $lang_label["user"] . '' . $lang_label["action"] . '' . $lang_label["date"] . '' . $lang_label["src_address"] . '' . $lang_label["comments"] . '
'; echo '' . $usuario . ''; echo ''; echo $row["accion"]; echo ''; echo $row["fecha"]; echo ''; echo $row["IP_origen"]; echo ''; echo $row["descripcion"]; echo '
"; echo "
"; echo "
"; // activity // 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"]; echo ''; echo $row["COUNT(*)"] . ' '; echo $lang_label["new_message_ket"] . '
'; } // Site news ! echo '

' . $lang_label["site_news"] . '

'; $sql_news = "SELECT * FROM tnews ORDER by utimestamp LIMIT 3"; if ($result_news = mysql_query ($sql_news)){ echo ''; while ($row = mysql_fetch_array ($result_news)) { echo '
'; echo $lang_label["at"]. " ". $row["utimestamp"] ." ".$lang_label["user"]. " ". $row["author"]." ".$lang_label["says"].": \"".$row["subject"]."\""; echo '
'; echo clean_output_breaks($row["text"]); echo ''; } echo "
"; } // Site stats echo '

' . $lang_label["stat_title"] . '

'; echo ''; $query1 = "SELECT COUNT(id_usuario) FROM tusuario"; $result = mysql_query ($query1); $row = mysql_fetch_array ($result); echo "
"; echo ''; echo $lang_label["there_are"] ."". $row[0] . ' ' . $lang_label["user_defined"]; echo ''; echo "
"; $query1 = "SELECT COUNT(id_agente) FROM tagente"; $result = mysql_query ($query1); $row = mysql_fetch_array ($result); echo ''; echo $lang_label["there_are"] . "".$row[0]." ". $lang_label["agent_defined"]; echo ''; echo "
"; $query1 = "SELECT COUNT(id_agente_datos) FROM tagente_datos"; $result = mysql_query ($query1); $row = mysql_fetch_array ($result); echo ''; echo $lang_label["there_are"] . "".$row[0] . ' ' . $lang_label["data_harvested"]; echo ''; echo "
"; $query1 = "SELECT COUNT(*) FROM talerta_agente_modulo"; $result = mysql_query ($query1); $row = mysql_fetch_array ($result); echo ""; echo $lang_label["there_are"] . "".$row[0] .' ' . $lang_label["alert_defined"]; echo ""; echo "
"; echo ''; $query1 = "SELECT timestamp FROM tagente_estado ORDER BY timestamp DESC LIMIT 1"; $result = mysql_query($query1); if ($row = mysql_fetch_array($result)) { // Take the first element only echo $lang_label["data_timestamp"] . "".$row["timestamp"].""; } else { echo 'No data received yet!'; } echo ''; echo "
"; echo ''; // class "jus" ?>