-- vim:set ft=lua:
dofile(mg.script_name:gsub('[^\\/]*$','')..'util.lua')
ct=CreateContentBuilder(GZIP_THRESHOLD_BYTE)
ct:Append([=[
]=])
srvIni='EpgTimerSrv.ini'
function GetItemList()
local esc=edcb.htmlEscape
edcb.htmlEscape=0
local pattern=EdcbSettingPath()..'\\*.ChSet4.txt'
edcb.htmlEscape=esc
local ret={}
for i,v in ipairs(edcb.FindFile(pattern,0) or {}) do
if not v.isdir then
local bon=v.name
local depth=0
while bon~='' do
if bon:find('%)$') then
depth=depth+1
elseif bon:find('%($') and depth>0 then
depth=depth-1
if depth==0 then
bon=bon:sub(0,#bon-1)
break
end
end
bon=bon:sub(0,#bon-1)
end
if bon~='' then
bon=bon..'.dll'
for j,w in ipairs(ret) do
if w.bon:upper()==bon:upper() then
bon=nil
break
end
end
if bon then
local epgCount=0
if edcb.GetPrivateProfile(bon,'GetEpg',1,srvIni)~='0' then
epgCount=tonumber(edcb.GetPrivateProfile(bon,'EPGCount',0,srvIni)) or 0
if epgCount==0 then epgCount=100 end
end
ret[#ret+1]={
bon=bon,
count=tonumber(edcb.GetPrivateProfile(bon,'Count',0,srvIni)) or 0,
epgCount=epgCount
}
end
end
end
end
local priority={}
for i,v in ipairs(ret) do
priority[i]=tonumber(edcb.GetPrivateProfile(v.bon,'Priority',0xFFFF,srvIni)) or 0xFFFF
end
for i=2,#priority do
for j=2,#priority do
if priority[j]
変更は許可されていません \n')
end
if post then
itemList=GetItemList()
item=mg.get_var(post,'item') or ''
for i,v in ipairs(itemList) do
if v.bon==item then
if mg.get_var(post,'count') then
v.count=GetVarInt(post,'count',0,99) or 0
v.epgCount=GetVarInt(post,'epgCount',0,100) or 0
ct:Append('