From e707a8e607ec92fcf0137b75b170ff898755ecb2 Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Fri, 11 Oct 2013 21:35:17 +0700 Subject: Two columns --- src/java/com/juick/http/www/Blogs.java | 3 +++ src/java/com/juick/http/www/Help.java | 23 +++++++++++------------ src/java/com/juick/http/www/PageTemplates.java | 6 ++++-- src/java/com/juick/http/www/User.java | 2 +- src/java/com/juick/http/www/UserThread.java | 4 ++-- 5 files changed, 21 insertions(+), 17 deletions(-) (limited to 'src/java') diff --git a/src/java/com/juick/http/www/Blogs.java b/src/java/com/juick/http/www/Blogs.java index 0f13d946..89113def 100644 --- a/src/java/com/juick/http/www/Blogs.java +++ b/src/java/com/juick/http/www/Blogs.java @@ -213,6 +213,9 @@ public class Blogs { out.println("
" + getTags(sql, 45) + "
"); out.println(""); diff --git a/src/java/com/juick/http/www/Help.java b/src/java/com/juick/http/www/Help.java index 9fc21aad..7adcb920 100644 --- a/src/java/com/juick/http/www/Help.java +++ b/src/java/com/juick/http/www/Help.java @@ -34,7 +34,7 @@ import javax.servlet.http.HttpServletResponse; * @author Ugnich Anton */ public class Help { - + protected void doRedirectToHelpIndex(Connection sql, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String lang = request.getLocale().getLanguage(); if (!(lang.equals("ru") || lang.equals("fr"))) { @@ -42,19 +42,19 @@ public class Help { } Utils.sendTemporaryRedirect(response, "/help/" + lang + "/"); } - + protected void doGetHelp(Connection sql, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { com.juick.User visitor = Utils.getVisitorUser(sql, request); Locale locale = request.getLocale(); ResourceBundle rb = ResourceBundle.getBundle("Global", locale); - + String path[] = request.getRequestURI().split("/"); String page; if (path.length < 3 || path.length > 4 || path[2].length() != 2 || !path[2].matches("^[a-z]+$")) { response.sendError(404); return; } - + if (path.length == 4) { page = path[3]; if (!page.matches("^[a-zA-Z0-9\\-]*$") || page.equals("navigation") || page.equals("index")) { @@ -64,41 +64,40 @@ public class Help { } else { page = "index"; } - + File f = new File("/var/www/juick.com/help3/" + path[2] + "/" + page); if (!f.isFile()) { response.sendError(404); return; } - + response.setContentType("text/html; charset=UTF-8"); PrintWriter out = response.getWriter(); try { PageTemplates.pageHead(out, rb.getString("Help"), ""); PageTemplates.pageNavigation(out, locale, visitor, null); - + out.println("" + pageUserTags(sql, user, visitor, 15) + "...
"); diff --git a/src/java/com/juick/http/www/UserThread.java b/src/java/com/juick/http/www/UserThread.java index 3ba5c96b..6fb63209 100644 --- a/src/java/com/juick/http/www/UserThread.java +++ b/src/java/com/juick/http/www/UserThread.java @@ -278,8 +278,8 @@ public class UserThread { public static void printTree(PrintWriter out, ArrayList