📄 selected.asp
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="adovbs.inc"-->
<!--#include file="connection.asp"-->
<%
Selected=Split(Session("checkbox"),",")
Set rsTest=Server.CreateObject("ADODB.RecordSet")
rsTest.Open "Course",Conn,adOpenkeySet,adLockOptimistic',adCmdText
Set rsStudent=Server.CreateObject("ADODB.RecordSet")
StrSQL="Select * From Selection Where Studentno='"&Session("Userno")&"' "
rsStudent.Open StrSQL,Conn,adOpenkeySet,adLockOptimistic,adCmdText
For i=0 To Ubound(Selected)
Do While Not rsTest.EOF
If rsTest("Courseno").Value=Trim(Selected(i)) Then
rsTest("Currentnum")=rsTest("Currentnum").Value+1
Test=0
If rsStudent.RecordCount=0 Then
Else
Do while not rsStudent.EOF
If Trim(rsStudent("Courseno").Value)=Trim(Selected(i)) Then
Test=1
End If
rsStudent.MoveNext
loop
rsStudent.MoveFirst
End If
if Test=0 Then
rsStudent.AddNew
rsStudent("Studentno")=Session("Userno")
rsStudent("Courseno")=Trim(Selected(i))
rsTest.UpdateBatch
Else
Response.Redirect "SelectedError.asp"
End If
rsStudent.UpdateBatch
End If
rsTest.MoveNext
Loop
rsTest.MoveFirst
Next
rsTest.Close
rsStudent.Close
Conn.Close
Set rsTest=Nothing
Set rsStudent=Nothing
Set Conn=Nothing
%>
<html>
<body>
<div align="center">
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p><font color="#FF0000" size="+7" face="华文新魏">所选课程信息已保存!</font></p>
<p align="center"><a href="main.asp">返回</a></p>
</div>
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -