summaryrefslogtreecommitdiffhomepage
path: root/libs/nixio/axTLS/www/lua/overview.lp
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2009-02-22 23:19:25 +0000
committerSteven Barth <steven@midlink.org>2009-02-22 23:19:25 +0000
commitd730c1263328c5990ce46cdf6394ce6e36cc3609 (patch)
tree8dc37350e69dcbd0ca82570cfa62a4c710defc93 /libs/nixio/axTLS/www/lua/overview.lp
parentd2b11117f26285186b711271d24733d35e0444a1 (diff)
Add axTLS sourcecode
Diffstat (limited to 'libs/nixio/axTLS/www/lua/overview.lp')
-rw-r--r--libs/nixio/axTLS/www/lua/overview.lp64
1 files changed, 64 insertions, 0 deletions
diff --git a/libs/nixio/axTLS/www/lua/overview.lp b/libs/nixio/axTLS/www/lua/overview.lp
new file mode 100644
index 000000000..4d17002a0
--- /dev/null
+++ b/libs/nixio/axTLS/www/lua/overview.lp
@@ -0,0 +1,64 @@
+<?lua
+-- Tries to load known libraries
+for _, t in ipairs { "lxp", "luasql.postgres", "luasql.mysql", "luasql.oci8", "luasql.sqlite", "luasql.odbc", "socket", "xmlrpc", "soap", "lualdap", "logging", "md5", "zip", "stable", "copas", } do
+ pcall (require, t)
+end
+
+libraries = { "lxp", "luasql", "socket", "xmlrpc", "soap", "lualdap", "logging", "md5", "zip", "stable", "copas", }
+
+local colors = { "#999999", "#CCCCCC", "#FFFFFF", }
+local i = 0
+function color () i = math.mod (i + 1, 3) return colors[i + 1] end
+
+function pack_name (p) return string.gsub (p, "^([^.]+).-", "%1") end
+
+function idx (t, f) return _G[t][f] or _G[t]["_"..f] or "" end
+?>
+<html>
+<head><title>CGILua installation overview</title></head>
+
+<body bgcolor="#FFFFFF">
+<h1>CGILua installation overview</h1>
+
+<table>
+ <tr>
+ <th bgcolor="#999999">Version
+ <th bgcolor="#999999">Copyright
+ <th bgcolor="#999999">Description
+ </tr>
+<?lua
+local support = {
+ { "Lua", "_VERSION" },
+ { "compat-5.1", "_COMPAT51" },
+}
+for _, l in ipairs (support) do bg = color()
+?>
+ <tr>
+ <td bgcolor = "<%= bg %>"><%= tostring(_G[l[2]]) %>
+ <td bgcolor = "<%= bg %>">
+ <td bgcolor = "<%= bg %>">
+ </tr>
+<? end ?>
+ <tr><td colspan="4"></tr>
+<?lua
+local pack = {}
+for i, p in ipairs (libraries) do
+ local s = _G[p]
+ local n = pack_name(p)
+ if type(_G[n]) == "table" and _G[n]._VERSION then
+ pack[n] = true
+ table.insert (pack, n)
+ end
+end
+table.sort (pack)
+for _, p in ipairs (pack) do bg = color() ?>
+ <tr>
+ <td bgcolor = "<%= bg %>"><%= idx(p,"VERSION") %>
+ <td bgcolor = "<%= bg %>"><small><%= idx(p,"COPYRIGHT") %></small>
+ <td bgcolor = "<%= bg %>"><small><%= idx(p,"DESCRIPTION") %></small>
+ </tr>
+<?lua end ?>
+</table>
+
+</body>
+</html>