diff options
author | Steven Barth <steven@midlink.org> | 2008-05-08 15:37:41 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-05-08 15:37:41 +0000 |
commit | aa9ccf77c6648515ba58c37b9345cdbd561028db (patch) | |
tree | b0270202d47b6c5e179f8475302bb3ef0d1c9402 /applications/luci-splash/src/controller/controller.lua | |
parent | a3a51464fd8cffa6d18fa3f18be9c699901abd0d (diff) |
* Mördercommit ;-)
* Major Repository Reorganisation
* API 0.4 Softfreeze to come
Diffstat (limited to 'applications/luci-splash/src/controller/controller.lua')
-rw-r--r-- | applications/luci-splash/src/controller/controller.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/applications/luci-splash/src/controller/controller.lua b/applications/luci-splash/src/controller/controller.lua new file mode 100644 index 0000000000..62088be52d --- /dev/null +++ b/applications/luci-splash/src/controller/controller.lua @@ -0,0 +1,19 @@ +module("ffluci.controller.splash.splash", package.seeall) + +function action_activate() + local mac = ffluci.sys.net.ip4mac(ffluci.http.env.REMOTE_ADDR) + if mac and ffluci.http.formvalue("accept") then + os.execute("luci-splash add "..mac.." >/dev/null 2>&1") + ffluci.http.redirect(ffluci.model.uci.get("freifunk", "community", "homepage")) + else + ffluci.http.redirect(ffluci.dispatcher.build_url()) + end +end + +function action_accepted() + ffluci.http.redirect(ffluci.dispatcher.build_url()) +end + +function action_unknown() + ffluci.http.redirect(ffluci.dispatcher.build_url()) +end
\ No newline at end of file |