aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www/Home.java
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2013-10-24 02:14:29 +0700
committerGravatar Ugnich Anton2013-10-24 02:14:29 +0700
commit145852361d049d4d51e727f7f62f970418f2a34a (patch)
tree5132cb233df811d9dcb2922588b9c016b268229e /src/java/com/juick/http/www/Home.java
parent19dbb5c44b3c32b894ed2c3c83d6c67aa69e7c17 (diff)
PM on Home (initial)
Diffstat (limited to 'src/java/com/juick/http/www/Home.java')
-rw-r--r--src/java/com/juick/http/www/Home.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/java/com/juick/http/www/Home.java b/src/java/com/juick/http/www/Home.java
index b9009a80..dae573ca 100644
--- a/src/java/com/juick/http/www/Home.java
+++ b/src/java/com/juick/http/www/Home.java
@@ -17,7 +17,9 @@
*/
package com.juick.http.www;
+import com.juick.json.Users;
import com.juick.server.MessagesQueries;
+import com.juick.server.PMQueries;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
@@ -77,6 +79,15 @@ public class Home {
PageTemplates.pageHead(out, title, null);
PageTemplates.pageNavigation(out, locale, visitor, null);
+ ArrayList<com.juick.User> lastconv = PMQueries.getPMLastConversationsUsers(sql, visitor.UID, 10);
+ String lastConvJSON = Users.arrayToString(lastconv);
+
+ out.println("<script type=\"text/javascript\">");
+ out.println("var hash='" + Utils.getCookie(request, "hash") + "';");
+ out.println("var user_id=" + visitor.UID + ";");
+ out.println("var lastConversations=" + lastConvJSON + ";");
+ out.println("</script>");
+
out.println("<div id=\"topwrapper\">");
out.println("<div id=\"wrapper\">");
out.println("<div id=\"content\">");
@@ -101,13 +112,14 @@ public class Home {
out.println("<div id=\"column\" class=\"abs\">");
out.println(" <ul>");
- out.println(" <li><a href=\"/?show=my\">" + rb.getString("My feed") + "</a></li>");
+ out.println(" <li><a href=\"/\">" + rb.getString("My feed") + "</a></li>");
out.println(" <li><a href=\"/?show=private\">" + rb.getString("Private") + "</a></li>");
out.println(" <li><a href=\"/?show=discuss\">" + rb.getString("Discussions") + "</a></li>");
out.println(" <li><a href=\"/?show=recommended\">" + rb.getString("Recommended") + "</a></li>");
out.println(" <li class=\"margtop\"><a href=\"/?show=top\">" + rb.getString("Popular") + "</a></li>");
out.println(" </ul>");
out.println(" <hr/>");
+ out.println(" <ul id=\"pmulist\"></ul>");
out.println("</div>");
out.println("</div>"); // topwrapper