File: test_htk.lua

package info (click to toggle)
lua-cgi 6.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 956 kB
  • sloc: javascript: 2,216; makefile: 25
file content (23 lines) | stat: -rwxr-xr-x 429 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env cgilua.cgi
require"htk"

local a_table = {}
for i = 1, 20 do
	local l = {}
	for j = 1, 20 do
		table.insert (l, HTK.TD { "cell "..i..","..j })
	end
	table.insert (a_table, HTK.TR (l))
end

cgilua.htmlheader()
cgilua.put (HTK.HTML {
	HTK.HEAD { HTK.TITLE { "Titulo da Pagina" } },
	HTK.BODY {
		bgcolor = "#FFFFFF",
		HTK.H1 { "Titulo da Pagina" },
		HTK.P {},
		"Uma pgina qualquer",
		HTK.TABLE (a_table),
	}
})