= tonumber (maxLimitVal)) then statusMessage = "Can't add configuration to this table. Maximum limit reached." NextPage = "lan_setup" end end end web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "edit") then if (ACCESS_LEVEL ~= 0) then NextPage = "lan_setup" statusMessage = db.getAttribute("stringsMap", "stringId", "ADMIN_REQD", LANGUAGE) else configRowId = RowId end web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "delete") then if (ACCESS_LEVEL ~= 0) then NextPage = "lan_setup" statusMessage = db.getAttribute("stringsMap", "stringId", "ADMIN_REQD", LANGUAGE) else local inputTable = web.cgiToLuaTable(cgi) statusCode ="JOG" local field, splitted, rows = web.cgiSearch(cgi, "vlanChk") -- if any rows to delete if (rows) then db.beginTransaction () errorFlag, statusCode = vlanConfig.vlanDeleteWr (rows) if(errorFlag == "OK") then db.commitTransaction (true) else db.rollback () end end -- save db if no error if (errorFlag == "OK") then db.save() end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) or statusCode end web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "enable") then if (ACCESS_LEVEL ~= 0) then NextPage = "lan_setup" statusMessage = db.getAttribute("stringsMap", "stringId", "ADMIN_REQD", LANGUAGE) else local inputTable = web.cgiToLuaTable(cgi) statusCode ="JOG" local field, splitted, rows = web.cgiSearch(cgi, "vlanChk") -- if any rows to delete if (rows) then db.beginTransaction () errorFlag, statusCode = vlanConfig.vlanModify(rows, "enable") if(errorFlag == "OK") then db.commitTransaction () else db.rollback () end 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) end web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "disable") then if (ACCESS_LEVEL ~= 0) then NextPage = "lan_setup" statusMessage = db.getAttribute("stringsMap", "stringId", "ADMIN_REQD", LANGUAGE) else local inputTable = web.cgiToLuaTable(cgi) statusCode ="JOG" local field, splitted, rows = web.cgiSearch(cgi, "vlanChk") -- if any rows to delete if (rows) then errorFlag, statusCode = vlanConfig.vlanModify(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) end web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "defvlan") then if (ACCESS_LEVEL ~= 0) then NextPage = "lan_setup" statusMessage = db.getAttribute("stringsMap", "stringId", "ADMIN_REQD", LANGUAGE) else local inputTable = web.cgiToLuaTable(cgi) errorFlag, statusCode = vlanConfig.vlanDefVlan(inputTable) if (errorFlag == "OK") then db.save() end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) end web.goToPage(NextPage, true, true) else configRow["VlanPortMgmt.DefPort1"] = db.getAttribute("VlanPortMgmt","PortName","Port1","DefaultPVID") or '' configRow["VlanPortMgmt.DefPort2"] = db.getAttribute("VlanPortMgmt","PortName","Port2","DefaultPVID") or '' configRow["VlanPortMgmt.DefPort3"] = db.getAttribute("VlanPortMgmt","PortName","Port3","DefaultPVID") or '' configRow["VlanPortMgmt.DefPort4"] = db.getAttribute("VlanPortMgmt","PortName","Port4","DefaultPVID") or '' local vlans = db.getRowsWhere("vlan","portName='dummy'") configPort = db.getAttribute ("ConfigPort","_ROWID_","1","LogicalIfName") if (configPort == nil) then configPort = "" end grayout = "" if (configPort ~= nil and configPort ~= "LAN") then grayout = "disabled" end ?> $|COMPANY_NAME|$ $|PRODUCT_FAMILY|$ - LAN Setup
 
LAN Setup
 
IPv6
IPv4
 
 
$| statusMessage |$
VLAN Profiles
  ! Profile Name VLAN ID Subnet IP DHCP Status Action
$| vlan["vlanName"] or ''|$ $| vlanId or '' |$ $| row["ifStatic.StaticIp"] or '' |$/$| row["ifStatic.NetMask"] or '' |$ $| dhcpStatus |$
Default VLAN
Port1 Port2 Port3 Port4/DMZ