diff options
author | Natanael Copa <natanael.copa@gmail.com> | 2007-07-27 12:53:38 +0000 |
---|---|---|
committer | Natanael Copa <natanael.copa@gmail.com> | 2007-07-27 12:53:38 +0000 |
commit | dc53423183a0c459284ebd139022b707f01af006 (patch) | |
tree | 8a67a2904ec991028bddd429d57eec114b05baab /lib/log_view.lua | |
parent | 275c80281ba2e84b8d810bdb1c2b7f8c9a4333d9 (diff) | |
download | acf-core-dc53423183a0c459284ebd139022b707f01af006.tar.bz2 acf-core-dc53423183a0c459284ebd139022b707f01af006.tar.xz |
moved core files to new dir structurev2.0_alpha1
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@219 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'lib/log_view.lua')
-rw-r--r-- | lib/log_view.lua | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/lib/log_view.lua b/lib/log_view.lua new file mode 100644 index 0000000..f32400e --- /dev/null +++ b/lib/log_view.lua @@ -0,0 +1,56 @@ +require ("web_elements") + +local function fwrite(fmt, ...) + return io.write(string.format(fmt, ...)) +end + +local function footer(time) + fwrite("<div id=\"footer\">\n<p>This request was processed in approximately %d seconds</p>\n</div>",time) +end + +header = [[ +content-type: text/html + +<!DOCTYPE HTML PUBLIC "-//W3C//ddD HTML 4.01 Transitional//EN"> +<html lang="en"> + +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +<title>Alpine log view</title> +<link rel="stylesheet" type="text/css" href="/static/webconf.css" /> +<meta http-equiv='Cache-Control' content='no-cache' /> +<Meta http-equiv='Pragma' content='no-cache' /> +</head>]] + +-- + +print(header) +print("<body>\n<div id=\"head\">") + +fwrite("<h1>%s</h1>",cf.hostinfo.alpine_hostname) + +fwrite("<p><em>%s</em></p>",cf.hostinfo.alpine_release) + +print("</div>") + +print ('<div id="mainmenu">') +local group, cat, subcat = + web_elements.render_mainmenu ( menu, cf.prefix, cf.controller, cf.action ) +print([[ +</div> + +<div id="submenu">]]) +web_elements.render_submenu ( menu, group, cat, subcat ) +print([[</div> + +<div id="content"> +<p>]]) +-- get the wc and view tables +-- walk the tree +web_elements.render_table ( view ) +print("</p>\n</div>") + +print(footer(cf.time)) +print("</body></html>") + +-- /* vim: set filetype=lua : */ |