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

📄 savescore.asp

📁 学校在线考试系统
💻 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 + -