<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file ="../connadmin.asp"-->
<!--#include file = "tuzh_pri.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<style type="text/css">
body  {
SCROLLBAR-FACE-COLOR: #9CC5D7;
SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; 
SCROLLBAR-SHADOW-COLOR: #006699; 
SCROLLBAR-3DLIGHT-COLOR: #006699; 
SCROLLBAR-ARROW-COLOR: #330000; 
SCROLLBAR-TRACK-COLOR: #E2F3F1; 
SCROLLBAR-DARKSHADOW-COLOR: #ffffff;}
</style>
<link rel="stylesheet" type="text/css" href="../img/css.css" />
</head>

<body>
<form action="Results_add.asp?add=ok" method="post" name="Results" id="Results">
<table class="border" width="95%" border="0" align="center" cellpadding="1" cellspacing="0">
  <tr>
    <td height="49" align="center" valign="top" class="bg_low"><table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td align="center" valign="middle" class="bgtop"><font class="bgtop_title">添加学生成绩</font></td>
      </tr>
    </table>
        <table width="100%" border="1" cellpadding="1" cellspacing="0" bordercolor="#ABCEDD">
          <tr>
            <td width="84" align="right">学员学号：</td>
            <td width="177" align="left"><input name="xuehao" type="text" class="textfield" id="xuehao" style="WIDTH: 200;" maxlength="100" /></td>
            <td width="77" align="left">学生姓名：</td>
            <td width="305" align="left"><input name="UserName" type="text" class="textfield" id="UserName" style="WIDTH: 200;" maxlength="100" /></td>
            <td width="91" align="left">班级类别：</td>
            <td width="208" align="left"><input name="Classo" type="text" class="textfield" id="Classo" style="WIDTH: 200;" maxlength="100" /></td>
          </tr>
          <tr>
            <td width="84" align="right">语文成绩：</td>
            <td align="left"><input name="yuwen" type="text" class="textfield" id="yuwen" style="WIDTH: 200;" maxlength="100" /></td>
            <td align="left">数学成绩：</td>
            <td align="left"><input name="shuxue" type="text" class="textfield" id="shuxue" style="WIDTH: 200;" maxlength="100" /></td>
            <td align="left">英语成绩：</td>
            <td align="left"><input name="yingyu" type="text" class="textfield" id="yingyu" style="WIDTH: 200;" maxlength="100" /></td>
          </tr>
          <tr>
            <td align="right" valign="top">物理成绩：</td>
            <td align="left"><input name="wuli" type="text" class="textfield" id="wuli" style="WIDTH: 200;" maxlength="100" /></td>
            <td align="left">化学成绩：</td>
            <td align="left"><input name="huaxue" type="text" class="textfield" id="huaxue" style="WIDTH: 200;" maxlength="100" /></td>
            <td align="left">政治成绩：</td>
            <td align="left"><input name="zhenzhi" type="text" class="textfield" id="zhenzhi" style="WIDTH: 200;" maxlength="100" /></td>
          </tr>
          
          <tr>
            <td colspan="6" align="center"><input type="submit" name="Submit" value="确定添加" /></td>
          </tr>
      </table></td>
  </tr>
</table>
</form>
</body>
</html>
<%
if Request.QueryString("add")="ok" then
set rs=server.createobject("adodb.recordset")
sql="select * from Results"
rs.open sql,conn,1,3
xuehao=request.form("xuehao")
UserName=request.form("UserName")
Classo=request.form("Classo")
yuwen=cint(request.form("yuwen"))
shuxue=request.form("shuxue")
yingyu=request.form("yingyu")
wuli=request.form("wuli")
huaxue=request.form("huaxue")
zhenzhi=request.form("zhenzhi")
if xuehao=""  then 
response.Write("<script language=javascript>alert('学号不能为空！');history.go(-1)</script>") 
response.end 
end if
if UserName="" then 
response.Write("<script language=javascript>alert('姓名不能为空！');history.go(-1)</script>") 
response.end 
end if
rs.addnew
rs("xuehao")=xuehao
rs("UserName")=UserName
rs("Classo")=Classo
rs("yuwen")=yuwen
rs("shuxue")=shuxue
rs("yingyu")=yingyu
rs("wuli")=wuli
rs("huaxue")=huaxue
rs("zhenzhi")=zhenzhi
rs.update
rs.close
set rs=nothing
conn.close
set rs=nothing
Response.Write "<script language=javascript>alert('添加成功！');window.location.href='Results_add.asp';</script>" 
end if
%>