mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Moved header for all pages to page_utils
This commit is contained in:
parent
539dcd322c
commit
6d7de7bd57
34 changed files with 114 additions and 93 deletions
|
|
@ -14,6 +14,7 @@ locales_utils = require "locales_utils"
|
|||
local os_utils = require "os_utils"
|
||||
local format_utils = require "format_utils"
|
||||
local alert_consts = require "alert_consts"
|
||||
local page_utils = require("page_utils")
|
||||
|
||||
-- ##############################################
|
||||
-- TODO: replace those globals with locals everywhere
|
||||
|
|
@ -2155,7 +2156,7 @@ function haveAdminPrivileges()
|
|||
if(isAdministrator()) then
|
||||
return(true)
|
||||
else
|
||||
ntop.dumpFile(dirs.installdir .. "/httpdocs/inc/header.inc")
|
||||
page_utils.print_header()
|
||||
dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua")
|
||||
print("<div class=\"alert alert-danger\"><img src=".. ntop.getHttpPrefix() .. "/img/warning.png> Access forbidden</div>")
|
||||
return(false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue