summaryrefslogtreecommitdiffstats
path: root/lib/viewfunctions.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-07-02 19:37:37 +0000
committerTed Trask <ttrask01@yahoo.com>2008-07-02 19:37:37 +0000
commitbc8c34d81a8e90a9d9de22cb313a8738c86bb15c (patch)
tree5dfc604f959bfcf65936899a7ac8b148f747cca6 /lib/viewfunctions.lua
parent997b4dcd33463841aa8f1ca6d59dea7bc9d38ae9 (diff)
downloadacf-core-bc8c34d81a8e90a9d9de22cb313a8738c86bb15c.tar.bz2
acf-core-bc8c34d81a8e90a9d9de22cb313a8738c86bb15c.tar.xz
Changed interfaces to use controllerfunctions.
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1268 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'lib/viewfunctions.lua')
-rw-r--r--lib/viewfunctions.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/viewfunctions.lua b/lib/viewfunctions.lua
index 27320a6..45701d6 100644
--- a/lib/viewfunctions.lua
+++ b/lib/viewfunctions.lua
@@ -171,3 +171,20 @@ function displayform(myform, order)
io.write('</DL>\n')
io.write('</FORM>')
end
+
+function displaycommandresults(commands, session)
+ local cmdresult = {}
+ for i,cmd in ipairs(commands) do
+ if session[cmd.."result"] then
+ cmdresult[#cmdresult + 1] = session[cmd.."result"]
+ session[cmd.."result"] = nil
+ end
+ end
+ if #cmdresult > 0 then
+ io.write("<H1>Command Result</H1>\n<DL>\n")
+ for i,result in ipairs(cmdresult) do
+ io.write(result.value:gsub("\n", "<BR>") .. "\n")
+ end
+ io.write("</DL>\n")
+ end
+end