aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2014-04-24 01:28:53 +0700
committerGravatar Ugnich Anton2014-04-24 01:28:53 +0700
commit69453d196eb1dcc928c628c7ca32ba2f69ea22ea (patch)
treea7bbe0ecd5c2fd972764755ff20a1de3e70501c0 /src/java/com/juick/http/www
parent9d4dd4e844fbe7aa74bbabf7bbdd32989472bbc0 (diff)
Cross-user links
Diffstat (limited to 'src/java/com/juick/http/www')
-rw-r--r--src/java/com/juick/http/www/User.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/java/com/juick/http/www/User.java b/src/java/com/juick/http/www/User.java
index b584494e..abe96759 100644
--- a/src/java/com/juick/http/www/User.java
+++ b/src/java/com/juick/http/www/User.java
@@ -348,7 +348,22 @@ public class User {
out.println(" <li><a href=\"./readers\">Мои подписчики: " + UserQueries.getStatsMyReaders(sql, user.UID) + "</a></li>");
out.println(" <li>Сообщений: " + UserQueries.getStatsMessages(sql, user.UID) + "</li>");
out.println(" <li>Комментариев: " + UserQueries.getStatsReplies(sql, user.UID) + "</li>");
- out.println(" </ul></div>");
+ out.println(" </ul>");
+
+ ArrayList<com.juick.User> iread = UserQueries.getUserReadLeastPopular(sql, user.UID, 8);
+ if (!iread.isEmpty()) {
+ out.println("<table class=\"iread\"><tr>");
+ for (int i = 0; i < iread.size(); i++) {
+ if (i == 4) {
+ out.println("</tr><tr>");
+ }
+ com.juick.User u = iread.get(i);
+ out.println("<td><a href=\"/" + u.UName + "/\"><img src=\"//i.juick.com/a/" + u.UID + ".png\" alt=\"" + u.UName + "\"/></a></td>");
+ }
+ out.println("</tr></table>");
+ }
+
+ out.println(" </div>");
out.println("</aside>");
}