日期:2014-05-16 浏览次数:21128 次
<!--#include file="conn.asp"-->
<%
pages = 50
set rs=server.createobject("adodb.recordset")
sql="select * from [user] WHERE usernum Is Not Null"
if request("show")<>"yes" then sql=sql+usersql
sql=sql+" order by UserQQ"
rs.open sql,conn,1,3
if rs.eof and rs.bof then
response.write "<tr><td colspan=7 align=center height=50><font color=red>暂时没有学生</font></td></tr>"
'response.end
else
totalrs=rs.RecordCount
rs.pageSize = pages
allPages = rs.pageCount
page = Request("page")
If not isNumeric(page) then page=1
if isEmpty(page) or int(page) <=1 then
page = 1
elseif int(page) > allPages then
page = allPages
end if
rs.AbsolutePage = page
%>
<Table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td><%
response.write "<br> 总人数<font color=red>"&totalrs&"</font>"
%>
</td></tr> <tr>
<% i=1
Do While Not rs.eof and pages>0
usertype=rs("usertype")
if usertype="2" then
usertype="管理员"
elseif usertype="3" then
usertype="班长"
elseif usertype="4" then
usertype="副班长"
elseif usertype="5" then
usertype="团支书"
elseif usertype="6" then
usertype="委员级别"
else
usertype="普通学生"
end if
%>
<Td>
<TABLE id=AutoNumber2 style=" bgcolor="#FFFFFF" cellSpacing=0 cellPadding=0 width=276 border=0>
<tr><td width="8%" ><td> <td width="32%" > <%=rs("UserName")%></td>
<td><%=split(rs("HomePhone")," ")(0)%></td>
</tr></table>
<Td>
<%if i mod 2 <>0 then%>
<%end if%>
<% if i mod 2 =0 then%>
</Tr>
<Tr>
<%end if%>
<%
rs.movenext
pages = pages - 1
i=i+1
if rs.eof then exit do
loop
end if
%>
</Tr>
</Table>
<%
rs.close
set rs=nothing
%>