?? tea_work.asp
字號:
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("","cla_id|ter_id|bwc_id","","請選擇班級@0|請選擇學期@0|請選擇考試項目@0",AllStr1,0);
</SCRIPT> <select name="sub_id" id="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
response.write"<option value='"&rs("sid")&"'>"&rs("sname")&"</option>"
rs.movenext
loop
end if
set rs=nothing
%>
</select>
</td>
<td><input type="submit" name="Submit3" value="查詢成績"></td>
</tr>
</table>
</form>
<%
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
%>
<table width="100%" align="center" cellpadding="2" cellspacing="0" <%=table_com%>>
<tr>
<td><div align="center"><strong>姓 名</strong></div></td>
<td><div align="center"><strong>課 程</strong></div></td>
<td><div align="center"><strong>成 績</strong></div></td>
<td><div align="center"><strong>學期
</strong></div>
<div align="center"></div></td>
<td><div align="center"><strong>考試項目</strong></div></td>
<td><div align="center"><strong>操 作</strong></div></td>
</tr>
<%
dim totaluser,page,pages,i,sql_ids,cla_id,ter_id,bwc_id,sub_id
cla_id=request.form("cla_id")
ter_id=request.form("ter_id")
bwc_id=request.form("bwc_id")
sub_id=request.form("sub_id")
if cla_id="" then
sql_ids=" and c.cid=0 " '不指定班級則不顯示學生,下同
else
sql_ids=" and c.cid="&cla_id&" "
end if
if ter_id="" then
sql_ids=sql_ids&" and t.tid=0 "
else
sql_ids=sql_ids&" and t.tid="&ter_id&" "
end if
if bwc_id="" then
sql_ids=sql_ids&" and bw.bcid=0 "
else
sql_ids=sql_ids&" and bw.bcid="&bwc_id&" "
end if
if sub_id="" then
sql_ids=sql_ids&" and sub.sid=0 "
else
sql_ids=sql_ids&" and sub.sid="&sub_id&" "
end if
set rs= Server.CreateObject("ADODB.Recordset")
rs.open ("select s.sname,sub.sname,b.bid,b.bresult,t.tname,bw.bwname from "&_
"student s,busywork b,subject sub,bw_class bw,term t,class c where "&_
"b.suser=s.suser and s.cla_id=c.cid and b.sub_id=sub.sid and b.bwc_id=bw.bcid and bw.ter_id=t.tid "&sql_ids&" order by s.sid asc"),conn,1,1
if rs.eof and rs.bof then
page=1
pages=1
totaluser=0
response.write"<tr><td width='100%' height='100' align='center' colspan='6'>沒有相關的平時成績</td></tr>"
else
totaluser=rs.recordcount '總的條數
rs.pagesize=15 '每頁顯示的條數
pages=rs.pagecount '總的找到頁數
page=request("page") '當前頁
if page="" then
page=1
elseif page<1 then
page=1
end if
page=cint(page)
if page>pages then page=pages
rs.absolutepage=page
do while not rs.eof and i<rs.pagesize
i=i+1
%>
<tr>
<td><div align="center"><%=rs(0)%></div></td>
<td><div align="center"><%=rs(1)%></div></td>
<td><div align="center"><%=rs("bresult")%></div></td>
<td><div align="center"><%=rs("tname")%></div></td>
<td><div align="center"><%=rs("bwname")%></div></td>
<td><div align="center"><a href="tea_editwork.asp?id=<%=rs("bid")%>">成績修改</a>
</div></td>
</tr>
<%
rs.movenext
loop
end if
set rs=nothing
%>
</table>
<%
end if
%>
</td>
</tr>
<tr>
<td height="18">
<div align="center">
<%
if pages>1 then
response.write"<table align='center' cellspacing='0' cellpadding='0' border='0' width='100%'>"&_
"<form method='POST' action='?cla_id="&cla_id&"'>"&_
"<tr><td height='15' width='50%'>共<font color='red'>"&totaluser&"</font>人 <font color='red'>"&pages&"</font>頁 第<font color='red'>"&page&"</font>頁 "&_
" <input type='text' name='page' size='5' maxlength='4'> <input type='submit' value='GO' name='B1'></td><td align='right' width='50%' height='15'>"
if page>1 then
response.write"<a href='?page=1&cla_id="&cla_id&"'>首頁</a> "&_
"<a href='?page="&page-1&"&cla_id="&cla_id&"'>上一頁</a> "
else
response.write"首頁 上一頁 "
end if
if page<pages then
response.write"<a href='?page="&page+1&"&cla_id="&cla_id&"'>下一頁</a> "&_
"<a href='?page="&pages&"&cla_id="&cla_id&"'>尾頁</a>"
else
response.write"下一頁 尾頁"
end if
response.write"</td></tr></form></table>"
end if
%>
</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 + -