<!-- #include file="conn.asp" -->
<!-- #include file="inc.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.whjjw.com" title="www.whjjw.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">                  <table width="100%" height="50" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td align="center">

<table width="90%"border="1" cellpadding="5" cellspacing="0" bgcolor="#FFFFDD" borderColorLight=#000066 borderColorDark=#ffffff>
                      <form name="form1" method="post" action="teacher.asp">
                        <tr align="center">
                          <td bgcolor="#FEF49C">教员搜索</td>
                          <td><input name="key" type="text" value="<%=request("key")%>" size="40"></td>
                          <td><select name="types">
                              <option value="">不限</option>
                              <option value="1">在校学生</option>
                              <option value="2">在职教师</option>
                              <option value="3">专长人士</option>
                          </select></td>
                          <td><input name="Submit" type="submit" class="input2" value="提交"></td>
                          <td bgcolor="#FFF79C"><a href="teacher.asp">教员库</a></td>
                          <td bgcolor="#FFF79C"><a href="teacher.asp?types=2">教师库</a></td>
                        </tr>
                      </form>
                    </table></td>
                  </tr>
                </table>
<table width="90%"border="1" cellpadding="3" cellspacing="0" bgcolor="#FDFEF5" borderColorLight=#000066 borderColorDark=#ffffff>
<tr align="center" bgcolor="#FFCC33">
                      <td width="7%">编号</td>
                      <td width="15%">教员类型</td>
                      <td>可教授课程</td>
                      <td width="9%">姓名</td>
                      <td width="6%">性别</td>
                      <td width="22%">学校</td>
                      <td width="12%">发布日期</td>
					  <td width="4%">&nbsp;</td>
          </tr>
                  <%
page=request.querystring("page")
key=request("key")
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
types=request("types")
set rs=server.createobject("adodb.recordset")
sql = "select * from teacher where iname<>'-' and pas=yes"
if types<>"" then
sql = sql & " and types=" & types
end if
if key<>"" then
sql = sql & " and teach & school & content & id & iname & tel like '%" & key & "%'"
end if
sql = sql & " order by top_used desc,idate desc"
rs.open sql,conn,1,1 
if rs.eof and rs.bof then 
response.write "<p align='center'>对不起，没有您要查询的[ <font style='font-weight:bold;color:red'>"&key&"</font> ]的信息</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,"teacher.asp"
else 
if (currentPage-1)*MaxPerPage<totalPut then 
rs.move (currentPage-1)*MaxPerPage 
dim bookmark 
bookmark=rs.bookmark 
showContent totalput,MaxPerPage
showpage totalput,MaxPerPage,"teacher.asp"
else 
currentPage=1 
showContent totalput,MaxPerPage
showpage totalput,MaxPerPage,"teacher.asp"
end if 
end if 
rs.close 
end if 
set rs=nothing
sub showContent (totalput,MaxPerPage)
do while not rs.eof
if rs("types")=1 then
if rs("edu")="-" then edu="" else edu=rs("edu") end if
msg=edu & "在校学生"
elseif rs("types")=2 then
msg=left(rs("spec"),2) & rs("shenfen") & "教师"
else
msg=rs("spec")
end if
if rs("vip")=True then
%>
                    <tr class="hand" bgcolor="#eff7ff" align="center" onmouseover="this.style.backgroundColor='#C4E3FF'" onmouseout="this.style.backgroundColor='#eff7ff'" onClick="window.open('tch_info.asp?id=<%=makeid("tch","out",rs("id"))%>')">
<% Else %>
                    <tr class="hand" align="center" onmouseover="this.style.backgroundColor='#eff7ff'" onmouseout="this.style.backgroundColor='#FDFEF5'" onClick="window.open('tch_info.asp?id=<%=makeid("tch","out",rs("id"))%>')">
<% End If %>
                      <td><%=makeid("tch","out",rs("id"))%></td>
                      <td><%=Replace(left(msg,6),key,"<span style='font-weight:bold;color:red'>"&key&"</span>")%></td>
                      <td><%=Replace(left(html(rs("teach")),11),key,"<font style='font-weight:bold;color:red'>"&key&"</font>")%></td>
                      <td <%if rs("color_time")>now() then response.write "style='font-weight:bold;color:#"&rs("color_value")&"'" end if %>><%if rs("types")=2 then Response.Write(""&left(html(rs("iname")),1)&"老师") else Response.Write(""&left(html(rs("iname")),3)&"") end if%></td>
                      <td><%=rs("sex")%></td>
                      <td><%if rs("types")=2 then Response.Write(""&Replace(left(html(rs("tschool")),9),key,"<font style='font-weight:bold;color:red'>"&key&"</font>")&"") else Response.Write(""&Replace(left(rs("school"),9),key,"<font style='font-weight:bold;color:red'>"&key&"</font>")&"") end if%></td>
                      <td><%=int(rs("idate"))%></td>
					  <td><%if rs("top_time")>now() then
					  Response.Write("<img src="&Pic&"/pro_top.gif alt='置顶道具：数量"&rs("top_used")&" 个' width=17 height=17>")
					  elseif rs("index_time")>now() then
					  Response.Write("<img src="&Pic&"/pro_index.gif alt='首页道具' width=17 height=17>")
					  elseif rs("vip")=True then
					  Response.Write("<img src="&Pic&"/pro_vip.gif alt='本站贵宾' width=17 height=17>")
					  elseif rs("color_time")>now() then
					  Response.Write("<img src="&Pic&"/pro_color.gif alt='变色道具' width=17 height=17>")
					  else
					  Response.Write("&nbsp;")
					  end if
					  %>&nbsp;</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&types="&types&"&key="&key&">最前页</a>】" 
response.write "【<a href="&filename&"?page="&CurrentPage-1&"&types="&types&"&key="&key&">上一页</a>】" 
end if 
if n-currentpage<1 then 
response.write "【下一页】【最后页】" 
else 
response.write "【<a href="&filename&"?page="&(CurrentPage+1)&"&types="&types&"&key="&key&">" 
response.write "下一页</a>】【<a href="&filename&"?page="&n&"&types="&types&"&key="&key&">最后页</a>】" 
end if 
response.write "</td>"
response.write "</tr>"
response.write "</table>"
response.write "</form>"
end function
%></TD>
              </TR>
  </TABLE>
<!-- #include file="foot.asp" -->
</div>
</body>
</html>
<%Conn.Execute("Update teacher Set top_used=0 where top_time<now and top_used>0")%>