Mercurial Hosting > nabble
comparison 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 |
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 <html> | |
| 21 <head> | |
| 22 <title>Nabble Global</title> | |
| 23 <script type="text/javascript"> | |
| 24 var months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]; | |
| 25 function fmt(i) { return i <= 9? "0" + i : i; }; | |
| 26 function formatTime(date) { | |
| 27 var hours = date.getHours(); | |
| 28 if( hours < 12 ) { | |
| 29 var xm = "am"; | |
| 30 if (hours==0) | |
| 31 hours = 12; | |
| 32 } else { | |
| 33 var xm = "pm"; | |
| 34 if (hours > 12) | |
| 35 hours -= 12; | |
| 36 } | |
| 37 return fmt(hours) + ":" + fmt(date.getMinutes()) + xm; | |
| 38 }; | |
| 39 function formatDate(date) { | |
| 40 return months[date.getMonth()] + " " + fmt(date.getDate()) + ", " + date.getFullYear(); | |
| 41 }; | |
| 42 function formatDateTime(date) { | |
| 43 return formatDate(date) + "; " + formatTime(date); | |
| 44 }; | |
| 45 </script> | |
| 46 </head> | |
| 47 <body> | |
| 48 <h1>Nabble Global</h1> | |
| 49 <p class="gray"> | |
| 50 Built time = | |
| 51 <b> | |
| 52 <script type="text/javascript"> | |
| 53 document.write(formatDateTime(new Date(<%=new Date(ClassLoader.getSystemResource("global/web/Index.class").openConnection().getLastModified()).getTime()%>))); | |
| 54 </script> | |
| 55 </b> | |
| 56 </p> | |
| 57 <form action="Search.jtp"> | |
| 58 Search for: <input name="query" /> | |
| 59 </form> | |
| 60 <p><a href="Reindex.jtp">Reindex</a></p> | |
| 61 <p><a href="shell.luan">Shell</a></p> | |
| 62 <p><a href="run.luan">Run Batch</a></p> | |
| 63 <p><a href="/tools2">Generic tools</a></p> | |
| 64 </body> | |
| 65 </html> | |
| 66 <% | |
| 67 } | |
| 68 | |
| 69 } | |
| 70 %> |
