Mercurial Hosting > nabble
diff src/global/web/tools/Index.jtp @ 0:7ecd1a4ef557
add content
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 21 Mar 2019 19:15:52 -0600 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/global/web/tools/Index.jtp Thu Mar 21 19:15:52 2019 -0600 @@ -0,0 +1,70 @@ +<% +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> + <% + } + +} +%> \ No newline at end of file