www.gusucode.com > ASP+ACCESS学生排课管理系统毕业设计(源代码+论文) > ASP+ACCESS学生排课管理系统毕业设计(源代码+论文)\ASP+SQL学生排课管理系统\ArrangeCourse\ArrangeCourse.asp

    <!--#include file="../include/keepHouse.asp"-->
<html>
<head>
<title><%=WebName%>-排课系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../include/WebCourseSettlementStyle.Css" rel="stylesheet" type="text/css">
<!--客户端javaScript验证函数:-->
<script language="JavaScript"><!--
function openurl(select_obj)
{
var url = select_obj.options[select_obj.selectedIndex].value;
if(url == '') return false;
else self.open(url,"IframeArrange");
return;
}

function validateArrange(){ 
	var DAY 	= document.FormArrangeCourse.DAY.value;
	var TIME	= document.FormArrangeCourse.TIME.value;
	if (DAY=="Null"){
		alert("请您选择上课周次!");
		return false;
	}
	if (TIME=="Null"){
		alert("请您选择上课节次!");
		return false;
	}
}
-->
</script>

</head>
<body>
<!--#include file="../include/header.asp"-->
<%
call insureID()
if Session("USER_TYPE")<>"Admin" then
	response.write "<br>"
	response.write "<br>"
	response.write "<div align=center><font size='+1' face='黑体' color='#FF0000'>"
	response.write "对不起,你不是排课者,请离开本页面!</font></div>"
	response.write "<div align=center>系统将在5秒钟跳转到首页</div>"
	response.write "<br>"
	response.write "<br>"
%>
<!--#include file="../include/footer.asp"-->
<%
response.write "<meta http-equiv='refresh' content='5; url=../'>"
response.end
end if
sql="SELECT CourseSettingInfo.*, DeptInfo.DEPT_NAME AS DEPT_NAME, "_
	&"CourseInfo.COURSE_NAME AS COURSE_NAME, TeacherInfo.TEACHER_NAME AS TEACHER_NAME "_
	&"FROM CourseSettingInfo INNER JOIN "_
	&"DeptInfo ON CourseSettingInfo.DEPT_ID = DeptInfo.DEPT_ID INNER JOIN "_
	&"CourseInfo ON CourseSettingInfo.COURSE_ID = CourseInfo.COURSE_ID INNER JOIN "_
	&"TeacherInfo ON CourseSettingInfo.TEACHER_ID = TeacherInfo.TEACHER_ID "_
	&"WHERE CourseSettingInfo.SETTING_ID NOT IN(SELECT SETTING_ID FROM Arrange) "
call openDB()
'Debug(sql)	
rs.open sql,conn,1,1
if rs.eof or rs.bof then
	response.Write "<p align='center'><font color='#FF0000'>所有课程都已排好,如要增加排课,请点击" _
	&"<a href='ArrangedCourse.asp'>增加排课</a></font></p>"
	call closeDB()
else
%>
<table width="750" border="1" align="center" cellpadding="0" cellspacing="0" 
bordercolorlight="#0000dd" bordercolordark="#FFFFFF" bgcolor="#F0F0F0">
<tr valign="top">
<td width="90%">
<table width="100%" border="1" cellpadding="0" cellspacing="0" 
bordercolorlight="#0000dd" bordercolordark="#FFFFFF" bgcolor="#F0F0F0">
<tr align="center" bgcolor=#99CCFF rowspan="2">
<td colspan="7" height="28"><font size='+1' face='黑体'>排课系统</font></td>
</tr>
<tr bgcolor=#99CCFF align="center"> 
<td rowspan="2" width=76 align="center">课程号</td>
<td width=183>课程名称</td>
<td width=88>考察方式</td>
<td width=56>教师号</td>
<td width=57>学分</td>
<td width=125>上课地点</td>
<td width=70>课程性质</td>
</tr>
<tr bgcolor=#99CCFF align="center"> 
<td width=183>开课分院</td>
<td width=88>最大选课人数</td>
<td width=56>教师姓名</td>
<td width=57>面向专业</td>      <td width=125>上课时间</td>
<td width=70>操作</td>
</tr>
<%
sql1="select * from BuildingInfo"
set rs1=server.createobject("ADODB.Recordset")
rs1.open sql1,conn,1,1
if rs1.bof and rs1.eof then
	call trigErr()
end if
dim m
m=1
while not rs.eof or err
	%>
	<tr align="center"> 
    <td rowspan="2" width=76 align="center"><font color="#FF0000"><%=rs("COURSE_ID")%></font></td>
    <td width=183><%=rs("COURSE_NAME")%></td>
    <td width=88><%=rs("TEST_METHOD")%></td>
    <td width=56><%=rs("TEACHER_ID")%></td>
    <td width=57><%=rs("SCORE")%> </td>      
	<td width=125>
	
    <select name="select" onChange=openurl(this)>
    <option>选择教学楼</option>
    <% 
	for i=1 to rs1.RecordCount
		response.Write("<option value=CLIDuringA.asp?BUILDING_ID=" _
		&rs1("BUILDING_ID")&">"&rs1("BUILDING_NAME")&"</option>")
        rs1.movenext
    next
    %>
	</select></td>
	<td width=70><%=rs("SELECT_LIMIT")%></td>
	</tr>
	<tr align="center"> 
    <td width=183><%=rs("DEPT_NAME")%></td>
    <td width=88><%=rs("SELECTOR_NO_LIMIT")%></td>
    <td width=56><%=rs("TEACHER_NAME")%></td>
    <!-------------------------------------->
    <form name="FormArrangeCourse" method="post" 
    action="detectArrangeCollision.asp" onsubmit="javaScript: return validateArrange();">
    <td width=57> <%=rs("ORIENT_DEPT_ID")%></td>
    
    <td width=125> <select name="DAY">
	<option value="Null" selected>--</option>
	<%for i=1 to 7%>
	<option value="星期<%=i%> ">星期<%=i%></option>
	<%next%>
	</select>
	
	<select name="TIME">
	<option value="Null" selected>--</option>
	<option value="1-2">1-2</option>
	<option value="3-4">3-4</option>
	<option value="5-6">5-6</option>
	<option value="5-7">5-7</option>
	<option value="8-9">8-9</option>
	</select>
	
	</td>
	<td>
	<input type="hidden" name="SETTING_ID" value="<%=rs("SETTING_ID")%>">
	<input type="submit" value="提 交"></td>
    </form>
    <!-------------------------------------->
    </tr>
    <%
	m=m+1
	rs1.movefirst
	rs.movenext
wend
rs1.close
set rs1=nothing
call closeDB()
%>
</table>	
</td>
<td width="10%" rowspan="<%=m%>" align="left" valign="top">
<iframe name="IframeArrange" width="140" height="<%=50+m*30%>" 
frameborder="0" src="CLIDuringA.asp">嵌入框架</iframe>
</td></tr>
</table>
<%end if
server.Execute("formQueryCourseArrange.asp")
%>
<!--#include file="../include/footer.asp"-->
</body>
</html>