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

📄 studentcjcx3.jsp

📁 网上选课程序:a.使用JSP/Servlet开发
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312"%>
<%@ page language="java" import="java.sql.*"%>
<%@ page import="java.util.*"%>
<%@ page import="java.io.*"%>

<%@ page import="java.lang.*"%>
<jsp:useBean id="subject" scope="page" class="wsxk.ConDB"/>
<%!
 String trans(String chi)
{
               String result = null;
               byte temp [];
               try
                {
                      temp=chi.getBytes("iso-8859-1");
                      result = new String(temp, "gb2312");
                }
                catch(Exception e)
                {
                        System.out.println (e.toString());
                }
                return result;
}
   //String  temid = new String();
  // String  couid1   = new String();
  // String  teaid1 = new String();
	//int temscid = 0;

String  teaname = new String();

%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="_notes/aaa.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
@import url("_notes/ccc");
body,td,th {
	font-size: 12px;
	color: #FFFFFF;
	font-weight: bold;
}
a {
	font-size: 12px;
	color: #FFFFFF;
}
a:visited {
	color: #FFFFFF;
}
.style1 {font-size: 14px}
-->
</style>
</HEAD>
<BODY BGCOLOR=#0D85A6 BACKGROUND="images/bg.gif" >

<br>
<br>
<TABLE WIDTH=750 height="494" BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0>
  <TR>
    <TD> <IMG SRC="images/spacer.gif" WIDTH=231 HEIGHT=1></TD>
    <TD> <IMG SRC="images/spacer.gif" WIDTH=4 HEIGHT=1></TD>
    <TD> <IMG SRC="images/spacer.gif" WIDTH=75 HEIGHT=1></TD>
    <TD> <IMG SRC="images/spacer.gif" WIDTH=110 HEIGHT=1></TD>
    <TD> <IMG SRC="images/spacer.gif" WIDTH=110 HEIGHT=1></TD>
    <TD> <IMG SRC="images/spacer.gif" WIDTH=110 HEIGHT=1></TD>
    <TD> <IMG SRC="images/spacer.gif" WIDTH=105 HEIGHT=1></TD>
    <TD> <IMG SRC="images/spacer.gif" WIDTH=5 HEIGHT=1></TD>
  </TR>
  <TR>
    <TD COLSPAN=4> <IMG SRC="images/temp_01.jpg" WIDTH=420 HEIGHT=15></TD>
    <TD COLSPAN=4> <IMG SRC="images/temp_02.jpg" WIDTH=330 HEIGHT=15></TD>
  </TR>
  <TR>
    <TD COLSPAN=8> <IMG SRC="images/temp_03.jpg" WIDTH=750 HEIGHT=5></TD>
  </TR>
  <TR>
    <TD>
      <table width="231" border="0" cellspacing="0" cellpadding="0" height="226" background="images/left_top.jpg">
        <tr>
          <td width="231">
            <div align="center">
              <p>&nbsp;</p>
              <p>&nbsp;</p>
              <p> 总选课单 <br>
                <br>
                <br>
              <font color="#2DFFFF" size="5"><strong> </strong></font></p>
              <table width="200" border="1">
                <tr>
                  <td><div align="center"><a href="studentwsxk.jsp">【网上选课】</a></div></td>
                </tr>
                <tr>
                  <td><div align="center"><a href="studentcjcx.jsp">【成绩查询】</a></div></td>
                </tr>
                <tr>
                  <td><div align="center">【书籍购买】</div></td>
                </tr>
              </table>
              <p>  <strong><font color="#2DFFFF" size="5"> </font></strong></p>
            </div>          </td>
        </tr>
      </table>
    </TD>
    <TD ROWSPAN=2> <IMG SRC="images/temp_05.jpg" WIDTH=4 HEIGHT=455></TD>
    <TD COLSPAN=5 ROWSPAN=2>
      <table width="510" border="0" cellspacing="0" cellpadding="0" height="455" background="images/main_bg.jpg">
        <tr>
          <td width="510">
            <table width="510" border="0" cellspacing="0" cellpadding="0" height="455">
              <tr>
                <td width="510" height="78">
                  <div align="center"><img src="images/blank_banner.gif" width="468" height="60"></div>
                </td>
              </tr>
              <tr>
                <td valign="top">
                  <div align="left"></div>                  <table width="91%" height="66" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td height="2" colspan="7">
                        <p>                          <a href="index1.htm">首页</a>&gt;<a href="index1.jsp">学生</a>&gt;<a href="studentcjcx.jsp">成绩查询</a><br>
                          <br>
</p>
                        <div align="center"></div></td>
                    </tr>
                    <tr>
                      <td height="3" colspan="7"><% String sql = "select stuname  from student where stuid = '"+session.getValue("wnum")+"'";
	ResultSet rs=subject.executeQuery(sql);
	while (rs.next())
{
	out.print(rs.getString("stuname"));
	teaname = rs.getString("stuname");
}

%>
同学 :</td>
                    </tr>
                    <tr>
                      <td height="5" colspan="7"><div align="center">您所查询的学期所有课程成绩如下<br>
                        <br>
                      </div></td>
                    </tr>
                    <tr>
                      <td width="10%" height="11"><div align="center"></div></td>
                      <td width="12%">&nbsp;</td>
                      <td width="19%"><div align="center">课程名称</div></td>
                      <td width="23%"><div align="center"></div></td>
                      <td width="13%"><div align="center">成绩</div></td>
                      <td width="12%"><div align="center"></div></td>
                      <td width="11%"><div align="center"></div></td>
                    </tr>
                    <tr>
                      <td height="22" colspan="7"><div align="left"><br>
                          <% String temterm = new String (request.getParameter("select2"));
						temterm=temterm.trim();
temterm=trans(temterm);
System.out.println (temterm);
String temcouid = new String();
String temcouname = new String();
String result = new String();
String term = new String();
int temno=0;
/*String sql1 = "select couid,term from course where couname = '"+couname+"'";
ResultSet rs1 = subject.executeQuery(sql1);
while(rs1.next())
	{
		temcouid = rs1.getString("couid");
	}
rs1.close();*/
String sql2 = "select result,couid from score where term =	'"+temterm+"'and stuid = '"+session.getValue("wnum")+"'";
ResultSet rs2 = subject.executeQuery(sql2);
while(rs2.next())
{temno=1;
		result = rs2.getString("result");
		temcouid = rs2.getString("couid");
		String sql1 = "select couname from course where couid = '"+temcouid+"'";
ResultSet rs1 = subject.executeQuery(sql1);
while(rs1.next())
	{
		temcouname = rs1.getString("couname");
		out.print("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
		out.print("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
		out.print(temcouname);
		out.print("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
		out.print("&nbsp;&nbsp;&nbsp;&nbsp;");
		out.print("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
		out.print(result);
		out.print("<br><br>");
	}
rs1.close();
	}
rs2.close();

if (temno==0)
response.sendRedirect("studentcjcxerr2.htm");

%>

<%
						/*//String sql2 = "select couid,couname,coumark,couback from course where couid in (select couid from tc where teaid = '"+session.getValue("wnum")+"')";
					  					String sql2 = "select scid,teaid,couid from sc where stuid = '"+session.getValue("wnum")+"'";
	ResultSet rs2=subject.executeQuery(sql2);
	while (rs2.next())
{	temscid = rs2.getInt("scid");
	out.print ("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
	out.print ("<a href='studentxkd2.jsp?tuixuan=" +temscid + "'>退选</a>");
	teaid1 = rs2.getString("teaid");
	String  sql4 = "select teaname from teacher where teaid = '"+teaid1+"'";
	ResultSet rs4 = subject.executeQuery(sql4);
	while (rs4.next())
	{
		out.print ("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
		out.print (rs4.getString("teaname"));
	}

	couid1 = rs2.getString("couid");
	//out.print("tttt");
	String sql3 = "select couid,couname,coumark,couback from course where couid = '"+couid1+"'";
	ResultSet rs3=subject.executeQuery(sql3);
	while (rs3.next())
	{out.print("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
	out.print(rs3.getString("couback"));
	out.print("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
	out.print(rs3.getString("couname"));
	out.print("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
	out.print(rs3.getString("coumark"));
	//out.print(rs3.getString("couback"));

	} */ %>
                          <br>
                          <br>
                          (以上为第<%out.print(temterm);%>
                          学年成绩)<br>
                      </div></td></tr>
                    <tr>
                      <td colspan="7">&nbsp;</td>
                    </tr>
                                        </table></td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </TD>
    <TD ROWSPAN=2> <IMG SRC="images/temp_07.jpg" WIDTH=5 HEIGHT=455></TD>
  </TR>
  <TR>
    <TD>
      <table width="231" border="0" cellspacing="0" cellpadding="0" height="229" background="images/left_bottom.jpg">
        <tr>
          <td width="231" height="222">
            <div align="center">
              <table width="200" border="1">
                <tr>
                  <td><div align="center"><a href="lyb.jsp">【留言板】</a></div></td>
                </tr>
              </table>
              <p>  <font color="#2DFFFF" size="5"> </font></p>
              <p>&nbsp;  </p>
              <p> <strong><font color="#2DFFFF" size="5"> </font></strong></p>
              <p class="aaa"><a href="index1.htm" class="style1">[退出系统]</a></p>
            </div>
          </td>
        </tr>
      </table>
    </TD>
  </TR>
  <TR>
    <TD COLSPAN=8> <IMG SRC="images/temp_09.jpg" WIDTH=750 HEIGHT=5></TD>
  </TR>
  <TR>
    <TD COLSPAN=8> <img src="images/temp_10.jpg" width=752 height=20></TD>
  </TR>
</TABLE>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -