aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www/Main.java
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2014-01-27 02:52:35 +0700
committerGravatar Ugnich Anton2014-01-27 02:52:35 +0700
commit6c097d90012afeb98b4b4fa2c113092809763498 (patch)
treea110f3b8bced7a2797efac80cc07d601392c2792 /src/java/com/juick/http/www/Main.java
parente218e34535b0bfdb6a7ac3a4d010ec03fcd946a1 (diff)
PM Sent page
Diffstat (limited to 'src/java/com/juick/http/www/Main.java')
-rw-r--r--src/java/com/juick/http/www/Main.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/java/com/juick/http/www/Main.java b/src/java/com/juick/http/www/Main.java
index 26655897..18c7b8aa 100644
--- a/src/java/com/juick/http/www/Main.java
+++ b/src/java/com/juick/http/www/Main.java
@@ -131,12 +131,18 @@ public class Main extends HttpServlet {
} else {
login.doGetLogin(sql, request, response);
}
- } else if (uri.equals("/pm")) {
+ } else if (uri.startsWith("/pm/")) {
com.juick.User visitor = Utils.getVisitorUser(sql, request, response);
if (visitor == null) {
login.doGetLoginForm(sql, request, response);
} else {
- pm.doGet(sql, request, response, visitor);
+ if (uri.equals("/pm/inbox")) {
+ pm.doGetInbox(sql, request, response, visitor);
+ } else if (uri.equals("/pm/sent")) {
+ pm.doGetSent(sql, request, response, visitor);
+ } else {
+ response.sendError(404);
+ }
}
} else if (uri.equals("/logout")) {
login.doGetLogout(sql, request, response);
@@ -235,6 +241,7 @@ public class Main extends HttpServlet {
String uri = request.getRequestURI();
if (uri.equals("/post")) {
pagesNewMessage.doPostNewMessage(sql, request, response);
+ } else if (uri.equals("/pm/send")) {
} else if (uri.equals("/login")) {
login.doPostLogin(sql, request, response);
} else if (uri.equals("/signup")) {