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

其他数据库

开发平台:

Java

  1. <%@ page language = "java" contentType = "text/html;charset=gb2312"%>
  2. <%@ page import = "java.sql.*" %>
  3. <jsp:useBean id = "sts" scope = "page" class = "wsxk.ConDB" />
  4. <%  int  signing =0;
  5. int  intPage;
  6. int currentPage = 1;
  7. int PageNumbers = 5;
  8. if(request.getParameter("page")!= null && request.getParameter("page")!="")
  9. {intPage = Integer.parseInt(request.getParameter("page"));
  10. currentPage=intPage;}
  11. else
  12. intPage = 1;
  13. int totalRecord = 0;
  14. ResultSet counters = sts.executeQuery("select count(*) as scoreid from score where stuid = '"+session.getValue("wnum")+"'");
  15. if(counters.next())
  16. {
  17. totalRecord = Integer.parseInt(counters.getString("scoreid"));
  18. }
  19. String couid1 = new String();
  20. String teaid1 = new String();
  21. String temterm = new String();
  22. String temcouid = new String();
  23. String temresult = new String();
  24. String temcouname = new String();
  25. %>
  26. <html>
  27. <head>
  28. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  29. <link href="_notes/aaa.css" rel="stylesheet" type="text/css">
  30. <style type="text/css">
  31. <!--
  32. @import url("_notes/ccc");
  33. .style1 {color: #FFFFFF}
  34. body,td,th {
  35. color: #FFFFFF;
  36. font-weight: bold;
  37. font-size: 12px;
  38. }
  39. a:link {
  40. color: #FFFFFF;
  41. }
  42. a:visited {
  43. color: #FFFFFF;
  44. }
  45. .style2 {
  46. font-size: 12px;
  47. color: #FFFFFF;
  48. }
  49. .style3 {font-size: 14px}
  50. -->
  51. </style>
  52. </HEAD>
  53. <BODY BGCOLOR=#0D85A6 BACKGROUND="images/bg.gif" >
  54. <br>
  55. <br>
  56. <TABLE WIDTH=750 height="500" BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0>
  57.   <TR>
  58.     <TD> <IMG SRC="images/spacer.gif" WIDTH=231 HEIGHT=1></TD>
  59.     <TD> <IMG SRC="images/spacer.gif" WIDTH=4 HEIGHT=1></TD>
  60.     <TD> <IMG SRC="images/spacer.gif" WIDTH=75 HEIGHT=1></TD>
  61.     <TD> <IMG SRC="images/spacer.gif" WIDTH=110 HEIGHT=1></TD>
  62.     <TD> <IMG SRC="images/spacer.gif" WIDTH=110 HEIGHT=1></TD>
  63.     <TD> <IMG SRC="images/spacer.gif" WIDTH=110 HEIGHT=1></TD>
  64.     <TD> <IMG SRC="images/spacer.gif" WIDTH=105 HEIGHT=1></TD>
  65.     <TD> <IMG SRC="images/spacer.gif" WIDTH=5 HEIGHT=1></TD>
  66.   </TR>
  67.   <TR>
  68.     <TD COLSPAN=4> <IMG SRC="images/temp_01.jpg" WIDTH=420 HEIGHT=15></TD>
  69.     <TD COLSPAN=4> <IMG SRC="images/temp_02.jpg" WIDTH=330 HEIGHT=15></TD>
  70.   </TR>
  71.   <TR>
  72.     <TD COLSPAN=8> <IMG SRC="images/temp_03.jpg" WIDTH=750 HEIGHT=5></TD>
  73.   </TR>
  74.   <TR>
  75.     <TD height="225">
  76.       <table width="231" border="0" cellspacing="0" cellpadding="0" height="225" background="images/left_top.jpg">
  77.         <tr>
  78.           <td width="231" height="225" valign="bottom">
  79.             <div align="center">
  80.               <p>&nbsp;</p>
  81.               <p>成绩查询</p>
  82.               <p>在这里您可以对成绩<br>
  83.           以及课表进行查询 </p>
  84.               <p> <font color="#2DFFFF" size="5"><strong> </strong></font></p>
  85.               <table width="200" border="1">
  86.                 <tr>
  87.                   <td><div align="center"><a href="studentwsxk.jsp">【网上选课】</a></div></td>
  88.                 </tr>
  89.                 <tr>
  90.                   <td><div align="center">【成绩查询】</div></td>
  91.                 </tr>
  92.                
  93.               </table>
  94.               <p> <strong><font color="#2DFFFF" size="5"> </font></strong></p>
  95.           </div></td>
  96.         </tr>
  97.       </table></TD>
  98.     <TD ROWSPAN=2> <IMG SRC="images/temp_05.jpg" WIDTH=4 HEIGHT=455></TD>
  99.     <TD COLSPAN=5 ROWSPAN=2>
  100.       <table width="510" border="0" cellspacing="0" cellpadding="0" height="455" background="images/main_bg.jpg">
  101.         <tr>
  102.           <td width="510">
  103.             <table width="510" border="0" cellspacing="0" cellpadding="0" height="455">
  104.               <tr>
  105.                 <td width="510" height="78">
  106.                   <div align="center"><img src="images/blank_banner.gif" width="468" height="60"></div>
  107.                 </td>
  108.               </tr>
  109.               <tr>
  110.                 <td valign="top">                  <div align="left">
  111.                   <table width="483" height="204" border="0">
  112.                     <tr>
  113.                       <td height="14" colspan="5"><a href="index1.htm">首页</a>&gt;<a href="index1.jsp">学生</a>&gt;<a href="studentcjcx.jsp">成绩查询</a>&gt;全部课表</td>
  114.                     </tr>
  115.                     <tr>
  116.                       <td height="16" colspan="5"><span class="style1">分页: 课程总数:<%=totalRecord%> <a href="studentqbkb.jsp?page=1">[首页]</a>
  117.                           <%
  118. if(intPage>1 && intPage<((totalRecord+PageNumbers)/PageNumbers))
  119. {
  120. out.print("<a href='studentqbkb.jsp?page=" + (intPage-1) + "'>[前页]&nbsp;&nbsp;</a>");
  121. out.print("<a href='studentqbkb.jsp?page=" + (intPage+1) +"'>[后页]&nbsp;&nbsp;</a>");
  122. out.print("<a href='studentqbkb.jsp?page=" + ((totalRecord+PageNumbers)/PageNumbers) + "'>[尾页]</a>");
  123. }
  124. if(intPage ==((totalRecord+PageNumbers)/PageNumbers))
  125. out.print("<a href='studentqbkb.jsp?page=" + (intPage-1) + "'>[前页]&nbsp;&nbsp;</a>");
  126. if(intPage == 1)
  127. {
  128. out.print("<a href='studentqbkb.jsp?page=" + (intPage+1) +"'>[后页]&nbsp;&nbsp;</a>");
  129. out.print("<a href='studentqbkb.jsp?page=" + ((totalRecord+PageNumbers)/PageNumbers) + "'>[尾页]</a>");
  130. }
  131. %>
  132.                           页次:<%=currentPage%>/<%=(totalRecord+PageNumbers)/PageNumbers%> <%=PageNumbers%>篇/页</span></td>
  133.                     </tr>
  134.                     <tr>
  135.                       <td colspan="5"></td>
  136.                     </tr>
  137.                     <tr valign="bottom">
  138.                       <td width="103" height="26"><div align="right">授课学年</div></td>
  139.                       <td width="107"><div align="center">课程名</div></td>
  140.                       <td width="58"><div align="center">成绩</div></td>
  141.                       <td width="71"><div align="right"></div></td>
  142.                       <td width="122">&nbsp;</td>
  143.                     </tr>
  144.                     <tr>
  145.                       <td colspan="5">
  146. <br>
  147. <form name="form1" method="post" action="">
  148.   <%String sql2 = "select couid,term,result from score where stuid = '"+session.getValue("wnum")+"' order by term asc";
  149. ResultSet rs2=sts.executeQuery(sql2);
  150. int i=0;
  151. int tmpid;
  152. while (rs2.next())
  153. {
  154. if(i >= (intPage-1)*PageNumbers && i < intPage*PageNumbers)
  155. {
  156. //tmpid =rs2.getInt("tcid");
  157. temcouid = rs2.getString("couid");
  158. temterm = rs2.getString("term");
  159. temresult = rs2.getString("result");
  160. //out.print("tttt");
  161. String sql4 = "select couname from course where couid = '"+temcouid+"'";
  162. ResultSet rs4=sts.executeQuery(sql4);
  163. while (rs4.next())
  164. {
  165. temcouname =rs4.getString("couname");
  166. //tmpteaid = rs4.getString("teaid");
  167. }
  168. out.print("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");%>第<%out.print(temterm);%>学年<%
  169. out.print("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");out.print(temcouname);
  170. out.print("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");out.print(temresult);
  171. out.print("<br>");out.print("<br>");out.print("<br>");
  172. /*String sql3 = "select couid,couname,coumark,couback from course where couid = '"+couid1+"'";
  173. ResultSet rs3=sts.executeQuery(sql3);
  174. while (rs3.next())
  175. {
  176. tmpcouid = rs3.getString("couid");
  177. out.print(rs3.getString("couback"));
  178. out.print("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
  179. out.print(rs3.getString("couname"));
  180. out.print("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
  181. out.print(rs3.getString("coumark"));
  182. String sql5 = "select teaid,couid from sc where stuid = '"+session.getValue("wnum")+"'";
  183. ResultSet rs5 = sts.executeQuery(sql5);
  184. while (rs5.next())
  185. {
  186. if (tmpteaid.trim().equals(rs5.getString("teaid"))&&tmpcouid.trim().equals(rs5.getString("couid")))
  187. {
  188. signing = 1;
  189. }
  190. }//out.print(" <input name="1" type="checkbox" id="1" value="1">");
  191. %>
  192.   <br>
  193.       <%//if (signing==0){out.print("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='studentwsxk2.jsp?xuan=" +tmpid + "'>选课</a>");}
  194.    //else {out.print("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;已选择");}
  195.   %>
  196.   <br>
  197.    <br>
  198.   <%
  199. }*/
  200. }//signing = 0;
  201. i++;
  202. }
  203. //out.print(rs3.getString("couback"));
  204. %>
  205.       <br>
  206.   </form>
  207. <br>
  208. <br></td>
  209.                     </tr>
  210.                   </table>
  211.                 </div></td>
  212.               </tr>
  213.             </table>
  214.           </td>
  215.         </tr>
  216.       </table>
  217.     </TD>
  218.     <TD ROWSPAN=2> <IMG SRC="images/temp_07.jpg" WIDTH=5 HEIGHT=455></TD>
  219.   </TR>
  220.   <TR>
  221.     <TD><table width="231" border="0" cellspacing="0" cellpadding="0" height="229" background="images/left_bottom.jpg">
  222.       <tr>
  223.         <td width="231" height="222">
  224.           <div align="center">
  225.             <table width="200" border="1">
  226.               <tr>
  227.                 <td><div align="center"><a href="lyb.jsp">【留言板】</a></div></td>
  228.               </tr>
  229.             </table>
  230.             <p>&nbsp; </p>
  231.             <p> <strong><font color="#2DFFFF" size="5"> </font></strong></p>
  232.             <p class="aaa"><a href="index1.htm" class="style3">[退出系统]</a></p>
  233.         </div></td>
  234.       </tr>
  235.     </table>
  236.     </TD>
  237.   </TR>
  238.   <TR>
  239.     <TD COLSPAN=8> <IMG SRC="images/temp_09.jpg" WIDTH=750 HEIGHT=5></TD>
  240.   </TR>
  241.   <TR>
  242.     <TD COLSPAN=8> <img src="images/temp_10.jpg" width=752 height=20></TD>
  243.   </TR>
  244. </TABLE>
  245. </BODY>
  246. </HTML>