-- vim:set ft=lua:
dofile(mg.script_name:gsub('[^\\/]*$','')..'util.lua')

ct={title='録画結果'}

edcb.htmlEscape=15
a=edcb.GetRecFileInfoBasic()
table.sort(a, function(a,b) return os.time(a.startTime) > os.time(b.startTime) end)

pageIndex=GetVarInt(mg.request_info.query_string,'page',0,100000) or 0
PAGE_COUNT=tonumber(edcb.GetPrivateProfile('SET','PAGE_COUNT','30',ini))
if PAGE_COUNT==0 then PAGE_COUNT=#a end

if math.ceil((#a/PAGE_COUNT)-1)>0 then
  pg='<a class="mdl-button mdl-js-butto