Moved header for all pages to page_utils

This commit is contained in:
Alfredo Cardigliano 2018-11-29 18:10:18 +01:00
parent 539dcd322c
commit 6d7de7bd57
34 changed files with 114 additions and 93 deletions

View file

@ -9,12 +9,16 @@ dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
local page_utils = require("page_utils")
-- Here you can choose the type of your HTTP message {'text/html','application/json',...}. There are two main function that you can use:
-- function sendHTTPHeaderIfName(mime, ifname, maxage)
-- function sendHTTPHeader(mime)
-- For more information please read the scripts/lua/modules/lua_utils.lua file.
sendHTTPContentTypeHeader('text/html')
ntop.dumpFile(dirs.installdir .. "/httpdocs/inc/header.inc")
page_utils.print_header()
dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua")
print('<html><head><title>debug Lua example</title></head>')