<%# Copyright 2008 Steven Barth Copyright 2008-2016 Jo-Philipp Wich Copyright 2012 David Menting Licensed to the public under the Apache License 2.0. -%> <% local sys = require "luci.sys" local util = require "luci.util" local http = require "luci.http" local disp = require "luci.dispatcher" local boardinfo = util.ubus("system", "board") local node = disp.context.dispatched -- send as HTML5 http.prepare_content("text/html") -- Get current and latest OMR version local current_omr_version = luci.model.uci.cursor():get("openmptcprouter","settings","version") or "" local latest_omr_version = luci.model.uci.cursor():get("openmptcprouter","latest_versions","omr") or "" -%> <%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI <% if node and node.css then %> <% end -%> <% if css then %> <% end -%> ">
<%- 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.%>

<% if disp.lookup("admin/system/admin") then %> <% end %>
<%- end -%> <%- if current_omr_version ~= "" and latest_omr_version ~= "" and current_omr_version < latest_omr_version then -%>

<%=translatef("You have OpenMPTCProuter version %s and version %s is now available",current_omr_version,latest_omr_version)%>

<%- end -%>