view src/global/web/tools/Index.java @ 27:22a701699b2a

add Disk.jtp
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 02 Jul 2020 16:00:09 -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();
		
		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(" );
		out.print( (new Date(ClassLoader.getSystemResource("global/web/Index.class").openConnection().getLastModified()).getTime()) );
		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" );

	}

}