<%# Copyright 2008 Steven Barth Copyright 2008-2011 Jo-Philipp Wich Licensed to the public under the Apache License 2.0. -%> <% local fs = require "nixio.fs" local sys = require "luci.sys" local util = require "luci.util" local http = require "luci.http" local disp = require "luci.dispatcher" local version = require "luci.version" local sysinfo = util.ubus("system", "info") or { } local loadinfo = sysinfo.load or { 0, 0, 0 } local boardinfo = util.ubus("system", "board") or { } local request = disp.context.path local category = request[1] local cattree = category and disp.node(category) local tree = disp.node() local node = disp.context.dispatched local categories = disp.node_childs(tree) local c = tree local i, r -- tag all nodes leading to this page for i, r in ipairs(request) do if c.nodes and c.nodes[r] then c = c.nodes[r] c._menu_selected = true end end local uci = require "luci.model.uci".cursor() local ff = uci:get("freifunk", "community", "name") or "" local co = "profile_" .. ff local community = uci:get_first(co, "community", "name") or "Freifunk" local hp = uci:get_first(co, "community", "homepage") or "http://www.freifunk.net" local logo = "/luci-static/freifunk-generic/logo.jpg" local banner = false local show_comm = true local file for file in fs.glob("/www/luci-static/resources/custom_logo.*") do logo = string.gsub(file, "/www", "") break end for file in fs.glob("/www/luci-static/resources/custom_logo_only.*") do logo = string.gsub(file, "/www", "") show_comm = false break end for file in fs.glob("/www/luci-static/resources/custom_header.*") do logo = string.gsub(file, "/www", "") show_comm = false banner = true end -%> <% if node and node.css then %> <% end -%> <% if css then %> <% end -%> <%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(tostring(node.title)) or '')) %> - LuCI
<%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>
<%:No password set!%>
<%:There is no password set on this router. Please configure a root password to protect the web interface and enable SSH.%>
<%- end -%> <%- local function submenu(prefix, node) local childs = disp.node_childs(node) if #childs > 0 then %> <% end end %>
<% if category ~= "freifunk" and category ~= "splash" then %> <% end %>