diff options
author | Mike Mason <ms13sp@gmail.com> | 2008-01-26 16:48:29 +0000 |
---|---|---|
committer | Mike Mason <ms13sp@gmail.com> | 2008-01-26 16:48:29 +0000 |
commit | 90beddd29cf1977dfc9ca61cc64f2773606038e3 (patch) | |
tree | cb10f2abddd98aed0e66f691c0004c3af362fba2 /app/template-html.lsp | |
parent | 3f7830de7012e45d4508f41eda4e675159d2cc44 (diff) | |
download | acf-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.lsp | 10 |
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> | |