WAN Mode Page to configure this page." end if (ButtonType and ButtonType == "config") then local inputTable = web.cgiToLuaTable(cgi) -- if not allowed to edit if (ACCESS_LEVEL ~= 0) then NextPage = "lan2_setup_ipv6" statusMessage = db.getAttribute("stringsMap", "stringId", "ADMIN_REQD", LANGUAGE) else configRowId = "-1" end --if add if(RowId == "-1") then if(cgi["hdCount"] ~= nil) then local hdCount = cgi["hdCount"] if(tonumber(hdCount) >= 24) then statusCode = "Can't add configuration to this table. Maximum limit reached." NextPage = "lan2_setup_ipv6" else errorFlag = "OK" local ifstatic = db.getRowsWhere("ifStatic","AddressFamily='10'") if(#ifstatic ~= 0) then local i = 0 for k,v in pairs(ifstatic) do i = i + 1 local ifstaticRow = ifstatic[i] if(ifstaticRow ~= nil) then if (inputTable["ifStaticAliasAddrTbl.StaticIp"] == ifstaticRow["ifStatic.StaticIp"]) then errorFlag, statusCode = "ERROR", "IP conflicting with "..ifstaticRow["ifStatic.LogicalIfName"] end end end end if (errorFlag == "OK") then errorFlag, statusCode = lanGroups.addLanMultiHoming (inputTable) -- save db if no error if (errorFlag == "OK") then db.save() else NextPage = "lan2_setup_ipv6" end else NextPage = "lan2_setup_ipv6" end end end 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, "ifStaticIPAliasChk") -- if any rows to delete if (rows) then errorFlag, statusCode = lanGroups.deleteLanMultiHoming (rows) 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 ?>