%#
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth
Copyright 2008-2012 Jo-Philipp Wich
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id: sysauth.htm 8327 2012-03-04 15:03:05Z jow $
-%>
<%
local uci = require "luci.model.uci".cursor()
local ntm = require "luci.model.network"
ntm.init(uci)
local mediaPath = luci.sys.exec("uci get luci.main.mediaurlbase")
local t = "web_NTGR"
local trim = luci.util.trim
local ip = luci.http.getenv("REMOTE_ADDR")
mediaPath = luci.util.split(mediaPath, "/")
if t == trim(mediaPath[3]) then
%>
<%
local firmwareVersion_sha = luci.util.trim(luci.util.exec("cat /etc/version | grep build"))
local firmwareVersion = luci.util.trim(luci.util.exec("cat /etc/version | grep Firmware |awk '{printf $4}'"))
local ICON_LOGO = uci:get('functionlist','vendorlist','ICON_LOGO') or "/Netgear_logo.png"
local BANNER_LOGO = uci:get('functionlist','vendorlist','BANNER_LOGO') or "/banner_logo.png"
local PRODUCT_LOGO = "/product_logo.png"
local COPYRIGHT = tostring(uci:get('functionlist','vendorlist','COPYRIGHT')or "EnGenius")
COPYRIGHT = string.gsub(COPYRIGHT,"__SPACE__"," ")
local modelname = uci:get("sysProductInfo","model","modelName")
local user = luci.util.trim(luci.util.exec("/lib/auth.sh get_username"))
local description = uci:get("sysProductInfo","model","description")
local first = uci:get("system","firmware","first_login")
local mgmt_mode = uci:get("apcontroller","capwap","enable")
if uci:get("functionlist","functionlist","SUPPORT_BUSINESS_SERIES") == "1" then
ICON_LOGO = "/Netgear_business_logo.png"
end
if uci:get("functionlist","functionlist","SUPPORT_MD5_PASSWORD") == "1" then
%>
<%end%>
<%=striptags(luci.sys.hostname())%>
<%
else
%>
<%+header%>
<%+footer%>
<%
end
%>