comparison src/global/web/tools/Index.java @ 0:7ecd1a4ef557

add content
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 21 Mar 2019 19:15:52 -0600
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:7ecd1a4ef557
1
2 package global.web.tools;
3
4 import java.io.IOException;
5 import java.io.PrintWriter;
6 import java.util.Date;
7 import javax.servlet.http.HttpServlet;
8 import javax.servlet.http.HttpServletRequest;
9 import javax.servlet.http.HttpServletResponse;
10 import global.Site;
11
12
13 public final class Index extends HttpServlet {
14
15 protected void service(HttpServletRequest request,HttpServletResponse response)
16 throws IOException
17 {
18 PrintWriter out = response.getWriter();
19
20 out.print( "\r\n<html>\r\n <head>\r\n <title>Nabble Global</title>\r\n <script type=\"text/javascript\">\r\n var months = [\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"];\r\n function fmt(i) { return i <= 9? \"0\" + i : i; };\r\n function formatTime(date) {\r\n var hours = date.getHours();\r\n if( hours < 12 ) {\r\n var xm = \"am\";\r\n if (hours==0)\r\n hours = 12;\r\n } else {\r\n var xm = \"pm\";\r\n if (hours > 12)\r\n hours -= 12;\r\n }\r\n return fmt(hours) + \":\" + fmt(date.getMinutes()) + xm;\r\n };\r\n function formatDate(date) {\r\n return months[date.getMonth()] + \" \" + fmt(date.getDate()) + \", \" + date.getFullYear();\r\n };\r\n function formatDateTime(date) {\r\n return formatDate(date) + \"; \" + formatTime(date);\r\n };\r\n </script>\r\n </head>\r\n <body>\r\n <h1>Nabble Global</h1>\r\n <p class=\"gray\">\r\n Built time =\r\n <b>\r\n <script type=\"text/javascript\">\r\n document.write(formatDateTime(new Date(" );
21 out.print( (new Date(ClassLoader.getSystemResource("global/web/Index.class").openConnection().getLastModified()).getTime()) );
22 out.print( ")));\r\n </script>\r\n </b>\r\n </p>\r\n <form action=\"Search.jtp\">\r\n Search for: <input name=\"query\" />\r\n </form>\r\n <p><a href=\"Reindex.jtp\">Reindex</a></p>\r\n <p><a href=\"shell.luan\">Shell</a></p>\r\n <p><a href=\"run.luan\">Run Batch</a></p>\r\n <p><a href=\"/tools2\">Generic tools</a></p>\r\n </body>\r\n</html>\r\n" );
23
24 }
25
26 }
27