Mercurial Hosting > nabble
view src/global/web/tools/Index.jtp @ 35:5ea557eece1f
remove site.isNew()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 07 Jul 2020 09:57:53 -0600 |
parents | 7ecd1a4ef557 |
children |
line wrap: on
line source
<% package global.web.tools; import java.io.IOException; import java.io.PrintWriter; import java.util.Date; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import global.Site; public final class Index extends HttpServlet { protected void service(HttpServletRequest request,HttpServletResponse response) throws IOException { PrintWriter out = response.getWriter(); %> <html> <head> <title>Nabble Global</title> <script type="text/javascript"> var months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]; function fmt(i) { return i <= 9? "0" + i : i; }; function formatTime(date) { var hours = date.getHours(); if( hours < 12 ) { var xm = "am"; if (hours==0) hours = 12; } else { var xm = "pm"; if (hours > 12) hours -= 12; } return fmt(hours) + ":" + fmt(date.getMinutes()) + xm; }; function formatDate(date) { return months[date.getMonth()] + " " + fmt(date.getDate()) + ", " + date.getFullYear(); }; function formatDateTime(date) { return formatDate(date) + "; " + formatTime(date); }; </script> </head> <body> <h1>Nabble Global</h1> <p class="gray"> Built time = <b> <script type="text/javascript"> document.write(formatDateTime(new Date(<%=new Date(ClassLoader.getSystemResource("global/web/Index.class").openConnection().getLastModified()).getTime()%>))); </script> </b> </p> <form action="Search.jtp"> Search for: <input name="query" /> </form> <p><a href="Reindex.jtp">Reindex</a></p> <p><a href="shell.luan">Shell</a></p> <p><a href="run.luan">Run Batch</a></p> <p><a href="/tools2">Generic tools</a></p> </body> </html> <% } } %>