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

其他数据库

开发平台:

Java

  1. <%@ page language = "java" contentType = "text/html;charset=gb2312"%>
  2. <%@ page import = "java.sql.*, java.io.*,wsxk.*" %>
  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 teaid ,teapsw from teacher where teaname = '"+temstuname+"'";
  32. ResultSet rs = subject.executeQuery(strSQL);
  33. while(rs.next())
  34. {
  35. temstuid = rs.getString("teaid");
  36.             //temstuno = rs.getString("teano");
  37. temstupsw=  rs.getString("teapsw");
  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="adminstudent.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="adminteacher.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="adminteacher4.jsp">
  136.                           <table width="250" border="0" bordercolor="#006666">
  137.                             <tr bordercolor="#006666">
  138.                               <td 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.                                 <% out.print("<input name="stuname" type="text" id="stuname2" value = ""+temstuname+"">" ); %>
  151. </td>
  152.                             </tr>
  153.                             <tr bordercolor="#006666">
  154.                               <td height="28" background="images/bg.gif" class="bbb">
  155.                                 <div align="right">初始密码</div></td>
  156.                               <td colspan="2" background="images/bg.gif"><% out.print("<input name="stupsw" type="text" id="stupsw" value = ""+temstupsw+"">" ); %></td>
  157.                             </tr>
  158.                             <tr bordercolor="#006666">
  159.                               <td height="28" background="images/bg.gif" class="bbb">
  160.                                 <div align="right"></div></td>
  161.                               <td valign="bottom" bordercolor="#006666" background="images/bg.gif">
  162.                                   <div align="center">
  163.                                     <input name="tijiao" type="submit" id="tijiao3" value="修改">
  164.                                   </div></td>
  165.                               <td valign="bottom" bordercolor="#006666" background="images/bg.gif"><%out.print("<a href='adminteacher5.jsp?delpage=" +temstuid + "'>删除信息</a>");%></td>
  166.                             </tr>
  167.                             <tr>
  168.                               <td>&nbsp;</td>
  169.                               <td>
  170.                                 <div align="right">                                </div></td>
  171.                               <td bordercolor="#006666"><div align="left">
  172.                               </div></td>
  173.                             </tr>
  174.                           </table>
  175.                           </form>
  176.                         </div></td>
  177.                       </tr>
  178.                   </table>
  179.                   <br>
  180.                 </div></td>
  181.               </tr>
  182.             </table>
  183.           </td>
  184.         </tr>
  185.       </table>
  186.     </TD>
  187.     <TD ROWSPAN=2> <IMG SRC="images/temp_07.jpg" WIDTH=5 HEIGHT=455></TD>
  188.   </TR>
  189.   <TR> 
  190.     <TD> 
  191.       <table width="231" border="0" cellspacing="0" cellpadding="0" height="229" background="images/left_bottom.jpg">
  192.         <tr> 
  193.           <td width="231" height="222" valign="top"><div align="center">
  194.             <p><font color="#2DFFFF" size="5"> </font></p>
  195.               <table width="200" border="1">
  196.                 <tr>
  197.                   <td><div align="center"><a href="admincourse.jsp">【课程分配】</a></div></td>
  198.                 </tr>
  199.                 <tr>
  200.                   <td><div align="center"><a href="adminscore.jsp">【成绩录入】</a></div></td>
  201.                 </tr>
  202.                
  203.               </table>
  204.               <br>
  205.               <br>
  206.               <table width="200" border="0">
  207.                 <tr>
  208.                   <td><div align="center"><a href="adminlyb.jsp">查看留言</a></div></td>
  209.                 </tr>
  210.               </table>
  211.               <p align="center"><br>
  212.               <a href="index1.htm" class="ccc">[退出系统]</a></p>
  213.               </div>
  214.           </td>
  215.         </tr>
  216.       </table>
  217.     </TD>
  218.   </TR>
  219.   <TR> 
  220.     <TD COLSPAN=8> <IMG SRC="images/temp_09.jpg" WIDTH=750 HEIGHT=5></TD>
  221.   </TR>
  222.   <TR> 
  223.     <TD COLSPAN=8> <img src="images/temp_10.jpg" width=752 height=20></TD>
  224.   </TR>
  225. </TABLE>
  226. </BODY>
  227. </HTML>