= 600) then statusMessage = "Can't add configuration to this table. Maximum limit reached." NextPage = "firewallRulesIpv4" end end web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "edit") then if (ACCESS_LEVEL ~= 0) then NextPage = "firewallRulesIpv4" statusMessage = db.getAttribute("stringsMap", "stringId", "ADMIN_REQD", LANGUAGE) else local field, splitted, rows = web.cgiSearch(cgi, "FirewallRules") if (rows and rows["1"]) then configRowId = rows["1"] else NextPage = "firewallRulesIpv4" end end web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "enable") then local field, splitted, rows = web.cgiSearch(cgi, "FirewallRules") -- if any rows to enable if (rows) then errorFlag, statusCode = fwView.modifyRules (rows, "enable") end -- save db if no error if (errorFlag == "OK") then db.save() local cacheResetProgram = db.getAttribute("environment", "name", "HW_CACHE_RESET", "value") util.appendDebugOut("Exec: " .. os.execute(cacheResetProgram)); end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) or statusCode web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "disable") then local field, splitted, rows = web.cgiSearch(cgi, "FirewallRules") -- if any rows to disable if (rows) then errorFlag, statusCode = fwView.modifyRules (rows, "disable") end -- save db if no error if (errorFlag == "OK") then db.save() local cacheResetProgram = db.getAttribute("environment", "name", "HW_CACHE_RESET", "value") util.appendDebugOut("Exec: " .. os.execute(cacheResetProgram)); end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) or statusCode web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "delete") then local field, splitted, rows = web.cgiSearch(cgi, "FirewallRules") -- if any rows to delete if (rows) then errorFlag, statusCode = fwView.modifyRules (rows, "delete") end -- save db if no error if (errorFlag == "OK") then db.save() local cacheResetProgram = db.getAttribute("environment", "name", "HW_CACHE_RESET", "value") util.appendDebugOut("Exec: " .. os.execute(cacheResetProgram)); end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) or statusCode web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "move") then local field, splitted, rows = web.cgiSearch(cgi, "FirewallRules") -- if any rows to delete if (rows) then errorFlag, statusCode = fwView.moveRules (rows, cgi["Rule.MoveTo"]) end -- save db if no error if (errorFlag == "OK") then db.save() local cacheResetProgram = db.getAttribute("environment", "name", "HW_CACHE_RESET", "value") util.appendDebugOut("Exec: " .. os.execute(cacheResetProgram)); end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) or statusCode web.goToPage(NextPage, true, true) else ?>
![]() Helpful Hints...
$| helpfullHints or '' |$
|