-- 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='0 and 'href=\"recinfo.html?page=0"' or 'disabled')..'>first_page\n'
pg=pg..'0 and 'href=\"recinfo.html?page='..(pageIndex-1)..'"' or 'disabled')..'>chevron_left\n'
n=pageIndex>(#a/PAGE_COUNT-2) and math.floor(#a/PAGE_COUNT)-4 or math.max(0,pageIndex-2)
for i=n, n+4 do
pg=pg..(i>=0 and i<#a/PAGE_COUNT and ''..(i+1)..'\n' or '')
end
pg=pg..'chevron_right\n'
pg=pg..'last_page\n'
pg='
\n'..pg..'
\n'
end
ct.main='\n'
if sidePanel then
ct.main=ct.main..[=[
\n'
ctt={}
for i=pageIndex*PAGE_COUNT+1,math.min(#a,(pageIndex+1)*PAGE_COUNT) do
v=a[i]
bg=v.drops>0 and ' drops'
or v.scrambles>0 and ' scrambles' or ''
table.insert(ctt, '