--
-- (C) 2013-16 - ntop.org
--
dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
if ( (dirs.scriptdir ~= nil) and (dirs.scriptdir ~= "")) then package.path = dirs.scriptdir .. "/lua/modules/?.lua;" .. package.path end
require "lua_utils"
require "prefs_utils"
if (ntop.isPro()) then
package.path = dirs.installdir .. "/scripts/lua/pro/?.lua;" .. package.path
require "report_utils"
end
sendHTTPHeader('text/html; charset=iso-8859-1')
if(haveAdminPrivileges()) then
ntop.dumpFile(dirs.installdir .. "/httpdocs/inc/header.inc")
active_page = "admin"
dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua")
ntop.loadPrefsDefaults()
prefs = ntop.getPrefs()
print [[
Runtime Preferences
]]
subpage_active = _GET["subpage_active"]
report_active = ""
web_gui_active = ""
traffic_active = ""
top_talkers_active = ""
mysql_active = ""
nbox_active = ""
alerts_active = ""
user_auth_active = ""
data_purge_active = ""
stats_rrds_active = ""
if (subpage_active == nil or subpage_active == "") then
subpage_active = "report"
end
if (subpage_active == "report") then
report_active = "active"
end
if (subpage_active == "web_gui") then
web_gui_active = "active"
end
if (subpage_active == "traffic") then
traffic_active = "active"
end
if (subpage_active == "top_talkers") then
top_talkers_active = "active"
end
if (subpage_active == "mysql") then
mysql_active = "active"
end
if (subpage_active == "nbox") then
nbox_active = "active"
end
if (subpage_active == "alerts") then
alerts_active = "active"
end
if (subpage_active == "user_auth") then
user_auth_active = "active"
end
if (subpage_active == "data_purge") then
data_purge_active = "active"
end
if (subpage_active == "stats_rrds") then
stats_rrds_active = "active"
end
-- ================================================================================
function printReportVisualization()
print(' ]]
end
-- ================================================================================
function printWebGUI()
if prefs.is_autologout_enabled == true then
print(' ]]
end
end
-- ================================================================================
function printTraffic()
print(' ]]
end
-- ================================================================================
function printTopTalkers()
print(' ]]
end
-- ================================================================================
function printMysql()
print(' ]]
end
-- ================================================================================
function printAlerts()
print(' ]]
end
-- ================================================================================
function printNbox()
print(' ]]
end
-- ================================================================================
function printUserAuth()
print('
]]
end
-- ================================================================================
function printDataPurge()
print(' ]]
end
-- ================================================================================
function printStatsRrds()
print(' ]]
end
print[[
|
| ]]
if (subpage_active == "report") then
printReportVisualization()
end
if (subpage_active == "web_gui") then
printWebGUI()
end
if (subpage_active == "top_talkers") then
printTopTalkers()
end
if (subpage_active == "mysql") then
printMysql()
end
if (subpage_active == "alerts") then
printAlerts()
end
if (subpage_active == "nbox") then
if (ntop.isPro()) then
printNbox()
end
end
if (subpage_active == "user_auth") then
if (ntop.isPro()) then
printUserAuth()
end
end
if (subpage_active == "data_purge") then
printDataPurge()
end
if (subpage_active == "traffic") then
printTraffic()
end
if (subpage_active == "stats_rrds") then
printStatsRrds()
end
print[[
|
]]
dofile(dirs.installdir .. "/scripts/lua/inc/footer.lua")
end