" + rbnm.getString("Tags") + ":
"); + printUserTags(sql, out, visitor.UID); + out.println(""); + for (int i = 0; i < tags.size(); i++) { + if (i > 0) { + out.print(" "); + } + String taglink = ""; + try { + taglink = "" + Utils.encodeHTML(tags.get(i).Name) + ""; + } catch (UnsupportedEncodingException e) { + } + int usagecnt = tags.get(i).UsageCnt; + if (usagecnt <= max / 5 + min) { + out.print("" + taglink + ""); + } else if (usagecnt <= max / 5 * 2 + min) { + out.print(taglink); + } else if (usagecnt <= max / 5 * 3 + min) { + out.print("" + taglink + ""); + } else if (usagecnt <= max / 5 * 4 + min) { + out.print("" + taglink + ""); + } else { + out.print("" + taglink + ""); + } + } + out.println("
"); } protected void doPostNewMessage(Connection sql, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java index 94561dfd..eb98a4f8 100644 --- a/src/java/com/juick/http/www/PageTemplates.java +++ b/src/java/com/juick/http/www/PageTemplates.java @@ -27,6 +27,8 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.Locale; import java.util.ResourceBundle; +import javax.servlet.http.HttpServletRequest; +import ru.sape.Sape; /** * @@ -34,6 +36,8 @@ import java.util.ResourceBundle; */ public class PageTemplates { + public static Sape sape = null; + public static void pageHead(PrintWriter out, String title, String headers) { out.println(""); out.println(""); @@ -61,7 +65,7 @@ public class PageTemplates { out.println(""); out.println(" "); @@ -187,11 +191,18 @@ public class PageTemplates { out.println(); } - public static void pageFooter(PrintWriter out, Locale loc) { + public static void pageFooter(HttpServletRequest request, PrintWriter out, Locale loc, com.juick.User visitor) { ResourceBundle rb = ResourceBundle.getBundle("Global", loc); out.println("