📄 savescore.asp
字号:
<%option explicit%>
<%
Response.expires=-1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","no-store"
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/function.asp"-->
<%
dim rsSaveScore,strSqlSaveScore,intScore,strAction,intID,intMark '得分,动作,试题ID
dim intStudentID,intPrjID
strAction = request.querystring("action")
intMark = CLng(trim(request.querystring("intMark")))
if intMark = 0 then
intID = request.querystring("id")
intScore = CLng(trim(request.querystring("score")))
set rsSaveScore = server.createobject("ADODB.Recordset")
strSqlSaveScore = "select * from prj_process where id=" & intID
rsSaveScore.open strSqlSaveScore,G_CONN,1,3
rsSaveScore("zgscore") = intScore
rsSaveScore.update
rsSaveScore.close
set rsSaveScore = nothing
end if
intStudentID = request.querystring("studentid")
intPrjID = request.querystring("prjid")
set rsSaveScore = server.createobject("ADODB.Recordset")
strSqlSaveScore = "select sum(zgscore) as score from prj_process where studentid=" & intStudentID & " and prjid=" & intPrjID
rsSaveScore.open strSqlSaveScore,G_CONN,1,1
if not rsSaveScore.EOF then
intScore = rsSaveScore("score")
else
intScore = 0
end if
rsSaveScore.close
set rsSaveScore = nothing
set rsSaveScore = server.createobject("ADODB.Recordset")
strSqlSaveScore = "select * from student_score where studentid=" & intStudentID & " and prjid=" & intPrjID
rsSaveScore.open strSqlSaveScore,G_CONN,1,3
rsSaveScore("zg_score") = intScore
if intMark = 1 then
rsSaveScore("scoremark") = "已阅"
end if
rsSaveScore.update
rsSaveScore.close
set rsSaveScore = nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -