2008-04-27 16:12:24 +00:00
|
|
|
module("ffluci.controller.splash.splash", package.seeall)
|
2008-04-27 11:16:31 +00:00
|
|
|
|
|
|
|
function action_activate()
|
2008-05-07 20:23:42 +00:00
|
|
|
local mac = ffluci.sys.net.ip4mac(ffluci.http.env.REMOTE_ADDR)
|
2008-04-27 16:12:24 +00:00
|
|
|
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
|
2008-05-05 19:27:30 +00:00
|
|
|
ffluci.http.redirect(ffluci.dispatcher.build_url())
|
2008-04-27 16:12:24 +00:00
|
|
|
end
|
2008-04-27 11:16:31 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function action_accepted()
|
2008-05-05 19:27:30 +00:00
|
|
|
ffluci.http.redirect(ffluci.dispatcher.build_url())
|
2008-04-27 11:16:31 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function action_unknown()
|
2008-05-05 19:27:30 +00:00
|
|
|
ffluci.http.redirect(ffluci.dispatcher.build_url())
|
2008-04-27 11:16:31 +00:00
|
|
|
end
|