⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 infostudentscore.asp

📁 晴和教务管理系统
💻 ASP
字号:
<% if request.Cookies("jiaowu")("Lx") <> "教师" then response.redirect "/jw/index.asp"%>
<!--#include file="../inc/top.asp"-->
<div align="center">
<table width="760" align="center" border="0" cellspacing="0" cellpadding="0" class="table-zuoyou" bordercolor="#CCCCCC">
<tr> 
<td width="180" valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF" class="table-you">
<!--#include file="../loginout.asp"-->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="35" bgcolor="f1f1f1" background="/jw/images/menu_02.gif" valign="bottom">
<p align="right">快 速 查 询 通 道&nbsp;&nbsp;&nbsp;</td>
</tr>
<tr> 
<td> 
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center" height="70">
<tr> 
<td height="20"> 
 您的购物车有<font color=red>0</font>件商品<br>
 总金额:<font color=red>0</font>元
</td>
</tr>
<tr> 
<td height="1"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="580" valign="top" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> 
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<TR>
<td class="table-shangxia" bgcolor="#ffffff" height="35"><img src="/jw/images/menu_06.gif" width="41" height="33" align="absmiddle"> <a href="/jw/index.asp">教学系统</a> >>  >> 
	<a href="index.asp">教师事务</a> >>  >> 录入学生成绩</td></tr>
</table>




<%
dim action
action=request.QueryString("action")
select case action
case ""
%>



<table width="580" border="0" cellspacing="0" cellpadding="0" align="center">
<TR>
<td align="center" width="6" height="27"> </td>
<td class="table-xia" align="center" height="27"><font color="#008000">你能够录入以下成绩</font></td>
<td align="center" width="5" height="27"> </td>
</tr>
</table>
<table width="580" border="0" cellspacing="0" cellpadding="0" align="center">
<TR>
<td class="table-you" align="center" width="5" height="20"><p> </p></td>
<td class="table-you" align="center" width="54" height="20"><p class="table-xia">序号</p></td>
<td class="table-you" align="center" width="112" height="20"><p class="table-xia">课程代码</td>
<td class="table-you" align="center" width="87" height="20"><p class="table-xia">班级</p></td>
<td class="table-you" align="center" width="185" height="20"><p class="table-xia">课程名称</p></td>
<td class="table-you" align="center" width="130" height="20"><p class="table-xia"> </p></td>
<td align="center" width="5" height="20"> </td>
</tr>
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from Jw_teaclass where teachernum = '" & request.Cookies("jiaowu")("Num") & "' and cjtj = 0 order by Num desc",conn,1,3
xu=1
do while not rs.eof
%>
<TR>
<td class="table-you" align="center" width="5" height="20"><p> </p></td>
<td class="table-you" align="center" width="54" height="20"><p class="table-xia"><% =xu%></p></td>
<td class="table-you" align="center" width="112" height="20"><p class="table-xia"><% =rs("Num")%></p></td>
<td class="table-you" align="center" width="87" height="20"><p class="table-xia"><% =rs("ban")%></p></td>
<td class="table-you" align="center" width="185" height="20"><p class="table-xia"><% =rs("name")%></p></td>
<td class="table-you" align="center" width="130" height="20"><p class="table-xia"><a href="infostudentscore.asp?action=info&teacherclassID=<% =rs("id")%>&classname=<% =rs("name")%>&classnum=<% =rs("Num")%>">录入成绩</a></p></td>
<td align="center" width="5" height="20"> </td>
</tr>
<%
xu=xu+1
rs.movenext
loop
rs.close
set rs=nothing
%>
</table>




<% 
case "info"
teacherclassID=request("teacherclassID")
session("teacherclassID")=request("teacherclassID")
session("classname")=request("classname")
session("classnum")=request("classnum")
%>
<form method="POST" action="infostudentscore.asp?action=save">
<table width="580" border="0" cellspacing="0" cellpadding="0" align="center">
<TR>
<td align="center" width="6" height="27"> </td>
<td class="table-xia" align="center" height="27"><font color="#008000">录入学生成绩</font></td>
<td align="center" width="5" height="27"> </td>
</tr>
</table>
<table width="580" border="0" cellspacing="0" cellpadding="0" align="center">
<TR>
<td class="table-you" align="center" width="5" height="20"><p> </p></td>
<td class="table-you" align="center" width="166" height="20">
<p class="table-xia">学号</td>
<td class="table-you" align="center" width="172" height="20">
<p class="table-xia">姓名</td>
<td class="table-you" align="center" width="231" height="20"><p class="table-xia">
成绩</p></td>
<td align="center" width="5" height="20"> </td>
</tr>


<%
xuhao=1
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from Jw_stuclass where teacherclassID ="& teacherclassID & " order by studentNum",conn,1,3
session("tjrs")=rs.recordcount
do while not rs.eof
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select * from Jw_student where Num = '"& rs("studentNum") & "' order by Num",conn,1,3
%>

<TR>
<td class="table-you" align="center" width="5" height="20"><p> </p></td>
<td class="table-you" align="center" width="166" height="20"><p class="table-xia"><% =rs1("num")%></p></td>
<td class="table-you" align="center" width="172" height="20"><p class="table-xia"><% =rs1("name")%></p></td>
<td class="table-you" align="center" width="231" height="20"><p class="table-xia"><input class="wenbenkuang" name="score<% =xuhao%>" type="text" id="Topic" size="10"></p></td>
<td align="center" width="5" height="20"> </td>
<input class="wenbenkuang" name="<% ="num"&xuhao%>" type="hidden" value="<% =rs1("num")%>">
</tr>

<%
rs1.close
set rs1=nothing
xuhao=xuhao+1
rs.movenext
loop
rs.close
set rs=nothing
%>
<TR>
<td class="table-you" align="center" width="5" height="20"><p> </p></td>
<td class="table-you" align="center" width="166" height="20"><p class="table-xia"> </p></td>
<td class="table-you" align="center" width="172" height="20"><p class="table-xia"> 
<input class="wenbenkuang" name="tjrs" type="hidden" value="<% =tjrs%>">
<input class="go-wenbenkuang" name="submit" value=确定提交成绩 type=submit></p></td>
<td class="table-you" align="center" width="231" height="20"><p class="table-xia"> </p></td>
<td align="center" width="5" height="20"><p> </p></td>
</tr>
</table>
</form>


<% 
case "save"
classnum=session("classnum")
classname=session("classname")
for i = 1 to session("tjrs")
studentnum=trim(request("num"&i))
score=trim(request("score"&i))
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from Jw_score where studentnum = '" & studentnum & "' and kcdm = '" & classnum & "'",conn,1,3
if rs.recordcount>0 then response.write "<script LANGUAGE='javascript'>alert('其中一门或几门成绩已经存在,不能重复提交成绩!');history.go(-1);</script>"
rs.addnew
rs("studentnum")=studentnum
rs("kcdm")=classnum
rs("kcmc")=classname
rs("xn")=application("xuenian")
rs("xq")=application("xueqi")
rs.update
rs.close
set rs=nothing
next

set rs=server.CreateObject("adodb.recordset")
rs.open "select * from Jw_teaclass where id="&session("teacherclassID"),conn,1,3
rs("cjtj")=1
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write "<font color=red>提交成绩成功,本科目被锁定,如需更改请联系教务员!</font>"

end select
%>
</td>
</tr>
</table>
</div>
<!--#include file="../inc/end.asp"-->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -