WAN Mode Page to configure this page." clasName = "floatRight toggletext_dis" dis_status = "disabled" end if (ButtonType and ButtonType == "add") then configRowId = "-1" if(cgi["hdCount"] ~= nil) then local hdCount = cgi["hdCount"] if(tonumber(hdCount) >= 125) then statusMessage = "Can't add configuration to this table. Maximum limit reached." NextPage = "vpn_policies_IPv6" end end web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "edit") then configRowId = RowId web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "enable") then local field, splitted, rows = web.cgiSearch(cgi, "IpsecVPNPolicy") -- if any rows to enable if (rows) then errorFlag, statusCode = vipSecure.ipsecVPNPolicyEnable(rows, true) 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 == "disable") then local field, splitted, rows = web.cgiSearch(cgi, "IpsecVPNPolicy") -- if any rows to disable if (rows) then errorFlag, statusCode = vipSecure.ipsecVPNPolicyEnable(rows, false) 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 == "delete") then local field, splitted, rows = web.cgiSearch(cgi, "IpsecVPNPolicy") -- if any rows to delete if (rows) then errorFlag, statusCode = vipSecure.ipsecVPNPolicyDelete(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 ?>