WAN Mode Page to configure this page." end if (ButtonType and ButtonType == "add") then local inputTable = web.cgiToLuaTable(cgi) configRowId = RowId configRow = db.getRow("USERDBUsers","_ROWID_", configRowId) inputTable["SSLVPNUserLoginPolicyDefinedAddress.UserName"] = configRow["USERDBUsers.UserName"] inputTable["SSLVPNUserLoginPolicyDefinedAddress.IPVersion"] = "10" if(inputTable["SSLVPNUserLoginPolicyDefinedAddress.AddressType"] == "0") then inputTable["SSLVPNUserLoginPolicyDefinedAddress.MaskLength"] = "128" end -- for add errorFlag, statusCode = sslAdmin.loginPolicyConfig (inputTable, "-1", "add") -- 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 == "delete") then local field, splitted, rows = web.cgiSearch(cgi, "SSLVPNUserLoginPolicyDefinedAddressChk") -- if any rows to delete if (rows) then errorFlag, statusCode = sslAdmin.loginPolicyConfig (rows, "-1", "delete") statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) end -- save db if no error if (errorFlag == "OK") then db.save() end configRowId = RowId web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "config") then local inputTable = web.cgiToLuaTable(cgi) configRowId = RowId configRow = db.getRow("USERDBUsers","_ROWID_", configRowId) if(configRow== nil) then errorFlag, statusCode = sslAdmin.loginPolicyConfig (inputTable, "-1", "add") else errorFlag, statusCode = sslAdmin.loginPolicyConfig (inputTable, configRowId, "edit") 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) else configRow = db.getRow("USERDBUsers","_ROWID_", configRowId) ?>