📄 electclass.asp
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>选课</title>
<meta name="Microsoft Border" content="t, default">
</head>
<body>
<table border="1" width="669" id="table1">
<tr>
<%
dim adoConn
dim adoRS
dim sConnection
dim sSQL
dim user
user=session("user")
sConnection="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.mappath("student.mdb")
set adoConn=server.createobject("ADODB.Connection")
set adoRS=server.createobject("ADODB.Recordset")
adoConn.open sConnection
if user="" then
response.write("Sorry,您还未登录!请返回主页登录!")
else %>
<td width="318"><font size="2">您可以选的课</font><form method="POST" action="electresult.asp">
<% sSQL="select c.cno as cno,c.cn from c where cno not in (select sc.cno from sc where sc.sno="& user &")"
set adoRS=adoConn.execute(sSQL)
do while not adoRS.eof %>
<p><input type="checkbox" name="Elect" value=<% =adoRS("cno")%>> <% =adoRS("cno")%>
<% =adoRS("cn")%></p>
<% adoRS.movenext
loop%>
<p><input type="submit" value=" 确定" name="B1" /><input type="reset" value="取消" name="B2" /></p> </form><p></p></td>
<td width="335"><font size="2">您已经选的课</font><br>
<% sSQL="select sc.cno,c.cn from c,sc where sc.cno=c.cno and sc.sno="& user
set adoRS=adoConn.execute(sSQL)
do while not adoRS.eof %>
<p> <% =adoRS("cno")%> <% =adoRS("cn")%></p>
<% adoRS.movenext
loop
adoRS.close
adoConn.close
set adoRS=nothing
set adoConn=nothing
end if
%>
<p></p>
<p> </p>
</td>
</tr>
</table>
<p> </p>
<p align="center"><a href="index.asp">返回主页</a></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -