📄 tea_addwork.asp
字号:
document.writeln(" document."+ _FormName +"."+_SName3+".value=\""+_SValue3+"\"");
document.writeln(" }");
document.writeln(" }");
document.writeln(" }");
document.writeln(" catch(e){");
document.writeln(" }");
document.writeln("}");
document.writeln("window.attachEvent(\"onload\","+_SName1+"SetValue)");
document.writeln("\/\/-->");
document.writeln("<\/script>");
}
//-->
</script>
<%
dim SelectStr
SelectStr = ""
dim sql1,sql2,sql3
dim rs1,rs2,rs3
dim i1,i2,i3
'使用缓存,application("liststr"),将添加,编辑或删除一个数据时,用application("liststr") = empty清空缓存
application("liststr") = empty
if isempty(application("liststr")) then
'//一级分类开始
sql1="select distinct c.cid,c.cname,d.did,d.dname from class c,department d,teacher t,tea_sub ts where ts.ts_tea_user=t.tuser and ts.ts_cla_id=c.cid and c.dep_id=d.did and t.tuser='"&master25175&"' order by c.cid asc"
set rs1 = conn.execute(sql1)
i1 = 0
if rs1.eof and rs1.bof then SelectStr = SelectStr & "没有数据 @0{{无相关数据@0((无相关数据@0"
while not rs1.eof
if i1 > 0 then
SelectStr = SelectStr & "||"
end if
'SelectStr = SelectStr & rs1("dname") & rs1("cname") & "{{"
'显示与值不同时,用下面一行
SelectStr = SelectStr & rs1("dname") & rs1("cname") & "@"& rs1("cid") &"{{"
'//二级分类开始
sql2="select distinct t.tid,t.tname from term t,bw_class bw where bw.ter_id=t.tid and bw.dep_id="&rs1("did")&" order by t.tid asc"
set rs2 = conn.execute(sql2)
i2 = 0
if rs2.eof and rs2.bof then
SelectStr = SelectStr & "无相关数据@0((无相关数据@0"
else
while not rs2.eof
if i2 > 0 then
SelectStr = SelectStr & "**"
end if
'SelectStr = SelectStr & rs2("tname") & "(("
'显示与值不同时,用下面一行
SelectStr = SelectStr & rs2("tname") & "@"& rs2("tid") &"(("
'//三级分类开始
sql3="select distinct bcid,bwname from bw_class where ter_id="&rs2("tid")&" and dep_id="&rs1("did")&" order by bcid asc"
set rs3 = conn.execute(sql3)
i3 = 0
if rs3.eof and rs3.bof then
SelectStr = SelectStr & "无相关数据@0"
else
while not rs3.eof
if i3 > 0 then
SelectStr = SelectStr & "^"
end if
'SelectStr = SelectStr & rs3("bwname")
'显示与值不同时,用下面一行
SelectStr = SelectStr & rs3("bwname") & "@" & rs3("bcid")
i3 = i3 + 1
rs3.movenext
wend
end if
rs3.close
set rs3 = nothing
'//三级分类结束
i2 = i2 + 1
rs2.movenext
wend
end if
rs2.close
set rs2 = nothing
'//二级分类结束
i1 = i1 + 1
rs1.movenext
wend
rs1.close
set rs1 = nothing
application("liststr") = SelectStr
end if
'//一级分类结束
%>
<SCRIPT LANGUAGE="JavaScript">
<!--
var AllStr1 = "<% = application("liststr") %>"
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
CreateSelect("","set_cla_id|set_ter_id|set_bwc_id","","请选择班级@0|请选择学期@0|请选择考试项目@0",AllStr1,0);
</SCRIPT> <select name="set_sub_id" id="set_sub_id">
<option value="0">请选择课程</option>
<%
set rs=conn.execute("select distinct s.sid,s.sname from subject s,tea_sub t where t.ts_sub_id=s.sid and t.ts_tea_user='"&master25175&"'")
if rs.eof and rs.bof then
response.write"<option value='0'>-没有任课-</option>"
else
do while not rs.eof
if rs("sid")=set_sub_id then
response.write"<option value='"&rs("sid")&"' selected>"&rs("sname")&"</option>"
else
response.write"<option value='"&rs("sid")&"'>"&rs("sname")&"</option>"
end if
rs.movenext
loop
end if
set rs=nothing
%>
</select></td>
<td><input type="submit" name="Submit4" value="设定"></td>
</tr>
</form>
<tr>
<td colspan="2"><li><strong>当前设定:</strong>
<%
set rs=conn.execute("select d.dname,c.cname,t.tname,bw.bwname,s.sname from department d,class c,term t,bw_class bw,subject s where c.dep_id=d.did and c.cid="&set_cla_id&" and c.cid="&set_cla_id&" and t.tid="&set_ter_id&" and bw.bcid="&set_bwc_id&" and s.sid="&set_sub_id&"")
if rs.eof and rs.bof then
response.write"<font color='#ff0000'>未设定或条件参数不足,请重新设定!</font>"
else
response.write "<font color='#0000ff'>"&rs("dname")&rs("cname")&rs("tname")&rs("bwname")&rs("sname")&"</font>"
end if
set rs=nothing
%>
</td>
</tr>
</table>
<%
end if
%>
<td>
<td><div align="center"><img src="images/index_34.gif" height="70" alt=""></div></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="419" valign="top">
<%
if master25175<>"" then
%> <form name="form1" method="post" action="tea_savework.asp">
<table width="100%" align="center" cellpadding="2" cellspacing="0" <%=table_com%>>
<tr>
<%
i=0
set rs=conn.execute("select suser,sname from student where cla_id="&set_cla_id&"")
do while not rs.eof
i=i+1
response.write"<td><font color='#ff0000'>"&i&"</font> "&rs("sname")&"</td><td><input name='buser"&i&"' type='hidden' id='buser' size='2' value='"&rs("suser")&"'><input name='bresult"&i&"' type='text' id='bresult"&i&"' size='4'></td>"
rs.movenext
if i mod 4=0 then
response.write"</tr><tr>"
end if
loop
set rs=nothing
%>
</tr>
<tr>
<td height="50" colspan="8"><div align="center">
<input type="submit" name="Submit3" value="录入全班平时成绩">
<input name="bbs_count" type="hidden" id="bbs_count" value="<%=i%>" size="2">
<input name="cla_id" type="hidden" id="cla_id" value="<%=set_cla_id%>" size="2">
<input name="sub_id" type="hidden" id="sub_id" value="<%=set_sub_id%>" size="2">
<input name="ter_id" type="hidden" id="ter_id" value="<%=set_ter_id%>" size="2">
<input name="bwc_id" type="hidden" id="bwc_id" value="<%=set_bwc_id%>" size="2">
</div></td>
</tr>
</table>
</form>
<%
end if
%></td>
</tr>
<tr>
<td height="18"><div align="center"></div></td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><img src="images/index_78.gif" alt="" width="620" height="24"></td>
</tr>
</table></td>
<td width="43"><img src="images/index_22.gif" width="43" height="579" alt=""></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><!--#include file="bottom.asp" -->
</td>
</tr>
</table></td>
</tr>
</table>
<!-- End ImageReady Slices -->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -