-- vim:set ft=lua: dofile(mg.script_name:gsub('[^\\/]*$','')..'util.lua') epg=mg.get_var(mg.request_info.query_string,'epg') week=mg.get_var(mg.request_info.query_string,'week') onid=GetVarInt(mg.request_info.query_string,'onid') or 0 tsid=GetVarInt(mg.request_info.query_string,'tsid') or 0 sid=GetVarInt(mg.request_info.query_string,'sid') or 0 eid=GetVarInt(mg.request_info.query_string,'eid') or 0 tab=GetVarInt(mg.request_info.query_string,'tab',0,4) or 0 page=GetVarInt(mg.request_info.query_string,'page',0,100000) or 0 date=GetVarInt(mg.request_info.query_string,'date',-10000,1000) or 0 hour=GetVarInt(mg.request_info.query_string,'hour',0,25) or week and 4 or 0 interval=GetVarInt(mg.request_info.query_string,'interval',0,100) or 25 CH_COUNT=GetVarInt(mg.request_info.query_string,'chcount') pageIndex=GetVarInt(mg.request_info.query_string,'chpage',0,100000) or 0 edcb.htmlEscape=15 post=AssertPost() aa={dataID=GetVarInt(mg.request_info.query_string,'id') or 0} if aa.dataID==0 then ct={title='EPG予約 新規追加'} aa.searchInfo=getSearchKey() else ct={title='EPG予約 条件変更'} for i,v in ipairs(edcb.EnumAutoAdd()) do if v.dataID==aa.dataID then aa=v break end end end if aa.searchInfo then si=aa.searchInfo if post then si=getSearchKey(post) end si.disableFlag=si.andKey:match('^^!{999}(.*)') si.caseFlag=(si.disableFlag or si.andKey):match('^C!{999}(.*)') ct.macro=true if aa.dataID==0 then redirect='autoaddepg.html'..(page~=0 and '?page='..page or '') end --コメントアウトを外すと追加後このURLに移動、ここで生成したURLはメンテナンスしてなく一部データが抜けてるかも --redirect=(week and 'epgweek.html?onid='..onid..'&tsid='..tsid..'&sid='..sid..(hour~=4 and '&hour='..hour or '') or epg and 'epg.html?tab='..tab..'&date='..date..(hour~=0 and '&hour='..hour or '')..(pageIndex~=0 and '&chpage='..pageIndex or '')..(CH_COUNT and '&chcount='..CH_COUNT or '') or redirect)..(interval~=25 and '&interval='..interval or '') ct.main='
\n' ..'
\n
' ..'\n' ..'
\n' ..'
\n' ..'
自動予約無効
\n' ..'
\n' ..'\n' ..'
\n\n' ..SerchTemplate(si) ..'
\n' ..'
\n
' ..'
プリセット
\n' ..'
\n' if rs then ct.main=ct.main..'' ..'\n' ..RecSettingTemplate(rs) end ct.main=ct.main..'
\n
\n' if aa.dataID~=0 then ct.main=ct.main..'\n' end ct.main=ct.main..'
\n' ..'
\n' ..(aa.dataID~=0 and '
\n' or '') ..'
\n' ..'
\n
\n
\n' ct.tab='検索条件\n' ..'録画設定\n' end 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'))