%+header%> <% local uci = require("luci.model.uci").cursor() local disp = require "luci.dispatcher" local ssid, channel, passwd, encryption local ssid_5g, channel_5g, passwd_5g, encryption_5g uci:foreach("wireless","wifi-iface", function(s) if s["ifname"] == 'ath0' then passwd = uci:get("wireless",s[".name"],"key") ssid = uci:get("wireless",s[".name"],"ssid") encryption = uci:get("wireless",s[".name"],"encryption") end end) uci:foreach("wireless","wifi-iface", function(s) if s["ifname"] == 'ath1' then passwd_5g = uci:get("wireless",s[".name"],"key") ssid_5g = uci:get("wireless",s[".name"],"ssid") encryption_5g = uci:get("wireless",s[".name"],"encryption") end end) ssid = string.gsub(ssid,"\\","\\\\") ssid = string.gsub(ssid,"\"","\\\"") ssid_5g = string.gsub(ssid_5g,"\\","\\\\") ssid_5g = string.gsub(ssid_5g,"\"","\\\"") if passwd then passwd = string.gsub(passwd,"\\","\\\\") passwd = string.gsub(passwd,"\"","\\\"") end if passwd_5g then passwd_5g = string.gsub(passwd_5g,"\\","\\\\") passwd_5g = string.gsub(passwd_5g,"\"","\\\"") end %>
<%+footer%>