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

# プログラム予約条件一覧

]=]) for i=page*pageCount+1,math.min(#a,(page+1)*pageCount) do ct:Append('
'..a[i].title..' | ') for j=1,7 do if a[i].dayOfWeekFlag%2==1 then ct:Append(({'日','月','火','水','木','金','土'})[j]) end a[i].dayOfWeekFlag=math.floor(a[i].dayOfWeekFlag/2) end endTime=(a[i].startTime+a[i].durationSecond)%(24*3600) ct:Append((' | %02d:%02d:%02d ～ %02d:%02d:%02d'):format(math.floor(a[i].startTime/3600),math.floor(a[i].startTime/60)%60,a[i].startTime%60, math.floor(endTime/3600),math.floor(endTime/60)%60,endTime%60) ..' | '..a[i].stationName ..' | '..(RecModeTextList()[(a[i].recSetting.recMode~=5 and a[i].recSetting.recMode or a[i].recSetting.noRecMode or 1)+1] or '') ..' | '..a[i].recSetting.priority..'
\n') end ct:Append([=[

新規追加
]=]) ct:Finish() mg.write(ct:Pop(Response(200,'text/html','utf-8',ct.len,ct.gzip)..'\r\n'))