/tmp/tmpTimeContainer") local f = assert(io.open("/tmp/tmpTimeContainer", "r")) local currentTime = f:read("*line") f:close() local currentDate = util.date() -- for error if (errorFlag ~= nil and errorFlag ~= "OK") then configRowId = RowId configRow = db.getRow("ntp", "ntp._ROWID_", configRowId) --get from db again configRow = util.tableAppend(configRow, web.cgiToLuaTable(cgi)) --overwrite with user input if (configRow["ntp.enabled"] == "0") then -- if 2nd part (time) enabled currentDate["month"] = configRow["ntp.month"] currentDate["date"] = configRow["ntp.date"] currentDate["year"] = configRow["ntp.year"] currentDate["hours"] = configRow["ntp.hours"] currentDate["minutes"] = configRow["ntp.minutes"] currentDate["seconds"] = configRow["ntp.seconds"] end -- for edit else configRowId = "1" configRow = db.getRow("ntp", "ntp._ROWID_", configRowId) if (configRow["ntp.enabled"] == "0") then -- if 2nd part (time) enabled currentDate["month"] = configRow["ntp.month"] currentDate["date"] = configRow["ntp.date"] currentDate["year"] = configRow["ntp.year"] currentDate["hours"] = configRow["ntp.hours"] currentDate["minutes"] = configRow["ntp.minutes"] currentDate["seconds"] = configRow["ntp.seconds"] end end ?>
Helpful Hints...
$| helpfullHints or '' |$
|