<!--#include file="../../inc/Webstd_Conn.asp"-->  
<%SYEAR1 = trim(escape(Request.Form("SYEAR1")))
  SEME1 = trim(escape(Request.Form("SEME1")))
  'session("Emp_Stdno") = ""  
  OverTime2("../../Index.asp")  '逾時  
%>

<html>

<head>
<meta name="GENERATOR" content="Microsoft Visual InterDev 1.0">
<meta http-equiv="Content-Type"
content="text/html; charset=x-x-big5">
<title>學生學年學期成績查詢結果</title>
</head>





<body bgcolor="#ADE7FF">
<%if SYEAR1 = "" or SEME1 = "" then%>
  <center>
  
     <P><BIG><FONT face=標楷體><BIG>學年期成績查詢操作說明</BIG></FONT></BIG></P>
     <P><FONT face=標楷體><BIG>選擇您要查詢的<FONT color=#0000ff> 學年別</FONT>按查詢即可</BIG></FONT></P>
     <P><FONT color=#800080 face=標楷體>
     <BIG>若畫面上沒有出現的學年學期別則不開放查詢</BIG></FONT>
  </center>
  
<%else
  
     sql = "SP_SHYONG_SYEAR '" & SYEAR1 & "','" & SEME1 & "','" & session("Emp_Stdno") & "' "
     'response.write sql & "<br>"
     set RS = Std_HSDB.execute(sql)
     if RS.eof then
        Response.Write "<center><b><font color=red size=3>查無資料!!!</font></b></center>"
     else
%>     
        <table width="683" border="1" align="center" cellspacing="0" bordercolorlight="#000000" bordercolordark="#FFFFFF">
           <tr align="center" valign="middle">
             <td width="157" rowspan="2" bgcolor="#FAE067" ><font size="4" face="標楷體">科目</font></td>
             <td height="20" colspan="3" bgcolor="#FAE067" ><font face="標楷體">第一學期</font></td>
             <td height="20" colspan="3" bgcolor="#FAE067" ><font face="標楷體">第二學期</font></td>
             <td colspan="2" rowspan='2' bgcolor="#FAE067" ><font size="4" face="標楷體">學年</font></td>
          </tr>
           <tr>
              <td width="100" height="20" align="center" bgcolor="#FAE067" ><font face="標楷體">學分</font></td>
              <td width="100" height="20" align="center" bgcolor="#FAE067" ><font face="標楷體">分數</font></td>
			  <td width="100" height="20" align="center" bgcolor="#FAE067" ><font face="標楷體">補考</font></td>
              <td width="100" height="20" align="center" bgcolor="#FAE067" ><font face="標楷體">學分</font></td>
              <td width="100" height="20" align="center" bgcolor="#FAE067" ><font face="標楷體">分數</font></td>
			  <td width="100" height="20" align="center" bgcolor="#FAE067" ><font face="標楷體">補考</font></td>
			  
           </tr>   
           <%Do while not RS.eof AND (LEFT(RS("SUBJNO"),3) <> "ZZZ") %>
           <tr align="center" valign="middle">
             <td height="20" bgcolor="#FDF9BF" ><font face="標楷體"><%=RS("SUBJNAME")%></font></td>
             <td height="20" bgcolor="#FDF9BF"><font face="標楷體"><%=RS("CREDIT1")%></font></td>
             <td height="20" bgcolor="#FDF9BF"><font face="標楷體"><%=RS("SCORE1")%></font></td>
			 <td height="20" bgcolor="#FDF9BF"><font face="標楷體"><%=RS("SCORE1_EXAM")%></font></td>
             <td height="20" bgcolor="#FDF9BF"><font face="標楷體"><%=RS("CREDIT2")%></font></td>
             <td height="20" bgcolor="#FDF9BF"><font face="標楷體"><%=RS("SCORE2")%></font></td>
			 <td height="20" bgcolor="#FDF9BF"><font face="標楷體"><%=RS("SCORE2_EXAM")%></font></td>
             <td height="20" bgcolor="#FDF9BF"><font face="標楷體"><%=RS("SCORE3")%></font></td>
			 
           </tr> <%RS.movenext%>
           <%Loop%> 
		   <%DO WHILE NOT RS.EOF
		      IF RS("SUBJNO") = "ZZZ1" THEN CRED1 = RS("CRED_TOT") : SCO1 = RS("SCO_6") END IF
  		      IF RS("SUBJNO") = "ZZZ2" THEN CRED2 = RS("CRED_TOT") : SCO2 = RS("SCO_6") END IF
   		      IF RS("SUBJNO") = "ZZZ3" THEN CRED3 = RS("CRED_TOT") : SCO3 = RS("SCO_6") END IF
			  RS.MOVENEXT
			    LOOP%>
           <tr align="center" valign="middle">
             <td height="20" bgcolor="#FDF9BF" ><font face="標楷體">實得學分</font></td>
             <td height="20" colspan="3" bgcolor="#FDF9BF"><font face="標楷體"><%=CRED1%></font></td>
             <td height="20" colspan="3" bgcolor="#FDF9BF"><font face="標楷體"><%=CRED2%></font></td>
             <td height="20" bgcolor="#FDF9BF"><%=CRED3%></td>
           </tr>
           <tr align="center" valign="middle">              
             <td width="157" height="20" bgcolor="#FDF9BF" ><div align="center"><font face="標楷體">學業總平均</font></div></td>
             <td height="20" colspan="3" bgcolor="#FDF9BF"><div align="center"></div>               <div align="center">
               <font face="標楷體"><%=SCO1 %>
               </font></div></td>
             <td height="20" colspan="3" bgcolor="#FDF9BF"><div align="center"></div>               <div align="center">
               <font face="標楷體"><%=SCO2 %>
               </font></div></td>
             <td width="100" height="20" bgcolor="#FDF9BF"><div align="center">
               <%=SCO3 %>
             </div></td>                      
</tr 

></table>               
<%      '關閉物件

        RS.close
        set RS = nothing
        Std_HSDB.close
        set Std_HSDB = nothing   
     end if
  end if  
%>
</body>
</html>

