📄 addhomework.asp
字号:
<!-- #include file="utility/checkTeacher.asp" -->
<%
'****************************************
'目的: 显示发布作业表单
'开始时间: 2005-6-5 14:55
'最后修改时间: 2005-6-5 14:55
'编写人: 某某某
'****************************************
dim courseID
dim teacherID
dim sql
dim rs
dim courseList '下拉框显示所有课程
courseID = Request.QueryString("courseID")
teacherID = Session("userID")
courseList = ""
sql = "select ID,cName from course where tID = " & teacherID
set rs = ExecuteQuery(sql)
if(rs.EOF) then
Alert("对不起,您没有开设任何课程,无法布置作业,请先添加课程!")
Go("addCourse.asp")
rs.close()
set rs = nothing
Response.End
end if
'构造列表框字符串
if(courseID <> "") then
while(not rs.EOF)
if(Chr(courseID) = Chr(rs("ID"))) then
courseList = courseList & "<option selected value=" & rs("ID") & ">" & rs("cName") & "</option>"
else
courseList = courseList & "<option value=" & rs("ID") & ">" & rs("cName") & "</option>"
end if
rs.MoveNext()
wend
else
courseList = "<option selected value=0>请选择</option>"
while(not rs.EOF)
courseList = courseList & "<option value=" & rs("ID") & ">" & rs("cName") & "</option>"
rs.MoveNext()
wend
end if
%>
<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="671" id="table2" cellspacing="0" cellpadding="0" style="border-collapse: collapse" height="22">
<tr>
<td> 当前操作: 布置作业</td>
</tr>
</table>
<br>
<table border="1" width="671" id="table1" cellspacing="0" cellpadding="0" style="border-collapse: collapse" height="130" bordercolor="#CCCCCC">
<form action=manageHomework.asp?actionType=addHomework method=post>
<tr>
<td width="80" height="26" align="right" bgcolor="#F2F2F2">课程列表:</td>
<td height="26"> <select size="1" name="courseID" class="inputText">
<%=courseList%>
</select></td>
</tr>
<tr>
<td width="80" align="right" height="80" bgcolor="#F2F2F2">作业内容:</td>
<td height="80"> <textarea rows="5" name="homework" cols="91" class="inputTextArea"></textarea></td>
</tr>
<tr>
<td width="80" align="right" height="26" bgcolor="#F2F2F2">操作:</td>
<td height="26"> <input type="submit" value="发布作业" name="B1" class="anniu">
<input type="reset" value="重新填写" name="B2" class="anniu"></td>
</tr>
</form>
</table>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -