    <!-- #include file="conn.asp" -->
<html>
<head>
<title>武汉家教网（学员信息列表）-我要找家教工作！</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css.css" type="text/css">
</head>
<BODY LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0><div align="center">
<!-- #include file="head.asp" -->
    <table width="778" height="30" border="0" cellpadding="0" cellspacing="0" bgcolor="FBFCED">
      <tr>
        <td height="30" valign="bottom">&nbsp;&nbsp;&nbsp;<strong>当前位置</strong>：【<a href="http://www.whjiajiao.com" title="www.whjiajiao.com"><font color=red><b>武汉家教网</b></font></a>】 → <a href="../index.asp">首页</a> → 教员库</td>
      </tr>
      <tr>
        <td align="center" valign="bottom"><img src="../IMAGES/line.gif" width="730" height="2"></td>
      </tr>
    </table>
    <TABLE WIDTH=778 BORDER=0 CELLPADDING=0 CELLSPACING=0 bgcolor="FBFCED">
              <TR>
                <TD align="center"><br>                <table width="90%"  border="0" cellpadding="3" cellspacing="1" bgcolor="#000066">
<tr align="center" bgcolor="#FFCC33">
                      <td width="10%"> 家长称呼<br></td>
                      <td width="12%"> 联系电话</td>
                      <td width="18%">地址</td>
                      <td width="50%">留言内容</td>
                      <td width="10%">预约日期</td>
		    </tr>
                  <%
page=request.querystring("page")
DIM totalPut
DIM CurrentPage
DIM TotalPages
DIM i,j
const MaxPerPage=20
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
dim rs
dim sql
set rs=server.createobject("adodb.recordset")
sql = "select * from reply where types=yes and infoid=" & session("tch_id") & " order by id desc"
rs.open sql,conn,1,1 
if rs.eof and rs.bof then 
response.write "<p align='center'>对不起，您暂时还没有被任何家长预约！</p>" 
else 
totalPut=rs.recordcount 
if currentpage<1 then 
currentpage=1 
end if 
if (currentpage-1)*MaxPerPage>totalput then 
if (totalPut mod MaxPerPage)=0 then 
currentpage= totalPut \ MaxPerPage 
else 
currentpage= totalPut \ MaxPerPage + 1 
end if 
end if 
if currentPage=1 then 
showContent totalput,MaxPerPage
showpage totalput,MaxPerPage,"yuyue.asp"
else 
if (currentPage-1)*MaxPerPage<totalPut then 
rs.move (currentPage-1)*MaxPerPage 
dim bookmark 
bookmark=rs.bookmark 
showContent totalput,MaxPerPage
showpage totalput,MaxPerPage,"yuyue.asp"
else 
currentPage=1 
showContent totalput,MaxPerPage
showpage totalput,MaxPerPage,"yuyue.asp"
end if 
end if 
rs.close 
end if 
set rs=nothing
sub showContent (totalput,MaxPerPage)
do while not rs.eof
%>

                    <tr class="hand" align="center" bgcolor="#FDFEF5" onmouseover="this.style.backgroundColor='eff7ff'" onmouseout="this.style.backgroundColor='#FDFEF5'">
                      <td><%=left(rs("iname"),11)%></td>
                      <td><%=rs("tel")%></td>
                      <td><%=rs("add")%></td>
                      <td><%=rs("content")%></td>
                      <td><%=int(rs("idate"))%></td>
				    </tr>
   
                  <% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
</table>
<%
end sub
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then 
n= totalnumber \ maxperpage 
else 
n= totalnumber \ maxperpage+1 
end if 
if CurrentPage<2 then 
response.write "<table border=0 width=80% cellspacing=0 cellpadding=0>" 
response.write "<tr height=50>"
response.write "<td>"
response.write "共<font color=#ff6600><b>"&n&"</b></font>页&nbsp;第<font color=#ff6600><b>"&CurrentPage&"</b></font>页&nbsp;共检索到<font color=#ff6600><b>"&totalnumber&"</b></font>条信息</td>" 
response.write "<td align=right>"
response.write "【最前页】【上一页】" 
else 
response.write "<table border=0 width=90% cellspacing=0 cellpadding=0>"
response.write "<tr height=30>"
response.write "<td>"
response.write "共<font color=#ff6600><b>"&n&"</b></font>页&nbsp;第<font color=#ff6600><b>"&CurrentPage&"</b></font>页&nbsp;共检索到<font color=#ff6600><b>"&totalnumber&"</b></font>条信息</td>"
response.write "<td align=right>"
response.write "【<a href="&filename&"?page=1>最前页</a>】" 
response.write "【<a href="&filename&"?page="&CurrentPage-1&">上一页</a>】" 
end if 
if n-currentpage<1 then 
response.write "【下一页】【最后页】" 
else 
response.write "【<a href="&filename&"?page="&(CurrentPage+1)&">" 
response.write "下一页</a>】【<a href="&filename&"?page="&n&">最后页</a>】" 
end if 
response.write "</td>"
response.write "</tr>"
response.write "</table>"
end function
%></TD></TR>
  </TABLE>
    <TABLE WIDTH=778 BORDER=0 CELLPADDING=0 CELLSPACING=0 bgcolor="FBFCED">
      <TR>
        <TD align="center">&nbsp;</TD>
      </TR>
    </TABLE>
    <!-- #include file="foot.asp" -->
  </div>
</body>
</html>