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

其他数据库

开发平台:

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 couid ,coumark,couback from course where couname = '"+temstuname+"'";
  32. ResultSet rs = subject.executeQuery(strSQL);
  33. while(rs.next())
  34. {
  35. temstuid = rs.getString("couid");
  36.            // temstuno = rs.getString("stuno");
  37. temstupsw=  rs.getString("couback");
  38. temstugrade = rs.getString("coumark");
  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="adminstudent.jsp">【学生管理】</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="admincourse.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="admincourse4.jsp">
  136.                           <table width="250" border="0" bordercolor="#006666">
  137.                             <tr bordercolor="#006666">
  138.                               <td width="68" 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">
  157.                                 <table width="174" height="28" border="0" cellpadding="0" cellspacing="0">
  158.                                   <tr>
  159.                                     <td width="69" align="left">
  160.                                         <div align="left">                                        </div>
  161.                                         <div align="left"><span class="bbb">
  162.                                             <select name="stugrade" id="stugrade">
  163.                                               <% String tem[] = new String[4];
  164. tem[0]= new String("一学分");
  165. tem[1]= new String("二学分");
  166. tem[2]= new String("三学分");
  167. tem[3]= new String("四学分");
  168.  for (int i = 0; i < 4; i++){
  169. if(i== Integer.parseInt(temstugrade)-1)
  170.                                                                          {out.print("<option selected>" + tem[i].trim() + "</option>");
  171. System.out.println("qqqqqqqqqqqqqqqq");}
  172. else
  173.    out.print("<option>" + tem[i].trim() + "</option>");
  174.   }
  175.                                         %>
  176.                                             </select>
  177.                                         </span> </div></td>
  178.                                     <td width="33" class="bbb"><div align="right"></div></td>
  179.                                     <td width="72" class="bbb">&nbsp;</td>
  180.                                   </tr>
  181.                               </table>                                </td>
  182.                             </tr>
  183.                             <tr bordercolor="#006666">
  184.                               <td height="28" background="images/bg.gif" class="bbb">
  185.                                 <div align="right">备注</div></td>
  186.                               <td colspan="2" bordercolor="#006666" background="images/bg.gif">
  187.                                   <% out.print("<textarea name="stupsw" rows="3" id="couback">"+temstupsw+"</textarea>" ); %></td>
  188.                         
  189.     </tr>
  190.                             <tr>
  191.                               <td>&nbsp;</td>
  192.                               <td width="90">
  193.                                   <div align="center">
  194.                                     <input name="tijiao" type="submit" id="tijiao" value="提交">
  195.                                   </div></td>
  196.                               <td width="78" bordercolor="#006666"><div align="left">
  197.                                 <%out.print("<a href='admincourse5.jsp?delpage=" +temstuid + "'>删除信息</a>");%>
  198. </div></td>
  199.                             </tr>
  200.                           </table>
  201.                           </form>
  202.                         </div></td>
  203.                       </tr>
  204.                   </table>
  205.                   <br>
  206.                 </div></td>
  207.               </tr>
  208.             </table>
  209.           </td>
  210.         </tr>
  211.       </table>
  212.     </TD>
  213.     <TD ROWSPAN=2> <IMG SRC="images/temp_07.jpg" WIDTH=5 HEIGHT=455></TD>
  214.   </TR>
  215.   <TR> 
  216.     <TD> 
  217.       <table width="231" border="0" cellspacing="0" cellpadding="0" height="229" background="images/left_bottom.jpg">
  218.         <tr> 
  219.           <td width="231" height="222" valign="top"><div align="center">
  220.             <p><font color="#2DFFFF" size="5"> </font></p>
  221.               <table width="200" border="1">
  222.                 <tr>
  223.                   <td><div align="center"><a href="admintc.jsp">【课程分配】</a></div></td>
  224.                 </tr>
  225.                 <tr>
  226.                   <td><div align="center"><a href="adminscore.jsp">【成绩录入】</a></div></td>
  227.                 </tr>
  228.                 
  229.               </table>
  230.               <br>
  231.               <br>
  232.               <table width="200" border="0">
  233.                 <tr>
  234.                   <td><div align="center"><a href="adminlyb.jsp">查看留言</a></div></td>
  235.                 </tr>
  236.               </table>
  237.               <p align="center"><br>
  238.               <a href="index1.htm" class="ccc">[退出系统]</a></p>
  239.               </div>
  240.           </td>
  241.         </tr>
  242.       </table>
  243.     </TD>
  244.   </TR>
  245.   <TR> 
  246.     <TD COLSPAN=8> <IMG SRC="images/temp_09.jpg" WIDTH=750 HEIGHT=5></TD>
  247.   </TR>
  248.   <TR> 
  249.     <TD COLSPAN=8> <img src="images/temp_10.jpg" width=752 height=20></TD>
  250.   </TR>
  251. </TABLE>
  252. </BODY>
  253. </HTML>