added lang /lib pkgs
[librewrt/.git] / packages / xwrt / webif-iw-lua-chillispot / files / www / cgi-bin / webif / chillispot.sh
diff --git a/packages/xwrt/webif-iw-lua-chillispot/files/www/cgi-bin/webif/chillispot.sh b/packages/xwrt/webif-iw-lua-chillispot/files/www/cgi-bin/webif/chillispot.sh
new file mode 100644 (file)
index 0000000..ef8b88a
--- /dev/null
@@ -0,0 +1,36 @@
+#!/usr/bin/lua
+--------------------------------------------------------------------------------\r
+-- chillispot.sh
+-- This script is writen in LUA, the extension is ".sh" for compatibilities
+-- reasons width menu system of X-Wrt
+--
+-- Description:
+--        Administrative console to Chillispot
+--
+-- Author(s) [in order of work date]:
+--       Fabián Omar Franzotti
+--
+-- Configuration files referenced:
+--    hotspot
+--
+--------------------------------------------------------------------------------\r
+--[[
+##WEBIF:name:HotSpot:322:ChilliSpot
+]]--
+require ("lua-xwrt.xwrt.init")
+page.title = "ChilliSpot"
+cportal = require("lua-xwrt.chillispot")
+local forms = {}
+__FORM.option = __FORM.option or ""
+if __FORM.option == "" then
+       forms = cportal.service()
+else
+       forms = cportal[__FORM.option]()
+end
+for i = 1, #forms do
+       page.content:add(forms[i])
+end
+--page.content:add(util.table2string(__FORM,"<br>"))
+--page.content:add(util.table2string(uci.get_all("chillispot"),"<br>"))
+page:print()
+