";
$nick = $_SESSION['id_usuario'];
echo "
".$lang_label["welcome_title"]."
";
echo $lang_label["main_text"];
echo "
";
echo $lang_label["has_connected"]." ".$nick." - ";
if (dame_admin($nick)==1){
echo $lang_label["administrator"].'. ';
}
else {
echo $lang_label["normal_user"].'. ';
}
echo "";
// Show last activity from this user
echo "
".$lang_label["user_last_activity"]."
";
// Show table header
echo '
';
echo ''.$lang_label["user"].' | ';
echo ''.$lang_label["action"].' | ';
echo ''.$lang_label["date"].' | ';
echo ''.$lang_label["src_address"].' | ';
echo ''.$lang_label["comments"].' |
';
// 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 ''.$usuario."";
echo ' | ';
echo $row["accion"];
echo ' | ';
echo $row["fecha"];
echo ' | ';
echo $row["IP_origen"];
echo ' | ';
echo $row["descripcion"];
echo ' |
';
$contador--;
}
echo " |
";
$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 "";
}
echo "".$lang_label["stat_title"]."
";
$query1="SELECT COUNT(*) FROM tusuario";
$result=mysql_query($query1);
$row=mysql_fetch_array($result);
echo " ";
echo $lang_label["there_are"].$row[0]." ".$lang_label["user_defined"];
echo "
";
$query1="SELECT COUNT(*) FROM tagente";
$result=mysql_query($query1);
$row=mysql_fetch_array($result);
echo " ";
echo $lang_label["there_are"].$row[0]." ".$lang_label["agent_defined"];
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 "
";
$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 "
";
$query1="SELECT * FROM tagente_estado ORDER BY timestamp DESC";
$result=mysql_query($query1);
$row=mysql_fetch_array($result);
// Take the first element only
echo " ";
echo $lang_label["data_timestamp"].$row["timestamp"];
echo "";
?>