<%@ Language="VBScript"%> 
<!--#include file="conn.asp"-->

<head>
<title>学生成绩查询</title>
<link rel="stylesheet" type="text/css" href="style.css">
<%
function err(strin)                             'err("×　请填写...")
Response.Write("<script language=javascript>")
Response.Write("alert('")
Response.Write(strin)
Response.Write("');")
Response.Write("history.go(-1);")
Response.Write("</script>")
Response.End()
end function
%>
<!--显示-->

<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
}
-->
</style>
</head>

　<table width="80%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#006d63" style="border-collapse: collapse">
<tr><td align="center" bgcolor="#006d63" style="border-bottom:1px solid #FFFFFF;">
	<font color="#FFFFFF"><b>学生成绩查询</b></font></td>
</tr>
<tr><td align="center" bgcolor="#FFFFFF">

<table width="100%" border="0" align="center" cellpadding="5" cellspacing="0" style="border-collapse: collapse">
  <tr>
    <td colspan="8">
      <form method="POST" action="cjcx.asp?act=do">
      
        <p align="center"><br>用户名：          
        <input type="text" name="username" size="20"><br>
        密&nbsp; 码：<input type="password" name="pwd" size="20"></p>       
        <p align="center"><input type="submit" value="提交" name="B1"><input type="reset" value="全部重写" name="B2"></p>
        <p align="right"></p>
      </form>
      </td>
  </tr>
  <tr>
    <td colspan="8">
      <p align="center">用户名为学生的中文姓名，密码已经发放</p>
     </td>
  </tr>
<%
if request.querystring("act")="do" then
sql_stu="select * from user where username='"&request("username")&"' and Password='"&request("pwd")&"'"
set rs_stu=server.createobject("adodb.recordset")
rs_stu.open sql_stu,conn,1,1
if rs_stu.eof And rs_stu.bof then 
response.write "用户名密码错误，请<a href=cjcx.asp>返回</a>"
else
%>
     <tr>
    <td>
	<p align="right">考生信息：   Candidate No：</td>          
    <td><%=rs_stu("c_no")%></td>
    <td>
	<p align="right">Candidate Name：</td>       
    <td><%=rs_stu("name")%></td>
    <td>
	<p align="right">Class：</td>
    <td><%=rs_stu("class")%></td>
    <td>
	<p align="right">Username：</td>
    <td><%=rs_stu("username")%></td>
  </tr>
     
  
  
   <tr>
            <td style="border-bottom-style: dotted; border-bottom-width: 1px; padding: 0" colspan="8"></td>
   </tr> 
 </table>
 
 <table width="60%" border="1" align="center" cellpadding="5" cellspacing="0" style="border-collapse: collapse">
   <tr>
    <td align=center>
	<p><b>Subjects</b></td>  
    <td align=center>
	<p align="left"><b>Score</b></td>
  </tr>
 <%
   '-------   利用ADOX取得Access中字段的说明   ---------------    
  Function   OpenConnectionWithString(strMDBPath,   strTableName,   strColName)    
        Dim cat      
        Set cat = server.CreateObject("ADOX.Catalog")    
        cat.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&strMDBPath    
        OpenConnectionWithString = cat.Tables(strTableName).Columns(strColName).Properties("Description").Value    
        Set cat = Nothing    
  End Function    
     
 'response.charset="gb2312"  
 


 

 
 for j=8 to rs_stu.Fields.Count-1 
 if rs_stu(j)<>""   and rs_stu(j)<>" "   then
 %>
  <tr>
    <td >
	<p><%response.write OpenConnectionWithString(server.MapPath("../db/shengxue.mdb"),   "user",  rs_stu(j).name) %>
</td>
    <td align=center>
	<p align="left"><%=rs_stu(j)%>

	
	</td>
  </tr>

	
<% end if
 next
 %>
  


 </table>  
 
<%
end if

set rs_stu=nothing

end if
%>









	























</table>
<p>　</p>
<p>　</p>
<p>　</p>
<p align="right"><a href="login.asp">ADMIN</a></p>
