= 50) then statusMessage = "Can't add configuration to this table. Maximum limit reached." NextPage = "dmz_wan_rules" end end web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "addin") then configRowId = "-1" if(cgi["hdInCount"] ~= nil) then local hdCount = cgi["hdInCount"] if(tonumber(hdCount) >= 50) then statusMessage = "Can't add configuration to this table. Maximum limit reached." NextPage = "dmz_wan_rules" end end web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "edit") then configRowId = RowId web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "editin") then configRowId = RowId web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "delete") then local inputTable = web.cgiToLuaTable(cgi) local field, splitted, rows = web.cgiSearch(cgi, "FirewallOBServices") -- 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() end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "deletein") then local inputTable = web.cgiToLuaTable(cgi) local field, splitted, rows = web.cgiSearch(cgi, "FirewallIBServices") -- 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() end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "enable") then local inputTable = web.cgiToLuaTable(cgi) local field, splitted, rows = web.cgiSearch(cgi, "FirewallOBServices") -- if any rows to delete 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") end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "enablein") then local inputTable = web.cgiToLuaTable(cgi) local field, splitted, rows = web.cgiSearch(cgi, "FirewallIBServices") -- if any rows to delete 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") end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "disable") then local inputTable = web.cgiToLuaTable(cgi) local field, splitted, rows = web.cgiSearch(cgi, "FirewallOBServices") -- if any rows to delete 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") end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "disablein") then local inputTable = web.cgiToLuaTable(cgi) local field, splitted, rows = web.cgiSearch(cgi, "FirewallIBServices") -- if any rows to delete 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") end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) web.goToPage(NextPage, true, true) elseif (ButtonType and (ButtonType == "moveUp" or ButtonType == "moveUpin")) then --local inputTable = web.cgiToLuaTable(cgi) local rowId = RowId -- if any rows to delete if (ButtonType == "moveUp") then errorFlag, statusCode = fwView.moveRules_NG (rowId, "moveUp", "PUBLIC_INSECURE") else errorFlag, statusCode = fwView.moveRules_NG (rowId, "moveUp", "INSECURE_PUBLIC") 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 == "moveDown" or ButtonType == "moveDownin")) then --local inputTable = web.cgiToLuaTable(cgi) local rowId = RowId -- if any rows to delete if (ButtonType == "moveDown") then errorFlag, statusCode = fwView.moveRules_NG (rowId, "moveDown", "PUBLIC_INSECURE") else errorFlag, statusCode = fwView.moveRules_NG (rowId, "moveDown", "INSECURE_PUBLIC") 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 ?>