📄 listmycourse.asp
字号:
<!-- #include file="utility/check.asp" -->
<%
'****************************************
'目的: 列表显示所有课程信息
'开始时间: 2005-6-2 21:22
'最后修改时间: 2005-6-3 8:17
'编写人: 某某某
'****************************************
dim sql
dim rs
dim teacherID
dim canSelectMsg '依据canSelect产生字符串
teacherID = Session("userID")
sql = "select course.* from course"
sql = sql & " where course.tID = " & teacherID
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>已发信息列表</title>
<link rel="stylesheet" type="text/css" href="images/link.css">
</head>
<body>
<div align="center">
<table border="1" width="700" id="table2" cellspacing="0" cellpadding="0" style="border-collapse: collapse" height="22">
<tr>
<td valign="bottom"> 当前操作: 我所开设的课程列表</td>
</tr>
</table>
<br>
<%
'循环显示表格开始
set rs = ExecuteQuery(sql)
if(rs.EOF) then
Alert("暂时没有任何数据,请返回执行其他操作!")
GoBack()
Response.end
end if
do while(not rs.EOF)
if(rs("canSelect") = 1) then
canSelectMsg = "接受选课/退选"
else
canSelectMsg = "<font color=red>拒绝选课/退选</a>"
end if
%>
<table border="1" width="700" id="table1" cellspacing="0" cellpadding="0" style="border-collapse: collapse" height="65" bordercolor="#CCCCCC">
<tr>
<td width="70" height="21" align="right" bgcolor="#F2F2F2" valign="bottom">课程名称:</td>
<td height="21" width="261" valign="bottom"> <%=rs("cName")%></td>
<td height="21" width="99" align="right" bgcolor="#F2F2F2" valign="bottom">学分:</td>
<td height="21" width="265" valign="bottom"> <%=rs("cCredit")%></td>
</tr>
<tr>
<td width="70" align="right" height="21" bgcolor="#F2F2F2" valign="bottom">上课时间:</td>
<td height="21" width="261" valign="bottom"> <%=rs("cTime")%></td>
<td height="21" width="99" align="right" bgcolor="#F2F2F2" valign="bottom">上课地点:</td>
<td height="21" width="265" valign="bottom"> <%=rs("cAddress")%></td>
</tr>
<tr>
<td width="70" align="right" height="21" bgcolor="#F2F2F2" valign="bottom">
课程时间:</td>
<td height="21" width="261" valign="bottom"> <%=rs("cStartTime")%> 到 <%=rs("cEndTime")%></td>
<td height="21" width="99" align="right" bgcolor="#F2F2F2" valign="bottom">
课程状态:</td>
<td height="21" width="265" valign="bottom"> <%=canSelectMsg%></td>
</tr>
<tr>
<td width="70" align="right" height="21" bgcolor="#F2F2F2" valign="bottom">操作:</td>
<td height="21" width="625" colspan="3" valign="bottom"> <a href="listMyStudentCourse.asp?courseName=<%=rs("cName")%>&courseNameIS=yes"><font color="#FF0000">选课学生列表</font></a> <a href="listHomework.asp?cName=<%=rs("cName")%>&cNameIS=yes"><font color="#FF0000">查看作业列表</font></a> <a href="addHomework.asp?courseID=<%=rs("ID")%>"><font color="#FF0000">发布新作业</font></a> <a href="manageMyCourse.asp?actionType=changeCourseState&courseID=<%=rs("ID")%>"><font color="#FF0000">改变选课状态</font></a> <a href="manageMyCourse.asp?actionType=deleteCourse&courseID=<%=rs("ID")%>"><font color="#FF0000">删除该课程</font></a></td>
</tr>
</table>
<br>
<%
'循环显示表格结束
rs.MoveNext()
loop
rs.close()
set rs = nothing
%>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -