<!--#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="../images/<%=request.cookies("imgdir")%>/css/style.css" media="all"/>

<style type="text/css">
<!--
.STYLE3 {color: #990033}
-->
</style>

<body>
<table width="100%" height="495" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="27">
	<div class="header">
	<div class="nav">
        <ul>
           
            <li><a href="TongJiGeRen.asp" target="_self">学期个人统计</a></li> 
			<li class="on">学期年级统计</li>
            <li><a href="TongJISubject.asp" target="_self">学期科目统计</a></li>
        </ul>
    </div>	
	</td>
  </tr>


 
  <tr>
   <td height="470" valign="top"   class="NemuMainBox">
	 <br>
	
	<FORM ACTION="TongJIGrade.asp" METHOD="GET" enctype="multipart/form-data" NAME="ftype">

     <div align="center">
    <div align="center">
      <% 
	izong=0
	ijiaoan=0
	ishijuan=0
	ikejian=0
	isucai=0
	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 grade,(SELECT  COUNT(*)  FROM subject where    grade=s.grade  and   Years='"&years& "') as shuliang, (SELECT  COUNT(*)  FROM subject   where  grade=s.grade  and   Years='"&years& "' and ftype='教案') as jiaoan, (SELECT  COUNT(*)  FROM subject where   grade=s.grade  and  Years='"&years& "' and ftype='试卷') as  shijuan, (SELECT  COUNT(*)  FROM  subject where   grade=s.grade  and   Years='"&years& "' and ftype='课件') as  kejian,(SELECT  COUNT(*)  FROM subject where   grade=s.grade  and   Years='"&years& "' and ftype='素材') as  sucai   from subject s  where  Years='"&years& "' group by grade    order by  grade ")
	if years<>"" then
				%>
			    <br>
  </div>
    <table width="95%" align="center" border="1" cellpadding="3"   cellspacing="0"  bordercolor="#6D8DD8"  class="mtable">   
<tr style="background-color:#D6E4FF"  class="TableHeader">
				
	  <td width="321" height="30" 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
				
				izong=izong+rs("shuliang")
				ijiaoan=ijiaoan+rs("jiaoan")
				ishijuan=ishijuan+rs("shijuan")
				ikejian=ikejian+rs("kejian")
				isucai=isucai+rs("sucai")
				
				
				 %>
      <tr onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#EFF8FF'">
	     <td width="321" height="30" class="STYLE1" ><div align="center"><%=rs("grade")%></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%>
		<tr onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#EFF8FF'">		
	  <td width="321" height="30" class="STYLE1" ><div align="center">合计</div></td>  
				    <td width="344" class="STYLE1" ><div align="center"><%=ijiaoan%></div></td>
				    <td width="344" class="STYLE1" ><div align="center"><%=ishijuan%></div></td>
				    <td width="344" class="STYLE1" ><div align="center"><%=ikejian%></div></td>
					<td width="344" class="STYLE1" ><div align="center"><%=isucai%></div></td>
				    <td width="344" height="26" class="STYLE1" ><div align="center"><%=izong%></div></td>  
      </tr>
  </table>
</FORM>
    <% 
	end if
	RS.Close
    
  %>  
	
	
	
	
	
	
	  </td>
  </tr>
</table>
</body>
</html>
