-- vim:set ft=lua: dofile(mg.script_name:gsub('[^\\/]*$','')..'util.lua') oneseg=tonumber(edcb.GetPrivateProfile('GUIDE','oneseg',false,ini))~=0 webPanel=mg.get_var(mg.request_info.query_string,'webpanel') ct={ title='放送中', video='live', js='
\n' ..'
\n', progres=true, macro=sidePanel } if webPanel then ct.css='
' end rt={} for i,v in ipairs(edcb.GetReserveData()) do rt[v.onid..'-'..v.tsid..'-'..v.sid..'-'..v.eid]=v.reserveID end ct.main='
\n' ..(sidePanel and sidePanelTemplate() or '') ..'
\n' edcb.htmlEscape=15 NetworkList={} for i,v in ipairs(NetworkIndex()) do NetworkList[i]={} end now=os.time() for i,v in ipairs(CustomServiceList()) do if (oneseg or not v.partialReceptionFlag) and not v.subCh then x={eid=0, startTime=os.date('*t',now)} y=x b=edcb.EnumEventInfo({{onid=v.onid, tsid=v.tsid, sid=v.sid}}, {startTime=os.date('*t',now-12*3600), durationSecond=24*3600}) or {} table.sort(b, function(a,b) return os.time(a.startTime)\n' ..'' ..'' or '>tv')..''..v.service_name ..'\n' ..''..os.date('%H:%M', x_startTime)..'～'..os.date('%H:%M', x_endTime)..''..(x.shortInfo and ConvertTitle(x.shortInfo.event_name) or '')..'\n' ..''..os.date('%H:%M', y_startTime)..'～'..(y_endTime and os.date('%H:%M', y_endTime) or '未定')..''..(y.shortInfo and ConvertTitle(y.shortInfo.event_name) or '')..'\n' ..'' ..(webPanel and '' or '
\n') ..'
' ..'\n' ) end end ctt={} ct.tab='' for i,v in ipairs(NetworkList) do if #v>0 then ct.tab=ct.tab..''..NetworkIndex()[i]..'\n' table.insert(ctt, '

\n'..table.concat(v)..'

\n') end end ct.main=ct.main..table.concat(ctt)..'
\n' ct=template(ct) mg.write(ct:Pop(Response(200,'text/html','utf-8',ct.len)..(ct.gzip and 'Content-Encoding: gzip\r\n' or '')..'\r\n'))