<% if _SESSION["logined"] ~= nil then local domain = _POST["domain"] local page = _POST["page"] local filters = _POST["filters"] or "" if filters == "" then filters = "1=1" 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" 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.." order by f_id asc limit 100 offset "..(tonumber(page)-1)*100) for _,row in pairs(result) do local temp = "" temp = temp..row[0].."||" temp = temp..row[1].."||" temp = temp..row[2].."||" temp = temp..row[3].."||" temp = temp..row[4].."||" temp = temp..row[5].."||" temp = temp..row[6].."||" temp = temp..row[7].."||" temp = temp..row[8].."||" temp = temp..row[9].."||" temp = temp..row[10].."||" temp = temp..row[11].."||" temp = temp..row[12].."||" temp = temp.."\n" liststr = liststr..temp end print(liststr) end %>