summaryrefslogtreecommitdiff
path: root/test/examples/www/staff.lua
diff options
context:
space:
mode:
authorLua Team <team@lua.org>2003-04-11 12:00:00 +0000
committerrepogen <>2003-04-11 12:00:00 +0000
commitf0e4e22f5c119865eb5a8d3844a40df2d5980b3b (patch)
treec4df063a747e9c99f8aba1678588a030993780a9 /test/examples/www/staff.lua
parent1981b7c90eb09e956e969cda5c473be4560af573 (diff)
downloadlua-github-5.0.tar.gz
Lua 5.05.0
Diffstat (limited to 'test/examples/www/staff.lua')
-rw-r--r--test/examples/www/staff.lua33
1 files changed, 0 insertions, 33 deletions
diff --git a/test/examples/www/staff.lua b/test/examples/www/staff.lua
deleted file mode 100644
index f36df4ad..00000000
--- a/test/examples/www/staff.lua
+++ /dev/null
@@ -1,33 +0,0 @@
-readfrom("template.html")
-TEMPLATE=read("*a")
-readfrom()
-
-PAT="|(%a%a*)|"
-
-GLOBAL={
- DATE=date("%d/%m/%Y %T"),
-}
-
-function get(i)
- if LOCAL[i] then return LOCAL[i]
- elseif GLOBAL[i] then return GLOBAL[i]
- else return "<BLINK>?"..i.."?</BLINK>" end
-end
-
-function global(t)
- for i,v in t do
- GLOBAL[i]=v
- end
-end
-
-function staff(t)
- LOCAL=t
- if t.AREAS then t.AREAS=gsub(t.AREAS,"[;,] *","\n<LI>") end
- local p,n=TEMPLATE
- if t.WWW=="" then p=gsub(p,'<A HREF="|WWW|">|NAME|</A>',"|NAME|") end
- repeat p,n=gsub(p,PAT,get) until n==0
- write(t.LOGIN,"\n")
- writeto(t.LOGIN..".html")
- write(p)
- writeto()
-end