= 64) then statusCode = "Can't add configuration to this table. Maximum limit reached." errorFlag = "ERROR" NextPage = "block_sites" else errorFlag, statusCode = fwView.blockedKeywordConfig(inputTable, RowId, "add") end end else errorFlag, statusCode = fwView.blockedKeywordConfig(inputTable, RowId, "edit") end -- save db if no error if (errorFlag == "OK") then db.save() end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) or statusCode web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "edit") then configRowId = RowId web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "delete") then local field, splitted, rows = web.cgiSearch(cgi, "BlockSites") -- if any rows to delete if (rows) then errorFlag, statusCode = fwView.deleteKeywords (rows) end -- save db if no error if (errorFlag == "OK") then db.save() end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "config2") then local inputTable = web.cgiToLuaTable(cgi) -- for add if (RowId == "-1") then if(cgi["hdTDcount"] ~= nil) then local hdCount = cgi["hdTDcount"] if(tonumber(hdCount) >= 64) then statusCode = "Can't add configuration to this table. Maximum limit reached." errorFlag = "ERROR" NextPage = "block_sites" else errorFlag, statusCode = fwView.trustedDomainConfig(inputTable, RowId, "add") end end else errorFlag, statusCode = fwView.trustedDomainConfig(inputTable, RowId, "edit") end -- save db if no error if (errorFlag == "OK") then db.save() end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) or statusCode web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "edit1") then -- if not allowed to edit if (ACCESS_LEVEL ~= 0) then NextPage = "block_sites" statusMessage = db.getAttribute("stringsMap", "stringId", "ADMIN_REQD", LANGUAGE) else local field, splitted, rows = web.cgiSearch(cgi, "TrustedDomains") if (rows and rows["1"]) then configRowId = rows["1"] else NextPage = "block_sites" end end web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "delete1") then local field, splitted, rows = web.cgiSearch(cgi, "TrustedDomains") -- if any rows to delete if (rows) then errorFlag, statusCode = fwView.deleteDomains (rows) end -- save db if no error if (errorFlag == "OK") then db.save() end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "enable") then local inputTable = web.cgiToLuaTable(cgi) if (RowId == "-1") then errorFlag, statusCode = fwView.enableBlockGroups(inputTable, RowId, "add") --if edit else errorFlag, statusCode = fwView.enableBlockGroups(inputTable, RowId, "edit") end -- save db if no error if (errorFlag == "OK") then db.save() end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "disable") then local inputTable = web.cgiToLuaTable(cgi) if (RowId == "-1") then errorFlag, statusCode = fwView.disableBlockGroups(inputTable, RowId, "add") --if edit else errorFlag, statusCode = fwView.disableBlockGroups(inputTable, RowId, "edit") end -- save db if no error if (errorFlag == "OK") then db.save() end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) web.goToPage(NextPage, true, true) else configRow = db.getRow("ContentFiltering","_ROWID_", "1") local configRowWeb = db.getRow("WebComponents","_ROWID_", "1") configRow = util.tableAppend(configRow, configRowWeb) configRow1 = db.getRow("BlockSites", "BlockSites._ROWID_", "1") local groupConfig = fwView.groupConfigGet (configRow1) local prog = db.getAttribute("environment", "name", "HW_OFFLOAD_SCRIPT", "value") if (prog ~= nil) then util.appendDebugOut("Exec = " .. os.execute(prog .. " " .. DB_FILE_NAME )) end ?>