-- vim:set ft=lua:
dofile(mg.script_name:gsub('[^\\/]*$','')..'util.lua')
ct={title='予約一覧'}
if (not SIDE_PANEL) then
ct.css='\n'
ct.js='\n'
end
focus=nil
post=AssertPost()
if post then
focus=edcb.GetReserveData(GetVarInt(post,'del') or 0)
if focus then
edcb.DelReserveData(focus.reserveID)
ct.js=ct.js..''
end
end
edcb.htmlEscape=15
a=edcb.GetReserveData()
if not focus then
focus=GetVarInt(mg.request_info.query_string,'id')
focus=focus and BinarySearch(a,{reserveID=focus},CompareFields('reserveID'))
end
table.sort(a, function(a,b) return os.time(a.startTime) < os.time(b.startTime) end)
pageCount=tonumber(edcb.GetPrivateProfile('SET','PAGE_COUNT','30',INI))
if pageCount==0 then pageCount=#a end
if focus then
--focusの行を含むページを探す
focusIndex=BinarySearchBound(a,focus,function(a,b) return os.time(a.startTime)'
..'\n