-- vim:set ft=lua: dofile(mg.script_name:gsub('[^\\/]*$','')..'epg.lua') show=mg.get_var(mg.request_info.query_string,'show') tab=GetVarInt(mg.request_info.query_string,'tab',0,#NetworkIndex()) or 0 date=GetVarInt(mg.request_info.query_string,'date',-10000,1000) or 0 hour=GetVarInt(mg.request_info.query_string,'hour',-1,27) or -1 --hour=-1で現在時刻-MARGIN_HOUR時間を基準 interval=GetVarInt(mg.request_info.query_string,'interval',0,100) or DEF_interval CH_COUNT=GetVarInt(mg.request_info.query_string,'chcount') or DEF_CH_COUNT pageIndex=GetVarInt(mg.request_info.query_string,'page',0,100000) or 0 baseDate=math.floor((now+timezone-4*3600)/24/3600) if date==0 then m={(mg.get_var(mg.request_info.query_string,'date') or ''):match('^(%d%d%d%d)%-(%d?%d)%-(%d?%d)$')} if #m==3 then date=math.floor(os.time({year=m[1],month=m[2],day=m[3]})/24/3600)-baseDate end end Hour=hour<0 and math.floor((((now+timezone)%(24*3600))/3600)-MARGIN_HOUR)%24 or hour if Hour<4-(hour<0 and MARGIN_HOUR or 0) then Hour=Hour+24 end pageDate=baseDate+date pageTime=(pageDate*24+Hour)*3600 Date=os.date('!*t', pageDate*24*3600) NOW=pageTimeminTime and minTime or os.time(mmt.minTime) minTime_=minTime_ and os.time(mmt.minTime)>minTime_ and minTime_ or os.time(mmt.minTime) maxTime=maxTime and os.time(mmt.maxTime)minTime and minTime or os.time(mmt.minTime) maxTime=maxTime and os.time(mmt.maxTime)div>div:first-child").each(function(){'..(date==0 and 'end($(this), true);});jump();' or 'end($(this));});')..'setInterval("line()", 1000);});' or ''),(NOW and pageTime+(interval*3600)-timezone or false)), progres=true, macro=sidePanel, dialog={{ id='suspend', button='
' }} } ct.subheader='
\n' ..'
\n' ct.menu=ct.menu..'
\n' end end if minTime then if minTime+timezone>=pageTime then prev='disabled' else prev='href="epg.html'..hrefGene(pageTime-(interval==25 and 24-(hour<0 and MARGIN_HOUR or 0) or interval)*3600)..'"' end if maxTime+timezonechevron_left\n' ..'
\n' ..'
\n' --[[ ct.menu=ct.menu..'