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

📄 tea_work.asp

📁 学生帐号是由管理员统一管理
💻 ASP
📖 第 1 页 / 共 2 页
字号:
		  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>&nbsp;</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 + -