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

📄 adminstudent3.jsp

📁 网上选课程序:a.使用JSP/Servlet开发
💻 JSP
字号:
<%@ page language = "java" contentType = "text/html;charset=gb2312"%>
<%@ page import = "java.sql.*, java.io.*" %>
<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(UnsupportedEncodingException e)
                {
                        System.out.println (e.toString());
                }
                return result;
}
%>


<%
	//String strSQL = "select id ,title from news order by id desc";
	//ResultSet rs = sts.executeQuery(strSQL);

	String temstuname = new String();
	temstuname = request.getParameter("select");
	temstuname = temstuname.trim();
	temstuname = trans(temstuname);
	String temstuid = new String();
	String temstuno = new String();
	String temstupsw = new String();
	String temstugrade = new String();
	String strSQL = "select stuid ,stuno,stupsw,stugrade from student where stuname = '"+temstuname+"'";
	ResultSet rs = subject.executeQuery(strSQL);
	while(rs.next())
	{
			temstuid = rs.getString("stuid");
            temstuno = rs.getString("stuno");
			temstupsw=  rs.getString("stupsw");
			temstugrade = rs.getString("stugrade");
	}

	rs.close();

	//String strSQL2 = "delete from news where id =" + k;
    	//sts.executeUpdate(strSQL2);




%>

<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 {
	color: #FFFFFF;
	font-weight: bold;
	font-size: 12px;
}
a:link {
	color: #FFFFFF;
}
a:visited {
	color: #FFFFFF;
}
-->
</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" valign="bottom">
            <div align="center">
              <p><br>
              </p>
              <p>【学生管理】</p>
              <p align="center"> 再这里您可以注册<br>
              或删除学生的信息 <br>
              <br>
              <br>
              </p>
              <table width="200" border="1">
                <tr>
                  <td><div align="center"><a href="adminteacher.jsp">【教师<strong>管理</strong>】</a></div></td>
                </tr>
                <tr>
                  <td><div align="center"><a href="admincourse.jsp">【课程<strong>管理</strong>】</a></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"><a href="index1.htm">首页</a>&gt;<a href="index3.jsp">后台管理</a>&gt;<a href="adminstudent.jsp">学生管理</a>&gt;删改学生信息<br>
                  <br>
                  <br>
                  <br>
                  <table width="500" border="1" bordercolor="#006666">
                    <tr>
                      <td><div align="center">修改学生信息</div>                        <div align="center"></div></td>
                      </tr>
                    <tr>
                      <td height="248"><div align="center">
                        <form name="form1" method="post" action="adminstudent4.jsp">
                          <table width="274" border="0" bordercolor="#006666">
                            <tr bordercolor="#006666">
                              <td width="65" height="28" background="images/bg.gif" class="bbb">
                                <div align="right">学生编号</div></td>
                              <td colspan="2" background="images/bg.gif">
                                <div align="left">
                                  <% out.print("<input name=\"stuid\" type=\"hidden\" id=\"stuid\" value = \""+temstuid+"\">" ); %>
								   <% out.print(temstuid);%>
                              </div></td>
                            </tr>
                            <tr bordercolor="#006666">
                              <td height="28" background="images/bg.gif" class="bbb">
                                <div align="right">学生姓名</div></td>
                              <td colspan="2" background="images/bg.gif">
                                <!--<input name="stuname" type="text" id="stuname2">-->
								<% out.print("<input name=\"stuname\" type=\"text\" id=\"stuname2\" value = \""+temstuname+"\">" ); %>
                              </td>
                            </tr>
                            <tr bordercolor="#006666">
                              <td height="28" background="images/bg.gif" class="bbb">
                                <div align="right">学号</div></td>
                              <td colspan="2" background="images/bg.gif">
                                <table width="195" height="28" border="0" cellpadding="0" cellspacing="0">
                                  <tr>
                                    <td width="69">
                                      <div align="left">
                                       <!-- <input name="stuno" type="text" id="stuno" size="8">-->
										<% out.print("<input name=\"stuno\" type=\"text\" size=\"8\" id=\"stuno\" value = \""+temstuno+"\">" ); %>

                                      </div>
                                      <div align="right"> </div></td>
                                    <td width="30" class="bbb"><div align="right">年级</div></td>
                                    <td width="96" class="bbb"><select name="stugrade" id="stugrade">
                                        <% String tem[] = new String[4];
											tem[0]= new String("大一");
											tem[1]= new String("大二");
											tem[2]= new String("大三");
											tem[3]= new String("大四");
											 for (int i = 0; i < 4; i++){
										if(i== Integer.parseInt(temstugrade)-1)
                                                                        		{out.print("<option selected>" + tem[i].trim() + "</option>");
																				System.out.println("qqqqqqqqqqqqqqqq");}
										else
							  				out.print("<option>" + tem[i].trim() + "</option>");
							  }

                                        %>


                                      </select></td>
                                  </tr>
                              </table></td>
                            </tr>
                            <tr bordercolor="#006666">
                              <td height="28" background="images/bg.gif" class="bbb">
                                <div align="right">初始密码</div></td>
                              <td colspan="2" bordercolor="#006666" background="images/bg.gif">
                               <!-- <input name="stupsw" type="text" id="stupsw" value="123">-->
								<% out.print("<input name=\"stupsw\" type=\"text\" id=\"stupsw\" value = \""+temstupsw+"\">" ); %>
                              </td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td width="83">
                                  <div align="center">
                                    <input name="tijiao" type="submit" id="tijiao" value="修改">
</div></td>
                              <td width="112" valign="baseline" bordercolor="#006666">                              <div align="left"><%out.print("<a href='adminstudent5.jsp?delpage=" +temstuid + "'>删除信息</a>");%></div></td>
                            																									
							</tr>
                          </table>
                        </form>
                        </div></td>
                      </tr>
                  </table>
                  <br>
                </div></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" valign="top"><div align="center">
            <p><font color="#2DFFFF" size="5"> </font></p>
              <table width="200" border="1">
                <tr>
                  <td><div align="center"><a href="admincourse.jsp">【课程分配】</a></div></td>
                </tr>
                <tr>
                  <td><div align="center"><a href="adminscore.jsp">【成绩录入】</a></div></td>
                </tr>
                <tr>
                  <td><div align="center">【购书管理】</div></td>
                </tr>
              </table>
              <br>
              <br>
              <table width="200" border="0">
                <tr>
                  <td><div align="center"><a href="adminlyb.jsp">查看留言</a></div></td>
                </tr>
              </table>
              <p align="center"><br>
              <a href="index1.htm" class="ccc">[退出系统]</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 + -