<% --[[ Sessions.htm (Charging_points module) ]]-- local chp = require "luci.model.charging_points" local uci = require "luci.model.uci" local fs = require "nixio.fs" local cur = uci.cursor("/etc/config", "/tmp/.config") ---------------------- -- Poste seleccionado ---------------------- local path = luci.dispatcher.context.requestpath local user, serialnumber, hw_model = chp.whoami(path) local parameters = {} local sections = {} local unitID = string.match(path[#path], "sessions(%d+)") local nserie = 0 if not unitID then unitID = 0 else nserie = path[#path-1] end local user = path[1] local today = os.date("*t") variables = {} variables[0] = { name = translate("From") } variables[1] = { name = translate("To") } local style = true -%> <%+header%>

<%:Dump info%><%: - %><%=serialnumber%>

<%:Select date range.%>
<% for index = 0, #variables, 1 do %> <% style = not style; end %>
<%:%> <%:Day%> <%:Month%> <%:Year%>
<%=translate(variables[index].name)%>


<%+footer%>