<!-- #include file="conn.asp" -->
<%
currentpage=cint(Request("pageIndex"))+1
if currentpage="" then
currentpage="1"
else
if currentpage<1 then
currentpage="1"
end if
end if
paix_zd = Request("sortField")
paix = Request("sortOrder")
set rs =server.createobject("ADODB.RecordSet")
sql="select * from project_data order by "&paix_zd&" "&paix&""
rs.open sql,conn,1,1
if not rs.eof then
rs.pagesize=Request("pageSize")
rs.absolutepage=currentpage
for currentrec=1 to rs.pagesize
if rs.eof then
exit for
end if
data="{""username"":"""&rs("username")&paix_zd&paix&""","&"""project_name"":"""&rs("project_name")&"""},"&data
rs.movenext
next
end if
if right(data,1)="," then
data=mid(data,1,len(data)-1)
end if
response.write "{""total"":"&rs.recordcount&",""data"":["&data&"]}"
%>