<%@LANGUAGE="JSCRIPT"%><% Response.Expires = 0; // Immediate Expires: header Response.AddHeader("Cache-Control", "must-revalidate, post-check=0, pre-check=0"); var evID = Request.Form("eid"); var evIvorn = Request.Form("ivorn"); var evDateStr = Request.Form("date"); var evImgBasePath = Server.MapPath("/VOEvent/images/" + evID); var evLogBasePath = Server.MapPath("/VOEvent/logs/" + evID) var evName = evIvorn.Item.replace(/.*#(.*)/, "$1"); var FSO = new ActiveXObject("Scripting.FileSystemObject"); var PP = new ActiveXObject("PinPoint.Plate"); var evImgFiles = new Enumerator(FSO.GetFolder(evImgBasePath).Files); var evLogFiles = new Enumerator(FSO.GetFolder(evLogBasePath).Files); var row = 1; var col = 1; var thumbRow = " " + "\"Click \r\n"; var thumbs = ""; var captionRow = " " + "" + "Data details
\r\n##EXPINT## sec. ##FILT## \r\n"; var captions = ""; var finalHTML = ""; var buf; for (; !evImgFiles.atEnd(); evImgFiles.moveNext()) { var ftsFile = evImgFiles.item(); if(FSO.GetExtensionName(ftsFile) != "fts") continue; // Can't happen ha ha var imgBaseName = FSO.GetBaseName(ftsFile); var pngFile = FSO.GetParentFolderName(ftsFile) + "\\png\\" + imgBaseName + ".png"; // "small (128) JPEG PP.AttachNoImage(ftsFile); var expInt = Math.round(PP.ExposureInterval); var expDate = Util.FormatVar(PP.ExposureStartTime, "yyyy-dd-mm Hh:Nn:Ss"); var expFilt = PP.FilterName; PP.DetachFITS(); if(col == 1) { thumbs += "\r\n"; captions += "\r\n"; } buf = thumbRow.replace("##PNGFILE##", encodeURIComponent(FSO.GetFileName(pngFile))); thumbs += buf.replace("##FITSFILE##", encodeURIComponent(FSO.GetFileName(ftsFile))); buf = captionRow.replace("##EXPINT##", expInt); buf = buf.replace("##FILT##", expFilt); captions += buf.replace("##IMGBASENAME##", encodeURIComponent(imgBaseName)); if(col == 4) { thumbs += "\r\n"; captions += "\r\n"; finalHTML += thumbs + captions + " \r\n"; row += 1; col = 1; thumbs = ""; captions = ""; } else { col += 1; } } if(col > 1) // Partial row { while(col <= 4) { thumbs += " "; captions += " "; col += 1; } thumbs += "\r\n"; captions += "\r\n"; finalHTML += thumbs + captions + " \r\n"; } %> Followup Data for <%= evIvorn %>
 
   
 
 
<%= finalHTML %>
For <%= evIvorn %>
Original VOEvent message that triggered this observation
Followup VOEvent message sent to alert this observation
Automation system run log(s) for this observation
<% for(; !evLogFiles.atEnd(); evLogFiles.moveNext()) { var logFileName = FSO.GetFileName(evLogFiles.item()); Response.Write("    " + logFileName + "
\r\n"); } %>