diff options
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/com/juick/http/www/PageTemplates.java | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java index cefd3cdd..dabbea99 100644 --- a/src/java/com/juick/http/www/PageTemplates.java +++ b/src/java/com/juick/http/www/PageTemplates.java @@ -53,7 +53,7 @@ public class PageTemplates { out.print("<head>"); out.print("<link rel=\"stylesheet\" href=\"/style.2014070300.css\"/>"); out.print("<script type=\"text/javascript\" src=\"//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js\"></script>"); - out.print("<script type=\"text/javascript\" src=\"/scripts.2014062900.js\"></script>"); + out.print("<script type=\"text/javascript\" src=\"/scripts.2014070500.js\"></script>"); if (headers != null) { out.print(headers); } @@ -219,12 +219,19 @@ public class PageTemplates { out.print("<a href=\"https://www.facebook.com/JuickCom\" rel=\"nofollow\" class=\"ico32-fb\">Facebook</a>"); out.println("</div>"); out.print(" <div id=\"footer-left\">juick.com © 2008-2014"); - if (sapeon && sape != null && (visitor == null || visitor.UID == 1) && request.getQueryString() == null) { - String links = sape.getPageLinks(request.getRequestURI(), request.getCookies()).render(); + + String queryString = request.getQueryString(); + String requestURI = request.getRequestURI(); + if (sapeon && sape != null && (visitor == null || visitor.UID == 1) && queryString == null) { + String links = sape.getPageLinks(requestURI, request.getCookies()).render(); if (links != null && !links.isEmpty()) { out.print("<br/>Спонсоры: " + links); } } + if ((visitor == null || visitor.UID == 1) && queryString != null && requestURI != null && requestURI.equals("/")) { + out.print("<br/><a href=\"http://siam.li/\">сиам</a>"); + } + out.println("</div>"); out.println("</div>"); @@ -529,6 +536,9 @@ public class PageTemplates { out.print("<a href=\"#\" onclick=\"return showCommentFooter(this)\">Комментировать</a> "); } out.print("<a href=\"#\" onclick=\"return likeMessage(this," + msg.MID + ")\">Мне нравится</a>"); + if (visitor != null && msg.Privacy < 0 && msg.User.UID == visitor.UID) { + out.print(" <a href=\"#\" onclick=\"return setPrivacy(this," + msg.MID + ")\">Открыть доступ</a>"); + } if (visitor != null && visitor.UID == 1) { out.print(" <a href=\"#\" onclick=\"return setPopular(this," + msg.MID + ",2)\">+</a>"); out.print(" <a href=\"#\" onclick=\"return setPopular(this," + msg.MID + ",-1)\">-</a>"); |