📄 tchcoursemark.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="tchpurview.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="function.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>
</head>
<body>
<%
action=request.QueryString("action")
if action="add" then
stuno=request.Form("stuno")
cno=request.Form("courseno")
mark=request.Form("mark")
sid=getStuIDbyStuNO(stuno)
cid=getCIDbyCNO(cno)
if sid="" or cid="" then
response.Write("未找到学号或者课程编号,请查阅后再填写")
else
tid=getTIDbyTNO(session("user"))
if tid="" then
response.Write("您不能访问此页,或者已经登陆已经过期")
else
set rsc=server.CreateObject("adodb.recordset")
sql="select * from course where courseid=" & cid & " and teacherid=" & tid
rsc.open sql,conn,1,1
if rsc.bof and rsc.eof then
response.Write("您没有权限修改此课程得分,请查阅后再填写")
else
set rs=server.CreateObject("adodb.recordset")
sql="select * from choose where studentid=" & sid & " and courseid=" & cid
'response.Write(sql)
'response.End()
rs.open sql,conn,1,1
if rs.bof and rs.eof then
'错误
response.Write("学生没有选修此课程程,请检查学号或者课程编号")
else
'修改
sql="update choose set mark=" & mark & " where courseid=" & cid & " and studentid=" & sid
conn.execute(sql)
response.Write("修改成功")
end if
end if
end if
end if
end if
%>
<form id="form1" name="form1" method="post" action="tchcoursemark.asp?action=add">
<table width="100%" border="0">
<tr>
<td colspan="2">添加/修改课程分数</td>
</tr>
<tr>
<td>学号</td>
<td><input type="text" name="stuno" /></td>
</tr>
<tr>
<td>课程编号</td>
<td><input type="text" name="courseno" /></td>
</tr>
<tr>
<td>得分</td>
<td><input type="text" name="mark" /></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="Submit" value="提交" /></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -