WAN Mode Page to configure this page." end if (ButtonType and ButtonType == "config") then local inputTable = web.cgiToLuaTable(cgi) --automation part begin local tableIndex = 1 local errorFlag = "OK" errorFlag, statusCode = wan.wan6AdvConfigSet(inputTable, RowId, "edit") -- save db if no error if (errorFlag == "OK") then db.save() end -- save db if no error if (errorFlag == "OK") then STATUS_CLASS = SUCCESS_CLASS db.save() elseif (errorFlag == "ERROR") then STATUS_CLASS = ERROR_CLASS else STATUS_CLASS = INFO_CLASS end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) or statusCode web.goToPage(NextPage, true, true) else if (errorFlag ~= "OK" or configRowId == "-1") then configRowId = RowId end configRow = db.getRowWhere ("WanFailure", "LogicalIfName = '" .. wanName .. "' AND AddressFamily = 10") if (wanName == "WAN2") then configRowId = "2" else configRowId = "1" end ?>