= 3) then statusMessage = "Can't add configuration to this table. Maximum limit reached." NextPage = "certificates" else -- update Configuration errorFlag, statusCode = x509.genSelfCert (inputTable) -- save db if no error if (errorFlag == "OK") then db.save() else NextPage = "certificates" end statusMessage = db.getAttribute("stringsMap", "stringId", statusCode, LANGUAGE) or '' end web.goToPage(NextPage, true, true) elseif (ButtonType and ButtonType == "cadelete") then local field, splitted, rows = web.cgiSearch(cgi, "cert") -- if any rows to delete if (rows) then errorFlag, statusCode = x509.trustedCACertDelete (rows) 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) elseif (ButtonType and ButtonType == "selfdelete") then local field, splitted, rows = web.cgiSearch(cgi, "cert") -- if any rows to delete if (rows) then errorFlag, statusCode = x509.activeSelfCertDelete (rows) 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) elseif (ButtonType and ButtonType == "scrdelete") then local field, splitted, rows = web.cgiSearch(cgi, "x509SelfCertReq") -- if any rows to delete if (rows) then errorFlag, statusCode = x509.selfCertDelete (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) elseif (ButtonType and ButtonType == "crlDelete") then local field, splitted, rows = web.cgiSearch(cgi, "x509Crl") -- if any rows to delete if (rows) then errorFlag, statusCode = x509.crlCertDelete (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) elseif (ButtonType and ButtonType == "crlupload") then local inputTable = web.cgiToLuaTable(cgi) -- upload CRL file errorFlag, statusCode = x509.uploadCRLCert(inputTable) -- 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 == "crlDelete") then local field, splitted, rows = web.cgiSearch(cgi, "x509Crl") -- if any rows to delete if (rows) then errorFlag, statusCode = x509.crlCertDelete (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 ?>