<% if session("admid")="" or Session("pwd")="" then response.redirect "default.asp"%>
<!--#include file="conn.asp"-->

<%
tclass=request("txtclass")
if tclass="" or isnull(tclass) then tclass="A2A"
%>

<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Test Results </title>
<link rel="stylesheet" href="style/t.css" type="text/css">
<style type="text/css">
<!--
.STYLE1 {
	color: #0000FF;
	font-size: 24px;
	font-weight: bold;
}
-->
</style>
</head>
<body bgcolor="#D6D3CE">
<p align="center" class=header	><a href="search.asp" class="STYLE1">CIC Students' Academic Record Systems </a></p>
<p align="center" class=header	><b><font size="3">CIC Students' </font></b>Information</p>
<center>
  <form action=student.asp method="post">
  <select name="txtclass" size="1" id="txtclass">

          <%
     set rsclass=server.createobject("ADODB.Recordset") 
     sqlclass="select distinct class from student"
     rsclass.open sqlclass,conntmp,1,1
     do while not rsclass.eof
     %>
     <option value=<%=rsclass("class")%>   <%if rsclass("class")=tclass then  response.Write "   selected" end if%>><%=rsclass("class")%></option>
     <%rsclass.movenext
     loop
     %>
    </select>
	   <input name="Submit1" type="submit" value="Submit">
  </form>
  <table border="1" width="40%" bordercolorlight="#848284" cellspacing="0" cellpadding="4" bordercolordark="#FFFFFF">
   <tr>
      <td align="center" class="altbg1">Class</td>
      <td  align="center" class="altbg2">Chinese Name</td>
      <td  align="center" class="altbg2">English Name </td>
	 <td  align="center" class="altbg2">Edit</td>
    </tr>
          <%
     set rs=server.createobject("ADODB.Recordset") 
     sql="select *  from student where class='"&tclass&"'"
	 'response.Write sql 
	 'response.End()
     rs.open sql,conntmp,1,1
	 
     do while not rs.eof     
    
     %>
	 <form method="POST" action="stusave.asp" name="form1">
    <tr>
      <td align="center" class="altbg1"><%=rs("class")%></td>
      <td  align="center" class="altbg2"><input type="text" value=<%=rs("name_CN")%> disabled></td>
      <td  align="center" class="altbg2"><input type="text" value=<%=rs("name_en")%> name="txtnameen"></td>
	  <td align="center" class="altbg2"><input type="submit" value="   Edit   "> </td>
    </tr>
	<input type="hidden" value=<%=rs("name_CN")%> name="txtnamecn">

<input type="hidden" value=<%=rs("class")%> name="txtclass">	
	 </form>
	<%
	 rs.movenext
     loop%>

  </table>

</center>

 

</body>

</html>