chengji.jsp~36~
上传用户:top0756
上传日期:2022-08-11
资源大小:6501k
文件大小:2k
源码类别:

Jsp/Servlet

开发平台:

VBScript

  1. <%@ page contentType="text/html; charset=GBK" %>
  2. <%@ page import="java.sql.*" %>
  3. <%@ page language="java" %>
  4. <%@ page import="java.util.*" %>
  5. <%@ page import="proj112.*" %>
  6. <jsp:useBean id="a" scope="page" class="proj112.dbconn"/>
  7. <html>
  8. <head>
  9. <title>
  10. chengji
  11. </title>
  12. </head>
  13. <body bgcolor="#ffffff">
  14.  <%
  15.     String xuehao=(String)session.getAttribute("id");
  16.     String sql="";
  17.     sql="SELECT b.学期号,b.课程号,b.课程名,b.学分,b.主讲教师,a.成绩,a.重修成绩 FROM chengji b,成绩关联 a where b.课程号=a.课程号 and a.stu_id='"+xuehao+"'";
  18.     ResultSet rs=a.executeQuery(sql);
  19.  %>
  20.     &nbsp; &nbsp; &nbsp;姓名:&nbsp;<font color="#0033FF"><%=session.getAttribute("stu_name") %> </font>  &nbsp; &nbsp; &nbsp;学号:&nbsp;<font color="#0033FF"><%=session.getAttribute("id") %></font><br>
  21.  <hr><br>
  22.    <center><font color="red">成绩表如下:<br>
  23.      <p align="center">
  24.       <table  width="100%" cellspacing="0" cellpadding="4" rules="all" bordercolor="#CC9966" border="1" id="dg_rxkb" style="background-color:White;border-color:#CC9966;border-width:1px;border-style:None;width:100%;border-collapse:collapse;">
  25.         <tr bgcolor="#9dcaf4">
  26.           <td align="center"><font color="990000">学期号</font></td>
  27.           <td align="center"><font color="990000">课程号</font></td>
  28.           <td align="center"><font color="990000">课程名</font></td>
  29.           <td align="center"><font color="990000">学分</font></td>
  30.           <td align="center"><font color="990000">主讲教师</font></td>
  31.           <td align="center"><font color="990000">成绩</font></td>
  32.           <td align="center"><font color="990000">重修成绩</font></td>
  33.       </tr>
  34.        <% while(rs.next())
  35.      { %>
  36.      <tr>
  37.        <td align="center"><%=rs.getString("学期号")%></td>
  38.        <td align="center"><%=rs.getString("课程号")%></td>
  39.        <td align="center"><%=rs.getString("课程名")%></td>
  40.        <td align="center"><%=rs.getString("学分")%></td>
  41.        <td align="center"><%=rs.getString("主讲教师")%></td>
  42.        <td align="center"><%=rs.getString("成绩")%></td>
  43.        <td align="center"><%=rs.getString("重修成绩")%></td>
  44.      </tr>
  45.     <%} %>
  46.     </table>
  47. </body>
  48. </html>