teacherkccx.jsp
上传用户:mkymky1985
上传日期:2014-06-23
资源大小:754k
文件大小:7k
源码类别:

其他数据库

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312"%>
  2. <%@ page language="java" import="java.sql.*"%>
  3. <%@ page import="java.util.*"%>
  4. <%@ page import="java.io.*"%>
  5. <%@ page import="java.lang.*"%>
  6. <jsp:useBean id="subject" scope="page" class="wsxk.ConDB"/>
  7. <% String  teaname = new String();
  8.    String  couid1   = new String();
  9. %>
  10. <html>
  11. <head>
  12. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  13. <link href="_notes/aaa.css" rel="stylesheet" type="text/css">
  14. <style type="text/css">
  15. <!--
  16. @import url("_notes/ccc");
  17. body,td,th {
  18. font-size: 12px;
  19. color: #FFFFFF;
  20. font-weight: bold;
  21. }
  22. a {
  23. font-size: 12px;
  24. color: #FFFFFF;
  25. }
  26. a:visited {
  27. color: #FFFFFF;
  28. }
  29. .style1 {font-size: 14px}
  30. -->
  31. </style>
  32. </HEAD>
  33. <BODY BGCOLOR=#0D85A6 BACKGROUND="images/bg.gif" >
  34. <br>
  35. <br>
  36. <TABLE WIDTH=750 height="494" BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0>
  37.   <TR>
  38.     <TD> <IMG SRC="images/spacer.gif" WIDTH=231 HEIGHT=1></TD>
  39.     <TD> <IMG SRC="images/spacer.gif" WIDTH=4 HEIGHT=1></TD>
  40.     <TD> <IMG SRC="images/spacer.gif" WIDTH=75 HEIGHT=1></TD>
  41.     <TD> <IMG SRC="images/spacer.gif" WIDTH=110 HEIGHT=1></TD>
  42.     <TD> <IMG SRC="images/spacer.gif" WIDTH=110 HEIGHT=1></TD>
  43.     <TD> <IMG SRC="images/spacer.gif" WIDTH=110 HEIGHT=1></TD>
  44.     <TD> <IMG SRC="images/spacer.gif" WIDTH=105 HEIGHT=1></TD>
  45.     <TD> <IMG SRC="images/spacer.gif" WIDTH=5 HEIGHT=1></TD>
  46.   </TR>
  47.   <TR>
  48.     <TD COLSPAN=4> <IMG SRC="images/temp_01.jpg" WIDTH=420 HEIGHT=15></TD>
  49.     <TD COLSPAN=4> <IMG SRC="images/temp_02.jpg" WIDTH=330 HEIGHT=15></TD>
  50.   </TR>
  51.   <TR>
  52.     <TD COLSPAN=8> <IMG SRC="images/temp_03.jpg" WIDTH=750 HEIGHT=5></TD>
  53.   </TR>
  54.   <TR>
  55.     <TD>
  56.       <table width="231" border="0" cellspacing="0" cellpadding="0" height="226" background="images/left_top.jpg">
  57.         <tr>
  58.           <td width="231">
  59.             <div align="center">
  60.               <p>&nbsp;</p>
  61.               <p>&nbsp;</p>
  62.               <p>课程查询</p>
  63.               <p>  <font color="#2DFFFF" size="5"><strong> </strong></font></p>
  64.               <table width="200" border="1">
  65.                 <tr>
  66.                   <td><div align="center">【课程查询】</div></td>
  67.                 </tr>
  68.                 <tr>
  69.                   <td><div align="center"><a href="teacherqbkb.jsp">【全部课表】</a></div></td>
  70.                 </tr>
  71.               </table>
  72.               <p>  <strong><font color="#2DFFFF" size="5"> </font></strong></p>
  73.             </div>          </td>
  74.         </tr>
  75.       </table>
  76.     </TD>
  77.     <TD ROWSPAN=2> <IMG SRC="images/temp_05.jpg" WIDTH=4 HEIGHT=455></TD>
  78.     <TD COLSPAN=5 ROWSPAN=2>
  79.       <table width="510" border="0" cellspacing="0" cellpadding="0" height="455" background="images/main_bg.jpg">
  80.         <tr>
  81.           <td width="510">
  82.             <table width="510" border="0" cellspacing="0" cellpadding="0" height="455">
  83.               <tr>
  84.                 <td width="510" height="78">
  85.                   <div align="center"><img src="images/blank_banner.gif" width="468" height="60"></div>
  86.                 </td>
  87.               </tr>
  88.               <tr>
  89.                 <td valign="top">
  90.                   <div align="left"></div>                  <table width="91%" height="66" border="0" cellpadding="0" cellspacing="0">
  91.                     <tr>
  92.                       <td height="2" colspan="5">
  93.                         <p>                          <a href="index1.htm">首页</a>&gt;<a href="index2.jsp">教师</a>&gt;课程查询<br>
  94.                           <br>
  95. </p>
  96.                         <div align="center"></div></td>
  97.                     </tr>
  98.                     <tr>
  99.                       <td height="3" colspan="5"><% String sql = "select teaname from teacher where teaid = '"+session.getValue("wnum")+"'";
  100. ResultSet rs=subject.executeQuery(sql);
  101. while (rs.next())
  102. {
  103. out.print(rs.getString("teaname"));
  104. teaname = rs.getString("teaname");
  105. }
  106. %>
  107. 老师 :</td>
  108.                     </tr>
  109.                     <tr>
  110.                       <td height="5" colspan="5"><div align="center">您这学期所开的课程如下<br>
  111.                         <br>
  112.                       </div></td>
  113.                     </tr>
  114.                     <tr>
  115.                       <td width="20%" height="11"><div align="center"></div></td>
  116.                       <td width="21%"><div align="center">课程编号</div></td>
  117.                       <td width="24%"><div align="center">课程名称</div></td>
  118.                       <td width="24%"><div align="center">学分</div></td>
  119.                       <td width="11%"><div align="center"></div></td>
  120.                     </tr>
  121.                     <tr>
  122.                       <td height="22" colspan="5"><br>
  123.                         <% //String sql2 = "select couid,couname,coumark,couback from course where couid in (select couid from tc where teaid = '"+session.getValue("wnum")+"')";
  124.    String sql2 = "select couid from tc where teaid = '"+session.getValue("wnum")+"'";
  125. ResultSet rs2=subject.executeQuery(sql2);
  126. while (rs2.next())
  127. {
  128. couid1 = rs2.getString("couid");
  129. //out.print("tttt");
  130. String sql3 = "select couid,couname,coumark,couback from course where couid = '"+couid1+"'";
  131. ResultSet rs3=subject.executeQuery(sql3);
  132. while (rs3.next())
  133. {out.print("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
  134. out.print(rs3.getString("couid"));
  135. out.print("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
  136. out.print(rs3.getString("couname"));
  137. out.print("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
  138. out.print(rs3.getString("coumark"));
  139. //out.print(rs3.getString("couback"));
  140. }  %>
  141.                         <br>
  142.                         <%
  143. //couid1 = rs2.getString("couid");
  144. //teaname = rs.getString("teaname");
  145. }
  146. /*String sql3 = "select couid,couname,coumark,couback from course where couid = '"+couid1+"'";
  147. ResultSet rs3=subject.executeQuery(sql3);
  148. while (rs3.next())
  149. {
  150. out.print("tttt");
  151. }*/
  152.   %></td>
  153.                     </tr>
  154.                     <tr>
  155.                       <td colspan="5">&nbsp;</td>
  156.                     </tr>
  157.                                         </table></td>
  158.               </tr>
  159.             </table>
  160.           </td>
  161.         </tr>
  162.       </table>
  163.     </TD>
  164.     <TD ROWSPAN=2> <IMG SRC="images/temp_07.jpg" WIDTH=5 HEIGHT=455></TD>
  165.   </TR>
  166.   <TR>
  167.     <TD>
  168.       <table width="231" border="0" cellspacing="0" cellpadding="0" height="229" background="images/left_bottom.jpg">
  169.         <tr>
  170.           <td width="231" height="222">
  171.             <div align="center">
  172.               <p>  <font color="#2DFFFF" size="5"> </font></p>
  173.               <p>&nbsp;  </p>
  174.               <p> <strong><font color="#2DFFFF" size="5"> </font></strong></p>
  175.               <p class="aaa"><a href="index1.htm" class="style1">[退出系统]</a></p>
  176.             </div>
  177.           </td>
  178.         </tr>
  179.       </table>
  180.     </TD>
  181.   </TR>
  182.   <TR>
  183.     <TD COLSPAN=8> <IMG SRC="images/temp_09.jpg" WIDTH=750 HEIGHT=5></TD>
  184.   </TR>
  185.   <TR>
  186.     <TD COLSPAN=8> <img src="images/temp_10.jpg" width=752 height=20></TD>
  187.   </TR>
  188. </TABLE>
  189. </BODY>
  190. </HTML>