WAN Mode Page to configure this page." end if(ButtonType and ButtonType == "configIPv6") then local inputTable = web.cgiToLuaTable(cgi) local rowid = '' DBTable = "FirewallRules6" rowid = db.getAttribute(DBTable, "RuleType", "DEFAULT_POLICY", "_ROWID_") errorMsg = "Default IPv6 outbound rule not found for Firewall Rules." if (rowid ~= nil) then errorFlag, statusCode = fwView.defaultPolicyConfig(inputTable, rowid, "edit") statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) else errorFlag = "ERROR" statusMessage = errorMsg end -- save db if no error if (errorFlag == "OK") then db.save() end web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "addIPv6") then configRowId = "-1" if(cgi["hdCount"] ~= nil) then local hdCount = cgi["hdCount"] if(tonumber(hdCount) >= tonumber (maxLimitOutVal)) then statusMessage = "Can't add configuration to this table. Maximum limit reached." NextPage = "lan_wan_rules_v6" end end web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "addinIPv6") then configRowId = "-1" if(cgi["hdInCount"] ~= nil) then local hdCount = cgi["hdInCount"] if(tonumber(hdCount) >= tonumber (maxLimitInVal)) then statusMessage = "Can't add configuration to this table. Maximum limit reached." NextPage = "lan_wan_rules_v6" end end web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "editIPv6") then configRowId = RowId web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "editinIPv6") then configRowId = RowId web.goToPage(NextPage, true, true) elseif (ButtonType and (ButtonType == "deleteIPv6" or ButtonType == "deleteinIPv6")) then local field, splitted, rows = web.cgiSearch(cgi, "FirewallOBServices_IPv6") if(ButtonType == "deleteIPv6") then field, splitted, rows = web.cgiSearch(cgi, "FirewallOBServices_IPv6") elseif(ButtonType == "deleteinIPv6") then field, splitted, rows = web.cgiSearch(cgi, "FirewallIBServices_IPv6") end -- if any rows to delete if (rows) then errorFlag, statusCode = fwView.modifyRules6 (rows, "delete") 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 == "enableIPv6" or ButtonType == "enableinIPv6")) then local field, splitted, rows = web.cgiSearch(cgi, "FirewallOBServices_IPv6") if(ButtonType == "enableIPv6") then field, splitted, rows = web.cgiSearch(cgi, "FirewallOBServices_IPv6") elseif(ButtonType == "enableinIPv6") then field, splitted, rows = web.cgiSearch(cgi, "FirewallIBServices_IPv6") end -- if any rows to delete if (rows) then errorFlag, statusCode = fwView.modifyRules6 (rows, "enable") end -- save db if no error if (errorFlag == "OK") then db.save() local cacheResetProgram = db.getAttribute("environment", "name", "HW_CACHE_RESET", "value") end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) or statusCode web.goToPage(NextPage, true, true) elseif (ButtonType and (ButtonType == "disableIPv6" or ButtonType == "disableinIPv6")) then local field, splitted, rows = web.cgiSearch(cgi, "FirewallOBServices_IPv6") if(ButtonType == "disableIPv6") then field, splitted, rows = web.cgiSearch(cgi, "FirewallOBServices_IPv6") elseif(ButtonType == "disableinIPv6") then field, splitted, rows = web.cgiSearch(cgi, "FirewallIBServices_IPv6") end -- if any rows to delete if (rows) then errorFlag, statusCode = fwView.modifyRules6 (rows, "disable") end -- save db if no error if (errorFlag == "OK") then db.save() local cacheResetProgram = db.getAttribute("environment", "name", "HW_CACHE_RESET", "value") end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) or statusCode web.goToPage(NextPage, true, true) elseif (ButtonType and (ButtonType == "moveRule" or ButtonType == "moveRuleIn")) then local inputTable = web.cgiToLuaTable (cgi) ruleType = 'SECURE_INSECURE' tableName = 'FirewallOBServices_IPv6' position = inputTable["FirewallRules6.position"] or '1' if (ButtonType == "moveRuleIn") then ruleType = 'INSECURE_SECURE' tableName = 'FirewallIBServices_IPv6' position = inputTable["FirewallRules6.positionIn"] or '1' end local field, splitted, rows = web.cgiSearch (cgi, tableName) if (rows and rows["1"]) then rowId = rows["1"] -- if any rows to move errorFlag, statusCode = fwView.moveRules6_NG (rowId, "move", ruleType, position) 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) else local firewallRules6_Action = db.getAttribute("FirewallRules6", "RuleType", "DEFAULT_POLICY", "Action") or '' ?>