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

其他数据库

开发平台:

Java

  1. <%@ page language = "java" contentType = "text/html;charset=gb2312"%>
  2. <%@ page import = "java.sql.*, java.io.*" %>
  3. <jsp:useBean id="subject" scope="page" class="wsxk.ConDB"/>
  4. <%! String trans(String chi)
  5. {
  6.                String result = null;
  7.                byte temp [];
  8.                try
  9.                 {
  10.                       temp=chi.getBytes("iso-8859-1");
  11.                       result = new String(temp, "gb2312");
  12.                 }
  13.                 catch(UnsupportedEncodingException e)
  14.                 {
  15.                         System.out.println (e.toString());
  16.                 }
  17.                 return result;
  18. }
  19. %>
  20. <%
  21. //String strSQL = "select id ,title from news order by id desc";
  22. //ResultSet rs = sts.executeQuery(strSQL);
  23. String temstuname = new String();
  24. temstuname = request.getParameter("select");
  25. temstuname = temstuname.trim();
  26. temstuname = trans(temstuname);
  27. String temstuid = new String();
  28. String temstuno = new String();
  29. String temstupsw = new String();
  30. String temstugrade = new String();
  31. String strSQL = "select stuid ,stuno,stupsw,stugrade from student where stuname = '"+temstuname+"'";
  32. ResultSet rs = subject.executeQuery(strSQL);
  33. while(rs.next())
  34. {
  35. temstuid = rs.getString("stuid");
  36.             temstuno = rs.getString("stuno");
  37. temstupsw=  rs.getString("stupsw");
  38. temstugrade = rs.getString("stugrade");
  39. }
  40. rs.close();
  41. //String strSQL2 = "delete from news where id =" + k;
  42.      //sts.executeUpdate(strSQL2);
  43. %>
  44. <html>
  45. <head>
  46. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  47. <link href="_notes/aaa.css" rel="stylesheet" type="text/css">
  48. <style type="text/css">
  49. <!--
  50. @import url("_notes/ccc");
  51. body,td,th {
  52. color: #FFFFFF;
  53. font-weight: bold;
  54. font-size: 12px;
  55. }
  56. a:link {
  57. color: #FFFFFF;
  58. }
  59. a:visited {
  60. color: #FFFFFF;
  61. }
  62. -->
  63. </style>
  64. </HEAD>
  65. <BODY BGCOLOR=#0D85A6 BACKGROUND="images/bg.gif" >
  66. <br>
  67. <br>
  68. <TABLE WIDTH=750 height="494" BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0>
  69.   <TR>
  70.     <TD> <IMG SRC="images/spacer.gif" WIDTH=231 HEIGHT=1></TD>
  71.     <TD> <IMG SRC="images/spacer.gif" WIDTH=4 HEIGHT=1></TD>
  72.     <TD> <IMG SRC="images/spacer.gif" WIDTH=75 HEIGHT=1></TD>
  73.     <TD> <IMG SRC="images/spacer.gif" WIDTH=110 HEIGHT=1></TD>
  74.     <TD> <IMG SRC="images/spacer.gif" WIDTH=110 HEIGHT=1></TD>
  75.     <TD> <IMG SRC="images/spacer.gif" WIDTH=110 HEIGHT=1></TD>
  76.     <TD> <IMG SRC="images/spacer.gif" WIDTH=105 HEIGHT=1></TD>
  77.     <TD> <IMG SRC="images/spacer.gif" WIDTH=5 HEIGHT=1></TD>
  78.   </TR>
  79.   <TR>
  80.     <TD COLSPAN=4> <IMG SRC="images/temp_01.jpg" WIDTH=420 HEIGHT=15></TD>
  81.     <TD COLSPAN=4> <IMG SRC="images/temp_02.jpg" WIDTH=330 HEIGHT=15></TD>
  82.   </TR>
  83.   <TR>
  84.     <TD COLSPAN=8> <IMG SRC="images/temp_03.jpg" WIDTH=750 HEIGHT=5></TD>
  85.   </TR>
  86.   <TR>
  87.     <TD>
  88.       <table width="231" border="0" cellspacing="0" cellpadding="0" height="226" background="images/left_top.jpg">
  89.         <tr>
  90.           <td width="231" valign="bottom">
  91.             <div align="center">
  92.               <p><br>
  93.               </p>
  94.               <p>【学生管理】</p>
  95.               <p align="center"> 再这里您可以注册<br>
  96.               或删除学生的信息 <br>
  97.               <br>
  98.               <br>
  99.               </p>
  100.               <table width="200" border="1">
  101.                 <tr>
  102.                   <td><div align="center"><a href="adminteacher.jsp">【教师<strong>管理</strong>】</a></div></td>
  103.                 </tr>
  104.                 <tr>
  105.                   <td><div align="center"><a href="admincourse.jsp">【课程<strong>管理</strong>】</a></div></td>
  106.                 </tr>
  107.               </table>
  108.               <p>  <strong><font color="#2DFFFF" size="5"> </font></strong></p>
  109.           </div>          </td>
  110.         </tr>
  111.       </table>
  112.     </TD>
  113.     <TD ROWSPAN=2> <IMG SRC="images/temp_05.jpg" WIDTH=4 HEIGHT=455></TD>
  114.     <TD COLSPAN=5 ROWSPAN=2>
  115.       <table width="510" border="0" cellspacing="0" cellpadding="0" height="455" background="images/main_bg.jpg">
  116.         <tr>
  117.           <td width="510">
  118.             <table width="510" border="0" cellspacing="0" cellpadding="0" height="455">
  119.               <tr>
  120.                 <td width="510" height="78">
  121.                   <div align="center"><img src="images/blank_banner.gif" width="468" height="60"></div>
  122.                 </td>
  123.               </tr>
  124.               <tr>
  125.                 <td valign="top">                  <div align="left"><a href="index1.htm">首页</a>&gt;<a href="index3.jsp">后台管理</a>&gt;<a href="adminstudent.jsp">学生管理</a>&gt;删改学生信息<br>
  126.                   <br>
  127.                   <br>
  128.                   <br>
  129.                   <table width="500" border="1" bordercolor="#006666">
  130.                     <tr>
  131.                       <td><div align="center">修改学生信息</div>                        <div align="center"></div></td>
  132.                       </tr>
  133.                     <tr>
  134.                       <td height="248"><div align="center">
  135.                         <form name="form1" method="post" action="adminstudent4.jsp">
  136.                           <table width="274" border="0" bordercolor="#006666">
  137.                             <tr bordercolor="#006666">
  138.                               <td width="65" height="28" background="images/bg.gif" class="bbb">
  139.                                 <div align="right">学生编号</div></td>
  140.                               <td colspan="2" background="images/bg.gif">
  141.                                 <div align="left">
  142.                                   <% out.print("<input name="stuid" type="hidden" id="stuid" value = ""+temstuid+"">" ); %>
  143.    <% out.print(temstuid);%>
  144.                               </div></td>
  145.                             </tr>
  146.                             <tr bordercolor="#006666">
  147.                               <td height="28" background="images/bg.gif" class="bbb">
  148.                                 <div align="right">学生姓名</div></td>
  149.                               <td colspan="2" background="images/bg.gif">
  150.                                 <!--<input name="stuname" type="text" id="stuname2">-->
  151. <% out.print("<input name="stuname" type="text" id="stuname2" value = ""+temstuname+"">" ); %>
  152.                               </td>
  153.                             </tr>
  154.                             <tr bordercolor="#006666">
  155.                               <td height="28" background="images/bg.gif" class="bbb">
  156.                                 <div align="right">学号</div></td>
  157.                               <td colspan="2" background="images/bg.gif">
  158.                                 <table width="195" height="28" border="0" cellpadding="0" cellspacing="0">
  159.                                   <tr>
  160.                                     <td width="69">
  161.                                       <div align="left">
  162.                                        <!-- <input name="stuno" type="text" id="stuno" size="8">-->
  163. <% out.print("<input name="stuno" type="text" size="8" id="stuno" value = ""+temstuno+"">" ); %>
  164.                                       </div>
  165.                                       <div align="right"> </div></td>
  166.                                     <td width="30" class="bbb"><div align="right">年级</div></td>
  167.                                     <td width="96" class="bbb"><select name="stugrade" id="stugrade">
  168.                                         <% String tem[] = new String[4];
  169. tem[0]= new String("大一");
  170. tem[1]= new String("大二");
  171. tem[2]= new String("大三");
  172. tem[3]= new String("大四");
  173.  for (int i = 0; i < 4; i++){
  174. if(i== Integer.parseInt(temstugrade)-1)
  175.                                                                          {out.print("<option selected>" + tem[i].trim() + "</option>");
  176. System.out.println("qqqqqqqqqqqqqqqq");}
  177. else
  178.    out.print("<option>" + tem[i].trim() + "</option>");
  179.   }
  180.                                         %>
  181.                                       </select></td>
  182.                                   </tr>
  183.                               </table></td>
  184.                             </tr>
  185.                             <tr bordercolor="#006666">
  186.                               <td height="28" background="images/bg.gif" class="bbb">
  187.                                 <div align="right">初始密码</div></td>
  188.                               <td colspan="2" bordercolor="#006666" background="images/bg.gif">
  189.                                <!-- <input name="stupsw" type="text" id="stupsw" value="123">-->
  190. <% out.print("<input name="stupsw" type="text" id="stupsw" value = ""+temstupsw+"">" ); %>
  191.                               </td>
  192.                             </tr>
  193.                             <tr>
  194.                               <td>&nbsp;</td>
  195.                               <td width="83">
  196.                                   <div align="center">
  197.                                     <input name="tijiao" type="submit" id="tijiao" value="修改">
  198. </div></td>
  199.                               <td width="112" valign="baseline" bordercolor="#006666">                              <div align="left"><%out.print("<a href='adminstudent5.jsp?delpage=" +temstuid + "'>删除信息</a>");%></div></td>
  200.                             
  201. </tr>
  202.                           </table>
  203.                         </form>
  204.                         </div></td>
  205.                       </tr>
  206.                   </table>
  207.                   <br>
  208.                 </div></td>
  209.               </tr>
  210.             </table>
  211.           </td>
  212.         </tr>
  213.       </table>
  214.     </TD>
  215.     <TD ROWSPAN=2> <IMG SRC="images/temp_07.jpg" WIDTH=5 HEIGHT=455></TD>
  216.   </TR>
  217.   <TR>
  218.     <TD>
  219.       <table width="231" border="0" cellspacing="0" cellpadding="0" height="229" background="images/left_bottom.jpg">
  220.         <tr>
  221.           <td width="231" height="222" valign="top"><div align="center">
  222.             <p><font color="#2DFFFF" size="5"> </font></p>
  223.               <table width="200" border="1">
  224.                 <tr>
  225.                   <td><div align="center"><a href="admincourse.jsp">【课程分配】</a></div></td>
  226.                 </tr>
  227.                 <tr>
  228.                   <td><div align="center"><a href="adminscore.jsp">【成绩录入】</a></div></td>
  229.                 </tr>
  230.                
  231.               </table>
  232.               <br>
  233.               <br>
  234.               <table width="200" border="0">
  235.                 <tr>
  236.                   <td><div align="center"><a href="adminlyb.jsp">查看留言</a></div></td>
  237.                 </tr>
  238.               </table>
  239.               <p align="center"><br>
  240.               <a href="index1.htm" class="ccc">[退出系统]</a></p>
  241.               </div>
  242.           </td>
  243.         </tr>
  244.       </table>
  245.     </TD>
  246.   </TR>
  247.   <TR>
  248.     <TD COLSPAN=8> <IMG SRC="images/temp_09.jpg" WIDTH=750 HEIGHT=5></TD>
  249.   </TR>
  250.   <TR>
  251.     <TD COLSPAN=8> <img src="images/temp_10.jpg" width=752 height=20></TD>
  252.   </TR>
  253. </TABLE>
  254. </BODY>
  255. </HTML>