<% if _SESSION["logined"] ~= nil then local domain = _POST["domain"] local page = _POST["page"] local filters = _POST["filters"] or "" if filters == "" then filters = "1=1 order by f_id desc" end if (_SESSION["admin_readonly"] ~= nil and _SESSION["admin_readonly"] == 1) or (_SESSION["admin_domainadmin"] ~= nil and _SESSION["admin_domainadmin"] == 1) then filters = "1=1 order by f_id desc" end if string.find(domain,"'") then exit() end local liststr = "" local totalrecords = 0 local totalpages = 0 local result = c_DoSQL("select count(*) from wftp_dblogs where f_domain='"..domain.."' and "..filters.." limit 1") for _,row in pairs(result) do totalrecords = row[0] end totalpages = (totalrecords/100)+1 liststr = totalpages.."\n" result = c_DoSQL("select * from wftp_dblogs where f_domain='"..domain.."' and "..filters.." limit 100 offset "..(tonumber(page)-1)*100) for _,row in pairs(result) do local temp = "" temp = temp..row[0].."||"..row[1].."||"..row[2].."||"..row[3].."||"..row[4].."||"..row[5].."||"..row[6].."||"..row[7].."||"..row[8].."||"..row[9].."||"..row[10].."||"..row[11].."||"..row[12].."||".."\n" liststr = liststr..temp end print(liststr) end %>