<%@ LANGUAGE="JSCRIPT" %>
<% if(!User.CanUpload) { Response.Write("

No permission to upload

"); } else if(Request.ServerVariables("request_method").toLowerCase() != "post") { %> Select an observing plan file to be checked then click Submit to Plan Checker:
">
Submit to Plan Checker <% } else { // // POST: Move the file from it's temporary location to its final // location. // if(!Request.Form("FileName")) { // No file uploaded... Response.Write("
No file. Try again."); } else { // // Got a plan // var Pl = new ActiveXObject("ACP.Plan"); var fUtl = { // Fake Util to catch Console.PrintLine Console: { // ... in Plan.wsc and redirect it to ... PrintLine: function(msg) { // ... Request.Write() Response.Write(msg + "\n"); // (like WriteLine()) } }, HMS_Hours: function(str) { // Pass thru to ACP (typ.) return Util.HMS_Hours(str); }, DMS_Degrees: function(str) { return Util.DMS_Degrees(str); } }; Response.Write("
");
			Pl.Init(fUtl, null, "", false);								// Init for offline use
			if(Pl.Read(Request.Form("FilePath")))
				Response.Write("Plan looks good!");
			Pl = null;
			try {
				var fso = new ActiveXObject("Scripting.FileSystemObject");
				fso.DeleteFile(Request.Form("FilePath"));
				fso = null;
			} catch (ex) { }
			Response.Write("
Check another."); } } %>