<!--#include file="../checkLogin.asp"-->
<!--#include file="../SQLconn.asp"-->
<html>
<head><title></title><meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../css/style.css" />

<body>

<FORM ACTION="gerentongji.asp" METHOD="GET" enctype="multipart/form-data" NAME="ftype">

     <div align="center">
    <div align="center">
      <% 
	
	years=TRIM( Request( "years" ) )
	%>
      <span class="STYLE1">    选择年</span>
    <select name="years"  onChange="ftype.submit()">
      <option><%=years%></option>
      <% Set RSsel = Conn.Execute("select vname,shuoming from  varset where name='xueqi'")
                   While NOT RSsel.EOF %>
      <option value=<%=RSsel( "vname" )%>><%=RSsel( "vname" )%></option>
      <% RSsel.MoveNext
                  Wend
                  RSsel.Close%>
    </select>
   <br>
				<% 
			 
				Set RS = Conn.Execute("select tname,(SELECT  COUNT(*)  FROM subject where t.tname=upname and   Years='"&years& "') as shuliang, (SELECT  COUNT(*)  FROM subject   where t.tname=upname and Years='"&years& "' and ftype='教案') as jiaoan, (SELECT  COUNT(*)  FROM subject where t.tname=upname and Years='"&years& "' and ftype='试卷') as  shijuan, (SELECT  COUNT(*)  FROM subject where t.tname=upname and Years='"&years& "' and ftype='课件') as  kejian,(SELECT  COUNT(*)  FROM subject where t.tname=upname and Years='"&years& "' and ftype='素材') as  sucai   from teachers t  where show=1   order by  shuliang desc,tname ")
	if years<>"" then
				%>
			    <br>
  </div>
    <table width="70%" align="center" border="1" cellpadding="3"   cellspacing="0"  bordercolor="#6D8DD8"  class="mtable">   
<tr style="background-color:#D6E4FF"  class="TableHeader">
				
	  <td width="321" height="23" class="STYLE1" ><div align="center">姓名</div></td>  
				 <td width="344" class="STYLE1" ><div align="center">教案数</div></td>
				 <td width="344" class="STYLE1" ><div align="center">试卷数</div></td>
				 
				 <td width="344" class="STYLE1" ><div align="center">课件数</div></td>
				 <td width="344" class="STYLE1" ><div align="center">素材</div></td>
				 <td width="344" height="23" class="STYLE1" ><div align="center">总文件数</div></td> 
				<% While NOT RS.EOF %>
      <tr onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#EFF8FF'">
	     <td width="321" height="26" class="STYLE1" ><div align="center"><a href="GeRenfile.asp?tname=<%=rs("tname")%>&years=<%=years%>" target="_blank"><%=rs("tname")%> </a></div></td>  
				    <td width="344" class="STYLE1" ><div align="center"><%=rs("jiaoan")%></div></td>
				    <td width="344" class="STYLE1" ><div align="center"><%=rs("shijuan")%></div></td>
				    <td width="344" class="STYLE1" ><div align="center"><%=rs("kejian")%></div></td>
					<td width="344" class="STYLE1" ><div align="center"><%=rs("sucai")%></div></td>
				    <td width="344" height="26" class="STYLE1" ><div align="center"><%=rs("shuliang")%></div></td>  
      </tr>
				<% RS.MoveNext 
				  Wend%>
  </table>
</FORM>
    <% 
	end if
	RS.Close
    
  %>  
</body>
</html>
