📄 inctwo.asp
字号:
<!--#include file="top.asp"-->
<!--#include file="Function.asp"-->
<!--#include file="Odbc_connection.asp"-->
<!--#include file="incsub.asp"-->
<!--#include file="incfirst1.asp"-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="wangye9pt.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="786" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="188" rowspan="4" valign="top" background="images/lefttiao.jpg"><!--#include file="left.asp"--></td>
<td height="20" colspan="2"><img src="images/righttop.jpg" width="598" height="20"></td>
</tr>
<tr>
<td width="589" align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> </tr>
</table>
<form action="addxsfkok.asp" method="post" name="addform" id="addform">
<table width="95%" border="0" cellpadding="0" cellspacing="0" class="w9pt">
<tr align="center">
<td colspan="6" class="W12pt"><div align="left"><img src="images/leftbiao3.gif" width="274" height="59"></div></td>
</tr>
<tr align="center">
<td colspan="6" class="W12pt"><img src="img/xsfkteacher.gif" width="500" height="60"></td>
</tr>
<tr align="left">
<td height="20" colspan="3" >
<div align="center"> <font color="#FF0000">
<%
depart=cint(request.Form("addone_id"))
teach=cint(request.Form("addtwo_id"))
strsql="select * from department where id="&depart
set rs=db.execute(strsql)
depart=rs("department")
strsql="select * from teacher where id="&teach
set rs=db.execute(strsql)
teach=rs("teachername")
response.write "所选院别:"&depart&" 教师姓名:"&teach
%>
</font>
<input name="depart" type="hidden" id="depart" value="<%=depart%>">
<input name="teach" type="hidden" id="teach" value="<%=teach%>">
</div></td>
</tr>
<tr align="left">
<td colspan="3" >
<div align="center">
<%
connstr="DBQ="+server.mappath("database/HRBU.mdb")+";DRIVER={Microsoft Access Driver (*.mdb)}"
Set conn= Server.CreateObject("ADODB.Connection")
conn.open connstr
sql = "select * FROM TEACHERCOURSE where teachername='"&teach&"' and department='"&depart&"'order by ID desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1%>
<script language = "JavaScript">
var onecount1;
onecount1=0;
subcat1 = new Array();
<%count = 0
do while not rs.eof%>
subcat1[<%=count%>] = new Array("<%= trim(rs("COURSE"))%>","<%= trim(rs("TERMID"))%>","<%= trim(rs("ID"))%>");
<%count = count + 1
rs.movenext
loop
rs.close
set rs=nothing%>
onecount1=<%=count%>;
function changelocation1(addone)
{
document.addform.addtwo_id.length = 0;
var addone_id=addone_id;
var i;
document.addform.addtwo_id.options[0] = new Option('请选择教师课程','');
for (i=0;i < onecount1; i++)
{
if (subcat1[i][1] == addone)
{
document.addform.addtwo_id.options[document.addform.addtwo_id.length] = new Option(subcat1[i][0], subcat1[i][2]);
}
}
}
</script>
</div>
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td height="40" colspan="4"><div align="center">
<select name="addone_id" onChange="changelocation1(document.addform.addone_id.options[document.addform.addone_id.selectedIndex].value)">
<option value="" selected>请选择教师开课学期</option>
<%
sql="select * from TERM order by ID desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
while not rs.eof%>
<option value="<%=rs("id")%>"><%=rs("TERM")%></option>
<%rs.movenext
wend
rs.Close()
%>
</select>
<select name="addtwo_id">
<option selected value="">请选择教师课程</option>
</select>
</div></td>
</tr>
<tr>
<td width="27%" height="40" class="9ptred"><div align="right">标题 </div></td>
<td width="4%" class="w9pt"> </td>
<td height="40" colspan="2">
<input name="xsfk_title" type="text" id="xsfk_title" size="30">
</td>
</tr>
<tr>
<td colspan="2" class="9ptred">
<div align="right">反馈内容<img src="images/xin.gif" width="32" height="32"></div></td>
<td colspan="2">
<div align="left">
<textarea name="xsfk_body" cols="40" rows="16" id="xsfk_body"></textarea>
</div></td>
</tr>
<tr>
<td height="40" colspan="2"><div align="center">
</div></td>
<td width="35%" height="40"><div align="center">
<input type="reset" name="Submit" value="重置">
</div></td>
<td width="34%"><input type="submit" name="Submit2" value="提交"></td>
</tr>
</table>
<script language="javascript">
changelocation1(document.addform.addone_id.options[document.addform.addone_id.selectedIndex].value);
</script>
</td>
</tr>
<tr align="center">
<td colspan="3" > </td>
</tr>
<tr align="center"> </tr>
<tr>
<td colspan="3" align="center"></td>
</tr>
</table>
</form></td>
<td width="9" rowspan="3" background="images/rightright.jpg"></td>
</tr>
<tr> </tr>
</table>
</body>
</html>
<!--#include file="foot.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -