summaryrefslogtreecommitdiffstats
path: root/app/template-html.lsp
diff options
context:
space:
mode:
authorMike Mason <ms13sp@gmail.com>2008-01-26 16:48:29 +0000
committerMike Mason <ms13sp@gmail.com>2008-01-26 16:48:29 +0000
commit90beddd29cf1977dfc9ca61cc64f2773606038e3 (patch)
treecb10f2abddd98aed0e66f691c0004c3af362fba2 /app/template-html.lsp
parent3f7830de7012e45d4508f41eda4e675159d2cc44 (diff)
downloadacf-core-90beddd29cf1977dfc9ca61cc64f2773606038e3.tar.bz2
acf-core-90beddd29cf1977dfc9ca61cc64f2773606038e3.tar.xz
Forgot the template-html.lsp. Always good to do a make install and see what was forgotten. ;)
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@657 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'app/template-html.lsp')
-rw-r--r--app/template-html.lsp10
1 files changed, 6 insertions, 4 deletions
diff --git a/app/template-html.lsp b/app/template-html.lsp
index 4382b60..bf028e1 100644
--- a/app/template-html.lsp
+++ b/app/template-html.lsp
@@ -1,5 +1,6 @@
<? local pageinfo , mainmenu, submenu, viewtable, session = ...
- html=require("html") ?>
+ html=require("html")
+ sess=require("session") ?>
Status: 200 OK
Content-Type: text/html
<? if (session.id) then
@@ -33,11 +34,12 @@ Content-Type: text/html
<span class="mute">
<p>
<? local ctlr = pageinfo.script .. "/acf-util/logon/"
- if session.id == nil then
+
+ sname = sess.check_session("/tmp", session.id)
+ if sname == "an unknown user" then
io.write ( string.format("\t\t\t\t\t\t<a href=\"%s\">Log in</a>\n", ctlr .. "logon" ) )
else
- sess = session.name or "unknown"
- io.write ( string.format("\t\t\t\t\t\t<a href=\"%s\">Log out as '" .. sess .. "'</a>\n", ctlr .. "logout" ) )
+ io.write ( string.format("\t\t\t\t\t\t<a href=\"%s\">Log out as '" .. sname .. "'</a>\n", ctlr .. "logout" ) )
end ?>
|
<a href="/">home</a> |