From d35a620e9f5665a94967f4bd02c93581a1dd7e00 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Tue, 27 May 2008 12:23:39 +0000 Subject: commit 4f6198094cf4134179d1f9c9fa8f79759a27c87e Author: Felix Fietkau Date: Tue May 27 13:56:12 2008 +0200 rename src/ to luasrc/ --- .../luasrc/controller/splash/splash.lua | 30 +++++++++++++++++++ .../luci-splash/luasrc/model/cbi/splash/splash.lua | 30 +++++++++++++++++++ .../luci-splash/luasrc/view/splash/splash.htm | 34 ++++++++++++++++++++++ .../luasrc/view/splash_splash/index.htm | 2 ++ .../luasrc/view/splash_splash/splash.htm | 7 +++++ .../luci-splash/src/controller/splash/splash.lua | 30 ------------------- .../luci-splash/src/model/cbi/splash/splash.lua | 30 ------------------- .../luci-splash/src/view/splash/splash.htm | 34 ---------------------- .../luci-splash/src/view/splash_splash/index.htm | 2 -- .../luci-splash/src/view/splash_splash/splash.htm | 7 ----- 10 files changed, 103 insertions(+), 103 deletions(-) create mode 100644 applications/luci-splash/luasrc/controller/splash/splash.lua create mode 100644 applications/luci-splash/luasrc/model/cbi/splash/splash.lua create mode 100644 applications/luci-splash/luasrc/view/splash/splash.htm create mode 100644 applications/luci-splash/luasrc/view/splash_splash/index.htm create mode 100644 applications/luci-splash/luasrc/view/splash_splash/splash.htm delete mode 100644 applications/luci-splash/src/controller/splash/splash.lua delete mode 100644 applications/luci-splash/src/model/cbi/splash/splash.lua delete mode 100644 applications/luci-splash/src/view/splash/splash.htm delete mode 100644 applications/luci-splash/src/view/splash_splash/index.htm delete mode 100644 applications/luci-splash/src/view/splash_splash/splash.htm (limited to 'applications/luci-splash') diff --git a/applications/luci-splash/luasrc/controller/splash/splash.lua b/applications/luci-splash/luasrc/controller/splash/splash.lua new file mode 100644 index 000000000..544f1e89e --- /dev/null +++ b/applications/luci-splash/luasrc/controller/splash/splash.lua @@ -0,0 +1,30 @@ +module("luci.controller.splash.splash", package.seeall) + +function index() + local page = node("admin", "services", "splash") + page.target = cbi("splash/splash") + page.title = "Client-Splash" + + node("splash", "splash", "activate").target = action_activate + node("splash", "splash", "allowed").target = action_allowed + node("splash", "splash", "unknown").target = action_unknown + node("splash", "splash", "splash").target = template("splash_splash/splash") +end + +function action_activate() + local mac = luci.sys.net.ip4mac(luci.http.env.REMOTE_ADDR) + if mac and luci.http.formvalue("accept") then + os.execute("luci-splash add "..mac.." >/dev/null 2>&1") + luci.http.redirect(luci.model.uci.get("freifunk", "community", "homepage")) + else + luci.http.redirect(luci.dispatcher.build_url()) + end +end + +function action_allowed() + luci.http.redirect(luci.dispatcher.build_url()) +end + +function action_unknown() + luci.http.redirect(luci.dispatcher.build_url()) +end \ No newline at end of file diff --git a/applications/luci-splash/luasrc/model/cbi/splash/splash.lua b/applications/luci-splash/luasrc/model/cbi/splash/splash.lua new file mode 100644 index 000000000..6050ac8a0 --- /dev/null +++ b/applications/luci-splash/luasrc/model/cbi/splash/splash.lua @@ -0,0 +1,30 @@ +-- ToDo: Translate, Add descriptions and help texts +require("luci.model.uci") + +m = Map("luci_splash", "Client-Splash", [[Client-Splash ist das Freifunk Hotspot-Authentifizierungs-System.]]) + +s = m:section(NamedSection, "general", "core", "Allgemein") +s:option(Value, "leasetime", "Freigabezeit", "h") + +s = m:section(TypedSection, "iface", "Schnittstellen") +s.addremove = true +s.anonymous = true + +iface = s:option(ListValue, "network", "Schnittstelle") +for k, v in pairs(luci.model.uci.sections("network")) do + if v[".type"] == "interface" and k ~= "loopback" then + iface:value(k) + end +end + +s = m:section(TypedSection, "whitelist", "Automatische Freigabe") +s.addremove = true +s.anonymous = true +s:option(Value, "mac", "MAC-Adresse") + +s = m:section(TypedSection, "blacklist", "Automatische Sperrung") +s.addremove = true +s.anonymous = true +s:option(Value, "mac", "MAC-Adresse") + +return m \ No newline at end of file diff --git a/applications/luci-splash/luasrc/view/splash/splash.htm b/applications/luci-splash/luasrc/view/splash/splash.htm new file mode 100644 index 000000000..22631e08f --- /dev/null +++ b/applications/luci-splash/luasrc/view/splash/splash.htm @@ -0,0 +1,34 @@ +<% +local c = luci.model.uci.sections("freifunk").community + +

<%:welcome Willkommen%>!

+

+Du bist jetzt mit dem freien Funknetz +<%=c.name%> verbunden.
+Wir sind ein experimentelles Gemeinschaftsnetzwerk, aber kein Internetanbieter. +

+ +

+Ein Zugang ins Internet ist trotzdem möglich, +da einige Freifunker ihre privaten Internetzugänge zur Verfügung stellen. +Diese Zugänge müssen sich hier alle teilen. +Bitte sei Dir dessen bewusst und verhalte Dich dementsprechend: +

+

+ +

+Wenn Du unsere Idee gut findest, kannst Du uns unterstützen: +

+

+ +

+Mit einem Klick auf <%:accept Annehmen%> kannst du für <%=c.leasetime%> Stunden +über unser Netz das Internet verwenden. Dann wirst du erneut aufgefordet, diese Bedingungen zu akzeptieren. +

\ No newline at end of file diff --git a/applications/luci-splash/luasrc/view/splash_splash/index.htm b/applications/luci-splash/luasrc/view/splash_splash/index.htm new file mode 100644 index 000000000..75aa02658 --- /dev/null +++ b/applications/luci-splash/luasrc/view/splash_splash/index.htm @@ -0,0 +1,2 @@ +<%+header%> +<%+footer%> \ No newline at end of file diff --git a/applications/luci-splash/luasrc/view/splash_splash/splash.htm b/applications/luci-splash/luasrc/view/splash_splash/splash.htm new file mode 100644 index 000000000..9c165802f --- /dev/null +++ b/applications/luci-splash/luasrc/view/splash_splash/splash.htm @@ -0,0 +1,7 @@ +<%+header%> +<%+splash/splash%> +
+ + +
+<%+footer%> \ No newline at end of file diff --git a/applications/luci-splash/src/controller/splash/splash.lua b/applications/luci-splash/src/controller/splash/splash.lua deleted file mode 100644 index 544f1e89e..000000000 --- a/applications/luci-splash/src/controller/splash/splash.lua +++ /dev/null @@ -1,30 +0,0 @@ -module("luci.controller.splash.splash", package.seeall) - -function index() - local page = node("admin", "services", "splash") - page.target = cbi("splash/splash") - page.title = "Client-Splash" - - node("splash", "splash", "activate").target = action_activate - node("splash", "splash", "allowed").target = action_allowed - node("splash", "splash", "unknown").target = action_unknown - node("splash", "splash", "splash").target = template("splash_splash/splash") -end - -function action_activate() - local mac = luci.sys.net.ip4mac(luci.http.env.REMOTE_ADDR) - if mac and luci.http.formvalue("accept") then - os.execute("luci-splash add "..mac.." >/dev/null 2>&1") - luci.http.redirect(luci.model.uci.get("freifunk", "community", "homepage")) - else - luci.http.redirect(luci.dispatcher.build_url()) - end -end - -function action_allowed() - luci.http.redirect(luci.dispatcher.build_url()) -end - -function action_unknown() - luci.http.redirect(luci.dispatcher.build_url()) -end \ No newline at end of file diff --git a/applications/luci-splash/src/model/cbi/splash/splash.lua b/applications/luci-splash/src/model/cbi/splash/splash.lua deleted file mode 100644 index 6050ac8a0..000000000 --- a/applications/luci-splash/src/model/cbi/splash/splash.lua +++ /dev/null @@ -1,30 +0,0 @@ --- ToDo: Translate, Add descriptions and help texts -require("luci.model.uci") - -m = Map("luci_splash", "Client-Splash", [[Client-Splash ist das Freifunk Hotspot-Authentifizierungs-System.]]) - -s = m:section(NamedSection, "general", "core", "Allgemein") -s:option(Value, "leasetime", "Freigabezeit", "h") - -s = m:section(TypedSection, "iface", "Schnittstellen") -s.addremove = true -s.anonymous = true - -iface = s:option(ListValue, "network", "Schnittstelle") -for k, v in pairs(luci.model.uci.sections("network")) do - if v[".type"] == "interface" and k ~= "loopback" then - iface:value(k) - end -end - -s = m:section(TypedSection, "whitelist", "Automatische Freigabe") -s.addremove = true -s.anonymous = true -s:option(Value, "mac", "MAC-Adresse") - -s = m:section(TypedSection, "blacklist", "Automatische Sperrung") -s.addremove = true -s.anonymous = true -s:option(Value, "mac", "MAC-Adresse") - -return m \ No newline at end of file diff --git a/applications/luci-splash/src/view/splash/splash.htm b/applications/luci-splash/src/view/splash/splash.htm deleted file mode 100644 index 22631e08f..000000000 --- a/applications/luci-splash/src/view/splash/splash.htm +++ /dev/null @@ -1,34 +0,0 @@ -<% -local c = luci.model.uci.sections("freifunk").community - -

<%:welcome Willkommen%>!

-

-Du bist jetzt mit dem freien Funknetz -<%=c.name%> verbunden.
-Wir sind ein experimentelles Gemeinschaftsnetzwerk, aber kein Internetanbieter. -

- -

-Ein Zugang ins Internet ist trotzdem möglich, -da einige Freifunker ihre privaten Internetzugänge zur Verfügung stellen. -Diese Zugänge müssen sich hier alle teilen. -Bitte sei Dir dessen bewusst und verhalte Dich dementsprechend: -

-

- -

-Wenn Du unsere Idee gut findest, kannst Du uns unterstützen: -

-

- -

-Mit einem Klick auf <%:accept Annehmen%> kannst du für <%=c.leasetime%> Stunden -über unser Netz das Internet verwenden. Dann wirst du erneut aufgefordet, diese Bedingungen zu akzeptieren. -

\ No newline at end of file diff --git a/applications/luci-splash/src/view/splash_splash/index.htm b/applications/luci-splash/src/view/splash_splash/index.htm deleted file mode 100644 index 75aa02658..000000000 --- a/applications/luci-splash/src/view/splash_splash/index.htm +++ /dev/null @@ -1,2 +0,0 @@ -<%+header%> -<%+footer%> \ No newline at end of file diff --git a/applications/luci-splash/src/view/splash_splash/splash.htm b/applications/luci-splash/src/view/splash_splash/splash.htm deleted file mode 100644 index 9c165802f..000000000 --- a/applications/luci-splash/src/view/splash_splash/splash.htm +++ /dev/null @@ -1,7 +0,0 @@ -<%+header%> -<%+splash/splash%> -
- - -
-<%+footer%> \ No newline at end of file -- cgit v1.2.3