⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_couarr_inc.asp

📁 da jia lai kan kan hao dong dong
💻 ASP
📖 第 1 页 / 共 2 页
字号:
Sub dis_iframe_jstable()
	coudis=""
	For w_i=1 To 7
		coudis=coudis&che(request("c_"&w_i))&"||"
	Next 
	coudis=Left(coudis,Len(coudis)-2)
	
End Sub

'****************************************************
'名称:dis_iframe_sqltable
'功能:将值提交入库
'参数:types 为空或 "add" 判断是修改记录还是添加记录
'****************************************************
Sub dis_iframe_sqltable(tyles)
	rs("coudis")=coudis
End Sub 

'****************************************************
'名称:dis_save
'功能:课程分布信息提交
'参数:strid为班级ID
'****************************************************
Sub dis_save(strid)
	set rs=server.createobject("adodb.recordset")
	Sql = "SELECT * FROM [couarr_dis] WHERE sem_id="&sem_id&" and cla_id="&strid
	rs.Open Sql, Conn, 1, 3
	If Not rs.Eof Then
		dis_iframe_sqltable("mod")
		rs.Update
	Else
		 conn.execute("insert into couarr_dis(coudis,cla_id,sem_id) values('"&coudis&"',"&strid&","&sem_id&")" )
	End If
	rs.close
End Sub


'****************************************************
'名称:dis_listinfos
'功能:课程分布管理
'****************************************************
Sub dis_listinfos()
		%>
		
		<style type="text/css">
		.couarr_iframe th{text-align:center;padding:0px;text-indent: 0;}
		</style>
<table width="100%" cellspacing="1" cellpadding="0" class="info_tab">
	<TR><TD class="zq" width="20%"><%=nows(0)%>、<%=nows(1)%></TD>
		<TD>&nbsp;<SELECT NAME="<%=nowlm(0)%>" style="width:97px;" onchange="checkalls('lj','dis');"><%=my_sqlsel(lj_id,"lj")%></SELECT>
		<SELECT NAME="<%=nowlm(1)%>" style="width:97px;" onchange="checkdisinfo();"><%=sem_select(0)%></SELECT>
		&nbsp;<span id="<%=nowlm(0)%>_txt">第一步,选择年届和学期</span><span id="<%=nowlm(1)%>_txt"></span><BR>
		</td>
	</tr>
	<TR><TD class="zq" width="20%"><%=nows(2)%></TD>
		<TD>&nbsp;<SELECT NAME="<%=nowlm(2)%>" onchange="checkalls('Col','dis');"><%=my_sqlsel(Col_id,"Col")%></SELECT>
		&nbsp;<span id="<%=nowlm(2)%>_txt">第二步,选择所在系所,将自动刷新相应专业</span><BR>
		</td>
	</tr>
	<TR><TD class="zq" width="20%"><%=nows(3)%></TD>
		<TD>&nbsp;<SELECT NAME="<%=nowlm(3)%>" onchange="checkalls('pro','dis');"><option>请选择...</option></SELECT>
		&nbsp;<span id="<%=nowlm(3)%>_txt">第三步,选择相应专业,选择后将自动刷新相应班级与课程</span><BR>
		</td>
	</tr>
	</TABLE>

	<table width="100%" cellspacing="1" cellpadding="0" class="info_tab">
	  <tr id="add_0" style=""> 
		<td width="20%" class="art_tit" style="text-align:center;"><%=nows(4)%>、课程安排</td>
		<td style="text-align:center;padding:0;">
		<span id="<%=nowlm(4)%>_txt" style="line-height:30px;margin-bottom:20px;">第四步,选择班级</span>
		<SELECT NAME="<%=nowlm(4)%>" style="clear:left;height:240px;" onchange="checkdisinfo();" size=20 multiple><option value="0" selected>请选择...</option></SELECT></td>
		<td width="55%" style="padding:0;" valign=top>
			<table cellspacing="1" cellpadding="0" class="info_tab2 couarr_iframe" style="float:left;margin:0;">
			<tr><th style="width:60px;" rowspan="2">星期\课时</th>
				<th style="width:50px;" rowspan="2">早自习</th>
				<th style="width:10px;" rowspan="2">&nbsp;</th>
				<th colspan="2">上午</th>
				<th style="width:10px;" rowspan="2">&nbsp;</th>
				<th colspan="2">下午</th>
				<th style="width:10px;" rowspan="2">&nbsp;</th>
				<th style="width:60px;" rowspan="2">晚自习</th>
			</tr>
			<tr>
				<th style="width:50px;">1-2</th>
				<th style="width:50px;">3-4</th>
				<th style="width:50px;">5-6</th>
				<th style="width:50px;">7-8</th>
			</tr>
			  <%For i = 1 To UBound(weeksinfo)
					res "<tr><th style=""width:60px;"">星期"&weeksinfo(i)&"</th>",0
					If i=1 Then 
						res "<td rowspan=""7"" colspan=""9"" style=""padding:0;text-indent:0;"">",1
						res "<iframe name=""disinfo"" id=""disinfo"" frameborder=""0"" scrolling=""no"" style=""width:100%;height:210px;padding:0;marign:0;"" src=""admin_couarr_disiframe.asp?action=list""> </iframe>",1
						res "</td>",1
					End If
					res "</tr>",1
				next
			  %>
			</table>
		<div id="Totals" style="clear:left;">&nbsp;</div>
		</td>
	</tr>
	<tr>
	 <td class="zq" width="20%">当前操作</td>
	 <td colspan="2">&nbsp;<a href="#" onclick="showinfo_dissave();">保存当前课程范围信息</a>
		&nbsp;</td>
	</tr>
	<tr id="add_1" style="display: none;">
	 <td class="zq"><%=nows(5)%></td>
		<td>&nbsp;<SELECT NAME="<%=nowlm(5)%>" style="width:200px;"><option>请选择...</option></SELECT>
		&nbsp;<span id="<%=nowlm(5)%>_txt"></span><BR></td>
	</tr>

	<tr id="add_2" style="display: none;">
	 <td class="zq"><%=nows(6)%></td>
	 <td>&nbsp;<SELECT NAME="<%=nowlm(6)%>" style="width:200px;"><%=my_sqlsel(0,"tea_name")%></SELECT>
	 &nbsp;<span id="<%=nowlm(6)%>_txt"></span><BR></td>
	</tr>
	<tr id="add_3" style="display: none;">
	 <td class="zq"><%=nows(7)%></td>
	 <td>&nbsp;<SELECT NAME="<%=nowlm(7)%>" style="width:200px;"><%=my_sqlsel(0,"addr")%></SELECT>
	 &nbsp;<span id="<%=nowlm(7)%>_txt"></span><BR></td>
	</tr>
</table>
<input type="hidden" name="modinfo"><input type="hidden" name="actions"><input type="hidden" name="check_num" value="0">
<%
End Sub 


'****************************************************
'名称:dis_iframe_listinfos
'功能:课程分布表
'****************************************************
Sub dis_iframe_listinfos()
%>	
	<style type="text/css">
	body {min-width:200px;width:100%;background: #fff;}
	table.couarr_iframe {width:100%;}
	table.couarr_iframe td {background: #fff;line-height:23px;height:28px;border-bottom:1px solid #f8f8f8;width:50px;}
	select {width:40px;}
	</style>
	<%
	If cla_id="null" Or sem_id=0  Then response.End
	If IsNumeric(cla_id) And len(cla_id)=len(Replace(cla_id,", ","")) Then
		Dim cou_table
		sql="select id,coudis "&_
			"from couarr_dis "&_
			"where cla_id="&cla_id&" and sem_id="& sem_id 
		rs_dis = connopen(sql)
		If IsArray(rs_dis) Then
			If rs_dis(1,0)<>"" Then 
				Temp_cou_0=Split(rs_dis(1,0),"||")
				For w_i=1 To 7
					Temp_cou_1=Split(Temp_cou_0(w_i-1),", ")
					For h_i=1 To 6
						cou_all(h_i,w_i)=Temp_cou_1(h_i-1)
					Next
				Next
			Else
				dis_setcou
			End If 
		Else
			dis_setcou
		End If 
	Else
		Dimcou_all
	End If
	cou_table=""
	For w_i=1 To 7
		cou_table=cou_table&"<tr>"
		For h_i=1 To 6
			cou_table=cou_table&"<td>"
			cou_table=cou_table&"<select name=""c_"&w_i&""">"&Iscousel(cou_all(h_i,w_i))&"</select>"
			cou_table=cou_table&"</td>"
			If h_i=1 Or h_i=3 Or h_i=5 Then cou_table=cou_table&"<td style=""width:10px;""></td>"
		Next
		cou_table=cou_table&"</tr>"
	next
	%>
	<table  cellspacing="1" cellpadding="0" class="info_tab2 couarr_iframe" style="clear:left;margin:0;padding:0;">
		<form method=post action="?action=save" name="saves">
			<%=cou_table%>
			<input type="hidden" name="cla_id" value="<%=cla_id%>"><input type="hidden" name="sem_id" value="<%=sem_id%>">
		</form>
	</table>
	<%
End Sub

'****************************************************
'名称:dis_setcou
'功能:初始化课程分布信息并提交入库
'****************************************************
Sub dis_setcou()
	Temp_cou_3=""
	Dimcou_all
	For w_i=1 To 7
		For h_i=1 To 6
			Temp_cou_3=Temp_cou_3&cou_all(h_i,w_i)&", "
		Next
		Temp_cou_3=Left(Temp_cou_3,Len(Temp_cou_3)-2)&"||"
	Next
	Temp_cou_3=Left(Temp_cou_3,Len(Temp_cou_3)-2)
	conn.execute("insert into couarr_dis(coudis,cla_id,sem_id) values('"&Temp_cou_3&"',"&cla_id&","&sem_id&")" )
End Sub 

'****************************************************
'名称:Dimcou_all
'功能:初始化课程分布信息
'****************************************************
Sub Dimcou_all()
	For w_i=1 To 7
	For h_i=1 To 6
		If w_i>5 Then 
			cou_all(h_i,w_i)="-1%-1%-1"
		else
			cou_all(h_i,w_i)="0%0%0"
		End If 
	Next
	next
End Sub

'****************************************************
'名称:Iscousel
'功能:返回有无课程的下拉
'参数:nos 默认选择项value
'****************************************************
Function Iscousel(nos)
	Iscousel=Iscousel&"<option value=""-1%-1%-1"" "
	If nos="-1%-1%-1" Then Iscousel=Iscousel & " selected "
	Iscousel=Iscousel&">×</option>"
	Iscousel=Iscousel&"<option value=""0%0%0"" "
	If nos="0%0%0" Then Iscousel=Iscousel & " selected "
	Iscousel=Iscousel&">√</option>"
End Function











'****************************************************
'名称:man_listinfos
'功能:课程分布管理
'****************************************************
Sub man_listinfos()
		%>
		
		<style type="text/css">
		.couarr_iframe th{text-align:center;padding:0px;text-indent: 0;}
		</style>
<table width="100%" cellspacing="1" cellpadding="0" class="info_tab">
	<TR><TD class="zq" width="20%"><%=nows(0)%>、<%=nows(1)%></TD>
		<TD>&nbsp;<SELECT NAME="<%=nowlm(0)%>" style="width:97px;" onchange="checkalls('lj','man');"><%=my_sqlsel(lj_id,"lj")%></SELECT>
		<SELECT NAME="<%=nowlm(1)%>" style="width:97px;" onchange="checkmaninfo();"><%=sem_select(0)%></SELECT>
		&nbsp;<span id="<%=nowlm(0)%>_txt">第一步,选择年届和学期</span><span id="<%=nowlm(1)%>_txt"></span><BR>
		</td>
	</tr>
	<TR><TD class="zq" width="20%"><%=nows(2)%></TD>
		<TD>&nbsp;<SELECT NAME="<%=nowlm(2)%>" onchange="checkalls('Col','man');"><%=my_sqlsel(Col_id,"Col")%></SELECT>
		&nbsp;<span id="<%=nowlm(2)%>_txt">第二步,选择所在系所,将自动刷新相应专业</span><BR>
		</td>
	</tr>
	<TR><TD class="zq" width="20%"><%=nows(3)%></TD>
		<TD>&nbsp;<SELECT NAME="<%=nowlm(3)%>" onchange="checkalls('pro','man');"><option>请选择...</option></SELECT>
		&nbsp;<span id="<%=nowlm(3)%>_txt">第三步,选择相应专业,选择后将自动刷新相应班级与课程</span><BR>
		</td>
	</tr>
	</TABLE>

	<table width="100%" cellspacing="1" cellpadding="0" class="info_tab">
	  <tr id="add_0" style=""> 
		<td width="20%" class="art_tit" style="text-align:center;"><%=nows(4)%>、课程安排<br><span id="<%=nowlm(4)%>_txt" style="line-height:30px;margin-bottom:20px;">第四步,选择班级</span></td>
		<td style="text-align:center;padding:0;">
		<SELECT NAME="<%=nowlm(4)%>" style="clear:left;height:240px;" onchange="checkmaninfo();" size=20 multiple><option value="0" selected>请选择...</option></SELECT></td>
		<td style="padding:0;" valign=top>
			<table cellspacing="1" cellpadding="0" class="info_tab2 couarr_iframe" style="float:left;margin:0;">
			<tr><th style="width:60px;" rowspan="2">星期\课时</th>
				<th style="width:50px;" rowspan="2">早自习</th>
				<th style="width:10px;" rowspan="2">&nbsp;</th>
				<th colspan="2">上午</th>
				<th style="width:10px;" rowspan="2">&nbsp;</th>
				<th colspan="2">下午</th>
				<th style="width:10px;" rowspan="2">&nbsp;</th>
				<th style="width:60px;" rowspan="2">晚自习</th>
			</tr>
			<tr>
				<th style="width:50px;">1-2</th>
				<th style="width:50px;">3-4</th>
				<th style="width:50px;">5-6</th>
				<th style="width:50px;">7-8</th>
			</tr>
			  <%For i = 1 To UBound(weeksinfo)
					res "<tr><th style=""width:60px;"">星期"&weeksinfo(i)&"</th>",0
					If i=1 Then 
						res "<td rowspan=""7"" colspan=""9"" style=""padding:0;text-indent:0;"">",1
						res "<iframe name=""maninfo"" id=""disinfo"" frameborder=""0"" scrolling=""no"" style=""width:100%;height:210px;padding:0;marign:0;"" src=""admin_couarr_maniframe.asp?action=list""> </iframe>",1
						res "</td>",1
					End If
					res "</tr>",1
				next
			  %>
			</table>
		<div id="Totals" style="clear:left;">&nbsp;</div>
		</td>
	</tr>
	<tr style="display: none;">
	 <td class="zq" width="20%">当前操作</td>
	 <td colspan="2">&nbsp;<a href="#" onclick="showinfo_dissave();">保存当前课程范围信息</a>
		&nbsp;</td>
	</tr>
	<tr id="add_1" style="display: none;">
	 <td class="zq"><%=nows(5)%></td>
		<td>&nbsp;<SELECT NAME="<%=nowlm(5)%>" style="width:200px;"><option>请选择...</option></SELECT>
		&nbsp;<span id="<%=nowlm(5)%>_txt"></span><BR></td>
	</tr>

	<tr id="add_2" style="display: none;">
	 <td class="zq"><%=nows(6)%></td>
	 <td>&nbsp;<SELECT NAME="<%=nowlm(6)%>" style="width:200px;"><%=my_sqlsel(0,"tea_name")%></SELECT>
	 &nbsp;<span id="<%=nowlm(6)%>_txt"></span><BR></td>
	</tr>
	<tr id="add_3" style="display: none;">
	 <td class="zq"><%=nows(7)%></td>
	 <td>&nbsp;<SELECT NAME="<%=nowlm(7)%>" style="width:200px;"><%=my_sqlsel(0,"addr")%></SELECT>
	 &nbsp;<span id="<%=nowlm(7)%>_txt"></span><BR></td>
	</tr>
</table>
<input type="hidden" name="modinfo"><input type="hidden" name="actions"><input type="hidden" name="check_num" value="0">
<%
End Sub 



'****************************************************
'名称:dis_iframe_listinfos
'功能:课程分布表
'****************************************************
Sub man_iframe_listinfos()
%>	
	<style type="text/css">
	body {min-width:200px;width:100%;background: #fff;}
	table.couarr_iframe {width:100%;}
	table.couarr_iframe td {background: #fff;line-height:23px;height:28px;border-bottom:1px solid #f8f8f8;width:50px;}
	select {width:40px;}
	</style>
	<%
	If cla_id="null" Or sem_id=0  Then response.End
	Dim cou_table
	sql="select id,coutab "&_
		"from couarr_info "&_
		"where cla_id="&cla_id&" and sem_id="& sem_id 
	rs_dis = connopen(sql)
	cou_table=""
	If IsArray(rs_dis) Then
		If rs_dis(1,0)<>"" Then 
			Temp_cou_0=Split(rs_dis(1,0),"||")
			For w_i=1 To 7
				Temp_cou_1=Split(Temp_cou_0(w_i-1),", ")
				cou_table=cou_table&"<tr>"
				For h_i=1 To 6
					cou_table=cou_table&"<td>"
					cou_table=cou_table&" "&outcouarr_ot(Temp_cou_1(h_i-1))&" "
					cou_table=cou_table&"</td>"
					If h_i=1 Or h_i=3 Or h_i=5 Then cou_table=cou_table&"<td style=""width:10px;""></td>"
				Next
				cou_table=cou_table&"</tr>"
			Next
		End If
	Else
		cou_table="<tr><td width=""100%""> 无课程 </td></tr>"
	End If 
	%>
	<table  cellspacing="1" cellpadding="0" class="info_tab2 couarr_iframe" style="clear:left;margin:0;padding:0;">
		<form method=post action="?action=save" name="saves">
			<%=cou_table%>
			<input type="hidden" name="cla_id" value="<%=cla_id%>"><input type="hidden" name="sem_id" value="<%=sem_id%>">
		</form>
	</table>
	<%
End Sub

Function outcouarr_ot(strinfo)
	Dim arrstrinfo
	arrstrinfo=Split(strinfo,"%")
	If arrstrinfo(0)>0 Then 
	Dim rs_0,rs_1,rs_2
		sql="select cou "&_
			"from res_cou "&_
			"where id="&arrstrinfo(0)
		rs_0 = connopen(sql)
		sql="select addr "&_
			"from couarr_addr "&_
			"where id="&arrstrinfo(1)
		rs_1 = connopen(sql)
		sql="select tea_name "&_
			"from admin_tea "&_
			"where id="&arrstrinfo(2)
		rs_2 = connopen(sql)
		
		outcouarr_ot=outcouarr_ot&"<span title="""&vbcrlf
		If IsArray(rs_2) Then outcouarr_ot=outcouarr_ot&"任课教师:["&rs_2(0,0)&"]"&vbcrlf
		If IsArray(rs_1) Then outcouarr_ot=outcouarr_ot&"任课地点:"&rs_1(0,0)&vbcrlf
		outcouarr_ot=outcouarr_ot&""">"
		If IsArray(rs_0) Then outcouarr_ot=outcouarr_ot&rs_0(0,0)
		outcouarr_ot=outcouarr_ot&"</span>"
	Else
		outcouarr_ot="无"
	End If 
End Function
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -