summaryrefslogtreecommitdiffstats
path: root/template-logfiles-download-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'template-logfiles-download-html.lsp')
-rw-r--r--template-logfiles-download-html.lsp19
1 files changed, 19 insertions, 0 deletions
diff --git a/template-logfiles-download-html.lsp b/template-logfiles-download-html.lsp
new file mode 100644
index 0000000..a77f341
--- /dev/null
+++ b/template-logfiles-download-html.lsp
@@ -0,0 +1,19 @@
+<? local pageinfo , mainmenu, submenu, viewtable, session = ...
+ html=require("html") ?>
+Status: 200 OK
+Content-Type: application/octet-stream
+Content-Disposition: attachment; filename="Mika-send-me-the-filename.txt"
+<? if (session.id) then
+ io.write( html.cookie.set("sessionid", session.id) )
+ else
+ io.write (html.cookie.unset("sessionid"))
+ end
+
+
+ -- headers separated by a blank line
+ io.write ("\n")
+
+ local func = haserl.loadfile(pageinfo.viewfile)
+ func (viewtable)
+
+ ?>